@akanjs/cli 3.0.0-beta.3 → 3.0.0-beta.30
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-xnfyyz8h.js +9 -0
- package/CodeAgentRpcHost-p7h6n2hp.js +7 -0
- package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
- package/CodeTui-h66xb1fh.js +1457 -0
- package/README.md +3 -0
- package/TunnelShare-cwh9ezsm.js +9 -0
- package/{agent.command-d2gfxfck.js → agent.command-c4v7kjff.js} +8 -9
- package/akanCode.js +102 -0
- package/application.command-yzsswrz6.js +241 -0
- package/{applicationBuildRunner-kxwbssgn.js → applicationBuildRunner-qkt6spd5.js} +121 -77
- package/buildBatch.proc.js +120 -32
- package/cloud.command-v8h688jc.js +95 -0
- package/cloud.script-yct1sk4k.js +20 -0
- package/code.command-jff3tw7y.js +154 -0
- package/commandManifest.json +1 -1
- package/consoleToStderr-h5bryj94.js +7 -0
- package/context.command-y5sevk3c.js +48 -0
- package/context.runner-90hsmacr.js +21 -0
- package/{dependencyScanner-shs82ynp.js → dependencyScanner-06z2dmrr.js} +2 -2
- package/{devTui-40ggmd99.js → devTui-q7k7bakd.js} +122 -40
- package/fileSys-wzzrntkw.js +9 -0
- package/guideline.command-11cndccb.js +42 -0
- package/guidelines/agentRule/agentRule.instruction.md +209 -33
- package/guidelines/conventions/conventions.instruction.md +143 -41
- package/guidelines/fieldRule/fieldRule.instruction.md +1 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +7 -5
- package/guidelines/queryRule/queryRule.instruction.md +21 -7
- package/guidelines/runtimeRule/runtimeRule.instruction.md +268 -6
- package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +51 -0
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +20 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +66 -3
- package/incrementalBuilder.proc.js +564 -109
- package/{index-fz5q3gd7.js → index-0ncc0mbk.js} +10 -17
- package/index-167c77aq.js +69 -0
- package/{index-kcxmv48c.js → index-2ahj896a.js} +45 -79
- package/index-2wc41k5w.js +49 -0
- package/{index-j9yhg404.js → index-35mmm9ca.js} +4 -7
- package/{index-a64esmtb.js → index-376gpdds.js} +523 -1022
- package/index-3hx1z96c.js +87 -0
- package/{index-v0qh106m.js → index-3rh7thcx.js} +961 -892
- package/{index-hwkygn9s.js → index-48k96p55.js} +325 -36
- package/{index-q0y2jq9j.js → index-52w0fvh8.js} +21 -4
- package/index-5rp0h6na.js +1119 -0
- package/index-6x9p8dpb.js +4300 -0
- package/index-7md2g9vw.js +6 -0
- package/index-8tv7356t.js +700 -0
- package/index-94s080qm.js +266 -0
- package/index-9dp031by.js +12 -0
- package/{index-ws5e0j51.js → index-a4s954kq.js} +43 -26
- package/{index-3d9y066c.js → index-bjwxs904.js} +9 -8
- package/{index-ne2qy0nk.js → index-bxmejydw.js} +12 -12
- package/index-c6eggbee.js +123 -0
- package/index-d2242ksy.js +99 -0
- package/{index-92zztqy1.js → index-dy0jx9ay.js} +2 -17
- package/{index-259dsnz3.js → index-gxamdf18.js} +5 -8
- package/{index-4edzf1gr.js → index-hf6f4xnb.js} +77 -150
- package/{index-by5gpp8x.js → index-hj6w4ka1.js} +2 -1
- package/{index-gyd220p2.js → index-hmdq5pqm.js} +554 -577
- package/{index-600zhnve.js → index-hqd0h1pb.js} +75 -203
- package/index-kb16nzyt.js +997 -0
- package/index-mk3b9rk1.js +2729 -0
- package/{index-2tv3fdx4.js → index-n3jk2501.js} +1205 -1458
- package/index-p6pbz9n5.js +25 -0
- package/{index-zry5nz81.js → index-qcejqgts.js} +51 -30
- package/{index-7737gxcp.js → index-rtwhw4aq.js} +107 -241
- package/{index-pnqbkf5p.js → index-se643zvp.js} +6 -2
- package/index-tsb0f8ya.js +53 -0
- package/{index-ktb5njgy.js → index-tzc1gtrg.js} +49 -99
- package/index-wa5jbxj1.js +760 -0
- package/index-wfwgcnyc.js +187 -0
- package/{index-mak3cd28.js → index-xb7qhxa8.js} +137 -255
- package/{index-h7yw2z9n.js → index-zzvvc845.js} +8 -14
- package/index.js +23 -22
- package/{library.command-nbsky672.js → library.command-n9kp7yms.js} +4 -5
- package/{localRegistry.command-yeq57wjr.js → localRegistry.command-jx6kxt2x.js} +23 -42
- package/{module.command-29vqzrh8.js → module.command-q2xjf6cx.js} +8 -11
- package/{package.command-axv0abmn.js → package.command-q5a3nsw5.js} +6 -7
- package/package.json +15 -7
- package/{page.command-vs9s3zrh.js → page.command-ppenrxjn.js} +4 -5
- package/{primitive.command-cbxmqbtc.js → primitive.command-dvgg8nem.js} +9 -22
- package/prompter-76k56b37.js +8 -0
- package/{quality.command-gmbs7nws.js → quality.command-pz7kg3pc.js} +205 -377
- package/{recipeScanner-fpagtgc1.js → recipeScanner-4b69ybe0.js} +1 -1
- package/{repair.command-bqsjptsj.js → repair.command-a6py9xvz.js} +11 -35
- package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
- package/{scalar.command-6k1vhe9s.js → scalar.command-7f3xfpen.js} +7 -10
- package/skills/akan-code/SKILL.md +130 -0
- package/skills/akan-debug/SKILL.md +42 -0
- package/skills/akan-deps/SKILL.md +50 -0
- package/skills/akan-err/SKILL.md +39 -0
- package/skills/akan-module/SKILL.md +45 -0
- package/skills/akan-scaffold/SKILL.md +76 -0
- package/skills/akan-scalar/SKILL.md +52 -0
- package/skills/akan-service/SKILL.md +34 -0
- package/skills/akan-store/SKILL.md +67 -0
- package/skills/akan-ui/SKILL.md +63 -0
- package/skills/akan-validate/SKILL.md +44 -0
- package/{subspace.command-fwjfcts7.js → subspace.command-z7nqs508.js} +138 -67
- package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
- package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
- package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
- package/templates/appSample/lib/task/task.abstract.ts +12 -32
- package/templates/appSample/lib/task/task.signal.spec.ts +15 -18
- package/templates/appSample/lib/task/task.signal.test.ts +15 -1
- package/templates/appSample/lib/task/task.signal.ts +1 -1
- package/templates/appSample/srvkit/{AuthGuard.ts → guards.ts} +7 -4
- package/templates/appSample/srvkit/{SessionInternalArg.ts → internalArgs.ts} +6 -4
- package/templates/client.ts +7 -30
- package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
- package/templates/crudPages/[__model__Id]/page.tsx +2 -1
- package/templates/crudPages/new/page.tsx +2 -1
- package/templates/crudPages/page.tsx +2 -1
- package/templates/crudSinglePage/page.tsx +2 -1
- package/templates/lib/__lib/lib.dictionary.ts +0 -2
- package/templates/lib/__lib/lib.document.ts +0 -2
- package/templates/lib/sig.ts +8 -30
- package/templates/localDev/docker-compose.yaml.template +3 -14
- package/templates/module/__model__.signal.ts +12 -4
- package/templates/pkgRoot/tsconfig.json.template +2 -7
- package/templates/server.ts +1 -3
- package/templates/service/__model__.abstract.md.template +8 -0
- package/templates/workspaceRoot/.gitignore.template +0 -1
- package/templates/workspaceRoot/package.json.template +1 -3
- package/tunnel.command-zy4wbcgt.js +129 -0
- package/{typeChecker-3xgrzc2v.js → typeChecker-px49mezc.js} +1 -1
- package/typecheck.proc.js +1 -1
- package/workflow.command-f142t17s.js +79 -0
- package/{workspace.command-8s050m0h.js → workspace.command-gpk1149x.js} +77 -109
- package/abstractCompactor-mjh5ppsq.js +0 -101
- package/application.command-pj2m7584.js +0 -204
- package/applicationReleasePackager-4yasxwv9.js +0 -244
- package/capacitorApp-36rbr858.js +0 -12
- package/cloud.command-jshwdq22.js +0 -93
- package/context.command-ez8a0zyz.js +0 -80
- package/devTuiView-c08ccbat.js +0 -9
- package/getDirname-dr3jz1xg.js +0 -7
- package/guideline.command-xmqwx8zm.js +0 -359
- package/guidelines/agentRule/agentRule.generate.json +0 -31
- package/guidelines/componentRule/componentRule.generate.json +0 -31
- package/guidelines/conventions/conventions.generate.json +0 -25
- package/guidelines/cssRule/cssRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
- package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
- package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
- package/guidelines/enumConstant/enumConstant.generate.json +0 -31
- package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
- package/guidelines/fieldRule/fieldRule.generate.json +0 -31
- package/guidelines/framework/framework.generate.json +0 -32
- package/guidelines/mcpRule/mcpRule.generate.json +0 -35
- package/guidelines/modelConstant/modelConstant.generate.json +0 -32
- package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
- package/guidelines/modelDocument/modelDocument.generate.json +0 -31
- package/guidelines/modelService/modelService.generate.json +0 -31
- package/guidelines/modelSignal/modelSignal.generate.json +0 -31
- package/guidelines/modelStore/modelStore.generate.json +0 -31
- package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
- package/guidelines/modelUnit/modelUnit.generate.json +0 -31
- package/guidelines/modelUtil/modelUtil.generate.json +0 -31
- package/guidelines/modelView/modelView.generate.json +0 -31
- package/guidelines/modelZone/modelZone.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
- package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
- package/guidelines/queryRule/queryRule.generate.json +0 -31
- package/guidelines/recipeRule/recipeRule.generate.json +0 -31
- package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
- package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
- package/guidelines/scalarModule/scalarModule.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
- package/guidelines/ssrRule/ssrRule.generate.json +0 -31
- package/guidelines/transportRule/transportRule.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -33
- package/index-2hq52jq3.js +0 -465
- package/index-47pj3aee.js +0 -76
- package/index-6wwzs1bc.js +0 -7
- package/index-8pm30m73.js +0 -841
- package/index-kn1h7p1x.js +0 -560
- package/index-meh558jy.js +0 -65
- package/index-rwg2aa4f.js +0 -229
- package/index-w8kmx1b6.js +0 -2176
- package/index-wt7qrtd4.js +0 -1516
- package/templates/__scalar/__model__/__model__.abstract.md +0 -28
- package/templates/module/__model__.abstract.md +0 -28
- package/templates/service/__model__.abstract.md +0 -28
- package/templates/workspaceRoot/patches/react-dom@19.2.7.patch.template +0 -62
- package/workflow.command-nwpcdc8p.js +0 -107
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Scalar Abstract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Describe the embedded value object or reusable data concept this scalar owns.
|
|
6
|
-
|
|
7
|
-
## Domain Rules
|
|
8
|
-
|
|
9
|
-
- Keep durable validation and meaning rules here.
|
|
10
|
-
- Avoid repeating field types that are already clear in the constant file.
|
|
11
|
-
|
|
12
|
-
## Data Meaning
|
|
13
|
-
|
|
14
|
-
Explain the meaning of the scalar fields and when this scalar should be used.
|
|
15
|
-
|
|
16
|
-
## Workflows
|
|
17
|
-
|
|
18
|
-
Describe lifecycle or normalization behavior when relevant.
|
|
19
|
-
|
|
20
|
-
## Agent Notes
|
|
21
|
-
|
|
22
|
-
- Read this abstract before changing the scalar.
|
|
23
|
-
- Update this file when validation meaning, public behavior, or reuse rules change.
|
|
24
|
-
- Do not update this file for formatting-only, import-only, or style-only changes.
|
|
25
|
-
|
|
26
|
-
## Related Modules
|
|
27
|
-
|
|
28
|
-
- None yet.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Module Abstract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Describe the business concept this module owns.
|
|
6
|
-
|
|
7
|
-
## Domain Rules
|
|
8
|
-
|
|
9
|
-
- Keep durable business invariants here.
|
|
10
|
-
- Avoid repeating field types that are already clear in the constant file.
|
|
11
|
-
|
|
12
|
-
## Data Meaning
|
|
13
|
-
|
|
14
|
-
Explain the meaning of important data only when the code does not make the intent obvious.
|
|
15
|
-
|
|
16
|
-
## Workflows
|
|
17
|
-
|
|
18
|
-
Describe create, update, approval, deletion, state transition, or other business flows.
|
|
19
|
-
|
|
20
|
-
## Agent Notes
|
|
21
|
-
|
|
22
|
-
- Read this abstract before changing the module.
|
|
23
|
-
- Update this file when business invariants, workflows, or public behavior change.
|
|
24
|
-
- Do not update this file for formatting-only, import-only, or style-only changes.
|
|
25
|
-
|
|
26
|
-
## Related Modules
|
|
27
|
-
|
|
28
|
-
- None yet.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Service Abstract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Describe the business workflow or integration this service owns.
|
|
6
|
-
|
|
7
|
-
## Domain Rules
|
|
8
|
-
|
|
9
|
-
- Keep durable business invariants here.
|
|
10
|
-
- Avoid repeating implementation details already clear in the service or signal files.
|
|
11
|
-
|
|
12
|
-
## Data Meaning
|
|
13
|
-
|
|
14
|
-
Explain important input, output, and state meanings only when the code does not make the intent obvious.
|
|
15
|
-
|
|
16
|
-
## Workflows
|
|
17
|
-
|
|
18
|
-
Describe the service workflows, background jobs, external calls, or state transitions.
|
|
19
|
-
|
|
20
|
-
## Agent Notes
|
|
21
|
-
|
|
22
|
-
- Read this abstract before changing the service module.
|
|
23
|
-
- Keep business behavior in service code and expose callable actions through signals.
|
|
24
|
-
- Update this file when business invariants, workflows, or public behavior change.
|
|
25
|
-
|
|
26
|
-
## Related Modules
|
|
27
|
-
|
|
28
|
-
- None yet.
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
diff --git a/cjs/react-dom-client.development.js b/cjs/react-dom-client.development.js
|
|
2
|
-
index 8c860aca7db6a1ca74788209d100f10ae5f085fa..fa5f3344475e66bc04befe3cc631a1f4f710228b 100644
|
|
3
|
-
--- a/cjs/react-dom-client.development.js
|
|
4
|
-
+++ b/cjs/react-dom-client.development.js
|
|
5
|
-
@@ -18607,8 +18607,9 @@
|
|
6
|
-
(workInProgressRootRenderLanes & 62914560) ===
|
|
7
|
-
workInProgressRootRenderLanes &&
|
|
8
|
-
now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
|
|
9
|
-
- ? (executionContext & RenderContext) === NoContext &&
|
|
10
|
-
- prepareFreshStack(root, 0)
|
|
11
|
-
+ ? (executionContext & RenderContext) === NoContext
|
|
12
|
-
+ ? prepareFreshStack(root, 0)
|
|
13
|
-
+ : (workInProgressRootPingedLanes |= pingedLanes)
|
|
14
|
-
: (workInProgressRootPingedLanes |= pingedLanes),
|
|
15
|
-
workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
|
|
16
|
-
(workInProgressSuspendedRetryLanes = 0));
|
|
17
|
-
diff --git a/cjs/react-dom-client.production.js b/cjs/react-dom-client.production.js
|
|
18
|
-
index bbeab5ad7211c6fa240c790988898a47967b2469..5ebddf28cafddadf02af2edf49b98c1327bc31af 100644
|
|
19
|
-
--- a/cjs/react-dom-client.production.js
|
|
20
|
-
+++ b/cjs/react-dom-client.production.js
|
|
21
|
-
@@ -11856,7 +11856,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
|
|
22
|
-
(workInProgressRootRenderLanes & 62914560) ===
|
|
23
|
-
workInProgressRootRenderLanes &&
|
|
24
|
-
300 > now() - globalMostRecentFallbackTime)
|
|
25
|
-
- ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
|
|
26
|
-
+ ? 0 === (executionContext & 2)
|
|
27
|
-
+ ? prepareFreshStack(root, 0)
|
|
28
|
-
+ : (workInProgressRootPingedLanes |= pingedLanes)
|
|
29
|
-
: (workInProgressRootPingedLanes |= pingedLanes),
|
|
30
|
-
workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
|
|
31
|
-
(workInProgressSuspendedRetryLanes = 0));
|
|
32
|
-
diff --git a/cjs/react-dom-profiling.development.js b/cjs/react-dom-profiling.development.js
|
|
33
|
-
index 0df4ce8bc7ab7574e6c18fc0356d85303f4970aa..e2ebd50133473319eb3d191ff790700cda497309 100644
|
|
34
|
-
--- a/cjs/react-dom-profiling.development.js
|
|
35
|
-
+++ b/cjs/react-dom-profiling.development.js
|
|
36
|
-
@@ -18615,8 +18615,9 @@
|
|
37
|
-
(workInProgressRootRenderLanes & 62914560) ===
|
|
38
|
-
workInProgressRootRenderLanes &&
|
|
39
|
-
now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
|
|
40
|
-
- ? (executionContext & RenderContext) === NoContext &&
|
|
41
|
-
- prepareFreshStack(root, 0)
|
|
42
|
-
+ ? (executionContext & RenderContext) === NoContext
|
|
43
|
-
+ ? prepareFreshStack(root, 0)
|
|
44
|
-
+ : (workInProgressRootPingedLanes |= pingedLanes)
|
|
45
|
-
: (workInProgressRootPingedLanes |= pingedLanes),
|
|
46
|
-
workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
|
|
47
|
-
(workInProgressSuspendedRetryLanes = 0));
|
|
48
|
-
diff --git a/cjs/react-dom-profiling.profiling.js b/cjs/react-dom-profiling.profiling.js
|
|
49
|
-
index 91621dbe568cf0f924805e7492ff7f487c8254b5..315c5e88d3e03f841ac31ccee4fc17e19e196363 100644
|
|
50
|
-
--- a/cjs/react-dom-profiling.profiling.js
|
|
51
|
-
+++ b/cjs/react-dom-profiling.profiling.js
|
|
52
|
-
@@ -13672,7 +13672,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
|
|
53
|
-
(workInProgressRootRenderLanes & 62914560) ===
|
|
54
|
-
workInProgressRootRenderLanes &&
|
|
55
|
-
300 > now$1() - globalMostRecentFallbackTime)
|
|
56
|
-
- ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
|
|
57
|
-
+ ? 0 === (executionContext & 2)
|
|
58
|
-
+ ? prepareFreshStack(root, 0)
|
|
59
|
-
+ : (workInProgressRootPingedLanes |= pingedLanes)
|
|
60
|
-
: (workInProgressRootPingedLanes |= pingedLanes),
|
|
61
|
-
workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
|
|
62
|
-
(workInProgressSuspendedRetryLanes = 0));
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Workspace,
|
|
4
|
-
script,
|
|
5
|
-
command
|
|
6
|
-
} from "./index-mak3cd28.js";
|
|
7
|
-
import"./index-q0y2jq9j.js";
|
|
8
|
-
import"./index-2tv3fdx4.js";
|
|
9
|
-
import"./index-6wwzs1bc.js";
|
|
10
|
-
import {
|
|
11
|
-
createWorkflowStepRegistry
|
|
12
|
-
} from "./index-gyd220p2.js";
|
|
13
|
-
import"./index-kn1h7p1x.js";
|
|
14
|
-
import {
|
|
15
|
-
ModuleScript
|
|
16
|
-
} from "./index-8pm30m73.js";
|
|
17
|
-
import"./index-pnqbkf5p.js";
|
|
18
|
-
import"./index-h7yw2z9n.js";
|
|
19
|
-
import {
|
|
20
|
-
PrimitiveScript
|
|
21
|
-
} from "./index-4edzf1gr.js";
|
|
22
|
-
import {
|
|
23
|
-
ScalarScript
|
|
24
|
-
} from "./index-rwg2aa4f.js";
|
|
25
|
-
import"./index-by5gpp8x.js";
|
|
26
|
-
import"./index-ktb5njgy.js";
|
|
27
|
-
import {
|
|
28
|
-
WorkflowRunner
|
|
29
|
-
} from "./index-7737gxcp.js";
|
|
30
|
-
|
|
31
|
-
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
32
|
-
import { Logger } from "akanjs/common";
|
|
33
|
-
class WorkflowScript extends script("workflow", [WorkflowRunner, ModuleScript, ScalarScript, PrimitiveScript]) {
|
|
34
|
-
async workflow(action, workflow, inputs, {
|
|
35
|
-
format = "markdown",
|
|
36
|
-
out = null,
|
|
37
|
-
dryRun = false,
|
|
38
|
-
workspace
|
|
39
|
-
} = {}) {
|
|
40
|
-
if (action === "list") {
|
|
41
|
-
Logger.rawLog(this.workflowRunner.list({ format }));
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (!workflow)
|
|
45
|
-
throw new Error(`Workflow name is required for "${action}".`);
|
|
46
|
-
if (action === "explain") {
|
|
47
|
-
Logger.rawLog(this.workflowRunner.explain(workflow, { format }));
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (action === "plan") {
|
|
51
|
-
Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out }));
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (action === "apply") {
|
|
55
|
-
if (!workspace)
|
|
56
|
-
throw new Error("Workspace is required for workflow apply.");
|
|
57
|
-
Logger.rawLog(await this.workflowRunner.apply(workflow, {
|
|
58
|
-
dryRun,
|
|
59
|
-
format,
|
|
60
|
-
workspace,
|
|
61
|
-
registry: createWorkflowStepRegistry({
|
|
62
|
-
workspace,
|
|
63
|
-
createModule: (sys, module) => this.moduleScript.createModuleTemplate(sys, module),
|
|
64
|
-
createScalar: (sys, scalar) => this.scalarScript.createScalar(sys, scalar),
|
|
65
|
-
createUi: (input) => this.primitiveScript.createUi(workspace, input),
|
|
66
|
-
addField: (input) => this.primitiveScript.addField(workspace, input),
|
|
67
|
-
addEnumField: (input) => this.primitiveScript.addEnumField(workspace, input),
|
|
68
|
-
addMutation: (input) => this.primitiveScript.addMutation(workspace, input),
|
|
69
|
-
addSlice: (input) => this.primitiveScript.addSlice(workspace, input)
|
|
70
|
-
})
|
|
71
|
-
}));
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (action === "validate") {
|
|
75
|
-
if (!workspace)
|
|
76
|
-
throw new Error("Workspace is required for workflow validate.");
|
|
77
|
-
Logger.rawLog(await this.workflowRunner.validate(workflow, { format, workspace }));
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (action === "report") {
|
|
81
|
-
if (!workspace)
|
|
82
|
-
throw new Error("Workspace is required for workflow report.");
|
|
83
|
-
Logger.rawLog(await this.workflowRunner.report(workflow, { format, workspace }));
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
throw new Error(`Unknown workflow action: ${action}. Use list, explain, plan, apply, validate, or report.`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// pkgs/@akanjs/cli/workflow/workflow.command.ts
|
|
91
|
-
class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: target }) => ({
|
|
92
|
-
workflow: target({ desc: "List, explain, plan, apply, validate, or report Akan workflows" }).arg("action", String, {
|
|
93
|
-
desc: "list, explain, plan, apply, validate, or report",
|
|
94
|
-
enum: ["list", "explain", "plan", "apply", "validate", "report"]
|
|
95
|
-
}).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, {
|
|
96
|
-
desc: "output format",
|
|
97
|
-
flag: "o",
|
|
98
|
-
default: "markdown",
|
|
99
|
-
enum: ["markdown", "json"]
|
|
100
|
-
}).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("mutation", String, { flag: "n", desc: "mutation name", nullable: true }).option("slice", String, { flag: "i", desc: "slice name", nullable: true }).exec(async function(action, workflow, workspace, format, out, dryRun, app, module, field, typeName, values, defaultValue, scalar, surface, mutation, slice) {
|
|
101
|
-
await this.workflowScript.workflow(action, workflow, { app, module, field, type: typeName, values, default: defaultValue, scalar, surface, mutation, slice }, { format, out, dryRun, workspace });
|
|
102
|
-
})
|
|
103
|
-
})) {
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
WorkflowCommand
|
|
107
|
-
};
|