outfitter 0.2.1 → 0.2.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 +215 -116
- package/dist/actions.d.ts +2 -0
- package/dist/actions.js +34 -0
- package/dist/cli.js +29 -5
- package/dist/commands/add.d.ts +54 -0
- package/dist/commands/add.js +16 -0
- package/dist/commands/check.d.ts +91 -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-module-loader.d.ts +2 -0
- package/dist/commands/docs-module-loader.js +8 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +13 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.js +31 -0
- package/dist/commands/migrate-kit.d.ts +2 -0
- package/dist/commands/migrate-kit.js +15 -0
- package/dist/commands/repo.d.ts +3 -0
- package/dist/commands/repo.js +9 -0
- package/dist/commands/scaffold.d.ts +4 -0
- package/dist/commands/scaffold.js +31 -0
- package/dist/commands/shared-deps.d.ts +36 -0
- package/dist/commands/shared-deps.js +10 -0
- package/dist/commands/update-planner.d.ts +58 -0
- package/dist/commands/update-planner.js +8 -0
- package/dist/commands/update-workspace.d.ts +76 -0
- package/dist/commands/update-workspace.js +16 -0
- package/dist/commands/update.d.ts +113 -0
- package/dist/commands/update.js +21 -0
- package/dist/create/index.d.ts +5 -0
- package/dist/create/index.js +29 -0
- package/dist/create/planner.d.ts +3 -0
- package/dist/create/planner.js +21 -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 +12 -0
- package/dist/engine/executor.d.ts +3 -0
- package/dist/engine/executor.js +16 -0
- package/dist/engine/index.d.ts +8 -0
- package/dist/engine/index.js +59 -0
- package/dist/engine/names.d.ts +2 -0
- package/dist/engine/names.js +16 -0
- package/dist/engine/post-scaffold.d.ts +3 -0
- package/dist/engine/post-scaffold.js +8 -0
- package/dist/engine/render-plan.d.ts +7 -0
- package/dist/engine/render-plan.js +9 -0
- package/dist/engine/template.d.ts +3 -0
- package/dist/engine/template.js +17 -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 +13 -0
- package/dist/index.d.ts +265 -50
- package/dist/index.js +157 -3
- 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/chunk-b0y0cwkr.js +5533 -0
- package/dist/shared/outfitter-193jvzg4.d.ts +5 -0
- package/dist/shared/outfitter-1dd0k853.js +194 -0
- package/dist/shared/outfitter-1h7k8xxt.js +29 -0
- package/dist/shared/outfitter-1qwpjt6w.js +125 -0
- package/dist/shared/outfitter-2ngep1h2.d.ts +5 -0
- package/dist/shared/outfitter-2np85etz.js +95 -0
- package/dist/shared/outfitter-33w361tc.d.ts +18 -0
- package/dist/shared/outfitter-344t1r38.js +1 -0
- package/dist/shared/outfitter-3weh61w7.d.ts +25 -0
- package/dist/shared/outfitter-4s9meh3j.js +221 -0
- package/dist/shared/outfitter-6a4bq054.js +322 -0
- package/dist/shared/outfitter-6bkqjk86.d.ts +3 -0
- package/dist/shared/outfitter-6gc3g5wk.js +98 -0
- package/dist/shared/outfitter-7cv5fg1m.js +61 -0
- package/dist/shared/outfitter-7ha7p61k.d.ts +6 -0
- package/dist/shared/outfitter-7r12fj7f.js +30 -0
- package/dist/shared/outfitter-8y2dfx6n.js +11 -0
- package/dist/shared/outfitter-9c8edfsn.js +715 -0
- package/dist/shared/outfitter-9x1brcmq.js +184 -0
- package/dist/shared/outfitter-a79xrm12.d.ts +17 -0
- package/dist/shared/outfitter-amc4jbs1.d.ts +50 -0
- package/dist/shared/outfitter-ara3djt0.js +73 -0
- package/dist/shared/outfitter-avhm5z6w.js +82 -0
- package/dist/shared/outfitter-b5nd42y4.d.ts +45 -0
- package/dist/shared/outfitter-dd0btgec.d.ts +40 -0
- package/dist/shared/outfitter-e2zz5wv7.d.ts +51 -0
- package/dist/shared/outfitter-ehp18x1n.js +1 -0
- package/dist/shared/outfitter-fnsmx3xg.js +750 -0
- package/dist/shared/outfitter-gdvm5c0b.d.ts +4 -0
- package/dist/shared/outfitter-gp4v5gkf.js +322 -0
- package/dist/shared/outfitter-h1mnzzd1.d.ts +14 -0
- package/dist/shared/outfitter-hpymx4m9.js +184 -0
- package/dist/shared/outfitter-hvsaxgcp.js +1 -0
- package/dist/shared/outfitter-j8yc7294.d.ts +22 -0
- package/dist/shared/outfitter-jyxwznk1.js +404 -0
- package/dist/shared/outfitter-k112c427.js +21 -0
- package/dist/shared/outfitter-k56rmt24.d.ts +30 -0
- package/dist/shared/outfitter-ksa1pp4t.d.ts +4 -0
- package/dist/shared/outfitter-mdt37hqm.js +4 -0
- package/dist/shared/outfitter-mtbpabf3.js +91 -0
- package/dist/shared/outfitter-nm4m0v6x.d.ts +131 -0
- package/dist/shared/outfitter-nmeecf1b.js +531 -0
- package/dist/shared/outfitter-npyfbdmc.d.ts +6 -0
- package/dist/shared/outfitter-pxt58tsq.js +582 -0
- package/dist/shared/outfitter-q9agarmb.js +42 -0
- package/dist/shared/outfitter-qfgj5xpq.js +70 -0
- package/dist/shared/outfitter-qfh36ddg.d.ts +66 -0
- package/dist/shared/outfitter-s6k8y2p4.js +269 -0
- package/dist/shared/outfitter-sftf1s26.js +199 -0
- package/dist/shared/outfitter-sg7ncy4a.d.ts +51 -0
- package/dist/shared/outfitter-sgtq57qr.d.ts +5 -0
- package/dist/shared/outfitter-txre6cdn.d.ts +60 -0
- package/dist/shared/outfitter-vh4xgb93.js +35 -0
- package/dist/shared/outfitter-ya44h1km.js +191 -0
- package/dist/shared/outfitter-zwyvewr1.js +36 -0
- package/dist/targets/index.d.ts +4 -0
- package/dist/targets/index.js +29 -0
- package/dist/targets/registry.d.ts +3 -0
- package/dist/targets/registry.js +28 -0
- package/dist/targets/types.d.ts +2 -0
- package/dist/targets/types.js +1 -0
- package/package.json +182 -29
- package/templates/basic/.lefthook.yml.template +4 -5
- package/templates/basic/package.json.template +10 -5
- package/templates/cli/.lefthook.yml.template +4 -5
- package/templates/cli/biome.json.template +2 -15
- package/templates/cli/package.json.template +11 -7
- package/templates/daemon/.lefthook.yml.template +4 -5
- package/templates/daemon/biome.json.template +2 -15
- package/templates/daemon/package.json.template +11 -7
- package/templates/mcp/.lefthook.yml.template +4 -5
- package/templates/mcp/biome.json.template +2 -15
- package/templates/mcp/package.json.template +11 -7
- package/templates/minimal/.gitignore.template +30 -0
- package/templates/minimal/.lefthook.yml.template +26 -0
- package/templates/minimal/package.json.template +46 -0
- package/templates/minimal/src/index.ts.template +26 -0
- package/templates/minimal/tsconfig.json.template +34 -0
- package/dist/shared/chunk-f3sch043.js +0 -1858
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
injectSharedConfig,
|
|
4
|
+
rewriteLocalDependencies
|
|
5
|
+
} from "../shared/outfitter-ara3djt0.js";
|
|
6
|
+
import"../shared/outfitter-k112c427.js";
|
|
7
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
8
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
9
|
+
export {
|
|
10
|
+
rewriteLocalDependencies,
|
|
11
|
+
injectSharedConfig
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
executePlan
|
|
4
|
+
} from "../shared/outfitter-1qwpjt6w.js";
|
|
5
|
+
import"../shared/outfitter-9x1brcmq.js";
|
|
6
|
+
import"../shared/outfitter-7cv5fg1m.js";
|
|
7
|
+
import"../shared/outfitter-s6k8y2p4.js";
|
|
8
|
+
import"../shared/outfitter-mtbpabf3.js";
|
|
9
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
10
|
+
import"../shared/outfitter-ara3djt0.js";
|
|
11
|
+
import"../shared/outfitter-k112c427.js";
|
|
12
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
13
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
14
|
+
export {
|
|
15
|
+
executePlan
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { buildWorkspaceRootPackageJson, detectWorkspaceRoot, scaffoldWorkspaceRoot } from "../shared/outfitter-7ha7p61k";
|
|
2
|
+
import { deriveBinName, deriveProjectName, resolveAuthor, resolvePackageName, resolveYear } from "../shared/outfitter-npyfbdmc";
|
|
3
|
+
import { copyTemplateFiles, getOutputFilename, getTemplatesDir, isBinaryFile, replacePlaceholders } from "../shared/outfitter-h1mnzzd1";
|
|
4
|
+
import { executePlan } from "../shared/outfitter-gdvm5c0b";
|
|
5
|
+
import { addBlocks } from "../shared/outfitter-193jvzg4";
|
|
6
|
+
import { injectSharedConfig, rewriteLocalDependencies } from "../shared/outfitter-sgtq57qr";
|
|
7
|
+
import { EngineCollector, EngineOptions, PlaceholderValues, ScaffoldChange, ScaffoldError, ScaffoldPlan, ScaffoldResult } from "../shared/outfitter-qfh36ddg";
|
|
8
|
+
export { scaffoldWorkspaceRoot, rewriteLocalDependencies, resolveYear, resolvePackageName, resolveAuthor, replacePlaceholders, isBinaryFile, injectSharedConfig, getTemplatesDir, getOutputFilename, executePlan, detectWorkspaceRoot, deriveProjectName, deriveBinName, copyTemplateFiles, buildWorkspaceRootPackageJson, addBlocks, ScaffoldResult, ScaffoldPlan, ScaffoldError, ScaffoldChange, PlaceholderValues, EngineOptions, EngineCollector };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"../shared/outfitter-344t1r38.js";
|
|
3
|
+
import {
|
|
4
|
+
buildWorkspaceRootPackageJson,
|
|
5
|
+
detectWorkspaceRoot,
|
|
6
|
+
scaffoldWorkspaceRoot
|
|
7
|
+
} from "../shared/outfitter-2np85etz.js";
|
|
8
|
+
import {
|
|
9
|
+
deriveBinName,
|
|
10
|
+
deriveProjectName,
|
|
11
|
+
resolveAuthor,
|
|
12
|
+
resolvePackageName,
|
|
13
|
+
resolveYear
|
|
14
|
+
} from "../shared/outfitter-q9agarmb.js";
|
|
15
|
+
import {
|
|
16
|
+
executePlan
|
|
17
|
+
} from "../shared/outfitter-1qwpjt6w.js";
|
|
18
|
+
import {
|
|
19
|
+
copyTemplateFiles,
|
|
20
|
+
getOutputFilename,
|
|
21
|
+
getTemplatesDir,
|
|
22
|
+
isBinaryFile,
|
|
23
|
+
replacePlaceholders
|
|
24
|
+
} from "../shared/outfitter-9x1brcmq.js";
|
|
25
|
+
import {
|
|
26
|
+
addBlocks
|
|
27
|
+
} from "../shared/outfitter-7cv5fg1m.js";
|
|
28
|
+
import"../shared/outfitter-s6k8y2p4.js";
|
|
29
|
+
import"../shared/outfitter-mtbpabf3.js";
|
|
30
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
31
|
+
import {
|
|
32
|
+
injectSharedConfig,
|
|
33
|
+
rewriteLocalDependencies
|
|
34
|
+
} from "../shared/outfitter-ara3djt0.js";
|
|
35
|
+
import"../shared/outfitter-k112c427.js";
|
|
36
|
+
import {
|
|
37
|
+
ScaffoldError
|
|
38
|
+
} from "../shared/outfitter-8y2dfx6n.js";
|
|
39
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
40
|
+
export {
|
|
41
|
+
scaffoldWorkspaceRoot,
|
|
42
|
+
rewriteLocalDependencies,
|
|
43
|
+
resolveYear,
|
|
44
|
+
resolvePackageName,
|
|
45
|
+
resolveAuthor,
|
|
46
|
+
replacePlaceholders,
|
|
47
|
+
isBinaryFile,
|
|
48
|
+
injectSharedConfig,
|
|
49
|
+
getTemplatesDir,
|
|
50
|
+
getOutputFilename,
|
|
51
|
+
executePlan,
|
|
52
|
+
detectWorkspaceRoot,
|
|
53
|
+
deriveProjectName,
|
|
54
|
+
deriveBinName,
|
|
55
|
+
copyTemplateFiles,
|
|
56
|
+
buildWorkspaceRootPackageJson,
|
|
57
|
+
addBlocks,
|
|
58
|
+
ScaffoldError
|
|
59
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
deriveBinName,
|
|
4
|
+
deriveProjectName,
|
|
5
|
+
resolveAuthor,
|
|
6
|
+
resolvePackageName,
|
|
7
|
+
resolveYear
|
|
8
|
+
} from "../shared/outfitter-q9agarmb.js";
|
|
9
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
10
|
+
export {
|
|
11
|
+
resolveYear,
|
|
12
|
+
resolvePackageName,
|
|
13
|
+
resolveAuthor,
|
|
14
|
+
deriveProjectName,
|
|
15
|
+
deriveBinName
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OperationCollector } from "../shared/outfitter-amc4jbs1";
|
|
2
|
+
import { OutputMode } from "@outfitter/cli/types";
|
|
3
|
+
declare function renderOperationPlan(collector: OperationCollector, options?: {
|
|
4
|
+
readonly mode?: OutputMode;
|
|
5
|
+
readonly rootDir?: string;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
export { renderOperationPlan };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { copyTemplateFiles, getOutputFilename, getTemplatesDir, isBinaryFile, replacePlaceholders } from "../shared/outfitter-h1mnzzd1";
|
|
2
|
+
import "../shared/outfitter-qfh36ddg";
|
|
3
|
+
export { replacePlaceholders, isBinaryFile, getTemplatesDir, getOutputFilename, copyTemplateFiles };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
copyTemplateFiles,
|
|
4
|
+
getOutputFilename,
|
|
5
|
+
getTemplatesDir,
|
|
6
|
+
isBinaryFile,
|
|
7
|
+
replacePlaceholders
|
|
8
|
+
} from "../shared/outfitter-9x1brcmq.js";
|
|
9
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
10
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
11
|
+
export {
|
|
12
|
+
replacePlaceholders,
|
|
13
|
+
isBinaryFile,
|
|
14
|
+
getTemplatesDir,
|
|
15
|
+
getOutputFilename,
|
|
16
|
+
copyTemplateFiles
|
|
17
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { EngineCollector, EngineOptions, PlaceholderValues, ScaffoldChange, ScaffoldError, ScaffoldPlan, ScaffoldResult } from "../shared/outfitter-qfh36ddg";
|
|
2
|
+
export { ScaffoldResult, ScaffoldPlan, ScaffoldError, ScaffoldChange, PlaceholderValues, EngineOptions, EngineCollector };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
buildWorkspaceRootPackageJson,
|
|
4
|
+
detectWorkspaceRoot,
|
|
5
|
+
scaffoldWorkspaceRoot
|
|
6
|
+
} from "../shared/outfitter-2np85etz.js";
|
|
7
|
+
import"../shared/outfitter-8y2dfx6n.js";
|
|
8
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
9
|
+
export {
|
|
10
|
+
scaffoldWorkspaceRoot,
|
|
11
|
+
detectWorkspaceRoot,
|
|
12
|
+
buildWorkspaceRootPackageJson
|
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -130,36 +130,103 @@ declare function printDoctorResults(result: DoctorResult, options?: {
|
|
|
130
130
|
* ```
|
|
131
131
|
*/
|
|
132
132
|
declare function doctorCommand(program: Command): void;
|
|
133
|
-
import {
|
|
133
|
+
import { OutputMode as OutputMode2 } from "@outfitter/cli/types";
|
|
134
|
+
import { Result as Result3 } from "@outfitter/contracts";
|
|
134
135
|
import { AddBlockResult } from "@outfitter/tooling";
|
|
135
136
|
import { Command as Command2 } from "commander";
|
|
137
|
+
interface PostScaffoldResult {
|
|
138
|
+
readonly installResult: "success" | "failed" | "skipped";
|
|
139
|
+
readonly installError?: string | undefined;
|
|
140
|
+
readonly gitInitResult: "success" | "failed" | "skipped" | "already-repo";
|
|
141
|
+
readonly gitCommitResult: "success" | "failed" | "skipped";
|
|
142
|
+
readonly gitError?: string | undefined;
|
|
143
|
+
readonly nextSteps: readonly string[];
|
|
144
|
+
}
|
|
145
|
+
import { NotFoundError, Result as Result2, ValidationError } from "@outfitter/contracts";
|
|
146
|
+
/**
|
|
147
|
+
* Unique identifier for a scaffold target.
|
|
148
|
+
*/
|
|
149
|
+
type TargetId = "minimal" | "cli" | "mcp" | "daemon" | "api" | "worker" | "web" | "lib";
|
|
150
|
+
/**
|
|
151
|
+
* Whether the target produces a runnable application or a library package.
|
|
152
|
+
*/
|
|
153
|
+
type TargetCategory = "runnable" | "library";
|
|
154
|
+
/**
|
|
155
|
+
* Whether the target has a working template or is a planned placeholder.
|
|
156
|
+
*/
|
|
157
|
+
type TargetStatus = "ready" | "stub";
|
|
158
|
+
/**
|
|
159
|
+
* Whether a target can be used with init, scaffold, or both.
|
|
160
|
+
*/
|
|
161
|
+
type TargetScope = "init-only" | "scaffold-only" | "both";
|
|
162
|
+
/**
|
|
163
|
+
* Complete definition for a scaffold target.
|
|
164
|
+
*/
|
|
165
|
+
interface TargetDefinition {
|
|
166
|
+
readonly id: TargetId;
|
|
167
|
+
readonly description: string;
|
|
168
|
+
readonly category: TargetCategory;
|
|
169
|
+
readonly placement: "apps" | "packages";
|
|
170
|
+
readonly templateDir: string;
|
|
171
|
+
readonly defaultBlocks: readonly string[];
|
|
172
|
+
readonly status: TargetStatus;
|
|
173
|
+
readonly scope: TargetScope;
|
|
174
|
+
}
|
|
175
|
+
declare const TARGET_REGISTRY: ReadonlyMap<TargetId, TargetDefinition>;
|
|
176
|
+
declare const TARGET_IDS: readonly TargetId[];
|
|
177
|
+
declare const READY_TARGET_IDS: readonly TargetId[];
|
|
178
|
+
declare const INIT_TARGET_IDS: readonly TargetId[];
|
|
179
|
+
declare const SCAFFOLD_TARGET_IDS: readonly TargetId[];
|
|
180
|
+
declare function getTarget(id: string): Result2<TargetDefinition, NotFoundError>;
|
|
181
|
+
declare function getReadyTarget(id: string): Result2<TargetDefinition, NotFoundError | ValidationError>;
|
|
182
|
+
declare function getInitTarget(id: string): Result2<TargetDefinition, NotFoundError | ValidationError>;
|
|
183
|
+
declare function getScaffoldTarget(id: string): Result2<TargetDefinition, NotFoundError | ValidationError>;
|
|
184
|
+
declare function resolvePlacement(target: TargetDefinition): "apps" | "packages";
|
|
185
|
+
declare function listTargets(filter?: {
|
|
186
|
+
readonly status?: TargetStatus;
|
|
187
|
+
readonly scope?: TargetScope;
|
|
188
|
+
readonly category?: TargetCategory;
|
|
189
|
+
}): readonly TargetDefinition[];
|
|
190
|
+
type InitStructure = "single" | "workspace";
|
|
191
|
+
type InitPresetId = Extract<TargetId, "minimal" | "cli" | "mcp" | "daemon">;
|
|
136
192
|
/**
|
|
137
193
|
* Options for the init command.
|
|
138
194
|
*/
|
|
139
195
|
interface InitOptions {
|
|
140
|
-
/** Target directory to initialize the project in */
|
|
141
196
|
readonly targetDir: string;
|
|
142
|
-
/** Package name (defaults to directory name if not provided) */
|
|
143
197
|
readonly name: string | undefined;
|
|
144
|
-
/** Binary name (defaults to project name if not provided) */
|
|
145
198
|
readonly bin?: string | undefined;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
199
|
+
readonly preset?: InitPresetId | undefined;
|
|
200
|
+
/** @deprecated Use `preset` instead. */
|
|
201
|
+
readonly template?: string | undefined;
|
|
202
|
+
readonly structure?: InitStructure | undefined;
|
|
203
|
+
readonly workspaceName?: string | undefined;
|
|
149
204
|
readonly local?: boolean | undefined;
|
|
150
|
-
/** Whether to overwrite existing files */
|
|
151
205
|
readonly force: boolean;
|
|
152
|
-
/** Tooling blocks to add (e.g., "scaffolding" or "claude,biome,lefthook") */
|
|
153
206
|
readonly with?: string | undefined;
|
|
154
|
-
/** Skip tooling prompt in interactive mode */
|
|
155
207
|
readonly noTooling?: boolean | undefined;
|
|
208
|
+
readonly yes?: boolean | undefined;
|
|
209
|
+
readonly dryRun?: boolean | undefined;
|
|
210
|
+
readonly skipInstall?: boolean | undefined;
|
|
211
|
+
readonly skipGit?: boolean | undefined;
|
|
212
|
+
readonly skipCommit?: boolean | undefined;
|
|
213
|
+
readonly installTimeout?: number | undefined;
|
|
156
214
|
}
|
|
157
215
|
/**
|
|
158
|
-
* Result of running init
|
|
216
|
+
* Result of running init.
|
|
159
217
|
*/
|
|
160
218
|
interface InitResult {
|
|
161
|
-
|
|
219
|
+
readonly structure: InitStructure;
|
|
220
|
+
readonly rootDir: string;
|
|
221
|
+
readonly projectDir: string;
|
|
222
|
+
readonly preset: InitPresetId;
|
|
223
|
+
readonly packageName: string;
|
|
162
224
|
readonly blocksAdded?: AddBlockResult | undefined;
|
|
225
|
+
readonly postScaffold: PostScaffoldResult;
|
|
226
|
+
readonly dryRunPlan?: {
|
|
227
|
+
readonly operations: readonly unknown[];
|
|
228
|
+
readonly summary: Record<string, number>;
|
|
229
|
+
} | undefined;
|
|
163
230
|
}
|
|
164
231
|
/**
|
|
165
232
|
* Error returned when initialization fails.
|
|
@@ -168,46 +235,194 @@ declare class InitError extends Error {
|
|
|
168
235
|
readonly _tag: "InitError";
|
|
169
236
|
constructor(message: string);
|
|
170
237
|
}
|
|
238
|
+
declare function runInit(options: InitOptions, presetOverride?: InitPresetId): Promise<Result3<InitResult, InitError>>;
|
|
239
|
+
declare function printInitResults(result: InitResult, options?: {
|
|
240
|
+
mode?: OutputMode2;
|
|
241
|
+
}): Promise<void>;
|
|
242
|
+
declare function initCommand(program: Command2): void;
|
|
243
|
+
import { OutputMode as OutputMode3 } from "@outfitter/cli/types";
|
|
244
|
+
import { Result as Result4 } from "@outfitter/contracts";
|
|
245
|
+
import { Command as Command3 } from "commander";
|
|
246
|
+
interface DiffPreview {
|
|
247
|
+
readonly path: string;
|
|
248
|
+
readonly preview: string;
|
|
249
|
+
}
|
|
171
250
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* @param options - Init options
|
|
175
|
-
* @returns Result indicating success or failure
|
|
176
|
-
*
|
|
177
|
-
* @example
|
|
178
|
-
* ```typescript
|
|
179
|
-
* const result = await runInit({
|
|
180
|
-
* targetDir: "./my-project",
|
|
181
|
-
* name: "my-project",
|
|
182
|
-
* template: "basic",
|
|
183
|
-
* force: false,
|
|
184
|
-
* blocks: "scaffolding", // Optional: add tooling blocks
|
|
185
|
-
* });
|
|
186
|
-
*
|
|
187
|
-
* if (result.isOk()) {
|
|
188
|
-
* console.log("Project initialized successfully!");
|
|
189
|
-
* if (result.value.blocksAdded) {
|
|
190
|
-
* console.log(`Added ${result.value.blocksAdded.created.length} tooling files`);
|
|
191
|
-
* }
|
|
192
|
-
* } else {
|
|
193
|
-
* console.error("Failed:", result.error.message);
|
|
194
|
-
* }
|
|
195
|
-
* ```
|
|
251
|
+
* Options for the migrate-kit command.
|
|
196
252
|
*/
|
|
197
|
-
|
|
253
|
+
interface MigrateKitOptions {
|
|
254
|
+
/** Target directory to migrate (defaults to cwd). */
|
|
255
|
+
readonly targetDir?: string | undefined;
|
|
256
|
+
/** Run codemod without writing changes to disk. */
|
|
257
|
+
readonly dryRun?: boolean | undefined;
|
|
258
|
+
}
|
|
198
259
|
/**
|
|
199
|
-
*
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
260
|
+
* Result from migrate-kit execution.
|
|
261
|
+
*/
|
|
262
|
+
interface MigrateKitResult {
|
|
263
|
+
readonly targetDir: string;
|
|
264
|
+
readonly dryRun: boolean;
|
|
265
|
+
readonly packageJsonFiles: number;
|
|
266
|
+
readonly sourceFiles: number;
|
|
267
|
+
readonly manifestUpdates: number;
|
|
268
|
+
readonly importRewrites: number;
|
|
269
|
+
readonly changedFiles: readonly string[];
|
|
270
|
+
readonly diffs: readonly DiffPreview[];
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Error returned when migration fails.
|
|
274
|
+
*/
|
|
275
|
+
declare class MigrateKitError extends Error {
|
|
276
|
+
readonly _tag: "MigrateKitError";
|
|
277
|
+
constructor(message: string);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Runs the migrate-kit codemod programmatically.
|
|
281
|
+
*/
|
|
282
|
+
declare function runMigrateKit(options: MigrateKitOptions): Promise<Result4<MigrateKitResult, MigrateKitError>>;
|
|
283
|
+
/**
|
|
284
|
+
* Print migrate-kit results.
|
|
285
|
+
*/
|
|
286
|
+
declare function printMigrateKitResults(result: MigrateKitResult, options?: {
|
|
287
|
+
mode?: OutputMode3;
|
|
288
|
+
}): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Register `migrate kit` command directly on Commander.
|
|
291
|
+
*/
|
|
292
|
+
declare function migrateKitCommand(program: Command3): void;
|
|
293
|
+
import { Command as Command5 } from "commander";
|
|
294
|
+
type DocsMdxMode = "strict" | "lossy";
|
|
295
|
+
interface DocsBaseOptions {
|
|
296
|
+
readonly cwd?: string;
|
|
297
|
+
readonly workspaceRoot?: string;
|
|
298
|
+
readonly packagesDir?: string;
|
|
299
|
+
readonly outputDir?: string;
|
|
300
|
+
readonly excludedFilenames?: readonly string[];
|
|
301
|
+
readonly mdxMode?: DocsMdxMode;
|
|
302
|
+
}
|
|
303
|
+
interface ExecuteCheckCommandOptions extends DocsBaseOptions {}
|
|
304
|
+
interface ExecuteSyncCommandOptions extends DocsBaseOptions {}
|
|
305
|
+
type DocsExportTarget = "packages" | "llms" | "llms-full" | "all";
|
|
306
|
+
interface ExecuteExportCommandOptions extends DocsBaseOptions {
|
|
307
|
+
readonly llmsFile?: string;
|
|
308
|
+
readonly llmsFullFile?: string;
|
|
309
|
+
readonly target?: DocsExportTarget | string;
|
|
310
|
+
}
|
|
311
|
+
type RepoCheckSubject = "docs" | "exports" | "readme" | "registry" | "changeset" | "tree" | "boundary-invocations";
|
|
312
|
+
interface RepoCommandIo {
|
|
313
|
+
readonly out?: (line: string) => void;
|
|
314
|
+
readonly err?: (line: string) => void;
|
|
315
|
+
}
|
|
316
|
+
interface RepoToolingInvocation {
|
|
317
|
+
readonly command: "check-exports" | "check-readme-imports" | "check-bunup-registry" | "check-changeset" | "check-clean-tree" | "check-boundary-invocations";
|
|
318
|
+
readonly args: readonly string[];
|
|
319
|
+
readonly cwd: string;
|
|
320
|
+
}
|
|
321
|
+
interface CreateRepoCommandOptions {
|
|
322
|
+
readonly commandName?: string;
|
|
323
|
+
readonly io?: RepoCommandIo;
|
|
324
|
+
readonly runDocsCheck?: (options: ExecuteCheckCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
|
|
325
|
+
readonly runDocsSync?: (options: ExecuteSyncCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
|
|
326
|
+
readonly runDocsExport?: (options: ExecuteExportCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
|
|
327
|
+
readonly runToolingCommand?: (input: RepoToolingInvocation) => Promise<number>;
|
|
328
|
+
}
|
|
329
|
+
declare function createRepoCommand(options?: CreateRepoCommandOptions): Command5;
|
|
330
|
+
import { OutputMode as OutputMode4 } from "@outfitter/cli/types";
|
|
331
|
+
import { Result as Result5 } from "@outfitter/contracts";
|
|
332
|
+
import { AddBlockResult as AddBlockResult2 } from "@outfitter/tooling";
|
|
333
|
+
import { Command as Command6 } from "commander";
|
|
334
|
+
interface ScaffoldOptions {
|
|
335
|
+
readonly target: string;
|
|
336
|
+
readonly name?: string | undefined;
|
|
337
|
+
readonly force: boolean;
|
|
338
|
+
readonly skipInstall: boolean;
|
|
339
|
+
readonly dryRun: boolean;
|
|
340
|
+
readonly with?: string | undefined;
|
|
341
|
+
readonly noTooling?: boolean | undefined;
|
|
342
|
+
readonly local?: boolean | undefined;
|
|
343
|
+
readonly cwd: string;
|
|
344
|
+
readonly installTimeout?: number | undefined;
|
|
345
|
+
}
|
|
346
|
+
interface ScaffoldCommandResult {
|
|
347
|
+
readonly target: string;
|
|
348
|
+
readonly rootDir: string;
|
|
349
|
+
readonly targetDir: string;
|
|
350
|
+
readonly converted: boolean;
|
|
351
|
+
readonly movedExisting?: {
|
|
352
|
+
readonly from: string;
|
|
353
|
+
readonly to: string;
|
|
354
|
+
readonly name: string;
|
|
355
|
+
} | undefined;
|
|
356
|
+
readonly workspacePatternsUpdated: boolean;
|
|
357
|
+
readonly blocksAdded?: AddBlockResult2 | undefined;
|
|
358
|
+
readonly postScaffold: PostScaffoldResult;
|
|
359
|
+
readonly dryRunPlan?: {
|
|
360
|
+
readonly operations: readonly unknown[];
|
|
361
|
+
readonly summary: Record<string, number>;
|
|
362
|
+
} | undefined;
|
|
363
|
+
}
|
|
364
|
+
declare class ScaffoldCommandError extends Error {
|
|
365
|
+
readonly _tag: "ScaffoldCommandError";
|
|
366
|
+
constructor(message: string);
|
|
367
|
+
}
|
|
368
|
+
declare function runScaffold(options: ScaffoldOptions): Promise<Result5<ScaffoldCommandResult, ScaffoldCommandError>>;
|
|
369
|
+
declare function printScaffoldResults(result: ScaffoldCommandResult, options?: {
|
|
370
|
+
readonly mode?: OutputMode4;
|
|
371
|
+
}): Promise<void>;
|
|
372
|
+
declare function scaffoldCommand(program: Command6): void;
|
|
373
|
+
import { Result as Result6, ValidationError as ValidationError2 } from "@outfitter/contracts";
|
|
374
|
+
/**
|
|
375
|
+
* Create planner types for kit-first project scaffolding.
|
|
207
376
|
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
* ```
|
|
377
|
+
* These types model preset intent separately from execution so future flows can
|
|
378
|
+
* consume a deterministic plan before mutating the filesystem.
|
|
211
379
|
*/
|
|
212
|
-
|
|
213
|
-
|
|
380
|
+
type CreatePresetId = "basic" | "cli" | "daemon" | "mcp";
|
|
381
|
+
interface CreatePresetDefinition {
|
|
382
|
+
readonly id: CreatePresetId;
|
|
383
|
+
readonly template: CreatePresetId;
|
|
384
|
+
readonly summary: string;
|
|
385
|
+
readonly defaultBlocks: readonly string[];
|
|
386
|
+
}
|
|
387
|
+
interface CreateProjectInput {
|
|
388
|
+
readonly name: string;
|
|
389
|
+
readonly targetDir: string;
|
|
390
|
+
readonly preset: CreatePresetId;
|
|
391
|
+
readonly packageName?: string;
|
|
392
|
+
readonly description?: string;
|
|
393
|
+
readonly version?: string;
|
|
394
|
+
readonly includeTooling?: boolean;
|
|
395
|
+
readonly local?: boolean;
|
|
396
|
+
readonly year?: string;
|
|
397
|
+
}
|
|
398
|
+
type CreatePlanChange = {
|
|
399
|
+
readonly type: "copy-template";
|
|
400
|
+
readonly template: string;
|
|
401
|
+
readonly targetDir: string;
|
|
402
|
+
readonly overlayBaseTemplate: boolean;
|
|
403
|
+
} | {
|
|
404
|
+
readonly type: "inject-shared-config";
|
|
405
|
+
} | {
|
|
406
|
+
readonly type: "rewrite-local-dependencies";
|
|
407
|
+
readonly mode: "workspace";
|
|
408
|
+
} | {
|
|
409
|
+
readonly type: "add-blocks";
|
|
410
|
+
readonly blocks: readonly string[];
|
|
411
|
+
};
|
|
412
|
+
interface CreateProjectPlan {
|
|
413
|
+
readonly preset: CreatePresetDefinition;
|
|
414
|
+
readonly values: {
|
|
415
|
+
readonly packageName: string;
|
|
416
|
+
readonly projectName: string;
|
|
417
|
+
readonly version: string;
|
|
418
|
+
readonly description: string;
|
|
419
|
+
readonly binName: string;
|
|
420
|
+
readonly year: string;
|
|
421
|
+
};
|
|
422
|
+
readonly changes: readonly CreatePlanChange[];
|
|
423
|
+
}
|
|
424
|
+
declare function planCreateProject(input: CreateProjectInput): Result6<CreateProjectPlan, ValidationError2>;
|
|
425
|
+
declare const CREATE_PRESETS: Readonly<Record<CreatePresetId, CreatePresetDefinition>>;
|
|
426
|
+
declare const CREATE_PRESET_IDS: CreatePresetId[];
|
|
427
|
+
declare function getCreatePreset(id: string): CreatePresetDefinition | undefined;
|
|
428
|
+
export { scaffoldCommand, runScaffold, runMigrateKit, runInit, runDoctor, resolvePlacement, printScaffoldResults, printMigrateKitResults, printInitResults, printDoctorResults, planCreateProject, outfitterActions, migrateKitCommand, listTargets, initCommand, getTarget, getScaffoldTarget, getReadyTarget, getInitTarget, getCreatePreset, doctorCommand, createRepoCommand, TargetStatus, TargetScope, TargetId, TargetDefinition, TargetCategory, TARGET_REGISTRY, TARGET_IDS, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError, SCAFFOLD_TARGET_IDS, RepoToolingInvocation, RepoCommandIo, RepoCheckSubject, READY_TARGET_IDS, PackageJsonCheck, MigrateKitResult, MigrateKitOptions, MigrateKitError, InitStructure, InitResult, InitPresetId, InitOptions, InitError, INIT_TARGET_IDS, DoctorSummary, DoctorResult, DoctorOptions, DirectoriesCheck, DependenciesCheck, CreateRepoCommandOptions, CreateProjectPlan, CreateProjectInput, CreatePresetId, CreatePresetDefinition, CreatePlanChange, ConfigFilesCheck, CheckResult, CREATE_PRESET_IDS, CREATE_PRESETS, BunVersionCheck };
|