@akanjs/cli 3.0.0-alpha.104 → 3.0.0-alpha.106
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/.build-stamp +1 -1
- package/{application.command-xgphqs7k.js → application.command-pj2m7584.js} +1 -1
- package/{applicationBuildRunner-3d5q1yn7.js → applicationBuildRunner-kxwbssgn.js} +1 -1
- package/buildBatch.proc.js +1 -1
- package/{cloud.command-abgkk73f.js → cloud.command-gxqp8xdv.js} +3 -3
- package/{devTui-70cjjtaw.js → devTui-40ggmd99.js} +1 -1
- package/{devTuiView-71wnkjft.js → devTuiView-c08ccbat.js} +1 -1
- package/{index-4c9ykbfq.js → index-8few9nyh.js} +2 -2
- package/{index-0vh9rgxz.js → index-a64esmtb.js} +53 -8
- package/{index-yw4xj7pa.js → index-aj7tyh5w.js} +1 -1
- package/{index-yecdrt9a.js → index-v0qh106m.js} +2 -2
- package/index.js +4 -4
- package/{localRegistry.command-namg61k1.js → localRegistry.command-ts6t5e5a.js} +2 -2
- package/package.json +2 -2
- package/{workspace.command-kah5jgg5.js → workspace.command-aczjxzbf.js} +3 -3
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d572caaebb3bb178c92f97bde9129ff22271fd3f5589a69a12b9bb5c2faadb82
|
package/buildBatch.proc.js
CHANGED
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
} from "./index-mak3cd28.js";
|
|
10
10
|
import"./index-2tv3fdx4.js";
|
|
11
11
|
import"./index-6wwzs1bc.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-v0qh106m.js";
|
|
13
13
|
import"./index-259dsnz3.js";
|
|
14
14
|
import"./index-hwkygn9s.js";
|
|
15
15
|
import"./index-kcxmv48c.js";
|
|
16
16
|
import"./index-ws5e0j51.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-aj7tyh5w.js";
|
|
18
18
|
import {
|
|
19
19
|
CloudScript
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-8few9nyh.js";
|
|
21
21
|
import"./index-j9yhg404.js";
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// pkgs/@akanjs/cli/application/devTuiView.ts
|
|
3
3
|
var createDevTuiView = async (supervisor) => {
|
|
4
|
-
const { DevTui } = await import("./devTui-
|
|
4
|
+
const { DevTui } = await import("./devTui-40ggmd99.js");
|
|
5
5
|
return new DevTui(supervisor);
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
} from "./index-mak3cd28.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-v0qh106m.js";
|
|
16
16
|
import {
|
|
17
17
|
PackageScript
|
|
18
18
|
} from "./index-ws5e0j51.js";
|
|
19
19
|
import {
|
|
20
20
|
CloudRunner
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-aj7tyh5w.js";
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
24
24
|
import { Logger } from "akanjs/common";
|
|
@@ -1490,24 +1490,69 @@ class FontOptimizer {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
#extractFontsExport(source, filePath) {
|
|
1492
1492
|
const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
|
|
1493
|
-
const
|
|
1493
|
+
const declaration = this.#findFontsDeclaration(sourceFile);
|
|
1494
|
+
if (!declaration)
|
|
1495
|
+
return [];
|
|
1496
|
+
const value = this.#literalToValue(declaration);
|
|
1497
|
+
const entries = Array.isArray(value) ? value : [];
|
|
1498
|
+
const fonts = entries.filter((entry) => this.#isReadableFont(entry));
|
|
1499
|
+
if (fonts.length !== entries.length || !Array.isArray(value))
|
|
1500
|
+
this.#app.logger.warn(`[font] ${path10.relative(this.#app.cwdPath, filePath)} declares fonts the build cannot read without evaluating the module \u2014 write the list inline, or nothing is subset for it and every /_akan/fonts request 404s`);
|
|
1501
|
+
return fonts.map((font) => this.#withFontDefaults(font));
|
|
1502
|
+
}
|
|
1503
|
+
#isReadableFont(value) {
|
|
1504
|
+
if (!value || typeof value !== "object")
|
|
1505
|
+
return false;
|
|
1506
|
+
const font = value;
|
|
1507
|
+
return typeof font.name === "string" && Array.isArray(font.paths);
|
|
1508
|
+
}
|
|
1509
|
+
#findFontsDeclaration(sourceFile) {
|
|
1494
1510
|
for (const statement of sourceFile.statements) {
|
|
1511
|
+
if (ts.isExportAssignment(statement)) {
|
|
1512
|
+
if (statement.isExportEquals)
|
|
1513
|
+
continue;
|
|
1514
|
+
const stage = this.#findChainStageArgument(statement.expression, "fonts");
|
|
1515
|
+
if (stage)
|
|
1516
|
+
return stage;
|
|
1517
|
+
continue;
|
|
1518
|
+
}
|
|
1495
1519
|
if (!ts.isVariableStatement(statement))
|
|
1496
1520
|
continue;
|
|
1497
1521
|
const modifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined;
|
|
1498
|
-
|
|
1499
|
-
if (!isExported)
|
|
1522
|
+
if (!modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword))
|
|
1500
1523
|
continue;
|
|
1501
1524
|
for (const declaration of statement.declarationList.declarations) {
|
|
1502
1525
|
if (!ts.isIdentifier(declaration.name) || declaration.name.text !== "fonts")
|
|
1503
1526
|
continue;
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
fonts.push(...value.map((font) => this.#withFontDefaults(font)));
|
|
1507
|
-
}
|
|
1527
|
+
if (declaration.initializer)
|
|
1528
|
+
return declaration.initializer;
|
|
1508
1529
|
}
|
|
1509
1530
|
}
|
|
1510
|
-
return
|
|
1531
|
+
return null;
|
|
1532
|
+
}
|
|
1533
|
+
#findChainStageArgument(expression, stageName) {
|
|
1534
|
+
let node = this.#unwrapExpression(expression);
|
|
1535
|
+
let argument = null;
|
|
1536
|
+
while (node && ts.isCallExpression(node)) {
|
|
1537
|
+
const callee = this.#unwrapExpression(node.expression);
|
|
1538
|
+
if (!callee)
|
|
1539
|
+
return null;
|
|
1540
|
+
if (ts.isIdentifier(callee))
|
|
1541
|
+
return callee.text === "rootLayout" ? argument : null;
|
|
1542
|
+
if (!ts.isPropertyAccessExpression(callee))
|
|
1543
|
+
return null;
|
|
1544
|
+
if (callee.name.text === stageName)
|
|
1545
|
+
argument ??= node.arguments[0] ?? null;
|
|
1546
|
+
node = this.#unwrapExpression(callee.expression);
|
|
1547
|
+
}
|
|
1548
|
+
return null;
|
|
1549
|
+
}
|
|
1550
|
+
#unwrapExpression(expression) {
|
|
1551
|
+
let current = expression;
|
|
1552
|
+
while (current && (ts.isAsExpression(current) || ts.isSatisfiesExpression(current) || ts.isParenthesizedExpression(current))) {
|
|
1553
|
+
current = current.expression;
|
|
1554
|
+
}
|
|
1555
|
+
return current;
|
|
1511
1556
|
}
|
|
1512
1557
|
#literalToValue(node) {
|
|
1513
1558
|
if (ts.isStringLiteralLike(node))
|
|
@@ -2049,7 +2049,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
2049
2049
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
2050
2050
|
import { Logger as Logger4 } from "akanjs/common";
|
|
2051
2051
|
import ora from "ora";
|
|
2052
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
2052
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-kxwbssgn.js")).ApplicationBuildRunner;
|
|
2053
2053
|
var loadReleasePackager = async () => (await import("./applicationReleasePackager-4yasxwv9.js")).ApplicationReleasePackager;
|
|
2054
2054
|
var loadCapacitorApp = async () => (await import("./capacitorApp-36rbr858.js")).CapacitorApp;
|
|
2055
2055
|
var loadAbstractCompactor = async () => (await import("./abstractCompactor-mjh5ppsq.js")).AbstractCompactor;
|
|
@@ -3283,7 +3283,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3283
3283
|
throw new Error("No app selected to start");
|
|
3284
3284
|
const startedDatabase = dbup ? await this.#prepareSharedDatabase(apps) : false;
|
|
3285
3285
|
const supervisor = new DevSupervisor({ apps, mode, concurrency, open, write });
|
|
3286
|
-
const view = mode === "tui" ? await (await import("./devTuiView-
|
|
3286
|
+
const view = mode === "tui" ? await (await import("./devTuiView-c08ccbat.js")).createDevTuiView(supervisor) : new DevStreamView(apps.map((app) => app.name));
|
|
3287
3287
|
await supervisor.run(view);
|
|
3288
3288
|
if (startedDatabase)
|
|
3289
3289
|
await this.#stopDatabase(workspace);
|
package/index.js
CHANGED
|
@@ -14,16 +14,16 @@ import path from "path";
|
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
16
16
|
var commandModules = {
|
|
17
|
-
workspace: async () => (await import("./workspace.command-
|
|
17
|
+
workspace: async () => (await import("./workspace.command-aczjxzbf.js")).WorkspaceCommand,
|
|
18
18
|
agent: async () => (await import("./agent.command-d2gfxfck.js")).AgentCommand,
|
|
19
|
-
application: async () => (await import("./application.command-
|
|
19
|
+
application: async () => (await import("./application.command-pj2m7584.js")).ApplicationCommand,
|
|
20
20
|
library: async () => (await import("./library.command-nbsky672.js")).LibraryCommand,
|
|
21
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
21
|
+
localRegistry: async () => (await import("./localRegistry.command-ts6t5e5a.js")).LocalRegistryCommand,
|
|
22
22
|
package: async () => (await import("./package.command-axv0abmn.js")).PackageCommand,
|
|
23
23
|
module: async () => (await import("./module.command-29vqzrh8.js")).ModuleCommand,
|
|
24
24
|
page: async () => (await import("./page.command-vs9s3zrh.js")).PageCommand,
|
|
25
25
|
context: async () => (await import("./context.command-ez8a0zyz.js")).ContextCommand,
|
|
26
|
-
cloud: async () => (await import("./cloud.command-
|
|
26
|
+
cloud: async () => (await import("./cloud.command-gxqp8xdv.js")).CloudCommand,
|
|
27
27
|
subspace: async () => (await import("./subspace.command-35a3t6vv.js")).SubspaceCommand,
|
|
28
28
|
guideline: async () => (await import("./guideline.command-xmqwx8zm.js")).GuidelineCommand,
|
|
29
29
|
scalar: async () => (await import("./scalar.command-6k1vhe9s.js")).ScalarCommand,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
import"./index-6wwzs1bc.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-v0qh106m.js";
|
|
16
16
|
import"./index-259dsnz3.js";
|
|
17
17
|
import"./index-hwkygn9s.js";
|
|
18
18
|
import"./index-kn1h7p1x.js";
|
|
19
19
|
import {
|
|
20
20
|
getNpmRegistryUrl,
|
|
21
21
|
CloudRunner
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-aj7tyh5w.js";
|
|
23
23
|
import"./index-kcxmv48c.js";
|
|
24
24
|
import {
|
|
25
25
|
PackageScript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.106",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@langchain/openai": "^1.4.6",
|
|
34
34
|
"@tailwindcss/node": "^4.3.0",
|
|
35
35
|
"@trapezedev/project": "^7.1.4",
|
|
36
|
-
"akanjs": "3.0.0-alpha.
|
|
36
|
+
"akanjs": "3.0.0-alpha.106",
|
|
37
37
|
"chalk": "^5.6.2",
|
|
38
38
|
"commander": "^14.0.3",
|
|
39
39
|
"dayjs": "^1.11.20",
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./index-ne2qy0nk.js";
|
|
41
41
|
import {
|
|
42
42
|
ApplicationScript
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-v0qh106m.js";
|
|
44
44
|
import {
|
|
45
45
|
LibraryScript
|
|
46
46
|
} from "./index-259dsnz3.js";
|
|
@@ -52,10 +52,10 @@ import {
|
|
|
52
52
|
import {
|
|
53
53
|
getNpmRegistryUrl,
|
|
54
54
|
getLatestPackageVersion
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-aj7tyh5w.js";
|
|
56
56
|
import {
|
|
57
57
|
CloudScript
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-8few9nyh.js";
|
|
59
59
|
import {
|
|
60
60
|
ContextScript
|
|
61
61
|
} from "./index-600zhnve.js";
|