outfitter 0.3.2 → 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 +33 -5
- 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 +2 -0
- package/dist/actions.js +66 -0
- package/dist/cli.js +66 -4
- package/dist/commands/add.d.ts +54 -0
- package/dist/commands/add.js +16 -0
- 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 +3 -0
- package/dist/commands/check-tsdoc.js +9 -0
- package/dist/commands/check.d.ts +93 -0
- package/dist/commands/check.js +14 -0
- package/dist/commands/demo.d.ts +21 -0
- package/dist/commands/demo.js +8 -0
- 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 -0
- package/dist/commands/docs-module-loader.js +8 -0
- 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/docs-types.js +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +17 -0
- 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 +9 -0
- package/dist/commands/init.js +24 -0
- package/dist/commands/jq-utils.d.ts +17 -0
- package/dist/commands/jq-utils.js +8 -0
- package/dist/commands/repo.d.ts +3 -0
- package/dist/commands/repo.js +13 -0
- 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 +4 -0
- package/dist/commands/scaffold.js +26 -0
- package/dist/commands/shared-deps.d.ts +22 -0
- package/dist/commands/shared-deps.js +11 -0
- package/dist/commands/upgrade-apply.d.ts +14 -0
- package/dist/commands/upgrade-apply.js +8 -0
- package/dist/commands/upgrade-codemods.d.ts +47 -0
- package/dist/commands/upgrade-codemods.js +14 -0
- 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.d.ts +58 -0
- package/dist/commands/upgrade-planner.js +8 -0
- package/dist/commands/upgrade-report.d.ts +5 -0
- package/dist/commands/upgrade-report.js +8 -0
- package/dist/commands/upgrade-workspace.d.ts +2 -0
- package/dist/commands/upgrade-workspace.js +16 -0
- package/dist/commands/upgrade.d.ts +5 -0
- package/dist/commands/upgrade.js +37 -0
- package/dist/create/index.d.ts +5 -0
- package/dist/create/index.js +2 -0
- package/dist/create/planner.d.ts +3 -0
- package/dist/create/planner.js +85 -0
- package/dist/create/presets.d.ts +3 -0
- package/dist/create/presets.js +12 -0
- package/dist/create/types.d.ts +2 -0
- package/dist/create/types.js +1 -0
- package/dist/engine/blocks.d.ts +3 -0
- package/dist/engine/blocks.js +12 -0
- package/dist/engine/collector.d.ts +2 -0
- package/dist/engine/collector.js +8 -0
- package/dist/engine/config.d.ts +3 -0
- package/dist/engine/config.js +15 -0
- package/dist/engine/dependency-versions.d.ts +17 -0
- package/dist/engine/dependency-versions.js +12 -0
- package/dist/engine/executor.d.ts +3 -0
- package/dist/engine/executor.js +156 -0
- package/dist/engine/index.d.ts +10 -0
- package/dist/engine/index.js +54 -0
- package/dist/engine/names.d.ts +2 -0
- package/dist/engine/names.js +24 -0
- package/dist/engine/post-scaffold.d.ts +3 -0
- package/dist/engine/post-scaffold.js +8 -0
- package/dist/engine/preset.d.ts +3 -0
- package/dist/engine/preset.js +17 -0
- package/dist/engine/render-plan.d.ts +7 -0
- package/dist/engine/render-plan.js +9 -0
- package/dist/engine/template.d.ts +4 -0
- package/dist/engine/template.js +34 -0
- package/dist/engine/types.d.ts +2 -0
- package/dist/engine/types.js +8 -0
- package/dist/engine/workspace.d.ts +3 -0
- package/dist/engine/workspace.js +20 -0
- package/dist/index.d.ts +17 -397
- package/dist/index.js +7 -165
- package/dist/manifest.d.ts +71 -0
- package/dist/manifest.js +16 -0
- package/dist/output-mode.d.ts +2 -0
- package/dist/output-mode.js +10 -0
- package/dist/shared/outfitter-109s75x0.d.ts +76 -0
- package/dist/shared/outfitter-1fy7byz5.js +170 -0
- package/dist/shared/outfitter-1h7k8xxt.js +29 -0
- package/dist/shared/outfitter-1tfa9hke.d.ts +55 -0
- package/dist/shared/outfitter-2nx0k4b3.d.ts +4 -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-3dq4r10s.d.ts +24 -0
- package/dist/shared/outfitter-3rcrvva8.js +103 -0
- package/dist/shared/outfitter-3tx3adgj.js +278 -0
- package/dist/shared/outfitter-4q1zfmvc.js +154 -0
- package/dist/shared/outfitter-4s9meh3j.js +221 -0
- package/dist/shared/outfitter-507ra35w.js +285 -0
- package/dist/shared/outfitter-56jq0rh2.d.ts +42 -0
- package/dist/shared/outfitter-58rn1sj1.d.ts +30 -0
- package/dist/shared/outfitter-5d9wbzhh.d.ts +19 -0
- package/dist/shared/outfitter-5j7zee11.d.ts +180 -0
- package/dist/shared/outfitter-5r6q2749.d.ts +18 -0
- package/dist/shared/outfitter-5vx1bp7h.js +41 -0
- package/dist/shared/outfitter-6ddf91vh.js +190 -0
- package/dist/shared/outfitter-6mpkh3zn.js +432 -0
- package/dist/shared/outfitter-6rtcemk7.d.ts +18 -0
- package/dist/shared/outfitter-6t7xeyg1.js +159 -0
- package/dist/shared/outfitter-738z4c37.js +262 -0
- package/dist/shared/outfitter-76k25svs.js +322 -0
- package/dist/shared/outfitter-7n7vsz95.js +101 -0
- package/dist/shared/outfitter-7q9fnbwa.js +60 -0
- package/dist/shared/outfitter-7r12fj7f.js +30 -0
- package/dist/shared/outfitter-84chvazx.js +480 -0
- package/dist/shared/outfitter-8ggmja91.js +301 -0
- package/dist/shared/outfitter-8kmak0wc.d.ts +4 -0
- package/dist/shared/outfitter-8y2dfx6n.js +11 -0
- package/dist/shared/outfitter-940h0x7b.js +71 -0
- package/dist/shared/outfitter-954y4mzx.d.ts +5 -0
- package/dist/shared/outfitter-a79xrm12.d.ts +17 -0
- package/dist/shared/outfitter-b9cpnr7e.js +110 -0
- package/dist/shared/outfitter-bpr28y54.js +70 -0
- package/dist/shared/outfitter-c7sbs7es.js +92 -0
- package/dist/shared/outfitter-cyhzstz0.js +93 -0
- package/dist/shared/outfitter-cyvr4r8d.d.ts +67 -0
- package/dist/shared/outfitter-d0kqashd.d.ts +98 -0
- package/dist/shared/outfitter-dx4hn4ta.js +325 -0
- package/dist/shared/outfitter-e84cr97g.js +232 -0
- package/dist/shared/outfitter-ec83h4v2.js +17 -0
- package/dist/shared/outfitter-eepj7rf7.js +4 -0
- package/dist/shared/outfitter-ekb6t1zz.js +35 -0
- 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-gdc7b7de.d.ts +5 -0
- package/dist/shared/outfitter-gyayfx5r.js +156 -0
- package/dist/shared/outfitter-h0wmtxw8.d.ts +23 -0
- package/dist/shared/outfitter-hcexcvxe.d.ts +25 -0
- package/dist/shared/outfitter-hf5bj2gq.js +117 -0
- package/dist/shared/outfitter-hsp8vy5m.d.ts +146 -0
- package/dist/shared/outfitter-htx4asgr.d.ts +52 -0
- 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-ksyvwmb5.js +191 -0
- package/dist/shared/outfitter-m3ehh37q.d.ts +22 -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-px5sv5gn.js +321 -0
- package/dist/shared/outfitter-q1g58t85.js +8 -0
- package/dist/shared/outfitter-qsd5638j.js +378 -0
- 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-ssrtakh3.js +342 -0
- package/dist/shared/outfitter-ssynegbs.js +167 -0
- package/dist/shared/outfitter-svts4wk2.js +36 -0
- package/dist/shared/outfitter-tavatb5p.js +166 -0
- package/dist/shared/outfitter-tqznjgbm.js +44 -0
- package/dist/shared/outfitter-ttjr95y9.js +98 -0
- package/dist/shared/outfitter-wcrp7d7m.d.ts +5 -0
- package/dist/shared/outfitter-wkt0a0ra.js +67 -0
- package/dist/shared/outfitter-wrcqq29p.js +132 -0
- package/dist/shared/outfitter-wyg1tpp5.d.ts +43 -0
- package/dist/shared/outfitter-x0vpb7tj.js +126 -0
- package/dist/shared/outfitter-x39awx8g.js +146 -0
- package/dist/shared/outfitter-x4cc5xsq.js +168 -0
- package/dist/shared/outfitter-x8w5sjnd.d.ts +39 -0
- package/dist/shared/outfitter-xr6g13nz.d.ts +50 -0
- package/dist/shared/outfitter-xs94pkfe.js +106 -0
- package/dist/shared/outfitter-y37yfehn.d.ts +37 -0
- package/dist/shared/outfitter-y6ee0k45.d.ts +18 -0
- package/dist/shared/outfitter-ydw7x6bh.js +61 -0
- package/dist/shared/outfitter-yhb23pjc.js +89 -0
- package/dist/shared/outfitter-ypcvwg1s.js +91 -0
- package/dist/shared/outfitter-znbqe5zy.d.ts +45 -0
- package/dist/shared/outfitter-zng6w0t9.d.ts +4 -0
- package/dist/targets/index.d.ts +4 -0
- package/dist/targets/index.js +28 -0
- package/dist/targets/registry.d.ts +3 -0
- package/dist/targets/registry.js +221 -0
- package/dist/targets/types.d.ts +2 -0
- package/dist/targets/types.js +1 -0
- package/package.json +194 -35
- package/dist/shared/chunk-3pwh8ys4.js +0 -6461
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MigrationDocWithMetadata, findMigrationDocsDir, readMigrationBreakingFlag, readMigrationDocs, readMigrationDocsWithMetadata } from "../shared/outfitter-56jq0rh2.js";
|
|
2
|
+
import "../shared/outfitter-y37yfehn.js";
|
|
3
|
+
export { readMigrationDocsWithMetadata, readMigrationDocs, readMigrationBreakingFlag, findMigrationDocsDir, MigrationDocWithMetadata };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
findMigrationDocsDir,
|
|
4
|
+
readMigrationBreakingFlag,
|
|
5
|
+
readMigrationDocs,
|
|
6
|
+
readMigrationDocsWithMetadata
|
|
7
|
+
} from "../shared/outfitter-fx1m251y.js";
|
|
8
|
+
import"../shared/outfitter-s1c0whzj.js";
|
|
9
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
10
|
+
export {
|
|
11
|
+
readMigrationDocsWithMetadata,
|
|
12
|
+
readMigrationDocs,
|
|
13
|
+
readMigrationBreakingFlag,
|
|
14
|
+
findMigrationDocsDir
|
|
15
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { MigrationChange, MigrationChangeType, MigrationFrontmatter, parseMigrationFrontmatter, stripMigrationFrontmatter } from "../shared/outfitter-y37yfehn.js";
|
|
2
|
+
export { stripMigrationFrontmatter, parseMigrationFrontmatter, MigrationFrontmatter, MigrationChangeType, MigrationChange };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PrintUpgradeResultsOptions, printUpgradeResults } from "../shared/outfitter-5j7zee11.js";
|
|
2
|
+
import "../shared/outfitter-109s75x0.js";
|
|
3
|
+
import "../shared/outfitter-56jq0rh2.js";
|
|
4
|
+
import "../shared/outfitter-y37yfehn.js";
|
|
5
|
+
export { printUpgradeResults, PrintUpgradeResultsOptions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
printUpgradeResults
|
|
4
|
+
} from "../shared/outfitter-x4cc5xsq.js";
|
|
5
|
+
import"../shared/outfitter-fx1m251y.js";
|
|
6
|
+
import"../shared/outfitter-s1c0whzj.js";
|
|
7
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
8
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
9
|
+
export {
|
|
10
|
+
printUpgradeResults
|
|
11
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure, deterministic planner for the `outfitter upgrade` command.
|
|
3
|
+
*
|
|
4
|
+
* Classifies each installed package into one of four bump categories
|
|
5
|
+
* based on the installed version, the latest available version, and
|
|
6
|
+
* metadata about whether the bump contains breaking changes.
|
|
7
|
+
*
|
|
8
|
+
* Pre-1.0 packages (major version 0) treat minor bumps as breaking
|
|
9
|
+
* per semver convention.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
/** Classification of a version bump for a single package. */
|
|
14
|
+
type BumpClassification = "upToDate" | "upgradableNonBreaking" | "upgradableBreaking" | "blocked";
|
|
15
|
+
/** Describes the planned action for a single package. */
|
|
16
|
+
interface PackageUpgradeAction {
|
|
17
|
+
/** Whether this update contains breaking changes */
|
|
18
|
+
readonly breaking: boolean;
|
|
19
|
+
/** Bump classification */
|
|
20
|
+
readonly classification: BumpClassification;
|
|
21
|
+
/** Currently installed version */
|
|
22
|
+
readonly currentVersion: string;
|
|
23
|
+
/** Latest available version */
|
|
24
|
+
readonly latestVersion: string;
|
|
25
|
+
/** Migration doc path if available */
|
|
26
|
+
readonly migrationDoc?: string;
|
|
27
|
+
/** Full package name (e.g. "@outfitter/cli") */
|
|
28
|
+
readonly name: string;
|
|
29
|
+
}
|
|
30
|
+
/** The complete update plan with per-package actions and aggregate summary. */
|
|
31
|
+
interface UpgradePlan {
|
|
32
|
+
/** Per-package update actions, sorted by name for deterministic output. */
|
|
33
|
+
readonly packages: PackageUpgradeAction[];
|
|
34
|
+
/** Aggregate counts by classification. */
|
|
35
|
+
readonly summary: {
|
|
36
|
+
readonly upToDate: number;
|
|
37
|
+
readonly upgradableNonBreaking: number;
|
|
38
|
+
readonly upgradableBreaking: number;
|
|
39
|
+
readonly blocked: number;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Analyze installed packages against their latest versions and produce
|
|
44
|
+
* a deterministic update plan.
|
|
45
|
+
*
|
|
46
|
+
* This function is **pure** — no side effects, no I/O, no process.env reads.
|
|
47
|
+
* Same inputs always produce the same output.
|
|
48
|
+
*
|
|
49
|
+
* @param installed - Map of package name to currently installed version.
|
|
50
|
+
* @param latest - Map of package name to latest version info (version string + breaking flag).
|
|
51
|
+
* @param migrationDocs - Optional map of package name to migration doc path.
|
|
52
|
+
* @returns A deterministic update plan with per-package actions and summary.
|
|
53
|
+
*/
|
|
54
|
+
declare function analyzeUpgrades(installed: Map<string, string>, latest: Map<string, {
|
|
55
|
+
version: string;
|
|
56
|
+
breaking?: boolean;
|
|
57
|
+
}>, migrationDocs?: Map<string, string>): UpgradePlan;
|
|
58
|
+
export { analyzeUpgrades, UpgradePlan, PackageUpgradeAction, BumpClassification };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UpgradeReport, UpgradeReportFlags, UpgradeReportStatus, WriteUpgradeReportMeta, writeUpgradeReportSafely } from "../shared/outfitter-5j7zee11.js";
|
|
2
|
+
import "../shared/outfitter-109s75x0.js";
|
|
3
|
+
import "../shared/outfitter-56jq0rh2.js";
|
|
4
|
+
import "../shared/outfitter-y37yfehn.js";
|
|
5
|
+
export { writeUpgradeReportSafely, WriteUpgradeReportMeta, UpgradeReportStatus, UpgradeReportFlags, UpgradeReport };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { VersionConflict, WorkspacePackageEntry, WorkspaceScanResult, applyUpdatesToWorkspace, collectWorkspaceManifests, detectWorkspaceRoot, getInstalledPackagesFromWorkspace, runInstall } from "../shared/outfitter-109s75x0.js";
|
|
2
|
+
export { runInstall, getInstalledPackagesFromWorkspace, detectWorkspaceRoot, collectWorkspaceManifests, applyUpdatesToWorkspace, WorkspaceScanResult, WorkspacePackageEntry, VersionConflict };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
applyUpdatesToWorkspace,
|
|
4
|
+
collectWorkspaceManifests,
|
|
5
|
+
detectWorkspaceRoot,
|
|
6
|
+
getInstalledPackagesFromWorkspace,
|
|
7
|
+
runInstall
|
|
8
|
+
} from "../shared/outfitter-76k25svs.js";
|
|
9
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
10
|
+
export {
|
|
11
|
+
runInstall,
|
|
12
|
+
getInstalledPackagesFromWorkspace,
|
|
13
|
+
detectWorkspaceRoot,
|
|
14
|
+
collectWorkspaceManifests,
|
|
15
|
+
applyUpdatesToWorkspace
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CodemodSummary, MigrationGuide, PackageVersionInfo, UpgradeOptions, UpgradeReport, UpgradeReportFlags, UpgradeReportStatus, UpgradeResult, buildMigrationGuides, printUpgradeResults, runUpgrade } from "../shared/outfitter-5j7zee11.js";
|
|
2
|
+
import "../shared/outfitter-109s75x0.js";
|
|
3
|
+
import { MigrationDocWithMetadata, findMigrationDocsDir, readMigrationBreakingFlag, readMigrationDocs, readMigrationDocsWithMetadata } from "../shared/outfitter-56jq0rh2.js";
|
|
4
|
+
import { MigrationChange, MigrationChangeType, MigrationFrontmatter, parseMigrationFrontmatter } from "../shared/outfitter-y37yfehn.js";
|
|
5
|
+
export { runUpgrade, readMigrationDocsWithMetadata, readMigrationDocs, readMigrationBreakingFlag, printUpgradeResults, parseMigrationFrontmatter, findMigrationDocsDir, buildMigrationGuides, UpgradeResult, UpgradeReportStatus, UpgradeReportFlags, UpgradeReport, UpgradeOptions, PackageVersionInfo, MigrationGuide, MigrationFrontmatter, MigrationDocWithMetadata, MigrationChangeType, MigrationChange, CodemodSummary };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
runUpgrade
|
|
4
|
+
} from "../shared/outfitter-fxry5n58.js";
|
|
5
|
+
import"../shared/outfitter-76k25svs.js";
|
|
6
|
+
import {
|
|
7
|
+
buildMigrationGuides
|
|
8
|
+
} from "../shared/outfitter-jwxggvz4.js";
|
|
9
|
+
import {
|
|
10
|
+
printUpgradeResults
|
|
11
|
+
} from "../shared/outfitter-x4cc5xsq.js";
|
|
12
|
+
import"../shared/outfitter-f3a70135.js";
|
|
13
|
+
import"../shared/outfitter-bpr28y54.js";
|
|
14
|
+
import"../shared/outfitter-n13pqaft.js";
|
|
15
|
+
import"../shared/outfitter-x0vpb7tj.js";
|
|
16
|
+
import {
|
|
17
|
+
findMigrationDocsDir,
|
|
18
|
+
readMigrationBreakingFlag,
|
|
19
|
+
readMigrationDocs,
|
|
20
|
+
readMigrationDocsWithMetadata
|
|
21
|
+
} from "../shared/outfitter-fx1m251y.js";
|
|
22
|
+
import {
|
|
23
|
+
parseMigrationFrontmatter
|
|
24
|
+
} from "../shared/outfitter-s1c0whzj.js";
|
|
25
|
+
import"../shared/outfitter-7q9fnbwa.js";
|
|
26
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
27
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
28
|
+
export {
|
|
29
|
+
runUpgrade,
|
|
30
|
+
readMigrationDocsWithMetadata,
|
|
31
|
+
readMigrationDocs,
|
|
32
|
+
readMigrationBreakingFlag,
|
|
33
|
+
printUpgradeResults,
|
|
34
|
+
parseMigrationFrontmatter,
|
|
35
|
+
findMigrationDocsDir,
|
|
36
|
+
buildMigrationGuides
|
|
37
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "../shared/outfitter-wvbpxqq7.js";
|
|
2
|
+
import { planCreateProject } from "../shared/outfitter-zng6w0t9.js";
|
|
3
|
+
import { CREATE_PRESETS, CREATE_PRESET_IDS, getCreatePreset } from "../shared/outfitter-wcrp7d7m.js";
|
|
4
|
+
import { CreatePlanChange, CreatePresetDefinition, CreatePresetId, CreateProjectInput, CreateProjectPlan } from "../shared/outfitter-htx4asgr.js";
|
|
5
|
+
export { planCreateProject, getCreatePreset, CreateProjectPlan, CreateProjectInput, CreatePresetId, CreatePresetDefinition, CreatePlanChange, CREATE_PRESET_IDS, CREATE_PRESETS };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getCreatePreset
|
|
4
|
+
} from "../shared/outfitter-ekb6t1zz.js";
|
|
5
|
+
import {
|
|
6
|
+
deriveBinName,
|
|
7
|
+
deriveProjectName
|
|
8
|
+
} from "../shared/outfitter-q1g58t85.js";
|
|
9
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
10
|
+
|
|
11
|
+
// apps/outfitter/src/create/planner.ts
|
|
12
|
+
import { Result, ValidationError } from "@outfitter/contracts";
|
|
13
|
+
function derivePackageName(input) {
|
|
14
|
+
return (input.packageName ?? input.name).trim();
|
|
15
|
+
}
|
|
16
|
+
function planCreateProject(input) {
|
|
17
|
+
const packageName = derivePackageName(input);
|
|
18
|
+
if (packageName.length === 0) {
|
|
19
|
+
return Result.err(new ValidationError({
|
|
20
|
+
message: "Project name must not be empty",
|
|
21
|
+
field: "name"
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
const targetDir = input.targetDir.trim();
|
|
25
|
+
if (targetDir.length === 0) {
|
|
26
|
+
return Result.err(new ValidationError({
|
|
27
|
+
message: "Target directory must not be empty",
|
|
28
|
+
field: "targetDir"
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
if (packageName.startsWith("@") && !packageName.includes("/")) {
|
|
32
|
+
return Result.err(new ValidationError({
|
|
33
|
+
message: "Could not derive a project name from package name",
|
|
34
|
+
field: "packageName"
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
const projectName = deriveProjectName(packageName);
|
|
38
|
+
if (projectName.length === 0) {
|
|
39
|
+
return Result.err(new ValidationError({
|
|
40
|
+
message: "Could not derive a project name from package name",
|
|
41
|
+
field: "packageName"
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
const preset = getCreatePreset(input.preset);
|
|
45
|
+
if (!preset) {
|
|
46
|
+
return Result.err(new ValidationError({
|
|
47
|
+
message: `Unknown create preset '${input.preset}'`,
|
|
48
|
+
field: "preset"
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
const includeTooling = input.includeTooling ?? true;
|
|
52
|
+
const defaultBlocks = includeTooling ? [...preset.defaultBlocks] : [];
|
|
53
|
+
const changes = [
|
|
54
|
+
{
|
|
55
|
+
type: "copy-preset",
|
|
56
|
+
preset: preset.presetDir,
|
|
57
|
+
targetDir,
|
|
58
|
+
includeTooling,
|
|
59
|
+
overlayBaseTemplate: true
|
|
60
|
+
},
|
|
61
|
+
{ type: "inject-shared-config" }
|
|
62
|
+
];
|
|
63
|
+
if (input.local) {
|
|
64
|
+
changes.push({ type: "rewrite-local-dependencies", mode: "workspace" });
|
|
65
|
+
}
|
|
66
|
+
if (defaultBlocks.length > 0) {
|
|
67
|
+
changes.push({ type: "add-blocks", blocks: defaultBlocks });
|
|
68
|
+
}
|
|
69
|
+
const plan = {
|
|
70
|
+
preset,
|
|
71
|
+
values: {
|
|
72
|
+
packageName,
|
|
73
|
+
projectName,
|
|
74
|
+
version: input.version?.trim() || "0.1.0",
|
|
75
|
+
description: input.description?.trim() || "A new project created with Outfitter",
|
|
76
|
+
binName: deriveBinName(projectName),
|
|
77
|
+
year: input.year ?? String(new Date().getFullYear())
|
|
78
|
+
},
|
|
79
|
+
changes
|
|
80
|
+
};
|
|
81
|
+
return Result.ok(plan);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
planCreateProject
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
addBlocks
|
|
4
|
+
} from "../shared/outfitter-ydw7x6bh.js";
|
|
5
|
+
import"../shared/outfitter-3tx3adgj.js";
|
|
6
|
+
import"../shared/outfitter-ypcvwg1s.js";
|
|
7
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
8
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
9
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
10
|
+
export {
|
|
11
|
+
addBlocks
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
injectSharedConfig,
|
|
4
|
+
rewriteLocalDependencies
|
|
5
|
+
} from "../shared/outfitter-wrcqq29p.js";
|
|
6
|
+
import"../shared/outfitter-tqznjgbm.js";
|
|
7
|
+
import"../shared/outfitter-x39awx8g.js";
|
|
8
|
+
import"../shared/outfitter-1fy7byz5.js";
|
|
9
|
+
import"../shared/outfitter-4q1zfmvc.js";
|
|
10
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
11
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
12
|
+
export {
|
|
13
|
+
rewriteLocalDependencies,
|
|
14
|
+
injectSharedConfig
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ResolvedPresetDependencyVersions {
|
|
2
|
+
readonly external: Record<string, string>;
|
|
3
|
+
readonly internal: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
declare function clearResolvedVersionsCache(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Resolve dependency versions for scaffold presets.
|
|
8
|
+
*
|
|
9
|
+
* External deps (zod, commander, etc.) come from `@outfitter/presets` which
|
|
10
|
+
* has concrete versions (catalog: resolved at publish time).
|
|
11
|
+
*
|
|
12
|
+
* Internal deps (`@outfitter/*`) come from workspace package scanning (monorepo)
|
|
13
|
+
* or from the outfitter CLI's own package.json deps (when published).
|
|
14
|
+
*/
|
|
15
|
+
declare function resolvePresetDependencyVersions(): ResolvedPresetDependencyVersions;
|
|
16
|
+
declare function applyResolvedDependencyVersions(parsedPackageJson: Record<string, unknown>, versions: ResolvedPresetDependencyVersions): void;
|
|
17
|
+
export { resolvePresetDependencyVersions, clearResolvedVersionsCache, applyResolvedDependencyVersions, ResolvedPresetDependencyVersions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
applyResolvedDependencyVersions,
|
|
4
|
+
clearResolvedVersionsCache,
|
|
5
|
+
resolvePresetDependencyVersions
|
|
6
|
+
} from "../shared/outfitter-x39awx8g.js";
|
|
7
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
8
|
+
export {
|
|
9
|
+
resolvePresetDependencyVersions,
|
|
10
|
+
clearResolvedVersionsCache,
|
|
11
|
+
applyResolvedDependencyVersions
|
|
12
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
addBlocks
|
|
4
|
+
} from "../shared/outfitter-ydw7x6bh.js";
|
|
5
|
+
import {
|
|
6
|
+
copyPresetFiles,
|
|
7
|
+
getPresetsBaseDir
|
|
8
|
+
} from "../shared/outfitter-6t7xeyg1.js";
|
|
9
|
+
import"../shared/outfitter-3tx3adgj.js";
|
|
10
|
+
import"../shared/outfitter-ypcvwg1s.js";
|
|
11
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
12
|
+
import {
|
|
13
|
+
injectSharedConfig,
|
|
14
|
+
rewriteLocalDependencies
|
|
15
|
+
} from "../shared/outfitter-wrcqq29p.js";
|
|
16
|
+
import"../shared/outfitter-tqznjgbm.js";
|
|
17
|
+
import"../shared/outfitter-x39awx8g.js";
|
|
18
|
+
import"../shared/outfitter-1fy7byz5.js";
|
|
19
|
+
import"../shared/outfitter-4q1zfmvc.js";
|
|
20
|
+
import {
|
|
21
|
+
ScaffoldError
|
|
22
|
+
} from "../shared/outfitter-8y2dfx6n.js";
|
|
23
|
+
import"../shared/outfitter-eepj7rf7.js";
|
|
24
|
+
|
|
25
|
+
// apps/outfitter/src/engine/executor.ts
|
|
26
|
+
import { existsSync, mkdirSync } from "fs";
|
|
27
|
+
import { join } from "path";
|
|
28
|
+
import { Result } from "@outfitter/contracts";
|
|
29
|
+
var TOOLING_PRESET_PATHS = new Set([
|
|
30
|
+
".claude/settings.json",
|
|
31
|
+
".claude/hooks/format-code-on-stop.sh",
|
|
32
|
+
".lefthook.yml",
|
|
33
|
+
".markdownlint-cli2.jsonc",
|
|
34
|
+
".oxlintrc.json",
|
|
35
|
+
".oxfmtrc.jsonc",
|
|
36
|
+
"biome.json",
|
|
37
|
+
"scripts/bootstrap.sh"
|
|
38
|
+
]);
|
|
39
|
+
function createPresetSkipFilter(includeTooling) {
|
|
40
|
+
if (includeTooling) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
return (relativePath) => {
|
|
44
|
+
const normalized = relativePath.endsWith(".template") ? relativePath.slice(0, -".template".length) : relativePath;
|
|
45
|
+
return TOOLING_PRESET_PATHS.has(normalized);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function executePlan(plan, options) {
|
|
49
|
+
try {
|
|
50
|
+
const presetsDir = getPresetsBaseDir();
|
|
51
|
+
let projectDir;
|
|
52
|
+
let blocksAdded;
|
|
53
|
+
for (const change of plan.changes) {
|
|
54
|
+
switch (change.type) {
|
|
55
|
+
case "copy-preset": {
|
|
56
|
+
projectDir = change.targetDir;
|
|
57
|
+
if (!(existsSync(projectDir) || options.collector)) {
|
|
58
|
+
mkdirSync(projectDir, { recursive: true });
|
|
59
|
+
}
|
|
60
|
+
const presetPath = join(presetsDir, change.preset);
|
|
61
|
+
if (!existsSync(presetPath)) {
|
|
62
|
+
return Result.err(new ScaffoldError(`Preset '${change.preset}' not found in ${presetsDir}`));
|
|
63
|
+
}
|
|
64
|
+
const skipFilter = createPresetSkipFilter(change.includeTooling);
|
|
65
|
+
if (change.overlayBaseTemplate) {
|
|
66
|
+
const basePath = join(presetsDir, "_base");
|
|
67
|
+
if (existsSync(basePath)) {
|
|
68
|
+
const baseWrittenPaths = new Set;
|
|
69
|
+
const baseResult = copyPresetFiles(basePath, projectDir, plan.values, options, {
|
|
70
|
+
writtenPaths: baseWrittenPaths,
|
|
71
|
+
...skipFilter ? { skipFilter } : {}
|
|
72
|
+
});
|
|
73
|
+
if (baseResult.isErr()) {
|
|
74
|
+
return baseResult;
|
|
75
|
+
}
|
|
76
|
+
const presetResult2 = copyPresetFiles(presetPath, projectDir, plan.values, options, {
|
|
77
|
+
allowOverwrite: true,
|
|
78
|
+
overwritablePaths: baseWrittenPaths,
|
|
79
|
+
...skipFilter ? { skipFilter } : {}
|
|
80
|
+
});
|
|
81
|
+
if (presetResult2.isErr()) {
|
|
82
|
+
return presetResult2;
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const presetResult = copyPresetFiles(presetPath, projectDir, plan.values, options, skipFilter ? { skipFilter } : {});
|
|
88
|
+
if (presetResult.isErr()) {
|
|
89
|
+
return presetResult;
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case "inject-shared-config": {
|
|
94
|
+
if (!projectDir) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
if (options.collector) {
|
|
98
|
+
options.collector.add({
|
|
99
|
+
type: "config-inject",
|
|
100
|
+
target: join(projectDir, "package.json"),
|
|
101
|
+
description: "Inject shared scripts/devDependencies"
|
|
102
|
+
});
|
|
103
|
+
} else {
|
|
104
|
+
const result = injectSharedConfig(projectDir);
|
|
105
|
+
if (result.isErr()) {
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case "rewrite-local-dependencies": {
|
|
112
|
+
if (!projectDir) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
if (options.collector) {
|
|
116
|
+
options.collector.add({
|
|
117
|
+
type: "config-inject",
|
|
118
|
+
target: join(projectDir, "package.json"),
|
|
119
|
+
description: "Rewrite local @outfitter/* dependencies to workspace:*"
|
|
120
|
+
});
|
|
121
|
+
} else {
|
|
122
|
+
const result = rewriteLocalDependencies(projectDir);
|
|
123
|
+
if (result.isErr()) {
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case "add-blocks": {
|
|
130
|
+
if (!projectDir) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
const result = await addBlocks(projectDir, change.blocks, options);
|
|
134
|
+
if (result.isErr()) {
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
blocksAdded = result.value;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
default: {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (!projectDir) {
|
|
146
|
+
return Result.err(new ScaffoldError("Plan contains no copy-preset step"));
|
|
147
|
+
}
|
|
148
|
+
return Result.ok({ projectDir, blocksAdded });
|
|
149
|
+
} catch (error) {
|
|
150
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
151
|
+
return Result.err(new ScaffoldError(`Failed to execute scaffold plan: ${message}`));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
executePlan
|
|
156
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../shared/outfitter-p8t646r8.js";
|
|
2
|
+
import { addBlocks } from "../shared/outfitter-954y4mzx.js";
|
|
3
|
+
import { buildWorkspaceRootPackageJson, detectWorkspaceRoot, scaffoldWorkspaceRoot } from "../shared/outfitter-y6ee0k45.js";
|
|
4
|
+
import { deriveBinName, deriveProjectName, isPathWithin, resolveAuthor, resolvePackageName, resolveYear, sanitizePackageName, validatePackageName, validateProjectDirectoryName } from "../shared/outfitter-m3ehh37q.js";
|
|
5
|
+
import { copyTemplateFiles, getTemplatesDir } from "../shared/outfitter-fbvfd5zq.js";
|
|
6
|
+
import { copyPresetFiles, getOutputFilename, getPresetsBaseDir, isBinaryFile, replacePlaceholders } from "../shared/outfitter-6rtcemk7.js";
|
|
7
|
+
import { executePlan } from "../shared/outfitter-8kmak0wc.js";
|
|
8
|
+
import { injectSharedConfig, rewriteLocalDependencies } from "../shared/outfitter-gdc7b7de.js";
|
|
9
|
+
import { EngineCollector, EngineOptions, PlaceholderValues, ScaffoldChange, ScaffoldError, ScaffoldPlan, ScaffoldResult } from "../shared/outfitter-cyvr4r8d.js";
|
|
10
|
+
export { validateProjectDirectoryName, validatePackageName, scaffoldWorkspaceRoot, sanitizePackageName, rewriteLocalDependencies, resolveYear, resolvePackageName, resolveAuthor, replacePlaceholders, isPathWithin, isBinaryFile, injectSharedConfig, getTemplatesDir, getPresetsBaseDir, getOutputFilename, executePlan, detectWorkspaceRoot, deriveProjectName, deriveBinName, copyTemplateFiles, copyPresetFiles, buildWorkspaceRootPackageJson, addBlocks, ScaffoldResult, ScaffoldPlan, ScaffoldError, ScaffoldChange, PlaceholderValues, EngineOptions, EngineCollector };
|