outfitter 0.3.4 → 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-dmfac1w9.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-xwzjgswj.js → outfitter-hw9f0zq9.js} +57 -21
- 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-1gmrtapz.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-yywcypw8.js +0 -53
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./shared/outfitter-wvbpxqq7.js";
|
|
2
|
-
import { planCreateProject } from "./shared/outfitter-zng6w0t9.js";
|
|
3
2
|
import { CREATE_PRESETS, CREATE_PRESET_IDS, getCreatePreset } from "./shared/outfitter-wcrp7d7m.js";
|
|
3
|
+
import { planCreateProject } from "./shared/outfitter-zng6w0t9.js";
|
|
4
4
|
import { CreatePlanChange, CreatePresetDefinition, CreatePresetId, CreateProjectInput, CreateProjectPlan } from "./shared/outfitter-htx4asgr.js";
|
|
5
|
-
import { InitError, InitOptions, InitResult, initCommand, printInitResults, runInit } from "./shared/outfitter-
|
|
6
|
-
import { InitStructure } from "./shared/outfitter-
|
|
7
|
-
import { InitPresetId } from "./shared/outfitter-
|
|
5
|
+
import { InitError, InitOptions, InitResult, initCommand, printInitResults, runInit } from "./shared/outfitter-nhft74pe.js";
|
|
6
|
+
import { InitStructure } from "./shared/outfitter-e5x0ybqt.js";
|
|
7
|
+
import { InitPresetId } from "./shared/outfitter-11r5ny73.js";
|
|
8
8
|
import "./shared/outfitter-y784nh31.js";
|
|
9
|
-
import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "./shared/outfitter-
|
|
10
|
-
import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "./shared/outfitter-
|
|
11
|
-
import { BunVersionCheck, CheckResult, ConfigFilesCheck, DependenciesCheck, DirectoriesCheck, DoctorOptions, DoctorResult, DoctorSummary, PackageJsonCheck, doctorCommand, printDoctorResults, runDoctor } from "./shared/outfitter-hsp8vy5m.js";
|
|
9
|
+
import { INIT_TARGET_IDS, READY_TARGET_IDS, SCAFFOLD_TARGET_IDS, TARGET_IDS, TARGET_REGISTRY, getInitTarget, getReadyTarget, getScaffoldTarget, getTarget, listTargets, resolvePlacement } from "./shared/outfitter-pw74st5t.js";
|
|
10
|
+
import { TargetCategory, TargetDefinition, TargetId, TargetScope, TargetStatus } from "./shared/outfitter-gsjbcta2.js";
|
|
12
11
|
import { CreateRepoCommandOptions, RepoCheckSubject, RepoCommandIo, RepoToolingInvocation, createRepoCommand } from "./shared/outfitter-3dq4r10s.js";
|
|
13
12
|
import "./shared/outfitter-1tfa9hke.js";
|
|
14
13
|
import { ScaffoldCommandError, ScaffoldCommandResult, ScaffoldOptions, printScaffoldResults, runScaffold, scaffoldCommand } from "./shared/outfitter-34vg353f.js";
|
|
14
|
+
import { BunVersionCheck, CheckResult, ConfigFilesCheck, DependenciesCheck, DirectoriesCheck, DoctorOptions, DoctorResult, DoctorSummary, PackageJsonCheck, doctorCommand, printDoctorResults, runDoctor } from "./shared/outfitter-hsp8vy5m.js";
|
|
15
15
|
import "./shared/outfitter-hcexcvxe.js";
|
|
16
16
|
import { outfitterActions } from "./shared/outfitter-2nx0k4b3.js";
|
|
17
17
|
import "./shared/outfitter-xr6g13nz.js";
|
package/dist/manifest.js
CHANGED
package/dist/output-mode.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CliOutputMode, StructuredOutputMode,
|
|
2
|
-
export { resolveStructuredOutputMode,
|
|
1
|
+
import { CliOutputMode, StructuredOutputMode, resolveStructuredOutputMode } from "./shared/outfitter-fhahf9f3.js";
|
|
2
|
+
export { resolveStructuredOutputMode, StructuredOutputMode, CliOutputMode };
|
package/dist/output-mode.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
resolveOutputModeFromContext,
|
|
4
3
|
resolveStructuredOutputMode
|
|
5
|
-
} from "./shared/outfitter-
|
|
4
|
+
} from "./shared/outfitter-sxf8jjjn.js";
|
|
6
5
|
import"./shared/outfitter-eepj7rf7.js";
|
|
7
6
|
export {
|
|
8
|
-
resolveStructuredOutputMode
|
|
9
|
-
resolveOutputModeFromContext
|
|
7
|
+
resolveStructuredOutputMode
|
|
10
8
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ScaffoldE2EProfileId, resolveScaffoldE2EProfile } from "../shared/outfitter-kc46jq69.js";
|
|
2
|
+
import { InitPresetId } from "../shared/outfitter-11r5ny73.js";
|
|
3
|
+
import "../shared/outfitter-y784nh31.js";
|
|
4
|
+
import "../shared/outfitter-pw74st5t.js";
|
|
5
|
+
import "../shared/outfitter-gsjbcta2.js";
|
|
6
|
+
interface ParsedScaffoldE2EArgs {
|
|
7
|
+
readonly clean: boolean;
|
|
8
|
+
readonly keep: boolean;
|
|
9
|
+
readonly maxAgeMs: number;
|
|
10
|
+
readonly presets: readonly string[] | undefined;
|
|
11
|
+
readonly profile: ScaffoldE2EProfileId;
|
|
12
|
+
readonly rootDir: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
declare function parseScaffoldE2EArgs(argv: readonly string[]): ParsedScaffoldE2EArgs;
|
|
15
|
+
declare function resolveScaffoldE2EScriptPlan(args: ParsedScaffoldE2EArgs): {
|
|
16
|
+
readonly presets: readonly InitPresetId[];
|
|
17
|
+
readonly profile: ReturnType<typeof resolveScaffoldE2EProfile>;
|
|
18
|
+
};
|
|
19
|
+
export { resolveScaffoldE2EScriptPlan, parseScaffoldE2EArgs, ParsedScaffoldE2EArgs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
parseScaffoldE2EArgs,
|
|
4
|
+
resolveScaffoldE2EScriptPlan
|
|
5
|
+
} from "../shared/outfitter-qzd5djgx.js";
|
|
6
|
+
import"../shared/outfitter-x0r7mfvy.js";
|
|
7
|
+
import"../shared/outfitter-4bs5a2n4.js";
|
|
8
|
+
import"../shared/outfitter-z6tg0swx.js";
|
|
9
|
+
import"../shared/outfitter-xg5yryp2.js";
|
|
10
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
11
|
+
export {
|
|
12
|
+
resolveScaffoldE2EScriptPlan,
|
|
13
|
+
parseScaffoldE2EArgs
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_SCAFFOLD_E2E_PRESETS, SCAFFOLD_E2E_STEPS_PER_PRESET, ScaffoldE2EProfile, ScaffoldE2EProfileId, getScaffoldE2ESuiteTimeoutBudgetMs, resolveScaffoldE2EProfile } from "../shared/outfitter-kc46jq69.js";
|
|
2
|
+
import "../shared/outfitter-11r5ny73.js";
|
|
3
|
+
import "../shared/outfitter-y784nh31.js";
|
|
4
|
+
import "../shared/outfitter-pw74st5t.js";
|
|
5
|
+
import "../shared/outfitter-gsjbcta2.js";
|
|
6
|
+
export { resolveScaffoldE2EProfile, getScaffoldE2ESuiteTimeoutBudgetMs, ScaffoldE2EProfileId, ScaffoldE2EProfile, SCAFFOLD_E2E_STEPS_PER_PRESET, DEFAULT_SCAFFOLD_E2E_PRESETS };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_SCAFFOLD_E2E_PRESETS,
|
|
4
|
+
SCAFFOLD_E2E_STEPS_PER_PRESET,
|
|
5
|
+
getScaffoldE2ESuiteTimeoutBudgetMs,
|
|
6
|
+
resolveScaffoldE2EProfile
|
|
7
|
+
} from "../shared/outfitter-4bs5a2n4.js";
|
|
8
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
9
|
+
export {
|
|
10
|
+
resolveScaffoldE2EProfile,
|
|
11
|
+
getScaffoldE2ESuiteTimeoutBudgetMs,
|
|
12
|
+
SCAFFOLD_E2E_STEPS_PER_PRESET,
|
|
13
|
+
DEFAULT_SCAFFOLD_E2E_PRESETS
|
|
14
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DEFAULT_SCAFFOLD_E2E_PRESETS, ScaffoldE2EProfileId } from "../shared/outfitter-kc46jq69.js";
|
|
2
|
+
import { InitPresetId } from "../shared/outfitter-11r5ny73.js";
|
|
3
|
+
import "../shared/outfitter-y784nh31.js";
|
|
4
|
+
import "../shared/outfitter-pw74st5t.js";
|
|
5
|
+
import "../shared/outfitter-gsjbcta2.js";
|
|
6
|
+
interface CommandResult {
|
|
7
|
+
readonly exitCode: number;
|
|
8
|
+
readonly stderr: string;
|
|
9
|
+
readonly stdout: string;
|
|
10
|
+
readonly timedOut: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface ScaffoldPresetVerificationResult {
|
|
13
|
+
readonly preset: InitPresetId;
|
|
14
|
+
readonly steps: readonly {
|
|
15
|
+
readonly command: string;
|
|
16
|
+
readonly durationMs: number;
|
|
17
|
+
}[];
|
|
18
|
+
readonly targetDir: string;
|
|
19
|
+
}
|
|
20
|
+
interface RunScaffoldE2ESuiteOptions {
|
|
21
|
+
readonly profile?: ScaffoldE2EProfileId;
|
|
22
|
+
readonly presets?: readonly InitPresetId[];
|
|
23
|
+
readonly runDir: string;
|
|
24
|
+
readonly timeoutMs?: number;
|
|
25
|
+
}
|
|
26
|
+
declare function resolveScaffoldCliEntry(baseDir: string, fileExists?: (path: string) => boolean): string;
|
|
27
|
+
declare function resolveScaffoldE2EPresets(values: readonly string[] | undefined): readonly InitPresetId[];
|
|
28
|
+
declare function runScaffoldE2ESuite(options: RunScaffoldE2ESuiteOptions): Promise<readonly ScaffoldPresetVerificationResult[]>;
|
|
29
|
+
export { runScaffoldE2ESuite, resolveScaffoldE2EPresets, resolveScaffoldCliEntry, ScaffoldPresetVerificationResult, RunScaffoldE2ESuiteOptions, DEFAULT_SCAFFOLD_E2E_PRESETS, CommandResult };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
resolveScaffoldCliEntry,
|
|
4
|
+
resolveScaffoldE2EPresets,
|
|
5
|
+
runScaffoldE2ESuite
|
|
6
|
+
} from "../shared/outfitter-x0r7mfvy.js";
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_SCAFFOLD_E2E_PRESETS
|
|
9
|
+
} from "../shared/outfitter-4bs5a2n4.js";
|
|
10
|
+
import"../shared/outfitter-xg5yryp2.js";
|
|
11
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
12
|
+
export {
|
|
13
|
+
runScaffoldE2ESuite,
|
|
14
|
+
resolveScaffoldE2EPresets,
|
|
15
|
+
resolveScaffoldCliEntry,
|
|
16
|
+
DEFAULT_SCAFFOLD_E2E_PRESETS
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type GuardrailTool = "oxfmt" | "oxlint" | "schema-annotation" | "ultracite";
|
|
2
|
+
interface TemplateGuardrailFailure {
|
|
3
|
+
readonly output: string;
|
|
4
|
+
readonly paths: readonly string[];
|
|
5
|
+
readonly tool: GuardrailTool;
|
|
6
|
+
}
|
|
7
|
+
interface TemplateGuardrailResult {
|
|
8
|
+
readonly checkedPaths: readonly string[];
|
|
9
|
+
readonly failures: readonly TemplateGuardrailFailure[];
|
|
10
|
+
readonly ok: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface RunTemplateGuardrailsOptions {
|
|
13
|
+
readonly workspaceRoot: string;
|
|
14
|
+
}
|
|
15
|
+
interface MissingSchemaAnnotation {
|
|
16
|
+
readonly line: number;
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly source: string;
|
|
19
|
+
}
|
|
20
|
+
declare function findMissingExportedSchemaAnnotations(files: readonly {
|
|
21
|
+
readonly content: string;
|
|
22
|
+
readonly path: string;
|
|
23
|
+
}[]): readonly MissingSchemaAnnotation[];
|
|
24
|
+
declare function runTemplateGuardrails(options: RunTemplateGuardrailsOptions): Promise<TemplateGuardrailResult>;
|
|
25
|
+
export { runTemplateGuardrails, findMissingExportedSchemaAnnotations, TemplateGuardrailResult, TemplateGuardrailFailure, RunTemplateGuardrailsOptions };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
3
|
+
|
|
4
|
+
// apps/outfitter/src/scaffold-e2e/template-guardrails.ts
|
|
5
|
+
import { spawnSync } from "child_process";
|
|
6
|
+
import {
|
|
7
|
+
existsSync,
|
|
8
|
+
mkdtempSync,
|
|
9
|
+
mkdirSync,
|
|
10
|
+
readFileSync,
|
|
11
|
+
rmSync,
|
|
12
|
+
writeFileSync
|
|
13
|
+
} from "fs";
|
|
14
|
+
import {
|
|
15
|
+
delimiter,
|
|
16
|
+
dirname,
|
|
17
|
+
extname,
|
|
18
|
+
join,
|
|
19
|
+
relative,
|
|
20
|
+
resolve
|
|
21
|
+
} from "path";
|
|
22
|
+
var OXFMT_EXTENSIONS = new Set([
|
|
23
|
+
".ts",
|
|
24
|
+
".tsx",
|
|
25
|
+
".js",
|
|
26
|
+
".jsx",
|
|
27
|
+
".json",
|
|
28
|
+
".jsonc"
|
|
29
|
+
]);
|
|
30
|
+
var OXLINT_EXTENSIONS = new Set([".ts", ".tsx", ".js", ".jsx"]);
|
|
31
|
+
var ULTRACITE_EXTENSIONS = new Set([
|
|
32
|
+
".js",
|
|
33
|
+
".jsx",
|
|
34
|
+
".json",
|
|
35
|
+
".jsonc",
|
|
36
|
+
".md",
|
|
37
|
+
".ts",
|
|
38
|
+
".tsx"
|
|
39
|
+
]);
|
|
40
|
+
var TOOLING_ARTIFACTS = [
|
|
41
|
+
"packages/tooling/configs/.oxlintrc.json",
|
|
42
|
+
"packages/tooling/configs/.oxfmtrc.jsonc"
|
|
43
|
+
];
|
|
44
|
+
var EXPORTED_SCHEMA_WITHOUT_ANNOTATION_PATTERN = /export const [A-Za-z0-9_]+Schema\s*=\s*z\./;
|
|
45
|
+
function stripTemplateSuffix(filePath) {
|
|
46
|
+
return filePath.endsWith(".template") ? filePath.slice(0, -".template".length) : filePath;
|
|
47
|
+
}
|
|
48
|
+
function collectArtifactPaths(workspaceRoot) {
|
|
49
|
+
const templateGlob = new Bun.Glob("packages/presets/presets/**/*.template");
|
|
50
|
+
const collected = [
|
|
51
|
+
...templateGlob.scanSync({
|
|
52
|
+
cwd: workspaceRoot,
|
|
53
|
+
absolute: false
|
|
54
|
+
})
|
|
55
|
+
];
|
|
56
|
+
for (const artifactPath of TOOLING_ARTIFACTS) {
|
|
57
|
+
if (existsSync(join(workspaceRoot, artifactPath))) {
|
|
58
|
+
collected.push(artifactPath);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return collected.toSorted();
|
|
62
|
+
}
|
|
63
|
+
function mirrorArtifacts(workspaceRoot, tempDir, artifactPaths) {
|
|
64
|
+
const mirrored = [];
|
|
65
|
+
for (const sourcePath of artifactPaths) {
|
|
66
|
+
const destinationRelativePath = stripTemplateSuffix(sourcePath);
|
|
67
|
+
const destinationPath = join(tempDir, destinationRelativePath);
|
|
68
|
+
mkdirSync(dirname(destinationPath), { recursive: true });
|
|
69
|
+
writeFileSync(destinationPath, readFileSync(join(workspaceRoot, sourcePath), "utf-8"));
|
|
70
|
+
mirrored.push(destinationPath);
|
|
71
|
+
}
|
|
72
|
+
return mirrored;
|
|
73
|
+
}
|
|
74
|
+
function findMissingExportedSchemaAnnotations(files) {
|
|
75
|
+
const failures = [];
|
|
76
|
+
for (const file of files) {
|
|
77
|
+
const lines = file.content.split(`
|
|
78
|
+
`);
|
|
79
|
+
for (const [index, line] of lines.entries()) {
|
|
80
|
+
if (!EXPORTED_SCHEMA_WITHOUT_ANNOTATION_PATTERN.test(line)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
failures.push({
|
|
84
|
+
path: file.path,
|
|
85
|
+
line: index + 1,
|
|
86
|
+
source: line.trim()
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return failures;
|
|
91
|
+
}
|
|
92
|
+
function findSchemaAnnotationFailure(workspaceRoot, artifactPaths) {
|
|
93
|
+
const filesToCheck = artifactPaths.filter((path) => path.endsWith(".ts") || path.endsWith(".ts.template")).map((path) => ({
|
|
94
|
+
path,
|
|
95
|
+
content: readFileSync(join(workspaceRoot, path), "utf-8")
|
|
96
|
+
}));
|
|
97
|
+
const missingAnnotations = findMissingExportedSchemaAnnotations(filesToCheck);
|
|
98
|
+
if (missingAnnotations.length === 0) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
tool: "schema-annotation",
|
|
103
|
+
paths: missingAnnotations.map((entry) => entry.path),
|
|
104
|
+
output: missingAnnotations.map((entry) => `${entry.path}:${entry.line} exported Zod schema is missing an explicit type annotation: ${entry.source}`).join(`
|
|
105
|
+
`)
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function runTool(workspaceRoot, cwd, tool, args) {
|
|
109
|
+
let executable;
|
|
110
|
+
let command;
|
|
111
|
+
switch (tool) {
|
|
112
|
+
case "oxfmt":
|
|
113
|
+
executable = join(workspaceRoot, "node_modules/.bin/oxfmt");
|
|
114
|
+
command = ["--check", ...args];
|
|
115
|
+
break;
|
|
116
|
+
case "oxlint":
|
|
117
|
+
executable = join(workspaceRoot, "node_modules/.bin/oxlint");
|
|
118
|
+
command = [...args];
|
|
119
|
+
break;
|
|
120
|
+
case "ultracite":
|
|
121
|
+
executable = join(workspaceRoot, "node_modules/.bin/ultracite");
|
|
122
|
+
command = ["check", ...args];
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
const result = spawnSync(executable, command, {
|
|
126
|
+
cwd,
|
|
127
|
+
encoding: "utf-8",
|
|
128
|
+
env: {
|
|
129
|
+
...process.env,
|
|
130
|
+
PATH: [
|
|
131
|
+
join(workspaceRoot, "node_modules/.bin"),
|
|
132
|
+
process.env["PATH"] ?? ""
|
|
133
|
+
].filter((value) => value.length > 0).join(delimiter)
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
if (result.status === 0) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const output = [result.stdout?.trim(), result.stderr?.trim()].filter((value) => Boolean(value)).join(`
|
|
140
|
+
`);
|
|
141
|
+
return {
|
|
142
|
+
tool,
|
|
143
|
+
paths: args,
|
|
144
|
+
output
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
async function runTemplateGuardrails(options) {
|
|
148
|
+
const workspaceRoot = resolve(options.workspaceRoot);
|
|
149
|
+
const artifactPaths = collectArtifactPaths(workspaceRoot);
|
|
150
|
+
const tempDir = mkdtempSync(join(workspaceRoot, ".tmp-template-guardrails-"));
|
|
151
|
+
try {
|
|
152
|
+
const mirroredPaths = mirrorArtifacts(workspaceRoot, tempDir, artifactPaths);
|
|
153
|
+
const oxfmtPaths = mirroredPaths.filter((path) => OXFMT_EXTENSIONS.has(extname(path)));
|
|
154
|
+
const oxlintPaths = mirroredPaths.filter((path) => OXLINT_EXTENSIONS.has(extname(path)));
|
|
155
|
+
const ultracitePaths = mirroredPaths.filter((path) => ULTRACITE_EXTENSIONS.has(extname(path)));
|
|
156
|
+
const relativeOxlintPaths = oxlintPaths.map((path) => relative(tempDir, path));
|
|
157
|
+
const failures = [
|
|
158
|
+
findSchemaAnnotationFailure(workspaceRoot, artifactPaths),
|
|
159
|
+
oxfmtPaths.length > 0 ? runTool(workspaceRoot, workspaceRoot, "oxfmt", [
|
|
160
|
+
"--config",
|
|
161
|
+
join(workspaceRoot, "packages/tooling/configs/.oxfmtrc.jsonc"),
|
|
162
|
+
...oxfmtPaths
|
|
163
|
+
]) : undefined,
|
|
164
|
+
oxlintPaths.length > 0 ? runTool(workspaceRoot, tempDir, "oxlint", [
|
|
165
|
+
"--config",
|
|
166
|
+
join(workspaceRoot, "packages/tooling/configs/.oxlintrc.json"),
|
|
167
|
+
...relativeOxlintPaths
|
|
168
|
+
]) : undefined,
|
|
169
|
+
ultracitePaths.length > 0 ? runTool(workspaceRoot, workspaceRoot, "ultracite", ultracitePaths) : undefined
|
|
170
|
+
].filter((failure) => failure !== undefined);
|
|
171
|
+
return {
|
|
172
|
+
checkedPaths: artifactPaths,
|
|
173
|
+
failures,
|
|
174
|
+
ok: failures.length === 0
|
|
175
|
+
};
|
|
176
|
+
} finally {
|
|
177
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
export {
|
|
181
|
+
runTemplateGuardrails,
|
|
182
|
+
findMissingExportedSchemaAnnotations
|
|
183
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const SCAFFOLD_E2E_ROOT_NAME = "outfitter-scaffold-e2e";
|
|
2
|
+
declare const DEFAULT_SCAFFOLD_E2E_RETENTION_MS: number;
|
|
3
|
+
interface ScaffoldE2ERunInfo {
|
|
4
|
+
readonly ageMs: number;
|
|
5
|
+
readonly path: string;
|
|
6
|
+
}
|
|
7
|
+
interface PruneScaffoldE2ERunsOptions {
|
|
8
|
+
readonly maxAgeMs?: number;
|
|
9
|
+
readonly now?: number;
|
|
10
|
+
readonly removeAll?: boolean;
|
|
11
|
+
readonly rootDir?: string;
|
|
12
|
+
}
|
|
13
|
+
interface PruneScaffoldE2ERunsResult {
|
|
14
|
+
readonly kept: readonly ScaffoldE2ERunInfo[];
|
|
15
|
+
readonly removed: readonly ScaffoldE2ERunInfo[];
|
|
16
|
+
readonly rootDir: string;
|
|
17
|
+
}
|
|
18
|
+
interface CreateScaffoldE2ERunDirOptions {
|
|
19
|
+
readonly now?: number;
|
|
20
|
+
readonly rootDir?: string;
|
|
21
|
+
readonly runLabel?: string;
|
|
22
|
+
}
|
|
23
|
+
declare function resolveScaffoldE2ERoot(rootDir?: string): string;
|
|
24
|
+
declare function createScaffoldE2ERunDir(options?: CreateScaffoldE2ERunDirOptions): string;
|
|
25
|
+
declare function cleanupScaffoldE2ERunDir(runDir: string): void;
|
|
26
|
+
declare function pruneScaffoldE2ERuns(options?: PruneScaffoldE2ERunsOptions): PruneScaffoldE2ERunsResult;
|
|
27
|
+
export { resolveScaffoldE2ERoot, pruneScaffoldE2ERuns, createScaffoldE2ERunDir, cleanupScaffoldE2ERunDir, ScaffoldE2ERunInfo, SCAFFOLD_E2E_ROOT_NAME, PruneScaffoldE2ERunsResult, PruneScaffoldE2ERunsOptions, DEFAULT_SCAFFOLD_E2E_RETENTION_MS, CreateScaffoldE2ERunDirOptions };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_SCAFFOLD_E2E_RETENTION_MS,
|
|
4
|
+
SCAFFOLD_E2E_ROOT_NAME,
|
|
5
|
+
cleanupScaffoldE2ERunDir,
|
|
6
|
+
createScaffoldE2ERunDir,
|
|
7
|
+
pruneScaffoldE2ERuns,
|
|
8
|
+
resolveScaffoldE2ERoot
|
|
9
|
+
} from "../shared/outfitter-z6tg0swx.js";
|
|
10
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
11
|
+
export {
|
|
12
|
+
resolveScaffoldE2ERoot,
|
|
13
|
+
pruneScaffoldE2ERuns,
|
|
14
|
+
createScaffoldE2ERunDir,
|
|
15
|
+
cleanupScaffoldE2ERunDir,
|
|
16
|
+
SCAFFOLD_E2E_ROOT_NAME,
|
|
17
|
+
DEFAULT_SCAFFOLD_E2E_RETENTION_MS
|
|
18
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
import {
|
|
4
|
+
parseScaffoldE2EArgs,
|
|
5
|
+
resolveScaffoldE2EScriptPlan
|
|
6
|
+
} from "../shared/outfitter-qzd5djgx.js";
|
|
7
|
+
import {
|
|
8
|
+
runScaffoldE2ESuite
|
|
9
|
+
} from "../shared/outfitter-x0r7mfvy.js";
|
|
10
|
+
import"../shared/outfitter-4bs5a2n4.js";
|
|
11
|
+
import {
|
|
12
|
+
cleanupScaffoldE2ERunDir,
|
|
13
|
+
createScaffoldE2ERunDir,
|
|
14
|
+
pruneScaffoldE2ERuns,
|
|
15
|
+
resolveScaffoldE2ERoot
|
|
16
|
+
} from "../shared/outfitter-z6tg0swx.js";
|
|
17
|
+
import"../shared/outfitter-xg5yryp2.js";
|
|
18
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
19
|
+
|
|
20
|
+
// apps/outfitter/src/scripts/scaffold-e2e.ts
|
|
21
|
+
function printPruneSummary(action, removedCount, rootDir) {
|
|
22
|
+
process.stdout.write(`[scaffold-e2e] ${action} ${removedCount} run(s) under ${rootDir}
|
|
23
|
+
`);
|
|
24
|
+
}
|
|
25
|
+
async function main() {
|
|
26
|
+
const args = parseScaffoldE2EArgs(process.argv.slice(2));
|
|
27
|
+
const rootDir = resolveScaffoldE2ERoot(args.rootDir);
|
|
28
|
+
if (args.clean) {
|
|
29
|
+
const cleanResult = pruneScaffoldE2ERuns({
|
|
30
|
+
rootDir,
|
|
31
|
+
removeAll: true
|
|
32
|
+
});
|
|
33
|
+
printPruneSummary("cleaned", cleanResult.removed.length, cleanResult.rootDir);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const plan = resolveScaffoldE2EScriptPlan(args);
|
|
37
|
+
const pruneResult = pruneScaffoldE2ERuns({
|
|
38
|
+
rootDir,
|
|
39
|
+
maxAgeMs: args.maxAgeMs
|
|
40
|
+
});
|
|
41
|
+
if (pruneResult.removed.length > 0) {
|
|
42
|
+
printPruneSummary("pruned", pruneResult.removed.length, pruneResult.rootDir);
|
|
43
|
+
}
|
|
44
|
+
const runDir = createScaffoldE2ERunDir({ rootDir, runLabel: "manual" });
|
|
45
|
+
let completed = false;
|
|
46
|
+
process.stdout.write(`[scaffold-e2e] run dir: ${runDir}
|
|
47
|
+
`);
|
|
48
|
+
process.stdout.write(`[scaffold-e2e] profile: ${plan.profile.id}
|
|
49
|
+
`);
|
|
50
|
+
process.stdout.write(`[scaffold-e2e] presets: ${plan.presets.join(", ")}
|
|
51
|
+
`);
|
|
52
|
+
try {
|
|
53
|
+
const results = await runScaffoldE2ESuite({
|
|
54
|
+
profile: args.profile,
|
|
55
|
+
runDir,
|
|
56
|
+
presets: plan.presets
|
|
57
|
+
});
|
|
58
|
+
completed = true;
|
|
59
|
+
for (const result of results) {
|
|
60
|
+
process.stdout.write(`[scaffold-e2e] ${result.preset} ok (${result.steps.map((step) => `${step.command} in ${step.durationMs}ms`).join(", ")})
|
|
61
|
+
`);
|
|
62
|
+
}
|
|
63
|
+
} finally {
|
|
64
|
+
if (completed && !args.keep) {
|
|
65
|
+
cleanupScaffoldE2ERunDir(runDir);
|
|
66
|
+
process.stdout.write(`[scaffold-e2e] removed ${runDir}
|
|
67
|
+
`);
|
|
68
|
+
} else {
|
|
69
|
+
process.stdout.write(`[scaffold-e2e] preserved ${runDir}
|
|
70
|
+
`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
await main().catch((error) => {
|
|
75
|
+
process.stderr.write(`[scaffold-e2e] error: ${error instanceof Error ? error.message : String(error)}
|
|
76
|
+
`);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
});
|
|
@@ -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/scaffold-output.ts
|
|
13
13
|
import { output } from "@outfitter/cli";
|
|
@@ -22,7 +22,7 @@ async function printScaffoldResults(result, options) {
|
|
|
22
22
|
converted: result.converted,
|
|
23
23
|
movedExisting: result.movedExisting ?? null,
|
|
24
24
|
...result.dryRunPlan
|
|
25
|
-
},
|
|
25
|
+
}, structuredMode);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const collector = new OperationCollector;
|
|
@@ -43,7 +43,7 @@ async function printScaffoldResults(result, options) {
|
|
|
43
43
|
blocksAdded: result.blocksAdded ?? null,
|
|
44
44
|
postScaffold: result.postScaffold,
|
|
45
45
|
nextSteps: result.postScaffold.nextSteps
|
|
46
|
-
},
|
|
46
|
+
}, structuredMode);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const lines = [];
|
|
@@ -66,7 +66,7 @@ async function printScaffoldResults(result, options) {
|
|
|
66
66
|
for (const step of result.postScaffold.nextSteps) {
|
|
67
67
|
lines.push(` ${step}`);
|
|
68
68
|
}
|
|
69
|
-
await output(lines,
|
|
69
|
+
await output(lines, "human");
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export { printScaffoldResults };
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
outputModeSchema,
|
|
4
4
|
resolveCwdFromPreset
|
|
5
|
-
} from "./outfitter-
|
|
5
|
+
} from "./outfitter-7t7ces1x.js";
|
|
6
6
|
import {
|
|
7
7
|
printDoctorResults,
|
|
8
8
|
runDoctor
|
|
9
|
-
} from "./outfitter-
|
|
10
|
-
import {
|
|
11
|
-
resolveOutputModeFromContext
|
|
12
|
-
} from "./outfitter-7r12fj7f.js";
|
|
9
|
+
} from "./outfitter-ksg34wka.js";
|
|
13
10
|
|
|
14
11
|
// apps/outfitter/src/actions/doctor.ts
|
|
15
12
|
import { cwdPreset } from "@outfitter/cli/flags";
|
|
13
|
+
import { resolveOutputMode } from "@outfitter/cli/query";
|
|
16
14
|
import { defineAction, Result } from "@outfitter/contracts";
|
|
17
15
|
import { z } from "zod";
|
|
18
16
|
var doctorInputSchema = z.object({
|
|
@@ -30,7 +28,7 @@ var doctorAction = defineAction({
|
|
|
30
28
|
description: "Validate environment and dependencies",
|
|
31
29
|
options: [...doctorCwd.options],
|
|
32
30
|
mapInput: (context) => {
|
|
33
|
-
const outputMode =
|
|
31
|
+
const { mode: outputMode } = resolveOutputMode(context.flags);
|
|
34
32
|
return {
|
|
35
33
|
cwd: resolveCwdFromPreset(context.flags, doctorCwd),
|
|
36
34
|
outputMode
|
|
@@ -3,16 +3,17 @@ import {
|
|
|
3
3
|
actionInternalErr,
|
|
4
4
|
outputModeSchema,
|
|
5
5
|
resolveCwdFromPreset
|
|
6
|
-
} from "./outfitter-
|
|
6
|
+
} from "./outfitter-7t7ces1x.js";
|
|
7
7
|
import {
|
|
8
8
|
runUpgrade
|
|
9
|
-
} from "./outfitter-
|
|
9
|
+
} from "./outfitter-b05mvbmx.js";
|
|
10
10
|
import {
|
|
11
11
|
printUpgradeResults
|
|
12
|
-
} from "./outfitter-
|
|
12
|
+
} from "./outfitter-wmgzyymq.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
printUpgradeCodemodBuilderResult,
|
|
15
|
+
runUpgradeCodemodBuilder
|
|
16
|
+
} from "./outfitter-0zs8makw.js";
|
|
16
17
|
|
|
17
18
|
// apps/outfitter/src/actions/upgrade.ts
|
|
18
19
|
import { actionCliPresets } from "@outfitter/cli/actions";
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
dryRunPreset,
|
|
23
24
|
interactionPreset
|
|
24
25
|
} from "@outfitter/cli/flags";
|
|
26
|
+
import { resolveOutputMode } from "@outfitter/cli/query";
|
|
25
27
|
import { defineAction, Result } from "@outfitter/contracts";
|
|
26
28
|
import { z } from "zod";
|
|
27
29
|
var upgradeInputSchema = z.object({
|
|
@@ -65,11 +67,12 @@ var upgradeAction = defineAction({
|
|
|
65
67
|
surfaces: ["cli"],
|
|
66
68
|
input: upgradeInputSchema,
|
|
67
69
|
cli: {
|
|
68
|
-
|
|
70
|
+
group: "upgrade",
|
|
71
|
+
command: "[packages...]",
|
|
69
72
|
description: "Check for @outfitter/* package updates and migration guidance",
|
|
70
73
|
options: [...upgradeFlags.options],
|
|
71
74
|
mapInput: (context) => {
|
|
72
|
-
const outputMode =
|
|
75
|
+
const { mode: outputMode } = resolveOutputMode(context.flags);
|
|
73
76
|
const { dryRun, interactive, yes, all, noCodemods, guide } = upgradeFlags.resolve(context);
|
|
74
77
|
const guidePackages = context.args.length > 0 ? context.args : undefined;
|
|
75
78
|
return {
|
|
@@ -105,5 +108,49 @@ var upgradeAction = defineAction({
|
|
|
105
108
|
return Result.ok(result.value);
|
|
106
109
|
}
|
|
107
110
|
});
|
|
111
|
+
var upgradeCodemodInputSchema = z.object({
|
|
112
|
+
cwd: z.string(),
|
|
113
|
+
dryRun: z.boolean().default(false),
|
|
114
|
+
outputMode: outputModeSchema
|
|
115
|
+
});
|
|
116
|
+
var codemodCwd = cwdPreset();
|
|
117
|
+
var codemodDryRun = dryRunPreset();
|
|
118
|
+
var codemodFlags = actionCliPresets(codemodCwd, codemodDryRun);
|
|
119
|
+
var upgradeCodemodAction = defineAction({
|
|
120
|
+
id: "upgrade.codemod",
|
|
121
|
+
description: "Transform Commander .command().action() patterns to builder .input(schema).action()",
|
|
122
|
+
surfaces: ["cli"],
|
|
123
|
+
input: upgradeCodemodInputSchema,
|
|
124
|
+
cli: {
|
|
125
|
+
group: "upgrade",
|
|
126
|
+
command: "codemod",
|
|
127
|
+
description: "Transform Commander .command().action() patterns to builder .input(schema).action()",
|
|
128
|
+
options: [...codemodFlags.options],
|
|
129
|
+
mapInput: (context) => {
|
|
130
|
+
const { mode: outputMode } = resolveOutputMode(context.flags);
|
|
131
|
+
return {
|
|
132
|
+
cwd: resolveCwdFromPreset(context.flags, codemodCwd),
|
|
133
|
+
dryRun: codemodFlags.resolve(context).dryRun,
|
|
134
|
+
outputMode
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
handler: async (input) => {
|
|
139
|
+
const { outputMode, ...codemodInput } = input;
|
|
140
|
+
const result = await runUpgradeCodemodBuilder(codemodInput);
|
|
141
|
+
if (result.isErr()) {
|
|
142
|
+
return actionInternalErr("upgrade.codemod", result.error);
|
|
143
|
+
}
|
|
144
|
+
await printUpgradeCodemodBuilderResult(result.value, {
|
|
145
|
+
mode: outputMode
|
|
146
|
+
});
|
|
147
|
+
if (!result.value.ok) {
|
|
148
|
+
return actionInternalErr("upgrade.codemod", {
|
|
149
|
+
message: `Codemod completed with ${result.value.errors.length} error(s)`
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return Result.ok(result.value);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
108
155
|
|
|
109
|
-
export { upgradeAction };
|
|
156
|
+
export { upgradeAction, upgradeCodemodAction };
|