@akanjs/cli 3.2.0-rc.11 → 3.2.0-rc.13
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 +2 -2
- package/{CodeAgent-fk66n37w.js → CodeAgent-yd1f54yf.js} +2 -2
- package/{CodeTui-4rf1mqmv.js → CodeTui-h7mksphk.js} +1 -1
- package/TunnelShare-hrjed2jf.js +19 -0
- package/{agent.command-7g9czkkd.js → agent.command-hrc2dfas.js} +19 -15
- package/akanCode.js +2 -2
- package/appExecutor-0ssszyhf.js +11 -0
- package/{application.command-00spg55s.js → application.command-b2194cpv.js} +15 -11
- package/{applicationBuildRunner-f4yf0qyc.js → applicationBuildRunner-gg03kydg.js} +12 -8
- package/buildBatch.proc.js +14 -9
- package/{cloud.command-ab704p0g.js → cloud.command-d8ps1564.js} +20 -16
- package/cloud.script-7j7w4m0w.js +35 -0
- package/{code.command-m6c9xk56.js → code.command-6h6jr0s7.js} +10 -6
- package/{context.command-hgcgxtdk.js → context.command-t8akxhny.js} +20 -16
- package/context.runner-eawk1n8e.js +34 -0
- package/{guideline.command-6yz6d4hf.js → guideline.command-f41b5nv5.js} +6 -2
- package/guidelines/agentRule/agentRule.instruction.md +12 -2
- package/guidelines/akanApi/akanApi.instruction.md +1 -1
- package/guidelines/errorCodes/errorCodes.instruction.md +3 -0
- package/guidelines/pageRule/pageRule.instruction.md +6 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +2 -1
- package/incrementalBuilder.proc.js +12 -7
- package/{index-c3r23w24.js → index-1b1p83vq.js} +3 -3
- package/index-1jzdengt.js +30 -0
- package/{index-aybfcx58.js → index-2z8mxgs7.js} +6 -6
- package/{index-t8h09yjs.js → index-37k5vshx.js} +10 -8
- package/{index-frvjq1rd.js → index-3fbmyb2r.js} +1 -1
- package/{index-6qtxs86x.js → index-3fn13v8p.js} +4 -4
- package/{index-6eptmk8z.js → index-3fpv5v0t.js} +15 -11
- package/{index-23d8gw08.js → index-3gmskeq2.js} +37 -29
- package/{index-bper31wr.js → index-5np8zpep.js} +12 -8
- package/{index-41mfhgq0.js → index-66jt3m30.js} +1 -1
- package/{index-097bjwvm.js → index-6dwk5aej.js} +8 -8
- package/{index-849qvd7t.js → index-71z3pdsn.js} +4 -4
- package/{index-p54s83sz.js → index-8bkbexcy.js} +1 -1
- package/{index-bxkx0x03.js → index-8rmg8c0y.js} +3 -3
- package/{index-6z57w95f.js → index-9w51aevd.js} +1 -1
- package/{index-5jwx4bf2.js → index-9yfssbgg.js} +25 -19
- package/{index-adj7qmz9.js → index-asfx2dhe.js} +13 -9
- package/index-b3h37zk3.js +787 -0
- package/{index-xfv2p7b5.js → index-bb7cm060.js} +10 -10
- package/{index-p4htjyvk.js → index-c0rnjeqn.js} +11 -9
- package/{index-apcr1qgk.js → index-c4k6e098.js} +19 -15
- package/{index-sq9d0jhj.js → index-crtscw7c.js} +2710 -3615
- package/{index-xy70tcv4.js → index-e599a0e4.js} +1 -1
- package/{index-6fnrhpn1.js → index-f5j09jnj.js} +5 -5
- package/{index-dsg50er9.js → index-g2ebpf0y.js} +6 -6
- package/{index-hf9nvwam.js → index-hbc0t3ng.js} +2 -2
- package/{index-hhagjhkh.js → index-hg8s6nae.js} +9 -9
- package/{index-b3pr4ee6.js → index-hpe12v1h.js} +1 -1
- package/{index-dfsa009c.js → index-j2me5hm4.js} +8 -6
- package/{index-e5f6czck.js → index-j33b0n38.js} +1 -1
- package/{index-4k9nv4m3.js → index-k081wv4r.js} +1428 -1106
- package/{index-rdx8cyv2.js → index-nx4q5rey.js} +3 -3
- package/index-rx8r0cbe.js +18 -0
- package/{index-k2r3hmbz.js → index-vb8gd135.js} +21 -15
- package/{index-z43wddce.js → index-vy50ec2q.js} +2 -2
- package/index-x2bj2vyz.js +127 -0
- package/{index-9xh4zvw3.js → index-xb1yh9km.js} +21 -11
- package/{index-7ky4brfy.js → index-xjj0h74q.js} +2 -2
- package/index.js +27 -23
- package/libExecutor-ex8jqksz.js +10 -0
- package/{library.command-kc1zahcg.js → library.command-a9p5yg4k.js} +7 -3
- package/{localRegistry.command-bz2df40m.js → localRegistry.command-zz64k5vy.js} +23 -18
- package/{module.command-cchwzz9r.js → module.command-1ht6dmxg.js} +9 -5
- package/{package.command-qcjajpv8.js → package.command-eabq20aq.js} +8 -4
- package/package.json +2 -2
- package/{page.command-1t86dx8a.js → page.command-xhmzmvjn.js} +7 -3
- package/{pipeline.command-2xx9z3d0.js → pipeline.command-wsbg3fpr.js} +11 -6
- package/pkgExecutor-d16x1xcb.js +10 -0
- package/{primitive.command-mc0x8txr.js → primitive.command-yyxtfhvq.js} +10 -6
- package/{projectTypecheck-tz497yx7.js → projectTypecheck-wcrt7sae.js} +1 -1
- package/{quality.command-11rayf5c.js → quality.command-n7hmt628.js} +16 -10
- package/{repair.command-8w41vy78.js → repair.command-pczdq4mv.js} +9 -5
- package/{scalar.command-rvwh98ny.js → scalar.command-cw3d32sv.js} +8 -4
- package/{subspace.command-0970n7kd.js → subspace.command-d8t8geyv.js} +17 -12
- package/templates/lib/sig.ts +0 -4
- package/templates/lib/useClient.ts +1 -1
- package/{tunnel.command-bcy0rtmh.js → tunnel.command-mhm64m9n.js} +15 -11
- package/{verify.command-ynaztxr2.js → verify.command-j4he0fbx.js} +16 -12
- package/{workflow.command-yp9ajthb.js → workflow.command-k064waza.js} +14 -10
- package/{workspace.command-e4wfxm86.js → workspace.command-pkpawft5.js} +47 -41
- package/TunnelShare-44er4e29.js +0 -15
- package/cloud.script-4p4y0s7e.js +0 -31
- package/context.runner-w071gmc3.js +0 -30
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SOURCE_EXTS,
|
|
7
7
|
WatchRootResolver
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-66jt3m30.js";
|
|
9
9
|
import {
|
|
10
10
|
loaderFor,
|
|
11
11
|
BarrelAnalyzer,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
CsrDevPaths,
|
|
22
22
|
PagesEntrySourceGenerator,
|
|
23
23
|
PagesBundleBuilder
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-xb1yh9km.js";
|
|
25
25
|
import {
|
|
26
26
|
AsyncDefaultExportDetector,
|
|
27
27
|
StoreBootstrap,
|
|
28
28
|
resolveSsrPageEntriesForApp
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-b3h37zk3.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
|
|
32
32
|
import { readdir, readFile, stat } from "fs/promises";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
execEmoji,
|
|
4
|
+
Executor
|
|
5
|
+
} from "./index-crtscw7c.js";
|
|
6
|
+
// pkgs/@akanjs/devkit/executors/moduleExecutor.ts
|
|
7
|
+
class ModuleExecutor extends Executor {
|
|
8
|
+
sys;
|
|
9
|
+
emoji = execEmoji.module;
|
|
10
|
+
constructor({ sys, name }) {
|
|
11
|
+
super(name, `${sys.workspace.workspaceRoot}/${sys.type}s/${sys.name}/lib/${name}`);
|
|
12
|
+
this.sys = sys;
|
|
13
|
+
}
|
|
14
|
+
static from(sysExecutor, name) {
|
|
15
|
+
return new ModuleExecutor({ sys: sysExecutor, name });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export { ModuleExecutor };
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ApplicationBuildReporter
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-66jt3m30.js";
|
|
5
5
|
import {
|
|
6
6
|
parseBiomeReport,
|
|
7
7
|
Linter,
|
|
8
|
-
ProjectTypecheck2
|
|
9
|
-
|
|
10
|
-
LibExecutor,
|
|
11
|
-
PkgExecutor
|
|
12
|
-
} from "./index-sq9d0jhj.js";
|
|
8
|
+
ProjectTypecheck2
|
|
9
|
+
} from "./index-crtscw7c.js";
|
|
13
10
|
import {
|
|
14
11
|
TypecheckFailure
|
|
15
12
|
} from "./index-j4yvgfhr.js";
|
|
13
|
+
import {
|
|
14
|
+
AppExecutor2
|
|
15
|
+
} from "./index-b3h37zk3.js";
|
|
16
|
+
import {
|
|
17
|
+
LibExecutor2
|
|
18
|
+
} from "./index-1jzdengt.js";
|
|
19
|
+
import {
|
|
20
|
+
PkgExecutor2
|
|
21
|
+
} from "./index-x2bj2vyz.js";
|
|
16
22
|
import {
|
|
17
23
|
WorkspaceRunner,
|
|
18
24
|
AkanQualityScanner
|
|
19
|
-
} from "./index-
|
|
25
|
+
} from "./index-c4k6e098.js";
|
|
20
26
|
|
|
21
27
|
// pkgs/@akanjs/cli/verify/verifyComments.ts
|
|
22
28
|
import { existsSync } from "fs";
|
|
@@ -629,9 +635,9 @@ class VerifyPipeline {
|
|
|
629
635
|
}
|
|
630
636
|
async#sync(target) {
|
|
631
637
|
if (target.type === "app")
|
|
632
|
-
await
|
|
638
|
+
await AppExecutor2.from(this.#workspace, target.name).scanSync();
|
|
633
639
|
else
|
|
634
|
-
await
|
|
640
|
+
await LibExecutor2.from(this.#workspace, target.name).scan();
|
|
635
641
|
return { diagnostics: [] };
|
|
636
642
|
}
|
|
637
643
|
async#lint(target, { comments, rewritten }) {
|
|
@@ -696,12 +702,12 @@ class VerifyPipeline {
|
|
|
696
702
|
async#typecheck(target) {
|
|
697
703
|
try {
|
|
698
704
|
if (target.type === "app")
|
|
699
|
-
await this.#applicationRunner.typecheck(
|
|
705
|
+
await this.#applicationRunner.typecheck(AppExecutor2.from(this.#workspace, target.name), {
|
|
700
706
|
tests: true,
|
|
701
707
|
report: "records"
|
|
702
708
|
});
|
|
703
709
|
else if (target.type === "lib")
|
|
704
|
-
await this.#applicationRunner.typecheckLibrary(
|
|
710
|
+
await this.#applicationRunner.typecheckLibrary(LibExecutor2.from(this.#workspace, target.name), {
|
|
705
711
|
tests: true,
|
|
706
712
|
report: "records"
|
|
707
713
|
});
|
|
@@ -719,7 +725,7 @@ class VerifyPipeline {
|
|
|
719
725
|
}
|
|
720
726
|
}
|
|
721
727
|
async#build(target) {
|
|
722
|
-
const { routeJsWarnings = [] } = await this.#applicationRunner.build(
|
|
728
|
+
const { routeJsWarnings = [] } = await this.#applicationRunner.build(AppExecutor2.from(this.#workspace, target.name), { fast: true });
|
|
723
729
|
return { diagnostics: routeJsWarnings.map((warning) => VerifyDiagnostics.fromRouteJsBudget(warning)) };
|
|
724
730
|
}
|
|
725
731
|
async#ssr(scope) {
|
|
@@ -729,10 +735,10 @@ class VerifyPipeline {
|
|
|
729
735
|
}
|
|
730
736
|
#execOf(target) {
|
|
731
737
|
if (target.type === "app")
|
|
732
|
-
return
|
|
738
|
+
return AppExecutor2.from(this.#workspace, target.name);
|
|
733
739
|
if (target.type === "lib")
|
|
734
|
-
return
|
|
735
|
-
return
|
|
740
|
+
return LibExecutor2.from(this.#workspace, target.name);
|
|
741
|
+
return PkgExecutor2.from(this.#workspace, target.name);
|
|
736
742
|
}
|
|
737
743
|
}
|
|
738
744
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
resolveSsrPageEntriesForApp
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-b3h37zk3.js";
|
|
5
5
|
import {
|
|
6
6
|
createBarrelImportsPlugin,
|
|
7
7
|
workspaceBarrels,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
CsrEntryFiles,
|
|
11
11
|
PagesEntrySourceGenerator,
|
|
12
12
|
PagesBundleBuilder
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-xb1yh9km.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/devkit/frontendBuild/csrArtifactBuilder.ts
|
|
16
16
|
import { mkdir as mkdir2, rm as rm2, unlink as unlink2 } from "fs/promises";
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
execEmoji,
|
|
4
|
+
Executor,
|
|
5
|
+
PkgInfo,
|
|
6
|
+
WorkspaceExecutor
|
|
7
|
+
} from "./index-crtscw7c.js";
|
|
8
|
+
|
|
9
|
+
// pkgs/@akanjs/devkit/executors/pkgExecutor.ts
|
|
10
|
+
import path from "path";
|
|
11
|
+
class PkgExecutor2 extends Executor {
|
|
12
|
+
workspace;
|
|
13
|
+
name;
|
|
14
|
+
dist;
|
|
15
|
+
emoji = execEmoji.pkg;
|
|
16
|
+
constructor({ workspace = WorkspaceExecutor.fromRoot(), name }) {
|
|
17
|
+
super(name, `${workspace.workspaceRoot}/pkgs/${name}`);
|
|
18
|
+
this.workspace = workspace;
|
|
19
|
+
this.name = name;
|
|
20
|
+
this.dist = new Executor(`dist/${name}`, `${this.workspace.workspaceRoot}/dist/pkgs/${name}`);
|
|
21
|
+
}
|
|
22
|
+
static from(executor, name) {
|
|
23
|
+
return new PkgExecutor2({ workspace: executor instanceof WorkspaceExecutor ? executor : executor.workspace, name });
|
|
24
|
+
}
|
|
25
|
+
#scanInfo = null;
|
|
26
|
+
async scan({ refresh } = {}) {
|
|
27
|
+
if (this.#scanInfo && !refresh)
|
|
28
|
+
return this.#scanInfo;
|
|
29
|
+
const scanInfo = await PkgInfo.fromExecutor(this, { refresh });
|
|
30
|
+
this.#scanInfo = scanInfo;
|
|
31
|
+
return scanInfo;
|
|
32
|
+
}
|
|
33
|
+
async#getDependencyVersion(rootPackageJson, dep) {
|
|
34
|
+
const rootDeps = {
|
|
35
|
+
...rootPackageJson.dependencies,
|
|
36
|
+
...rootPackageJson.devDependencies
|
|
37
|
+
};
|
|
38
|
+
const rootVersion = rootDeps[dep];
|
|
39
|
+
if (rootVersion)
|
|
40
|
+
return rootVersion;
|
|
41
|
+
const overrideVersion = rootPackageJson.overrides?.[dep];
|
|
42
|
+
if (typeof overrideVersion === "string")
|
|
43
|
+
return overrideVersion;
|
|
44
|
+
try {
|
|
45
|
+
const packageJsonPath = `pkgs/${dep}/package.json`;
|
|
46
|
+
if (!await Bun.file(path.join(this.workspace.workspaceRoot, packageJsonPath)).exists())
|
|
47
|
+
return;
|
|
48
|
+
const packageJson = await this.workspace.readJson(packageJsonPath);
|
|
49
|
+
if (packageJson.name === dep)
|
|
50
|
+
return packageJson.version;
|
|
51
|
+
} catch {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async#toDependencyMap(rootPackageJson, dependencies = [], devDependencies = []) {
|
|
56
|
+
const dependencyNames = [...new Set(dependencies)].sort();
|
|
57
|
+
const devDependencyNames = [...new Set(devDependencies)].filter((dep) => !dependencyNames.includes(dep)).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
58
|
+
const dependencyVersions = new Map;
|
|
59
|
+
const missingDeps = [];
|
|
60
|
+
for (const dep of [...dependencyNames, ...devDependencyNames]) {
|
|
61
|
+
const version = await this.#getDependencyVersion(rootPackageJson, dep);
|
|
62
|
+
if (version)
|
|
63
|
+
dependencyVersions.set(dep, version);
|
|
64
|
+
else
|
|
65
|
+
missingDeps.push(dep);
|
|
66
|
+
}
|
|
67
|
+
if (missingDeps.length > 0)
|
|
68
|
+
throw new Error(`Missing dependency versions in root package.json: ${missingDeps.join(", ")}`);
|
|
69
|
+
const toDependencyMap = (names) => Object.fromEntries(names.map((dep) => [dep, dependencyVersions.get(dep)]));
|
|
70
|
+
return { dependencies: toDependencyMap(dependencyNames), devDependencies: toDependencyMap(devDependencyNames) };
|
|
71
|
+
}
|
|
72
|
+
async updatePackageJsonDependencies(dependencies = [], devDependencies = []) {
|
|
73
|
+
const [rootPackageJson, pkgJson] = await Promise.all([this.workspace.getPackageJson(), this.getPackageJson()]);
|
|
74
|
+
const dependencyMaps = await this.#toDependencyMap(rootPackageJson, dependencies, devDependencies);
|
|
75
|
+
const newPkgJson = {
|
|
76
|
+
...pkgJson,
|
|
77
|
+
...dependencyMaps
|
|
78
|
+
};
|
|
79
|
+
await this.writeJson("package.json", newPkgJson);
|
|
80
|
+
return newPkgJson;
|
|
81
|
+
}
|
|
82
|
+
async generateDistPackageJson(dependencies = [], devDependencies = []) {
|
|
83
|
+
const [rootPackageJson, pkgJson] = await Promise.all([this.workspace.getPackageJson(), this.getPackageJson()]);
|
|
84
|
+
const dependencyMaps = await this.#toDependencyMap(rootPackageJson, dependencies, devDependencies);
|
|
85
|
+
const distPkgJson = {
|
|
86
|
+
...pkgJson,
|
|
87
|
+
type: "module",
|
|
88
|
+
exports: {
|
|
89
|
+
...pkgJson.exports,
|
|
90
|
+
".": {
|
|
91
|
+
import: "./index.ts",
|
|
92
|
+
types: "./index.ts",
|
|
93
|
+
default: "./index.ts"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
engines: { bun: ">=1.4.4" },
|
|
97
|
+
...dependencyMaps
|
|
98
|
+
};
|
|
99
|
+
await Promise.all([this.dist.writeJson("package.json", distPkgJson), this.writeJson("package.json", distPkgJson)]);
|
|
100
|
+
return distPkgJson;
|
|
101
|
+
}
|
|
102
|
+
async build() {
|
|
103
|
+
await Bun.build({
|
|
104
|
+
root: this.cwdPath,
|
|
105
|
+
entrypoints: [`${this.cwdPath}/index.ts`],
|
|
106
|
+
splitting: false,
|
|
107
|
+
target: "bun"
|
|
108
|
+
});
|
|
109
|
+
await this.cp(`${this.cwdPath}/dist`, this.dist.cwdPath);
|
|
110
|
+
}
|
|
111
|
+
async generateTsconfigJson() {
|
|
112
|
+
const [rootTsconfig, pkgTsconfig] = await Promise.all([this.workspace.getTsConfig(), this.getTsConfig()]);
|
|
113
|
+
const tsconfig = {
|
|
114
|
+
...rootTsconfig,
|
|
115
|
+
...pkgTsconfig,
|
|
116
|
+
compilerOptions: {
|
|
117
|
+
...rootTsconfig.compilerOptions,
|
|
118
|
+
...pkgTsconfig.compilerOptions,
|
|
119
|
+
paths: {}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
await this.dist.writeJson("tsconfig.json", tsconfig);
|
|
123
|
+
return tsconfig;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { PkgExecutor2 };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
AsyncDefaultExportDetector,
|
|
4
4
|
StoreBootstrap,
|
|
5
5
|
resolveSsrPageEntriesForApp
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-b3h37zk3.js";
|
|
7
7
|
import {
|
|
8
8
|
FileSys2
|
|
9
9
|
} from "./index-bns3wcpc.js";
|
|
@@ -102,17 +102,18 @@ class BarrelAnalyzer {
|
|
|
102
102
|
const map = new Map;
|
|
103
103
|
const read = new Set;
|
|
104
104
|
this.#read.set(pkgName, read);
|
|
105
|
-
await this.#walk(pkg.entryFile, pkg, map, read);
|
|
105
|
+
await this.#walk(pkg.entryFile, pkg, map, { visited: new Set, read, following: new Set([pkg.entryFile]) });
|
|
106
106
|
return map;
|
|
107
107
|
} catch (err) {
|
|
108
108
|
this.#logger.error(`analyze failed for ${pkgName}: ${err.message}`);
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
async#walk(absFile, pkg, map,
|
|
113
|
-
if (visited.has(absFile))
|
|
112
|
+
async#walk(absFile, pkg, map, walk) {
|
|
113
|
+
if (walk.visited.has(absFile))
|
|
114
114
|
return;
|
|
115
|
-
visited.add(absFile);
|
|
115
|
+
walk.visited.add(absFile);
|
|
116
|
+
walk.read.add(absFile);
|
|
116
117
|
const file = Bun.file(absFile);
|
|
117
118
|
if (!await file.exists())
|
|
118
119
|
return;
|
|
@@ -123,13 +124,14 @@ class BarrelAnalyzer {
|
|
|
123
124
|
const authoritative = this.#scanExports(source, absFile);
|
|
124
125
|
authoritative.delete("default");
|
|
125
126
|
const attributed = new Set;
|
|
126
|
-
const attribute = (listBody, subpath) => {
|
|
127
|
+
const attribute = (listBody, subpath, source) => {
|
|
127
128
|
for (const item of parseNamedList(listBody)) {
|
|
128
129
|
if (item.isType || item.imported === "default" || !authoritative.has(item.local))
|
|
129
130
|
continue;
|
|
130
131
|
attributed.add(item.local);
|
|
131
|
-
if (
|
|
132
|
-
|
|
132
|
+
if (map.has(item.local))
|
|
133
|
+
continue;
|
|
134
|
+
map.set(item.local, source?.get(item.imported) ?? { subpath, originalName: item.imported });
|
|
133
135
|
}
|
|
134
136
|
};
|
|
135
137
|
const starSpecs = [];
|
|
@@ -158,7 +160,7 @@ class BarrelAnalyzer {
|
|
|
158
160
|
continue;
|
|
159
161
|
const targetSubpath = this.#subpathFor(pkg, targetAbs);
|
|
160
162
|
if (targetSubpath)
|
|
161
|
-
attribute(namedList, targetSubpath);
|
|
163
|
+
attribute(namedList, targetSubpath, await this.#exportsOf(targetAbs, pkg, walk));
|
|
162
164
|
}
|
|
163
165
|
}
|
|
164
166
|
LOCAL_NAMED_RE.lastIndex = 0;
|
|
@@ -178,9 +180,17 @@ class BarrelAnalyzer {
|
|
|
178
180
|
for (const spec of starSpecs) {
|
|
179
181
|
const targetAbs = await this.#resolveRel(absFile, spec);
|
|
180
182
|
if (targetAbs)
|
|
181
|
-
await this.#walk(targetAbs, pkg, map,
|
|
183
|
+
await this.#walk(targetAbs, pkg, map, walk);
|
|
182
184
|
}
|
|
183
185
|
}
|
|
186
|
+
async#exportsOf(absFile, pkg, walk) {
|
|
187
|
+
if (walk.following.has(absFile))
|
|
188
|
+
return null;
|
|
189
|
+
const map = new Map;
|
|
190
|
+
const following = new Set([...walk.following, absFile]);
|
|
191
|
+
await this.#walk(absFile, pkg, map, { visited: new Set, read: walk.read, following });
|
|
192
|
+
return map;
|
|
193
|
+
}
|
|
184
194
|
#scanExports(source, absFile) {
|
|
185
195
|
try {
|
|
186
196
|
const transpiler = [".tsx", ".jsx"].includes(path.extname(absFile)) ? this.#tsxTranspiler : this.#tsTranspiler;
|
|
@@ -1182,7 +1192,7 @@ class PagesBundleBuilder {
|
|
|
1182
1192
|
edits.push({
|
|
1183
1193
|
start: tokens[fetchProtoAt].start,
|
|
1184
1194
|
end: fetchProtoEnd.end,
|
|
1185
|
-
text: "const fetchProto = FetchClient.build<typeof signal>(cnst, serverFetch.serializedSignal, {
|
|
1195
|
+
text: "const fetchProto = FetchClient.build<typeof signal>(cnst, serverFetch.serializedSignal, { base: serverFetch });"
|
|
1186
1196
|
});
|
|
1187
1197
|
let transformed = source;
|
|
1188
1198
|
for (const { start, end, text } of edits.sort((a, b) => b.start - a.start))
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
UpdatePackFolder,
|
|
10
10
|
NativePublicEnv,
|
|
11
11
|
NativeApp
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-g2ebpf0y.js";
|
|
13
13
|
import {
|
|
14
14
|
ExitCodeError
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-3gmskeq2.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigLock
|
|
18
18
|
} from "./index-bqbf654f.js";
|
package/index.js
CHANGED
|
@@ -4,10 +4,14 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3gmskeq2.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
9
|
import"./index-bns3wcpc.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-crtscw7c.js";
|
|
11
|
+
import"./index-b3h37zk3.js";
|
|
12
|
+
import"./index-1jzdengt.js";
|
|
13
|
+
import"./index-x2bj2vyz.js";
|
|
14
|
+
import"./index-rx8r0cbe.js";
|
|
11
15
|
|
|
12
16
|
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
13
17
|
class BunVersionGuard {
|
|
@@ -23,27 +27,27 @@ import path from "path";
|
|
|
23
27
|
|
|
24
28
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
25
29
|
var commandModules = {
|
|
26
|
-
workspace: async () => (await import("./workspace.command-
|
|
27
|
-
agent: async () => (await import("./agent.command-
|
|
28
|
-
code: async () => (await import("./code.command-
|
|
29
|
-
application: async () => (await import("./application.command-
|
|
30
|
-
library: async () => (await import("./library.command-
|
|
31
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
32
|
-
package: async () => (await import("./package.command-
|
|
33
|
-
module: async () => (await import("./module.command-
|
|
34
|
-
page: async () => (await import("./page.command-
|
|
35
|
-
context: async () => (await import("./context.command-
|
|
36
|
-
cloud: async () => (await import("./cloud.command-
|
|
37
|
-
subspace: async () => (await import("./subspace.command-
|
|
38
|
-
guideline: async () => (await import("./guideline.command-
|
|
39
|
-
scalar: async () => (await import("./scalar.command-
|
|
40
|
-
primitive: async () => (await import("./primitive.command-
|
|
41
|
-
quality: async () => (await import("./quality.command-
|
|
42
|
-
verify: async () => (await import("./verify.command-
|
|
43
|
-
repair: async () => (await import("./repair.command-
|
|
44
|
-
workflow: async () => (await import("./workflow.command-
|
|
45
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
46
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
30
|
+
workspace: async () => (await import("./workspace.command-pkpawft5.js")).WorkspaceCommand,
|
|
31
|
+
agent: async () => (await import("./agent.command-hrc2dfas.js")).AgentCommand,
|
|
32
|
+
code: async () => (await import("./code.command-6h6jr0s7.js")).CodeCommand,
|
|
33
|
+
application: async () => (await import("./application.command-b2194cpv.js")).ApplicationCommand,
|
|
34
|
+
library: async () => (await import("./library.command-a9p5yg4k.js")).LibraryCommand,
|
|
35
|
+
localRegistry: async () => (await import("./localRegistry.command-zz64k5vy.js")).LocalRegistryCommand,
|
|
36
|
+
package: async () => (await import("./package.command-eabq20aq.js")).PackageCommand,
|
|
37
|
+
module: async () => (await import("./module.command-1ht6dmxg.js")).ModuleCommand,
|
|
38
|
+
page: async () => (await import("./page.command-xhmzmvjn.js")).PageCommand,
|
|
39
|
+
context: async () => (await import("./context.command-t8akxhny.js")).ContextCommand,
|
|
40
|
+
cloud: async () => (await import("./cloud.command-d8ps1564.js")).CloudCommand,
|
|
41
|
+
subspace: async () => (await import("./subspace.command-d8t8geyv.js")).SubspaceCommand,
|
|
42
|
+
guideline: async () => (await import("./guideline.command-f41b5nv5.js")).GuidelineCommand,
|
|
43
|
+
scalar: async () => (await import("./scalar.command-cw3d32sv.js")).ScalarCommand,
|
|
44
|
+
primitive: async () => (await import("./primitive.command-yyxtfhvq.js")).PrimitiveCommand,
|
|
45
|
+
quality: async () => (await import("./quality.command-n7hmt628.js")).QualityCommand,
|
|
46
|
+
verify: async () => (await import("./verify.command-j4he0fbx.js")).VerifyCommand,
|
|
47
|
+
repair: async () => (await import("./repair.command-pczdq4mv.js")).RepairCommand,
|
|
48
|
+
workflow: async () => (await import("./workflow.command-k064waza.js")).WorkflowCommand,
|
|
49
|
+
pipeline: async () => (await import("./pipeline.command-wsbg3fpr.js")).PipelineCommand,
|
|
50
|
+
tunnel: async () => (await import("./tunnel.command-mhm64m9n.js")).TunnelCommand
|
|
47
51
|
};
|
|
48
52
|
var commandModuleIds = Object.keys(commandModules);
|
|
49
53
|
|
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3gmskeq2.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
8
|
import"./index-bns3wcpc.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-crtscw7c.js";
|
|
10
|
+
import"./index-b3h37zk3.js";
|
|
11
|
+
import"./index-1jzdengt.js";
|
|
12
|
+
import"./index-x2bj2vyz.js";
|
|
10
13
|
import {
|
|
11
14
|
LibraryScript
|
|
12
|
-
} from "./index-
|
|
15
|
+
} from "./index-37k5vshx.js";
|
|
16
|
+
import"./index-rx8r0cbe.js";
|
|
13
17
|
|
|
14
18
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
15
19
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -4,43 +4,48 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3gmskeq2.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
9
|
import"./index-bns3wcpc.js";
|
|
10
10
|
import {
|
|
11
|
-
parseEnvFile
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
parseEnvFile
|
|
12
|
+
} from "./index-crtscw7c.js";
|
|
13
|
+
import"./index-b3h37zk3.js";
|
|
14
|
+
import"./index-1jzdengt.js";
|
|
15
|
+
import {
|
|
16
|
+
PkgExecutor2
|
|
17
|
+
} from "./index-x2bj2vyz.js";
|
|
14
18
|
import {
|
|
15
19
|
npmRegistryFromEnv,
|
|
16
20
|
warnIgnoredNpmRegistry,
|
|
17
21
|
getNpmRegistryUrl
|
|
18
22
|
} from "./index-ny2k80mv.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
23
|
+
import"./index-66jt3m30.js";
|
|
24
|
+
import"./index-g2ebpf0y.js";
|
|
25
|
+
import"./index-9w51aevd.js";
|
|
22
26
|
import"./index-m9jj544v.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
+
import"./index-xb1yh9km.js";
|
|
28
|
+
import"./index-vy50ec2q.js";
|
|
29
|
+
import"./index-37k5vshx.js";
|
|
30
|
+
import"./index-k081wv4r.js";
|
|
27
31
|
import"./index-b4qq3rq0.js";
|
|
28
32
|
import {
|
|
29
33
|
ApplicationScript
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
34
|
+
} from "./index-9yfssbgg.js";
|
|
35
|
+
import"./index-xjj0h74q.js";
|
|
32
36
|
import {
|
|
33
37
|
CloudRunner
|
|
34
|
-
} from "./index-
|
|
38
|
+
} from "./index-c0rnjeqn.js";
|
|
35
39
|
import"./index-qd7xn2bk.js";
|
|
36
40
|
import"./index-nd39rssn.js";
|
|
37
41
|
import"./index-grt0e6kk.js";
|
|
38
|
-
import"./index-
|
|
42
|
+
import"./index-j33b0n38.js";
|
|
39
43
|
import {
|
|
40
44
|
PackageScript
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-
|
|
45
|
+
} from "./index-f5j09jnj.js";
|
|
46
|
+
import"./index-3fbmyb2r.js";
|
|
43
47
|
import"./index-9bv479q5.js";
|
|
48
|
+
import"./index-rx8r0cbe.js";
|
|
44
49
|
|
|
45
50
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
46
51
|
import { mkdir, rm } from "fs/promises";
|
|
@@ -163,7 +168,7 @@ class LocalRegistryScript extends script("localRegistry", [
|
|
|
163
168
|
}
|
|
164
169
|
async#preparePackages(workspace, akanPkgs, { test = true } = {}) {
|
|
165
170
|
await this.packageScript.updateWorskpaceRootPackageJson(workspace);
|
|
166
|
-
const pkgs = akanPkgs.map((pkgName) =>
|
|
171
|
+
const pkgs = akanPkgs.map((pkgName) => PkgExecutor2.from(workspace, pkgName));
|
|
167
172
|
if (test)
|
|
168
173
|
for (const pkg of pkgs)
|
|
169
174
|
await this.applicationScript.test(pkg);
|
|
@@ -4,18 +4,22 @@ import {
|
|
|
4
4
|
Module,
|
|
5
5
|
ModuleOrService,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3gmskeq2.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
9
|
import"./index-bns3wcpc.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-crtscw7c.js";
|
|
11
|
+
import"./index-b3h37zk3.js";
|
|
12
|
+
import"./index-1jzdengt.js";
|
|
13
|
+
import"./index-x2bj2vyz.js";
|
|
11
14
|
import {
|
|
12
15
|
renderPrimitiveReport
|
|
13
|
-
} from "./index-
|
|
16
|
+
} from "./index-j2me5hm4.js";
|
|
14
17
|
import"./index-nd39rssn.js";
|
|
15
|
-
import"./index-
|
|
18
|
+
import"./index-8bkbexcy.js";
|
|
16
19
|
import {
|
|
17
20
|
ModuleScript
|
|
18
|
-
} from "./index-
|
|
21
|
+
} from "./index-2z8mxgs7.js";
|
|
22
|
+
import"./index-rx8r0cbe.js";
|
|
19
23
|
|
|
20
24
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
21
25
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -3,17 +3,21 @@ import {
|
|
|
3
3
|
Pkg,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3gmskeq2.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
8
|
import"./index-bns3wcpc.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-crtscw7c.js";
|
|
10
|
+
import"./index-b3h37zk3.js";
|
|
11
|
+
import"./index-1jzdengt.js";
|
|
12
|
+
import"./index-x2bj2vyz.js";
|
|
10
13
|
import"./index-qd7xn2bk.js";
|
|
11
14
|
import"./index-nd39rssn.js";
|
|
12
15
|
import"./index-grt0e6kk.js";
|
|
13
|
-
import"./index-
|
|
16
|
+
import"./index-j33b0n38.js";
|
|
14
17
|
import {
|
|
15
18
|
PackageScript
|
|
16
|
-
} from "./index-
|
|
19
|
+
} from "./index-f5j09jnj.js";
|
|
20
|
+
import"./index-rx8r0cbe.js";
|
|
17
21
|
|
|
18
22
|
// pkgs/@akanjs/cli/package/package.command.ts
|
|
19
23
|
class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.2.0-rc.
|
|
3
|
+
"version": "3.2.0-rc.13",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@earendil-works/pi-tui": "1.3.0",
|
|
40
40
|
"@inquirer/prompts": "^8.7.3",
|
|
41
41
|
"@tailwindcss/node": "^4.3.3",
|
|
42
|
-
"akanjs": "3.2.0-rc.
|
|
42
|
+
"akanjs": "3.2.0-rc.13",
|
|
43
43
|
"chalk": "^6.0.1",
|
|
44
44
|
"commander": "^15.0.0",
|
|
45
45
|
"dayjs": "^1.11.23",
|
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3gmskeq2.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
8
|
import"./index-bns3wcpc.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-crtscw7c.js";
|
|
10
|
+
import"./index-b3h37zk3.js";
|
|
11
|
+
import"./index-1jzdengt.js";
|
|
12
|
+
import"./index-x2bj2vyz.js";
|
|
10
13
|
import {
|
|
11
14
|
PageScript
|
|
12
|
-
} from "./index-
|
|
15
|
+
} from "./index-8bkbexcy.js";
|
|
16
|
+
import"./index-rx8r0cbe.js";
|
|
13
17
|
|
|
14
18
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
15
19
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|