outfitter 0.3.3 → 0.4.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/dist/actions/add.d.ts +1 -1
- package/dist/actions/add.js +6 -5
- package/dist/actions/check-automation.d.ts +4 -2
- package/dist/actions/check-automation.js +13 -9
- package/dist/actions/check.d.ts +2 -2
- package/dist/actions/check.js +6 -6
- package/dist/actions/demo.d.ts +1 -1
- package/dist/actions/demo.js +3 -4
- package/dist/actions/docs.d.ts +7 -7
- package/dist/actions/docs.js +12 -13
- package/dist/actions/doctor.d.ts +1 -1
- package/dist/actions/doctor.js +8 -7
- package/dist/actions/init.d.ts +9 -7
- package/dist/actions/init.js +12 -10
- package/dist/actions/scaffold.d.ts +1 -1
- package/dist/actions/scaffold.js +14 -12
- package/dist/actions/shared.d.ts +1 -20
- package/dist/actions/shared.js +1 -5
- package/dist/actions/upgrade.d.ts +10 -2
- package/dist/actions/upgrade.js +15 -8
- package/dist/actions.js +51 -48
- package/dist/cli.js +51 -48
- package/dist/commands/add.js +4 -3
- package/dist/commands/check-action-ceremony.d.ts +1 -1
- package/dist/commands/check-action-ceremony.js +2 -2
- package/dist/commands/check-action-registry.d.ts +52 -0
- package/dist/commands/check-action-registry.js +13 -0
- package/dist/commands/check-docs-sentinel.d.ts +1 -1
- package/dist/commands/check-docs-sentinel.js +2 -2
- package/dist/commands/check-orchestrator.d.ts +1 -1
- package/dist/commands/check-orchestrator.js +2 -2
- package/dist/commands/check-preset-versions.d.ts +4 -2
- package/dist/commands/check-preset-versions.js +8 -3
- package/dist/commands/check-publish-guardrails.d.ts +1 -1
- package/dist/commands/check-publish-guardrails.js +2 -2
- package/dist/commands/check-surface-map-format.d.ts +1 -1
- package/dist/commands/check-surface-map-format.js +2 -2
- package/dist/commands/check-surface-map.d.ts +1 -1
- package/dist/commands/check-surface-map.js +2 -2
- package/dist/commands/check-tsdoc.d.ts +2 -2
- package/dist/commands/check.js +3 -3
- package/dist/commands/demo.d.ts +1 -1
- package/dist/commands/demo.js +1 -1
- package/dist/commands/docs-api.d.ts +3 -3
- package/dist/commands/docs-api.js +2 -2
- package/dist/commands/docs-export.d.ts +2 -2
- package/dist/commands/docs-export.js +2 -2
- package/dist/commands/docs-list.d.ts +2 -2
- package/dist/commands/docs-list.js +2 -2
- package/dist/commands/docs-search.d.ts +2 -2
- package/dist/commands/docs-search.js +2 -2
- package/dist/commands/docs-show.d.ts +2 -2
- package/dist/commands/docs-show.js +2 -2
- package/dist/commands/doctor.js +6 -5
- package/dist/commands/init-execution.d.ts +5 -5
- package/dist/commands/init-execution.js +6 -4
- package/dist/commands/init-option-resolution.d.ts +3 -3
- package/dist/commands/init-option-resolution.js +1 -1
- package/dist/commands/init-output.d.ts +5 -5
- package/dist/commands/init-output.js +3 -3
- package/dist/commands/init.d.ts +5 -5
- package/dist/commands/init.js +9 -9
- package/dist/commands/scaffold-output.js +3 -3
- package/dist/commands/scaffold-planning.d.ts +9 -10
- package/dist/commands/scaffold-planning.js +6 -4
- package/dist/commands/scaffold.js +12 -10
- package/dist/commands/shared-deps.js +2 -2
- package/dist/commands/upgrade-codemod-builder.d.ts +45 -0
- package/dist/commands/upgrade-codemod-builder.js +14 -0
- package/dist/commands/upgrade-output.js +2 -2
- package/dist/commands/upgrade-workspace.js +5 -1
- package/dist/commands/upgrade.js +9 -5
- package/dist/create/index.d.ts +1 -1
- package/dist/create/planner.js +1 -1
- package/dist/engine/blocks.d.ts +2 -2
- package/dist/engine/blocks.js +5 -4
- package/dist/engine/config.d.ts +2 -2
- package/dist/engine/config.js +6 -5
- package/dist/engine/dependency-versions.d.ts +11 -3
- package/dist/engine/dependency-versions.js +6 -2
- package/dist/engine/executor.d.ts +2 -2
- package/dist/engine/executor.js +23 -10
- package/dist/engine/index.d.ts +8 -9
- package/dist/engine/index.js +1 -5
- package/dist/engine/package-json.d.ts +3 -0
- package/dist/engine/package-json.js +10 -0
- package/dist/engine/post-scaffold.js +1 -1
- package/dist/engine/preset.d.ts +3 -3
- package/dist/engine/preset.js +4 -2
- package/dist/engine/render-plan.js +2 -2
- package/dist/engine/types.d.ts +1 -1
- package/dist/engine/workspace.d.ts +2 -2
- package/dist/engine/workspace.js +3 -2
- package/dist/index.d.ts +7 -7
- package/dist/manifest.js +1 -1
- package/dist/output-mode.d.ts +2 -2
- package/dist/output-mode.js +2 -4
- package/dist/scaffold-e2e/cli.d.ts +19 -0
- package/dist/scaffold-e2e/cli.js +14 -0
- package/dist/scaffold-e2e/config.d.ts +6 -0
- package/dist/scaffold-e2e/config.js +14 -0
- package/dist/scaffold-e2e/runner.d.ts +29 -0
- package/dist/scaffold-e2e/runner.js +17 -0
- package/dist/scaffold-e2e/template-guardrails.d.ts +25 -0
- package/dist/scaffold-e2e/template-guardrails.js +183 -0
- package/dist/scaffold-e2e/workspace.d.ts +27 -0
- package/dist/scaffold-e2e/workspace.js +18 -0
- package/dist/scripts/scaffold-e2e.js +78 -0
- package/dist/shared/{outfitter-qsrx7m4w.js → outfitter-00wxeg2g.js} +8 -8
- package/dist/shared/{outfitter-ex8gn945.js → outfitter-0cspz333.js} +4 -6
- package/dist/shared/{outfitter-rp89dafm.js → outfitter-0xp447gf.js} +55 -8
- package/dist/shared/outfitter-0zs8makw.js +94 -0
- package/dist/shared/{outfitter-5d9wbzhh.d.ts → outfitter-11r5ny73.d.ts} +2 -2
- package/dist/shared/{outfitter-gyayfx5r.js → outfitter-18s82np1.js} +1 -1
- package/dist/shared/{outfitter-954y4mzx.d.ts → outfitter-1dekqnaw.d.ts} +1 -1
- package/dist/shared/{outfitter-6t7xeyg1.js → outfitter-1t8gjzw6.js} +91 -3
- package/dist/shared/{outfitter-tqznjgbm.js → outfitter-23159bef.js} +6 -3
- package/dist/shared/{outfitter-y6ee0k45.d.ts → outfitter-232ean4v.d.ts} +1 -1
- package/dist/shared/{outfitter-3rcrvva8.js → outfitter-247et71q.js} +8 -8
- package/dist/shared/{outfitter-xs94pkfe.js → outfitter-3f261xh0.js} +5 -7
- package/dist/shared/outfitter-4bs5a2n4.js +31 -0
- package/dist/shared/{outfitter-76k25svs.js → outfitter-4c4q091c.js} +6 -28
- package/dist/shared/{outfitter-738z4c37.js → outfitter-4t818mq5.js} +21 -9
- package/dist/shared/{outfitter-4s9meh3j.js → outfitter-4w9sc6bw.js} +24 -0
- package/dist/shared/outfitter-5gaptj9b.js +83 -0
- package/dist/shared/{outfitter-2ysjerp6.d.ts → outfitter-5rc4hxdn.d.ts} +2 -2
- package/dist/shared/{outfitter-ttjr95y9.js → outfitter-7krhbg3b.js} +3 -3
- package/dist/shared/{outfitter-7n7vsz95.js → outfitter-7t7ces1x.js} +1 -42
- package/dist/shared/{outfitter-gdc7b7de.d.ts → outfitter-8231g70k.d.ts} +1 -1
- package/dist/shared/{outfitter-yhb23pjc.js → outfitter-8jd1sak0.js} +4 -4
- package/dist/shared/{outfitter-wkt0a0ra.js → outfitter-93e1shd4.js} +4 -6
- package/dist/shared/{outfitter-wyg1tpp5.d.ts → outfitter-a93yanw6.d.ts} +1 -1
- package/dist/shared/{outfitter-mstr60zz.js → outfitter-aa5nzw14.js} +47 -22
- package/dist/shared/{outfitter-fxry5n58.js → outfitter-b05mvbmx.js} +4 -4
- package/dist/shared/{outfitter-1fy7byz5.js → outfitter-bsjq8gkk.js} +6 -4
- package/dist/shared/{outfitter-ssrtakh3.js → outfitter-c50y6yr3.js} +4 -4
- package/dist/shared/{outfitter-cyvr4r8d.d.ts → outfitter-crxe5gth.d.ts} +4 -0
- package/dist/shared/{outfitter-fj2v5ffz.js → outfitter-d5kz9x7g.js} +1 -1
- package/dist/shared/{outfitter-k6zyvg2n.js → outfitter-dna8exj2.js} +19 -10
- package/dist/shared/{outfitter-940h0x7b.js → outfitter-e44qcs0w.js} +3 -3
- package/dist/shared/{outfitter-r2awqszh.d.ts → outfitter-e5x0ybqt.d.ts} +12 -3
- package/dist/shared/{outfitter-3tx3adgj.js → outfitter-ez7qffv5.js} +8 -6
- package/dist/shared/outfitter-fgrqt6aq.js +179 -0
- package/dist/shared/outfitter-fhahf9f3.d.ts +14 -0
- package/dist/shared/{outfitter-c7sbs7es.js → outfitter-g6r9avgz.js} +3 -3
- package/dist/shared/{outfitter-ssynegbs.js → outfitter-ga59fa45.js} +1 -1
- package/dist/shared/{outfitter-tavatb5p.js → outfitter-gna739c3.js} +86 -31
- package/dist/shared/{outfitter-nxvjxrmw.d.ts → outfitter-grt5ngqq.d.ts} +1 -1
- package/dist/shared/{outfitter-58rn1sj1.d.ts → outfitter-gsjbcta2.d.ts} +1 -1
- package/dist/shared/{outfitter-q1g58t85.js → outfitter-gvpwpqnc.js} +0 -1
- package/dist/shared/{outfitter-x39awx8g.js → outfitter-hr4cvmjy.js} +47 -25
- package/dist/shared/{outfitter-84chvazx.js → outfitter-hw9f0zq9.js} +75 -31
- package/dist/shared/{outfitter-ksyvwmb5.js → outfitter-jhpcjeg1.js} +5 -5
- package/dist/shared/outfitter-kc46jq69.d.ts +12 -0
- package/dist/shared/{outfitter-px5sv5gn.js → outfitter-ksg34wka.js} +5 -5
- package/dist/shared/{outfitter-wrcqq29p.js → outfitter-n63ygpv3.js} +30 -23
- package/dist/shared/{outfitter-qsd5638j.js → outfitter-n9jp1abt.js} +16 -40
- package/dist/shared/{outfitter-d0kqashd.d.ts → outfitter-nhft74pe.d.ts} +4 -2
- package/dist/shared/{outfitter-8kmak0wc.d.ts → outfitter-nx1sywpb.d.ts} +1 -1
- package/dist/shared/{outfitter-5r6q2749.d.ts → outfitter-pw74st5t.d.ts} +1 -1
- package/dist/shared/{outfitter-h0wmtxw8.d.ts → outfitter-qka1skyw.d.ts} +1 -1
- package/dist/shared/{outfitter-6mpkh3zn.js → outfitter-qps83547.js} +30 -23
- package/dist/shared/outfitter-qzd5djgx.js +88 -0
- package/dist/shared/{outfitter-hf5bj2gq.js → outfitter-sh015v8k.js} +4 -4
- package/dist/shared/{outfitter-ypcvwg1s.js → outfitter-srznx3hj.js} +1 -1
- package/dist/shared/{outfitter-n0ed012k.js → outfitter-ssq33ym3.js} +8 -8
- package/dist/shared/outfitter-sxf8jjjn.js +7 -0
- package/dist/shared/{outfitter-p2wn07b7.js → outfitter-t535h0mw.js} +1 -1
- package/dist/shared/{outfitter-znbqe5zy.d.ts → outfitter-t8dg4tg5.d.ts} +1 -1
- package/dist/shared/{outfitter-ydw7x6bh.js → outfitter-t8mvabed.js} +1 -1
- package/dist/shared/{outfitter-6ddf91vh.js → outfitter-t9xkn37g.js} +11 -12
- package/dist/shared/{outfitter-x4cc5xsq.js → outfitter-wmgzyymq.js} +4 -4
- package/dist/shared/outfitter-wna6gp2t.js +56 -0
- package/dist/shared/outfitter-x0r7mfvy.js +142 -0
- package/dist/shared/{outfitter-b9cpnr7e.js → outfitter-x4f8v5vf.js} +1 -1
- package/dist/shared/{outfitter-x8w5sjnd.d.ts → outfitter-x6322tjp.d.ts} +1 -1
- package/dist/shared/{outfitter-6rtcemk7.d.ts → outfitter-xa4915yp.d.ts} +3 -2
- package/dist/shared/{outfitter-2z61gp5w.js → outfitter-xg5yryp2.js} +1 -1
- package/dist/shared/{outfitter-rdpw2sbp.d.ts → outfitter-xn5km042.d.ts} +6 -0
- package/dist/shared/{outfitter-cyhzstz0.js → outfitter-xqr4fp1n.js} +4 -4
- package/dist/shared/outfitter-z6tg0swx.js +87 -0
- package/dist/shared/{outfitter-dx4hn4ta.js → outfitter-zmzrsvcn.js} +17 -21
- package/dist/shared/{outfitter-8ggmja91.js → outfitter-zqj1nte1.js} +66 -67
- package/dist/targets/index.d.ts +2 -2
- package/dist/targets/registry.d.ts +2 -2
- package/dist/targets/registry.js +13 -1
- package/dist/targets/types.d.ts +1 -1
- package/package.json +85 -39
- package/dist/actions/docs-output-mode.d.ts +0 -4
- package/dist/actions/docs-output-mode.js +0 -8
- package/dist/engine/template.d.ts +0 -4
- package/dist/engine/template.js +0 -34
- package/dist/shared/outfitter-7r12fj7f.js +0 -30
- package/dist/shared/outfitter-a79xrm12.d.ts +0 -17
- package/dist/shared/outfitter-ec83h4v2.js +0 -17
- package/dist/shared/outfitter-fbvfd5zq.d.ts +0 -13
- package/dist/shared/outfitter-jkct38dh.js +0 -53
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
printInitResults
|
|
4
|
-
} from "./outfitter-n0ed012k.js";
|
|
5
|
-
import {
|
|
6
|
-
isBinaryPreset,
|
|
7
|
-
parseBlocks,
|
|
8
|
-
resolvePresetFromFlags
|
|
9
|
-
} from "./outfitter-2z61gp5w.js";
|
|
10
2
|
import {
|
|
11
3
|
executeInitPipeline
|
|
12
|
-
} from "./outfitter-
|
|
4
|
+
} from "./outfitter-gna739c3.js";
|
|
13
5
|
import {
|
|
14
6
|
INIT_TARGET_IDS,
|
|
15
7
|
TARGET_REGISTRY,
|
|
16
8
|
getInitTarget
|
|
17
9
|
} from "./outfitter-g3hvjshg.js";
|
|
10
|
+
import {
|
|
11
|
+
printInitResults
|
|
12
|
+
} from "./outfitter-ssq33ym3.js";
|
|
18
13
|
import {
|
|
19
14
|
deriveBinName,
|
|
20
15
|
deriveProjectName,
|
|
21
16
|
resolvePackageName,
|
|
22
17
|
sanitizePackageName,
|
|
23
18
|
validatePackageName
|
|
24
|
-
} from "./outfitter-
|
|
19
|
+
} from "./outfitter-gvpwpqnc.js";
|
|
20
|
+
import {
|
|
21
|
+
isBinaryPreset,
|
|
22
|
+
parseBlocks,
|
|
23
|
+
resolvePresetFromFlags
|
|
24
|
+
} from "./outfitter-xg5yryp2.js";
|
|
25
25
|
|
|
26
26
|
// apps/outfitter/src/commands/init.ts
|
|
27
27
|
import { basename, resolve } from "path";
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
text
|
|
36
36
|
} from "@clack/prompts";
|
|
37
37
|
import { exitWithError } from "@outfitter/cli";
|
|
38
|
+
import { resolveOutputMode as resolveOutputModeFromFlags } from "@outfitter/cli/query";
|
|
38
39
|
import { Result } from "@outfitter/contracts";
|
|
39
40
|
class InitError extends Error {
|
|
40
41
|
_tag = "InitError";
|
|
@@ -83,7 +84,8 @@ async function resolveInitInput(options, presetOverride) {
|
|
|
83
84
|
local: Boolean(options.local),
|
|
84
85
|
...blocksOverride2 ? { blocksOverride: blocksOverride2 } : {},
|
|
85
86
|
...workspaceName2 ? { workspaceName: workspaceName2 } : {},
|
|
86
|
-
...options.bin ? { binName: options.bin } : {}
|
|
87
|
+
...options.bin ? { binName: options.bin } : {},
|
|
88
|
+
...options.example ? { example: options.example } : {}
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
91
|
intro("Outfitter init");
|
|
@@ -211,7 +213,8 @@ async function resolveInitInput(options, presetOverride) {
|
|
|
211
213
|
local: Boolean(localValue),
|
|
212
214
|
...blocksOverride ? { blocksOverride } : {},
|
|
213
215
|
...workspaceName ? { workspaceName } : {},
|
|
214
|
-
...binName ? { binName } : {}
|
|
216
|
+
...binName ? { binName } : {},
|
|
217
|
+
...options.example ? { example: options.example } : {}
|
|
215
218
|
});
|
|
216
219
|
}
|
|
217
220
|
async function runInit(options, presetOverride) {
|
|
@@ -244,12 +247,10 @@ var resolveLocal = (flags) => {
|
|
|
244
247
|
return;
|
|
245
248
|
};
|
|
246
249
|
var resolveOutputMode = (flags) => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
return;
|
|
250
|
+
const { mode } = resolveOutputModeFromFlags(flags);
|
|
251
|
+
return mode === "human" ? undefined : mode;
|
|
251
252
|
};
|
|
252
|
-
var withCommonOptions = (command) => command.option("-n, --name <name>", "Package name (defaults to directory name)").option("-b, --bin <name>", "Binary name (defaults to project name)").option("-p, --preset <preset>", "Preset to use (minimal|cli|mcp|daemon|library|full-stack)").option("-s, --structure <mode>", "Project structure (single|workspace)").option("--workspace-name <name>", "Workspace root package name").option("-f, --force", "Overwrite existing files", false).option("--local", "Use workspace:* for @outfitter dependencies").option("--workspace", "Alias for --local").option("--with <blocks>", "Comma-separated tooling blocks to add").option("--no-tooling", "Skip default tooling blocks").option("-y, --yes", "Skip prompts and use defaults", false).option("--dry-run", "Preview changes without writing files", false).option("--skip-install", "Skip bun install", false).option("--skip-git", "Skip git init and initial commit", false).option("--skip-commit", "Skip initial commit only", false).option("--install-timeout <ms>", "bun install timeout in ms");
|
|
253
|
+
var withCommonOptions = (command) => command.option("-n, --name <name>", "Package name (defaults to directory name)").option("-b, --bin <name>", "Binary name (defaults to project name)").option("-e, --example <name>", "Scaffold with a pattern-rich example (cli: todo; mcp: files)").option("-p, --preset <preset>", "Preset to use (basic|minimal|cli|mcp|daemon|library|full-stack)").option("-s, --structure <mode>", "Project structure (single|workspace)").option("--workspace-name <name>", "Workspace root package name").option("-f, --force", "Overwrite existing files", false).option("--local", "Use workspace:* for @outfitter dependencies").option("--workspace", "Alias for --local").option("--with <blocks>", "Comma-separated tooling blocks to add").option("--no-tooling", "Skip default tooling blocks").option("-y, --yes", "Skip prompts and use defaults", false).option("--dry-run", "Preview changes without writing files", false).option("--skip-install", "Skip bun install", false).option("--skip-git", "Skip git init and initial commit", false).option("--skip-commit", "Skip initial commit only", false).option("--install-timeout <ms>", "bun install timeout in ms");
|
|
253
254
|
function initCommand(program) {
|
|
254
255
|
const init = program.command("init").description("Create a new Outfitter project");
|
|
255
256
|
const resolveFlags = (flags, command) => {
|
|
@@ -274,6 +275,7 @@ function initCommand(program) {
|
|
|
274
275
|
force: resolvedFlags.force ?? false,
|
|
275
276
|
with: resolvedFlags.with,
|
|
276
277
|
noTooling: resolvedFlags.noTooling,
|
|
278
|
+
example: resolvedFlags.example,
|
|
277
279
|
yes: resolvedFlags.yes,
|
|
278
280
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
279
281
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -282,7 +284,7 @@ function initCommand(program) {
|
|
|
282
284
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
283
285
|
});
|
|
284
286
|
if (result.isErr()) {
|
|
285
|
-
exitWithError(result.error,
|
|
287
|
+
exitWithError(result.error, mode);
|
|
286
288
|
return;
|
|
287
289
|
}
|
|
288
290
|
await printInitResults(result.value, outputOptions);
|
|
@@ -302,6 +304,7 @@ function initCommand(program) {
|
|
|
302
304
|
force: resolvedFlags.force ?? false,
|
|
303
305
|
with: resolvedFlags.with,
|
|
304
306
|
noTooling: resolvedFlags.noTooling,
|
|
307
|
+
example: resolvedFlags.example,
|
|
305
308
|
yes: resolvedFlags.yes,
|
|
306
309
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
307
310
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -310,7 +313,7 @@ function initCommand(program) {
|
|
|
310
313
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
311
314
|
}, "cli");
|
|
312
315
|
if (result.isErr()) {
|
|
313
|
-
exitWithError(result.error,
|
|
316
|
+
exitWithError(result.error, mode);
|
|
314
317
|
return;
|
|
315
318
|
}
|
|
316
319
|
await printInitResults(result.value, outputOptions);
|
|
@@ -330,6 +333,7 @@ function initCommand(program) {
|
|
|
330
333
|
force: resolvedFlags.force ?? false,
|
|
331
334
|
with: resolvedFlags.with,
|
|
332
335
|
noTooling: resolvedFlags.noTooling,
|
|
336
|
+
example: resolvedFlags.example,
|
|
333
337
|
yes: resolvedFlags.yes,
|
|
334
338
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
335
339
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -338,7 +342,7 @@ function initCommand(program) {
|
|
|
338
342
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
339
343
|
}, "mcp");
|
|
340
344
|
if (result.isErr()) {
|
|
341
|
-
exitWithError(result.error,
|
|
345
|
+
exitWithError(result.error, mode);
|
|
342
346
|
return;
|
|
343
347
|
}
|
|
344
348
|
await printInitResults(result.value, outputOptions);
|
|
@@ -358,6 +362,7 @@ function initCommand(program) {
|
|
|
358
362
|
force: resolvedFlags.force ?? false,
|
|
359
363
|
with: resolvedFlags.with,
|
|
360
364
|
noTooling: resolvedFlags.noTooling,
|
|
365
|
+
example: resolvedFlags.example,
|
|
361
366
|
yes: resolvedFlags.yes,
|
|
362
367
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
363
368
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -366,7 +371,7 @@ function initCommand(program) {
|
|
|
366
371
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
367
372
|
}, "daemon");
|
|
368
373
|
if (result.isErr()) {
|
|
369
|
-
exitWithError(result.error,
|
|
374
|
+
exitWithError(result.error, mode);
|
|
370
375
|
return;
|
|
371
376
|
}
|
|
372
377
|
await printInitResults(result.value, outputOptions);
|
|
@@ -386,6 +391,7 @@ function initCommand(program) {
|
|
|
386
391
|
force: resolvedFlags.force ?? false,
|
|
387
392
|
with: resolvedFlags.with,
|
|
388
393
|
noTooling: resolvedFlags.noTooling,
|
|
394
|
+
example: resolvedFlags.example,
|
|
389
395
|
yes: resolvedFlags.yes,
|
|
390
396
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
391
397
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -394,7 +400,7 @@ function initCommand(program) {
|
|
|
394
400
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
395
401
|
}, "library");
|
|
396
402
|
if (result.isErr()) {
|
|
397
|
-
exitWithError(result.error,
|
|
403
|
+
exitWithError(result.error, mode);
|
|
398
404
|
return;
|
|
399
405
|
}
|
|
400
406
|
await printInitResults(result.value, outputOptions);
|
|
@@ -414,6 +420,7 @@ function initCommand(program) {
|
|
|
414
420
|
force: resolvedFlags.force ?? false,
|
|
415
421
|
with: resolvedFlags.with,
|
|
416
422
|
noTooling: resolvedFlags.noTooling,
|
|
423
|
+
example: resolvedFlags.example,
|
|
417
424
|
yes: resolvedFlags.yes,
|
|
418
425
|
dryRun: Boolean(resolvedFlags.dryRun),
|
|
419
426
|
skipInstall: Boolean(resolvedFlags.skipInstall),
|
|
@@ -422,7 +429,7 @@ function initCommand(program) {
|
|
|
422
429
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
423
430
|
}, "full-stack");
|
|
424
431
|
if (result.isErr()) {
|
|
425
|
-
exitWithError(result.error,
|
|
432
|
+
exitWithError(result.error, mode);
|
|
426
433
|
return;
|
|
427
434
|
}
|
|
428
435
|
await printInitResults(result.value, outputOptions);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
resolveScaffoldE2EPresets
|
|
4
|
+
} from "./outfitter-x0r7mfvy.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveScaffoldE2EProfile
|
|
7
|
+
} from "./outfitter-4bs5a2n4.js";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_SCAFFOLD_E2E_RETENTION_MS
|
|
10
|
+
} from "./outfitter-z6tg0swx.js";
|
|
11
|
+
|
|
12
|
+
// apps/outfitter/src/scaffold-e2e/cli.ts
|
|
13
|
+
function parseScaffoldE2EArgs(argv) {
|
|
14
|
+
let clean = false;
|
|
15
|
+
let keep = process.env["OUTFITTER_SCAFFOLD_E2E_KEEP"] === "1";
|
|
16
|
+
let rootDir = process.env["OUTFITTER_SCAFFOLD_E2E_ROOT"];
|
|
17
|
+
let maxAgeMs = DEFAULT_SCAFFOLD_E2E_RETENTION_MS;
|
|
18
|
+
let profile = "default";
|
|
19
|
+
const presets = [];
|
|
20
|
+
for (let index = 0;index < argv.length; index += 1) {
|
|
21
|
+
const arg = argv[index];
|
|
22
|
+
if (arg === "--clean") {
|
|
23
|
+
clean = true;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (arg === "--ci") {
|
|
27
|
+
profile = "ci";
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (arg === "--keep") {
|
|
31
|
+
keep = true;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (arg === "--root") {
|
|
35
|
+
const value = argv[index + 1];
|
|
36
|
+
if (!value) {
|
|
37
|
+
throw new Error("Missing value for --root");
|
|
38
|
+
}
|
|
39
|
+
rootDir = value;
|
|
40
|
+
index += 1;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (arg === "--max-age-hours") {
|
|
44
|
+
const value = argv[index + 1];
|
|
45
|
+
if (!value) {
|
|
46
|
+
throw new Error("Missing value for --max-age-hours");
|
|
47
|
+
}
|
|
48
|
+
const hours = Number(value);
|
|
49
|
+
if (!Number.isFinite(hours) || hours < 0) {
|
|
50
|
+
throw new Error(`Invalid --max-age-hours value: ${value}`);
|
|
51
|
+
}
|
|
52
|
+
maxAgeMs = hours * 60 * 60 * 1000;
|
|
53
|
+
index += 1;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (arg === "--preset") {
|
|
57
|
+
const value = argv[index + 1];
|
|
58
|
+
if (!value) {
|
|
59
|
+
throw new Error("Missing value for --preset");
|
|
60
|
+
}
|
|
61
|
+
presets.push(value);
|
|
62
|
+
index += 1;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
throw new Error(`Unknown argument: ${arg}`);
|
|
66
|
+
}
|
|
67
|
+
if (clean && presets.length > 0) {
|
|
68
|
+
throw new Error("--clean cannot be combined with --preset");
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
clean,
|
|
72
|
+
keep,
|
|
73
|
+
maxAgeMs,
|
|
74
|
+
presets: presets.length > 0 ? presets : undefined,
|
|
75
|
+
profile,
|
|
76
|
+
rootDir
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function resolveScaffoldE2EScriptPlan(args) {
|
|
80
|
+
const profile = resolveScaffoldE2EProfile(args.profile);
|
|
81
|
+
const presets = args.presets ? resolveScaffoldE2EPresets(args.presets) : profile.presets;
|
|
82
|
+
return {
|
|
83
|
+
profile,
|
|
84
|
+
presets
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { parseScaffoldE2EArgs, resolveScaffoldE2EScriptPlan };
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./outfitter-svts4wk2.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveStructuredOutputMode
|
|
10
|
-
} from "./outfitter-
|
|
10
|
+
} from "./outfitter-sxf8jjjn.js";
|
|
11
11
|
|
|
12
12
|
// apps/outfitter/src/commands/docs-search.ts
|
|
13
13
|
import { readFile } from "fs/promises";
|
|
@@ -82,7 +82,7 @@ async function printDocsSearchResults(result, options) {
|
|
|
82
82
|
});
|
|
83
83
|
process.stdout.write(filtered);
|
|
84
84
|
} else {
|
|
85
|
-
await output(result,
|
|
85
|
+
await output(result, structuredMode);
|
|
86
86
|
}
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ async function printDocsSearchResults(result, options) {
|
|
|
90
90
|
const lines = [];
|
|
91
91
|
if (result.total === 0) {
|
|
92
92
|
lines.push(theme.muted(`No documentation entries matched "${result.query}".`));
|
|
93
|
-
await output(lines,
|
|
93
|
+
await output(lines, "human");
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
lines.push("");
|
|
@@ -111,7 +111,7 @@ async function printDocsSearchResults(result, options) {
|
|
|
111
111
|
}
|
|
112
112
|
lines.push("");
|
|
113
113
|
}
|
|
114
|
-
await output(lines,
|
|
114
|
+
await output(lines, "human");
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
export { runDocsSearch, printDocsSearchResults };
|
|
@@ -60,7 +60,7 @@ async function writeManifest(cwd, manifest) {
|
|
|
60
60
|
} else {
|
|
61
61
|
mkdirSync(dirPath, { recursive: true });
|
|
62
62
|
}
|
|
63
|
-
const content = JSON.stringify(manifest, null,
|
|
63
|
+
const content = JSON.stringify(manifest, null, 2);
|
|
64
64
|
await Bun.write(path, `${content}
|
|
65
65
|
`);
|
|
66
66
|
return Result.ok(undefined);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
OperationCollector
|
|
4
|
+
} from "./outfitter-1h7k8xxt.js";
|
|
2
5
|
import {
|
|
3
6
|
renderOperationPlan
|
|
4
|
-
} from "./outfitter-
|
|
7
|
+
} from "./outfitter-7krhbg3b.js";
|
|
5
8
|
import {
|
|
6
9
|
resolveStructuredOutputMode
|
|
7
|
-
} from "./outfitter-
|
|
8
|
-
import {
|
|
9
|
-
OperationCollector
|
|
10
|
-
} from "./outfitter-1h7k8xxt.js";
|
|
10
|
+
} from "./outfitter-sxf8jjjn.js";
|
|
11
11
|
|
|
12
12
|
// apps/outfitter/src/commands/init-output.ts
|
|
13
13
|
import { realpath } from "fs/promises";
|
|
@@ -29,7 +29,7 @@ async function printInitResults(result, options) {
|
|
|
29
29
|
preset: result.preset,
|
|
30
30
|
packageName: result.packageName,
|
|
31
31
|
...result.dryRunPlan
|
|
32
|
-
},
|
|
32
|
+
}, structuredMode);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const collector = new OperationCollector;
|
|
@@ -49,7 +49,7 @@ async function printInitResults(result, options) {
|
|
|
49
49
|
blocksAdded: result.blocksAdded ?? null,
|
|
50
50
|
postScaffold: result.postScaffold,
|
|
51
51
|
nextSteps: result.postScaffold.nextSteps
|
|
52
|
-
},
|
|
52
|
+
}, structuredMode);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
const lines = [
|
|
@@ -95,7 +95,7 @@ async function printInitResults(result, options) {
|
|
|
95
95
|
for (const step of result.postScaffold.nextSteps) {
|
|
96
96
|
lines.push(` ${step}`);
|
|
97
97
|
}
|
|
98
|
-
await output(lines,
|
|
98
|
+
await output(lines, "human");
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export { printInitResults };
|
|
@@ -5,27 +5,27 @@ import {
|
|
|
5
5
|
detectProjectStructure,
|
|
6
6
|
ensureWorkspacePattern,
|
|
7
7
|
validateScaffoldTargetName
|
|
8
|
-
} from "./outfitter-
|
|
8
|
+
} from "./outfitter-n9jp1abt.js";
|
|
9
9
|
import {
|
|
10
10
|
getScaffoldTarget
|
|
11
11
|
} from "./outfitter-g3hvjshg.js";
|
|
12
|
+
import {
|
|
13
|
+
printScaffoldResults
|
|
14
|
+
} from "./outfitter-00wxeg2g.js";
|
|
12
15
|
import {
|
|
13
16
|
deriveProjectName,
|
|
14
17
|
executePlan,
|
|
15
18
|
isPathWithin
|
|
16
|
-
} from "./outfitter-
|
|
19
|
+
} from "./outfitter-gvpwpqnc.js";
|
|
17
20
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./outfitter-
|
|
21
|
+
OperationCollector
|
|
22
|
+
} from "./outfitter-1h7k8xxt.js";
|
|
20
23
|
import {
|
|
21
24
|
runPostScaffold
|
|
22
|
-
} from "./outfitter-
|
|
25
|
+
} from "./outfitter-4w9sc6bw.js";
|
|
23
26
|
import {
|
|
24
27
|
scaffoldWorkspaceRoot
|
|
25
|
-
} from "./outfitter-
|
|
26
|
-
import {
|
|
27
|
-
OperationCollector
|
|
28
|
-
} from "./outfitter-1h7k8xxt.js";
|
|
28
|
+
} from "./outfitter-bsjq8gkk.js";
|
|
29
29
|
|
|
30
30
|
// apps/outfitter/src/commands/scaffold.ts
|
|
31
31
|
import { existsSync } from "fs";
|
|
@@ -166,7 +166,6 @@ function scaffoldCommand(program) {
|
|
|
166
166
|
program.command("scaffold <target> [name]").description("Add a capability to an existing project").option("-f, --force", "Overwrite existing files", false).option("--skip-install", "Skip bun install", false).option("--dry-run", "Preview changes without executing", false).option("--with <blocks>", "Comma-separated tooling blocks to add").option("--no-tooling", "Skip default tooling blocks").option("--local", "Use workspace:* for @outfitter dependencies").option("--install-timeout <ms>", "bun install timeout in ms").action(async (target, name, _flags, command) => {
|
|
167
167
|
const resolvedFlags = command.optsWithGlobals();
|
|
168
168
|
const mode = resolvedFlags.json ? "json" : undefined;
|
|
169
|
-
const outputOptions = mode ? { mode } : undefined;
|
|
170
169
|
const result = await runScaffold({
|
|
171
170
|
target,
|
|
172
171
|
name,
|
|
@@ -180,10 +179,10 @@ function scaffoldCommand(program) {
|
|
|
180
179
|
...resolvedFlags.installTimeout !== undefined ? { installTimeout: resolvedFlags.installTimeout } : {}
|
|
181
180
|
});
|
|
182
181
|
if (result.isErr()) {
|
|
183
|
-
exitWithError(result.error,
|
|
182
|
+
exitWithError(result.error, mode);
|
|
184
183
|
return;
|
|
185
184
|
}
|
|
186
|
-
await printScaffoldResults(result.value,
|
|
185
|
+
await printScaffoldResults(result.value, mode ? { mode } : undefined);
|
|
187
186
|
});
|
|
188
187
|
}
|
|
189
188
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./outfitter-fx1m251y.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveStructuredOutputMode
|
|
8
|
-
} from "./outfitter-
|
|
8
|
+
} from "./outfitter-sxf8jjjn.js";
|
|
9
9
|
|
|
10
10
|
// apps/outfitter/src/commands/upgrade-output.ts
|
|
11
11
|
import { output } from "@outfitter/cli";
|
|
@@ -13,7 +13,7 @@ import { createTheme } from "@outfitter/tui/render";
|
|
|
13
13
|
async function printUpgradeResults(result, options) {
|
|
14
14
|
const structuredMode = resolveStructuredOutputMode(options?.mode);
|
|
15
15
|
if (structuredMode) {
|
|
16
|
-
await output(result,
|
|
16
|
+
await output(result, structuredMode);
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
const theme = createTheme();
|
|
@@ -21,7 +21,7 @@ async function printUpgradeResults(result, options) {
|
|
|
21
21
|
if (result.packages.length === 0) {
|
|
22
22
|
lines.push("No @outfitter/* packages found in package.json.");
|
|
23
23
|
if (!result.unknownPackages || result.unknownPackages.length === 0) {
|
|
24
|
-
await output(lines,
|
|
24
|
+
await output(lines, "human");
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
lines.push("");
|
|
@@ -162,7 +162,7 @@ async function printUpgradeResults(result, options) {
|
|
|
162
162
|
lines.push("", theme.muted("Migration docs not found locally. See https://github.com/outfitter-dev/outfitter for migration guides."));
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
await output(lines,
|
|
165
|
+
await output(lines, "human");
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
export { printUpgradeResults };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
upgradeAction,
|
|
4
|
+
upgradeCodemodAction
|
|
5
|
+
} from "./outfitter-0xp447gf.js";
|
|
6
|
+
import {
|
|
7
|
+
createAction,
|
|
8
|
+
initAction,
|
|
9
|
+
initBasicAction,
|
|
10
|
+
initCliAction,
|
|
11
|
+
initDaemonAction,
|
|
12
|
+
initFullStackAction,
|
|
13
|
+
initLibraryAction,
|
|
14
|
+
initMcpAction
|
|
15
|
+
} from "./outfitter-4t818mq5.js";
|
|
16
|
+
import {
|
|
17
|
+
docsApiAction,
|
|
18
|
+
docsExportAction,
|
|
19
|
+
docsListAction,
|
|
20
|
+
docsSearchAction,
|
|
21
|
+
docsShowAction
|
|
22
|
+
} from "./outfitter-zmzrsvcn.js";
|
|
23
|
+
import {
|
|
24
|
+
doctorAction
|
|
25
|
+
} from "./outfitter-0cspz333.js";
|
|
26
|
+
import {
|
|
27
|
+
demoAction
|
|
28
|
+
} from "./outfitter-93e1shd4.js";
|
|
29
|
+
import {
|
|
30
|
+
checkAction,
|
|
31
|
+
checkTsdocAction
|
|
32
|
+
} from "./outfitter-dna8exj2.js";
|
|
33
|
+
import {
|
|
34
|
+
addAction,
|
|
35
|
+
listBlocksAction
|
|
36
|
+
} from "./outfitter-247et71q.js";
|
|
37
|
+
import {
|
|
38
|
+
checkActionCeremonyAction,
|
|
39
|
+
checkActionRegistryAction,
|
|
40
|
+
checkDocsSentinelAction,
|
|
41
|
+
checkPresetVersionsAction,
|
|
42
|
+
checkPublishGuardrailsAction,
|
|
43
|
+
checkSurfaceMapAction,
|
|
44
|
+
checkSurfaceMapFormatAction
|
|
45
|
+
} from "./outfitter-aa5nzw14.js";
|
|
46
|
+
import {
|
|
47
|
+
scaffoldAction
|
|
48
|
+
} from "./outfitter-3f261xh0.js";
|
|
49
|
+
|
|
50
|
+
// apps/outfitter/src/actions.ts
|
|
51
|
+
import {
|
|
52
|
+
createActionRegistry
|
|
53
|
+
} from "@outfitter/contracts";
|
|
54
|
+
var outfitterActions = createActionRegistry().add(createAction).add(scaffoldAction).add(initAction).add(initBasicAction).add(initCliAction).add(initMcpAction).add(initDaemonAction).add(initLibraryAction).add(initFullStackAction).add(demoAction).add(doctorAction).add(addAction).add(listBlocksAction).add(checkAction).add(checkTsdocAction).add(checkPublishGuardrailsAction).add(checkPresetVersionsAction).add(checkSurfaceMapAction).add(checkSurfaceMapFormatAction).add(checkDocsSentinelAction).add(checkActionCeremonyAction).add(checkActionRegistryAction).add(upgradeAction).add(upgradeCodemodAction).add(docsListAction).add(docsShowAction).add(docsSearchAction).add(docsApiAction).add(docsExportAction);
|
|
55
|
+
|
|
56
|
+
export { outfitterActions };
|