outfitter 0.2.7 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -7
- package/dist/actions/add.d.ts +18 -0
- package/dist/actions/add.js +14 -0
- package/dist/actions/check-automation.d.ts +20 -0
- package/dist/actions/check-automation.js +27 -0
- package/dist/actions/check.d.ts +34 -0
- package/dist/actions/check.js +19 -0
- package/dist/actions/demo.d.ts +12 -0
- package/dist/actions/demo.js +11 -0
- package/dist/actions/docs-output-mode.d.ts +4 -0
- package/dist/actions/docs-output-mode.js +8 -0
- package/dist/actions/docs.d.ts +25 -0
- package/dist/actions/docs.js +31 -0
- package/dist/actions/doctor.d.ts +10 -0
- package/dist/actions/doctor.js +15 -0
- package/dist/actions/init.d.ts +28 -0
- package/dist/actions/init.js +31 -0
- package/dist/actions/scaffold.d.ts +19 -0
- package/dist/actions/scaffold.js +21 -0
- package/dist/actions/shared.d.ts +61 -0
- package/dist/actions/shared.js +30 -0
- package/dist/actions/upgrade.d.ts +17 -0
- package/dist/actions/upgrade.js +21 -0
- package/dist/actions.d.ts +1 -1
- package/dist/actions.js +53 -22
- package/dist/cli.js +66 -4
- package/dist/commands/add.js +3 -3
- package/dist/commands/check-action-ceremony.d.ts +55 -0
- package/dist/commands/check-action-ceremony.js +15 -0
- package/dist/commands/check-docs-sentinel.d.ts +27 -0
- package/dist/commands/check-docs-sentinel.js +18 -0
- package/dist/commands/check-orchestrator.d.ts +2 -0
- package/dist/commands/check-orchestrator.js +17 -0
- package/dist/commands/check-preset-versions.d.ts +20 -0
- package/dist/commands/check-preset-versions.js +15 -0
- package/dist/commands/check-publish-guardrails.d.ts +38 -0
- package/dist/commands/check-publish-guardrails.js +19 -0
- package/dist/commands/check-surface-map-format.d.ts +29 -0
- package/dist/commands/check-surface-map-format.js +19 -0
- package/dist/commands/check-surface-map.d.ts +20 -0
- package/dist/commands/check-surface-map.js +15 -0
- package/dist/commands/check-tsdoc.d.ts +2 -21
- package/dist/commands/check-tsdoc.js +3 -2
- package/dist/commands/check.d.ts +2 -0
- package/dist/commands/check.js +3 -3
- package/dist/commands/demo.js +1 -1
- package/dist/commands/docs-api.d.ts +4 -0
- package/dist/commands/docs-api.js +13 -0
- package/dist/commands/docs-export.d.ts +4 -0
- package/dist/commands/docs-export.js +12 -0
- package/dist/commands/docs-list.d.ts +3 -0
- package/dist/commands/docs-list.js +13 -0
- package/dist/commands/docs-module-loader.d.ts +2 -2
- package/dist/commands/docs-module-loader.js +2 -2
- package/dist/commands/docs-search.d.ts +3 -0
- package/dist/commands/docs-search.js +13 -0
- package/dist/commands/docs-show.d.ts +3 -0
- package/dist/commands/docs-show.js +13 -0
- package/dist/commands/docs-types.d.ts +21 -0
- package/dist/commands/doctor.js +4 -12
- package/dist/commands/init-execution.d.ts +8 -0
- package/dist/commands/init-execution.js +11 -0
- package/dist/commands/init-option-resolution.d.ts +5 -0
- package/dist/commands/init-option-resolution.js +14 -0
- package/dist/commands/init-output.d.ts +9 -0
- package/dist/commands/init-output.js +11 -0
- package/dist/commands/init.d.ts +7 -5
- package/dist/commands/init.js +10 -18
- package/dist/commands/jq-utils.d.ts +17 -0
- package/dist/commands/jq-utils.js +8 -0
- package/dist/commands/repo.d.ts +3 -3
- package/dist/commands/repo.js +8 -4
- package/dist/commands/scaffold-output.d.ts +4 -0
- package/dist/commands/scaffold-output.js +11 -0
- package/dist/commands/scaffold-planning.d.ts +65 -0
- package/dist/commands/scaffold-planning.js +20 -0
- package/dist/commands/scaffold.d.ts +3 -3
- package/dist/commands/scaffold.js +10 -16
- package/dist/commands/shared-deps.d.ts +5 -4
- package/dist/commands/shared-deps.js +3 -3
- package/dist/commands/upgrade-apply.d.ts +14 -0
- package/dist/commands/upgrade-apply.js +8 -0
- package/dist/commands/upgrade-codemods.d.ts +5 -0
- package/dist/commands/upgrade-codemods.js +4 -5
- package/dist/commands/upgrade-latest-version.d.ts +8 -0
- package/dist/commands/upgrade-latest-version.js +8 -0
- package/dist/commands/upgrade-migration-docs.d.ts +3 -0
- package/dist/commands/upgrade-migration-docs.js +15 -0
- package/dist/commands/upgrade-migration-frontmatter.d.ts +2 -0
- package/dist/commands/upgrade-migration-frontmatter.js +10 -0
- package/dist/commands/upgrade-migration-guides.d.ts +5 -0
- package/dist/commands/upgrade-migration-guides.js +10 -0
- package/dist/commands/upgrade-output.d.ts +5 -0
- package/dist/commands/upgrade-output.js +11 -0
- package/dist/commands/upgrade-planner.js +1 -1
- package/dist/commands/upgrade-report.d.ts +5 -0
- package/dist/commands/upgrade-report.js +8 -0
- package/dist/commands/upgrade-workspace.js +2 -2
- package/dist/commands/upgrade.d.ts +4 -220
- package/dist/commands/upgrade.js +21 -9
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +2 -30
- package/dist/create/planner.d.ts +2 -2
- package/dist/create/planner.js +80 -17
- package/dist/create/presets.d.ts +2 -2
- package/dist/create/presets.js +2 -2
- package/dist/create/types.d.ts +1 -1
- package/dist/engine/blocks.d.ts +2 -2
- package/dist/engine/blocks.js +5 -5
- package/dist/engine/collector.d.ts +1 -1
- package/dist/engine/collector.js +1 -1
- package/dist/engine/config.d.ts +2 -2
- package/dist/engine/config.js +4 -4
- package/dist/engine/dependency-versions.d.ts +13 -8
- package/dist/engine/dependency-versions.js +4 -4
- package/dist/engine/executor.d.ts +2 -2
- package/dist/engine/executor.js +149 -12
- package/dist/engine/index.d.ts +9 -7
- package/dist/engine/index.js +17 -31
- package/dist/engine/names.js +1 -1
- package/dist/engine/post-scaffold.d.ts +2 -2
- package/dist/engine/post-scaffold.js +1 -1
- package/dist/engine/preset.d.ts +3 -0
- package/dist/engine/preset.js +17 -0
- package/dist/engine/render-plan.d.ts +1 -1
- package/dist/engine/render-plan.js +1 -1
- package/dist/engine/template.d.ts +3 -2
- package/dist/engine/template.js +24 -7
- package/dist/engine/types.d.ts +1 -1
- package/dist/engine/types.js +1 -1
- package/dist/engine/workspace.d.ts +2 -2
- package/dist/engine/workspace.js +1 -1
- package/dist/index.d.ts +17 -398
- package/dist/index.js +7 -164
- package/dist/manifest.js +2 -2
- package/dist/output-mode.js +1 -1
- package/dist/shared/{outfitter-6fgk6adm.d.ts → outfitter-1tfa9hke.d.ts} +16 -1
- package/dist/shared/{outfitter-6bkqjk86.d.ts → outfitter-2nx0k4b3.d.ts} +1 -0
- package/dist/shared/outfitter-2ysjerp6.d.ts +44 -0
- package/dist/shared/outfitter-2z61gp5w.js +29 -0
- package/dist/shared/outfitter-34vg353f.d.ts +82 -0
- package/dist/shared/{outfitter-5yjr404v.d.ts → outfitter-3dq4r10s.d.ts} +5 -3
- package/dist/shared/outfitter-3rcrvva8.js +103 -0
- package/dist/shared/{outfitter-79vfxt6y.js → outfitter-3tx3adgj.js} +12 -3
- package/dist/shared/{outfitter-63gse8fv.js → outfitter-507ra35w.js} +33 -64
- package/dist/shared/outfitter-56jq0rh2.d.ts +42 -0
- package/dist/shared/{outfitter-r419zfgs.d.ts → outfitter-58rn1sj1.d.ts} +1 -1
- package/dist/shared/outfitter-5d9wbzhh.d.ts +19 -0
- package/dist/shared/outfitter-5j7zee11.d.ts +180 -0
- package/dist/shared/{outfitter-s7jetkge.d.ts → outfitter-5r6q2749.d.ts} +1 -1
- package/dist/shared/outfitter-5vx1bp7h.js +41 -0
- package/dist/shared/outfitter-6ddf91vh.js +190 -0
- package/dist/shared/{outfitter-mt7d1ek2.js → outfitter-6mpkh3zn.js} +39 -305
- package/dist/shared/{outfitter-ybbazsxq.d.ts → outfitter-6rtcemk7.d.ts} +8 -4
- package/dist/shared/{outfitter-9x1brcmq.js → outfitter-6t7xeyg1.js} +13 -38
- package/dist/shared/outfitter-738z4c37.js +262 -0
- package/dist/shared/{outfitter-yvksv5qb.js → outfitter-76k25svs.js} +4 -4
- package/dist/shared/outfitter-7n7vsz95.js +101 -0
- package/dist/shared/outfitter-7q9fnbwa.js +60 -0
- package/dist/shared/outfitter-84chvazx.js +480 -0
- package/dist/shared/outfitter-8ggmja91.js +301 -0
- package/dist/shared/{outfitter-qakwgrrh.d.ts → outfitter-8kmak0wc.d.ts} +1 -1
- package/dist/shared/outfitter-940h0x7b.js +71 -0
- package/dist/shared/{outfitter-fn20r49x.d.ts → outfitter-954y4mzx.d.ts} +1 -1
- package/dist/shared/outfitter-b9cpnr7e.js +110 -0
- package/dist/shared/outfitter-c7sbs7es.js +92 -0
- package/dist/shared/outfitter-cyhzstz0.js +93 -0
- package/dist/shared/{outfitter-n9g1zk4x.d.ts → outfitter-cyvr4r8d.d.ts} +3 -2
- package/dist/shared/outfitter-d0kqashd.d.ts +98 -0
- package/dist/shared/outfitter-dx4hn4ta.js +325 -0
- package/dist/shared/{outfitter-bn9c8p2e.js → outfitter-e84cr97g.js} +37 -9
- package/dist/shared/outfitter-ec83h4v2.js +17 -0
- package/dist/shared/{outfitter-vh4xgb93.js → outfitter-ekb6t1zz.js} +4 -4
- package/dist/shared/outfitter-ex8gn945.js +51 -0
- package/dist/shared/outfitter-f3a70135.js +75 -0
- package/dist/shared/outfitter-fbvfd5zq.d.ts +13 -0
- package/dist/shared/outfitter-fj2v5ffz.js +165 -0
- package/dist/shared/outfitter-fx1m251y.js +122 -0
- package/dist/shared/outfitter-fxry5n58.js +254 -0
- package/dist/shared/outfitter-g3hvjshg.js +1 -0
- package/dist/shared/{outfitter-f9znfhkn.d.ts → outfitter-gdc7b7de.d.ts} +1 -1
- package/dist/shared/outfitter-gyayfx5r.js +156 -0
- package/dist/shared/outfitter-h0wmtxw8.d.ts +23 -0
- package/dist/shared/{outfitter-z5sx06qe.d.ts → outfitter-hcexcvxe.d.ts} +1 -1
- package/dist/shared/outfitter-hf5bj2gq.js +117 -0
- package/dist/shared/{outfitter-e9rrfekb.d.ts → outfitter-htx4asgr.d.ts} +4 -3
- package/dist/shared/outfitter-jkct38dh.js +53 -0
- package/dist/shared/outfitter-jwxggvz4.js +42 -0
- package/dist/shared/outfitter-k6zyvg2n.js +306 -0
- package/dist/shared/outfitter-mstr60zz.js +215 -0
- package/dist/shared/outfitter-n0ed012k.js +101 -0
- package/dist/shared/outfitter-n13pqaft.js +19 -0
- package/dist/shared/outfitter-nxvjxrmw.d.ts +48 -0
- package/dist/shared/outfitter-p2wn07b7.js +160 -0
- package/dist/shared/{outfitter-5y646xzk.js → outfitter-px5sv5gn.js} +29 -9
- package/dist/shared/outfitter-q1g58t85.js +8 -0
- package/dist/shared/{outfitter-pj9vp00r.js → outfitter-qsd5638j.js} +26 -249
- package/dist/shared/outfitter-qsrx7m4w.js +72 -0
- package/dist/shared/outfitter-r2awqszh.d.ts +52 -0
- package/dist/shared/outfitter-rdpw2sbp.d.ts +77 -0
- package/dist/shared/outfitter-rp89dafm.js +109 -0
- package/dist/shared/outfitter-s1c0whzj.js +121 -0
- package/dist/shared/{outfitter-w1j80j1r.js → outfitter-ssrtakh3.js} +21 -5
- package/dist/shared/outfitter-ssynegbs.js +167 -0
- package/dist/shared/{outfitter-zwyvewr1.js → outfitter-svts4wk2.js} +1 -1
- package/dist/shared/outfitter-tavatb5p.js +166 -0
- package/dist/shared/outfitter-tqznjgbm.js +44 -0
- package/dist/shared/{outfitter-yraebrmw.d.ts → outfitter-wcrp7d7m.d.ts} +1 -1
- package/dist/shared/outfitter-wkt0a0ra.js +67 -0
- package/dist/shared/{outfitter-ha89qf8q.js → outfitter-wrcqq29p.js} +4 -4
- package/dist/shared/outfitter-wyg1tpp5.d.ts +43 -0
- package/dist/shared/outfitter-x0vpb7tj.js +126 -0
- package/dist/shared/{outfitter-m44n0qzw.js → outfitter-x39awx8g.js} +11 -26
- package/dist/shared/outfitter-x4cc5xsq.js +168 -0
- package/dist/shared/outfitter-x8w5sjnd.d.ts +39 -0
- package/dist/shared/{outfitter-amc4jbs1.d.ts → outfitter-xr6g13nz.d.ts} +2 -2
- package/dist/shared/outfitter-xs94pkfe.js +106 -0
- package/dist/shared/outfitter-y37yfehn.d.ts +37 -0
- package/dist/shared/{outfitter-fhnjpjwc.d.ts → outfitter-y6ee0k45.d.ts} +1 -1
- package/dist/shared/{outfitter-j833sxws.js → outfitter-ydw7x6bh.js} +1 -1
- package/dist/shared/outfitter-yhb23pjc.js +89 -0
- package/dist/shared/{outfitter-mtbpabf3.js → outfitter-ypcvwg1s.js} +1 -1
- package/dist/shared/outfitter-znbqe5zy.d.ts +45 -0
- package/dist/shared/{outfitter-dpj9erew.d.ts → outfitter-zng6w0t9.d.ts} +1 -1
- package/dist/targets/index.d.ts +2 -2
- package/dist/targets/index.js +2 -3
- package/dist/targets/registry.d.ts +2 -2
- package/dist/targets/registry.js +207 -14
- package/dist/targets/types.d.ts +1 -1
- package/package.json +203 -40
- package/dist/shared/chunk-x6644tk8.js +0 -6491
- package/dist/shared/outfitter-20f6a2n4.js +0 -35
- package/dist/shared/outfitter-5akzvppx.js +0 -125
- package/dist/shared/outfitter-7ch26yq8.js +0 -885
- package/dist/shared/outfitter-ehp18x1n.js +0 -1
- package/dist/shared/outfitter-h3q6ae6d.d.ts +0 -48
- package/dist/shared/outfitter-hvsaxgcp.js +0 -1
- package/dist/shared/outfitter-p71qb0f0.js +0 -82
- package/dist/shared/outfitter-pcj9gg2g.js +0 -909
- package/dist/shared/outfitter-xe5mzgdc.js +0 -208
- package/dist/shared/outfitter-z0we32cp.d.ts +0 -63
- package/template-versions.json +0 -22
- package/templates/.gitkeep +0 -0
- package/templates/basic/.gitignore.template +0 -30
- package/templates/basic/.lefthook.yml.template +0 -26
- package/templates/basic/package.json.template +0 -46
- package/templates/basic/src/index.ts.template +0 -26
- package/templates/basic/tsconfig.json.template +0 -34
- package/templates/cli/.gitignore.template +0 -4
- package/templates/cli/.lefthook.yml.template +0 -26
- package/templates/cli/README.md.template +0 -35
- package/templates/cli/biome.json.template +0 -4
- package/templates/cli/package.json.template +0 -53
- package/templates/cli/src/cli.ts.template +0 -8
- package/templates/cli/src/index.ts.template +0 -7
- package/templates/cli/src/program.ts.template +0 -31
- package/templates/cli/tsconfig.json.template +0 -34
- package/templates/daemon/.gitignore.template +0 -4
- package/templates/daemon/.lefthook.yml.template +0 -26
- package/templates/daemon/README.md.template +0 -67
- package/templates/daemon/biome.json.template +0 -4
- package/templates/daemon/package.json.template +0 -56
- package/templates/daemon/src/cli.ts.template +0 -96
- package/templates/daemon/src/daemon-main.ts.template +0 -79
- package/templates/daemon/src/daemon.ts.template +0 -11
- package/templates/daemon/src/index.ts.template +0 -7
- package/templates/daemon/tsconfig.json.template +0 -23
- package/templates/full-stack/.gitignore.template +0 -30
- package/templates/full-stack/README.md.template +0 -30
- package/templates/full-stack/apps/cli/package.json.template +0 -39
- package/templates/full-stack/apps/cli/src/cli.ts.template +0 -24
- package/templates/full-stack/apps/cli/src/index.test.ts.template +0 -18
- package/templates/full-stack/apps/cli/src/index.ts.template +0 -5
- package/templates/full-stack/apps/cli/tsconfig.json.template +0 -37
- package/templates/full-stack/apps/mcp/package.json.template +0 -40
- package/templates/full-stack/apps/mcp/src/index.test.ts.template +0 -18
- package/templates/full-stack/apps/mcp/src/index.ts.template +0 -6
- package/templates/full-stack/apps/mcp/src/mcp.ts.template +0 -22
- package/templates/full-stack/apps/mcp/src/server.ts.template +0 -10
- package/templates/full-stack/apps/mcp/tsconfig.json.template +0 -37
- package/templates/full-stack/package.json.template +0 -16
- package/templates/full-stack/packages/core/package.json.template +0 -36
- package/templates/full-stack/packages/core/src/handlers.ts.template +0 -31
- package/templates/full-stack/packages/core/src/index.test.ts.template +0 -30
- package/templates/full-stack/packages/core/src/index.ts.template +0 -8
- package/templates/full-stack/packages/core/src/types.ts.template +0 -13
- package/templates/full-stack/packages/core/tsconfig.json.template +0 -34
- package/templates/library/.gitignore.template +0 -30
- package/templates/library/README.md.template +0 -29
- package/templates/library/bunup.config.ts.template +0 -20
- package/templates/library/package.json.template +0 -55
- package/templates/library/src/handlers.ts.template +0 -31
- package/templates/library/src/index.test.ts.template +0 -35
- package/templates/library/src/index.ts.template +0 -8
- package/templates/library/src/types.ts.template +0 -13
- package/templates/library/tsconfig.json.template +0 -34
- package/templates/mcp/.gitignore.template +0 -4
- package/templates/mcp/.lefthook.yml.template +0 -26
- package/templates/mcp/README.md.template +0 -54
- package/templates/mcp/biome.json.template +0 -4
- package/templates/mcp/package.json.template +0 -53
- package/templates/mcp/src/index.ts.template +0 -7
- package/templates/mcp/src/mcp.ts.template +0 -33
- package/templates/mcp/src/server.ts.template +0 -8
- package/templates/mcp/tsconfig.json.template +0 -23
- package/templates/minimal/.gitignore.template +0 -30
- package/templates/minimal/.lefthook.yml.template +0 -26
- package/templates/minimal/package.json.template +0 -53
- package/templates/minimal/src/index.ts.template +0 -26
- package/templates/minimal/tsconfig.json.template +0 -34
- /package/dist/{shared/outfitter-344t1r38.js → commands/docs-types.js} +0 -0
- /package/dist/shared/{outfitter-mdt37hqm.js → outfitter-eepj7rf7.js} +0 -0
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// apps/outfitter/src/targets/registry.ts
|
|
3
|
-
import { NotFoundError, Result, ValidationError } from "@outfitter/contracts";
|
|
4
|
-
var TARGET_ALIASES = new Map([
|
|
5
|
-
["basic", "minimal"],
|
|
6
|
-
["lib", "library"]
|
|
7
|
-
]);
|
|
8
|
-
var TARGET_REGISTRY = new Map([
|
|
9
|
-
[
|
|
10
|
-
"minimal",
|
|
11
|
-
{
|
|
12
|
-
id: "minimal",
|
|
13
|
-
description: "Minimal Bun + TypeScript project",
|
|
14
|
-
category: "library",
|
|
15
|
-
placement: "packages",
|
|
16
|
-
templateDir: "minimal",
|
|
17
|
-
defaultBlocks: ["scaffolding"],
|
|
18
|
-
status: "ready",
|
|
19
|
-
scope: "init-only"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
[
|
|
23
|
-
"cli",
|
|
24
|
-
{
|
|
25
|
-
id: "cli",
|
|
26
|
-
description: "CLI application with Outfitter command ergonomics",
|
|
27
|
-
category: "runnable",
|
|
28
|
-
placement: "apps",
|
|
29
|
-
templateDir: "cli",
|
|
30
|
-
defaultBlocks: ["scaffolding"],
|
|
31
|
-
status: "ready",
|
|
32
|
-
scope: "both"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
[
|
|
36
|
-
"mcp",
|
|
37
|
-
{
|
|
38
|
-
id: "mcp",
|
|
39
|
-
description: "MCP server with typed tools and action registry",
|
|
40
|
-
category: "runnable",
|
|
41
|
-
placement: "apps",
|
|
42
|
-
templateDir: "mcp",
|
|
43
|
-
defaultBlocks: ["scaffolding"],
|
|
44
|
-
status: "ready",
|
|
45
|
-
scope: "both"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"daemon",
|
|
50
|
-
{
|
|
51
|
-
id: "daemon",
|
|
52
|
-
description: "Background daemon with control CLI",
|
|
53
|
-
category: "runnable",
|
|
54
|
-
placement: "apps",
|
|
55
|
-
templateDir: "daemon",
|
|
56
|
-
defaultBlocks: ["scaffolding"],
|
|
57
|
-
status: "ready",
|
|
58
|
-
scope: "both"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
[
|
|
62
|
-
"api",
|
|
63
|
-
{
|
|
64
|
-
id: "api",
|
|
65
|
-
description: "HTTP API server (Hono)",
|
|
66
|
-
category: "runnable",
|
|
67
|
-
placement: "apps",
|
|
68
|
-
templateDir: "api",
|
|
69
|
-
defaultBlocks: ["scaffolding"],
|
|
70
|
-
status: "stub",
|
|
71
|
-
scope: "both"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
[
|
|
75
|
-
"worker",
|
|
76
|
-
{
|
|
77
|
-
id: "worker",
|
|
78
|
-
description: "Background job worker",
|
|
79
|
-
category: "runnable",
|
|
80
|
-
placement: "apps",
|
|
81
|
-
templateDir: "worker",
|
|
82
|
-
defaultBlocks: ["scaffolding"],
|
|
83
|
-
status: "stub",
|
|
84
|
-
scope: "both"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
[
|
|
88
|
-
"web",
|
|
89
|
-
{
|
|
90
|
-
id: "web",
|
|
91
|
-
description: "Web application (TanStack Start)",
|
|
92
|
-
category: "runnable",
|
|
93
|
-
placement: "apps",
|
|
94
|
-
templateDir: "web",
|
|
95
|
-
defaultBlocks: ["scaffolding"],
|
|
96
|
-
status: "stub",
|
|
97
|
-
scope: "both"
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
"library",
|
|
102
|
-
{
|
|
103
|
-
id: "library",
|
|
104
|
-
description: "Reusable library package with Result handlers",
|
|
105
|
-
category: "library",
|
|
106
|
-
placement: "packages",
|
|
107
|
-
templateDir: "library",
|
|
108
|
-
defaultBlocks: ["scaffolding"],
|
|
109
|
-
status: "ready",
|
|
110
|
-
scope: "init-only"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
"full-stack",
|
|
115
|
-
{
|
|
116
|
-
id: "full-stack",
|
|
117
|
-
description: "Workspace with CLI + MCP apps sharing a core handler package",
|
|
118
|
-
category: "runnable",
|
|
119
|
-
placement: "apps",
|
|
120
|
-
templateDir: "full-stack",
|
|
121
|
-
defaultBlocks: ["scaffolding"],
|
|
122
|
-
status: "ready",
|
|
123
|
-
scope: "init-only"
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
]);
|
|
127
|
-
var TARGET_IDS = [...TARGET_REGISTRY.keys()];
|
|
128
|
-
var READY_TARGET_IDS = TARGET_IDS.filter((id) => TARGET_REGISTRY.get(id)?.status === "ready");
|
|
129
|
-
var INIT_TARGET_IDS = TARGET_IDS.filter((id) => {
|
|
130
|
-
const target = TARGET_REGISTRY.get(id);
|
|
131
|
-
return target?.status === "ready" && target.scope !== "scaffold-only";
|
|
132
|
-
});
|
|
133
|
-
var SCAFFOLD_TARGET_IDS = TARGET_IDS.filter((id) => {
|
|
134
|
-
const target = TARGET_REGISTRY.get(id);
|
|
135
|
-
return target?.status === "ready" && target.scope !== "init-only";
|
|
136
|
-
});
|
|
137
|
-
function getTarget(id) {
|
|
138
|
-
const resolvedId = TARGET_ALIASES.get(id) ?? id;
|
|
139
|
-
const target = TARGET_REGISTRY.get(resolvedId);
|
|
140
|
-
if (!target) {
|
|
141
|
-
return Result.err(new NotFoundError({
|
|
142
|
-
message: `Unknown target '${id}'. Available targets: ${TARGET_IDS.join(", ")}`,
|
|
143
|
-
resourceType: "target",
|
|
144
|
-
resourceId: id
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
return Result.ok(target);
|
|
148
|
-
}
|
|
149
|
-
function getReadyTarget(id) {
|
|
150
|
-
const targetResult = getTarget(id);
|
|
151
|
-
if (targetResult.isErr()) {
|
|
152
|
-
return targetResult;
|
|
153
|
-
}
|
|
154
|
-
const target = targetResult.value;
|
|
155
|
-
if (target.status === "stub") {
|
|
156
|
-
return Result.err(new ValidationError({
|
|
157
|
-
message: `Target '${id}' is not yet available. ` + "It is planned but the template has not been implemented. " + `Ready targets: ${READY_TARGET_IDS.join(", ")}`,
|
|
158
|
-
field: "target"
|
|
159
|
-
}));
|
|
160
|
-
}
|
|
161
|
-
return Result.ok(target);
|
|
162
|
-
}
|
|
163
|
-
function getInitTarget(id) {
|
|
164
|
-
const targetResult = getReadyTarget(id);
|
|
165
|
-
if (targetResult.isErr()) {
|
|
166
|
-
return targetResult;
|
|
167
|
-
}
|
|
168
|
-
const target = targetResult.value;
|
|
169
|
-
if (target.scope === "scaffold-only") {
|
|
170
|
-
return Result.err(new ValidationError({
|
|
171
|
-
message: `Target '${id}' cannot be used with init. Use 'outfitter scaffold ${id}' instead.`,
|
|
172
|
-
field: "target"
|
|
173
|
-
}));
|
|
174
|
-
}
|
|
175
|
-
return Result.ok(target);
|
|
176
|
-
}
|
|
177
|
-
function getScaffoldTarget(id) {
|
|
178
|
-
const targetResult = getReadyTarget(id);
|
|
179
|
-
if (targetResult.isErr()) {
|
|
180
|
-
return targetResult;
|
|
181
|
-
}
|
|
182
|
-
const target = targetResult.value;
|
|
183
|
-
if (target.scope === "init-only") {
|
|
184
|
-
return Result.err(new ValidationError({
|
|
185
|
-
message: `Target '${id}' cannot be scaffolded into an existing project. ` + `It is only available for new project creation via 'outfitter init'.`,
|
|
186
|
-
field: "target"
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
return Result.ok(target);
|
|
190
|
-
}
|
|
191
|
-
function resolvePlacement(target) {
|
|
192
|
-
return target.placement;
|
|
193
|
-
}
|
|
194
|
-
function listTargets(filter) {
|
|
195
|
-
let targets = [...TARGET_REGISTRY.values()];
|
|
196
|
-
if (filter?.status) {
|
|
197
|
-
targets = targets.filter((target) => target.status === filter.status);
|
|
198
|
-
}
|
|
199
|
-
if (filter?.scope) {
|
|
200
|
-
targets = targets.filter((target) => target.scope === filter.scope);
|
|
201
|
-
}
|
|
202
|
-
if (filter?.category) {
|
|
203
|
-
targets = targets.filter((target) => target.category === filter.category);
|
|
204
|
-
}
|
|
205
|
-
return targets;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export { TARGET_REGISTRY, TARGET_IDS, READY_TARGET_IDS, INIT_TARGET_IDS, SCAFFOLD_TARGET_IDS, getTarget, getReadyTarget, getInitTarget, getScaffoldTarget, resolvePlacement, listTargets };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { PostScaffoldResult } from "./outfitter-z5sx06qe.js";
|
|
2
|
-
import { TargetId } from "./outfitter-r419zfgs.js";
|
|
3
|
-
import { OutputMode } from "@outfitter/cli/types";
|
|
4
|
-
import { Result } from "@outfitter/contracts";
|
|
5
|
-
import { AddBlockResult } from "@outfitter/tooling";
|
|
6
|
-
import { Command } from "commander";
|
|
7
|
-
type InitStructure = "single" | "workspace";
|
|
8
|
-
type InitPresetId = Extract<TargetId, "minimal" | "cli" | "mcp" | "daemon" | "library" | "full-stack">;
|
|
9
|
-
/**
|
|
10
|
-
* Options for the init command.
|
|
11
|
-
*/
|
|
12
|
-
interface InitOptions {
|
|
13
|
-
readonly bin?: string | undefined;
|
|
14
|
-
readonly dryRun?: boolean | undefined;
|
|
15
|
-
readonly force: boolean;
|
|
16
|
-
readonly installTimeout?: number | undefined;
|
|
17
|
-
readonly local?: boolean | undefined;
|
|
18
|
-
readonly name: string | undefined;
|
|
19
|
-
readonly noTooling?: boolean | undefined;
|
|
20
|
-
readonly preset?: InitPresetId | undefined;
|
|
21
|
-
readonly skipCommit?: boolean | undefined;
|
|
22
|
-
readonly skipGit?: boolean | undefined;
|
|
23
|
-
readonly skipInstall?: boolean | undefined;
|
|
24
|
-
readonly structure?: InitStructure | undefined;
|
|
25
|
-
readonly targetDir: string;
|
|
26
|
-
/** @deprecated Use `preset` instead. */
|
|
27
|
-
readonly template?: string | undefined;
|
|
28
|
-
readonly with?: string | undefined;
|
|
29
|
-
readonly workspaceName?: string | undefined;
|
|
30
|
-
readonly yes?: boolean | undefined;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Result of running init.
|
|
34
|
-
*/
|
|
35
|
-
interface InitResult {
|
|
36
|
-
readonly blocksAdded?: AddBlockResult | undefined;
|
|
37
|
-
readonly dryRunPlan?: {
|
|
38
|
-
readonly operations: readonly unknown[];
|
|
39
|
-
readonly summary: Record<string, number>;
|
|
40
|
-
} | undefined;
|
|
41
|
-
readonly packageName: string;
|
|
42
|
-
readonly postScaffold: PostScaffoldResult;
|
|
43
|
-
readonly preset: InitPresetId;
|
|
44
|
-
readonly projectDir: string;
|
|
45
|
-
readonly rootDir: string;
|
|
46
|
-
readonly structure: InitStructure;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Error returned when initialization fails.
|
|
50
|
-
*/
|
|
51
|
-
declare class InitError extends Error {
|
|
52
|
-
readonly _tag: "InitError";
|
|
53
|
-
constructor(message: string);
|
|
54
|
-
}
|
|
55
|
-
declare function runInit(options: InitOptions, presetOverride?: InitPresetId): Promise<Result<InitResult, InitError>>;
|
|
56
|
-
declare function printInitResults(result: InitResult, options?: {
|
|
57
|
-
mode?: OutputMode;
|
|
58
|
-
}): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`.
|
|
61
|
-
*/
|
|
62
|
-
declare function initCommand(program: Command): void;
|
|
63
|
-
export { InitStructure, InitPresetId, InitOptions, InitResult, InitError, runInit, printInitResults, initCommand };
|
package/template-versions.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"internalDependencies": {
|
|
3
|
-
"@outfitter/contracts": "^0.4.0",
|
|
4
|
-
"@outfitter/types": "^0.2.2",
|
|
5
|
-
"@outfitter/cli": "^0.5.1",
|
|
6
|
-
"@outfitter/logging": "^0.4.0",
|
|
7
|
-
"@outfitter/mcp": "^0.4.1",
|
|
8
|
-
"@outfitter/daemon": "^0.2.3",
|
|
9
|
-
"@outfitter/tooling": "^0.2.4"
|
|
10
|
-
},
|
|
11
|
-
"externalDependencies": {
|
|
12
|
-
"@biomejs/biome": "^2.4.4",
|
|
13
|
-
"@types/bun": "^1.3.9",
|
|
14
|
-
"bunup": "^0.16.29",
|
|
15
|
-
"commander": "^14.0.2",
|
|
16
|
-
"lefthook": "^2.1.1",
|
|
17
|
-
"typescript": "^5.9.3",
|
|
18
|
-
"ultracite": "^7.2.3",
|
|
19
|
-
"zod": "^4.3.5",
|
|
20
|
-
"@modelcontextprotocol/sdk": "^1.12.1"
|
|
21
|
-
}
|
|
22
|
-
}
|
package/templates/.gitkeep
DELETED
|
File without changes
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
dist/
|
|
6
|
-
|
|
7
|
-
# IDE
|
|
8
|
-
.idea/
|
|
9
|
-
.vscode/
|
|
10
|
-
*.swp
|
|
11
|
-
*.swo
|
|
12
|
-
|
|
13
|
-
# OS
|
|
14
|
-
.DS_Store
|
|
15
|
-
Thumbs.db
|
|
16
|
-
|
|
17
|
-
# Logs
|
|
18
|
-
*.log
|
|
19
|
-
npm-debug.log*
|
|
20
|
-
|
|
21
|
-
# Environment
|
|
22
|
-
.env
|
|
23
|
-
.env.local
|
|
24
|
-
.env.*.local
|
|
25
|
-
|
|
26
|
-
# Test coverage
|
|
27
|
-
coverage/
|
|
28
|
-
|
|
29
|
-
# Bun
|
|
30
|
-
bun.lockb
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Lefthook configuration
|
|
2
|
-
# https://github.com/evilmartians/lefthook
|
|
3
|
-
|
|
4
|
-
pre-commit:
|
|
5
|
-
parallel: true
|
|
6
|
-
commands:
|
|
7
|
-
format:
|
|
8
|
-
glob: "*.{js,ts,tsx,json,md}"
|
|
9
|
-
run: bunx biome format --no-errors-on-unmatched {staged_files}
|
|
10
|
-
stage_fixed: true
|
|
11
|
-
|
|
12
|
-
lint:
|
|
13
|
-
glob: "*.{js,ts,tsx}"
|
|
14
|
-
run: bunx biome lint --no-errors-on-unmatched {staged_files}
|
|
15
|
-
|
|
16
|
-
typecheck:
|
|
17
|
-
glob: "*.{ts,tsx}"
|
|
18
|
-
run: bun run typecheck
|
|
19
|
-
|
|
20
|
-
pre-push:
|
|
21
|
-
parallel: false
|
|
22
|
-
commands:
|
|
23
|
-
verify:
|
|
24
|
-
# TDD-aware strict verification with RED-phase branch carveout
|
|
25
|
-
# (*-tests, */tests, *_tests).
|
|
26
|
-
run: bunx @outfitter/tooling pre-push
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "{{description}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"default": "./dist/index.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "bun build ./src/index.ts --outdir=dist --format=esm",
|
|
21
|
-
"dev": "bun run --watch src/index.ts",
|
|
22
|
-
"test": "bun test",
|
|
23
|
-
"test:watch": "bun test --watch",
|
|
24
|
-
"typecheck": "tsc --noEmit",
|
|
25
|
-
"check": "ultracite check",
|
|
26
|
-
"verify:ci": "bun run typecheck && bun run check && bun run build && bun run test",
|
|
27
|
-
"lint": "biome check .",
|
|
28
|
-
"lint:fix": "biome check . --write",
|
|
29
|
-
"format": "biome format --write .",
|
|
30
|
-
"clean:artifacts": "rm -rf dist .turbo",
|
|
31
|
-
"clean": "rm -rf dist"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@biomejs/biome": "^2.4.4",
|
|
35
|
-
"@outfitter/tooling": "workspace:*",
|
|
36
|
-
"@types/bun": "^1.3.9",
|
|
37
|
-
"lefthook": "^2.1.1",
|
|
38
|
-
"typescript": "^5.9.3",
|
|
39
|
-
"ultracite": "^7.2.3"
|
|
40
|
-
},
|
|
41
|
-
"engines": {
|
|
42
|
-
"bun": ">=1.3.9"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [],
|
|
45
|
-
"license": "MIT"
|
|
46
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {{projectName}}
|
|
3
|
-
*
|
|
4
|
-
* {{description}}
|
|
5
|
-
*
|
|
6
|
-
* @packageDocumentation
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Main entry point for {{projectName}}.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { main } from "{{packageName}}";
|
|
15
|
-
*
|
|
16
|
-
* main();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export function main(): void {
|
|
20
|
-
console.log("Hello from {{projectName}}!");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Run if executed directly
|
|
24
|
-
if (import.meta.main) {
|
|
25
|
-
main();
|
|
26
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"lib": ["ESNext"],
|
|
8
|
-
"types": ["@types/bun"],
|
|
9
|
-
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"strictNullChecks": true,
|
|
13
|
-
"noUncheckedIndexedAccess": true,
|
|
14
|
-
"exactOptionalPropertyTypes": true,
|
|
15
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
16
|
-
"noImplicitReturns": true,
|
|
17
|
-
"noFallthroughCasesInSwitch": true,
|
|
18
|
-
|
|
19
|
-
"declaration": true,
|
|
20
|
-
"declarationMap": true,
|
|
21
|
-
"sourceMap": true,
|
|
22
|
-
"outDir": "./dist",
|
|
23
|
-
"rootDir": "./src",
|
|
24
|
-
|
|
25
|
-
"esModuleInterop": true,
|
|
26
|
-
"forceConsistentCasingInFileNames": true,
|
|
27
|
-
"isolatedModules": true,
|
|
28
|
-
"verbatimModuleSyntax": true,
|
|
29
|
-
"skipLibCheck": true,
|
|
30
|
-
"resolveJsonModule": true
|
|
31
|
-
},
|
|
32
|
-
"include": ["src/**/*"],
|
|
33
|
-
"exclude": ["node_modules", "dist"]
|
|
34
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Lefthook configuration
|
|
2
|
-
# https://github.com/evilmartians/lefthook
|
|
3
|
-
|
|
4
|
-
pre-commit:
|
|
5
|
-
parallel: true
|
|
6
|
-
commands:
|
|
7
|
-
format:
|
|
8
|
-
glob: "*.{js,ts,tsx,json,md}"
|
|
9
|
-
run: bunx biome format --no-errors-on-unmatched {staged_files}
|
|
10
|
-
stage_fixed: true
|
|
11
|
-
|
|
12
|
-
lint:
|
|
13
|
-
glob: "*.{js,ts,tsx}"
|
|
14
|
-
run: bunx biome lint --no-errors-on-unmatched {staged_files}
|
|
15
|
-
|
|
16
|
-
typecheck:
|
|
17
|
-
glob: "*.{ts,tsx}"
|
|
18
|
-
run: bun run typecheck
|
|
19
|
-
|
|
20
|
-
pre-push:
|
|
21
|
-
parallel: false
|
|
22
|
-
commands:
|
|
23
|
-
verify:
|
|
24
|
-
# TDD-aware strict verification with RED-phase branch carveout
|
|
25
|
-
# (*-tests, */tests, *_tests).
|
|
26
|
-
run: bunx @outfitter/tooling pre-push
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
{{description}}
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
bun add {{packageName}}
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
{{binName}} hello [name]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Development
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Install dependencies
|
|
21
|
-
bun install
|
|
22
|
-
|
|
23
|
-
# Run in development
|
|
24
|
-
bun run dev
|
|
25
|
-
|
|
26
|
-
# Build
|
|
27
|
-
bun run build
|
|
28
|
-
|
|
29
|
-
# Run tests
|
|
30
|
-
bun run test
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## License
|
|
34
|
-
|
|
35
|
-
MIT
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "{{description}}",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"{{binName}}": "./dist/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/index.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "bun build src/cli.ts --outdir dist --target bun && bun build src/index.ts --outdir dist --target bun --sourcemap",
|
|
19
|
-
"dev": "bun --watch src/cli.ts",
|
|
20
|
-
"typecheck": "tsc --noEmit",
|
|
21
|
-
"check": "ultracite check",
|
|
22
|
-
"verify:ci": "bun run typecheck && bun run check && bun run build && bun run test",
|
|
23
|
-
"test": "bun test",
|
|
24
|
-
"test:watch": "bun test --watch",
|
|
25
|
-
"lint": "biome check .",
|
|
26
|
-
"lint:fix": "biome check . --write",
|
|
27
|
-
"format": "biome format --write .",
|
|
28
|
-
"clean:artifacts": "rm -rf dist .turbo"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@outfitter/contracts": "workspace:*",
|
|
32
|
-
"@outfitter/types": "workspace:*",
|
|
33
|
-
"@outfitter/cli": "workspace:*",
|
|
34
|
-
"@outfitter/logging": "workspace:*",
|
|
35
|
-
"commander": "^14.0.2"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@biomejs/biome": "^2.4.4",
|
|
39
|
-
"@outfitter/tooling": "workspace:*",
|
|
40
|
-
"@types/bun": "^1.3.9",
|
|
41
|
-
"lefthook": "^2.1.1",
|
|
42
|
-
"typescript": "^5.9.3",
|
|
43
|
-
"ultracite": "^7.2.3"
|
|
44
|
-
},
|
|
45
|
-
"outfitter": {
|
|
46
|
-
"template": {
|
|
47
|
-
"kind": "runnable",
|
|
48
|
-
"placement": "apps",
|
|
49
|
-
"surfaces": ["cli"]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT"
|
|
53
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {{projectName}} - CLI program definition
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { command, createCLI } from "@outfitter/cli/command";
|
|
6
|
-
import { verbosePreset } from "@outfitter/cli/flags";
|
|
7
|
-
import { createLogger } from "@outfitter/logging";
|
|
8
|
-
|
|
9
|
-
const logger = createLogger({ name: "{{binName}}" });
|
|
10
|
-
|
|
11
|
-
export const program = createCLI({
|
|
12
|
-
name: "{{binName}}",
|
|
13
|
-
version: "{{version}}",
|
|
14
|
-
description: "{{description}}",
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const verbose = verbosePreset();
|
|
18
|
-
|
|
19
|
-
program.register(
|
|
20
|
-
command("hello [name]")
|
|
21
|
-
.description("Say hello")
|
|
22
|
-
.preset(verbose)
|
|
23
|
-
.action<{ verbose: boolean }>(async ({ args, flags }) => {
|
|
24
|
-
const { verbose: isVerbose } = verbose.resolve(flags);
|
|
25
|
-
const name = args[0] ?? "World";
|
|
26
|
-
logger.info(`Hello, ${name}!`);
|
|
27
|
-
if (isVerbose) {
|
|
28
|
-
logger.debug("Running in verbose mode");
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
31
|
-
);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"lib": ["ESNext"],
|
|
8
|
-
"types": ["@types/bun"],
|
|
9
|
-
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"strictNullChecks": true,
|
|
13
|
-
"noUncheckedIndexedAccess": true,
|
|
14
|
-
"exactOptionalPropertyTypes": true,
|
|
15
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
16
|
-
"noImplicitReturns": true,
|
|
17
|
-
"noFallthroughCasesInSwitch": true,
|
|
18
|
-
|
|
19
|
-
"declaration": true,
|
|
20
|
-
"declarationMap": true,
|
|
21
|
-
"sourceMap": true,
|
|
22
|
-
"outDir": "./dist",
|
|
23
|
-
"rootDir": "./src",
|
|
24
|
-
|
|
25
|
-
"esModuleInterop": true,
|
|
26
|
-
"forceConsistentCasingInFileNames": true,
|
|
27
|
-
"isolatedModules": true,
|
|
28
|
-
"verbatimModuleSyntax": true,
|
|
29
|
-
"skipLibCheck": true,
|
|
30
|
-
"resolveJsonModule": true
|
|
31
|
-
},
|
|
32
|
-
"include": ["src/**/*"],
|
|
33
|
-
"exclude": ["node_modules", "dist"]
|
|
34
|
-
}
|