@akanjs/cli 3.1.1-rc.0 → 3.1.1-rc.2
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/{CodeAgent-4pnxwptq.js → CodeAgent-8hfzq1zs.js} +2 -2
- package/{CodeTui-hhndze8h.js → CodeTui-kj6ng91g.js} +1 -1
- package/TunnelShare-ycmz33ve.js +14 -0
- package/{agent.command-p02330r6.js → agent.command-2gay26y4.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-ywks5ywm.js → application.command-a3aepayy.js} +16 -11
- package/{applicationBuildRunner-9cnnsdm5.js → applicationBuildRunner-xye2sqrm.js} +5 -5
- package/buildBatch.proc.js +5 -5
- package/{cloud.command-1tzkvje1.js → cloud.command-t2zdcw87.js} +13 -13
- package/cloud.script-mm636g83.js +24 -0
- package/{code.command-16pm1p2v.js → code.command-184jfjtk.js} +6 -6
- package/{context.command-6ys86sqf.js → context.command-kx0kzz3t.js} +16 -16
- package/context.runner-d7dhvbc7.js +25 -0
- package/{guideline.command-3zay3d8g.js → guideline.command-72psmnpx.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +7 -3
- package/guidelines/mcpRule/mcpRule.instruction.md +13 -6
- package/guidelines/pageRule/pageRule.instruction.md +13 -5
- package/guidelines/runtimeRule/runtimeRule.instruction.md +8 -2
- package/guidelines/ssrRule/ssrRule.instruction.md +6 -1
- package/guidelines/transportRule/transportRule.instruction.md +12 -5
- package/incrementalBuilder.proc.js +3 -3
- package/{index-sh9mmp5v.js → index-0dnv1039.js} +7 -7
- package/{index-jgs8z8xb.js → index-0fpeb7x7.js} +1 -1
- package/{index-b5vptvnt.js → index-3wfw8jb8.js} +4 -4
- package/{index-q8age5az.js → index-4g6te8sa.js} +2 -2
- package/{index-sng3vt0p.js → index-4q1amb3p.js} +2 -2
- package/{index-zn6bn1s2.js → index-5anqj3bm.js} +4 -4
- package/{index-ynqxpwx6.js → index-9z37veck.js} +1 -1
- package/{index-p4dnj2wc.js → index-azrhhgtb.js} +1 -1
- package/{index-4w3skd33.js → index-bxjacq5c.js} +3 -3
- package/{index-ngpn9hzy.js → index-eyhqttvh.js} +2 -2
- package/{index-kcbq2qcf.js → index-ggfjqpp4.js} +1 -1
- package/{index-bb4hj03s.js → index-hqaa4y3y.js} +8 -8
- package/{index-1f33g2z5.js → index-hrc7q2e6.js} +17 -12
- package/{index-qtkycaqn.js → index-jn8gfj2b.js} +30 -15
- package/{index-e9e9cebg.js → index-kb51mayy.js} +3 -3
- package/{index-z6v7k9sb.js → index-md6026rp.js} +2 -2
- package/{index-tk3jg2bm.js → index-mtf0cx8t.js} +2 -2
- package/{index-g2s33373.js → index-q0e6604h.js} +1 -1
- package/{index-1mfyyxh5.js → index-qp73c26e.js} +3 -3
- package/{index-vg28jsf9.js → index-rqcmr940.js} +172 -70
- package/{index-z9xepn8t.js → index-s28awecf.js} +3 -3
- package/{index-jaa81e9r.js → index-ssseyt0n.js} +4 -4
- package/{index-qkcwsg6r.js → index-sxqjxb4j.js} +2 -2
- package/{index-rr7jk14m.js → index-trjhp735.js} +8 -5
- package/{index-9hbhm6cs.js → index-v1gz5vja.js} +1 -1
- package/{index-68c3gzvg.js → index-x6c29k5m.js} +7 -7
- package/{index-ekpp5tax.js → index-xhnw8n74.js} +1 -1
- package/{index-fmder14z.js → index-yaz7yks8.js} +1 -1
- package/{index-qfzfaq96.js → index-zz5731qs.js} +3 -3
- package/index.js +22 -22
- package/{library.command-a8n9h8j4.js → library.command-tnxw0yb4.js} +3 -3
- package/{localRegistry.command-1e6m7w2f.js → localRegistry.command-dy0byd6z.js} +12 -12
- package/{module.command-b6f1p1xa.js → module.command-8pjk6vmm.js} +5 -5
- package/{package.command-tc27ftmy.js → package.command-b831nx2n.js} +3 -3
- package/package.json +2 -2
- package/{page.command-m5wyqfkd.js → page.command-earjccmn.js} +3 -3
- package/{pipeline.command-4qxyafpz.js → pipeline.command-yt8bq91c.js} +2 -2
- package/{primitive.command-9yaatk0d.js → primitive.command-8dw8ra1x.js} +6 -6
- package/{projectTypecheck-87k6z6ab.js → projectTypecheck-btbw3nyf.js} +1 -1
- package/{quality.command-ht1wjhv8.js → quality.command-j2c4a2zg.js} +387 -73
- package/{repair.command-evg9g911.js → repair.command-7jv7bgc4.js} +5 -5
- package/{scalar.command-xsejjeq1.js → scalar.command-vwjk94zr.js} +4 -4
- package/{subspace.command-ps12q5y7.js → subspace.command-xjw4tc0p.js} +8 -8
- package/templates/env/_env.server.type.ts +10 -5
- package/templates/facetIndex/index.ts +2 -2
- package/{tunnel.command-khzgvrj8.js → tunnel.command-zm29dgkr.js} +7 -7
- package/{workflow.command-qpyq0ya5.js → workflow.command-nyjc1mxx.js} +10 -10
- package/{workspace.command-3dq7e9g2.js → workspace.command-rq7mgq6f.js} +27 -25
- package/TunnelShare-zmq6bbar.js +0 -14
- package/cloud.script-8g83xqdg.js +0 -24
- package/context.runner-3jrypwe3.js +0 -25
|
@@ -22,26 +22,26 @@ import {
|
|
|
22
22
|
renderWorkflowApply,
|
|
23
23
|
renderWorkflowValidation,
|
|
24
24
|
renderWorkflowRunArtifact
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-9z37veck.js";
|
|
26
26
|
import {
|
|
27
27
|
AkanContextAnalyzer
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-md6026rp.js";
|
|
29
29
|
import {
|
|
30
30
|
CommandContainer,
|
|
31
31
|
runner
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-azrhhgtb.js";
|
|
33
33
|
import {
|
|
34
34
|
ModuleScript
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-3wfw8jb8.js";
|
|
36
36
|
import {
|
|
37
37
|
PrimitiveScript
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-5anqj3bm.js";
|
|
39
39
|
import {
|
|
40
40
|
spawnShell
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-zz5731qs.js";
|
|
42
42
|
import {
|
|
43
43
|
ScalarScript
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-4q1amb3p.js";
|
|
45
45
|
|
|
46
46
|
// pkgs/@akanjs/cli/workflow/workflow.runner.ts
|
|
47
47
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-azrhhgtb.js";
|
|
6
6
|
import {
|
|
7
7
|
ModuleExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-trjhp735.js";
|
|
9
9
|
import {
|
|
10
10
|
sourceFile,
|
|
11
11
|
moduleSourcePaths,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
createPassedPrimitiveReport,
|
|
14
14
|
bilingualLabelForField,
|
|
15
15
|
bilingualDescriptionForField
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-9z37veck.js";
|
|
17
17
|
import {
|
|
18
18
|
PageScript
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-q0e6604h.js";
|
|
20
20
|
import {
|
|
21
21
|
pluralizeName
|
|
22
22
|
} from "./index-nz8prx9g.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
resolveSsrPageEntriesForApp
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-trjhp735.js";
|
|
5
5
|
import {
|
|
6
6
|
bundleDefine,
|
|
7
7
|
CsrEntryFiles,
|
|
8
8
|
PagesEntrySourceGenerator,
|
|
9
9
|
PagesBundleBuilder
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-0fpeb7x7.js";
|
|
11
11
|
|
|
12
12
|
// pkgs/@akanjs/devkit/frontendBuild/csrArtifactBuilder.ts
|
|
13
13
|
import { mkdir as mkdir2, rm as rm2, unlink as unlink2 } from "fs/promises";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-azrhhgtb.js";
|
|
6
6
|
import {
|
|
7
7
|
generatedFilesForSync,
|
|
8
8
|
createPassedPrimitiveReport,
|
|
9
9
|
scalarChangedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-9z37veck.js";
|
|
11
11
|
import {
|
|
12
12
|
pluralizeName
|
|
13
13
|
} from "./index-nz8prx9g.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-azrhhgtb.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor,
|
|
7
7
|
LibExecutor,
|
|
8
8
|
ModuleExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-trjhp735.js";
|
|
10
10
|
import {
|
|
11
11
|
workflowStatus,
|
|
12
12
|
compactDiagnostics,
|
|
@@ -41,10 +41,10 @@ import {
|
|
|
41
41
|
hasSignalFactoryEntry,
|
|
42
42
|
insertSignalFactoryEntry,
|
|
43
43
|
addFieldUiPolicyForType
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-9z37veck.js";
|
|
45
45
|
import {
|
|
46
46
|
ModuleScript
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-3wfw8jb8.js";
|
|
48
48
|
|
|
49
49
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
50
50
|
import { capitalize, lowerlize } from "akanjs/common";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
LibExecutor,
|
|
11
11
|
PkgExecutor,
|
|
12
12
|
ModuleExecutor
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-trjhp735.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
|
|
16
16
|
var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
McpServerConfig,
|
|
6
6
|
McpSignIn,
|
|
7
7
|
AkanCodeCompaction2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-v1gz5vja.js";
|
|
9
9
|
import {
|
|
10
10
|
stripAnsi
|
|
11
11
|
} from "./index-7md2g9vw.js";
|
|
@@ -809,7 +809,7 @@ class AkanToolPack2 {
|
|
|
809
809
|
return { name: "akan-tools", factory: async (pi) => await this.#register(pi) };
|
|
810
810
|
}
|
|
811
811
|
async names() {
|
|
812
|
-
const { ContextRunner } = await import("./context.runner-
|
|
812
|
+
const { ContextRunner } = await import("./context.runner-d7dhvbc7.js");
|
|
813
813
|
return [
|
|
814
814
|
...new ContextRunner().listMcpTools(this.#options.mode).map((tool) => tool.name),
|
|
815
815
|
AkanToolPack2.verifyToolName
|
|
@@ -817,7 +817,7 @@ class AkanToolPack2 {
|
|
|
817
817
|
}
|
|
818
818
|
static verifyToolName = "akan_verify";
|
|
819
819
|
async#register(pi) {
|
|
820
|
-
const { ContextRunner } = await import("./context.runner-
|
|
820
|
+
const { ContextRunner } = await import("./context.runner-d7dhvbc7.js");
|
|
821
821
|
const runner = new ContextRunner;
|
|
822
822
|
const guidelineNames = await AkanToolPack2.#guidelineNames();
|
|
823
823
|
for (const tool of runner.listMcpTools(this.#options.mode, { guidelineNames })) {
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
CsrDevPaths,
|
|
20
20
|
PagesEntrySourceGenerator,
|
|
21
21
|
PagesBundleBuilder
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-0fpeb7x7.js";
|
|
23
23
|
import {
|
|
24
24
|
AsyncDefaultExportDetector,
|
|
25
25
|
resolveSsrPageEntriesForApp
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-trjhp735.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
|
|
29
29
|
import { readdir, readFile, stat } from "fs/promises";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-trjhp735.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText,
|
|
7
7
|
createWorkflowBaselineSummary,
|
|
8
8
|
buildAkanModuleContextIndex,
|
|
9
9
|
toolingRolloutGate
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-9z37veck.js";
|
|
11
11
|
import {
|
|
12
12
|
buildResourceList,
|
|
13
13
|
codexMcpConfigPath,
|
|
@@ -17,29 +17,29 @@ import {
|
|
|
17
17
|
upsertCodexMcpServerBlock,
|
|
18
18
|
renderDoctorText,
|
|
19
19
|
AkanContextAnalyzer
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-md6026rp.js";
|
|
21
21
|
import {
|
|
22
22
|
runner
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-azrhhgtb.js";
|
|
24
24
|
import {
|
|
25
25
|
isPlaceholderAppId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-xhnw8n74.js";
|
|
27
27
|
import {
|
|
28
28
|
getMobileTargets,
|
|
29
29
|
appIdsOf
|
|
30
30
|
} from "./index-m9jj544v.js";
|
|
31
31
|
import {
|
|
32
32
|
NativeApp
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-s28awecf.js";
|
|
34
34
|
import {
|
|
35
35
|
Prompter2
|
|
36
36
|
} from "./index-zzvvc845.js";
|
|
37
37
|
import {
|
|
38
38
|
RepairRunner
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-zz5731qs.js";
|
|
40
40
|
import {
|
|
41
41
|
WorkflowRunner
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-0dnv1039.js";
|
|
43
43
|
|
|
44
44
|
// pkgs/@akanjs/devkit/akanMcpContract.ts
|
|
45
45
|
import path from "path";
|
|
@@ -9,14 +9,17 @@ import {
|
|
|
9
9
|
NativePublicEnv,
|
|
10
10
|
UpdatePackFolder,
|
|
11
11
|
NativeApp
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-s28awecf.js";
|
|
13
13
|
import {
|
|
14
14
|
ExitCodeError
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-azrhhgtb.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigLock
|
|
18
18
|
} from "./index-bqbf654f.js";
|
|
19
19
|
|
|
20
|
+
// pkgs/@akanjs/devkit/cloud/cloudApi.ts
|
|
21
|
+
import { isRecord as isRecord2 } from "akanjs/common";
|
|
22
|
+
|
|
20
23
|
// pkgs/@akanjs/devkit/cloud/cloudHttpError.ts
|
|
21
24
|
import { isRecord } from "akanjs/common";
|
|
22
25
|
|
|
@@ -278,6 +281,7 @@ class CloudApi {
|
|
|
278
281
|
return new Error(`${unavailable}: ${errKey}.`, { cause: error });
|
|
279
282
|
return error;
|
|
280
283
|
}
|
|
284
|
+
static #remoteAuthTimeoutMs = 20000;
|
|
281
285
|
#api;
|
|
282
286
|
#accessToken = null;
|
|
283
287
|
#workspace;
|
|
@@ -345,11 +349,14 @@ class CloudApi {
|
|
|
345
349
|
return localPath;
|
|
346
350
|
}
|
|
347
351
|
async getRemoteAuthToken(remoteId) {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
352
|
+
const answer = await this.#api.get(`/getRemoteAuthToken/${encodeURIComponent(remoteId)}`, {
|
|
353
|
+
signal: AbortSignal.timeout(CloudApi.#remoteAuthTimeoutMs)
|
|
354
|
+
});
|
|
355
|
+
if (answer === null)
|
|
351
356
|
return null;
|
|
352
|
-
|
|
357
|
+
if (!isRecord2(answer) || typeof answer.jwt !== "string" || !answer.jwt)
|
|
358
|
+
throw new Error(`${this.host} answered the sign-in poll with something other than a session.`);
|
|
359
|
+
return this.#authorize(answer);
|
|
353
360
|
}
|
|
354
361
|
async refreshAuthToken(refreshToken) {
|
|
355
362
|
return this.#authorize(await this.#api.post(`/refreshAuthToken`, { refreshToken }, { signal: AbortSignal.timeout(20000) }));
|
|
@@ -364,11 +371,9 @@ class CloudApi {
|
|
|
364
371
|
return await this.#api.post(`/tunnel/revokeTunnel`, { code }, { signal: AbortSignal.timeout(5000) });
|
|
365
372
|
}
|
|
366
373
|
async getRemoteSelf() {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
374
|
+
return await this.#api.get(`/getRemoteSelf`, {
|
|
375
|
+
signal: AbortSignal.timeout(CloudApi.#remoteAuthTimeoutMs)
|
|
376
|
+
});
|
|
372
377
|
}
|
|
373
378
|
}
|
|
374
379
|
// pkgs/@akanjs/devkit/cloud/cloudUpdates.ts
|
|
@@ -664,4 +669,4 @@ class PipelineSecrets {
|
|
|
664
669
|
throw new Error(`--branch ${branch} is not a deployed branch: ${PipelineSecrets.#secretBranches.join(", ")}.`);
|
|
665
670
|
}
|
|
666
671
|
}
|
|
667
|
-
export { getDefaultHostConfig, GlobalConfig, CloudApi, CloudUpdates, PipelineSecrets };
|
|
672
|
+
export { CloudHttpError, getDefaultHostConfig, GlobalConfig, CloudApi, CloudUpdates, PipelineSecrets };
|
|
@@ -41,19 +41,20 @@ import {
|
|
|
41
41
|
script,
|
|
42
42
|
markCliErrorPrinted,
|
|
43
43
|
assertPromptable
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-azrhhgtb.js";
|
|
45
45
|
import {
|
|
46
46
|
AppInfo,
|
|
47
47
|
CommandExecutionError,
|
|
48
48
|
WorkspaceExecutor,
|
|
49
|
+
SysExecutor,
|
|
49
50
|
AppExecutor,
|
|
50
51
|
LibExecutor,
|
|
51
52
|
PkgExecutor
|
|
52
|
-
} from "./index-
|
|
53
|
+
} from "./index-trjhp735.js";
|
|
53
54
|
import {
|
|
54
55
|
DesktopServerStage,
|
|
55
56
|
UpdateUploader
|
|
56
|
-
} from "./index-
|
|
57
|
+
} from "./index-xhnw8n74.js";
|
|
57
58
|
import {
|
|
58
59
|
resolveMobileTargets,
|
|
59
60
|
resolveAppId
|
|
@@ -62,17 +63,17 @@ import {
|
|
|
62
63
|
NativePublicEnv,
|
|
63
64
|
UpdatePackFolder,
|
|
64
65
|
NativeApp
|
|
65
|
-
} from "./index-
|
|
66
|
+
} from "./index-s28awecf.js";
|
|
66
67
|
import {
|
|
67
68
|
LibraryScript
|
|
68
|
-
} from "./index-
|
|
69
|
+
} from "./index-sxqjxb4j.js";
|
|
69
70
|
import {
|
|
70
71
|
stripAnsi
|
|
71
72
|
} from "./index-7md2g9vw.js";
|
|
72
73
|
import {
|
|
73
74
|
SlicePlanner,
|
|
74
75
|
formatSlicePlan
|
|
75
|
-
} from "./index-
|
|
76
|
+
} from "./index-yaz7yks8.js";
|
|
76
77
|
import {
|
|
77
78
|
openBrowser
|
|
78
79
|
} from "./index-9dp031by.js";
|
|
@@ -82,7 +83,7 @@ import { confirm } from "@inquirer/prompts";
|
|
|
82
83
|
import { Logger as Logger6, toError as toError2 } from "akanjs/common";
|
|
83
84
|
|
|
84
85
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
85
|
-
import { realpathSync } from "fs";
|
|
86
|
+
import { existsSync, realpathSync } from "fs";
|
|
86
87
|
import path5 from "path";
|
|
87
88
|
|
|
88
89
|
// pkgs/@akanjs/devkit/akanApp/akanApp.host.ts
|
|
@@ -1899,7 +1900,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
|
|
|
1899
1900
|
|
|
1900
1901
|
// pkgs/@akanjs/cli/application/application.runner.ts
|
|
1901
1902
|
import { Logger as Logger3, toError } from "akanjs/common";
|
|
1902
|
-
var loadBuildRunner = async () => (await import("./applicationBuildRunner-
|
|
1903
|
+
var loadBuildRunner = async () => (await import("./applicationBuildRunner-xye2sqrm.js")).ApplicationBuildRunner;
|
|
1903
1904
|
var loadPrompts = async () => await import("@inquirer/prompts");
|
|
1904
1905
|
|
|
1905
1906
|
class ApplicationRunner extends runner("application") {
|
|
@@ -2100,7 +2101,7 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
|
|
|
2100
2101
|
await new (await loadBuildRunner())(app).typecheck(options);
|
|
2101
2102
|
}
|
|
2102
2103
|
async typecheckLibrary(lib, options = {}) {
|
|
2103
|
-
const { ProjectTypecheck } = await import("./projectTypecheck-
|
|
2104
|
+
const { ProjectTypecheck } = await import("./projectTypecheck-btbw3nyf.js");
|
|
2104
2105
|
const root = lib.workspace.workspaceRoot;
|
|
2105
2106
|
await new ProjectTypecheck(lib.cwdPath, root, { ...process.env, AKAN_WORKSPACE_ROOT: root }).run([
|
|
2106
2107
|
"../../server.ts",
|
|
@@ -2111,7 +2112,20 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
|
|
|
2111
2112
|
"../../../../pkgs/akanjs/*/types/**/*.d.ts"
|
|
2112
2113
|
], options);
|
|
2113
2114
|
}
|
|
2114
|
-
|
|
2115
|
+
resolveTestPaths(exec, files) {
|
|
2116
|
+
const root = exec instanceof SysExecutor || exec instanceof PkgExecutor ? exec.workspace.workspaceRoot : process.cwd();
|
|
2117
|
+
const target = path5.relative(root, exec.cwdPath).split(path5.sep).join("/");
|
|
2118
|
+
const isInside = (relative) => relative !== ".." && !relative.startsWith(`..${path5.sep}`) && !path5.isAbsolute(relative);
|
|
2119
|
+
return files.map((file) => {
|
|
2120
|
+
const candidates = path5.isAbsolute(file) ? [file] : [path5.resolve(exec.cwdPath, file), path5.resolve(root, file)];
|
|
2121
|
+
const existing = candidates.filter((candidate) => existsSync(candidate)).map((candidate) => path5.relative(exec.cwdPath, candidate));
|
|
2122
|
+
const found = existing.find(isInside);
|
|
2123
|
+
if (found === undefined)
|
|
2124
|
+
throw new Error(existing.length ? `${file} is outside ${target}: akan test ${exec.name} runs its own tests only` : `${file} names no file or folder in ${target}`);
|
|
2125
|
+
return `./${found.split(path5.sep).join("/")}`;
|
|
2126
|
+
});
|
|
2127
|
+
}
|
|
2128
|
+
async test(exec, testPaths = []) {
|
|
2115
2129
|
const isSignalTarget = exec instanceof AppExecutor || exec instanceof LibExecutor;
|
|
2116
2130
|
const preloadPath = isSignalTarget ? await resolveSignalTestPreloadPath(exec) : null;
|
|
2117
2131
|
const env = isSignalTarget ? {
|
|
@@ -2121,7 +2135,7 @@ if (loaded) process.exitCode = await loaded.migrations.command(loaded.server, ar
|
|
|
2121
2135
|
AKAN_TEST_LIBS: exec.getScanInfo({ allowEmpty: true })?.getLibs().join(",") ?? "",
|
|
2122
2136
|
AKAN_RUNTIME_DIR: path5.join(exec.workspace.workspaceRoot, "local", `${exec.type}s`, exec.name, "runtime")
|
|
2123
2137
|
} : {};
|
|
2124
|
-
const args =
|
|
2138
|
+
const args = ["test", "--isolate", ...preloadPath ? ["--preload", preloadPath] : [], ...testPaths];
|
|
2125
2139
|
await exec.spawn("bun", args, {
|
|
2126
2140
|
...isSignalTarget ? { env: { ...process.env, ...env } } : {},
|
|
2127
2141
|
stdio: "inherit"
|
|
@@ -3437,14 +3451,15 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3437
3451
|
throw error;
|
|
3438
3452
|
}
|
|
3439
3453
|
}
|
|
3440
|
-
async test(exec, { write = true } = {}) {
|
|
3454
|
+
async test(exec, { write = true, files = [] } = {}) {
|
|
3455
|
+
const testPaths = this.applicationRunner.resolveTestPaths(exec, files);
|
|
3441
3456
|
if (exec instanceof LibExecutor) {
|
|
3442
3457
|
if (write)
|
|
3443
3458
|
await this.libraryScript.syncLibrary(exec);
|
|
3444
3459
|
else
|
|
3445
3460
|
await exec.scan({ write: false });
|
|
3446
3461
|
exec.spinning(`Preparing ${exec.name}...`).succeed(`${exec.name} prepared`);
|
|
3447
|
-
await this.applicationRunner.test(exec);
|
|
3462
|
+
await this.applicationRunner.test(exec, testPaths);
|
|
3448
3463
|
return;
|
|
3449
3464
|
}
|
|
3450
3465
|
const spinner = exec.spinning(`Preparing ${exec.name}...`);
|
|
@@ -3458,7 +3473,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3458
3473
|
spinner.fail(`${exec.name} prepare failed`);
|
|
3459
3474
|
throw error;
|
|
3460
3475
|
}
|
|
3461
|
-
await this.applicationRunner.test(exec);
|
|
3476
|
+
await this.applicationRunner.test(exec, testPaths);
|
|
3462
3477
|
}
|
|
3463
3478
|
async start(apps, {
|
|
3464
3479
|
open = false,
|
|
@@ -3691,7 +3706,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
|
|
|
3691
3706
|
await Promise.all(shares.map(async (share) => await share.close()));
|
|
3692
3707
|
}, "Abandoning the tunnel release; the shares expire on their own.");
|
|
3693
3708
|
await Promise.all(apps.map(async (app) => {
|
|
3694
|
-
const { TunnelShare } = await import("./TunnelShare-
|
|
3709
|
+
const { TunnelShare } = await import("./TunnelShare-ycmz33ve.js");
|
|
3695
3710
|
const share = await TunnelShare.open(app, { workspace: app.workspace });
|
|
3696
3711
|
shares.push(share);
|
|
3697
3712
|
urls.set(app.name, share.url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
resolveSsrPageEntriesForApp
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-trjhp735.js";
|
|
5
5
|
import {
|
|
6
6
|
computeRouteSeedIndex,
|
|
7
7
|
saveRouteSeedIndex,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ClientEntriesBundler,
|
|
10
10
|
VENDOR_SPECIFIERS,
|
|
11
11
|
RouteClientBuilder
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-eyhqttvh.js";
|
|
13
13
|
import {
|
|
14
14
|
SOURCE_EXTS
|
|
15
15
|
} from "./index-5nd1wtkv.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
createTsconfigPackageResolver,
|
|
20
20
|
rewriteBarrelImports,
|
|
21
21
|
PagesBundleBuilder
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-0fpeb7x7.js";
|
|
23
23
|
import {
|
|
24
24
|
CssBlockParser
|
|
25
25
|
} from "./index-62md4dwy.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isScannedRootEntry,
|
|
11
11
|
AppExecutor,
|
|
12
12
|
LibExecutor
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-trjhp735.js";
|
|
14
14
|
import {
|
|
15
15
|
FileSys2
|
|
16
16
|
} from "./index-52w0fvh8.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
workflowPathsForPlan,
|
|
24
24
|
workflowRunArtifactPath,
|
|
25
25
|
workflowSyncDir
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-9z37veck.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/devkit/akanContext.ts
|
|
29
29
|
import { readdir } from "fs/promises";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-azrhhgtb.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
8
|
} from "./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-trjhp735.js";
|
|
12
12
|
import {
|
|
13
13
|
TypeScriptDependencyScanner2
|
|
14
14
|
} from "./index-tvehn2sp.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-azrhhgtb.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_BLOCK_START,
|
|
8
8
|
AGENT_BLOCK_END,
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
CLAUDE_COMMENT_RULE,
|
|
14
14
|
AppExecutor,
|
|
15
15
|
LibExecutor
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-trjhp735.js";
|
|
17
17
|
import {
|
|
18
18
|
collectRecipeSources2,
|
|
19
19
|
scanRecipes2
|
|
20
20
|
} from "./index-hj6w4ka1.js";
|
|
21
21
|
import {
|
|
22
22
|
AkanContextAnalyzer
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-md6026rp.js";
|
|
24
24
|
import {
|
|
25
25
|
Prompter2
|
|
26
26
|
} from "./index-zzvvc845.js";
|