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

1
node_modules/@capacitor/assets/dist/util/cli.d.ts generated vendored Normal file
View file

@ -0,0 +1 @@
export declare function wrapAction(action: any): (...args: any[]) => Promise<void>;

31
node_modules/@capacitor/assets/dist/util/cli.js generated vendored Normal file
View file

@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapAction = void 0;
const log_1 = require("./log");
function wrapAction(action) {
return async (...args) => {
try {
await action(...args);
}
catch (e) {
log_1.logger.error(e.message);
throw e;
}
};
}
exports.wrapAction = wrapAction;
/*
export async function logPrompt(msg: string, promptObject: any) {
const { wordWrap } = await import('@ionic/cli-framework-output');
const prompt = await import('prompts');
logger.log({
msg: `${c.input(`[?]`)} ${wordWrap(msg, { indentation: 4 })}`,
logger,
format: false,
});
return prompt.default(promptObject, { onCancel: () => process.exit(1) });
}
*/

8
node_modules/@capacitor/assets/dist/util/log.d.ts generated vendored Normal file
View file

@ -0,0 +1,8 @@
import { StreamOutputStrategy } from '@ionic/cli-framework-output';
export declare const output: StreamOutputStrategy;
export declare const logger: import("@ionic/cli-framework-output").Logger;
export declare function debug(...args: any[]): void;
export declare function log(...args: any[]): void;
export declare function warn(...args: any[]): void;
export declare function error(...args: any[]): void;
export declare function fatal(msg: string, exc?: Error): never;

51
node_modules/@capacitor/assets/dist/util/log.js generated vendored Normal file
View file

@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fatal = exports.error = exports.warn = exports.log = exports.debug = exports.logger = exports.output = void 0;
const tslib_1 = require("tslib");
const cli_framework_output_1 = require("@ionic/cli-framework-output");
const colors_1 = (0, tslib_1.__importDefault)(require("../colors"));
const term_1 = require("./term");
const options = {
colors: colors_1.default,
stream: process.argv.includes('--json') ? process.stderr : process.stdout,
};
exports.output = (0, term_1.isInteractive)() ? new cli_framework_output_1.TTYOutputStrategy(options) : new cli_framework_output_1.StreamOutputStrategy(options);
exports.logger = (0, cli_framework_output_1.createDefaultLogger)({
output: exports.output,
formatterOptions: {
titleize: false,
tags: new Map([
[cli_framework_output_1.LOGGER_LEVELS.DEBUG, colors_1.default.log.DEBUG('[debug]')],
[cli_framework_output_1.LOGGER_LEVELS.INFO, colors_1.default.log.INFO('[info]')],
[cli_framework_output_1.LOGGER_LEVELS.WARN, colors_1.default.log.WARN('[warn]')],
[cli_framework_output_1.LOGGER_LEVELS.ERROR, colors_1.default.log.ERROR('[error]')],
]),
},
});
function debug(...args) {
if (process.env.VERBOSE !== 'false') {
console.log(...args);
}
}
exports.debug = debug;
function log(...args) {
console.log(...args);
}
exports.log = log;
function warn(...args) {
console.warn(...args);
}
exports.warn = warn;
function error(...args) {
console.error(...args);
}
exports.error = error;
function fatal(msg, exc) {
console.error(colors_1.default.failure(`Fatal error: ${msg}`));
console.log('ERROR', msg, exc);
if (exc) {
console.error(exc);
}
process.exit(1);
}
exports.fatal = fatal;

View file

@ -0,0 +1 @@
export declare function runCommand(command: string, args: string[], options?: {}): Promise<void>;

22
node_modules/@capacitor/assets/dist/util/subprocess.js generated vendored Normal file
View file

@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCommand = void 0;
const tslib_1 = require("tslib");
const utils_subprocess_1 = require("@ionic/utils-subprocess");
const colors_1 = (0, tslib_1.__importDefault)(require("../colors"));
async function runCommand(command, args, options = {}) {
console.log(colors_1.default.strong(`> ${command} ${args.join(' ')}`));
const p = new utils_subprocess_1.Subprocess(command, args, options);
try {
// return await p.output();
return await p.run();
}
catch (e) {
if (e instanceof utils_subprocess_1.SubprocessError) {
// old behavior of just throwing the stdout/stderr strings
throw e.output ? e.output : e.code ? e.code : e.error ? e.error.message : 'Unknown error';
}
throw e;
}
}
exports.runCommand = runCommand;

2
node_modules/@capacitor/assets/dist/util/term.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export declare const checkInteractive: (...args: any[]) => boolean;
export declare const isInteractive: () => boolean;

30
node_modules/@capacitor/assets/dist/util/term.js generated vendored Normal file
View file

@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInteractive = exports.checkInteractive = void 0;
const tslib_1 = require("tslib");
const utils_terminal_1 = require("@ionic/utils-terminal");
const colors_1 = (0, tslib_1.__importDefault)(require("../colors"));
const log_1 = require("./log");
// Given input variables to a command, make sure all are provided if the terminal
// is not interactive (because we won't be able to prompt the user)
const checkInteractive = (...args) => {
if ((0, exports.isInteractive)()) {
return true;
}
// Fail if no args are provided, treat this as just a check of whether the term is
// interactive or not.
if (!args.length) {
return false;
}
// Make sure none of the provided args are empty, otherwise print the interactive
// warning and return false
if (args.filter((arg) => !arg).length) {
log_1.logger.error(`Non-interactive shell detected.\n` +
`Run the command with ${colors_1.default.input('--help')} to see a list of arguments that must be provided.`);
return false;
}
return true;
};
exports.checkInteractive = checkInteractive;
const isInteractive = () => utils_terminal_1.TERMINAL_INFO.tty && !utils_terminal_1.TERMINAL_INFO.ci;
exports.isInteractive = isInteractive;