@akanjs/cli 3.3.0-rc.1 → 3.3.0-rc.3
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-0r05qa30.js +11 -0
- package/{CodeTui-zee8atsr.js → CodeTui-brryts78.js} +4 -4
- package/TunnelShare-dcx5j51j.js +16 -0
- package/{agent.command-x65f2ags.js → agent.command-xn4maemk.js} +20 -22
- package/akanCode.js +5 -5
- package/appExecutor-qt1nm242.js +11 -0
- package/{application.command-azbd1pb2.js → application.command-rv2n5bw8.js} +17 -19
- package/{applicationBuildRunner-trfxv3pd.js → applicationBuildRunner-ggkd5qgy.js} +16 -13
- package/buildBatch.proc.js +19 -18
- package/{cloud.command-gapp4634.js → cloud.command-hgnbps4n.js} +19 -24
- package/cloud.script-rzsnzjsg.js +30 -0
- package/{code.command-5smx61yf.js → code.command-9gfph3t3.js} +13 -13
- package/{context.command-ym5jbkny.js → context.command-dwhz1fwq.js} +20 -22
- package/context.runner-gh9rr71p.js +32 -0
- package/csrArtifactBuilder-zawt8knq.js +9 -0
- package/{index-2ny1e95c.js → dependencyScanner-93g8tk0r.js} +6 -5
- package/{fileSys-q22646yc.js → fileSys-e5mwt73x.js} +1 -1
- package/frameworkGraph-aneq2nwy.js +8 -0
- package/{guideline.command-zwypaqsh.js → guideline.command-v2daz21k.js} +8 -8
- package/guidelines/akanApi/akanApi.instruction.md +7 -2
- package/guidelines/conventions/core.md +6 -11
- package/guidelines/conventions/rules/app.md +1 -2
- package/guidelines/conventions/rules/auth.md +18 -27
- package/guidelines/conventions/rules/config.md +14 -46
- package/guidelines/conventions/rules/page.md +19 -34
- package/guidelines/conventions/rules/server.md +1 -4
- package/guidelines/conventions/rules/ssr.md +3 -4
- package/guidelines/conventions/rules/ts.md +2 -1
- package/guidelines/cssRule/cssRule.instruction.md +1 -0
- package/guidelines/pageRule/pageRule.instruction.md +6 -53
- package/incrementalBuilder.proc.js +24 -18
- package/{index-j6jjmn2r.js → index-0k64a38w.js} +62 -21
- package/{index-78y75t0a.js → index-0vtpxfx6.js} +6 -7
- package/{index-4ss4gkv3.js → index-0vv0a5h8.js} +2 -2
- package/{index-j0wr4e32.js → index-1v5eghaa.js} +9 -9
- package/{index-kfvjzk8r.js → index-2ktpwjgf.js} +3 -3
- package/{index-w1zexzpx.js → index-2t7jnfg5.js} +1 -1
- package/{index-p7beqww9.js → index-3fmzz9sf.js} +18 -18
- package/{index-8jtqfye2.js → index-58ck1gsm.js} +6 -6
- package/{index-0s7w2085.js → index-5cpjkfhk.js} +4 -4
- package/{index-71y6176j.js → index-609zbjve.js} +8 -8
- package/{index-9wh04mqy.js → index-66b1hrxh.js} +2 -2
- package/{index-gt8phqpt.js → index-6yefp97x.js} +4 -4
- package/{index-0dm25wvf.js → index-7ssr7wq4.js} +1 -1
- package/{index-612fdtbk.js → index-8fg1hvj5.js} +1 -1
- package/{index-41a03gkj.js → index-91bcfjej.js} +19 -19
- package/{index-275a4r3n.js → index-999e5kp4.js} +11 -15
- package/{index-s885g0jj.js → index-arcdcexp.js} +3 -3
- package/{index-jek2re5k.js → index-b3kjr19v.js} +4 -4
- package/{index-3txdtztz.js → index-bjg9thz8.js} +1 -1
- package/{index-baccvws5.js → index-bsew0a12.js} +1 -1
- package/{index-zfnz878d.js → index-c67vjafa.js} +1 -1
- package/{index-z92zm3wd.js → index-cfzqdsam.js} +29 -11
- package/{index-dadwp2aw.js → index-dy5reyet.js} +271 -39
- package/{index-67sd09ag.js → index-fqhr7j56.js} +8 -8
- package/{index-zmd9xxgd.js → index-g7hm77j6.js} +3 -3
- package/{index-h901f24n.js → index-ghs8gtvp.js} +5 -5
- package/{index-v7ajmsh3.js → index-h1k3zyyb.js} +1 -1
- package/{index-knpm8sdm.js → index-j3fqs8rc.js} +1 -1
- package/{index-6dzjer7p.js → index-jzwdwse0.js} +6 -6
- package/{index-2jmvfa62.js → index-m4s4tzjr.js} +3 -3
- package/{index-xwwex8rf.js → index-ndfxse05.js} +5 -5
- package/{index-z96ks033.js → index-rd669r6x.js} +153 -45
- package/{index-k6vwww45.js → index-rnhbh45p.js} +7 -7
- package/{index-ybcb9wc8.js → index-rwhdcnr8.js} +9 -9
- package/{index-a860mx0m.js → index-sn5cka91.js} +24 -24
- package/{index-ebn9kgea.js → index-v0gt5ryd.js} +18 -15
- package/{index-2yn3r67f.js → index-vznyyaf8.js} +6 -6
- package/{index-dmcpetwe.js → index-w18qdjyf.js} +98 -23
- package/{index-p5zh7pmc.js → index-xv3pvdw4.js} +1 -1
- package/{index-nc3br31y.js → index-yejf6fth.js} +2 -2
- package/{index-7wf8snar.js → index-zfmc4380.js} +1 -1
- package/{index-j592zfqc.js → index-zx3bv21b.js} +1 -1
- package/{index-by2tvsq6.js → index-zyjztrvc.js} +1 -1
- package/index.js +30 -28
- package/{libExecutor-jc6f8hm6.js → libExecutor-p21kkayq.js} +3 -3
- package/{library.command-nxvesvhb.js → library.command-m4gw18qq.js} +8 -8
- package/{localRegistry.command-xz62e4ng.js → localRegistry.command-3yq90wgp.js} +18 -23
- package/{module.command-aaws9byg.js → module.command-9vfdxapr.js} +10 -10
- package/{package.command-j7hv26p0.js → package.command-rt4y8xaf.js} +9 -12
- package/package.json +3 -2
- package/{page.command-7yffs7n9.js → page.command-4zc20rnv.js} +8 -8
- package/{pipeline.command-7yk0zcng.js → pipeline.command-4ekd9xgb.js} +7 -7
- package/{pkgExecutor-arxmvx4t.js → pkgExecutor-mh903rz9.js} +3 -3
- package/{primitive.command-7a1pt715.js → primitive.command-5g3xe4mf.js} +11 -11
- package/{projectTypecheck-f4qhbecd.js → projectTypecheck-bz6smek9.js} +1 -1
- package/{prompter-qyggfhqd.js → prompter-d33wmdpa.js} +2 -2
- package/{quality.command-c6mvrjh1.js → quality.command-zf8dyc9w.js} +9 -9
- package/{repair.command-093adzt9.js → repair.command-sx0eyq4w.js} +10 -10
- package/{scalar.command-2ex84spb.js → scalar.command-4bvzmbbh.js} +9 -9
- package/skills/akan-page/SKILL.md +18 -13
- package/skills/akan-runtime/SKILL.md +21 -16
- package/skills/akan-service/SKILL.md +2 -2
- package/{subspace.command-4n4n4jpv.js → subspace.command-cxyej1an.js} +11 -13
- package/{tunnel.command-f7ep1qfa.js → tunnel.command-gvnv36yf.js} +10 -12
- package/{verify.command-zrkxnvct.js → verify.command-yj2mngs0.js} +15 -17
- package/{workflow.command-ks16jegk.js → workflow.command-42p9g0w8.js} +15 -15
- package/{workspace.command-ahhfpaag.js → workspace.command-91wx03de.js} +34 -38
- package/CodeAgent-fx6088tv.js +0 -11
- package/TunnelShare-9ry4vh0y.js +0 -18
- package/appExecutor-79azsb2w.js +0 -11
- package/cloud.script-3b401efv.js +0 -35
- package/context.runner-kctbfsde.js +0 -34
- package/dependencyScanner-ge10gb52.js +0 -8
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
SysExecutor
|
|
4
|
+
} from "./index-609zbjve.js";
|
|
5
|
+
import {
|
|
6
|
+
CliError
|
|
7
|
+
} from "./index-j4yvgfhr.js";
|
|
2
8
|
import {
|
|
3
9
|
ApplicationBuildReporter
|
|
4
|
-
} from "./index-
|
|
10
|
+
} from "./index-w18qdjyf.js";
|
|
5
11
|
import {
|
|
6
12
|
script,
|
|
7
13
|
markCliErrorPrinted,
|
|
8
14
|
assertPromptable
|
|
9
|
-
} from "./index-
|
|
10
|
-
import {
|
|
11
|
-
CliError
|
|
12
|
-
} from "./index-j4yvgfhr.js";
|
|
13
|
-
import {
|
|
14
|
-
SysExecutor
|
|
15
|
-
} from "./index-71y6176j.js";
|
|
15
|
+
} from "./index-vznyyaf8.js";
|
|
16
16
|
import {
|
|
17
17
|
AppExecutor2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-cfzqdsam.js";
|
|
19
19
|
import {
|
|
20
20
|
LibExecutor2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-c67vjafa.js";
|
|
22
22
|
import {
|
|
23
23
|
PkgExecutor2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-2t7jnfg5.js";
|
|
25
25
|
import {
|
|
26
26
|
DesktopServerStage
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-8fg1hvj5.js";
|
|
28
28
|
import {
|
|
29
29
|
LibraryScript
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-m4s4tzjr.js";
|
|
31
31
|
import {
|
|
32
32
|
ApplicationRunner,
|
|
33
33
|
VerifyScope
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-rd669r6x.js";
|
|
35
35
|
import {
|
|
36
36
|
PreviewChrome2,
|
|
37
37
|
PreviewView2,
|
|
@@ -39,13 +39,13 @@ import {
|
|
|
39
39
|
} from "./index-rwgqba9p.js";
|
|
40
40
|
import {
|
|
41
41
|
formatSlicePlan
|
|
42
|
-
} from "./index-
|
|
43
|
-
import {
|
|
44
|
-
assertPlainName
|
|
45
|
-
} from "./index-va90m8nd.js";
|
|
42
|
+
} from "./index-zx3bv21b.js";
|
|
46
43
|
import {
|
|
47
44
|
openBrowser
|
|
48
45
|
} from "./index-9dp031by.js";
|
|
46
|
+
import {
|
|
47
|
+
assertPlainName
|
|
48
|
+
} from "./index-va90m8nd.js";
|
|
49
49
|
|
|
50
50
|
// pkgs/@akanjs/cli/application/application.script.ts
|
|
51
51
|
import { mkdir as mkdir3, rm } from "fs/promises";
|
|
@@ -1779,7 +1779,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
1779
1779
|
await Promise.all(shares.map(async (share) => await share.close()));
|
|
1780
1780
|
}, "Abandoning the tunnel release; the shares expire on their own.");
|
|
1781
1781
|
await Promise.all(apps.map(async (app) => {
|
|
1782
|
-
const { TunnelShare } = await import("./TunnelShare-
|
|
1782
|
+
const { TunnelShare } = await import("./TunnelShare-dcx5j51j.js");
|
|
1783
1783
|
const share = await TunnelShare.open(app, { workspace: app.workspace });
|
|
1784
1784
|
shares.push(share);
|
|
1785
1785
|
urls.set(app.name, share.url);
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-vznyyaf8.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zyjztrvc.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor2
|
|
11
|
-
} from "./index-
|
|
12
|
-
import {
|
|
13
|
-
FrameworkGraph
|
|
14
|
-
} from "./index-p7beqww9.js";
|
|
11
|
+
} from "./index-2t7jnfg5.js";
|
|
15
12
|
import {
|
|
16
13
|
MaintainabilityBaseline
|
|
17
|
-
} from "./index-
|
|
18
|
-
import {
|
|
19
|
-
TypeScriptDependencyScanner2
|
|
20
|
-
} from "./index-2ny1e95c.js";
|
|
14
|
+
} from "./index-bsew0a12.js";
|
|
21
15
|
import {
|
|
22
16
|
assertPackageName
|
|
23
17
|
} from "./index-va90m8nd.js";
|
|
@@ -169,9 +163,10 @@ class PackageRunner extends runner("package") {
|
|
|
169
163
|
return await pkg.scan();
|
|
170
164
|
}
|
|
171
165
|
async buildPackage(pkg) {
|
|
166
|
+
const { TypeScriptDependencyScanner } = await import("./dependencyScanner-93g8tk0r.js");
|
|
172
167
|
await $`rm -rf ${pkg.dist.cwdPath}`;
|
|
173
168
|
await pkg.dist.mkdir(pkg.dist.cwdPath);
|
|
174
|
-
const scanner = await
|
|
169
|
+
const scanner = await TypeScriptDependencyScanner.from(pkg);
|
|
175
170
|
const { npmDeps, npmDevDeps, missingDeps } = await scanner.getPackageBuildDependencies(pkg.name);
|
|
176
171
|
const packageRuntimeDependencies = {
|
|
177
172
|
"@akanjs/devkit": [
|
|
@@ -286,9 +281,9 @@ class PackageRunner extends runner("package") {
|
|
|
286
281
|
if (!failures.length)
|
|
287
282
|
return;
|
|
288
283
|
throw new Error(`[package] ${pkg.name} dist imports ${failures.length} subpath(s) no consumer can resolve:
|
|
289
|
-
|
|
284
|
+
${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
|
|
290
285
|
`)}
|
|
291
|
-
|
|
286
|
+
Add the missing "exports" entries: a bare file facet needs "./*": "./*.ts", a directory facet needs its own "./name": "./name/index.ts", and "./*.ts": "./*.ts" keeps an already-suffixed specifier from gaining a second extension.`);
|
|
292
287
|
}
|
|
293
288
|
async#verifyDistImportsPublished(pkg) {
|
|
294
289
|
const imports = await this.#collectDistAkanImports(pkg.dist.cwdPath, PackageRunner.#unpublishedPackages);
|
|
@@ -300,9 +295,9 @@ class PackageRunner extends runner("package") {
|
|
|
300
295
|
return ` ${specifier} \u2014 imported by ${shown}`;
|
|
301
296
|
});
|
|
302
297
|
throw new Error(`[package] ${pkg.name} dist imports ${failures.length} specifier(s) of a package that is never published:
|
|
303
|
-
|
|
298
|
+
${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
|
|
304
299
|
`)}
|
|
305
|
-
|
|
300
|
+
Reach it through a published package that embeds it (akanjs/native/api for @akanjs/native/api), or embed it in this package's build.`);
|
|
306
301
|
}
|
|
307
302
|
async verifyDistPackage(pkg, {
|
|
308
303
|
peerExportsMaps = new Map
|
|
@@ -355,6 +350,7 @@ class PackageRunner extends runner("package") {
|
|
|
355
350
|
};
|
|
356
351
|
}
|
|
357
352
|
async syncArchitecture(workspace) {
|
|
353
|
+
const { FrameworkGraph } = await import("./frameworkGraph-aneq2nwy.js");
|
|
358
354
|
const architecture = await FrameworkGraph.architecture(workspace.workspaceRoot);
|
|
359
355
|
if (!architecture)
|
|
360
356
|
throw new Error(`${FrameworkGraph.architectureFile} is only kept in the akanjs repository`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
FileSys2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zyjztrvc.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveMobileTargets
|
|
7
7
|
} from "./index-m9jj544v.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
UpdatePackFolder,
|
|
10
10
|
NativePublicEnv,
|
|
11
11
|
NativeApp
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-v0gt5ryd.js";
|
|
13
13
|
import {
|
|
14
14
|
ExitCodeError
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-vznyyaf8.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigLock
|
|
18
18
|
} from "./index-bqbf654f.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SOURCE_EXTS,
|
|
4
4
|
WatchRootResolver
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-w18qdjyf.js";
|
|
6
6
|
import {
|
|
7
7
|
loaderFor,
|
|
8
8
|
BarrelAnalyzer,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
CsrDevPaths,
|
|
19
19
|
PagesEntrySourceGenerator,
|
|
20
20
|
PagesBundleBuilder
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-66b1hrxh.js";
|
|
22
22
|
import {
|
|
23
23
|
FileSys2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-zyjztrvc.js";
|
|
25
25
|
import {
|
|
26
26
|
AsyncDefaultExportDetector,
|
|
27
27
|
StoreBootstrap,
|
|
28
28
|
resolveSsrPageEntriesForApp
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-cfzqdsam.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/devkit/frontendBuild/clientEntryDiscovery.ts
|
|
32
32
|
import fs from "fs";
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
AkanAppConfig,
|
|
8
8
|
increaseBuildNum,
|
|
9
9
|
decreaseBuildNum
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-609zbjve.js";
|
|
11
11
|
import {
|
|
12
12
|
FileSys2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-zyjztrvc.js";
|
|
14
14
|
import {
|
|
15
15
|
LibExecutor2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-c67vjafa.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/devkit/executors/appExecutor.ts
|
|
19
|
-
import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, symlink } from "fs/promises";
|
|
19
|
+
import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, rm as rm2, stat, symlink } from "fs/promises";
|
|
20
20
|
import path3 from "path";
|
|
21
21
|
import { pathToFileURL } from "url";
|
|
22
22
|
import { isRouteSourceFile, parseRouteModuleKey, validatePageSourceFile, validateSubRoutePageKey } from "akanjs/common";
|
|
@@ -409,7 +409,12 @@ class AppExecutor2 extends SysExecutor {
|
|
|
409
409
|
static from(executor, name) {
|
|
410
410
|
return new AppExecutor2({ workspace: executor instanceof WorkspaceExecutor ? executor : executor.workspace, name });
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
#verifyBuild = false;
|
|
413
|
+
useVerifyDist() {
|
|
414
|
+
this.dist = new Executor(`dist/verify/${this.name}`, `${this.workspace.workspaceRoot}/dist/verify/${this.name}`);
|
|
415
|
+
this.#verifyBuild = true;
|
|
416
|
+
}
|
|
417
|
+
static #keptOnStart = [path3.join(".akan", "cache")];
|
|
413
418
|
static #legacyNative = path3.join(".akan", "native");
|
|
414
419
|
async#removeDevOutput(dir = ".akan") {
|
|
415
420
|
const entries = await readDirEntries(this.getPath(dir)).catch(() => []);
|
|
@@ -420,12 +425,23 @@ class AppExecutor2 extends SysExecutor {
|
|
|
420
425
|
return;
|
|
421
426
|
}
|
|
422
427
|
if (AppExecutor2.#keptOnStart.includes(entry))
|
|
423
|
-
return;
|
|
428
|
+
return await this.#removeStaleTemps(entry);
|
|
424
429
|
if (AppExecutor2.#keptOnStart.some((kept) => kept.startsWith(`${entry}${path3.sep}`)))
|
|
425
430
|
return await this.#removeDevOutput(entry);
|
|
426
431
|
await this.removeDir(entry);
|
|
427
432
|
}));
|
|
428
433
|
}
|
|
434
|
+
static #staleTempMs = 60000;
|
|
435
|
+
async#removeStaleTemps(dir) {
|
|
436
|
+
const root = this.getPath(dir);
|
|
437
|
+
const names = await readDirEntries(root, { recursive: true }).catch(() => []);
|
|
438
|
+
await Promise.all(names.filter((name) => name.endsWith(".tmp")).map(async (name) => {
|
|
439
|
+
const file = path3.join(root, name);
|
|
440
|
+
const stats = await stat(file).catch(() => null);
|
|
441
|
+
if (stats?.isFile() && Date.now() - stats.mtimeMs > AppExecutor2.#staleTempMs)
|
|
442
|
+
await rm2(file, { force: true });
|
|
443
|
+
}));
|
|
444
|
+
}
|
|
429
445
|
getEnv() {
|
|
430
446
|
return WorkspaceExecutor.getBaseDevEnv().env;
|
|
431
447
|
}
|
|
@@ -475,11 +491,13 @@ class AppExecutor2 extends SysExecutor {
|
|
|
475
491
|
this.#excludeDevOnlyPages = true;
|
|
476
492
|
this.#pageKeys = null;
|
|
477
493
|
await this.dist.removeDir(this.dist.cwdPath);
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
494
|
+
if (!this.#verifyBuild) {
|
|
495
|
+
await Promise.all([this.dist.mkdir("private"), this.dist.mkdir("public")]);
|
|
496
|
+
await Promise.all([
|
|
497
|
+
this.cp("private", `${this.dist.cwdPath}/private`, { dereference: true }),
|
|
498
|
+
...akanConfig.web.ssr ? [this.cp("public", `${this.dist.cwdPath}/public`, { dereference: true })] : []
|
|
499
|
+
]);
|
|
500
|
+
}
|
|
483
501
|
} else {
|
|
484
502
|
await this.#removeDevOutput();
|
|
485
503
|
if (!akanConfig.web.ssr || !akanConfig.web.csr)
|