@akanjs/devkit 0.9.43 → 0.9.44
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/cjs/src/capacitorApp.js +1 -0
- package/cjs/src/executors.js +16 -7
- package/cjs/src/scanInfo.js +2 -12
- package/esm/src/capacitorApp.js +1 -0
- package/esm/src/executors.js +16 -7
- package/esm/src/scanInfo.js +2 -12
- package/package.json +1 -1
- package/src/scanInfo.d.ts +0 -11
package/cjs/src/capacitorApp.js
CHANGED
package/cjs/src/executors.js
CHANGED
|
@@ -125,8 +125,8 @@ class Executor {
|
|
|
125
125
|
});
|
|
126
126
|
return new Promise((resolve, reject) => {
|
|
127
127
|
proc.on("exit", (code, signal) => {
|
|
128
|
-
if (
|
|
129
|
-
reject(
|
|
128
|
+
if (code !== 0 || signal)
|
|
129
|
+
reject(stdout);
|
|
130
130
|
else
|
|
131
131
|
resolve(stdout);
|
|
132
132
|
});
|
|
@@ -271,6 +271,10 @@ class Executor {
|
|
|
271
271
|
async cp(srcPath, destPath) {
|
|
272
272
|
const src = this.getPath(srcPath);
|
|
273
273
|
const dest = this.getPath(destPath);
|
|
274
|
+
if (!import_fs.default.existsSync(src))
|
|
275
|
+
return;
|
|
276
|
+
if (!import_fs.default.existsSync(dest))
|
|
277
|
+
await import_promises.default.mkdir(dest, { recursive: true });
|
|
274
278
|
await import_promises.default.cp(src, dest, { recursive: true });
|
|
275
279
|
}
|
|
276
280
|
log(msg) {
|
|
@@ -830,18 +834,23 @@ class AppExecutor extends SysExecutor {
|
|
|
830
834
|
import_fs.default.existsSync(projectPublicLibPath) && import_promises.default.rm(projectPublicLibPath, { recursive: true }),
|
|
831
835
|
import_fs.default.existsSync(projectAssetsLibPath) && import_promises.default.rm(projectAssetsLibPath, { recursive: true })
|
|
832
836
|
]);
|
|
833
|
-
const
|
|
837
|
+
const targetPublicDeps = libDeps.filter(
|
|
838
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`)
|
|
839
|
+
);
|
|
840
|
+
const targetAssetsDeps = libDeps.filter(
|
|
841
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`)
|
|
842
|
+
);
|
|
834
843
|
await Promise.all([
|
|
835
|
-
...
|
|
836
|
-
...
|
|
844
|
+
...targetPublicDeps.map((dep) => import_promises.default.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
845
|
+
...targetAssetsDeps.map((dep) => import_promises.default.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
837
846
|
]);
|
|
838
847
|
await Promise.all([
|
|
839
|
-
...
|
|
848
|
+
...targetPublicDeps.map(
|
|
840
849
|
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
841
850
|
recursive: true
|
|
842
851
|
})
|
|
843
852
|
),
|
|
844
|
-
...
|
|
853
|
+
...targetAssetsDeps.map(
|
|
845
854
|
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
846
855
|
recursive: true
|
|
847
856
|
})
|
package/cjs/src/scanInfo.js
CHANGED
|
@@ -73,17 +73,6 @@ class ScanInfo {
|
|
|
73
73
|
{ all: /* @__PURE__ */ new Set(), databases: /* @__PURE__ */ new Set(), services: /* @__PURE__ */ new Set(), scalars: /* @__PURE__ */ new Set() }
|
|
74
74
|
])
|
|
75
75
|
);
|
|
76
|
-
constants = /* @__PURE__ */ new Set();
|
|
77
|
-
dictionaries = /* @__PURE__ */ new Set();
|
|
78
|
-
documents = /* @__PURE__ */ new Set();
|
|
79
|
-
services = /* @__PURE__ */ new Set();
|
|
80
|
-
signals = /* @__PURE__ */ new Set();
|
|
81
|
-
stores = /* @__PURE__ */ new Set();
|
|
82
|
-
templates = /* @__PURE__ */ new Set();
|
|
83
|
-
units = /* @__PURE__ */ new Set();
|
|
84
|
-
utils = /* @__PURE__ */ new Set();
|
|
85
|
-
views = /* @__PURE__ */ new Set();
|
|
86
|
-
zones = /* @__PURE__ */ new Set();
|
|
87
76
|
static async getScanResult(exec) {
|
|
88
77
|
const akanConfig = await exec.getConfig();
|
|
89
78
|
const tsconfig = exec.getTsConfig();
|
|
@@ -343,7 +332,8 @@ class LibInfo extends ScanInfo {
|
|
|
343
332
|
await Promise.all(
|
|
344
333
|
scanResult.libDeps.filter((libName) => !this.loadedLibs.has(libName)).map(async (libName) => {
|
|
345
334
|
this.loadedLibs.add(libName);
|
|
346
|
-
|
|
335
|
+
const libExecutor = import_executors.LibExecutor.from(exec, libName);
|
|
336
|
+
this.libInfos.set(libName, await LibInfo.fromExecutor(libExecutor));
|
|
347
337
|
})
|
|
348
338
|
);
|
|
349
339
|
const libInfo = new LibInfo(exec, scanResult);
|
package/esm/src/capacitorApp.js
CHANGED
package/esm/src/executors.js
CHANGED
|
@@ -85,8 +85,8 @@ class Executor {
|
|
|
85
85
|
});
|
|
86
86
|
return new Promise((resolve, reject) => {
|
|
87
87
|
proc.on("exit", (code, signal) => {
|
|
88
|
-
if (
|
|
89
|
-
reject(
|
|
88
|
+
if (code !== 0 || signal)
|
|
89
|
+
reject(stdout);
|
|
90
90
|
else
|
|
91
91
|
resolve(stdout);
|
|
92
92
|
});
|
|
@@ -231,6 +231,10 @@ class Executor {
|
|
|
231
231
|
async cp(srcPath, destPath) {
|
|
232
232
|
const src = this.getPath(srcPath);
|
|
233
233
|
const dest = this.getPath(destPath);
|
|
234
|
+
if (!fs.existsSync(src))
|
|
235
|
+
return;
|
|
236
|
+
if (!fs.existsSync(dest))
|
|
237
|
+
await fsPromise.mkdir(dest, { recursive: true });
|
|
234
238
|
await fsPromise.cp(src, dest, { recursive: true });
|
|
235
239
|
}
|
|
236
240
|
log(msg) {
|
|
@@ -790,18 +794,23 @@ class AppExecutor extends SysExecutor {
|
|
|
790
794
|
fs.existsSync(projectPublicLibPath) && fsPromise.rm(projectPublicLibPath, { recursive: true }),
|
|
791
795
|
fs.existsSync(projectAssetsLibPath) && fsPromise.rm(projectAssetsLibPath, { recursive: true })
|
|
792
796
|
]);
|
|
793
|
-
const
|
|
797
|
+
const targetPublicDeps = libDeps.filter(
|
|
798
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`)
|
|
799
|
+
);
|
|
800
|
+
const targetAssetsDeps = libDeps.filter(
|
|
801
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`)
|
|
802
|
+
);
|
|
794
803
|
await Promise.all([
|
|
795
|
-
...
|
|
796
|
-
...
|
|
804
|
+
...targetPublicDeps.map((dep) => fsPromise.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
805
|
+
...targetAssetsDeps.map((dep) => fsPromise.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
797
806
|
]);
|
|
798
807
|
await Promise.all([
|
|
799
|
-
...
|
|
808
|
+
...targetPublicDeps.map(
|
|
800
809
|
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
801
810
|
recursive: true
|
|
802
811
|
})
|
|
803
812
|
),
|
|
804
|
-
...
|
|
813
|
+
...targetAssetsDeps.map(
|
|
805
814
|
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
806
815
|
recursive: true
|
|
807
816
|
})
|
package/esm/src/scanInfo.js
CHANGED
|
@@ -38,17 +38,6 @@ class ScanInfo {
|
|
|
38
38
|
{ all: /* @__PURE__ */ new Set(), databases: /* @__PURE__ */ new Set(), services: /* @__PURE__ */ new Set(), scalars: /* @__PURE__ */ new Set() }
|
|
39
39
|
])
|
|
40
40
|
);
|
|
41
|
-
constants = /* @__PURE__ */ new Set();
|
|
42
|
-
dictionaries = /* @__PURE__ */ new Set();
|
|
43
|
-
documents = /* @__PURE__ */ new Set();
|
|
44
|
-
services = /* @__PURE__ */ new Set();
|
|
45
|
-
signals = /* @__PURE__ */ new Set();
|
|
46
|
-
stores = /* @__PURE__ */ new Set();
|
|
47
|
-
templates = /* @__PURE__ */ new Set();
|
|
48
|
-
units = /* @__PURE__ */ new Set();
|
|
49
|
-
utils = /* @__PURE__ */ new Set();
|
|
50
|
-
views = /* @__PURE__ */ new Set();
|
|
51
|
-
zones = /* @__PURE__ */ new Set();
|
|
52
41
|
static async getScanResult(exec) {
|
|
53
42
|
const akanConfig = await exec.getConfig();
|
|
54
43
|
const tsconfig = exec.getTsConfig();
|
|
@@ -308,7 +297,8 @@ class LibInfo extends ScanInfo {
|
|
|
308
297
|
await Promise.all(
|
|
309
298
|
scanResult.libDeps.filter((libName) => !this.loadedLibs.has(libName)).map(async (libName) => {
|
|
310
299
|
this.loadedLibs.add(libName);
|
|
311
|
-
|
|
300
|
+
const libExecutor = LibExecutor.from(exec, libName);
|
|
301
|
+
this.libInfos.set(libName, await LibInfo.fromExecutor(libExecutor));
|
|
312
302
|
})
|
|
313
303
|
);
|
|
314
304
|
const libInfo = new LibInfo(exec, scanResult);
|
package/package.json
CHANGED
package/src/scanInfo.d.ts
CHANGED
|
@@ -14,17 +14,6 @@ declare class ScanInfo {
|
|
|
14
14
|
services: Set<string>;
|
|
15
15
|
scalars: Set<string>;
|
|
16
16
|
}; };
|
|
17
|
-
readonly constants: Set<string>;
|
|
18
|
-
readonly dictionaries: Set<string>;
|
|
19
|
-
readonly documents: Set<string>;
|
|
20
|
-
readonly services: Set<string>;
|
|
21
|
-
readonly signals: Set<string>;
|
|
22
|
-
readonly stores: Set<string>;
|
|
23
|
-
readonly templates: Set<string>;
|
|
24
|
-
readonly units: Set<string>;
|
|
25
|
-
readonly utils: Set<string>;
|
|
26
|
-
readonly views: Set<string>;
|
|
27
|
-
readonly zones: Set<string>;
|
|
28
17
|
static getScanResult(exec: AppExecutor | LibExecutor): Promise<LibScanResult>;
|
|
29
18
|
constructor(scanResult: ScanResult);
|
|
30
19
|
getScanResult(): ScanResult;
|