@akylas/nativescript-cli 8.11.1 → 8.11.2
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akylas/nativescript-cli",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "8.11.
|
|
4
|
+
"version": "8.11.2",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"!lib/common/test",
|
|
23
23
|
"!lib/common/docs/fonts",
|
|
24
24
|
"!node_modules",
|
|
25
|
+
"patches",
|
|
25
26
|
"resources",
|
|
26
27
|
"setup",
|
|
27
28
|
"vendor",
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
"open": "8.4.2",
|
|
89
90
|
"ora": "5.4.1",
|
|
90
91
|
"pacote": "21.0.3",
|
|
92
|
+
"patch-package": "^8.0.1",
|
|
91
93
|
"pbxproj-dom": "1.2.0",
|
|
92
94
|
"plist": "3.1.0",
|
|
93
95
|
"plist-merge-patch": "0.2.0",
|
|
@@ -156,7 +158,6 @@
|
|
|
156
158
|
"istanbul": "0.4.5",
|
|
157
159
|
"lint-staged": "~15.5.2",
|
|
158
160
|
"mocha": "11.7.4",
|
|
159
|
-
"patch-package": "^8.0.1",
|
|
160
161
|
"sinon": "19.0.5",
|
|
161
162
|
"source-map-support": "0.5.21",
|
|
162
163
|
"standard-version": "9.5.0",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
diff --git a/node_modules/@nstudio/trapezedev-project/dist/ios/spm.js b/node_modules/@nstudio/trapezedev-project/dist/ios/spm.js
|
|
2
|
+
index 1c1e4af..bba232f 100644
|
|
3
|
+
--- a/node_modules/@nstudio/trapezedev-project/dist/ios/spm.js
|
|
4
|
+
+++ b/node_modules/@nstudio/trapezedev-project/dist/ios/spm.js
|
|
5
|
+
@@ -138,14 +138,14 @@ function addSPMPackageToProject(project, targetId, pkg, projectRoot) {
|
|
6
|
+
comment: packageReferenceComment,
|
|
7
|
+
});
|
|
8
|
+
for (const lib of pkg.libs) {
|
|
9
|
+
- const { uuid: spmProductDependencyUUID } = helper.addOrUpdateEntry('XCSwiftPackageProductDependency', lib, {
|
|
10
|
+
+ const { uuid: spmProductDependencyUUID } = helper.addEntry('XCSwiftPackageProductDependency', lib, {
|
|
11
|
+
isa: 'XCSwiftPackageProductDependency',
|
|
12
|
+
package: spmPackageReferenceUUID,
|
|
13
|
+
package_comment: spmPackageReferenceComment,
|
|
14
|
+
productName: lib,
|
|
15
|
+
});
|
|
16
|
+
const libComment = `${lib} in Frameworks`;
|
|
17
|
+
- const { uuid: spmBuildFileUuid } = helper.addOrUpdateEntry('PBXBuildFile', libComment, {
|
|
18
|
+
+ const { uuid: spmBuildFileUuid } = helper.addEntry('PBXBuildFile', libComment, {
|
|
19
|
+
isa: 'PBXBuildFile',
|
|
20
|
+
productRef: spmProductDependencyUUID,
|
|
21
|
+
productRef_comment: lib,
|
|
22
|
+
@@ -184,6 +184,17 @@ class SPMHelper {
|
|
23
|
+
comment: entryComment,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
+ addEntry(section, entryComment, entry) {
|
|
27
|
+
+ const pbxSection = this.getOrCreateSection(section);
|
|
28
|
+
+ const entryUuid = this.pbxProject.generateUuid();
|
|
29
|
+
+ const entryCommentKey = `${entryUuid}_comment`;
|
|
30
|
+
+ pbxSection[entryCommentKey] = entryComment;
|
|
31
|
+
+ pbxSection[entryUuid] = entry;
|
|
32
|
+
+ return {
|
|
33
|
+
+ uuid: entryUuid,
|
|
34
|
+
+ comment: entryComment,
|
|
35
|
+
+ };
|
|
36
|
+
+ }
|
|
37
|
+
getExistingOrGenerateUUID(section, comment) {
|
|
38
|
+
var _a;
|
|
39
|
+
const existingUUID = (_a = Object.keys(this.pbxProject.hash.project.objects[section])
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
diff --git a/node_modules/nativescript-dev-xcode/lib/pbxFile.js b/node_modules/nativescript-dev-xcode/lib/pbxFile.js
|
|
2
|
+
index 1b52d25..1c14085 100644
|
|
3
|
+
--- a/node_modules/nativescript-dev-xcode/lib/pbxFile.js
|
|
4
|
+
+++ b/node_modules/nativescript-dev-xcode/lib/pbxFile.js
|
|
5
|
+
@@ -128,9 +128,9 @@ function pbxFile(filepath, opt) {
|
|
6
|
+
if (opt.explicitFileType) {
|
|
7
|
+
this.explicitFileType = opt.explicitFileType;
|
|
8
|
+
this.basename = this.basename + '.' + defaultExtension(this);
|
|
9
|
+
- delete this.path;
|
|
10
|
+
+ // delete this.path;
|
|
11
|
+
delete this.lastKnownFileType;
|
|
12
|
+
- delete this.group;
|
|
13
|
+
+ // delete this.group;
|
|
14
|
+
delete this.defaultEncoding;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
diff --git a/node_modules/nativescript-dev-xcode/lib/pbxProject.js b/node_modules/nativescript-dev-xcode/lib/pbxProject.js
|
|
18
|
+
index 70f82ea..423c074 100644
|
|
19
|
+
--- a/node_modules/nativescript-dev-xcode/lib/pbxProject.js
|
|
20
|
+
+++ b/node_modules/nativescript-dev-xcode/lib/pbxProject.js
|
|
21
|
+
@@ -119,8 +119,8 @@ pbxProject.prototype.addPluginFile = function(path, opt) {
|
|
22
|
+
file.plugin = true; // durr
|
|
23
|
+
correctForPluginsPath(file, this);
|
|
24
|
+
|
|
25
|
+
- // null is better for early errors
|
|
26
|
+
- if (this.hasFile(file.path)) return null;
|
|
27
|
+
+ const existingFile = this.hasFile(file.path);
|
|
28
|
+
+ if (existingFile) return {...file, fileRef: existingFile.fileRef};
|
|
29
|
+
|
|
30
|
+
file.fileRef = this.generateUuid();
|
|
31
|
+
|
|
32
|
+
@@ -256,19 +256,23 @@ pbxProject.prototype.addResourceFile = function(path, opt, group) {
|
|
33
|
+
opt = opt || {};
|
|
34
|
+
|
|
35
|
+
var file;
|
|
36
|
+
-
|
|
37
|
+
+ var fileIsAlreadyAdded = false;
|
|
38
|
+
if (opt.plugin) {
|
|
39
|
+
file = this.addPluginFile(path, opt);
|
|
40
|
+
if (!file) return false;
|
|
41
|
+
} else {
|
|
42
|
+
file = new pbxFile(path, opt);
|
|
43
|
+
- if (this.hasFile(file.path)) return false;
|
|
44
|
+
+ const existingFile = this.hasFile(file.path);
|
|
45
|
+
+ fileIsAlreadyAdded = !!existingFile;
|
|
46
|
+
+ if (existingFile) {
|
|
47
|
+
+ file.fileRef = existingFile.fileRef;
|
|
48
|
+
+ }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
file.uuid = this.generateUuid();
|
|
52
|
+
file.target = opt ? opt.target : undefined;
|
|
53
|
+
|
|
54
|
+
- if (!opt.plugin) {
|
|
55
|
+
+ if (!opt.plugin && !fileIsAlreadyAdded) {
|
|
56
|
+
correctForResourcesPath(file, this);
|
|
57
|
+
file.fileRef = this.generateUuid();
|
|
58
|
+
}
|
|
59
|
+
@@ -278,7 +282,7 @@ pbxProject.prototype.addResourceFile = function(path, opt, group) {
|
|
60
|
+
this.addToPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
- if (!opt.plugin) {
|
|
64
|
+
+ if (!opt.plugin && !fileIsAlreadyAdded) {
|
|
65
|
+
this.addToPbxFileReferenceSection(file); // PBXFileReference
|
|
66
|
+
if (group) {
|
|
67
|
+
if (this.getPBXGroupByKey(group)) {
|
|
68
|
+
@@ -859,20 +863,20 @@ pbxProject.prototype.removeFromPluginsPbxGroup = function(file) {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
-pbxProject.prototype.addToResourcesPbxGroup = function(file) {
|
|
73
|
+
- var pluginsGroup = this.pbxGroupByName('Resources');
|
|
74
|
+
+pbxProject.prototype.addToResourcesPbxGroup = function(file, groupName = 'Resources') {
|
|
75
|
+
+ var pluginsGroup = this.pbxGroupByName(groupName);
|
|
76
|
+
if (!pluginsGroup) {
|
|
77
|
+
- this.addPbxGroup([file.path], 'Resources');
|
|
78
|
+
+ this.addPbxGroup([file.path], groupName);
|
|
79
|
+
} else {
|
|
80
|
+
pluginsGroup.children.push(pbxGroupChild(file));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
-pbxProject.prototype.removeFromResourcesPbxGroup = function(file) {
|
|
85
|
+
- if (!this.pbxGroupByName('Resources')) {
|
|
86
|
+
+pbxProject.prototype.removeFromResourcesPbxGroup = function(file, groupName = 'Resources') {
|
|
87
|
+
+ if (!this.pbxGroupByName(groupName)) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
- var pluginsGroupChildren = this.pbxGroupByName('Resources').children, i;
|
|
91
|
+
+ var pluginsGroupChildren = this.pbxGroupByName(groupName).children, i;
|
|
92
|
+
for (i in pluginsGroupChildren) {
|
|
93
|
+
if (pbxGroupChild(file).value == pluginsGroupChildren[i].value &&
|
|
94
|
+
pbxGroupChild(file).comment == pluginsGroupChildren[i].comment) {
|
|
95
|
+
@@ -1363,7 +1367,6 @@ pbxProject.prototype.buildPhaseObject = function(name, group, target) {
|
|
96
|
+
var section = this.hash.project.objects[name],
|
|
97
|
+
obj, sectionKey, key;
|
|
98
|
+
var buildPhase = this.buildPhase(group, target);
|
|
99
|
+
-
|
|
100
|
+
for (key in section) {
|
|
101
|
+
|
|
102
|
+
// only look for comments
|
|
103
|
+
@@ -1680,7 +1683,7 @@ pbxProject.prototype.hasFile = function(filePath) {
|
|
104
|
+
for (id in files) {
|
|
105
|
+
file = files[id];
|
|
106
|
+
if (file.path == filePath || file.path == ('"' + filePath + '"')) {
|
|
107
|
+
- return file;
|
|
108
|
+
+ return {...file, fileRef: id};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@@ -1700,11 +1703,21 @@ pbxProject.prototype.getFileKey = function(filePath) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
-pbxProject.prototype.addTarget = function(name, type, subfolder, parentTarget) {
|
|
117
|
+
+pbxProject.prototype.getProductFile = function(target) {
|
|
118
|
+
+ var productReferenceUuid = target.pbxNativeTarget.productReference;
|
|
119
|
+
+ const fileReferenceSection = this.pbxFileReferenceSection();
|
|
120
|
+
+ const productReference = fileReferenceSection[productReferenceUuid];
|
|
121
|
+
+ const productFile = new pbxFile(productReference.path);
|
|
122
|
+
+ productFile.fileRef = productReferenceUuid;
|
|
123
|
+
+ productFile.uuid = productReferenceUuid;
|
|
124
|
+
+ return productFile;
|
|
125
|
+
+}
|
|
126
|
+
+pbxProject.prototype.addTarget = function(name, type, subfolder, parentTarget, productTargetType) {
|
|
127
|
+
|
|
128
|
+
// Setup uuid and name of new target
|
|
129
|
+
var targetUuid = this.generateUuid(),
|
|
130
|
+
targetType = type,
|
|
131
|
+
+ productTargetType = productTargetType || targetType,
|
|
132
|
+
targetSubfolder = subfolder || name,
|
|
133
|
+
targetName = name.trim();
|
|
134
|
+
|
|
135
|
+
@@ -1753,7 +1766,7 @@ pbxProject.prototype.addTarget = function(name, type, subfolder, parentTarget) {
|
|
136
|
+
|
|
137
|
+
// Product: Create
|
|
138
|
+
var productName = targetName,
|
|
139
|
+
- productType = producttypeForTargettype(targetType),
|
|
140
|
+
+ productType = producttypeForTargettype(productTargetType),
|
|
141
|
+
productFileType = filetypeForProducttype(productType),
|
|
142
|
+
productFile = this.addProductFile(productName, { group: 'Copy Files', 'target': targetUuid, 'explicitFileType': productFileType}),
|
|
143
|
+
productFileName = productFile.basename;
|
|
144
|
+
@@ -1781,10 +1794,10 @@ pbxProject.prototype.addTarget = function(name, type, subfolder, parentTarget) {
|
|
145
|
+
// Target: Add to PBXNativeTarget section
|
|
146
|
+
this.addToPbxNativeTargetSection(target);
|
|
147
|
+
|
|
148
|
+
- if (targetType === 'app_extension' || targetType === 'watch_extension' || targetType === 'watch_app') {
|
|
149
|
+
- const isWatchApp = targetType === 'watch_app';
|
|
150
|
+
+ if (productTargetType === 'app_extension' || productTargetType === 'watch_extension' || productTargetType === 'watch_app') {
|
|
151
|
+
+ const isWatchApp = productTargetType === 'watch_app';
|
|
152
|
+
const copyTargetUuid = parentTarget || this.getFirstTarget().uuid;
|
|
153
|
+
- const phaseComment = targetType === 'watch_app' ? 'Embed Watch Content' : 'Copy Files';
|
|
154
|
+
+ const phaseComment = productTargetType === 'watch_app' ? 'Embed Watch Content' : 'Copy Files';
|
|
155
|
+
let destination;
|
|
156
|
+
|
|
157
|
+
if(isWatchApp) {
|
|
158
|
+
@@ -1792,7 +1805,7 @@ pbxProject.prototype.addTarget = function(name, type, subfolder, parentTarget) {
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Create CopyFiles phase in parent target
|
|
162
|
+
- this.addBuildPhase([], 'PBXCopyFilesBuildPhase', phaseComment, copyTargetUuid, targetType, destination);
|
|
163
|
+
+ this.addBuildPhase([], 'PBXCopyFilesBuildPhase', phaseComment, copyTargetUuid, productTargetType, destination);
|
|
164
|
+
|
|
165
|
+
// Add product to CopyFiles phase
|
|
166
|
+
this.addToPbxCopyfilesBuildPhase(productFile, phaseComment, copyTargetUuid);
|
|
167
|
+
@@ -2058,7 +2071,7 @@ function pbxFileReferenceObj(file) {
|
|
168
|
+
fileObject.name = "\"" + fileObject.name + "\"";
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
- if(!file.path.match(NO_SPECIAL_SYMBOLS)) {
|
|
172
|
+
+ if(file.path && !file.path.match(NO_SPECIAL_SYMBOLS)) {
|
|
173
|
+
fileObject.path = "\"" + fileObject.path + "\"";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@@ -2525,10 +2538,11 @@ pbxProject.prototype.getPBXObject = function(name) {
|
|
177
|
+
pbxProject.prototype.addFile = function (path, group, opt) {
|
|
178
|
+
var file = new pbxFile(path, opt);
|
|
179
|
+
|
|
180
|
+
- // null is better for early errors
|
|
181
|
+
- if (this.hasFile(file.path)) return null;
|
|
182
|
+
+ const existingFile = this.hasFile(file.path);
|
|
183
|
+
+ if (existingFile) return {...file, fileRef: existingFile.fileRef};
|
|
184
|
+
|
|
185
|
+
file.fileRef = this.generateUuid();
|
|
186
|
+
+ file.target = opt ? opt.target : undefined;
|
|
187
|
+
|
|
188
|
+
this.addToPbxFileReferenceSection(file); // PBXFileReference
|
|
189
|
+
|