@akanjs/cli 2.4.1-rc.6 → 2.4.1
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/{agent.command-t4346579.js → agent.command-sa12ccz3.js} +2 -2
- package/{application.command-zkmeemdt.js → application.command-jv63vv7z.js} +4 -4
- package/{applicationBuildRunner-5w8j9yp7.js → applicationBuildRunner-vzjdgv1g.js} +3 -2
- package/buildBatch.proc.js +3 -2
- package/{cloud.command-5ztqxppm.js → cloud.command-8z2nc6b2.js} +7 -7
- package/{context.command-smwxwgwf.js → context.command-0m854xme.js} +8 -8
- package/{guideline.command-1r0esdjs.js → guideline.command-dsdpae45.js} +1 -1
- package/incrementalBuilder.proc.js +3 -3
- package/{index-3sd2vape.js → index-1b9f27pm.js} +1 -1
- package/{index-fh990y67.js → index-3a4vntr0.js} +1 -1
- package/{index-jbtn8h1y.js → index-81epkybm.js} +1 -1
- package/{index-0fn1r7gg.js → index-bjpxzr6s.js} +31 -4
- package/{index-ahpcr9ss.js → index-d2e2y85b.js} +1 -1
- package/{index-0jwvs8vp.js → index-e3b8ms64.js} +6 -6
- package/{index-s9yajzkj.js → index-eja0sbm6.js} +4 -4
- package/{index-wh201a76.js → index-h6pevatb.js} +2 -2
- package/{index-2v6a4wd5.js → index-m04as81s.js} +2 -2
- package/index-m0vg9n8z.js +2219 -0
- package/{index-n5y2gbf2.js → index-n2mp0f48.js} +200 -19
- package/{index-nv7et4t3.js → index-p9f1rpbp.js} +1 -1
- package/{index-qpz4csbs.js → index-phj3ewxv.js} +7 -1
- package/{index-pya1h7wx.js → index-q4sc46ec.js} +1 -1
- package/{index-y4kg682s.js → index-qacv44mm.js} +1 -1
- package/index-rh16j3c7.js +2166 -0
- package/{index-gr4cjv99.js → index-zw4aqvwh.js} +2 -2
- package/index.js +17 -17
- package/{library.command-jrew04m6.js → library.command-fhx5ce8n.js} +2 -2
- package/{localRegistry.command-m08dkm1b.js → localRegistry.command-18f61945.js} +6 -6
- package/{module.command-p98t7522.js → module.command-29wvnb56.js} +3 -3
- package/{package.command-57dyrfmn.js → package.command-46r1dncm.js} +2 -2
- package/package.json +2 -2
- package/{page.command-tas6f3na.js → page.command-vxvqdzc0.js} +2 -2
- package/{primitive.command-bjrbsakw.js → primitive.command-yk622wmt.js} +4 -4
- package/{quality.command-zavaafbw.js → quality.command-p0mb5xwt.js} +1 -1
- package/{repair.command-je57wx67.js → repair.command-nptckp6w.js} +2 -2
- package/{scalar.command-gqqyy1kr.js → scalar.command-bss14hez.js} +2 -2
- package/templates/workspaceRoot/.cursor/rules/coding-comments.mdc.template +19 -0
- package/templates/workspaceRoot/package.json.template +3 -1
- package/templates/workspaceRoot/patches/zod@3.25.76.patch.template +22 -0
- package/templates/workspaceRoot/patches/zod@4.4.3.patch.template +11 -0
- package/{workflow.command-d6mrc47s.js → workflow.command-7fhqb33d.js} +6 -6
- package/{workspace.command-bbg96z8k.js → workspace.command-xkcec7ky.js} +15 -15
- package/index-khzzttv1.js +0 -4274
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5e0a0ede01c639bf84d5ddf31e5f930a0176e0748ad6935007789b9037687962
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AgentScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-q4sc46ec.js";
|
|
5
5
|
import"./index-eay4t1te.js";
|
|
6
6
|
import"./index-2v10yr8g.js";
|
|
7
7
|
import"./index-eqxmxan6.js";
|
|
8
8
|
import {
|
|
9
9
|
Workspace,
|
|
10
10
|
command
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-phj3ewxv.js";
|
|
12
12
|
import"./index-0t7pwff2.js";
|
|
13
13
|
import"./index-61keag0s.js";
|
|
14
14
|
import"./index-6pz1j0zj.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ApplicationScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-n2mp0f48.js";
|
|
5
5
|
import {
|
|
6
6
|
getMobileTargetChoices
|
|
7
7
|
} from "./index-76rn3g2c.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-3a4vntr0.js";
|
|
9
9
|
import {
|
|
10
10
|
App,
|
|
11
11
|
Exec,
|
|
12
12
|
Sys,
|
|
13
13
|
Workspace,
|
|
14
14
|
command
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-phj3ewxv.js";
|
|
16
16
|
import"./index-fgc8r6dj.js";
|
|
17
17
|
import"./index-0t7pwff2.js";
|
|
18
18
|
import"./index-61keag0s.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-bjpxzr6s.js";
|
|
20
20
|
import"./index-6pz1j0zj.js";
|
|
21
21
|
import"./index-r24hmh0q.js";
|
|
22
22
|
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
CsrArtifactBuilder,
|
|
5
5
|
SsrBaseArtifactBuilder,
|
|
6
6
|
precompressArtifacts
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-m0vg9n8z.js";
|
|
8
|
+
import"./index-rh16j3c7.js";
|
|
9
|
+
import"./index-bjpxzr6s.js";
|
|
9
10
|
import {
|
|
10
11
|
Spinner
|
|
11
12
|
} from "./index-6pz1j0zj.js";
|
package/buildBatch.proc.js
CHANGED
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
FontOptimizer,
|
|
11
11
|
PagesBundleBuilder,
|
|
12
12
|
SsrBaseArtifactBuilder
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
13
|
+
} from "./index-m0vg9n8z.js";
|
|
14
|
+
import"./index-rh16j3c7.js";
|
|
15
|
+
import"./index-bjpxzr6s.js";
|
|
15
16
|
import"./index-6pz1j0zj.js";
|
|
16
17
|
import"./index-r24hmh0q.js";
|
|
17
18
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-eja0sbm6.js";
|
|
5
|
+
import"./index-zw4aqvwh.js";
|
|
6
6
|
import {
|
|
7
7
|
GlobalConfig
|
|
8
8
|
} from "./index-5vvwc0cz.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-n2mp0f48.js";
|
|
10
10
|
import"./index-76rn3g2c.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-3a4vntr0.js";
|
|
12
|
+
import"./index-p9f1rpbp.js";
|
|
13
13
|
import {
|
|
14
14
|
Workspace,
|
|
15
15
|
command
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-phj3ewxv.js";
|
|
17
17
|
import"./index-fgc8r6dj.js";
|
|
18
18
|
import"./index-0t7pwff2.js";
|
|
19
19
|
import"./index-x53a5nya.js";
|
|
20
20
|
import"./index-61keag0s.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-bjpxzr6s.js";
|
|
22
22
|
import"./index-6pz1j0zj.js";
|
|
23
23
|
import"./index-r24hmh0q.js";
|
|
24
24
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ContextScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
4
|
+
} from "./index-e3b8ms64.js";
|
|
5
|
+
import"./index-81epkybm.js";
|
|
6
|
+
import"./index-1b9f27pm.js";
|
|
7
|
+
import"./index-d2e2y85b.js";
|
|
8
|
+
import"./index-m04as81s.js";
|
|
9
|
+
import"./index-h6pevatb.js";
|
|
10
|
+
import"./index-qacv44mm.js";
|
|
11
11
|
import"./index-ss469dec.js";
|
|
12
12
|
import"./index-hk58kr1m.js";
|
|
13
13
|
import"./index-eay4t1te.js";
|
|
@@ -18,7 +18,7 @@ import"./index-76rn3g2c.js";
|
|
|
18
18
|
import {
|
|
19
19
|
Workspace,
|
|
20
20
|
command
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-phj3ewxv.js";
|
|
22
22
|
import"./index-0t7pwff2.js";
|
|
23
23
|
import"./index-61keag0s.js";
|
|
24
24
|
import"./index-6pz1j0zj.js";
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
DevGeneratedIndexSync,
|
|
14
14
|
GraphClientEntryDiscovery,
|
|
15
15
|
RouteClientBuilder
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-rh16j3c7.js";
|
|
17
17
|
import {
|
|
18
18
|
HmrWatcher,
|
|
19
19
|
WatchRootResolver
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-bjpxzr6s.js";
|
|
21
21
|
import"./index-6pz1j0zj.js";
|
|
22
22
|
import"./index-r24hmh0q.js";
|
|
23
23
|
|
|
@@ -81,7 +81,7 @@ class BuildBatchRunner {
|
|
|
81
81
|
this.#logger.verbose(`[build-batch] generation=${request.generation} needs=${request.needs.join(",")} done in ${Date.now() - started}ms`);
|
|
82
82
|
return result;
|
|
83
83
|
}
|
|
84
|
-
const message = `build worker exited with code ${exitCode} before reporting a result`;
|
|
84
|
+
const message = proc.signalCode ? `build worker was killed by ${proc.signalCode} before reporting a result${proc.signalCode === "SIGKILL" ? " \u2014 most often the kernel OOM killer; check the sandbox's memory limit" : ""}` : `build worker exited with code ${exitCode} before reporting a result`;
|
|
85
85
|
this.#logger.error(`[build-batch] generation=${request.generation} ${message}`);
|
|
86
86
|
return {
|
|
87
87
|
generation: request.generation,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./index-2v10yr8g.js";
|
|
12
12
|
import {
|
|
13
13
|
runner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-phj3ewxv.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/repair/repair.runner.ts
|
|
17
17
|
var commandForShell = (command) => command.startsWith("akan ") ? `bun run ${command}` : command;
|
|
@@ -45,16 +45,20 @@ import path2 from "path";
|
|
|
45
45
|
var UNREADABLE = Number.NaN;
|
|
46
46
|
|
|
47
47
|
class SourceMtimeIndex {
|
|
48
|
+
static #defaultDirSettleMs = 20;
|
|
49
|
+
#dirSettleMs;
|
|
48
50
|
#roots;
|
|
49
51
|
#classifier;
|
|
50
52
|
#files = new Map;
|
|
51
53
|
#dirs = new Map;
|
|
52
54
|
#unreadable = new Map;
|
|
55
|
+
#unsettled = new Set;
|
|
53
56
|
#primed = false;
|
|
54
57
|
#queue = Promise.resolve();
|
|
55
|
-
constructor({ roots, classifier }) {
|
|
58
|
+
constructor({ roots, classifier, dirSettleMs }) {
|
|
56
59
|
this.#roots = SourceMtimeIndex.#pruneNestedRoots(roots);
|
|
57
60
|
this.#classifier = classifier ?? new HmrChangeClassifier;
|
|
61
|
+
this.#dirSettleMs = dirSettleMs ?? SourceMtimeIndex.#defaultDirSettleMs;
|
|
58
62
|
}
|
|
59
63
|
get primed() {
|
|
60
64
|
return this.#primed;
|
|
@@ -65,11 +69,15 @@ class SourceMtimeIndex {
|
|
|
65
69
|
get coverageGaps() {
|
|
66
70
|
return [...this.#unreadable].map(([file, code]) => ({ path: file, code }));
|
|
67
71
|
}
|
|
72
|
+
get hasUnsettledDirs() {
|
|
73
|
+
return this.#unsettled.size > 0;
|
|
74
|
+
}
|
|
68
75
|
async prime() {
|
|
69
76
|
await this.#serialize(async () => {
|
|
70
77
|
this.#files.clear();
|
|
71
78
|
this.#dirs.clear();
|
|
72
79
|
this.#unreadable.clear();
|
|
80
|
+
this.#unsettled.clear();
|
|
73
81
|
await Promise.all(this.#roots.map((root) => this.#walk(root, null)));
|
|
74
82
|
this.#primed = true;
|
|
75
83
|
});
|
|
@@ -133,7 +141,7 @@ class SourceMtimeIndex {
|
|
|
133
141
|
}));
|
|
134
142
|
}
|
|
135
143
|
async#collectDirChanges(changed) {
|
|
136
|
-
const moved =
|
|
144
|
+
const moved = new Set;
|
|
137
145
|
const gone = [];
|
|
138
146
|
await Promise.all([...this.#dirs.entries()].map(async ([dir, mtimeMs]) => {
|
|
139
147
|
const { stats, err } = await SourceMtimeIndex.#statPath(dir);
|
|
@@ -146,8 +154,11 @@ class SourceMtimeIndex {
|
|
|
146
154
|
return;
|
|
147
155
|
}
|
|
148
156
|
if (stats.mtimeMs !== mtimeMs)
|
|
149
|
-
moved.
|
|
157
|
+
moved.add(dir);
|
|
150
158
|
}));
|
|
159
|
+
for (const dir of this.#unsettled)
|
|
160
|
+
if (this.#dirs.has(dir))
|
|
161
|
+
moved.add(dir);
|
|
151
162
|
for (const dir of gone)
|
|
152
163
|
this.#forget(dir);
|
|
153
164
|
for (const dir of moved)
|
|
@@ -169,6 +180,10 @@ class SourceMtimeIndex {
|
|
|
169
180
|
const known = this.#dirs.has(dir);
|
|
170
181
|
this.#dirs.set(dir, dirStats.mtimeMs);
|
|
171
182
|
this.#unreadable.delete(dir);
|
|
183
|
+
if (this.#isUnsettled(dirStats.mtimeMs))
|
|
184
|
+
this.#unsettled.add(dir);
|
|
185
|
+
else
|
|
186
|
+
this.#unsettled.delete(dir);
|
|
172
187
|
const descend = [];
|
|
173
188
|
const present = new Set;
|
|
174
189
|
let blind = false;
|
|
@@ -208,24 +223,34 @@ class SourceMtimeIndex {
|
|
|
208
223
|
changed?.add(abs);
|
|
209
224
|
}
|
|
210
225
|
}
|
|
211
|
-
if (blind)
|
|
226
|
+
if (blind) {
|
|
212
227
|
this.#dirs.set(dir, UNREADABLE);
|
|
228
|
+
this.#unsettled.delete(dir);
|
|
229
|
+
}
|
|
213
230
|
await Promise.all(descend.filter((sub) => !this.#dirs.has(sub)).map((sub) => this.#walk(sub, changed)));
|
|
214
231
|
}
|
|
215
232
|
#markUnreadable(dir, err) {
|
|
216
233
|
this.#dirs.set(dir, UNREADABLE);
|
|
217
234
|
this.#unreadable.set(dir, err.code ?? "EUNKNOWN");
|
|
235
|
+
this.#unsettled.delete(dir);
|
|
218
236
|
}
|
|
219
237
|
#forget(dir) {
|
|
220
238
|
const prefix = `${dir}${path2.sep}`;
|
|
221
239
|
this.#dirs.delete(dir);
|
|
222
240
|
this.#unreadable.delete(dir);
|
|
241
|
+
this.#unsettled.delete(dir);
|
|
223
242
|
for (const known of [...this.#dirs.keys()])
|
|
224
243
|
if (known.startsWith(prefix))
|
|
225
244
|
this.#dirs.delete(known);
|
|
226
245
|
for (const known of [...this.#unreadable.keys()])
|
|
227
246
|
if (known.startsWith(prefix))
|
|
228
247
|
this.#unreadable.delete(known);
|
|
248
|
+
for (const known of [...this.#unsettled])
|
|
249
|
+
if (known.startsWith(prefix))
|
|
250
|
+
this.#unsettled.delete(known);
|
|
251
|
+
}
|
|
252
|
+
#isUnsettled(mtimeMs) {
|
|
253
|
+
return Math.abs(Date.now() - mtimeMs) < this.#dirSettleMs;
|
|
229
254
|
}
|
|
230
255
|
static async#statPath(abs) {
|
|
231
256
|
try {
|
|
@@ -431,6 +456,8 @@ class HmrWatcher {
|
|
|
431
456
|
await this.#mergeDetectedChanges();
|
|
432
457
|
if (this.#pending.size > 0)
|
|
433
458
|
await this.#drain();
|
|
459
|
+
else if (this.#index.hasUnsettledDirs)
|
|
460
|
+
this.#scheduleVerify();
|
|
434
461
|
}
|
|
435
462
|
}
|
|
436
463
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
RepairRunner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-81epkybm.js";
|
|
5
5
|
import {
|
|
6
6
|
WorkflowRunner
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-1b9f27pm.js";
|
|
8
8
|
import {
|
|
9
9
|
ScalarScript
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-d2e2y85b.js";
|
|
11
11
|
import {
|
|
12
12
|
PrimitiveScript
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-m04as81s.js";
|
|
14
14
|
import {
|
|
15
15
|
ModuleScript
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-h6pevatb.js";
|
|
17
17
|
import {
|
|
18
18
|
isPlaceholderAppId
|
|
19
19
|
} from "./index-hk58kr1m.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
CommandContainer,
|
|
46
46
|
runner,
|
|
47
47
|
script
|
|
48
|
-
} from "./index-
|
|
48
|
+
} from "./index-phj3ewxv.js";
|
|
49
49
|
import {
|
|
50
50
|
AppExecutor
|
|
51
51
|
} from "./index-0t7pwff2.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zw4aqvwh.js";
|
|
5
5
|
import {
|
|
6
6
|
AiSession,
|
|
7
7
|
CloudApi,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./index-5vvwc0cz.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-n2mp0f48.js";
|
|
13
13
|
import {
|
|
14
14
|
PackageScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-p9f1rpbp.js";
|
|
16
16
|
import {
|
|
17
17
|
script
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-phj3ewxv.js";
|
|
19
19
|
import {
|
|
20
20
|
PkgExecutor
|
|
21
21
|
} from "./index-0t7pwff2.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
PageScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-qacv44mm.js";
|
|
5
5
|
import {
|
|
6
6
|
pluralizeName
|
|
7
7
|
} from "./index-ss469dec.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
runner,
|
|
24
24
|
script
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-phj3ewxv.js";
|
|
26
26
|
import {
|
|
27
27
|
ModuleExecutor
|
|
28
28
|
} from "./index-0t7pwff2.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ModuleScript
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-h6pevatb.js";
|
|
5
5
|
import {
|
|
6
6
|
addFieldUiPolicyForType,
|
|
7
7
|
coerceFieldDefault,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "./index-2v10yr8g.js";
|
|
38
38
|
import {
|
|
39
39
|
script
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-phj3ewxv.js";
|
|
41
41
|
import {
|
|
42
42
|
AppExecutor,
|
|
43
43
|
LibExecutor,
|