@akanjs/cli 3.1.2-rc.3 → 3.2.0-rc.0
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-n2tkg59z.js → CodeAgent-h6g8dg3a.js} +2 -2
- package/{CodeTui-9wsdx7ap.js → CodeTui-n9gacepn.js} +1 -1
- package/README.ko.md +9 -0
- package/README.md +9 -0
- package/TunnelShare-k3ja4w9x.js +14 -0
- package/{agent.command-tffz6wdn.js → agent.command-2f657613.js} +19 -17
- package/akanCode.js +2 -2
- package/{application.command-7bkxbrsp.js → application.command-yb8v177e.js} +45 -22
- package/{applicationBuildRunner-s13x3zqb.js → applicationBuildRunner-sctcmkyx.js} +57 -17
- package/buildBatch.proc.js +7 -7
- package/{cloud.command-a792bc10.js → cloud.command-et06ja22.js} +35 -18
- package/cloud.script-s6rbrwer.js +30 -0
- package/{code.command-ma8dtzww.js → code.command-7m67c7zc.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-80a1qhps.js → context.command-569z0rqf.js} +20 -19
- package/context.runner-ms8v1rxy.js +29 -0
- package/{guideline.command-195g0h9a.js → guideline.command-gnv3e8p8.js} +2 -2
- package/guidelines/akanApi/akanApi.instruction.md +317 -0
- package/guidelines/conventions/rules/app.md +5 -5
- package/guidelines/conventions/rules/config.md +1 -1
- package/guidelines/conventions/rules/gates.md +10 -5
- package/guidelines/conventions/rules/page.md +4 -2
- package/guidelines/conventions/rules/server.md +2 -0
- package/guidelines/conventions/rules/style.md +3 -1
- package/guidelines/conventions/rules/ts.md +2 -1
- package/guidelines/cssRule/cssRule.instruction.md +3 -1
- package/guidelines/pageRule/pageRule.instruction.md +3 -0
- package/incrementalBuilder.proc.js +70 -14
- package/{index-tns543wd.js → index-0fb3cpbt.js} +3 -3
- package/{index-zbrwnmf1.js → index-1q1cjn8s.js} +21 -11
- package/{index-wrmq92vk.js → index-3wjbhj2n.js} +1 -1
- package/{index-361ex3rb.js → index-48d5qsj3.js} +4 -4
- package/{index-aayg4dqf.js → index-5w9my9qe.js} +8 -8
- package/{index-1h2jc0x3.js → index-6wpaq392.js} +61 -15
- package/{index-tp56652m.js → index-7xdpww43.js} +69 -12
- package/index-7y5yghjg.js +2969 -0
- package/{index-zttm13c3.js → index-8g7tdsk4.js} +249 -696
- package/{index-m02tdq8a.js → index-8pb9yvp8.js} +63 -21
- package/{index-gbp1q1b5.js → index-8ts9774g.js} +4 -4
- package/{index-9zy8479y.js → index-93ewzmp6.js} +43 -14
- package/{index-zdpte1pj.js → index-9tbgb4d8.js} +1 -1
- package/index-abgh0jve.js +126 -0
- package/{index-khk05tsf.js → index-aj3ehkcx.js} +1 -1
- package/{index-84h43kg6.js → index-d4n1wmrz.js} +37 -4
- package/{index-gr9thy79.js → index-drz9e84d.js} +22 -8
- package/{index-hapx5myy.js → index-e3vmjtph.js} +2 -2
- package/{index-k64mhwbw.js → index-eajbmk10.js} +2 -1
- package/{index-0j1t1h2b.js → index-ed6ea0qp.js} +1 -1
- package/{index-sjabnf7j.js → index-fjr4d6yd.js} +444 -368
- package/index-hqrkqxx2.js +176 -0
- package/{index-z7kbxdqg.js → index-jdamtr7e.js} +3 -3
- package/{index-scck6h6d.js → index-kpdv34rq.js} +4 -4
- package/{index-ppvqy5bc.js → index-ktb3wcqz.js} +73 -34
- package/{index-sveq36gh.js → index-mmym5xmb.js} +4 -2
- package/{index-y4kcmbt2.js → index-mqntfzv5.js} +2 -2
- package/{index-4am4dvmf.js → index-ny2k80mv.js} +15 -3
- package/index-p6hjwt2d.js +1668 -0
- package/{index-wwe9rsrx.js → index-r0a604h4.js} +12 -2
- package/{index-jb2sreps.js → index-rc5fvqj2.js} +18 -18
- package/{index-db2nqrad.js → index-ryrm5z2c.js} +71 -19
- package/{index-eft5c2mp.js → index-s2grpzef.js} +331 -27
- package/{index-g500c5j9.js → index-sr5da35e.js} +33 -10
- package/{index-defp4gmb.js → index-sy481q2x.js} +1 -1
- package/{index-j9d3mjx1.js → index-thckcabc.js} +2 -2
- package/{index-9z3egsmg.js → index-vkzfk7qt.js} +25 -23
- package/index-w639tvkd.js +166 -0
- package/index-ygdbn9jn.js +122 -0
- package/{index-sp0qsr7a.js → index-zpv14wpy.js} +3 -3
- package/{index-sx91nf4z.js → index-zxsygkda.js} +18 -9
- package/index.js +24 -23
- package/{library.command-63hgt9te.js → library.command-1gp5qe3r.js} +3 -3
- package/{localRegistry.command-343ksmn9.js → localRegistry.command-v3g21rex.js} +25 -16
- package/{module.command-2hce9m6k.js → module.command-4xz9he6h.js} +6 -6
- package/{package.command-96eheyvd.js → package.command-s7qpnn1g.js} +12 -3
- package/package.json +2 -2
- package/{page.command-gs6d841d.js → page.command-fan34c49.js} +3 -3
- package/{pipeline.command-wdfvdbfj.js → pipeline.command-ph4fnn9w.js} +2 -2
- package/{primitive.command-7tdj12wn.js → primitive.command-3fqh8emf.js} +7 -7
- package/{projectTypecheck-kqj1t6hb.js → projectTypecheck-vkb40hjc.js} +1 -1
- package/{quality.command-29bgarh1.js → quality.command-ecj6exsh.js} +15 -10
- package/{repair.command-yng4rf5d.js → repair.command-fe9jw719.js} +6 -6
- package/{scalar.command-1nk4329t.js → scalar.command-cnvfhk0n.js} +5 -5
- package/skills/akan-debug/SKILL.md +2 -1
- package/skills/akan-page/SKILL.md +30 -2
- package/skills/akan-service/SKILL.md +77 -1
- package/{subspace.command-5cehmcdd.js → subspace.command-yxtt3v3e.js} +8 -8
- package/templates/app/lib/___appName__/__appName__.abstract.md.template +6 -0
- package/templates/app/page/_index.tsx +4 -284
- package/templates/app/page/_layout.tsx +1 -26
- package/templates/app/page/styles.css.template +58 -318
- package/templates/appSample/page/_index.tsx +281 -0
- package/templates/appSample/page/_layout.tsx +55 -0
- package/templates/appSample/page/styles.css.template +327 -0
- package/templates/libRoot/lib/___libName__/__libName__.abstract.md.template +6 -0
- package/templates/workspaceRoot/package.json.template +1 -12
- package/{tunnel.command-yrd4atqy.js → tunnel.command-ggj38mqf.js} +7 -7
- package/{typeChecker-j2jdnqsr.js → typeChecker-s640r6c0.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/{verify.command-kbq0fcg8.js → verify.command-w9ttxkdz.js} +16 -14
- package/{workflow.command-274qfa8z.js → workflow.command-ss8devj0.js} +12 -12
- package/{workspace.command-r6hgmawy.js → workspace.command-rw1p0xeq.js} +50 -38
- package/TunnelShare-6d7z36sr.js +0 -14
- package/cloud.script-t2n13gv6.js +0 -27
- package/context.runner-wxqb3qcy.js +0 -28
- package/index-j2dgmzbj.js +0 -1259
- package/index-p6x5b7hr.js +0 -839
- package/index-vzpnr12w.js +0 -65
- package/templates/workspaceRoot/patches/zod@3.25.76.patch.template +0 -22
- package/templates/workspaceRoot/patches/zod@4.4.3.patch.template +0 -11
- /package/templates/{app → appSample}/page/_overrides.tsx +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Black.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Bold.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-ExtraBold.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-ExtraLight.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Light.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Medium.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Regular.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
- /package/templates/{app → appSample}/public/fonts/Pretendard-Thin.woff2 +0 -0
- /package/templates/{app → appSample}/public/jelly/cloud.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/comet.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/moon.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/planet.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/rocket.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/star.webp +0 -0
- /package/templates/{app → appSample}/public/jelly/sugar.webp +0 -0
- /package/templates/{app → appSample}/public/logo.png +0 -0
- /package/templates/{app → appSample}/ui/Recipe/index.ts +0 -0
- /package/templates/{app → appSample}/ui/Recipe/jellyButton.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
WorkspaceExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sr5da35e.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText,
|
|
7
7
|
workflowPlanApproval,
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getWorkflowSpec,
|
|
20
20
|
compactWorkflowInputs,
|
|
21
21
|
createWorkflowPlan,
|
|
22
|
+
workflowTargetDiagnostics,
|
|
22
23
|
inspectWorkflowPlan,
|
|
23
24
|
renderWorkflowList,
|
|
24
25
|
renderWorkflowExplain,
|
|
@@ -26,30 +27,30 @@ import {
|
|
|
26
27
|
renderWorkflowApply,
|
|
27
28
|
renderWorkflowValidation,
|
|
28
29
|
renderWorkflowRunArtifact
|
|
29
|
-
} from "./index-
|
|
30
|
+
} from "./index-8pb9yvp8.js";
|
|
30
31
|
import {
|
|
31
32
|
AkanContextAnalyzer
|
|
32
|
-
} from "./index-
|
|
33
|
+
} from "./index-thckcabc.js";
|
|
33
34
|
import {
|
|
34
35
|
CommandContainer,
|
|
35
36
|
runner
|
|
36
|
-
} from "./index-
|
|
37
|
+
} from "./index-93ewzmp6.js";
|
|
37
38
|
import {
|
|
38
39
|
ModuleScript
|
|
39
|
-
} from "./index-
|
|
40
|
+
} from "./index-8ts9774g.js";
|
|
40
41
|
import {
|
|
41
42
|
PrimitiveScript
|
|
42
|
-
} from "./index-
|
|
43
|
+
} from "./index-48d5qsj3.js";
|
|
43
44
|
import {
|
|
44
45
|
spawnAkan,
|
|
45
46
|
isWorkspaceTarget
|
|
46
|
-
} from "./index-
|
|
47
|
+
} from "./index-0fb3cpbt.js";
|
|
47
48
|
import {
|
|
48
49
|
ScalarScript
|
|
49
|
-
} from "./index-
|
|
50
|
+
} from "./index-e3vmjtph.js";
|
|
50
51
|
import {
|
|
51
52
|
workflowSpecs
|
|
52
|
-
} from "./index-
|
|
53
|
+
} from "./index-eajbmk10.js";
|
|
53
54
|
|
|
54
55
|
// pkgs/@akanjs/cli/workflow/workflow.runner.ts
|
|
55
56
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
@@ -85,19 +86,17 @@ var failedPlan = (workflow, diagnostics) => ({
|
|
|
85
86
|
requiresApproval: true,
|
|
86
87
|
approval: workflowPlanApproval
|
|
87
88
|
});
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
});
|
|
100
|
-
};
|
|
89
|
+
var refusedApplyReport = (workflow, diagnostics, { plan, mode = "apply" } = {}) => createWorkflowApplyReport({
|
|
90
|
+
workflow,
|
|
91
|
+
mode,
|
|
92
|
+
changedFiles: [],
|
|
93
|
+
generatedFiles: [],
|
|
94
|
+
commands: [],
|
|
95
|
+
diagnostics,
|
|
96
|
+
nextActions: [],
|
|
97
|
+
plan: plan ?? failedPlan(workflow, diagnostics)
|
|
98
|
+
});
|
|
99
|
+
var failedApplyReport = (workflow, code, message, plan) => refusedApplyReport(workflow, [{ severity: "error", code, message }], { plan });
|
|
101
100
|
var inferValidationKind = (command) => {
|
|
102
101
|
if (command.kind)
|
|
103
102
|
return command.kind;
|
|
@@ -280,7 +279,7 @@ class WorkflowRunner extends runner("workflow") {
|
|
|
280
279
|
const spec = getWorkflowSpec(workflowSpecs, workflow);
|
|
281
280
|
if (!spec)
|
|
282
281
|
throw new Error(`Unknown workflow: ${workflow}. Run \`akan workflow list\` to see available workflows.`);
|
|
283
|
-
const plan = await inspectWorkflowPlan(workspace ?? WorkspaceExecutor.fromRoot(), createWorkflowPlan(spec, compactWorkflowInputs(inputs)));
|
|
282
|
+
const plan = await inspectWorkflowPlan(workspace ?? WorkspaceExecutor.fromRoot(), spec, createWorkflowPlan(spec, compactWorkflowInputs(inputs)));
|
|
284
283
|
if (out) {
|
|
285
284
|
const outPath = resolvePath(out);
|
|
286
285
|
await mkdir(path.dirname(outPath), { recursive: true });
|
|
@@ -320,6 +319,9 @@ class WorkflowRunner extends runner("workflow") {
|
|
|
320
319
|
const message = inputErrors.map((diagnostic) => diagnostic.message).join(" ");
|
|
321
320
|
return await renderApplyReport(failedApplyReport(plan.workflow, "workflow-plan-inputs-invalid", message, plan));
|
|
322
321
|
}
|
|
322
|
+
const targetErrors = await workflowTargetDiagnostics(workspace ?? WorkspaceExecutor.fromRoot(), spec, plan.inputs);
|
|
323
|
+
if (targetErrors.length)
|
|
324
|
+
return await renderApplyReport(refusedApplyReport(plan.workflow, targetErrors, { plan, mode: dryRun ? "dry-run" : "apply" }));
|
|
323
325
|
plan = { ...plan, steps: spec.steps, validation: spec.validation };
|
|
324
326
|
if (dryRun)
|
|
325
327
|
return await renderApplyReport(createDryRunWorkflowApplyReport(plan));
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
AkanGraphDiff,
|
|
4
|
+
AkanIndex
|
|
5
|
+
} from "./index-7y5yghjg.js";
|
|
6
|
+
import {
|
|
7
|
+
GitRevision
|
|
8
|
+
} from "./index-ygdbn9jn.js";
|
|
9
|
+
|
|
10
|
+
// pkgs/@akanjs/devkit/workspaceGraph.ts
|
|
11
|
+
import { readFile } from "fs/promises";
|
|
12
|
+
import path from "path";
|
|
13
|
+
import ts from "typescript";
|
|
14
|
+
var indexedPath = /^(apps|libs)\/(?!(?:.*\/)?(?:node_modules|dist|\.akan|env)\/).*\.tsx?$/;
|
|
15
|
+
var hiddenPath = /(?:^|\/)(?:node_modules|dist|\.akan|env)\//;
|
|
16
|
+
var unscopedNodeLimit = 600;
|
|
17
|
+
var pageKinds = new Set(["route", "layout"]);
|
|
18
|
+
var cachedBaseLimit = 4;
|
|
19
|
+
var slashed = (fileName) => fileName.replace(/\\/g, "/");
|
|
20
|
+
|
|
21
|
+
class WorkspaceGraph {
|
|
22
|
+
static #bases = new Map;
|
|
23
|
+
static async build(workspace, { digests = false } = {}) {
|
|
24
|
+
const root = workspace.workspaceRoot;
|
|
25
|
+
const files = (await workspace.getAllFiles("{apps,libs}/**/*.{ts,tsx}")).map(slashed).filter((file) => indexedPath.test(file));
|
|
26
|
+
return WorkspaceGraph.#graphOf(root, await WorkspaceGraph.#textsOf(root, files), digests);
|
|
27
|
+
}
|
|
28
|
+
static async#textsOf(root, files) {
|
|
29
|
+
const read = await Promise.all(files.map(async (file) => [file, await readFile(path.join(root, file), "utf8").catch(() => null)]));
|
|
30
|
+
return new Map(read.filter((entry) => entry[1] !== null));
|
|
31
|
+
}
|
|
32
|
+
static async changes(workspace, since) {
|
|
33
|
+
const forkPoint = await new GitRevision(workspace.workspaceRoot).forkPointOf(since);
|
|
34
|
+
if (forkPoint.error !== undefined)
|
|
35
|
+
return { error: forkPoint.error };
|
|
36
|
+
return await WorkspaceGraph.changesAt(workspace, forkPoint.sha);
|
|
37
|
+
}
|
|
38
|
+
static async changesAt(workspace, sha) {
|
|
39
|
+
const root = workspace.workspaceRoot;
|
|
40
|
+
const git = new GitRevision(root);
|
|
41
|
+
const [before, after, files] = await Promise.all([
|
|
42
|
+
WorkspaceGraph.#baseAt(root, sha),
|
|
43
|
+
git.workingFiles().then((working) => WorkspaceGraph.#textsOf(root, working.filter((file) => indexedPath.test(file)))).then((texts) => WorkspaceGraph.#graphOf(root, texts, true)),
|
|
44
|
+
git.changedFilesSince(sha)
|
|
45
|
+
]);
|
|
46
|
+
const changes = AkanGraphDiff.between(before, after);
|
|
47
|
+
const mapped = new Set([
|
|
48
|
+
...changes.nodes.filter((node) => node.change).flatMap((node) => [
|
|
49
|
+
node.at?.file,
|
|
50
|
+
...(node.fields ?? []).filter((field) => field.change).map(({ at }) => at.file)
|
|
51
|
+
]),
|
|
52
|
+
...changes.edges.filter((edge) => edge.change).map((edge) => edge.at?.file)
|
|
53
|
+
]);
|
|
54
|
+
const unmapped = files.filter(({ file }) => !mapped.has(file) && !hiddenPath.test(file));
|
|
55
|
+
return { ...changes, since: sha.slice(0, 12), unmapped };
|
|
56
|
+
}
|
|
57
|
+
static #baseAt(root, sha) {
|
|
58
|
+
const key = `${root}
|
|
59
|
+
${sha}`;
|
|
60
|
+
const cached = WorkspaceGraph.#bases.get(key);
|
|
61
|
+
if (cached)
|
|
62
|
+
return cached;
|
|
63
|
+
const graph = new GitRevision(root).filesAt(sha, (file) => indexedPath.test(file)).then((texts) => WorkspaceGraph.#graphOf(root, texts, true));
|
|
64
|
+
graph.catch(() => WorkspaceGraph.#bases.delete(key));
|
|
65
|
+
WorkspaceGraph.#bases.set(key, graph);
|
|
66
|
+
for (const old of [...WorkspaceGraph.#bases.keys()].slice(0, -cachedBaseLimit))
|
|
67
|
+
WorkspaceGraph.#bases.delete(old);
|
|
68
|
+
return graph;
|
|
69
|
+
}
|
|
70
|
+
static #graphOf(root, texts, digests) {
|
|
71
|
+
const index = new AkanIndex({ ts, root });
|
|
72
|
+
const byFileName = new Map;
|
|
73
|
+
for (const [file, text] of texts) {
|
|
74
|
+
const fileName = slashed(path.join(root, file));
|
|
75
|
+
byFileName.set(fileName, text);
|
|
76
|
+
index.setFile(fileName, text);
|
|
77
|
+
}
|
|
78
|
+
return index.graph((fileName) => byFileName.get(fileName), { digests });
|
|
79
|
+
}
|
|
80
|
+
static scope(graph, { app, module }) {
|
|
81
|
+
if (!app && !module)
|
|
82
|
+
return graph;
|
|
83
|
+
const owners = app ? new Set([`apps/${app}`, `libs/${app}`]) : null;
|
|
84
|
+
const seeds = new Set(graph.nodes.filter((node) => (!owners || owners.has(node.owner ?? "")) && (!module || node.module === module)).map((node) => node.id));
|
|
85
|
+
const guards = new Set(graph.nodes.filter((node) => node.kind === "guard").map((node) => node.id));
|
|
86
|
+
const reaches = (id) => seeds.has(id) && !guards.has(id);
|
|
87
|
+
const edges = graph.edges.filter((edge) => reaches(edge.from) || reaches(edge.to));
|
|
88
|
+
const ids = new Set([...seeds, ...edges.flatMap((edge) => [edge.from, edge.to])]);
|
|
89
|
+
return { version: 1, nodes: graph.nodes.filter((node) => ids.has(node.id)), edges };
|
|
90
|
+
}
|
|
91
|
+
static #withoutPages(graph) {
|
|
92
|
+
const changed = new Set(graph.nodes.filter((node) => node.change).map((node) => node.id));
|
|
93
|
+
const touching = new Set(graph.edges.filter((edge) => edge.kind !== "wraps" && (changed.has(edge.from) || changed.has(edge.to))).flatMap((edge) => [edge.from, edge.to]));
|
|
94
|
+
const dropped = new Set(graph.nodes.filter((node) => pageKinds.has(node.kind) && !node.change && !touching.has(node.id)).map((node) => node.id));
|
|
95
|
+
const edges = graph.edges.filter((edge) => !dropped.has(edge.from) && !dropped.has(edge.to));
|
|
96
|
+
const linked = new Set(edges.flatMap((edge) => [edge.from, edge.to]));
|
|
97
|
+
const isRouteOnly = (node) => node.kind === "guard" && node.detail.includes("route") && !node.change && !linked.has(node.id);
|
|
98
|
+
const nodes = graph.nodes.filter((node) => !dropped.has(node.id) && !isRouteOnly(node));
|
|
99
|
+
return { version: 1, nodes, edges };
|
|
100
|
+
}
|
|
101
|
+
static visibleTo(graph, app) {
|
|
102
|
+
const appOwner = `apps/${app}`;
|
|
103
|
+
const isVisible = ({ owner }) => !owner || owner === appOwner || owner.startsWith("libs/");
|
|
104
|
+
const nodes = graph.nodes.filter(isVisible);
|
|
105
|
+
const ids = new Set(nodes.map((node) => node.id));
|
|
106
|
+
return { version: 1, nodes, edges: graph.edges.filter((edge) => ids.has(edge.from) && ids.has(edge.to)) };
|
|
107
|
+
}
|
|
108
|
+
static changesVisibleTo(changes, app) {
|
|
109
|
+
const visible = WorkspaceGraph.visibleTo(changes, app);
|
|
110
|
+
const linked = new Set(visible.edges.flatMap((edge) => [edge.from, edge.to]));
|
|
111
|
+
const nodes = visible.nodes.filter((node) => node.change || linked.has(node.id));
|
|
112
|
+
const appPath = `apps/${app}/`;
|
|
113
|
+
return {
|
|
114
|
+
...changes,
|
|
115
|
+
nodes,
|
|
116
|
+
edges: visible.edges,
|
|
117
|
+
summary: WorkspaceGraph.#summaryOf(nodes),
|
|
118
|
+
unmapped: changes.unmapped.filter(({ file }) => file.startsWith(appPath) || file.startsWith("libs/"))
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
static #summaryOf(nodes) {
|
|
122
|
+
const summary = { added: 0, removed: 0, changed: 0 };
|
|
123
|
+
for (const { change } of nodes)
|
|
124
|
+
if (change)
|
|
125
|
+
summary[change] += 1;
|
|
126
|
+
return summary;
|
|
127
|
+
}
|
|
128
|
+
static answerChanges(changes, scope) {
|
|
129
|
+
if ("error" in changes)
|
|
130
|
+
return {
|
|
131
|
+
diagnostics: [{ severity: "error", code: "graph-since-unknown", message: changes.error, input: "since" }]
|
|
132
|
+
};
|
|
133
|
+
const answer = WorkspaceGraph.answer(changes, scope, changes.nodes.filter((node) => node.change));
|
|
134
|
+
if ("diagnostics" in answer)
|
|
135
|
+
return { since: changes.since, summary: changes.summary, ...answer };
|
|
136
|
+
const summary = WorkspaceGraph.#summaryOf(answer.nodes);
|
|
137
|
+
const owners = scope.app ? [`apps/${scope.app}/`, `libs/${scope.app}/`] : null;
|
|
138
|
+
const modules = scope.module ? [`/lib/${scope.module}/`, `/lib/_${scope.module}/`] : null;
|
|
139
|
+
const unmapped = changes.unmapped.filter(({ file }) => (!owners || owners.some((owner) => file.startsWith(owner))) && (!modules || modules.some((segment) => file.includes(segment))));
|
|
140
|
+
return { since: changes.since, summary, ...answer, unmapped };
|
|
141
|
+
}
|
|
142
|
+
static answer(graph, scope, counted = graph.nodes) {
|
|
143
|
+
if (scope.app || scope.module || graph.nodes.length <= unscopedNodeLimit)
|
|
144
|
+
return WorkspaceGraph.scope(graph, scope);
|
|
145
|
+
const unscoped = WorkspaceGraph.#withoutPages(graph);
|
|
146
|
+
if (unscoped.nodes.length <= unscopedNodeLimit)
|
|
147
|
+
return unscoped;
|
|
148
|
+
const owners = new Map;
|
|
149
|
+
for (const node of counted)
|
|
150
|
+
if (node.owner && !pageKinds.has(node.kind))
|
|
151
|
+
owners.set(node.owner, (owners.get(node.owner) ?? 0) + 1);
|
|
152
|
+
return {
|
|
153
|
+
diagnostics: [
|
|
154
|
+
{
|
|
155
|
+
severity: "error",
|
|
156
|
+
code: "graph-scope-required",
|
|
157
|
+
message: `The graph has ${unscoped.nodes.length} nodes besides its pages. Pass app, module or both to scope it.`,
|
|
158
|
+
input: "app"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
owners: Object.fromEntries([...owners].sort(([a], [b]) => a < b ? -1 : 1))
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { WorkspaceGraph };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// pkgs/@akanjs/devkit/gitRevision.ts
|
|
3
|
+
var systemPaths = ["apps", "libs"];
|
|
4
|
+
var changeOfStatus = { A: "added", D: "removed" };
|
|
5
|
+
|
|
6
|
+
class GitRevision {
|
|
7
|
+
static #defaultBranches = ["upstream/HEAD", "upstream/main", "origin/HEAD", "origin/main", "main", "master"];
|
|
8
|
+
static #env = { ...process.env, GIT_OPTIONAL_LOCKS: "0" };
|
|
9
|
+
#root;
|
|
10
|
+
constructor(root) {
|
|
11
|
+
this.#root = root;
|
|
12
|
+
}
|
|
13
|
+
async forkPointOf(since) {
|
|
14
|
+
if ((await this.#git(["rev-parse", "--is-inside-work-tree"]))?.trim() !== "true")
|
|
15
|
+
return { error: "The Change Map compares with git history, and this workspace is not in a git repository." };
|
|
16
|
+
if (since !== null) {
|
|
17
|
+
const sha = /^[^-\s][^\s]*$/.test(since) ? (await this.#git(["rev-parse", "--verify", "--quiet", `${since}^{commit}`]))?.trim() : undefined;
|
|
18
|
+
if (!sha)
|
|
19
|
+
return { error: `${since} is not a commit in this repository.` };
|
|
20
|
+
return await this.#mergeBase(since, sha);
|
|
21
|
+
}
|
|
22
|
+
for (const branch of GitRevision.#defaultBranches)
|
|
23
|
+
if (await this.#git(["rev-parse", "--verify", "--quiet", `${branch}^{commit}`]) !== null)
|
|
24
|
+
return await this.#mergeBase(branch, branch);
|
|
25
|
+
const head = (await this.#git(["rev-parse", "--verify", "--quiet", "HEAD^{commit}"]))?.trim();
|
|
26
|
+
return head ? { sha: head } : { error: "The repository has no commit to compare with yet." };
|
|
27
|
+
}
|
|
28
|
+
async#mergeBase(name, revision) {
|
|
29
|
+
const sha = (await this.#git(["merge-base", "HEAD", revision]))?.trim();
|
|
30
|
+
if (sha)
|
|
31
|
+
return { sha };
|
|
32
|
+
return {
|
|
33
|
+
error: `HEAD shares no commit with ${name} here. In a shallow clone, \`git fetch --unshallow\` brings the history in.`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
async filesAt(sha, isWanted, paths = systemPaths) {
|
|
37
|
+
const listed = await this.#git(["ls-tree", "-r", "-z", "--name-only", sha, "--", ...paths]);
|
|
38
|
+
if (listed === null)
|
|
39
|
+
throw new Error(`git ls-tree failed for ${sha}`);
|
|
40
|
+
const files = listed.split("\x00").filter((file) => file && isWanted(file));
|
|
41
|
+
const texts = new Map;
|
|
42
|
+
if (!files.length)
|
|
43
|
+
return texts;
|
|
44
|
+
const proc = Bun.spawn(["git", "cat-file", "--batch"], {
|
|
45
|
+
cwd: this.#root,
|
|
46
|
+
env: GitRevision.#env,
|
|
47
|
+
stdin: "pipe",
|
|
48
|
+
stdout: "pipe",
|
|
49
|
+
stderr: "ignore"
|
|
50
|
+
});
|
|
51
|
+
const output = new Response(proc.stdout).arrayBuffer();
|
|
52
|
+
proc.stdin.write(files.map((file) => `${sha}:./${file}
|
|
53
|
+
`).join(""));
|
|
54
|
+
await proc.stdin.end();
|
|
55
|
+
const bytes = new Uint8Array(await output);
|
|
56
|
+
if (await proc.exited !== 0)
|
|
57
|
+
throw new Error(`git cat-file failed for ${sha}`);
|
|
58
|
+
const decoder = new TextDecoder;
|
|
59
|
+
let offset = 0;
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
const lineEnd = bytes.indexOf(10, offset);
|
|
62
|
+
if (lineEnd < 0)
|
|
63
|
+
throw new Error(`git cat-file ended before ${file} at ${sha}`);
|
|
64
|
+
const header = decoder.decode(bytes.subarray(offset, lineEnd));
|
|
65
|
+
offset = lineEnd + 1;
|
|
66
|
+
if (header.endsWith(" missing"))
|
|
67
|
+
continue;
|
|
68
|
+
const [, type, size] = header.split(" ");
|
|
69
|
+
const length = Number(size);
|
|
70
|
+
if (type === "blob")
|
|
71
|
+
texts.set(file, decoder.decode(bytes.subarray(offset, offset + length)));
|
|
72
|
+
offset += length + 1;
|
|
73
|
+
}
|
|
74
|
+
return texts;
|
|
75
|
+
}
|
|
76
|
+
async changedFilesSince(sha) {
|
|
77
|
+
const [tracked, untracked] = await Promise.all([
|
|
78
|
+
this.#git(["diff", "--name-status", "--no-renames", "--relative", "-z", sha, "--", ...systemPaths]),
|
|
79
|
+
this.#git(["ls-files", "-z", "--others", "--exclude-standard", "--", ...systemPaths])
|
|
80
|
+
]);
|
|
81
|
+
if (tracked === null || untracked === null)
|
|
82
|
+
throw new Error(`git could not list the changes since ${sha}`);
|
|
83
|
+
const changes = new Map;
|
|
84
|
+
const fields = tracked.split("\x00");
|
|
85
|
+
for (let idx = 0;idx + 1 < fields.length; idx += 2)
|
|
86
|
+
changes.set(fields[idx + 1], changeOfStatus[fields[idx]] ?? "changed");
|
|
87
|
+
for (const file of untracked.split("\x00"))
|
|
88
|
+
if (file)
|
|
89
|
+
changes.set(file, "added");
|
|
90
|
+
return [...changes].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([file, change]) => ({ file, change }));
|
|
91
|
+
}
|
|
92
|
+
async workingFiles() {
|
|
93
|
+
const listed = await this.#git([
|
|
94
|
+
"ls-files",
|
|
95
|
+
"-z",
|
|
96
|
+
"--cached",
|
|
97
|
+
"--others",
|
|
98
|
+
"--exclude-standard",
|
|
99
|
+
"--",
|
|
100
|
+
...systemPaths
|
|
101
|
+
]);
|
|
102
|
+
if (listed === null)
|
|
103
|
+
throw new Error("git ls-files failed");
|
|
104
|
+
return [...new Set(listed.split("\x00").filter(Boolean))];
|
|
105
|
+
}
|
|
106
|
+
async#git(args) {
|
|
107
|
+
try {
|
|
108
|
+
const proc = Bun.spawn(["git", ...args], {
|
|
109
|
+
cwd: this.#root,
|
|
110
|
+
env: GitRevision.#env,
|
|
111
|
+
stdout: "pipe",
|
|
112
|
+
stderr: "ignore"
|
|
113
|
+
});
|
|
114
|
+
const [text, exitCode] = await Promise.all([new Response(proc.stdout).text(), proc.exited]);
|
|
115
|
+
return exitCode === 0 ? text : null;
|
|
116
|
+
} catch {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { GitRevision };
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
AkanAppConfig,
|
|
6
6
|
Executor,
|
|
7
7
|
WorkspaceExecutor
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-sr5da35e.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAppId,
|
|
11
11
|
targetHtmlFilename
|
|
12
12
|
} from "./index-m9jj544v.js";
|
|
13
13
|
import {
|
|
14
14
|
CsrArtifactBuilder
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-mmym5xmb.js";
|
|
16
16
|
import {
|
|
17
17
|
ExitCodeError
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-93ewzmp6.js";
|
|
19
19
|
|
|
20
20
|
// pkgs/@akanjs/devkit/mobile/desktopBin.ts
|
|
21
21
|
import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
CloudApi,
|
|
5
5
|
CloudUpdates,
|
|
6
6
|
PipelineSecrets
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-drz9e84d.js";
|
|
8
8
|
import {
|
|
9
9
|
PkgExecutor
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-sr5da35e.js";
|
|
11
11
|
import {
|
|
12
12
|
UpdatePackFolder,
|
|
13
13
|
NativePublicEnv,
|
|
14
14
|
NativeApp
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-zpv14wpy.js";
|
|
16
16
|
import {
|
|
17
17
|
script
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-93ewzmp6.js";
|
|
19
19
|
import {
|
|
20
20
|
ApplicationScript
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-ryrm5z2c.js";
|
|
22
22
|
import {
|
|
23
23
|
PackageScript
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-d4n1wmrz.js";
|
|
25
25
|
import {
|
|
26
26
|
CloudRunner
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-6wpaq392.js";
|
|
28
28
|
|
|
29
29
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
30
30
|
import { Logger } from "akanjs/common";
|
|
@@ -213,7 +213,10 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
|
|
|
213
213
|
async deployAkan(workspace, {
|
|
214
214
|
test = true,
|
|
215
215
|
registryUrl,
|
|
216
|
-
platforms = []
|
|
216
|
+
platforms = [],
|
|
217
|
+
prerelease = null,
|
|
218
|
+
yes = false,
|
|
219
|
+
packTo = null
|
|
217
220
|
} = {}) {
|
|
218
221
|
const akanPkgs = await this.cloudRunner.getAkanPkgs(workspace);
|
|
219
222
|
await this.packageScript.updateWorskpaceRootPackageJson(workspace);
|
|
@@ -239,7 +242,13 @@ class CloudScript2 extends script("cloud", [CloudRunner, ApplicationScript, Pack
|
|
|
239
242
|
for (const pkg of pkgs)
|
|
240
243
|
await this.packageScript.buildPackage(pkg);
|
|
241
244
|
await this.packageScript.verifyAkanPublishPackages(workspace);
|
|
242
|
-
await this.cloudRunner.deployAkan(workspace, akanPkgs, {
|
|
245
|
+
await this.cloudRunner.deployAkan(workspace, akanPkgs, {
|
|
246
|
+
registryUrl,
|
|
247
|
+
prerelease,
|
|
248
|
+
packTo,
|
|
249
|
+
confirmPublish: !yes,
|
|
250
|
+
npmLogin: !yes
|
|
251
|
+
});
|
|
243
252
|
}
|
|
244
253
|
async testPlatforms(workspace, { platforms, pkgs }) {
|
|
245
254
|
if (!platforms.length)
|
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-93ewzmp6.js";
|
|
8
8
|
import"./index-bns3wcpc.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-sr5da35e.js";
|
|
10
10
|
|
|
11
11
|
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
12
12
|
class BunVersionGuard {
|
|
@@ -22,27 +22,27 @@ import path from "path";
|
|
|
22
22
|
|
|
23
23
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
24
24
|
var commandModules = {
|
|
25
|
-
workspace: async () => (await import("./workspace.command-
|
|
26
|
-
agent: async () => (await import("./agent.command-
|
|
27
|
-
code: async () => (await import("./code.command-
|
|
28
|
-
application: async () => (await import("./application.command-
|
|
29
|
-
library: async () => (await import("./library.command-
|
|
30
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
31
|
-
package: async () => (await import("./package.command-
|
|
32
|
-
module: async () => (await import("./module.command-
|
|
33
|
-
page: async () => (await import("./page.command-
|
|
34
|
-
context: async () => (await import("./context.command-
|
|
35
|
-
cloud: async () => (await import("./cloud.command-
|
|
36
|
-
subspace: async () => (await import("./subspace.command-
|
|
37
|
-
guideline: async () => (await import("./guideline.command-
|
|
38
|
-
scalar: async () => (await import("./scalar.command-
|
|
39
|
-
primitive: async () => (await import("./primitive.command-
|
|
40
|
-
quality: async () => (await import("./quality.command-
|
|
41
|
-
verify: async () => (await import("./verify.command-
|
|
42
|
-
repair: async () => (await import("./repair.command-
|
|
43
|
-
workflow: async () => (await import("./workflow.command-
|
|
44
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
45
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
25
|
+
workspace: async () => (await import("./workspace.command-rw1p0xeq.js")).WorkspaceCommand,
|
|
26
|
+
agent: async () => (await import("./agent.command-2f657613.js")).AgentCommand,
|
|
27
|
+
code: async () => (await import("./code.command-7m67c7zc.js")).CodeCommand,
|
|
28
|
+
application: async () => (await import("./application.command-yb8v177e.js")).ApplicationCommand,
|
|
29
|
+
library: async () => (await import("./library.command-1gp5qe3r.js")).LibraryCommand,
|
|
30
|
+
localRegistry: async () => (await import("./localRegistry.command-v3g21rex.js")).LocalRegistryCommand,
|
|
31
|
+
package: async () => (await import("./package.command-s7qpnn1g.js")).PackageCommand,
|
|
32
|
+
module: async () => (await import("./module.command-4xz9he6h.js")).ModuleCommand,
|
|
33
|
+
page: async () => (await import("./page.command-fan34c49.js")).PageCommand,
|
|
34
|
+
context: async () => (await import("./context.command-569z0rqf.js")).ContextCommand,
|
|
35
|
+
cloud: async () => (await import("./cloud.command-et06ja22.js")).CloudCommand,
|
|
36
|
+
subspace: async () => (await import("./subspace.command-yxtt3v3e.js")).SubspaceCommand,
|
|
37
|
+
guideline: async () => (await import("./guideline.command-gnv3e8p8.js")).GuidelineCommand,
|
|
38
|
+
scalar: async () => (await import("./scalar.command-cnvfhk0n.js")).ScalarCommand,
|
|
39
|
+
primitive: async () => (await import("./primitive.command-3fqh8emf.js")).PrimitiveCommand,
|
|
40
|
+
quality: async () => (await import("./quality.command-ecj6exsh.js")).QualityCommand,
|
|
41
|
+
verify: async () => (await import("./verify.command-w9ttxkdz.js")).VerifyCommand,
|
|
42
|
+
repair: async () => (await import("./repair.command-fe9jw719.js")).RepairCommand,
|
|
43
|
+
workflow: async () => (await import("./workflow.command-ss8devj0.js")).WorkflowCommand,
|
|
44
|
+
pipeline: async () => (await import("./pipeline.command-ph4fnn9w.js")).PipelineCommand,
|
|
45
|
+
tunnel: async () => (await import("./tunnel.command-ggj38mqf.js")).TunnelCommand
|
|
46
46
|
};
|
|
47
47
|
var commandModuleIds = Object.keys(commandModules);
|
|
48
48
|
|
|
@@ -87,6 +87,7 @@ if (bunRefusal) {
|
|
|
87
87
|
console.error(bunRefusal);
|
|
88
88
|
process.exit(1);
|
|
89
89
|
}
|
|
90
|
+
delete process.env.AKAN_CLI_FORCE_BUILD;
|
|
90
91
|
var ids = CommandManifest.resolve(await CommandManifest.read(), process.argv) ?? commandModuleIds;
|
|
91
92
|
var commands = await Promise.all(ids.map(async (id) => await commandModules[id]()));
|
|
92
93
|
await runCommands(...commands);
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-93ewzmp6.js";
|
|
7
7
|
import"./index-bns3wcpc.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-sr5da35e.js";
|
|
9
9
|
import {
|
|
10
10
|
LibraryScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-mqntfzv5.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
14
14
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -4,37 +4,41 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-93ewzmp6.js";
|
|
8
8
|
import"./index-bns3wcpc.js";
|
|
9
9
|
import {
|
|
10
|
+
parseEnvFile,
|
|
10
11
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
12
|
+
} from "./index-sr5da35e.js";
|
|
12
13
|
import {
|
|
13
14
|
npmRegistryFromEnv,
|
|
14
15
|
warnIgnoredNpmRegistry,
|
|
15
16
|
getNpmRegistryUrl
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
} from "./index-ny2k80mv.js";
|
|
18
|
+
import"./index-p6hjwt2d.js";
|
|
19
|
+
import"./index-zpv14wpy.js";
|
|
20
|
+
import"./index-ed6ea0qp.js";
|
|
20
21
|
import"./index-m9jj544v.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
import"./index-1q1cjn8s.js";
|
|
23
|
+
import"./index-mmym5xmb.js";
|
|
24
|
+
import"./index-mqntfzv5.js";
|
|
25
|
+
import"./index-ktb3wcqz.js";
|
|
25
26
|
import {
|
|
26
27
|
ApplicationScript
|
|
27
|
-
} from "./index-
|
|
28
|
+
} from "./index-ryrm5z2c.js";
|
|
28
29
|
import"./index-tenw3mah.js";
|
|
29
|
-
import"./index-
|
|
30
|
+
import"./index-drz9e84d.js";
|
|
30
31
|
import {
|
|
31
32
|
CloudRunner
|
|
32
|
-
} from "./index-
|
|
33
|
+
} from "./index-6wpaq392.js";
|
|
33
34
|
import"./index-qd7xn2bk.js";
|
|
35
|
+
import"./index-7y5yghjg.js";
|
|
36
|
+
import"./index-abgh0jve.js";
|
|
37
|
+
import"./index-hqrkqxx2.js";
|
|
34
38
|
import {
|
|
35
39
|
PackageScript
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
40
|
+
} from "./index-d4n1wmrz.js";
|
|
41
|
+
import"./index-sy481q2x.js";
|
|
38
42
|
import"./index-9bv479q5.js";
|
|
39
43
|
|
|
40
44
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
@@ -104,7 +108,12 @@ class LocalRegistryRunner extends runner("localRegistry") {
|
|
|
104
108
|
const registry = this.getRegistryUrl(registryUrl);
|
|
105
109
|
const smokeRoot = path.join(workspace.workspaceRoot, ".akan/e2e");
|
|
106
110
|
await rm(path.join(smokeRoot, smokeRepoName), { recursive: true, force: true });
|
|
107
|
-
const
|
|
111
|
+
const repoDotenv = parseEnvFile(path.join(workspace.workspaceRoot, ".env"));
|
|
112
|
+
const env = {
|
|
113
|
+
...Object.fromEntries(Object.entries(process.env).filter(([key]) => !(key in repoDotenv))),
|
|
114
|
+
AKAN_NPM_REGISTRY: registry,
|
|
115
|
+
NPM_CONFIG_REGISTRY: registry
|
|
116
|
+
};
|
|
108
117
|
await workspace.spawn(process.execPath, [
|
|
109
118
|
"dist/pkgs/create-akan-workspace/index.js",
|
|
110
119
|
smokeRepoName,
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
Sys,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-93ewzmp6.js";
|
|
7
7
|
import"./index-bns3wcpc.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-sr5da35e.js";
|
|
9
9
|
import {
|
|
10
10
|
renderPrimitiveReport
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-8pb9yvp8.js";
|
|
12
|
+
import"./index-7y5yghjg.js";
|
|
13
|
+
import"./index-aj3ehkcx.js";
|
|
14
14
|
import {
|
|
15
15
|
ModuleScript
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-8ts9774g.js";
|
|
17
17
|
|
|
18
18
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
19
19
|
import { Logger, lowerlize } from "akanjs/common";
|