@akylas/nativescript-cli 8.8.7 → 8.9.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/config/test-deps-versions-generated.json +16 -0
- 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/.d.ts +1 -0
- package/lib/bootstrap.js +1 -0
- package/lib/bun-package-manager.js +1 -1
- package/lib/commands/generate.js +2 -41
- package/lib/commands/widget.js +799 -0
- package/lib/common/file-system.js +1 -2
- package/lib/common/logger/logger.js +4 -4
- package/lib/common/mobile/android/android-emulator-services.js +1 -1
- package/lib/common/mobile/emulator-helper.js +1 -0
- package/lib/common/mobile/mobile-core/devices-service.js +2 -1
- package/lib/common/opener.js +2 -2
- package/lib/common/services/hooks-service.js +23 -6
- package/lib/constants.js +1 -1
- package/lib/controllers/migrate-controller.js +8 -8
- package/lib/controllers/prepare-controller.js +2 -4
- package/lib/definitions/ios.d.ts +11 -1
- package/lib/definitions/project.d.ts +50 -24
- package/lib/node-package-manager.js +1 -1
- package/lib/services/analytics/analytics-service.js +2 -1
- package/lib/services/android/gradle-build-args-service.js +1 -1
- package/lib/services/android-plugin-build-service.js +1 -1
- package/lib/services/assets-generation/assets-generation-service.js +33 -15
- package/lib/services/ios/spm-service.js +10 -1
- package/lib/services/ios-debugger-port-service.js +1 -1
- package/lib/services/ios-project-service.js +45 -14
- package/lib/services/livesync/android-livesync-tool.js +1 -1
- package/lib/services/project-config-service.js +12 -3
- package/lib/services/webpack/webpack-compiler-service.js +4 -3
- package/lib/tools/config-manipulation/config-transformer.js +9 -0
- package/package.json +47 -53
- package/vendor/gradle-app/app/build.gradle +347 -119
- package/vendor/gradle-app/build.gradle +7 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"karma-jasmine": "4.0.2",
|
|
3
|
+
"karma-chai": "0.1.0",
|
|
4
|
+
"karma-coverage": "2.2.1",
|
|
5
|
+
"karma": "6.4.4",
|
|
6
|
+
"karma-mocha": "2.0.1",
|
|
7
|
+
"karma-qunit": "4.2.1",
|
|
8
|
+
"mocha": "11.7.1",
|
|
9
|
+
"nyc": "17.1.0",
|
|
10
|
+
"@types/jasmine": "5.1.9",
|
|
11
|
+
"@types/mocha": "10.0.10",
|
|
12
|
+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
13
|
+
"karma-nativescript-launcher": "1.0.0",
|
|
14
|
+
"@types/karma-chai": "0.1.7",
|
|
15
|
+
"@types/qunit": "2.19.13"
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<% if (isJekyll) { %>---
|
|
2
|
+
title: ns widget ios
|
|
3
|
+
position: 11
|
|
4
|
+
---<% } %>
|
|
5
|
+
|
|
6
|
+
# ns widget ios
|
|
7
|
+
|
|
8
|
+
### Description
|
|
9
|
+
|
|
10
|
+
Interactively adds a new iOS widget based on a predefined template.
|
|
11
|
+
|
|
12
|
+
### Commands
|
|
13
|
+
|
|
14
|
+
Usage | Synopsis
|
|
15
|
+
------|-------
|
|
16
|
+
General | `$ ns widget ios`
|
|
17
|
+
|
|
18
|
+
<% if(isHtml) { %>
|
|
19
|
+
|
|
20
|
+
### Command Limitations
|
|
21
|
+
|
|
22
|
+
* You can run `$ ns widget ios` only on macOS systems.
|
|
23
|
+
|
|
24
|
+
<% } %>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<% if (isJekyll) { %>---
|
|
2
|
+
title: ns widget ios
|
|
3
|
+
position: 11
|
|
4
|
+
---<% } %>
|
|
5
|
+
|
|
6
|
+
# ns widget ios
|
|
7
|
+
|
|
8
|
+
### Description
|
|
9
|
+
|
|
10
|
+
Interactively adds a new iOS widget based on a predefined template.
|
|
11
|
+
|
|
12
|
+
### Commands
|
|
13
|
+
|
|
14
|
+
Usage | Synopsis
|
|
15
|
+
------|-------
|
|
16
|
+
General | `$ ns widget ios`
|
|
17
|
+
|
|
18
|
+
<% if(isHtml) { %>
|
|
19
|
+
|
|
20
|
+
### Command Limitations
|
|
21
|
+
|
|
22
|
+
* You can run `$ ns widget ios` only on macOS systems.
|
|
23
|
+
|
|
24
|
+
<% } %>
|
package/docs/man_pages/start.md
CHANGED
|
@@ -50,7 +50,7 @@ Command | Description
|
|
|
50
50
|
[install](project/configuration/install.html) | Installs all platforms and dependencies described in the `package.json` file in the current directory.
|
|
51
51
|
[plugin](lib-management/plugin.html) | Lets you manage the plugins for your project.
|
|
52
52
|
[open](project/configuration/open.md) | Opens the native project in Xcode/Android Studio.
|
|
53
|
-
|
|
53
|
+
[widget ios](project/configuration/widget.md) | Adds a new iOS widget to the project.
|
|
54
54
|
## Publishing Commands
|
|
55
55
|
Command | Description
|
|
56
56
|
---|---
|
package/lib/.d.ts
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
/// <reference path="commands/typings.ts" />
|
|
49
49
|
/// <reference path="commands/update-platform.ts" />
|
|
50
50
|
/// <reference path="commands/update.ts" />
|
|
51
|
+
/// <reference path="commands/widget.ts" />
|
|
51
52
|
/// <reference path="common/bootstrap.ts" />
|
|
52
53
|
/// <reference path="common/child-process.ts" />
|
|
53
54
|
/// <reference path="common/codeGeneration/code-entity.ts" />
|
package/lib/bootstrap.js
CHANGED
|
@@ -30,7 +30,7 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
|
|
|
30
30
|
const packageJsonPath = path.join(pathToSave, "package.json");
|
|
31
31
|
const jsonContentBefore = this.$fs.readJson(packageJsonPath);
|
|
32
32
|
const flags = this.getFlagsString(config, true);
|
|
33
|
-
let params = ["install"
|
|
33
|
+
let params = ["install"];
|
|
34
34
|
const isInstallingAllDependencies = packageName === pathToSave;
|
|
35
35
|
if (!isInstallingAllDependencies) {
|
|
36
36
|
params.push(packageName);
|
package/lib/commands/generate.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenerateCommand = void 0;
|
|
4
|
-
const schematics_executor_1 = require("@nativescript/schematics-executor");
|
|
5
4
|
const yok_1 = require("../common/yok");
|
|
6
5
|
class GenerateCommand {
|
|
7
|
-
constructor($logger, $
|
|
6
|
+
constructor($logger, $errors) {
|
|
8
7
|
this.$logger = $logger;
|
|
9
|
-
this.$options = $options;
|
|
10
8
|
this.$errors = $errors;
|
|
11
9
|
this.allowedParameters = [];
|
|
12
10
|
}
|
|
13
11
|
async execute(_rawArgs) {
|
|
14
12
|
try {
|
|
15
|
-
|
|
13
|
+
this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
|
|
16
14
|
}
|
|
17
15
|
catch (error) {
|
|
18
16
|
this.$errors.fail(error.message);
|
|
@@ -24,46 +22,9 @@ class GenerateCommand {
|
|
|
24
22
|
return true;
|
|
25
23
|
}
|
|
26
24
|
validateExecutionOptions() {
|
|
27
|
-
if (!this.executionOptions.schematic) {
|
|
28
|
-
this.$errors.failWithHelp(`The generate command requires a schematic name to be specified.`);
|
|
29
|
-
}
|
|
30
25
|
}
|
|
31
26
|
setExecutionOptions(rawArgs) {
|
|
32
|
-
const options = this.parseRawArgs(rawArgs);
|
|
33
|
-
this.executionOptions = {
|
|
34
|
-
...options,
|
|
35
|
-
logger: this.$logger,
|
|
36
|
-
directory: process.cwd(),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
parseRawArgs(rawArgs) {
|
|
40
|
-
const collection = this.$options.collection;
|
|
41
|
-
const schematic = rawArgs.shift();
|
|
42
|
-
const { options, args } = parseSchematicSettings(rawArgs);
|
|
43
|
-
return {
|
|
44
|
-
collection,
|
|
45
|
-
schematic,
|
|
46
|
-
schematicOptions: options,
|
|
47
|
-
schematicArgs: args,
|
|
48
|
-
};
|
|
49
27
|
}
|
|
50
28
|
}
|
|
51
29
|
exports.GenerateCommand = GenerateCommand;
|
|
52
|
-
function parseSchematicSettings(rawArgs) {
|
|
53
|
-
const [optionStrings, args] = partition(rawArgs, (item) => item.includes("="));
|
|
54
|
-
const options = optionStrings
|
|
55
|
-
.map((o) => o.split("="))
|
|
56
|
-
.map(([key, ...value]) => [key, value.join("=")])
|
|
57
|
-
.reduce((obj, [key, value]) => {
|
|
58
|
-
return { ...obj, [key]: value };
|
|
59
|
-
}, {});
|
|
60
|
-
return { options, args };
|
|
61
|
-
}
|
|
62
|
-
function partition(array, predicate) {
|
|
63
|
-
return array.reduce(([pass, fail], item) => {
|
|
64
|
-
return predicate(item)
|
|
65
|
-
? [[...pass, item], fail]
|
|
66
|
-
: [pass, [...fail, item]];
|
|
67
|
-
}, [[], []]);
|
|
68
|
-
}
|
|
69
30
|
yok_1.injector.registerCommand("generate", GenerateCommand);
|