nativescript 8.9.0-dev.3 → 8.9.0-dev.4
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/docs/man_pages/project/configuration/widget-ios.md +24 -0
- package/docs/man_pages/project/configuration/widget.md +24 -0
- package/docs/man_pages/start.md +1 -1
- package/lib/android-tools-info.js +12 -0
- package/lib/base-package-manager.js +7 -0
- package/lib/bootstrap.js +5 -1
- package/lib/bun-package-manager.js +17 -1
- package/lib/color.js +5 -2
- package/lib/commands/add-platform.js +1 -0
- package/lib/commands/apple-login.js +1 -0
- package/lib/commands/appstore-list.js +1 -0
- package/lib/commands/appstore-upload.js +3 -0
- package/lib/commands/build.js +3 -2
- package/lib/commands/clean.js +22 -1
- package/lib/commands/command-base.js +1 -0
- package/lib/commands/config.js +4 -0
- package/lib/commands/create-project.js +6 -0
- package/lib/commands/debug.js +6 -1
- package/lib/commands/deploy.js +3 -2
- package/lib/commands/embedding/embed.js +7 -0
- package/lib/commands/extensibility/install-extension.js +1 -0
- package/lib/commands/extensibility/list-extensions.js +1 -0
- package/lib/commands/extensibility/uninstall-extension.js +1 -0
- package/lib/commands/fonts.js +1 -0
- package/lib/commands/generate-assets.js +1 -0
- package/lib/commands/generate-help.js +1 -0
- package/lib/commands/generate.js +48 -1
- package/lib/commands/info.js +1 -0
- package/lib/commands/install.js +1 -0
- package/lib/commands/list-platforms.js +1 -0
- package/lib/commands/migrate.js +1 -0
- package/lib/commands/native-add.js +5 -0
- package/lib/commands/platform-clean.js +1 -0
- package/lib/commands/plugin/add-plugin.js +1 -0
- package/lib/commands/plugin/build-plugin.js +1 -0
- package/lib/commands/plugin/create-plugin.js +5 -0
- package/lib/commands/plugin/list-plugins.js +1 -0
- package/lib/commands/plugin/remove-plugin.js +2 -0
- package/lib/commands/plugin/update-plugin.js +1 -0
- package/lib/commands/post-install.js +6 -0
- package/lib/commands/prepare.js +4 -3
- package/lib/commands/preview.js +2 -0
- package/lib/commands/remove-platform.js +1 -0
- package/lib/commands/resources/resources-update.js +2 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/setup.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/commands/test-init.js +4 -0
- package/lib/commands/test.js +9 -2
- package/lib/commands/typings.js +2 -1
- package/lib/commands/update-platform.js +5 -0
- package/lib/commands/update.js +2 -0
- package/lib/commands/widget.js +47 -34
- package/lib/common/bootstrap.js +1 -0
- package/lib/common/child-process.js +3 -0
- package/lib/common/codeGeneration/code-entity.js +1 -0
- package/lib/common/codeGeneration/code-printer.js +1 -0
- package/lib/common/command-params.js +1 -0
- package/lib/common/commands/analytics.js +3 -0
- package/lib/common/commands/autocompletion.js +3 -0
- package/lib/common/commands/device/device-log-stream.js +1 -0
- package/lib/common/commands/device/get-file.js +2 -0
- package/lib/common/commands/device/list-applications.js +1 -0
- package/lib/common/commands/device/list-devices.js +3 -0
- package/lib/common/commands/device/list-files.js +2 -0
- package/lib/common/commands/device/put-file.js +2 -0
- package/lib/common/commands/device/run-application.js +1 -0
- package/lib/common/commands/device/stop-application.js +1 -0
- package/lib/common/commands/device/uninstall-application.js +1 -0
- package/lib/common/commands/doctor.js +3 -2
- package/lib/common/commands/generate-messages.js +1 -0
- package/lib/common/commands/help.js +1 -0
- package/lib/common/commands/package-manager-get.js +1 -0
- package/lib/common/commands/package-manager-set.js +1 -0
- package/lib/common/commands/post-install.js +1 -0
- package/lib/common/commands/preuninstall.js +11 -2
- package/lib/common/commands/proxy/proxy-base.js +4 -0
- package/lib/common/commands/proxy/proxy-clear.js +1 -0
- package/lib/common/commands/proxy/proxy-get.js +1 -0
- package/lib/common/commands/proxy/proxy-set.js +1 -0
- package/lib/common/common-lib.js +1 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/decorators.js +48 -0
- package/lib/common/dispatchers.js +10 -1
- package/lib/common/errors.js +13 -3
- package/lib/common/file-system.js +13 -2
- package/lib/common/header.js +3 -0
- package/lib/common/helpers.js +89 -3
- package/lib/common/host-info.js +4 -0
- package/lib/common/http-client.js +20 -0
- package/lib/common/logger/appenders/cli-appender.js +4 -0
- package/lib/common/logger/appenders/emit-appender.js +4 -0
- package/lib/common/logger/layouts/cli-layout.js +1 -0
- package/lib/common/logger/logger.js +5 -0
- package/lib/common/messages/messages.js +6 -0
- package/lib/common/mobile/android/android-application-manager.js +20 -1
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -0
- package/lib/common/mobile/android/android-debug-bridge.js +6 -0
- package/lib/common/mobile/android/android-device-file-system.js +4 -0
- package/lib/common/mobile/android/android-device-hash-service.js +3 -0
- package/lib/common/mobile/android/android-device.js +8 -0
- package/lib/common/mobile/android/android-emulator-services.js +2 -1
- package/lib/common/mobile/android/android-ini-file-parser.js +9 -0
- package/lib/common/mobile/android/android-log-filter.js +4 -0
- package/lib/common/mobile/android/android-virtual-device-service.js +26 -0
- package/lib/common/mobile/android/device-android-debug-bridge.js +1 -0
- package/lib/common/mobile/android/genymotion/genymotion-service.js +6 -1
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +11 -0
- package/lib/common/mobile/android/logcat-helper.js +13 -0
- package/lib/common/mobile/application-manager-base.js +6 -0
- package/lib/common/mobile/device-emitter.js +4 -0
- package/lib/common/mobile/device-log-emitter.js +1 -0
- package/lib/common/mobile/device-log-provider-base.js +1 -0
- package/lib/common/mobile/device-log-provider.js +23 -0
- package/lib/common/mobile/device-platforms-constants.js +1 -0
- package/lib/common/mobile/emulator-helper.js +3 -0
- package/lib/common/mobile/ios/device/ios-application-manager.js +3 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-operations.js +4 -0
- package/lib/common/mobile/ios/device/ios-device.js +4 -0
- package/lib/common/mobile/ios/ios-device-base.js +1 -0
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +2 -0
- package/lib/common/mobile/ios/ios-log-filter.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +4 -0
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +6 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +5 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +1 -0
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +1 -0
- package/lib/common/mobile/local-to-device-path-data-factory.js +1 -0
- package/lib/common/mobile/log-filter.js +2 -0
- package/lib/common/mobile/logging-levels.js +1 -0
- package/lib/common/mobile/mobile-core/android-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-core/android-process-service.js +32 -0
- package/lib/common/mobile/mobile-core/device-discovery.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +69 -0
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +2 -0
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +3 -0
- package/lib/common/mobile/mobile-helper.js +1 -0
- package/lib/common/mobile/wp8/wp8-emulator-services.js +1 -0
- package/lib/common/opener.js +1 -0
- package/lib/common/os-info.js +1 -0
- package/lib/common/plist-parser.js +1 -0
- package/lib/common/project-helper.js +1 -0
- package/lib/common/prompter.js +9 -1
- package/lib/common/queue.js +1 -0
- package/lib/common/resource-loader.js +1 -0
- package/lib/common/services/auto-completion-service.js +13 -1
- package/lib/common/services/cancellation.js +2 -1
- package/lib/common/services/commands-service.js +17 -6
- package/lib/common/services/help-service.js +11 -3
- package/lib/common/services/hooks-service.js +13 -0
- package/lib/common/services/ios-notification-service.js +1 -0
- package/lib/common/services/json-file-settings-service.js +6 -0
- package/lib/common/services/lock-service.js +6 -0
- package/lib/common/services/message-contract-generator.js +1 -0
- package/lib/common/services/messages-service.js +1 -0
- package/lib/common/services/micro-templating-service.js +6 -0
- package/lib/common/services/net-service.js +3 -0
- package/lib/common/services/project-files-manager.js +5 -0
- package/lib/common/services/project-files-provider-base.js +1 -0
- package/lib/common/services/proxy-service.js +1 -0
- package/lib/common/services/qr.js +1 -0
- package/lib/common/services/settings-service.js +1 -0
- package/lib/common/services/xcode-select-service.js +1 -0
- package/lib/common/utils.js +1 -0
- package/lib/common/validators/project-name-validator.js +1 -0
- package/lib/common/validators/validation-result.js +1 -0
- package/lib/common/verify-node-version.js +8 -1
- package/lib/common/yok.js +32 -11
- package/lib/config.js +22 -1
- package/lib/constants-provider.js +1 -0
- package/lib/constants.js +53 -0
- package/lib/controllers/build-controller.js +4 -3
- package/lib/controllers/debug-controller.js +8 -3
- package/lib/controllers/deploy-controller.js +1 -0
- package/lib/controllers/migrate-controller.js +93 -5
- package/lib/controllers/platform-controller.js +9 -1
- package/lib/controllers/prepare-controller.js +17 -4
- package/lib/controllers/run-controller.js +17 -1
- package/lib/controllers/update-controller-base.js +1 -0
- package/lib/controllers/update-controller.js +11 -0
- package/lib/data/build-data.js +1 -0
- package/lib/data/controller-data-base.js +1 -0
- package/lib/data/debug-data.js +1 -0
- package/lib/data/platform-data.js +1 -0
- package/lib/data/prepare-data.js +1 -0
- package/lib/data/run-data.js +1 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +8 -2
- package/lib/detached-processes/cleanup-process.js +18 -14
- package/lib/detached-processes/file-log-service.js +2 -1
- package/lib/device-path-provider.js +1 -0
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +7 -0
- package/lib/device-sockets/ios/notification.js +3 -0
- package/lib/device-sockets/ios/socket-request-executor.js +3 -0
- package/lib/helpers/android-bundle-validator-helper.js +2 -1
- package/lib/helpers/deploy-command-helper.js +1 -0
- package/lib/helpers/key-command-helper.js +4 -2
- package/lib/helpers/livesync-command-helper.js +4 -1
- package/lib/helpers/network-connectivity-validator.js +1 -0
- package/lib/helpers/options-track-helper.js +3 -2
- package/lib/helpers/package-path-helper.js +1 -0
- package/lib/helpers/platform-command-helper.js +7 -2
- package/lib/helpers/version-validator-helper.js +1 -0
- package/lib/key-commands/bootstrap.js +3 -2
- package/lib/key-commands/index.js +5 -4
- package/lib/nativescript-cli-lib-bootstrap.js +4 -0
- package/lib/nativescript-cli-lib.js +1 -0
- package/lib/nativescript-cli.js +10 -1
- package/lib/node/pbxproj-dom-xcode.js +1 -0
- package/lib/node/xcode.js +1 -0
- package/lib/node-package-manager.js +11 -1
- package/lib/options.js +144 -119
- package/lib/package-installation-manager.js +8 -1
- package/lib/package-manager.js +2 -0
- package/lib/platform-command-param.js +1 -0
- package/lib/pnpm-package-manager.js +4 -1
- package/lib/project-data.js +12 -0
- package/lib/providers/project-files-provider.js +1 -0
- package/lib/resolvers/livesync-service-resolver.js +1 -0
- package/lib/services/analytics/analytics-broker-process.js +10 -6
- package/lib/services/analytics/analytics-broker.js +2 -1
- package/lib/services/analytics/analytics-service.js +29 -25
- package/lib/services/analytics/google-analytics-provider.js +13 -12
- package/lib/services/analytics-settings-service.js +5 -0
- package/lib/services/android/android-bundle-tool-service.js +1 -0
- package/lib/services/android/gradle-build-args-service.js +3 -0
- package/lib/services/android/gradle-build-service.js +1 -0
- package/lib/services/android/gradle-command-service.js +1 -0
- package/lib/services/android-device-debug-service.js +6 -0
- package/lib/services/android-plugin-build-service.js +31 -2
- package/lib/services/android-project-service.js +71 -4
- package/lib/services/android-resources-migration-service.js +7 -0
- package/lib/services/apple-portal/apple-portal-application-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-cookie-service.js +1 -0
- package/lib/services/apple-portal/apple-portal-session-service.js +6 -4
- package/lib/services/apple-portal/srp/srp-wrapper.js +4 -1
- package/lib/services/assets-generation/assets-generation-service.js +18 -7
- package/lib/services/build-artifacts-service.js +2 -1
- package/lib/services/build-data-service.js +1 -0
- package/lib/services/build-info-file-service.js +1 -0
- package/lib/services/cleanup-service.js +13 -9
- package/lib/services/cocoapods-platform-manager.js +9 -0
- package/lib/services/cocoapods-service.js +21 -1
- package/lib/services/debug-data-service.js +1 -0
- package/lib/services/debug-service-base.js +7 -0
- package/lib/services/device/device-install-app-service.js +2 -1
- package/lib/services/doctor-service.js +21 -6
- package/lib/services/extensibility-service.js +8 -0
- package/lib/services/files-hash-service.js +1 -0
- package/lib/services/hmr-status-service.js +2 -0
- package/lib/services/info-service.js +1 -0
- package/lib/services/initialize-service.js +5 -1
- package/lib/services/ios/export-options-plist-service.js +4 -0
- package/lib/services/ios/ios-signing-service.js +4 -0
- package/lib/services/ios/spm-service.js +11 -0
- package/lib/services/ios/xcodebuild-args-service.js +9 -0
- package/lib/services/ios/xcodebuild-command-service.js +1 -0
- package/lib/services/ios/xcodebuild-service.js +2 -1
- package/lib/services/ios-debugger-port-service.js +1 -0
- package/lib/services/ios-device-debug-service.js +1 -0
- package/lib/services/ios-entitlements-service.js +1 -0
- package/lib/services/ios-extensions-service.js +1 -0
- package/lib/services/ios-log-filter.js +20 -0
- package/lib/services/ios-native-target-service.js +6 -4
- package/lib/services/ios-project-service.js +91 -1
- package/lib/services/ios-provision-service.js +3 -0
- package/lib/services/ios-watch-app-service.js +1 -0
- package/lib/services/ip-service.js +2 -0
- package/lib/services/itmstransporter-service.js +1 -0
- package/lib/services/karma-execution.js +2 -0
- package/lib/services/livesync/android-device-livesync-service-base.js +1 -0
- package/lib/services/livesync/android-device-livesync-service.js +2 -0
- package/lib/services/livesync/android-device-livesync-sockets-service.js +3 -0
- package/lib/services/livesync/android-livesync-service.js +1 -0
- package/lib/services/livesync/android-livesync-tool.js +4 -0
- package/lib/services/livesync/device-livesync-service-base.js +2 -0
- package/lib/services/livesync/ios-device-livesync-service.js +7 -0
- package/lib/services/livesync/ios-livesync-service.js +2 -0
- package/lib/services/livesync/livesync-socket.js +1 -0
- package/lib/services/livesync/platform-livesync-service-base.js +5 -0
- package/lib/services/livesync-process-data-service.js +1 -0
- package/lib/services/log-parser-service.js +1 -0
- package/lib/services/log-source-map-service.js +15 -0
- package/lib/services/marking-mode-service.js +8 -5
- package/lib/services/metadata-filtering-service.js +1 -0
- package/lib/services/npm-config-service.js +4 -0
- package/lib/services/pacote-service.js +7 -0
- package/lib/services/performance-service.js +3 -1
- package/lib/services/platform/add-platform-service.js +49 -2
- package/lib/services/platform/platform-validation-service.js +1 -0
- package/lib/services/platform/prepare-native-platform-service.js +5 -2
- package/lib/services/platform-environment-requirements.js +8 -3
- package/lib/services/platform-project-service-base.js +1 -0
- package/lib/services/platforms-data-service.js +1 -0
- package/lib/services/plugins-service.js +20 -2
- package/lib/services/prepare-data-service.js +1 -0
- package/lib/services/project-backup-service.js +4 -0
- package/lib/services/project-changes-service.js +14 -3
- package/lib/services/project-cleanup-service.js +2 -0
- package/lib/services/project-config-service.js +21 -2
- package/lib/services/project-data-service.js +36 -7
- package/lib/services/project-name-service.js +1 -0
- package/lib/services/project-service.js +10 -0
- package/lib/services/project-templates-service.js +3 -2
- package/lib/services/qr-code-terminal-service.js +1 -0
- package/lib/services/require-service.js +1 -0
- package/lib/services/start-service.js +1 -0
- package/lib/services/temp-service.js +1 -0
- package/lib/services/terminal-spinner-service.js +2 -0
- package/lib/services/test-execution-service.js +9 -2
- package/lib/services/test-initialization-service.js +4 -0
- package/lib/services/timeline-profiler-service.js +1 -0
- package/lib/services/user-settings-service.js +1 -0
- package/lib/services/versions-service.js +6 -4
- package/lib/services/watch-ignore-list-service.js +1 -0
- package/lib/services/webpack/webpack-compiler-service.js +42 -1
- package/lib/services/xcconfig-service.js +2 -0
- package/lib/services/xcproj-service.js +1 -0
- package/lib/shared-event-bus.js +6 -0
- package/lib/sys-info.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +12 -0
- package/lib/tools/node-modules/node-modules-builder.js +1 -0
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +6 -0
- package/lib/yarn-package-manager.js +1 -0
- package/lib/yarn2-package-manager.js +3 -0
- package/package.json +14 -14
|
@@ -173,6 +173,7 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
|
|
|
173
173
|
const classFilePath = path.join(iosSourceBase, `${className}.m`);
|
|
174
174
|
const headerFilePath = path.join(iosSourceBase, `${className}.h`);
|
|
175
175
|
if (this.generateObjectiveCFiles(className, classFilePath, headerFilePath)) {
|
|
176
|
+
// Modify/Generate moduleMap
|
|
176
177
|
this.generateOrUpdateModuleMap(`${className}.h`, path.join(iosSourceBase, "module.modulemap"));
|
|
177
178
|
}
|
|
178
179
|
}
|
|
@@ -185,7 +186,9 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
|
|
|
185
186
|
}
|
|
186
187
|
const headerDeclaration = `header "${headerPath}"`;
|
|
187
188
|
if (moduleMapContent.includes(`module ${moduleName}`)) {
|
|
189
|
+
// Module declaration already exists in the module map
|
|
188
190
|
if (moduleMapContent.includes(headerDeclaration)) {
|
|
191
|
+
// Header is already present in the module map
|
|
189
192
|
this.$logger.warn(`Header '${headerFileName}' is already added to the module map.`);
|
|
190
193
|
return;
|
|
191
194
|
}
|
|
@@ -193,6 +196,7 @@ class NativeAddObjectiveCCommand extends NativeAddSingleCommand {
|
|
|
193
196
|
fs.writeFileSync(moduleMapPath, updatedModuleMapContent);
|
|
194
197
|
}
|
|
195
198
|
else {
|
|
199
|
+
// Module declaration does not exist in the module map
|
|
196
200
|
const moduleDeclaration = `module ${moduleName} {${os_1.EOL} ${headerDeclaration}${os_1.EOL} export *${os_1.EOL}}`;
|
|
197
201
|
moduleMapContent += `${os_1.EOL}${os_1.EOL}${moduleDeclaration}`;
|
|
198
202
|
fs.writeFileSync(moduleMapPath, moduleMapContent);
|
|
@@ -275,3 +279,4 @@ yok_1.injector.registerCommand(["native|add|java"], NativeAddJavaCommand);
|
|
|
275
279
|
yok_1.injector.registerCommand(["native|add|kotlin"], NativeAddKotlinCommand);
|
|
276
280
|
yok_1.injector.registerCommand(["native|add|swift"], NativeAddSwiftCommand);
|
|
277
281
|
yok_1.injector.registerCommand(["native|add|objective-c"], NativeAddObjectiveCCommand);
|
|
282
|
+
//# sourceMappingURL=native-add.js.map
|
|
@@ -28,12 +28,14 @@ class CreatePluginCommand {
|
|
|
28
28
|
const selectedTemplate = this.$options.template;
|
|
29
29
|
const selectedPath = path.resolve(pathToProject || ".");
|
|
30
30
|
const projectDir = path.join(selectedPath, pluginRepoName);
|
|
31
|
+
// Must be out of try catch block, because will throw error if folder alredy exists and we don't want to delete it.
|
|
31
32
|
this.ensurePackageDir(projectDir);
|
|
32
33
|
try {
|
|
33
34
|
await this.downloadPackage(selectedTemplate, projectDir);
|
|
34
35
|
await this.setupSeed(projectDir, pluginRepoName);
|
|
35
36
|
}
|
|
36
37
|
catch (err) {
|
|
38
|
+
// The call to this.ensurePackageDir() above will throw error if folder alredy exists, so it is safe to delete here.
|
|
37
39
|
this.$fs.deleteDirectory(projectDir);
|
|
38
40
|
throw err;
|
|
39
41
|
}
|
|
@@ -69,6 +71,7 @@ class CreatePluginCommand {
|
|
|
69
71
|
!config.includeTypeScriptDemo)) {
|
|
70
72
|
this.$logger.printMarkdown("Using default values for plugin creation options since your shell is not interactive.");
|
|
71
73
|
}
|
|
74
|
+
// run postclone script manually and kill it if it takes more than 10 sec
|
|
72
75
|
const pathToPostCloneScript = path.join("scripts", "postclone");
|
|
73
76
|
const params = [
|
|
74
77
|
pathToPostCloneScript,
|
|
@@ -123,6 +126,7 @@ class CreatePluginCommand {
|
|
|
123
126
|
}
|
|
124
127
|
async getPluginNameSource(pluginNameSource, pluginRepoName) {
|
|
125
128
|
if (!pluginNameSource) {
|
|
129
|
+
// remove nativescript- prefix for naming plugin files
|
|
126
130
|
const prefix = "nativescript-";
|
|
127
131
|
pluginNameSource = pluginRepoName.toLowerCase().startsWith(prefix)
|
|
128
132
|
? pluginRepoName.slice(prefix.length, pluginRepoName.length)
|
|
@@ -150,3 +154,4 @@ class CreatePluginCommand {
|
|
|
150
154
|
}
|
|
151
155
|
exports.CreatePluginCommand = CreatePluginCommand;
|
|
152
156
|
yok_1.injector.registerCommand(["plugin|create"], CreatePluginCommand);
|
|
157
|
+
//# sourceMappingURL=create-plugin.js.map
|
|
@@ -21,6 +21,7 @@ class RemovePluginCommand {
|
|
|
21
21
|
}
|
|
22
22
|
let pluginNames = [];
|
|
23
23
|
try {
|
|
24
|
+
// try installing the plugins, so we can get information from node_modules about their native code, libs, etc.
|
|
24
25
|
const installedPlugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
|
|
25
26
|
pluginNames = installedPlugins.map((pl) => pl.name);
|
|
26
27
|
}
|
|
@@ -37,3 +38,4 @@ class RemovePluginCommand {
|
|
|
37
38
|
}
|
|
38
39
|
exports.RemovePluginCommand = RemovePluginCommand;
|
|
39
40
|
yok_1.injector.registerCommand("plugin|remove", RemovePluginCommand);
|
|
41
|
+
//# sourceMappingURL=remove-plugin.js.map
|
|
@@ -19,13 +19,18 @@ class PostInstallCliCommand {
|
|
|
19
19
|
async execute(args) {
|
|
20
20
|
const isRunningWithSudoUser = !!process.env.SUDO_USER;
|
|
21
21
|
if (!this.$hostInfo.isWindows) {
|
|
22
|
+
// when running under 'sudo' we create a working dir with wrong owner (root) and
|
|
23
|
+
// it is no longer accessible for the user initiating the installation
|
|
24
|
+
// patch the owner here
|
|
22
25
|
if (isRunningWithSudoUser) {
|
|
26
|
+
// TODO: Check if this is the correct place, probably we should set this at the end of the command.
|
|
23
27
|
await this.$fs.setCurrentUserAsOwner(this.$settingsService.getProfileDir(), process.env.SUDO_USER);
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
const canExecutePostInstallTask = !isRunningWithSudoUser || (0, helpers_1.doesCurrentNpmCommandMatch)([/^--unsafe-perm$/]);
|
|
27
31
|
if (canExecutePostInstallTask) {
|
|
28
32
|
await this.$helpService.generateHtmlPages();
|
|
33
|
+
// Explicitly ask for confirmation of usage-reporting:
|
|
29
34
|
await this.$analyticsService.checkConsent();
|
|
30
35
|
await this.$commandsService.tryExecuteCommand("autocomplete", []);
|
|
31
36
|
}
|
|
@@ -42,3 +47,4 @@ class PostInstallCliCommand {
|
|
|
42
47
|
}
|
|
43
48
|
exports.PostInstallCliCommand = PostInstallCliCommand;
|
|
44
49
|
yok_1.injector.registerCommand("post-install-cli", PostInstallCliCommand);
|
|
50
|
+
//# sourceMappingURL=post-install.js.map
|
package/lib/commands/prepare.js
CHANGED
|
@@ -17,13 +17,13 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
17
17
|
this.allowedParameters = [this.$platformCommandParameter];
|
|
18
18
|
this.dashedOptions = {
|
|
19
19
|
watch: {
|
|
20
|
-
type: "boolean"
|
|
20
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
21
21
|
default: false,
|
|
22
22
|
hasSensitiveValue: false,
|
|
23
23
|
},
|
|
24
|
-
hmr: { type: "boolean"
|
|
24
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
25
25
|
whatever: {
|
|
26
|
-
type: "boolean"
|
|
26
|
+
type: "boolean" /* OptionType.Boolean */,
|
|
27
27
|
default: false,
|
|
28
28
|
hasSensitiveValue: false,
|
|
29
29
|
},
|
|
@@ -54,3 +54,4 @@ class PrepareCommand extends command_base_1.ValidatePlatformCommandBase {
|
|
|
54
54
|
}
|
|
55
55
|
exports.PrepareCommand = PrepareCommand;
|
|
56
56
|
yok_1.injector.registerCommand("prepare", PrepareCommand);
|
|
57
|
+
//# sourceMappingURL=prepare.js.map
|
package/lib/commands/preview.js
CHANGED
|
@@ -24,6 +24,7 @@ class PreviewCommand {
|
|
|
24
24
|
}
|
|
25
25
|
async execute(args) {
|
|
26
26
|
if (!this.$options.disableNpmInstall) {
|
|
27
|
+
// ensure latest is installed
|
|
27
28
|
await this.$packageManager.install(`${PREVIEW_CLI_PACKAGE}@latest`, this.$projectData.projectDir, {
|
|
28
29
|
"save-dev": true,
|
|
29
30
|
"save-exact": true,
|
|
@@ -78,3 +79,4 @@ class PreviewCommand {
|
|
|
78
79
|
}
|
|
79
80
|
exports.PreviewCommand = PreviewCommand;
|
|
80
81
|
yok_1.injector.registerCommand("preview", PreviewCommand);
|
|
82
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -15,6 +15,7 @@ class ResourcesUpdateCommand {
|
|
|
15
15
|
}
|
|
16
16
|
async canExecute(args) {
|
|
17
17
|
if (!args || args.length === 0) {
|
|
18
|
+
// Command defaults to migrating the Android App_Resources, unless explicitly specified
|
|
18
19
|
args = ["android"];
|
|
19
20
|
}
|
|
20
21
|
for (const platform of args) {
|
|
@@ -30,3 +31,4 @@ class ResourcesUpdateCommand {
|
|
|
30
31
|
}
|
|
31
32
|
exports.ResourcesUpdateCommand = ResourcesUpdateCommand;
|
|
32
33
|
yok_1.injector.registerCommand("resources|update", ResourcesUpdateCommand);
|
|
34
|
+
//# sourceMappingURL=resources-update.js.map
|
package/lib/commands/run.js
CHANGED
|
@@ -154,3 +154,4 @@ class RunVisionOSCommand extends RunIosCommand {
|
|
|
154
154
|
exports.RunVisionOSCommand = RunVisionOSCommand;
|
|
155
155
|
yok_1.injector.registerCommand("run|vision", RunVisionOSCommand);
|
|
156
156
|
yok_1.injector.registerCommand("run|visionos", RunVisionOSCommand);
|
|
157
|
+
//# sourceMappingURL=run.js.map
|
package/lib/commands/setup.js
CHANGED
package/lib/commands/start.js
CHANGED
|
@@ -66,6 +66,8 @@ class TestInitCommand {
|
|
|
66
66
|
continue;
|
|
67
67
|
}
|
|
68
68
|
const dependencyVersion = modulePeerDependencies[peerDependency] || "*";
|
|
69
|
+
// catch errors when a peerDependency is already installed
|
|
70
|
+
// e.g karma is installed; karma-jasmine depends on karma and will try to install it again
|
|
69
71
|
try {
|
|
70
72
|
await this.$packageManager.install(`${peerDependency}@${dependencyVersion}`, projectDir, {
|
|
71
73
|
"save-dev": true,
|
|
@@ -117,6 +119,7 @@ class TestInitCommand {
|
|
|
117
119
|
const targetExampleTestRelativePath = path.relative(projectDir, targetExampleTestPath);
|
|
118
120
|
bufferedLogs.push(`Added example test: ${color_1.color.yellow(targetExampleTestRelativePath)}`);
|
|
119
121
|
}
|
|
122
|
+
// test main entry
|
|
120
123
|
const testMainResourcesPath = this.$resources.resolvePath(`test/test-main${projectFilesExtension}`);
|
|
121
124
|
const testMainPath = path.join(this.$projectData.appDirectoryPath, `test${projectFilesExtension}`);
|
|
122
125
|
if (!this.$fs.exists(testMainPath)) {
|
|
@@ -154,3 +157,4 @@ class TestInitCommand {
|
|
|
154
157
|
}
|
|
155
158
|
}
|
|
156
159
|
yok_1.injector.registerCommand("test|init", TestInitCommand);
|
|
160
|
+
//# sourceMappingURL=test-init.js.map
|
package/lib/commands/test.js
CHANGED
|
@@ -7,7 +7,7 @@ class TestCommandBase {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
this.allowedParameters = [];
|
|
9
9
|
this.dashedOptions = {
|
|
10
|
-
hmr: { type: "boolean"
|
|
10
|
+
hmr: { type: "boolean" /* OptionType.Boolean */, default: false, hasSensitiveValue: false },
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
async execute(args) {
|
|
@@ -26,6 +26,8 @@ class TestCommandBase {
|
|
|
26
26
|
deviceId: this.$options.device,
|
|
27
27
|
});
|
|
28
28
|
devices = [selectedDeviceForDebug];
|
|
29
|
+
// const debugData = this.getDebugData(platform, projectData, deployOptions, { device: selectedDeviceForDebug.deviceInfo.identifier });
|
|
30
|
+
// await this.$debugService.debug(debugData, this.$options);
|
|
29
31
|
}
|
|
30
32
|
else {
|
|
31
33
|
devices = await this.$liveSyncCommandHelper.getDeviceInstances(this.platform);
|
|
@@ -39,11 +41,15 @@ class TestCommandBase {
|
|
|
39
41
|
devices.forEach((device) => (deviceDebugMap[device.deviceInfo.identifier] = this.$options.debugBrk));
|
|
40
42
|
const deviceDescriptors = await this.$liveSyncCommandHelper.createDeviceDescriptors(devices, this.platform, { deviceDebugMap });
|
|
41
43
|
await this.$testExecutionService.startKarmaServer(this.platform, liveSyncInfo, deviceDescriptors);
|
|
44
|
+
// if we got here, it means karma exited with exit code 0 (success)
|
|
42
45
|
process.exit(0);
|
|
43
46
|
}
|
|
44
47
|
async canExecute(args) {
|
|
45
48
|
if (!this.$options.force) {
|
|
46
49
|
if (this.$options.hmr) {
|
|
50
|
+
// With HMR we are not restarting after LiveSync which is causing a 30 seconds app start on Android
|
|
51
|
+
// because the Runtime does not watch for the `/data/local/tmp<appId>-livesync-in-progress` file deletion.
|
|
52
|
+
// The App is closing itself after each test execution and the bug will be reproducible on each LiveSync.
|
|
47
53
|
this.$errors.fail("The `--hmr` option is not supported for this command.");
|
|
48
54
|
}
|
|
49
55
|
await this.$migrateController.validate({
|
|
@@ -63,7 +69,7 @@ class TestCommandBase {
|
|
|
63
69
|
if (!canStartKarmaServer) {
|
|
64
70
|
this.$errors.fail({
|
|
65
71
|
formatStr: "Error: In order to run unit tests, your project must already be configured by running $ ns test init.",
|
|
66
|
-
errorCode: 133
|
|
72
|
+
errorCode: 133 /* ErrorCodes.TESTS_INIT_REQUIRED */,
|
|
67
73
|
});
|
|
68
74
|
}
|
|
69
75
|
return output.canExecute && canStartKarmaServer;
|
|
@@ -121,3 +127,4 @@ class TestIosCommand extends TestCommandBase {
|
|
|
121
127
|
}
|
|
122
128
|
yok_1.injector.registerCommand("test|android", TestAndroidCommand);
|
|
123
129
|
yok_1.injector.registerCommand("test|ios", TestIosCommand);
|
|
130
|
+
//# sourceMappingURL=test.js.map
|
package/lib/commands/typings.js
CHANGED
|
@@ -88,7 +88,7 @@ class TypingsCommand {
|
|
|
88
88
|
value: item.id,
|
|
89
89
|
};
|
|
90
90
|
}), true, {
|
|
91
|
-
optionsPerPage: process.stdout.rows - 6,
|
|
91
|
+
optionsPerPage: process.stdout.rows - 6, // 6 lines are taken up by the instructions
|
|
92
92
|
});
|
|
93
93
|
this.$logger.clearScreen();
|
|
94
94
|
return items
|
|
@@ -162,3 +162,4 @@ class TypingsCommand {
|
|
|
162
162
|
}
|
|
163
163
|
exports.TypingsCommand = TypingsCommand;
|
|
164
164
|
yok_1.injector.registerCommand("typings", TypingsCommand);
|
|
165
|
+
//# sourceMappingURL=typings.js.map
|
|
@@ -31,6 +31,10 @@ class UpdatePlatformCommand {
|
|
|
31
31
|
platform,
|
|
32
32
|
options: this.$options,
|
|
33
33
|
};
|
|
34
|
+
// If version is not specified, we know the command will install the latest compatible Android runtime.
|
|
35
|
+
// The latest compatible Android runtime supports Java version, so we do not need to pass it here.
|
|
36
|
+
// Passing projectDir to the @nativescript/doctor validation will cause it to check the runtime from the current package.json
|
|
37
|
+
// So in this case, where we do not want to validate the runtime, just do not pass both projectDir and runtimeVersion.
|
|
34
38
|
if (versionToBeInstalled) {
|
|
35
39
|
checkEnvironmentRequirementsInput.projectDir = this.$projectData.projectDir;
|
|
36
40
|
checkEnvironmentRequirementsInput.runtimeVersion = versionToBeInstalled;
|
|
@@ -42,3 +46,4 @@ class UpdatePlatformCommand {
|
|
|
42
46
|
}
|
|
43
47
|
exports.UpdatePlatformCommand = UpdatePlatformCommand;
|
|
44
48
|
yok_1.injector.registerCommand("platform|update", UpdatePlatformCommand);
|
|
49
|
+
//# sourceMappingURL=update-platform.js.map
|
package/lib/commands/update.js
CHANGED
|
@@ -17,6 +17,7 @@ class UpdateCommand {
|
|
|
17
17
|
}
|
|
18
18
|
async execute(args) {
|
|
19
19
|
if (this.$options.markingMode) {
|
|
20
|
+
// ns update --markingMode
|
|
20
21
|
await this.$markingModeService.handleMarkingModeFullDeprecation({
|
|
21
22
|
projectDir: this.$projectData.projectDir,
|
|
22
23
|
forceSwitch: true,
|
|
@@ -55,3 +56,4 @@ exports.UpdateCommand = UpdateCommand;
|
|
|
55
56
|
UpdateCommand.SHOULD_MIGRATE_PROJECT_MESSAGE = 'This project is not compatible with the current NativeScript version and cannot be updated. Use "ns migrate" to make your project compatible.';
|
|
56
57
|
UpdateCommand.PROJECT_UP_TO_DATE_MESSAGE = "This project is up to date.";
|
|
57
58
|
yok_1.injector.registerCommand("update", UpdateCommand);
|
|
59
|
+
//# sourceMappingURL=update.js.map
|
package/lib/commands/widget.js
CHANGED
|
@@ -63,7 +63,7 @@ class WidgetIOSCommand extends WidgetCommand {
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
title: "Live Activity with Home Screen Widget",
|
|
66
|
-
description: "This will create a Live Activity that will display on the iOS Lock Screen with
|
|
66
|
+
description: "This will create a Live Activity that will display on the iOS Lock Screen with ability to also display a Home Screen Widget.",
|
|
67
67
|
value: 1,
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -75,19 +75,12 @@ class WidgetIOSCommand extends WidgetCommand {
|
|
|
75
75
|
initial: 1,
|
|
76
76
|
});
|
|
77
77
|
const bundleId = this.$projectConfigService.getValue(`id`, "");
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
break;
|
|
82
|
-
case 1:
|
|
83
|
-
await this.generateSharedWidgetPackage(this.$projectData.projectDir, name);
|
|
84
|
-
this.generateWidget(this.$projectData.projectDir, name, bundleId, result.value);
|
|
85
|
-
this.generateAppleUtility(this.$projectData.projectDir, name, bundleId);
|
|
86
|
-
break;
|
|
87
|
-
case 2:
|
|
88
|
-
this.$logger.info("TODO");
|
|
89
|
-
break;
|
|
78
|
+
if ([0, 1].includes(result.value)) {
|
|
79
|
+
// shared model only needed with live activities
|
|
80
|
+
await this.generateSharedWidgetPackage(this.$projectData.projectDir, name);
|
|
90
81
|
}
|
|
82
|
+
this.generateWidget(this.$projectData.projectDir, name, bundleId, result.value);
|
|
83
|
+
this.generateAppleUtility(this.$projectData.projectDir, name, bundleId, result.value);
|
|
91
84
|
}
|
|
92
85
|
async generateSharedWidgetPackage(projectDir, name) {
|
|
93
86
|
var _a;
|
|
@@ -153,6 +146,7 @@ public struct ${(0, utils_1.capitalizeFirstLetter)(name)}Model: ActivityAttribut
|
|
|
153
146
|
}
|
|
154
147
|
}${os_1.EOL}`;
|
|
155
148
|
fs.writeFileSync(sharedWidgetSourcePath, content);
|
|
149
|
+
// update spm package
|
|
156
150
|
const configData = this.$projectConfigService.readConfig(projectDir);
|
|
157
151
|
if (!configData.ios) {
|
|
158
152
|
configData.ios = {};
|
|
@@ -167,16 +161,19 @@ public struct ${(0, utils_1.capitalizeFirstLetter)(name)}Model: ActivityAttribut
|
|
|
167
161
|
name: "SharedWidget",
|
|
168
162
|
libs: ["SharedWidget"],
|
|
169
163
|
path: "./Shared_Resources/iOS/SharedWidget",
|
|
164
|
+
// @ts-ignore
|
|
170
165
|
targets: [name],
|
|
171
166
|
});
|
|
172
167
|
}
|
|
173
168
|
else {
|
|
169
|
+
// add target if needed
|
|
174
170
|
if (!((_a = sharedWidgetPackage.targets) === null || _a === void 0 ? void 0 : _a.includes(name))) {
|
|
175
171
|
sharedWidgetPackage.targets.push(name);
|
|
176
172
|
}
|
|
177
173
|
}
|
|
178
174
|
configData.ios.SPMPackages = spmPackages;
|
|
179
|
-
await this.$projectConfigService.setValue("",
|
|
175
|
+
await this.$projectConfigService.setValue("", // root
|
|
176
|
+
configData);
|
|
180
177
|
if (fs.existsSync(gitIgnorePath)) {
|
|
181
178
|
const gitIgnore = fs.readFileSync(gitIgnorePath, {
|
|
182
179
|
encoding: "utf-8",
|
|
@@ -206,6 +203,11 @@ public struct ${(0, utils_1.capitalizeFirstLetter)(name)}Model: ActivityAttribut
|
|
|
206
203
|
const widgetBundlePath = path.join(widgetPath, `${capitalName}Bundle.swift`);
|
|
207
204
|
const widgetHomeScreenPath = path.join(widgetPath, `${capitalName}HomeScreenWidget.swift`);
|
|
208
205
|
const widgetLiveActivityPath = path.join(widgetPath, `${capitalName}LiveActivity.swift`);
|
|
206
|
+
// const appIntentPath = path.join(widgetPath, `AppIntent.swift`);
|
|
207
|
+
// const widgetLockScreenControlPath = path.join(
|
|
208
|
+
// widgetPath,
|
|
209
|
+
// `${capitalName}LockScreenControl.swift`
|
|
210
|
+
// );
|
|
209
211
|
const appEntitlementsPath = path.join(appResourcePath, "iOS", "app.entitlements");
|
|
210
212
|
if (!fs.existsSync(extensionsConfigPath)) {
|
|
211
213
|
fs.mkdirSync(widgetPath, { recursive: true });
|
|
@@ -247,6 +249,8 @@ public struct ${(0, utils_1.capitalizeFirstLetter)(name)}Model: ActivityAttribut
|
|
|
247
249
|
</dict>
|
|
248
250
|
</plist>${os_1.EOL}`;
|
|
249
251
|
fs.writeFileSync(extensionsPrivacyPath, content);
|
|
252
|
+
// TODO: can add control (lock screen custom control icon handler) in future
|
|
253
|
+
// ${[1, 2].includes(type) ? capitalName + "LockScreenControl()" : ""}
|
|
250
254
|
content = `import WidgetKit
|
|
251
255
|
import SwiftUI
|
|
252
256
|
|
|
@@ -570,6 +574,7 @@ struct ${capitalName}HomeScreenWidget: Widget {
|
|
|
570
574
|
encoding: "utf-8",
|
|
571
575
|
}));
|
|
572
576
|
if (!appInfoPlist[appSupportLiveActivity]) {
|
|
577
|
+
// @ts-ignore
|
|
573
578
|
appInfoPlist[appSupportLiveActivity] = true;
|
|
574
579
|
const appPlist = plist.build(appInfoPlist);
|
|
575
580
|
fs.writeFileSync(appInfoPlistPath, appPlist);
|
|
@@ -581,6 +586,7 @@ struct ${capitalName}HomeScreenWidget: Widget {
|
|
|
581
586
|
encoding: "utf-8",
|
|
582
587
|
}));
|
|
583
588
|
if (!appEntitlementsPlist[appGroupKey]) {
|
|
589
|
+
// @ts-ignore
|
|
584
590
|
appEntitlementsPlist[appGroupKey] = [`group.${bundleId}`];
|
|
585
591
|
const appEntitlements = plist.build(appEntitlementsPlist);
|
|
586
592
|
console.log("appentitlement:", appEntitlements);
|
|
@@ -652,15 +658,21 @@ struct ${capitalName}HomeScreenWidget: Widget {
|
|
|
652
658
|
}${os_1.EOL}`;
|
|
653
659
|
fs.writeFileSync(extensionsConfigPath, content);
|
|
654
660
|
console.log(`🚀 Your widget is now ready to develop: App_Resources/iOS/extensions/${name}.\n`);
|
|
655
|
-
|
|
656
|
-
- Check App_Resources/iOS/build.xcconfig uses IPHONEOS_DEPLOYMENT_TARGET=17 or higher.
|
|
657
|
-
- Update App_Resources/iOS/extensions/provisioning.json with your profile id.
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
+
const steps = ["Followup steps:"];
|
|
662
|
+
steps.push("- Check App_Resources/iOS/build.xcconfig uses IPHONEOS_DEPLOYMENT_TARGET = 17 or higher.");
|
|
663
|
+
steps.push("- Update App_Resources/iOS/extensions/provisioning.json with your profile id.");
|
|
664
|
+
if ([0, 1].includes(type)) {
|
|
665
|
+
steps.push(`- Customize App_Resources/iOS/extensions/${name}/${(0, utils_1.capitalizeFirstLetter)(name)}LiveActivity.swift for your display.`);
|
|
666
|
+
steps.push(`- Customize Shared_Resources/iOS/SharedWidget/Sources/SharedWidget/${(0, utils_1.capitalizeFirstLetter)(name)}Model.swift for your data.`);
|
|
667
|
+
}
|
|
668
|
+
console.log(steps.join("\n"));
|
|
661
669
|
}
|
|
670
|
+
// if (fs.existsSync(filePath)) {
|
|
671
|
+
// this.$errors.failWithHelp(`Error: File '${filePath}' already exists.`);
|
|
672
|
+
// return;
|
|
673
|
+
// }
|
|
662
674
|
}
|
|
663
|
-
generateAppleUtility(projectDir, name, bundleId) {
|
|
675
|
+
generateAppleUtility(projectDir, name, bundleId, type) {
|
|
664
676
|
const capitalName = (0, utils_1.capitalizeFirstLetter)(name);
|
|
665
677
|
const appResourcePath = this.$projectData.appResourcesDirectoryPath;
|
|
666
678
|
const appResourceSrcPath = path.join(appResourcePath, "iOS", "src");
|
|
@@ -671,16 +683,7 @@ struct ${capitalName}HomeScreenWidget: Widget {
|
|
|
671
683
|
}
|
|
672
684
|
if (!fs.existsSync(appleUtilityPath)) {
|
|
673
685
|
}
|
|
674
|
-
|
|
675
|
-
import UIKit
|
|
676
|
-
import ActivityKit
|
|
677
|
-
import WidgetKit
|
|
678
|
-
import SharedWidget
|
|
679
|
-
|
|
680
|
-
@objcMembers
|
|
681
|
-
public class AppleWidgetUtils: NSObject {
|
|
682
|
-
|
|
683
|
-
// Live Activity Handling
|
|
686
|
+
const liveActivityUtilities = `// Live Activity Handling
|
|
684
687
|
public static func startActivity(_ data: NSDictionary) {
|
|
685
688
|
if ActivityAuthorizationInfo().areActivitiesEnabled {
|
|
686
689
|
let numberOfPizzas = data.object(forKey: "numberOfPizzas") as! Int
|
|
@@ -732,7 +735,17 @@ public class AppleWidgetUtils: NSObject {
|
|
|
732
735
|
}
|
|
733
736
|
}
|
|
734
737
|
}
|
|
735
|
-
}
|
|
738
|
+
}`;
|
|
739
|
+
let content = `import Foundation
|
|
740
|
+
import UIKit
|
|
741
|
+
import ActivityKit
|
|
742
|
+
import WidgetKit
|
|
743
|
+
${[0, 1].includes(type) ? "import SharedWidget" : ""}
|
|
744
|
+
|
|
745
|
+
@objcMembers
|
|
746
|
+
public class AppleWidgetUtils: NSObject {
|
|
747
|
+
${[0, 1].includes(type) ? liveActivityUtilities : ""}
|
|
748
|
+
// Shared App Group Data
|
|
736
749
|
public static func getData(key: String) -> String? {
|
|
737
750
|
guard let sharedDefaults = UserDefaults(suiteName: "group.${bundleId}") else {
|
|
738
751
|
return nil
|
|
@@ -753,7 +766,6 @@ public class AppleWidgetUtils: NSObject {
|
|
|
753
766
|
sharedDefaults.removeObject(forKey: key)
|
|
754
767
|
sharedDefaults.synchronize()
|
|
755
768
|
}
|
|
756
|
-
|
|
757
769
|
// Home Screen Widget Handling
|
|
758
770
|
public static func updateWidget() {
|
|
759
771
|
if #available(iOS 14.0, *) {
|
|
@@ -770,7 +782,7 @@ public class AppleWidgetUtils: NSObject {
|
|
|
770
782
|
declare interface AppleWidgetModelData {
|
|
771
783
|
numberOfPizzas: number;
|
|
772
784
|
totalAmount: string;
|
|
773
|
-
|
|
785
|
+
message: string;
|
|
774
786
|
deliveryTime: number;
|
|
775
787
|
}
|
|
776
788
|
declare class AppleWidgetUtils extends NSObject {
|
|
@@ -803,3 +815,4 @@ declare class AppleWidgetUtils extends NSObject {
|
|
|
803
815
|
exports.WidgetIOSCommand = WidgetIOSCommand;
|
|
804
816
|
yok_1.injector.registerCommand(["widget"], WidgetCommand);
|
|
805
817
|
yok_1.injector.registerCommand(["widget|ios"], WidgetIOSCommand);
|
|
818
|
+
//# sourceMappingURL=widget.js.map
|
package/lib/common/bootstrap.js
CHANGED
|
@@ -95,3 +95,4 @@ yok_1.injector.require("xcodeSelectService", "./services/xcode-select-service");
|
|
|
95
95
|
yok_1.injector.require("net", "./services/net-service");
|
|
96
96
|
yok_1.injector.require("qr", "./services/qr");
|
|
97
97
|
yok_1.injector.require(["lockfile", "lockService"], "./services/lock-service");
|
|
98
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -47,6 +47,7 @@ class ChildProcess extends events_1.EventEmitter {
|
|
|
47
47
|
spawn(command, args, options) {
|
|
48
48
|
var _a;
|
|
49
49
|
if (command.charAt(0) === ".") {
|
|
50
|
+
// resolve relative paths to full paths to avoid node Spawn ENOENT errors on some setups.
|
|
50
51
|
const cwd = (_a = options === null || options === void 0 ? void 0 : options.cwd) !== null && _a !== void 0 ? _a : process.cwd();
|
|
51
52
|
command = (0, path_1.resolve)(cwd, command);
|
|
52
53
|
}
|
|
@@ -58,6 +59,7 @@ class ChildProcess extends events_1.EventEmitter {
|
|
|
58
59
|
return child_process.fork(modulePath, args, options);
|
|
59
60
|
}
|
|
60
61
|
spawnFromEvent(command, args, event, options, spawnFromEventOptions) {
|
|
62
|
+
// event should be exit or close
|
|
61
63
|
return new Promise((resolve, reject) => {
|
|
62
64
|
const childProcess = this.spawn(command, args, options);
|
|
63
65
|
let isResolved = false;
|
|
@@ -196,3 +198,4 @@ class ChildProcess extends events_1.EventEmitter {
|
|
|
196
198
|
}
|
|
197
199
|
exports.ChildProcess = ChildProcess;
|
|
198
200
|
yok_1.injector.register("childProcess", ChildProcess);
|
|
201
|
+
//# sourceMappingURL=child-process.js.map
|
|
@@ -37,9 +37,11 @@ class AnalyticsCommand {
|
|
|
37
37
|
switch (arg.toLowerCase()) {
|
|
38
38
|
case "enable":
|
|
39
39
|
await this.$analyticsService.setStatus(this.settingName, true);
|
|
40
|
+
// TODO(Analytics): await this.$analyticsService.track(this.settingName, "enabled");
|
|
40
41
|
this.$logger.info(`${this.humanReadableSettingName} is now enabled.`);
|
|
41
42
|
break;
|
|
42
43
|
case "disable":
|
|
44
|
+
// TODO(Analytics): await this.$analyticsService.track(this.settingName, "disabled");
|
|
43
45
|
await this.$analyticsService.setStatus(this.settingName, false);
|
|
44
46
|
this.$logger.info(`${this.humanReadableSettingName} is now disabled.`);
|
|
45
47
|
break;
|
|
@@ -66,3 +68,4 @@ class ErrorReportingCommand extends AnalyticsCommand {
|
|
|
66
68
|
}
|
|
67
69
|
exports.ErrorReportingCommand = ErrorReportingCommand;
|
|
68
70
|
yok_1.injector.registerCommand("error-reporting", ErrorReportingCommand);
|
|
71
|
+
//# sourceMappingURL=analytics.js.map
|
|
@@ -15,6 +15,7 @@ class AutoCompleteCommand {
|
|
|
15
15
|
if (helpers.isInteractive()) {
|
|
16
16
|
if (this.$autoCompletionService.isAutoCompletionEnabled()) {
|
|
17
17
|
if (this.$autoCompletionService.isObsoleteAutoCompletionEnabled()) {
|
|
18
|
+
// obsolete autocompletion is enabled, update it to the new one:
|
|
18
19
|
await this.$autoCompletionService.enableAutoCompletion();
|
|
19
20
|
}
|
|
20
21
|
else {
|
|
@@ -29,6 +30,7 @@ class AutoCompleteCommand {
|
|
|
29
30
|
await this.$autoCompletionService.enableAutoCompletion();
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
33
|
+
// make sure we've removed all autocompletion code from all shell profiles
|
|
32
34
|
this.$autoCompletionService.disableAutoCompletion();
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -91,3 +93,4 @@ class AutoCompleteStatusCommand {
|
|
|
91
93
|
}
|
|
92
94
|
exports.AutoCompleteStatusCommand = AutoCompleteStatusCommand;
|
|
93
95
|
yok_1.injector.registerCommand("autocomplete|status", AutoCompleteStatusCommand);
|
|
96
|
+
//# sourceMappingURL=autocompletion.js.map
|
|
@@ -31,3 +31,4 @@ class OpenDeviceLogStreamCommand {
|
|
|
31
31
|
exports.OpenDeviceLogStreamCommand = OpenDeviceLogStreamCommand;
|
|
32
32
|
OpenDeviceLogStreamCommand.NOT_SPECIFIED_DEVICE_ERROR_MESSAGE = "More than one device found. Specify device explicitly.";
|
|
33
33
|
yok_1.injector.registerCommand(["device|log", "devices|log"], OpenDeviceLogStreamCommand);
|
|
34
|
+
//# sourceMappingURL=device-log-stream.js.map
|
|
@@ -25,6 +25,7 @@ class GetFileCommand {
|
|
|
25
25
|
this.$projectData.initializeProjectData();
|
|
26
26
|
}
|
|
27
27
|
catch (err) {
|
|
28
|
+
// ignore the error
|
|
28
29
|
}
|
|
29
30
|
if (!this.$projectData.projectIdentifiers) {
|
|
30
31
|
this.$errors.fail("Please enter application identifier or execute this command in project.");
|
|
@@ -41,3 +42,4 @@ class GetFileCommand {
|
|
|
41
42
|
}
|
|
42
43
|
exports.GetFileCommand = GetFileCommand;
|
|
43
44
|
yok_1.injector.registerCommand(["device|get-file", "devices|get-file"], GetFileCommand);
|
|
45
|
+
//# sourceMappingURL=get-file.js.map
|
|
@@ -92,6 +92,7 @@ class ListDevicesCommand {
|
|
|
92
92
|
"Version",
|
|
93
93
|
"Device Identifier",
|
|
94
94
|
"Image Identifier",
|
|
95
|
+
// "Error Help",
|
|
95
96
|
], []);
|
|
96
97
|
for (const info of emulators) {
|
|
97
98
|
table.push([
|
|
@@ -100,6 +101,7 @@ class ListDevicesCommand {
|
|
|
100
101
|
info.version,
|
|
101
102
|
info.identifier || "",
|
|
102
103
|
info.imageIdentifier || "",
|
|
104
|
+
// info.errorHelp || "",
|
|
103
105
|
]);
|
|
104
106
|
}
|
|
105
107
|
this.$logger.info(table.toString());
|
|
@@ -133,3 +135,4 @@ class ListiOSDevicesCommand {
|
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
yok_1.injector.registerCommand(["device|ios", "devices|ios"], ListiOSDevicesCommand);
|
|
138
|
+
//# sourceMappingURL=list-devices.js.map
|