@capacitor-plus/cli 8.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +84 -0
- package/assets/android-template.tar.gz +0 -0
- package/assets/capacitor-cordova-android-plugins.tar.gz +0 -0
- package/assets/capacitor-cordova-ios-plugins.tar.gz +0 -0
- package/assets/ios-pods-template.tar.gz +0 -0
- package/assets/ios-spm-template.tar.gz +0 -0
- package/bin/capacitor +18 -0
- package/dist/android/add.js +52 -0
- package/dist/android/build.js +104 -0
- package/dist/android/common.js +94 -0
- package/dist/android/doctor.js +160 -0
- package/dist/android/open.js +28 -0
- package/dist/android/run.js +42 -0
- package/dist/android/update.js +317 -0
- package/dist/colors.js +26 -0
- package/dist/common.js +435 -0
- package/dist/config.js +404 -0
- package/dist/cordova.js +801 -0
- package/dist/declarations.d.ts +674 -0
- package/dist/declarations.js +2 -0
- package/dist/definitions.js +13 -0
- package/dist/errors.js +27 -0
- package/dist/framework-configs.js +109 -0
- package/dist/index.js +253 -0
- package/dist/ios/add.js +13 -0
- package/dist/ios/build.js +96 -0
- package/dist/ios/common.js +105 -0
- package/dist/ios/doctor.js +45 -0
- package/dist/ios/open.js +17 -0
- package/dist/ios/run.js +51 -0
- package/dist/ios/update.js +449 -0
- package/dist/ipc.js +61 -0
- package/dist/log.js +39 -0
- package/dist/plugin.js +182 -0
- package/dist/sysconfig.js +35 -0
- package/dist/tasks/add.js +115 -0
- package/dist/tasks/build.js +63 -0
- package/dist/tasks/config.js +28 -0
- package/dist/tasks/copy.js +210 -0
- package/dist/tasks/create.js +10 -0
- package/dist/tasks/doctor.js +68 -0
- package/dist/tasks/init.js +138 -0
- package/dist/tasks/list.js +50 -0
- package/dist/tasks/migrate-spm.js +19 -0
- package/dist/tasks/migrate.js +518 -0
- package/dist/tasks/new-plugin.js +10 -0
- package/dist/tasks/open.js +62 -0
- package/dist/tasks/run.js +118 -0
- package/dist/tasks/serve.js +11 -0
- package/dist/tasks/sourcemaps.js +39 -0
- package/dist/tasks/sync.js +55 -0
- package/dist/tasks/telemetry.js +41 -0
- package/dist/tasks/update.js +74 -0
- package/dist/telemetry.js +119 -0
- package/dist/util/cli.js +25 -0
- package/dist/util/emoji.js +13 -0
- package/dist/util/fn.js +13 -0
- package/dist/util/fs.js +43 -0
- package/dist/util/iosplugin.js +66 -0
- package/dist/util/js.js +21 -0
- package/dist/util/livereload.js +148 -0
- package/dist/util/monorepotools.js +109 -0
- package/dist/util/native-run.js +63 -0
- package/dist/util/node.js +54 -0
- package/dist/util/promise.js +35 -0
- package/dist/util/spm.js +187 -0
- package/dist/util/subprocess.js +37 -0
- package/dist/util/template.js +11 -0
- package/dist/util/term.js +30 -0
- package/dist/util/uuid.js +11 -0
- package/dist/util/xml.js +55 -0
- package/package.json +89 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uuidv4 = void 0;
|
|
4
|
+
function uuidv4() {
|
|
5
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
6
|
+
const r = (Math.random() * 16) | 0;
|
|
7
|
+
const v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
8
|
+
return v.toString(16);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
exports.uuidv4 = uuidv4;
|
package/dist/util/xml.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildXmlElement = exports.writeXML = exports.parseXML = exports.readXML = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = require("fs-extra");
|
|
6
|
+
const xml2js_1 = tslib_1.__importDefault(require("xml2js"));
|
|
7
|
+
async function readXML(path) {
|
|
8
|
+
var _a;
|
|
9
|
+
try {
|
|
10
|
+
const xmlStr = await (0, fs_extra_1.readFile)(path, { encoding: 'utf-8' });
|
|
11
|
+
try {
|
|
12
|
+
return await xml2js_1.default.parseStringPromise(xmlStr);
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
throw `Error parsing: ${path}, ${(_a = e.stack) !== null && _a !== void 0 ? _a : e}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
throw `Unable to read: ${path}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.readXML = readXML;
|
|
23
|
+
function parseXML(xmlStr, options) {
|
|
24
|
+
const parser = options !== undefined ? new xml2js_1.default.Parser({ ...options }) : new xml2js_1.default.Parser();
|
|
25
|
+
let xmlObj;
|
|
26
|
+
parser.parseString(xmlStr, (err, result) => {
|
|
27
|
+
if (!err) {
|
|
28
|
+
xmlObj = result;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return xmlObj;
|
|
32
|
+
}
|
|
33
|
+
exports.parseXML = parseXML;
|
|
34
|
+
async function writeXML(object) {
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
const builder = new xml2js_1.default.Builder({
|
|
37
|
+
headless: true,
|
|
38
|
+
explicitRoot: false,
|
|
39
|
+
rootName: 'deleteme',
|
|
40
|
+
});
|
|
41
|
+
let xml = builder.buildObject(object);
|
|
42
|
+
xml = xml.replace('<deleteme>', '').replace('</deleteme>', '');
|
|
43
|
+
resolve(xml);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
exports.writeXML = writeXML;
|
|
47
|
+
function buildXmlElement(configElement, rootName) {
|
|
48
|
+
const builder = new xml2js_1.default.Builder({
|
|
49
|
+
headless: true,
|
|
50
|
+
explicitRoot: false,
|
|
51
|
+
rootName: rootName,
|
|
52
|
+
});
|
|
53
|
+
return builder.buildObject(configElement);
|
|
54
|
+
}
|
|
55
|
+
exports.buildXmlElement = buildXmlElement;
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@capacitor-plus/cli",
|
|
3
|
+
"version": "8.0.0-beta.0",
|
|
4
|
+
"description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
|
|
5
|
+
"homepage": "https://github.com/Cap-go/capacitor-plus",
|
|
6
|
+
"author": "Capgo Team <support@capgo.app> (https://capgo.app)",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Cap-go/capacitor-plus.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Cap-go/capacitor-plus/issues"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"assets/",
|
|
17
|
+
"bin/",
|
|
18
|
+
"dist/**/*.js",
|
|
19
|
+
"dist/declarations.d.ts"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"ionic",
|
|
23
|
+
"ionic framework",
|
|
24
|
+
"capacitor",
|
|
25
|
+
"universal app",
|
|
26
|
+
"progressive web apps",
|
|
27
|
+
"cross platform"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=22.0.0"
|
|
31
|
+
},
|
|
32
|
+
"main": "dist/index.js",
|
|
33
|
+
"types": "dist/declarations.d.ts",
|
|
34
|
+
"bin": {
|
|
35
|
+
"capacitor": "./bin/capacitor",
|
|
36
|
+
"cap": "./bin/capacitor"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "npm run clean && npm run assets && tsc",
|
|
40
|
+
"clean": "rimraf ./dist",
|
|
41
|
+
"assets": "node ../scripts/pack-cli-assets.mjs",
|
|
42
|
+
"prepublishOnly": "npm run build",
|
|
43
|
+
"test": "jest -i",
|
|
44
|
+
"watch": "npm run assets && tsc -w"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@ionic/cli-framework-output": "^2.2.8",
|
|
48
|
+
"@ionic/utils-subprocess": "^3.0.1",
|
|
49
|
+
"@ionic/utils-terminal": "^2.3.5",
|
|
50
|
+
"commander": "^12.1.0",
|
|
51
|
+
"debug": "^4.4.0",
|
|
52
|
+
"env-paths": "^2.2.0",
|
|
53
|
+
"fs-extra": "^11.2.0",
|
|
54
|
+
"kleur": "^4.1.5",
|
|
55
|
+
"native-run": "^2.0.1",
|
|
56
|
+
"open": "^8.4.0",
|
|
57
|
+
"plist": "^3.1.0",
|
|
58
|
+
"prompts": "^2.4.2",
|
|
59
|
+
"rimraf": "^6.0.1",
|
|
60
|
+
"semver": "^7.6.3",
|
|
61
|
+
"tar": "^6.1.11",
|
|
62
|
+
"tslib": "^2.8.1",
|
|
63
|
+
"xml2js": "^0.6.2"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/debug": "^4.1.12",
|
|
67
|
+
"@types/fs-extra": "^11.0.4",
|
|
68
|
+
"@types/jest": "^29.5.14",
|
|
69
|
+
"@types/plist": "^3.0.5",
|
|
70
|
+
"@types/prompts": "^2.4.9",
|
|
71
|
+
"@types/semver": "^7.5.8",
|
|
72
|
+
"@types/tar": "^6.1.1",
|
|
73
|
+
"@types/tmp": "^0.2.6",
|
|
74
|
+
"@types/xml2js": "0.4.5",
|
|
75
|
+
"jest": "^29.7.0",
|
|
76
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
77
|
+
"jest-jasmine2": "^29.7.0",
|
|
78
|
+
"tmp": "^0.2.3",
|
|
79
|
+
"ts-jest": "^29.0.5",
|
|
80
|
+
"typescript": "~5.0.2"
|
|
81
|
+
},
|
|
82
|
+
"jest": {
|
|
83
|
+
"preset": "ts-jest",
|
|
84
|
+
"testRunner": "jest-jasmine2"
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
}
|
|
89
|
+
}
|