@capacitor/cli 7.5.0 → 7.6.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/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/dist/index.js +6 -4
- package/dist/ios/update.js +4 -1
- package/dist/tasks/run.js +6 -4
- package/dist/util/livereload.js +2 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -154,11 +154,12 @@ function runProgram(config) {
|
|
|
154
154
|
.option('--target <id>', 'use a specific target')
|
|
155
155
|
.option('--no-sync', `do not run ${colors_1.default.input('sync')}`)
|
|
156
156
|
.option('--forwardPorts <port:port>', 'Automatically run "adb reverse" for better live-reloading support')
|
|
157
|
-
.option('-l, --live-reload', '
|
|
158
|
-
.option('--host <host>', '
|
|
159
|
-
.option('--port <port>', '
|
|
157
|
+
.option('-l, --live-reload', 'Set live-reload URL via CLI (uses defaults, overrides server.url config)')
|
|
158
|
+
.option('--host <host>', 'Configure host for live-reload URL (used with --live-reload)')
|
|
159
|
+
.option('--port <port>', 'Configure port for live-reload URL (used with --live-reload)')
|
|
160
160
|
.option('--configuration <name>', 'Configuration name of the iOS Scheme')
|
|
161
|
-
.
|
|
161
|
+
.option('--https', 'Use https:// instead of http:// for live-reload URL (used with --live-reload)')
|
|
162
|
+
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, list, json, target, sync, forwardPorts, liveReload, host, port, configuration, https }) => {
|
|
162
163
|
const { runCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/run')));
|
|
163
164
|
await runCommand(config, platform, {
|
|
164
165
|
scheme,
|
|
@@ -172,6 +173,7 @@ function runProgram(config) {
|
|
|
172
173
|
host,
|
|
173
174
|
port,
|
|
174
175
|
configuration,
|
|
176
|
+
https,
|
|
175
177
|
});
|
|
176
178
|
})));
|
|
177
179
|
commander_1.program
|
package/dist/ios/update.js
CHANGED
|
@@ -116,11 +116,14 @@ async function updatePodfile(config, plugins, deployment) {
|
|
|
116
116
|
cwd: config.ios.nativeProjectDirAbs,
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
else {
|
|
119
|
+
else if (await (0, subprocess_1.isInstalled)('pod')) {
|
|
120
120
|
await (0, subprocess_1.runCommand)(podPath, ['install', ...(deployment ? ['--deployment'] : [])], {
|
|
121
121
|
cwd: config.ios.nativeProjectDirAbs,
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
+
else {
|
|
125
|
+
log_1.logger.warn('Skipping pod install because CocoaPods is not installed');
|
|
126
|
+
}
|
|
124
127
|
const isXcodebuildAvailable = await (0, subprocess_1.isInstalled)('xcodebuild');
|
|
125
128
|
if (isXcodebuildAvailable) {
|
|
126
129
|
await (0, subprocess_1.runCommand)('xcodebuild', ['-project', (0, path_1.basename)(`${config.ios.nativeXcodeProjDirAbs}`), 'clean'], {
|
package/dist/tasks/run.js
CHANGED
|
@@ -14,9 +14,11 @@ const livereload_1 = require("../util/livereload");
|
|
|
14
14
|
const native_run_1 = require("../util/native-run");
|
|
15
15
|
const sync_1 = require("./sync");
|
|
16
16
|
async function runCommand(config, selectedPlatformName, options) {
|
|
17
|
-
var _a, _b, _c
|
|
17
|
+
var _a, _b, _c;
|
|
18
18
|
options.host = (_b = (_a = options.host) !== null && _a !== void 0 ? _a : livereload_1.CapLiveReloadHelper.getIpAddress()) !== null && _b !== void 0 ? _b : 'localhost';
|
|
19
|
-
options.
|
|
19
|
+
if (!options.https && !options.port) {
|
|
20
|
+
options.port = '3000';
|
|
21
|
+
}
|
|
20
22
|
if (selectedPlatformName && !(await (0, common_1.isValidPlatform)(selectedPlatformName))) {
|
|
21
23
|
const platformDir = (0, common_1.resolvePlatform)(config, selectedPlatformName);
|
|
22
24
|
if (platformDir) {
|
|
@@ -78,13 +80,13 @@ async function runCommand(config, selectedPlatformName, options) {
|
|
|
78
80
|
}
|
|
79
81
|
})
|
|
80
82
|
.then(() => process.exit());
|
|
81
|
-
log_1.logger.info(`App running with live reload listing for: http://${options.host}
|
|
83
|
+
log_1.logger.info(`App running with live reload listing for: ${options.https ? 'https' : 'http'}://${options.host}${options.port ? `:${options.port}` : ''}. Press Ctrl+C to quit.`);
|
|
82
84
|
await sleepForever();
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
catch (e) {
|
|
86
88
|
if (!(0, errors_1.isFatal)(e)) {
|
|
87
|
-
(0, errors_1.fatal)((
|
|
89
|
+
(0, errors_1.fatal)((_c = e.stack) !== null && _c !== void 0 ? _c : e);
|
|
88
90
|
}
|
|
89
91
|
throw e;
|
|
90
92
|
}
|
package/dist/util/livereload.js
CHANGED
|
@@ -129,8 +129,9 @@ class CapLiveReload {
|
|
|
129
129
|
const configJson = (0, fs_extra_1.readJSONSync)(capConfigPath);
|
|
130
130
|
this.configJsonToRevertTo.json = JSON.stringify(configJson, null, 2);
|
|
131
131
|
this.configJsonToRevertTo.platformPath = capConfigPath;
|
|
132
|
-
const url =
|
|
132
|
+
const url = `${options.https ? 'https' : 'http'}://${options.host}${options.port ? `:${options.port}` : ''}`;
|
|
133
133
|
configJson.server = {
|
|
134
|
+
...configJson.server,
|
|
134
135
|
url,
|
|
135
136
|
};
|
|
136
137
|
(0, fs_extra_1.writeJSONSync)(capConfigPath, configJson, { spaces: '\t' });
|
package/package.json
CHANGED