@akanjs/devkit 0.0.87 → 0.0.88
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 +1 -1
- package/src/executors.cjs +16 -4
- package/src/executors.d.ts +1 -1
- package/src/executors.js +16 -4
package/package.json
CHANGED
package/src/executors.cjs
CHANGED
|
@@ -278,7 +278,7 @@ class WorkspaceExecutor extends Executor {
|
|
|
278
278
|
const env = process.env.NEXT_PUBLIC_ENV ?? envFile.NEXT_PUBLIC_ENV ?? "debug";
|
|
279
279
|
if (!env)
|
|
280
280
|
throw new Error("NEXT_PUBLIC_ENV is not set");
|
|
281
|
-
return { ...appName ? { appName } : {}, repoName, serveDomain, env };
|
|
281
|
+
return { ...appName ? { name: appName } : {}, repoName, serveDomain, env };
|
|
282
282
|
}
|
|
283
283
|
async scan() {
|
|
284
284
|
const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
|
|
@@ -382,7 +382,7 @@ class SysExecutor extends Executor {
|
|
|
382
382
|
this.type = type;
|
|
383
383
|
}
|
|
384
384
|
async getConfig(command) {
|
|
385
|
-
return this.type === "app" ? await (0, import_config.getAppConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(),
|
|
385
|
+
return this.type === "app" ? await (0, import_config.getAppConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "app", name: this.name, command }) : await (0, import_config.getLibConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "lib", name: this.name, command });
|
|
386
386
|
}
|
|
387
387
|
async scan({
|
|
388
388
|
tsconfig = this.getTsConfig(`${this.cwdPath}/tsconfig.json`),
|
|
@@ -498,6 +498,8 @@ class SysExecutor extends Executor {
|
|
|
498
498
|
const scanResult = {
|
|
499
499
|
name: this.name,
|
|
500
500
|
type: this.type,
|
|
501
|
+
repoName: this.workspace.repoName,
|
|
502
|
+
serveDomain: this.workspace.getBaseDevEnv().serveDomain,
|
|
501
503
|
akanConfig,
|
|
502
504
|
files,
|
|
503
505
|
libDeps,
|
|
@@ -580,7 +582,12 @@ class AppExecutor extends SysExecutor {
|
|
|
580
582
|
return new AppExecutor({ workspace: executor.workspace, name });
|
|
581
583
|
}
|
|
582
584
|
async getConfig(command) {
|
|
583
|
-
return await (0, import_config.getAppConfig)(this.cwdPath, {
|
|
585
|
+
return await (0, import_config.getAppConfig)(this.cwdPath, {
|
|
586
|
+
...this.workspace.getBaseDevEnv(),
|
|
587
|
+
type: "app",
|
|
588
|
+
name: this.name,
|
|
589
|
+
command
|
|
590
|
+
});
|
|
584
591
|
}
|
|
585
592
|
async syncAssets(libDeps) {
|
|
586
593
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
@@ -621,7 +628,12 @@ class LibExecutor extends SysExecutor {
|
|
|
621
628
|
return new LibExecutor({ workspace: executor.workspace, name });
|
|
622
629
|
}
|
|
623
630
|
async getConfig(command) {
|
|
624
|
-
return await (0, import_config.getLibConfig)(this.cwdPath, {
|
|
631
|
+
return await (0, import_config.getLibConfig)(this.cwdPath, {
|
|
632
|
+
...this.workspace.getBaseDevEnv(),
|
|
633
|
+
type: "lib",
|
|
634
|
+
name: this.name,
|
|
635
|
+
command
|
|
636
|
+
});
|
|
625
637
|
}
|
|
626
638
|
}
|
|
627
639
|
class DistLibExecutor extends Executor {
|
package/src/executors.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare class WorkspaceExecutor extends Executor {
|
|
|
53
53
|
repoName: string;
|
|
54
54
|
serveDomain: string;
|
|
55
55
|
env: "debug" | "testing" | "develop" | "main";
|
|
56
|
-
|
|
56
|
+
name?: string | undefined;
|
|
57
57
|
};
|
|
58
58
|
scan(): Promise<WorkspaceScanResult>;
|
|
59
59
|
getApps(): Promise<string[]>;
|
package/src/executors.js
CHANGED
|
@@ -242,7 +242,7 @@ class WorkspaceExecutor extends Executor {
|
|
|
242
242
|
const env = process.env.NEXT_PUBLIC_ENV ?? envFile.NEXT_PUBLIC_ENV ?? "debug";
|
|
243
243
|
if (!env)
|
|
244
244
|
throw new Error("NEXT_PUBLIC_ENV is not set");
|
|
245
|
-
return { ...appName ? { appName } : {}, repoName, serveDomain, env };
|
|
245
|
+
return { ...appName ? { name: appName } : {}, repoName, serveDomain, env };
|
|
246
246
|
}
|
|
247
247
|
async scan() {
|
|
248
248
|
const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
|
|
@@ -346,7 +346,7 @@ class SysExecutor extends Executor {
|
|
|
346
346
|
this.type = type;
|
|
347
347
|
}
|
|
348
348
|
async getConfig(command) {
|
|
349
|
-
return this.type === "app" ? await getAppConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(),
|
|
349
|
+
return this.type === "app" ? await getAppConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "app", name: this.name, command }) : await getLibConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "lib", name: this.name, command });
|
|
350
350
|
}
|
|
351
351
|
async scan({
|
|
352
352
|
tsconfig = this.getTsConfig(`${this.cwdPath}/tsconfig.json`),
|
|
@@ -462,6 +462,8 @@ class SysExecutor extends Executor {
|
|
|
462
462
|
const scanResult = {
|
|
463
463
|
name: this.name,
|
|
464
464
|
type: this.type,
|
|
465
|
+
repoName: this.workspace.repoName,
|
|
466
|
+
serveDomain: this.workspace.getBaseDevEnv().serveDomain,
|
|
465
467
|
akanConfig,
|
|
466
468
|
files,
|
|
467
469
|
libDeps,
|
|
@@ -544,7 +546,12 @@ class AppExecutor extends SysExecutor {
|
|
|
544
546
|
return new AppExecutor({ workspace: executor.workspace, name });
|
|
545
547
|
}
|
|
546
548
|
async getConfig(command) {
|
|
547
|
-
return await getAppConfig(this.cwdPath, {
|
|
549
|
+
return await getAppConfig(this.cwdPath, {
|
|
550
|
+
...this.workspace.getBaseDevEnv(),
|
|
551
|
+
type: "app",
|
|
552
|
+
name: this.name,
|
|
553
|
+
command
|
|
554
|
+
});
|
|
548
555
|
}
|
|
549
556
|
async syncAssets(libDeps) {
|
|
550
557
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
@@ -585,7 +592,12 @@ class LibExecutor extends SysExecutor {
|
|
|
585
592
|
return new LibExecutor({ workspace: executor.workspace, name });
|
|
586
593
|
}
|
|
587
594
|
async getConfig(command) {
|
|
588
|
-
return await getLibConfig(this.cwdPath, {
|
|
595
|
+
return await getLibConfig(this.cwdPath, {
|
|
596
|
+
...this.workspace.getBaseDevEnv(),
|
|
597
|
+
type: "lib",
|
|
598
|
+
name: this.name,
|
|
599
|
+
command
|
|
600
|
+
});
|
|
589
601
|
}
|
|
590
602
|
}
|
|
591
603
|
class DistLibExecutor extends Executor {
|