nativescript 8.9.0-dev.0 → 8.9.0-dev.1
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/lib/definitions/ios.d.ts
CHANGED
|
@@ -41,16 +41,18 @@ declare global {
|
|
|
41
41
|
): Promise<string>;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
type IosSPMPackage = IosSPMPackageDefinition & { targets?: string[] };
|
|
45
|
+
|
|
44
46
|
interface ISPMService {
|
|
45
47
|
applySPMPackages(
|
|
46
48
|
platformData: IPlatformData,
|
|
47
49
|
projectData: IProjectData,
|
|
48
|
-
pluginSpmPackages?:
|
|
50
|
+
pluginSpmPackages?: IosSPMPackage[]
|
|
49
51
|
);
|
|
50
52
|
getSPMPackages(
|
|
51
53
|
projectData: IProjectData,
|
|
52
54
|
platform: string
|
|
53
|
-
):
|
|
55
|
+
): IosSPMPackage[];
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
interface IXcodebuildArgsService {
|
|
@@ -16,6 +16,7 @@ class SPMService {
|
|
|
16
16
|
return spmPackages;
|
|
17
17
|
}
|
|
18
18
|
async applySPMPackages(platformData, projectData, pluginSpmPackages) {
|
|
19
|
+
var _a;
|
|
19
20
|
try {
|
|
20
21
|
const spmPackages = this.getSPMPackages(projectData, platformData.platformNameLowerCase);
|
|
21
22
|
if (pluginSpmPackages === null || pluginSpmPackages === void 0 ? void 0 : pluginSpmPackages.length) {
|
|
@@ -43,6 +44,11 @@ class SPMService {
|
|
|
43
44
|
}
|
|
44
45
|
this.$logger.trace(`SPM: adding package ${pkg.name} to project.`, pkg);
|
|
45
46
|
await project.ios.addSPMPackage(projectData.projectName, pkg);
|
|
47
|
+
if ((_a = pkg.targets) === null || _a === void 0 ? void 0 : _a.length) {
|
|
48
|
+
for (const target of pkg.targets) {
|
|
49
|
+
await project.ios.addSPMPackage(target, pkg);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
await project.commit();
|
|
48
54
|
await this.resolveSPMDependencies(platformData, projectData);
|
|
@@ -677,7 +677,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
677
677
|
addedExtensionsFromPlugins || addedExtensionFromPlugin;
|
|
678
678
|
}
|
|
679
679
|
if (addedExtensionsFromResources || addedExtensionsFromPlugins) {
|
|
680
|
-
this.$logger.warn("
|
|
680
|
+
this.$logger.warn("Let us know if there are other Extension features you'd like! https://github.com/NativeScript/NativeScript/issues");
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
getRootGroup(name, rootPath) {
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.PacoteService = void 0;
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const pacote = require("pacote");
|
|
11
|
+
const tar = require("tar");
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const stream_1 = require("stream");
|
|
14
14
|
const _ = require("lodash");
|
|
@@ -34,7 +34,7 @@ class PacoteService {
|
|
|
34
34
|
}
|
|
35
35
|
packageName = this.getRealPackageName(packageName);
|
|
36
36
|
this.$logger.trace(`Calling pacote.manifest for packageName: ${packageName} and manifestOptions:`, manifestOptions);
|
|
37
|
-
const result = await
|
|
37
|
+
const result = await pacote.manifest(packageName, manifestOptions);
|
|
38
38
|
this.$logger.trace("pacote.manifest result:", result);
|
|
39
39
|
return result;
|
|
40
40
|
}
|
|
@@ -48,14 +48,14 @@ class PacoteService {
|
|
|
48
48
|
const pacoteOptions = await this.getPacoteBaseOptions();
|
|
49
49
|
return new Promise(async (resolve, reject) => {
|
|
50
50
|
this.$logger.trace(`Calling pacoteService.extractPackage for packageName: '${packageName}', destinationDir: '${destinationDirectory}' and options: ${options}`);
|
|
51
|
-
const source = await
|
|
51
|
+
const source = await pacote
|
|
52
|
+
.tarball(packageName, pacoteOptions)
|
|
52
53
|
.catch((err) => {
|
|
53
54
|
this.$logger.trace(`Error in source while trying to extract stream from ${packageName}. Error is ${err}`);
|
|
54
55
|
reject(err);
|
|
55
56
|
});
|
|
56
57
|
this.$logger.trace(`Creating extract tar stream with options: ${JSON.stringify(extractOptions, null, 2)}`);
|
|
57
|
-
const destination =
|
|
58
|
-
console.log('packageName:', packageName);
|
|
58
|
+
const destination = tar.x(extractOptions);
|
|
59
59
|
const sourceStream = new stream_1.PassThrough();
|
|
60
60
|
sourceStream.end(source);
|
|
61
61
|
sourceStream.pipe(destination);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nativescript",
|
|
3
3
|
"main": "./lib/nativescript-cli-lib.js",
|
|
4
|
-
"version": "8.9.0-dev.
|
|
4
|
+
"version": "8.9.0-dev.1",
|
|
5
5
|
"author": "NativeScript <oss@nativescript.org>",
|
|
6
6
|
"description": "Command-line interface for building NativeScript projects",
|
|
7
7
|
"bin": {
|