outfitter 0.2.6 → 0.3.2

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.
Files changed (170) hide show
  1. package/README.md +53 -28
  2. package/dist/cli.js +3 -2
  3. package/dist/index.d.ts +95 -135
  4. package/dist/index.js +8 -15
  5. package/dist/shared/{chunk-k59f60cp.js → chunk-3pwh8ys4.js} +3092 -2625
  6. package/package.json +36 -22
  7. package/dist/actions.d.ts +0 -2
  8. package/dist/actions.js +0 -34
  9. package/dist/commands/add.d.ts +0 -54
  10. package/dist/commands/add.js +0 -16
  11. package/dist/commands/check.d.ts +0 -91
  12. package/dist/commands/check.js +0 -14
  13. package/dist/commands/demo.d.ts +0 -21
  14. package/dist/commands/demo.js +0 -8
  15. package/dist/commands/docs-module-loader.d.ts +0 -2
  16. package/dist/commands/docs-module-loader.js +0 -8
  17. package/dist/commands/doctor.d.ts +0 -2
  18. package/dist/commands/doctor.js +0 -13
  19. package/dist/commands/init.d.ts +0 -7
  20. package/dist/commands/init.js +0 -31
  21. package/dist/commands/migrate-kit.d.ts +0 -2
  22. package/dist/commands/migrate-kit.js +0 -15
  23. package/dist/commands/repo.d.ts +0 -3
  24. package/dist/commands/repo.js +0 -9
  25. package/dist/commands/scaffold.d.ts +0 -4
  26. package/dist/commands/scaffold.js +0 -31
  27. package/dist/commands/shared-deps.d.ts +0 -36
  28. package/dist/commands/shared-deps.js +0 -10
  29. package/dist/commands/upgrade-codemods.d.ts +0 -42
  30. package/dist/commands/upgrade-codemods.js +0 -15
  31. package/dist/commands/upgrade-planner.d.ts +0 -58
  32. package/dist/commands/upgrade-planner.js +0 -8
  33. package/dist/commands/upgrade-workspace.d.ts +0 -76
  34. package/dist/commands/upgrade-workspace.js +0 -16
  35. package/dist/commands/upgrade.d.ts +0 -214
  36. package/dist/commands/upgrade.js +0 -25
  37. package/dist/create/index.d.ts +0 -5
  38. package/dist/create/index.js +0 -29
  39. package/dist/create/planner.d.ts +0 -3
  40. package/dist/create/planner.js +0 -21
  41. package/dist/create/presets.d.ts +0 -3
  42. package/dist/create/presets.js +0 -12
  43. package/dist/create/types.d.ts +0 -2
  44. package/dist/create/types.js +0 -1
  45. package/dist/engine/blocks.d.ts +0 -3
  46. package/dist/engine/blocks.js +0 -12
  47. package/dist/engine/collector.d.ts +0 -2
  48. package/dist/engine/collector.js +0 -8
  49. package/dist/engine/config.d.ts +0 -3
  50. package/dist/engine/config.js +0 -12
  51. package/dist/engine/executor.d.ts +0 -3
  52. package/dist/engine/executor.js +0 -16
  53. package/dist/engine/index.d.ts +0 -8
  54. package/dist/engine/index.js +0 -59
  55. package/dist/engine/names.d.ts +0 -2
  56. package/dist/engine/names.js +0 -16
  57. package/dist/engine/post-scaffold.d.ts +0 -3
  58. package/dist/engine/post-scaffold.js +0 -8
  59. package/dist/engine/render-plan.d.ts +0 -7
  60. package/dist/engine/render-plan.js +0 -9
  61. package/dist/engine/template.d.ts +0 -3
  62. package/dist/engine/template.js +0 -17
  63. package/dist/engine/types.d.ts +0 -2
  64. package/dist/engine/types.js +0 -8
  65. package/dist/engine/workspace.d.ts +0 -3
  66. package/dist/engine/workspace.js +0 -13
  67. package/dist/manifest.d.ts +0 -71
  68. package/dist/manifest.js +0 -16
  69. package/dist/output-mode.d.ts +0 -2
  70. package/dist/output-mode.js +0 -10
  71. package/dist/shared/outfitter-193jvzg4.d.ts +0 -5
  72. package/dist/shared/outfitter-1dd0k853.js +0 -194
  73. package/dist/shared/outfitter-1dvma85c.js +0 -322
  74. package/dist/shared/outfitter-1h7k8xxt.js +0 -29
  75. package/dist/shared/outfitter-2ngep1h2.d.ts +0 -5
  76. package/dist/shared/outfitter-2np85etz.js +0 -95
  77. package/dist/shared/outfitter-33w361tc.d.ts +0 -18
  78. package/dist/shared/outfitter-344t1r38.js +0 -1
  79. package/dist/shared/outfitter-3weh61w7.d.ts +0 -25
  80. package/dist/shared/outfitter-4s9meh3j.js +0 -221
  81. package/dist/shared/outfitter-66b25bj8.js +0 -125
  82. package/dist/shared/outfitter-6bkqjk86.d.ts +0 -3
  83. package/dist/shared/outfitter-79vfxt6y.js +0 -269
  84. package/dist/shared/outfitter-7ha7p61k.d.ts +0 -6
  85. package/dist/shared/outfitter-7r12fj7f.js +0 -30
  86. package/dist/shared/outfitter-8y2dfx6n.js +0 -11
  87. package/dist/shared/outfitter-9x1brcmq.js +0 -184
  88. package/dist/shared/outfitter-9zqc2njf.js +0 -859
  89. package/dist/shared/outfitter-a79xrm12.d.ts +0 -17
  90. package/dist/shared/outfitter-amc4jbs1.d.ts +0 -50
  91. package/dist/shared/outfitter-ara3djt0.js +0 -73
  92. package/dist/shared/outfitter-avhm5z6w.js +0 -82
  93. package/dist/shared/outfitter-bkwpbkr9.d.ts +0 -63
  94. package/dist/shared/outfitter-bn9c8p2e.js +0 -204
  95. package/dist/shared/outfitter-bpr28y54.js +0 -70
  96. package/dist/shared/outfitter-cwq39bv4.d.ts +0 -48
  97. package/dist/shared/outfitter-d7pq7d0k.js +0 -196
  98. package/dist/shared/outfitter-dd0btgec.d.ts +0 -40
  99. package/dist/shared/outfitter-e2zz5wv7.d.ts +0 -51
  100. package/dist/shared/outfitter-ehp18x1n.js +0 -1
  101. package/dist/shared/outfitter-gdvm5c0b.d.ts +0 -4
  102. package/dist/shared/outfitter-h1mnzzd1.d.ts +0 -14
  103. package/dist/shared/outfitter-hvsaxgcp.js +0 -1
  104. package/dist/shared/outfitter-hws10ze7.js +0 -532
  105. package/dist/shared/outfitter-j833sxws.js +0 -61
  106. package/dist/shared/outfitter-j8yc7294.d.ts +0 -22
  107. package/dist/shared/outfitter-k112c427.js +0 -21
  108. package/dist/shared/outfitter-k56rmt24.d.ts +0 -30
  109. package/dist/shared/outfitter-ksa1pp4t.d.ts +0 -4
  110. package/dist/shared/outfitter-ksyvwmb5.js +0 -191
  111. package/dist/shared/outfitter-mdt37hqm.js +0 -4
  112. package/dist/shared/outfitter-mtbpabf3.js +0 -91
  113. package/dist/shared/outfitter-mxz69pgy.js +0 -713
  114. package/dist/shared/outfitter-npemy7ta.d.ts +0 -53
  115. package/dist/shared/outfitter-npyfbdmc.d.ts +0 -6
  116. package/dist/shared/outfitter-pyy1zkfh.d.ts +0 -133
  117. package/dist/shared/outfitter-q9agarmb.js +0 -42
  118. package/dist/shared/outfitter-qfh36ddg.d.ts +0 -66
  119. package/dist/shared/outfitter-qn864k6h.js +0 -581
  120. package/dist/shared/outfitter-rdc5v5ms.js +0 -746
  121. package/dist/shared/outfitter-sgtq57qr.d.ts +0 -5
  122. package/dist/shared/outfitter-ttjr95y9.js +0 -98
  123. package/dist/shared/outfitter-vh4xgb93.js +0 -35
  124. package/dist/shared/outfitter-yvksv5qb.js +0 -322
  125. package/dist/shared/outfitter-zwyvewr1.js +0 -36
  126. package/dist/targets/index.d.ts +0 -4
  127. package/dist/targets/index.js +0 -29
  128. package/dist/targets/registry.d.ts +0 -3
  129. package/dist/targets/registry.js +0 -28
  130. package/dist/targets/types.d.ts +0 -2
  131. package/dist/targets/types.js +0 -1
  132. package/templates/.gitkeep +0 -0
  133. package/templates/basic/.gitignore.template +0 -30
  134. package/templates/basic/.lefthook.yml.template +0 -26
  135. package/templates/basic/package.json.template +0 -46
  136. package/templates/basic/src/index.ts.template +0 -26
  137. package/templates/basic/tsconfig.json.template +0 -34
  138. package/templates/cli/.gitignore.template +0 -4
  139. package/templates/cli/.lefthook.yml.template +0 -26
  140. package/templates/cli/README.md.template +0 -35
  141. package/templates/cli/biome.json.template +0 -4
  142. package/templates/cli/package.json.template +0 -45
  143. package/templates/cli/src/cli.ts.template +0 -8
  144. package/templates/cli/src/index.ts.template +0 -7
  145. package/templates/cli/src/program.ts.template +0 -31
  146. package/templates/cli/tsconfig.json.template +0 -34
  147. package/templates/daemon/.gitignore.template +0 -4
  148. package/templates/daemon/.lefthook.yml.template +0 -26
  149. package/templates/daemon/README.md.template +0 -67
  150. package/templates/daemon/biome.json.template +0 -4
  151. package/templates/daemon/package.json.template +0 -48
  152. package/templates/daemon/src/cli.ts.template +0 -96
  153. package/templates/daemon/src/daemon-main.ts.template +0 -79
  154. package/templates/daemon/src/daemon.ts.template +0 -11
  155. package/templates/daemon/src/index.ts.template +0 -7
  156. package/templates/daemon/tsconfig.json.template +0 -23
  157. package/templates/mcp/.gitignore.template +0 -4
  158. package/templates/mcp/.lefthook.yml.template +0 -26
  159. package/templates/mcp/README.md.template +0 -54
  160. package/templates/mcp/biome.json.template +0 -4
  161. package/templates/mcp/package.json.template +0 -45
  162. package/templates/mcp/src/index.ts.template +0 -7
  163. package/templates/mcp/src/mcp.ts.template +0 -79
  164. package/templates/mcp/src/server.ts.template +0 -15
  165. package/templates/mcp/tsconfig.json.template +0 -23
  166. package/templates/minimal/.gitignore.template +0 -30
  167. package/templates/minimal/.lefthook.yml.template +0 -26
  168. package/templates/minimal/package.json.template +0 -46
  169. package/templates/minimal/src/index.ts.template +0 -26
  170. package/templates/minimal/tsconfig.json.template +0 -34
@@ -1,8 +0,0 @@
1
- // @bun
2
- import {
3
- runPostScaffold
4
- } from "../shared/outfitter-4s9meh3j.js";
5
- import"../shared/outfitter-mdt37hqm.js";
6
- export {
7
- runPostScaffold
8
- };
@@ -1,7 +0,0 @@
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 };
@@ -1,9 +0,0 @@
1
- // @bun
2
- import {
3
- renderOperationPlan
4
- } from "../shared/outfitter-ttjr95y9.js";
5
- import"../shared/outfitter-7r12fj7f.js";
6
- import"../shared/outfitter-mdt37hqm.js";
7
- export {
8
- renderOperationPlan
9
- };
@@ -1,3 +0,0 @@
1
- import { copyTemplateFiles, getOutputFilename, getTemplatesDir, isBinaryFile, replacePlaceholders } from "../shared/outfitter-h1mnzzd1";
2
- import "../shared/outfitter-qfh36ddg";
3
- export { replacePlaceholders, isBinaryFile, getTemplatesDir, getOutputFilename, copyTemplateFiles };
@@ -1,17 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import { EngineCollector, EngineOptions, PlaceholderValues, ScaffoldChange, ScaffoldError, ScaffoldPlan, ScaffoldResult } from "../shared/outfitter-qfh36ddg";
2
- export { ScaffoldResult, ScaffoldPlan, ScaffoldError, ScaffoldChange, PlaceholderValues, EngineOptions, EngineCollector };
@@ -1,8 +0,0 @@
1
- // @bun
2
- import {
3
- ScaffoldError
4
- } from "../shared/outfitter-8y2dfx6n.js";
5
- import"../shared/outfitter-mdt37hqm.js";
6
- export {
7
- ScaffoldError
8
- };
@@ -1,3 +0,0 @@
1
- import { buildWorkspaceRootPackageJson, detectWorkspaceRoot, scaffoldWorkspaceRoot } from "../shared/outfitter-7ha7p61k";
2
- import "../shared/outfitter-qfh36ddg";
3
- export { scaffoldWorkspaceRoot, detectWorkspaceRoot, buildWorkspaceRootPackageJson };
@@ -1,13 +0,0 @@
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
- };
@@ -1,71 +0,0 @@
1
- import { OutfitterError, Result } from "@outfitter/contracts";
2
- import { ZodType } from "zod";
3
- /** A single block entry in the manifest. */
4
- interface BlockEntry {
5
- /** Tooling version the block was installed from. */
6
- installedFrom: string;
7
- /** ISO 8601 timestamp of when the block was installed or last updated. */
8
- installedAt: string;
9
- }
10
- /** The full manifest structure. */
11
- interface Manifest {
12
- /** Manifest format version. Currently always 1. */
13
- version: 1;
14
- /** Map of block name to install metadata. */
15
- blocks: Record<string, BlockEntry>;
16
- }
17
- /**
18
- * Schema for a single block entry in the manifest.
19
- */
20
- declare const BlockEntrySchema: ZodType<BlockEntry>;
21
- /**
22
- * Schema for the manifest file.
23
- */
24
- declare const ManifestSchema: ZodType<Manifest>;
25
- /**
26
- * Reads and validates `.outfitter/manifest.json`.
27
- *
28
- * @param cwd - Working directory containing the `.outfitter/` folder
29
- * @returns The parsed manifest, or `null` if the file does not exist
30
- *
31
- * @example
32
- * ```typescript
33
- * const result = await readManifest(process.cwd());
34
- * if (result.isOk() && result.value) {
35
- * console.log(result.value.blocks);
36
- * }
37
- * ```
38
- */
39
- declare function readManifest(cwd: string): Promise<Result<Manifest | null, OutfitterError>>;
40
- /**
41
- * Writes a manifest to `.outfitter/manifest.json`.
42
- *
43
- * Creates the `.outfitter/` directory if it does not exist.
44
- * Writes atomically via `Bun.write`.
45
- *
46
- * @param cwd - Working directory to write the manifest into
47
- * @param manifest - The manifest data to write
48
- *
49
- * @example
50
- * ```typescript
51
- * await writeManifest(process.cwd(), { version: 1, blocks: {} });
52
- * ```
53
- */
54
- declare function writeManifest(cwd: string, manifest: Manifest): Promise<Result<void, OutfitterError>>;
55
- /**
56
- * Adds or updates a block entry in the manifest (read-modify-write).
57
- *
58
- * If no manifest exists, creates a new one. If the block already exists,
59
- * updates its `installedFrom` and `installedAt` fields.
60
- *
61
- * @param cwd - Working directory containing the project
62
- * @param blockName - Name of the block to stamp
63
- * @param toolingVersion - Version of the tooling package the block was installed from
64
- *
65
- * @example
66
- * ```typescript
67
- * await stampBlock(process.cwd(), "biome", "0.2.1");
68
- * ```
69
- */
70
- declare function stampBlock(cwd: string, blockName: string, toolingVersion: string): Promise<Result<void, OutfitterError>>;
71
- export { writeManifest, stampBlock, readManifest, ManifestSchema, Manifest, BlockEntrySchema, BlockEntry };
package/dist/manifest.js DELETED
@@ -1,16 +0,0 @@
1
- // @bun
2
- import {
3
- BlockEntrySchema,
4
- ManifestSchema,
5
- readManifest,
6
- stampBlock,
7
- writeManifest
8
- } from "./shared/outfitter-mtbpabf3.js";
9
- import"./shared/outfitter-mdt37hqm.js";
10
- export {
11
- writeManifest,
12
- stampBlock,
13
- readManifest,
14
- ManifestSchema,
15
- BlockEntrySchema
16
- };
@@ -1,2 +0,0 @@
1
- import { CliOutputMode, StructuredOutputMode, resolveOutputModeFromContext, resolveStructuredOutputMode } from "./shared/outfitter-a79xrm12";
2
- export { resolveStructuredOutputMode, resolveOutputModeFromContext, StructuredOutputMode, CliOutputMode };
@@ -1,10 +0,0 @@
1
- // @bun
2
- import {
3
- resolveOutputModeFromContext,
4
- resolveStructuredOutputMode
5
- } from "./shared/outfitter-7r12fj7f.js";
6
- import"./shared/outfitter-mdt37hqm.js";
7
- export {
8
- resolveStructuredOutputMode,
9
- resolveOutputModeFromContext
10
- };
@@ -1,5 +0,0 @@
1
- import { EngineOptions, ScaffoldError } from "./outfitter-qfh36ddg";
2
- import { Result } from "@outfitter/contracts";
3
- import { AddBlockResult } from "@outfitter/tooling";
4
- declare function addBlocks(targetDir: string, blocks: readonly string[], options: EngineOptions): Promise<Result<AddBlockResult, ScaffoldError>>;
5
- export { addBlocks };
@@ -1,194 +0,0 @@
1
- // @bun
2
- // apps/outfitter/src/targets/registry.ts
3
- import { NotFoundError, Result, ValidationError } from "@outfitter/contracts";
4
- var TARGET_ALIASES = new Map([
5
- ["basic", "minimal"]
6
- ]);
7
- var TARGET_REGISTRY = new Map([
8
- [
9
- "minimal",
10
- {
11
- id: "minimal",
12
- description: "Minimal Bun + TypeScript project",
13
- category: "library",
14
- placement: "packages",
15
- templateDir: "minimal",
16
- defaultBlocks: ["scaffolding"],
17
- status: "ready",
18
- scope: "init-only"
19
- }
20
- ],
21
- [
22
- "cli",
23
- {
24
- id: "cli",
25
- description: "CLI application with Outfitter command ergonomics",
26
- category: "runnable",
27
- placement: "apps",
28
- templateDir: "cli",
29
- defaultBlocks: ["scaffolding"],
30
- status: "ready",
31
- scope: "both"
32
- }
33
- ],
34
- [
35
- "mcp",
36
- {
37
- id: "mcp",
38
- description: "MCP server with typed tools and action registry",
39
- category: "runnable",
40
- placement: "apps",
41
- templateDir: "mcp",
42
- defaultBlocks: ["scaffolding"],
43
- status: "ready",
44
- scope: "both"
45
- }
46
- ],
47
- [
48
- "daemon",
49
- {
50
- id: "daemon",
51
- description: "Background daemon with control CLI",
52
- category: "runnable",
53
- placement: "apps",
54
- templateDir: "daemon",
55
- defaultBlocks: ["scaffolding"],
56
- status: "ready",
57
- scope: "both"
58
- }
59
- ],
60
- [
61
- "api",
62
- {
63
- id: "api",
64
- description: "HTTP API server (Hono)",
65
- category: "runnable",
66
- placement: "apps",
67
- templateDir: "api",
68
- defaultBlocks: ["scaffolding"],
69
- status: "stub",
70
- scope: "both"
71
- }
72
- ],
73
- [
74
- "worker",
75
- {
76
- id: "worker",
77
- description: "Background job worker",
78
- category: "runnable",
79
- placement: "apps",
80
- templateDir: "worker",
81
- defaultBlocks: ["scaffolding"],
82
- status: "stub",
83
- scope: "both"
84
- }
85
- ],
86
- [
87
- "web",
88
- {
89
- id: "web",
90
- description: "Web application (TanStack Start)",
91
- category: "runnable",
92
- placement: "apps",
93
- templateDir: "web",
94
- defaultBlocks: ["scaffolding"],
95
- status: "stub",
96
- scope: "both"
97
- }
98
- ],
99
- [
100
- "lib",
101
- {
102
- id: "lib",
103
- description: "Shared library package",
104
- category: "library",
105
- placement: "packages",
106
- templateDir: "lib",
107
- defaultBlocks: ["scaffolding"],
108
- status: "stub",
109
- scope: "both"
110
- }
111
- ]
112
- ]);
113
- var TARGET_IDS = [...TARGET_REGISTRY.keys()];
114
- var READY_TARGET_IDS = TARGET_IDS.filter((id) => TARGET_REGISTRY.get(id)?.status === "ready");
115
- var INIT_TARGET_IDS = TARGET_IDS.filter((id) => {
116
- const target = TARGET_REGISTRY.get(id);
117
- return target?.status === "ready" && target.scope !== "scaffold-only";
118
- });
119
- var SCAFFOLD_TARGET_IDS = TARGET_IDS.filter((id) => {
120
- const target = TARGET_REGISTRY.get(id);
121
- return target?.status === "ready" && target.scope !== "init-only";
122
- });
123
- function getTarget(id) {
124
- const resolvedId = TARGET_ALIASES.get(id) ?? id;
125
- const target = TARGET_REGISTRY.get(resolvedId);
126
- if (!target) {
127
- return Result.err(new NotFoundError({
128
- message: `Unknown target '${id}'. Available targets: ${TARGET_IDS.join(", ")}`,
129
- resourceType: "target",
130
- resourceId: id
131
- }));
132
- }
133
- return Result.ok(target);
134
- }
135
- function getReadyTarget(id) {
136
- const targetResult = getTarget(id);
137
- if (targetResult.isErr()) {
138
- return targetResult;
139
- }
140
- const target = targetResult.value;
141
- if (target.status === "stub") {
142
- return Result.err(new ValidationError({
143
- message: `Target '${id}' is not yet available. ` + "It is planned but the template has not been implemented. " + `Ready targets: ${READY_TARGET_IDS.join(", ")}`,
144
- field: "target"
145
- }));
146
- }
147
- return Result.ok(target);
148
- }
149
- function getInitTarget(id) {
150
- const targetResult = getReadyTarget(id);
151
- if (targetResult.isErr()) {
152
- return targetResult;
153
- }
154
- const target = targetResult.value;
155
- if (target.scope === "scaffold-only") {
156
- return Result.err(new ValidationError({
157
- message: `Target '${id}' cannot be used with init. Use 'outfitter scaffold ${id}' instead.`,
158
- field: "target"
159
- }));
160
- }
161
- return Result.ok(target);
162
- }
163
- function getScaffoldTarget(id) {
164
- const targetResult = getReadyTarget(id);
165
- if (targetResult.isErr()) {
166
- return targetResult;
167
- }
168
- const target = targetResult.value;
169
- if (target.scope === "init-only") {
170
- return Result.err(new ValidationError({
171
- message: `Target '${id}' cannot be scaffolded into an existing project. ` + `It is only available for new project creation via 'outfitter init'.`,
172
- field: "target"
173
- }));
174
- }
175
- return Result.ok(target);
176
- }
177
- function resolvePlacement(target) {
178
- return target.placement;
179
- }
180
- function listTargets(filter) {
181
- let targets = [...TARGET_REGISTRY.values()];
182
- if (filter?.status) {
183
- targets = targets.filter((target) => target.status === filter.status);
184
- }
185
- if (filter?.scope) {
186
- targets = targets.filter((target) => target.scope === filter.scope);
187
- }
188
- if (filter?.category) {
189
- targets = targets.filter((target) => target.category === filter.category);
190
- }
191
- return targets;
192
- }
193
-
194
- export { TARGET_REGISTRY, TARGET_IDS, READY_TARGET_IDS, INIT_TARGET_IDS, SCAFFOLD_TARGET_IDS, getTarget, getReadyTarget, getInitTarget, getScaffoldTarget, resolvePlacement, listTargets };