Add capacitorjs runtime

This commit is contained in:
olcxja 2026-05-03 17:09:55 +02:00
commit f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions

21
node_modules/@ionic/utils-terminal/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2017 Drifty Co
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
node_modules/@ionic/utils-terminal/README.md generated vendored Normal file
View file

@ -0,0 +1 @@
# @ionic/utils-terminal

19
node_modules/@ionic/utils-terminal/dist/ansi.d.ts generated vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* ANSI escape codes (WIP)
*
* @see https://en.wikipedia.org/wiki/ANSI_escape_code
*/
export declare class EscapeCode {
static readonly cursorLeft: () => string;
static readonly cursorUp: (count?: number) => string;
static readonly cursorDown: (count?: number) => string;
static readonly cursorForward: (count?: number) => string;
static readonly cursorBackward: (count?: number) => string;
static readonly cursorHide: () => string;
static readonly cursorShow: () => string;
static readonly eraseLine: () => string;
static readonly eraseLines: (count: number) => string;
static readonly eraseUp: () => string;
static readonly eraseDown: () => string;
static readonly eraseScreen: () => string;
}

33
node_modules/@ionic/utils-terminal/dist/ansi.js generated vendored Normal file
View file

@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EscapeCode = void 0;
const ESC = '\u001B[';
/**
* ANSI escape codes (WIP)
*
* @see https://en.wikipedia.org/wiki/ANSI_escape_code
*/
class EscapeCode {
}
exports.EscapeCode = EscapeCode;
EscapeCode.cursorLeft = () => `${ESC}G`;
EscapeCode.cursorUp = (count = 1) => `${ESC}${count}A`;
EscapeCode.cursorDown = (count = 1) => `${ESC}${count}B`;
EscapeCode.cursorForward = (count = 1) => `${ESC}${count}C`;
EscapeCode.cursorBackward = (count = 1) => `${ESC}${count}D`;
EscapeCode.cursorHide = () => `${ESC}?25l`;
EscapeCode.cursorShow = () => `${ESC}?25h`;
EscapeCode.eraseLine = () => `${ESC}2K`;
EscapeCode.eraseLines = (count) => {
let seq = '';
for (let i = 0; i < count; i++) {
seq += EscapeCode.eraseLine();
if (i < count - 1) {
seq += EscapeCode.cursorUp();
}
}
return `${seq}${EscapeCode.cursorLeft()}`;
};
EscapeCode.eraseUp = () => `${ESC}1J`;
EscapeCode.eraseDown = () => `${ESC}J`;
EscapeCode.eraseScreen = () => `${ESC}2J`;

9
node_modules/@ionic/utils-terminal/dist/cursor.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
/// <reference types="node" />
export declare class Cursor {
static stream: NodeJS.WriteStream;
private static _isVisible;
private static _listenerAttached;
static show(): void;
static hide(): void;
static toggle(): void;
}

38
node_modules/@ionic/utils-terminal/dist/cursor.js generated vendored Normal file
View file

@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Cursor = void 0;
const tslib_1 = require("tslib");
const signal_exit_1 = tslib_1.__importDefault(require("signal-exit"));
const ansi_1 = require("./ansi");
class Cursor {
static show() {
if (Cursor.stream.isTTY) {
Cursor._isVisible = true;
Cursor.stream.write(ansi_1.EscapeCode.cursorShow());
}
}
static hide() {
if (Cursor.stream.isTTY) {
if (!Cursor._listenerAttached) {
(0, signal_exit_1.default)(() => {
Cursor.show();
});
Cursor._listenerAttached = true;
}
Cursor._isVisible = false;
Cursor.stream.write(ansi_1.EscapeCode.cursorHide());
}
}
static toggle() {
if (Cursor._isVisible) {
Cursor.hide();
}
else {
Cursor.show();
}
}
}
exports.Cursor = Cursor;
Cursor.stream = process.stderr;
Cursor._isVisible = true;
Cursor._listenerAttached = false;

35
node_modules/@ionic/utils-terminal/dist/format.d.ts generated vendored Normal file
View file

@ -0,0 +1,35 @@
import sliceAnsi = require('slice-ansi');
import stringWidth = require('string-width');
import stripAnsi = require('strip-ansi');
export { sliceAnsi, stringWidth, stripAnsi };
export declare const TTY_WIDTH: number;
export declare function indent(n?: number): string;
export interface WordWrapOptions {
width?: number;
indentation?: number;
append?: string;
}
export declare function wordWrap(msg: string, { width, indentation, append }: WordWrapOptions): string;
export declare function prettyPath(p: string): string;
export declare function expandPath(p: string): string;
export declare function generateFillSpaceStringList(list: string[], optimalLength?: number, fillCharacter?: string): string[];
export interface ColumnarOptions {
hsep?: string;
vsep?: string;
headers?: string[];
}
/**
* Basic CLI table generator with support for ANSI colors.
*
* @param rows 2-dimensional matrix containing cells. An array of columns,
* which are arrays of cells.
* @param options.vsep The vertical separator character, default is
* `chalk.dim('|')`. Supply an empty string to hide
* the separator altogether.
* @param options.hsep The horizontal separator character, default is
* `chalk.dim('-')`. This is used under the headers,
* if supplied. Supply an empty string to hide the
* separator altogether.
* @param options.headers An array of header cells.
*/
export declare function columnar(rows: string[][], { hsep, vsep, headers }: ColumnarOptions): string;

123
node_modules/@ionic/utils-terminal/dist/format.js generated vendored Normal file
View file

@ -0,0 +1,123 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.columnar = exports.generateFillSpaceStringList = exports.expandPath = exports.prettyPath = exports.wordWrap = exports.indent = exports.TTY_WIDTH = exports.stripAnsi = exports.stringWidth = exports.sliceAnsi = void 0;
const tslib_1 = require("tslib");
const os = tslib_1.__importStar(require("os"));
const path = tslib_1.__importStar(require("path"));
const sliceAnsi = require("slice-ansi");
exports.sliceAnsi = sliceAnsi;
const stringWidth = require("string-width");
exports.stringWidth = stringWidth;
const stripAnsi = require("strip-ansi");
exports.stripAnsi = stripAnsi;
const wrapAnsi = require("wrap-ansi");
const untildify = require("untildify");
const MIN_TTY_WIDTH = 80;
const MAX_TTY_WIDTH = 120;
exports.TTY_WIDTH = process.stdout.columns ? Math.max(MIN_TTY_WIDTH, Math.min(process.stdout.columns, MAX_TTY_WIDTH)) : Infinity;
function indent(n = 4) {
return ' '.repeat(n);
}
exports.indent = indent;
function wordWrap(msg, { width = exports.TTY_WIDTH, indentation = 0, append = '' }) {
return wrapAnsi(msg, width - indentation - append.length, { trim: true }).split('\n').join(`${append}\n${indent(indentation)}`);
}
exports.wordWrap = wordWrap;
function prettyPath(p) {
p = expandPath(p);
const cwd = process.cwd();
const d = path.dirname(p);
const h = os.homedir();
const distanceFromCwd = Math.abs(d.split(path.sep).length - cwd.split(path.sep).length);
if (cwd === d) {
return '.' + path.sep + path.basename(p);
}
else if (d.startsWith(cwd)) {
return '.' + path.sep + p.substring(cwd.length + 1);
}
else if (distanceFromCwd <= 2) {
const rel = path.relative(cwd, p);
return rel ? rel : '.';
}
else if (p === h) {
return '~';
}
else if (p.indexOf(h) === 0) {
return '~' + path.sep + p.substring(h.length + 1);
}
return p;
}
exports.prettyPath = prettyPath;
function expandPath(p) {
return path.resolve(untildify(p));
}
exports.expandPath = expandPath;
function generateFillSpaceStringList(list, optimalLength = 1, fillCharacter = ' ') {
if (optimalLength < 2) {
optimalLength = 2;
}
const longestItem = Math.max(...list.map(item => stringWidth(item)));
const fullLength = longestItem > optimalLength ? longestItem + 1 : optimalLength;
const fullLengthString = fillCharacter.repeat(fullLength);
return list.map(item => sliceAnsi(fullLengthString, 0, fullLength - stringWidth(item)));
}
exports.generateFillSpaceStringList = generateFillSpaceStringList;
/**
* Basic CLI table generator with support for ANSI colors.
*
* @param rows 2-dimensional matrix containing cells. An array of columns,
* which are arrays of cells.
* @param options.vsep The vertical separator character, default is
* `chalk.dim('|')`. Supply an empty string to hide
* the separator altogether.
* @param options.hsep The horizontal separator character, default is
* `chalk.dim('-')`. This is used under the headers,
* if supplied. Supply an empty string to hide the
* separator altogether.
* @param options.headers An array of header cells.
*/
function columnar(rows, { hsep = '-', vsep = '|', headers }) {
const includeHeaders = headers ? true : false;
if (!rows[0]) {
return '';
}
const columnCount = headers ? headers.length : rows[0].length;
const columns = headers ?
headers.map(header => [header]) :
rows[0].map(() => []);
for (const row of rows) {
let highestLineCount = 0;
const splitRows = row.map(cell => {
const lines = cell.split('\n');
highestLineCount = Math.max(highestLineCount, lines.length);
return lines;
});
for (const rowIndex in row) {
if (columns[rowIndex]) {
columns[rowIndex].push(...splitRows[rowIndex], ...Array(highestLineCount - splitRows[rowIndex].length).fill(''));
}
}
}
const paddedColumns = columns.map((col, columnIndex) => {
if (columnIndex < columnCount - 1) {
const spaceCol = generateFillSpaceStringList(col);
return col.map((cell, cellIndex) => `${cell}${spaceCol[cellIndex]}${vsep === '' ? '' : `${vsep} `}`);
}
else {
return col;
}
});
let longestRowLength = 0;
const singleColumn = paddedColumns.reduce((a, b) => {
return a.map((_, i) => {
const r = a[i] + b[i];
longestRowLength = Math.max(longestRowLength, stringWidth(r));
return r;
});
});
if (includeHeaders && hsep !== '') {
singleColumn.splice(1, 0, hsep.repeat(longestRowLength));
}
return singleColumn.join('\n');
}
exports.columnar = columnar;

4
node_modules/@ionic/utils-terminal/dist/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,4 @@
export * from './ansi';
export * from './cursor';
export * from './format';
export * from './info';

7
node_modules/@ionic/utils-terminal/dist/index.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./ansi"), exports);
tslib_1.__exportStar(require("./cursor"), exports);
tslib_1.__exportStar(require("./format"), exports);
tslib_1.__exportStar(require("./info"), exports);

26
node_modules/@ionic/utils-terminal/dist/info.d.ts generated vendored Normal file
View file

@ -0,0 +1,26 @@
/**
* These environment variables work for: GitHub Actions, Travis CI, CircleCI,
* Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS
* CodeBuild
*/
export declare const CI_ENVIRONMENT_VARIABLES: readonly string[];
export declare const CI_ENVIRONMENT_VARIABLES_DETECTED: string[];
export interface TerminalInfo {
/**
* Whether this is in CI or not.
*/
readonly ci: boolean;
/**
* Path to the user's shell program.
*/
readonly shell: string;
/**
* Whether the terminal is an interactive TTY or not.
*/
readonly tty: boolean;
/**
* Whether this is a Windows shell or not.
*/
readonly windows: boolean;
}
export declare const TERMINAL_INFO: TerminalInfo;

40
node_modules/@ionic/utils-terminal/dist/info.js generated vendored Normal file
View file

@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TERMINAL_INFO = exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES = void 0;
const tslib_1 = require("tslib");
const debug_1 = require("debug");
const os = tslib_1.__importStar(require("os"));
const debug = (0, debug_1.debug)('ionic:utils-terminal:info');
/**
* These environment variables work for: GitHub Actions, Travis CI, CircleCI,
* Gitlab CI, AppVeyor, CodeShip, Jenkins, TeamCity, Bitbucket Pipelines, AWS
* CodeBuild
*/
exports.CI_ENVIRONMENT_VARIABLES = ['CI', 'BUILD_ID', 'BUILD_NUMBER', 'BITBUCKET_COMMIT', 'CODEBUILD_BUILD_ARN', 'GITHUB_ACTIONS'];
exports.CI_ENVIRONMENT_VARIABLES_DETECTED = exports.CI_ENVIRONMENT_VARIABLES.filter(v => !!process.env[v]);
function getShell() {
const { shell } = os.userInfo();
if (shell) {
return shell;
}
if (process.env.SHELL) {
return process.env.SHELL;
}
if (process.platform === 'darwin') {
return '/bin/bash';
}
if (process.platform === 'win32') {
return process.env.COMSPEC ? process.env.COMSPEC : 'cmd.exe';
}
return '/bin/sh';
}
if (exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0) {
debug(`Environment variables for CI detected: ${exports.CI_ENVIRONMENT_VARIABLES_DETECTED.join(', ')}`);
}
exports.TERMINAL_INFO = Object.freeze({
ci: exports.CI_ENVIRONMENT_VARIABLES_DETECTED.length > 0,
shell: getShell(),
tty: Boolean(process.stdin.isTTY && process.stdout.isTTY && process.stderr.isTTY),
windows: process.platform === 'win32' || !!(process.env.OSTYPE && /^(msys|cygwin)$/.test(process.env.OSTYPE) ||
process.env.MSYSTEM && /^MINGW(32|64)$/.test(process.env.MSYSTEM)),
});

57
node_modules/@ionic/utils-terminal/package.json generated vendored Normal file
View file

@ -0,0 +1,57 @@
{
"name": "@ionic/utils-terminal",
"version": "2.3.5",
"description": "Terminal utils for NodeJS",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
"license": "MIT",
"engines": {
"node": ">=16.0.0"
},
"files": [
"dist/",
"LICENSE",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/ionic-team/ionic-cli.git"
},
"bugs": {
"url": "https://github.com/ionic-team/ionic-cli/issues"
},
"scripts": {
"clean": "rimraf dist",
"lint": "true",
"build": "npm run clean && tsc",
"watch": "tsc -w --preserveWatchOutput",
"test": "jest --maxWorkers=4",
"prepublishOnly": "npm run build"
},
"dependencies": {
"@types/slice-ansi": "^4.0.0",
"debug": "^4.0.0",
"signal-exit": "^3.0.3",
"slice-ansi": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0",
"tslib": "^2.0.1",
"untildify": "^4.0.0",
"wrap-ansi": "^7.0.0"
},
"devDependencies": {
"@types/debug": "^4.1.1",
"@types/jest": "^26.0.10",
"@types/node": "~16.0.0",
"@types/signal-exit": "^3.0.0",
"@types/wrap-ansi": "^3.0.0",
"jest": "^26.4.2",
"jest-cli": "^26.0.1",
"lint-staged": "^10.0.2",
"rimraf": "^3.0.0",
"ts-jest": "~26.3.0",
"typescript": "~4.8.0"
}
}