@akanjs/devkit 0.9.8 → 0.9.9
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/executors.js +18 -7
- package/esm/src/executors.js +18 -7
- package/package.json +1 -1
- package/src/executors.d.ts +2 -2
package/cjs/src/executors.js
CHANGED
|
@@ -848,17 +848,28 @@ class AppExecutor extends SysExecutor {
|
|
|
848
848
|
}
|
|
849
849
|
async syncAssets(libDeps) {
|
|
850
850
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
852
|
+
await Promise.all([
|
|
853
|
+
import_fs.default.existsSync(projectPublicLibPath) && import_promises.default.rm(projectPublicLibPath, { recursive: true }),
|
|
854
|
+
import_fs.default.existsSync(projectAssetsLibPath) && import_promises.default.rm(projectAssetsLibPath, { recursive: true })
|
|
855
|
+
]);
|
|
853
856
|
const targetDeps = libDeps.filter((dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
854
|
-
await Promise.all(
|
|
855
|
-
|
|
856
|
-
targetDeps.map(
|
|
857
|
-
|
|
857
|
+
await Promise.all([
|
|
858
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
859
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
860
|
+
]);
|
|
861
|
+
await Promise.all([
|
|
862
|
+
...targetDeps.map(
|
|
863
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
864
|
+
recursive: true
|
|
865
|
+
})
|
|
866
|
+
),
|
|
867
|
+
...targetDeps.map(
|
|
868
|
+
(dep) => import_fs.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
858
869
|
recursive: true
|
|
859
870
|
})
|
|
860
871
|
)
|
|
861
|
-
);
|
|
872
|
+
]);
|
|
862
873
|
}
|
|
863
874
|
}
|
|
864
875
|
class LibExecutor extends SysExecutor {
|
package/esm/src/executors.js
CHANGED
|
@@ -813,17 +813,28 @@ class AppExecutor extends SysExecutor {
|
|
|
813
813
|
}
|
|
814
814
|
async syncAssets(libDeps) {
|
|
815
815
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
816
|
-
|
|
817
|
-
|
|
816
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
817
|
+
await Promise.all([
|
|
818
|
+
fs.existsSync(projectPublicLibPath) && fsPromise.rm(projectPublicLibPath, { recursive: true }),
|
|
819
|
+
fs.existsSync(projectAssetsLibPath) && fsPromise.rm(projectAssetsLibPath, { recursive: true })
|
|
820
|
+
]);
|
|
818
821
|
const targetDeps = libDeps.filter((dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
819
|
-
await Promise.all(
|
|
820
|
-
|
|
821
|
-
targetDeps.map(
|
|
822
|
-
|
|
822
|
+
await Promise.all([
|
|
823
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
824
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
825
|
+
]);
|
|
826
|
+
await Promise.all([
|
|
827
|
+
...targetDeps.map(
|
|
828
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
829
|
+
recursive: true
|
|
830
|
+
})
|
|
831
|
+
),
|
|
832
|
+
...targetDeps.map(
|
|
833
|
+
(dep) => fs.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
823
834
|
recursive: true
|
|
824
835
|
})
|
|
825
836
|
)
|
|
826
|
-
);
|
|
837
|
+
]);
|
|
827
838
|
}
|
|
828
839
|
}
|
|
829
840
|
class LibExecutor extends SysExecutor {
|
package/package.json
CHANGED
package/src/executors.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export declare class WorkspaceExecutor extends Executor {
|
|
|
102
102
|
getBaseDevEnv(): {
|
|
103
103
|
repoName: string;
|
|
104
104
|
serveDomain: string;
|
|
105
|
-
env: "
|
|
105
|
+
env: "testing" | "local" | "debug" | "develop" | "main";
|
|
106
106
|
name?: string | undefined;
|
|
107
107
|
};
|
|
108
108
|
scan(): Promise<WorkspaceScanResult>;
|
|
@@ -215,7 +215,7 @@ export declare class AppExecutor extends SysExecutor {
|
|
|
215
215
|
emoji: string;
|
|
216
216
|
constructor({ workspace, name }: AppExecutorOptions);
|
|
217
217
|
static from(executor: SysExecutor | WorkspaceExecutor, name: string): AppExecutor;
|
|
218
|
-
getEnv(): "
|
|
218
|
+
getEnv(): "testing" | "local" | "debug" | "develop" | "main";
|
|
219
219
|
getConfig(command?: string): Promise<AppConfigResult>;
|
|
220
220
|
syncAssets(libDeps: string[]): Promise<void>;
|
|
221
221
|
}
|