@akanjs/cli 0.0.128 → 0.0.130
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/index.js
CHANGED
|
@@ -1182,9 +1182,13 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
|
|
|
1182
1182
|
};
|
|
1183
1183
|
}
|
|
1184
1184
|
async getApps() {
|
|
1185
|
+
if (!import_fs4.default.existsSync(`${this.workspaceRoot}/apps`))
|
|
1186
|
+
return [];
|
|
1185
1187
|
return await this.#getDirHasFile(`${this.workspaceRoot}/apps`, "akan.config.ts");
|
|
1186
1188
|
}
|
|
1187
1189
|
async getLibs() {
|
|
1190
|
+
if (!import_fs4.default.existsSync(`${this.workspaceRoot}/libs`))
|
|
1191
|
+
return [];
|
|
1188
1192
|
return await this.#getDirHasFile(`${this.workspaceRoot}/libs`, "akan.config.ts");
|
|
1189
1193
|
}
|
|
1190
1194
|
async getSyss() {
|
|
@@ -1192,6 +1196,8 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
|
|
|
1192
1196
|
return [appNames, libNames];
|
|
1193
1197
|
}
|
|
1194
1198
|
async getPkgs() {
|
|
1199
|
+
if (!import_fs4.default.existsSync(`${this.workspaceRoot}/pkgs`))
|
|
1200
|
+
return [];
|
|
1195
1201
|
return await this.#getDirHasFile(`${this.workspaceRoot}/pkgs`, "package.json");
|
|
1196
1202
|
}
|
|
1197
1203
|
async getExecs() {
|
|
@@ -2462,11 +2468,8 @@ var LibraryScript = class {
|
|
|
2462
2468
|
lib.logger.rawLog(JSON.stringify(scanResult, null, 2));
|
|
2463
2469
|
return scanResult;
|
|
2464
2470
|
}
|
|
2465
|
-
async syncLibrary(lib
|
|
2471
|
+
async syncLibrary(lib) {
|
|
2466
2472
|
const akanConfig = await lib.getConfig();
|
|
2467
|
-
if (recursive)
|
|
2468
|
-
for (const libName of akanConfig.libs)
|
|
2469
|
-
await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
|
|
2470
2473
|
return await lib.scan({ akanConfig });
|
|
2471
2474
|
}
|
|
2472
2475
|
async createLibrary(libName, workspace) {
|
|
@@ -5158,12 +5161,10 @@ var ApplicationScript = class {
|
|
|
5158
5161
|
app.logger.rawLog(JSON.stringify(scanResult, null, 2));
|
|
5159
5162
|
return scanResult;
|
|
5160
5163
|
}
|
|
5161
|
-
async syncApplication(app
|
|
5164
|
+
async syncApplication(app) {
|
|
5162
5165
|
const akanConfig = await this.#runner.getConfig(app);
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
|
|
5166
|
-
return await this.#runner.scanSync(app, akanConfig);
|
|
5166
|
+
const scanResult = await this.#runner.scanSync(app, akanConfig);
|
|
5167
|
+
return scanResult;
|
|
5167
5168
|
}
|
|
5168
5169
|
async build(app) {
|
|
5169
5170
|
await this.syncApplication(app);
|
|
@@ -26,7 +26,7 @@ function getContent(scanResult, dict = {}) {
|
|
|
26
26
|
if (!scanResult)
|
|
27
27
|
return null;
|
|
28
28
|
const libs = scanResult.akanConfig.libs;
|
|
29
|
-
console.log(scanResult
|
|
29
|
+
console.log(scanResult);
|
|
30
30
|
const userLibs = scanResult.akanConfig.libs.filter(
|
|
31
31
|
(libName) => scanResult.libs[libName].files.constants.databases.includes("user")
|
|
32
32
|
);
|
package/esm/index.js
CHANGED
|
@@ -1169,9 +1169,13 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
|
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
1171
|
async getApps() {
|
|
1172
|
+
if (!fs6.existsSync(`${this.workspaceRoot}/apps`))
|
|
1173
|
+
return [];
|
|
1172
1174
|
return await this.#getDirHasFile(`${this.workspaceRoot}/apps`, "akan.config.ts");
|
|
1173
1175
|
}
|
|
1174
1176
|
async getLibs() {
|
|
1177
|
+
if (!fs6.existsSync(`${this.workspaceRoot}/libs`))
|
|
1178
|
+
return [];
|
|
1175
1179
|
return await this.#getDirHasFile(`${this.workspaceRoot}/libs`, "akan.config.ts");
|
|
1176
1180
|
}
|
|
1177
1181
|
async getSyss() {
|
|
@@ -1179,6 +1183,8 @@ var WorkspaceExecutor = class _WorkspaceExecutor extends Executor {
|
|
|
1179
1183
|
return [appNames, libNames];
|
|
1180
1184
|
}
|
|
1181
1185
|
async getPkgs() {
|
|
1186
|
+
if (!fs6.existsSync(`${this.workspaceRoot}/pkgs`))
|
|
1187
|
+
return [];
|
|
1182
1188
|
return await this.#getDirHasFile(`${this.workspaceRoot}/pkgs`, "package.json");
|
|
1183
1189
|
}
|
|
1184
1190
|
async getExecs() {
|
|
@@ -2449,11 +2455,8 @@ var LibraryScript = class {
|
|
|
2449
2455
|
lib.logger.rawLog(JSON.stringify(scanResult, null, 2));
|
|
2450
2456
|
return scanResult;
|
|
2451
2457
|
}
|
|
2452
|
-
async syncLibrary(lib
|
|
2458
|
+
async syncLibrary(lib) {
|
|
2453
2459
|
const akanConfig = await lib.getConfig();
|
|
2454
|
-
if (recursive)
|
|
2455
|
-
for (const libName of akanConfig.libs)
|
|
2456
|
-
await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
|
|
2457
2460
|
return await lib.scan({ akanConfig });
|
|
2458
2461
|
}
|
|
2459
2462
|
async createLibrary(libName, workspace) {
|
|
@@ -5145,12 +5148,10 @@ var ApplicationScript = class {
|
|
|
5145
5148
|
app.logger.rawLog(JSON.stringify(scanResult, null, 2));
|
|
5146
5149
|
return scanResult;
|
|
5147
5150
|
}
|
|
5148
|
-
async syncApplication(app
|
|
5151
|
+
async syncApplication(app) {
|
|
5149
5152
|
const akanConfig = await this.#runner.getConfig(app);
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
|
|
5153
|
-
return await this.#runner.scanSync(app, akanConfig);
|
|
5153
|
+
const scanResult = await this.#runner.scanSync(app, akanConfig);
|
|
5154
|
+
return scanResult;
|
|
5154
5155
|
}
|
|
5155
5156
|
async build(app) {
|
|
5156
5157
|
await this.syncApplication(app);
|
|
@@ -3,7 +3,7 @@ function getContent(scanResult, dict = {}) {
|
|
|
3
3
|
if (!scanResult)
|
|
4
4
|
return null;
|
|
5
5
|
const libs = scanResult.akanConfig.libs;
|
|
6
|
-
console.log(scanResult
|
|
6
|
+
console.log(scanResult);
|
|
7
7
|
const userLibs = scanResult.akanConfig.libs.filter(
|
|
8
8
|
(libName) => scanResult.libs[libName].files.constants.databases.includes("user")
|
|
9
9
|
);
|
package/package.json
CHANGED
|
@@ -9,9 +9,7 @@ export declare class ApplicationScript {
|
|
|
9
9
|
}): Promise<void>;
|
|
10
10
|
removeApplication(app: App): Promise<void>;
|
|
11
11
|
scanApplication(app: App, verbose?: boolean): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
12
|
-
syncApplication(app: App
|
|
13
|
-
recursive?: boolean;
|
|
14
|
-
}): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
12
|
+
syncApplication(app: App): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
15
13
|
build(app: App): Promise<void>;
|
|
16
14
|
start(app: App, { open }?: {
|
|
17
15
|
open?: boolean;
|
|
@@ -2,9 +2,7 @@ import type { Lib, Workspace } from "@akanjs/devkit";
|
|
|
2
2
|
export declare class LibraryScript {
|
|
3
3
|
#private;
|
|
4
4
|
scanLibrary(lib: Lib, verbose?: boolean): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
5
|
-
syncLibrary(lib: Lib
|
|
6
|
-
recursive?: boolean;
|
|
7
|
-
}): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
5
|
+
syncLibrary(lib: Lib): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
|
|
8
6
|
createLibrary(libName: string, workspace: Workspace): Promise<void>;
|
|
9
7
|
removeLibrary(lib: Lib): Promise<void>;
|
|
10
8
|
installLibrary(workspace: Workspace, libName: string): Promise<void>;
|