@akylas/nativescript-cli 8.8.7 → 8.10.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/config/test-deps-versions-generated.json +16 -0
- package/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-get.md +36 -0
- package/docs/man_pages/config/config-set.md +40 -0
- package/docs/man_pages/config/config.md +39 -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/project/hooks/hooks.md +35 -0
- package/docs/man_pages/start.md +2 -1
- package/lib/.d.ts +9 -3
- package/lib/bootstrap.js +4 -1
- package/lib/bun-package-manager.js +1 -1
- package/lib/color.js +38 -7
- package/lib/commands/build.js +18 -2
- package/lib/commands/clean.js +1 -2
- package/lib/commands/config.js +1 -1
- package/lib/commands/embedding/embed.js +1 -1
- package/lib/commands/generate.js +2 -41
- package/lib/commands/hooks/common.js +79 -0
- package/lib/commands/hooks/hooks-lock.js +100 -0
- package/lib/commands/hooks/hooks.js +71 -0
- package/lib/commands/post-install.js +2 -2
- package/lib/commands/typings.js +29 -18
- package/lib/commands/widget.js +799 -0
- package/lib/common/definitions/extensibility.d.ts +2 -2
- package/lib/common/definitions/mobile.d.ts +72 -72
- package/lib/common/file-system.js +1 -2
- package/lib/common/header.js +3 -3
- package/lib/common/logger/layouts/cli-layout.js +1 -1
- package/lib/common/logger/logger.js +5 -5
- package/lib/common/mobile/android/android-device.js +1 -1
- package/lib/common/mobile/android/android-emulator-services.js +9 -7
- package/lib/common/mobile/device-log-provider.js +3 -4
- 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/project-helper.js +15 -2
- package/lib/common/services/hooks-service.js +23 -6
- package/lib/common/verify-node-version.js +1 -1
- package/lib/constants.js +8 -5
- package/lib/controllers/migrate-controller.js +11 -12
- package/lib/controllers/prepare-controller.js +11 -13
- package/lib/controllers/run-controller.js +1 -1
- package/lib/declarations.d.ts +5 -0
- package/lib/definitions/hooks.d.ts +1 -0
- package/lib/definitions/ios.d.ts +11 -1
- package/lib/definitions/nativescript-dev-xcode.d.ts +25 -1
- package/lib/definitions/project.d.ts +102 -25
- package/lib/definitions/temp-service.d.ts +6 -2
- package/lib/helpers/key-command-helper.js +2 -1
- package/lib/nativescript-cli.js +28 -0
- package/lib/node-package-manager.js +1 -1
- package/lib/options.js +4 -0
- package/lib/project-data.js +10 -4
- package/lib/services/analytics/analytics-broker-process.js +1 -1
- package/lib/services/analytics/analytics-service.js +2 -1
- package/lib/services/analytics-settings-service.js +2 -1
- package/lib/services/android/gradle-build-args-service.js +8 -4
- package/lib/services/android/gradle-build-service.js +4 -1
- package/lib/services/android-plugin-build-service.js +1 -1
- package/lib/services/android-project-service.js +12 -10
- package/lib/services/assets-generation/assets-generation-service.js +33 -15
- package/lib/services/{webpack/webpack-compiler-service.js → bundler/bundler-compiler-service.js} +258 -88
- package/lib/services/bundler/bundler.js +2 -0
- package/lib/services/extensibility-service.js +1 -1
- package/lib/services/ios/spm-service.js +22 -2
- package/lib/services/ios/xcodebuild-args-service.js +7 -5
- package/lib/services/ios-debugger-port-service.js +1 -1
- package/lib/services/ios-project-service.js +45 -15
- package/lib/services/ios-watch-app-service.js +540 -16
- package/lib/services/livesync/android-livesync-tool.js +4 -2
- package/lib/services/plugins-service.js +1 -0
- package/lib/services/project-changes-service.js +1 -1
- package/lib/services/project-config-service.js +12 -3
- package/lib/services/temp-service.js +16 -4
- package/lib/services/versions-service.js +2 -1
- package/lib/tools/config-manipulation/config-transformer.js +9 -0
- package/package.json +59 -66
- package/vendor/aab-tool/README.txt +1 -1
- package/vendor/aab-tool/bundletool.jar +0 -0
- package/vendor/gradle-app/app/build.gradle +365 -130
- package/vendor/gradle-app/app/gradle.properties +45 -0
- package/vendor/gradle-app/build.gradle +7 -7
- package/vendor/gradle-plugin/build.gradle +7 -6
- package/lib/services/webpack/webpack.d.ts +0 -227
|
@@ -38,9 +38,9 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
|
|
|
38
38
|
""")
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
project.ext.extractedDependenciesDir = "${project.
|
|
42
|
-
project.ext.cleanupAllJarsTimestamp = "${project.
|
|
43
|
-
project.ext.extractAllJarsTimestamp = "${project.
|
|
41
|
+
project.ext.extractedDependenciesDir = "${project.layout.buildDirectory.dir("exploded-dependencies").get().asFile}"
|
|
42
|
+
project.ext.cleanupAllJarsTimestamp = "${project.layout.buildDirectory.file("cleanupAllJars.timestamp").get().asFile}"
|
|
43
|
+
project.ext.extractAllJarsTimestamp = "${project.layout.buildDirectory.file("extractAllJars.timestamp").get().asFile}"
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
project.ext.nativescriptDependencies = new JsonSlurper().parseText(dependenciesJson.text)
|
|
@@ -144,7 +144,7 @@ version of the {N} CLI install a previous version of the runtime package - 'tns
|
|
|
144
144
|
dependencies {
|
|
145
145
|
classpath "com.android.tools.build:gradle:$androidBuildToolsVersion"
|
|
146
146
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
147
|
-
classpath "org.
|
|
147
|
+
classpath "org.apache.groovy:groovy-all:4.0.21"
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -165,6 +165,6 @@ allprojects {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
task clean(type:
|
|
169
|
-
delete rootProject.
|
|
170
|
-
}
|
|
168
|
+
task clean (type:Delete) {
|
|
169
|
+
delete rootProject.layout.buildDirectory.get().asFile
|
|
170
|
+
}
|
|
@@ -272,6 +272,13 @@ allprojects {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
|
|
276
|
+
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 35 }
|
|
277
|
+
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 35 as int }
|
|
278
|
+
def computeBuildToolsVersion = { ->
|
|
279
|
+
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "35.0.1"
|
|
280
|
+
}
|
|
281
|
+
|
|
275
282
|
android {
|
|
276
283
|
namespace "{{pluginNamespace}}"
|
|
277
284
|
def applyPluginGradleConfigurations = { ->
|
|
@@ -284,12 +291,6 @@ android {
|
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
293
|
|
|
287
|
-
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? project.compileSdk as int : 31 }
|
|
288
|
-
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? project.targetSdk as int : 31 as int }
|
|
289
|
-
def computeBuildToolsVersion = { ->
|
|
290
|
-
project.hasProperty("buildToolsVersion") ? project.buildToolsVersion : "31.0.0"
|
|
291
|
-
}
|
|
292
|
-
|
|
293
294
|
project.ext.applyBeforePluginGradleConfiguration()
|
|
294
295
|
applyPluginGradleConfigurations()
|
|
295
296
|
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "events";
|
|
2
|
-
import { BuildData } from "../../data/build-data";
|
|
3
|
-
import { PrepareData } from "../../data/prepare-data";
|
|
4
|
-
import {
|
|
5
|
-
IPlatformProjectServiceBase,
|
|
6
|
-
IProjectData,
|
|
7
|
-
IValidatePlatformOutput,
|
|
8
|
-
} from "../../definitions/project";
|
|
9
|
-
import { IOptions, IDependencyData } from "../../declarations";
|
|
10
|
-
import { IPlatformData } from "../../definitions/platform";
|
|
11
|
-
import { IPluginData } from "../../definitions/plugins";
|
|
12
|
-
import { IRelease, ISpawnResult } from "../../common/declarations";
|
|
13
|
-
import {
|
|
14
|
-
IProjectChangesInfo,
|
|
15
|
-
IPrepareInfo,
|
|
16
|
-
IAddedNativePlatform,
|
|
17
|
-
} from "../../definitions/project-changes";
|
|
18
|
-
import { INotConfiguredEnvOptions } from "../../common/definitions/commands";
|
|
19
|
-
|
|
20
|
-
declare global {
|
|
21
|
-
interface IWebpackCompilerService extends EventEmitter {
|
|
22
|
-
compileWithWatch(
|
|
23
|
-
platformData: IPlatformData,
|
|
24
|
-
projectData: IProjectData,
|
|
25
|
-
prepareData: IPrepareData
|
|
26
|
-
): Promise<any>;
|
|
27
|
-
compileWithoutWatch(
|
|
28
|
-
platformData: IPlatformData,
|
|
29
|
-
projectData: IProjectData,
|
|
30
|
-
prepareData: IPrepareData
|
|
31
|
-
): Promise<void>;
|
|
32
|
-
stopWebpackCompiler(platform: string): Promise<void>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface IWebpackEnvOptions {
|
|
36
|
-
sourceMap?: boolean;
|
|
37
|
-
uglify?: boolean;
|
|
38
|
-
production?: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface IProjectChangesService {
|
|
42
|
-
checkForChanges(
|
|
43
|
-
platformData: IPlatformData,
|
|
44
|
-
projectData: IProjectData,
|
|
45
|
-
prepareData: IPrepareData,
|
|
46
|
-
filesChangedData?: IFilesChangeEventData
|
|
47
|
-
): Promise<IProjectChangesInfo>;
|
|
48
|
-
getPrepareInfoFilePath(platformData: IPlatformData): string;
|
|
49
|
-
getPrepareInfo(platformData: IPlatformData): IPrepareInfo;
|
|
50
|
-
savePrepareInfo(
|
|
51
|
-
platformData: IPlatformData,
|
|
52
|
-
projectData: IProjectData,
|
|
53
|
-
prepareData: IPrepareData
|
|
54
|
-
): Promise<void>;
|
|
55
|
-
setNativePlatformStatus(
|
|
56
|
-
platformData: IPlatformData,
|
|
57
|
-
projectData: IProjectData,
|
|
58
|
-
addedPlatform: IAddedNativePlatform
|
|
59
|
-
): void;
|
|
60
|
-
currentChanges: IProjectChangesInfo;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface IFilesChangeEventData {
|
|
64
|
-
platform: string;
|
|
65
|
-
files: string[];
|
|
66
|
-
staleFiles: string[];
|
|
67
|
-
hmrData: IPlatformHmrData;
|
|
68
|
-
hasOnlyHotUpdateFiles: boolean;
|
|
69
|
-
hasNativeChanges: boolean;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface IWebpackEmitMessage {
|
|
73
|
-
emittedFiles: string[];
|
|
74
|
-
chunkFiles: string[];
|
|
75
|
-
hash: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
interface IPlatformProjectService
|
|
79
|
-
extends NodeJS.EventEmitter,
|
|
80
|
-
IPlatformProjectServiceBase {
|
|
81
|
-
getPlatformData(projectData: IProjectData): IPlatformData;
|
|
82
|
-
validate(
|
|
83
|
-
projectData: IProjectData,
|
|
84
|
-
options: IOptions,
|
|
85
|
-
notConfiguredEnvOptions?: INotConfiguredEnvOptions
|
|
86
|
-
): Promise<IValidatePlatformOutput>;
|
|
87
|
-
createProject(
|
|
88
|
-
frameworkDir: string,
|
|
89
|
-
frameworkVersion: string,
|
|
90
|
-
projectData: IProjectData
|
|
91
|
-
): Promise<void>;
|
|
92
|
-
interpolateData(projectData: IProjectData): Promise<void>;
|
|
93
|
-
interpolateConfigurationFile(projectData: IProjectData): void;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Executes additional actions after native project is created.
|
|
97
|
-
* @param {string} projectRoot Path to the real NativeScript project.
|
|
98
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
99
|
-
* @returns {void}
|
|
100
|
-
*/
|
|
101
|
-
afterCreateProject(projectRoot: string, projectData: IProjectData): void;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Gets first chance to validate the options provided as command line arguments.
|
|
105
|
-
* @param {string} projectId Project identifier - for example org.nativescript.test.
|
|
106
|
-
* @param {any} provision UUID of the provisioning profile used in iOS option validation.
|
|
107
|
-
* @returns {void}
|
|
108
|
-
*/
|
|
109
|
-
validateOptions(
|
|
110
|
-
projectId?: string,
|
|
111
|
-
provision?: true | string,
|
|
112
|
-
teamId?: true | string
|
|
113
|
-
): Promise<boolean>;
|
|
114
|
-
|
|
115
|
-
buildProject<T extends BuildData>(
|
|
116
|
-
projectRoot: string,
|
|
117
|
-
projectData: IProjectData,
|
|
118
|
-
buildConfig: T
|
|
119
|
-
): Promise<void>;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Prepares images in Native project (for iOS).
|
|
123
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
124
|
-
* @param {any} platformSpecificData Platform specific data required for project preparation.
|
|
125
|
-
* @returns {void}
|
|
126
|
-
*/
|
|
127
|
-
prepareProject<T extends PrepareData>(
|
|
128
|
-
projectData: IProjectData,
|
|
129
|
-
prepareData: T
|
|
130
|
-
): Promise<void>;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Prepares App_Resources in the native project by clearing data from other platform and applying platform specific rules.
|
|
134
|
-
* @param {string} appResourcesDirectoryPath The place in the native project where the App_Resources are copied first.
|
|
135
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
136
|
-
* @returns {void}
|
|
137
|
-
*/
|
|
138
|
-
prepareAppResources(projectData: IProjectData): void;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Defines if current platform is prepared (i.e. if <project dir>/platforms/<platform> dir exists).
|
|
142
|
-
* @param {string} projectRoot The project directory (path where root's package.json is located).
|
|
143
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
144
|
-
* @returns {boolean} True in case platform is prepare (i.e. if <project dir>/platforms/<platform> dir exists), false otherwise.
|
|
145
|
-
*/
|
|
146
|
-
isPlatformPrepared(projectRoot: string, projectData: IProjectData): boolean;
|
|
147
|
-
|
|
148
|
-
preparePluginNativeCode(
|
|
149
|
-
pluginData: IPluginData,
|
|
150
|
-
options?: any
|
|
151
|
-
): Promise<void>;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Removes native code of a plugin (CocoaPods, jars, libs, src).
|
|
155
|
-
* @param {IPluginData} Plugins data describing the plugin which should be cleaned.
|
|
156
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
157
|
-
* @returns {void}
|
|
158
|
-
*/
|
|
159
|
-
removePluginNativeCode(
|
|
160
|
-
pluginData: IPluginData,
|
|
161
|
-
projectData: IProjectData
|
|
162
|
-
): Promise<void>;
|
|
163
|
-
|
|
164
|
-
beforePrepareAllPlugins(
|
|
165
|
-
projectData: IProjectData,
|
|
166
|
-
dependencies?: IDependencyData[]
|
|
167
|
-
): Promise<IDependencyData[]>;
|
|
168
|
-
|
|
169
|
-
handleNativeDependenciesChange(
|
|
170
|
-
projectData: IProjectData,
|
|
171
|
-
opts: IRelease
|
|
172
|
-
): Promise<void>;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Gets the path wheren App_Resources should be copied.
|
|
176
|
-
* @returns {string} Path to native project, where App_Resources should be copied.
|
|
177
|
-
*/
|
|
178
|
-
getAppResourcesDestinationDirectoryPath(projectData: IProjectData): string;
|
|
179
|
-
|
|
180
|
-
cleanDeviceTempFolder(
|
|
181
|
-
deviceIdentifier: string,
|
|
182
|
-
projectData: IProjectData
|
|
183
|
-
): Promise<void>;
|
|
184
|
-
processConfigurationFilesFromAppResources(
|
|
185
|
-
projectData: IProjectData,
|
|
186
|
-
opts: { release: boolean }
|
|
187
|
-
): Promise<void>;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Ensures there is configuration file (AndroidManifest.xml, Info.plist) in app/App_Resources.
|
|
191
|
-
* @param {IProjectData} projectData DTO with information about the project.
|
|
192
|
-
* @returns {void}
|
|
193
|
-
*/
|
|
194
|
-
ensureConfigurationFileInAppResources(projectData: IProjectData): void;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Stops all running processes that might hold a lock on the filesystem.
|
|
198
|
-
* Android: Gradle daemon processes are terminated.
|
|
199
|
-
* @param {IPlatformData} platformData The data for the specified platform.
|
|
200
|
-
* @returns {void}
|
|
201
|
-
*/
|
|
202
|
-
stopServices?(projectRoot: string): Promise<ISpawnResult>;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Removes build artifacts specific to the platform
|
|
206
|
-
* @param {string} projectRoot The root directory of the native project.
|
|
207
|
-
* @returns {void}
|
|
208
|
-
*/
|
|
209
|
-
cleanProject?(projectRoot: string): Promise<void>;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Check the current state of the project, and validate against the options.
|
|
213
|
-
* If there are parts in the project that are inconsistent with the desired options, marks them in the changeset flags.
|
|
214
|
-
*/
|
|
215
|
-
checkForChanges<T extends PrepareData>(
|
|
216
|
-
changeset: IProjectChangesInfo,
|
|
217
|
-
prepareData: T,
|
|
218
|
-
projectData: IProjectData
|
|
219
|
-
): Promise<void>;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Get the deployment target's version
|
|
223
|
-
* Currently implemented only for iOS -> returns the value of IPHONEOS_DEPLOYMENT_TARGET property from xcconfig file
|
|
224
|
-
*/
|
|
225
|
-
getDeploymentTarget?(projectData: IProjectData): any;
|
|
226
|
-
}
|
|
227
|
-
}
|