@pixpilot/scaffoldfy 0.29.2 → 0.30.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/README.md +4 -4
- package/dist/chunk-DjWAcSYV.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +86 -9
- package/dist/index.d.ts +86 -9
- package/dist/index.js +1 -1
- package/dist/run-tasks-BZwbB2B0.cjs +1 -0
- package/dist/run-tasks-C6Bkzhq7.cjs +26 -0
- package/dist/run-tasks-D5KLV8Tk.js +26 -0
- package/dist/run-tasks-DhVlAr4C.js +1 -0
- package/dist/src-CmBriDDR.cjs +1 -0
- package/dist/{src-DcsCaCmY.js → src-DbtBS6he.js} +1 -1
- package/dist/utils-Bn-L1Fmr.cjs +1 -0
- package/dist/{utils-C3bHtTZl.js → utils-CmYva5oB.js} +1 -1
- package/dist/utils-DjBGLPnu.cjs +1 -0
- package/dist/utils-Dsr6AHpq.js +1 -0
- package/dist/validate-scaffoldfy-json.cjs +3 -0
- package/dist/validate-scaffoldfy-json.d.cts +1 -0
- package/dist/validate-scaffoldfy-json.d.ts +1 -0
- package/dist/validate-scaffoldfy-json.js +3 -0
- package/package.json +7 -5
- package/schema/{tasks.schema.json → scaffoldfy.schema.json} +417 -153
- package/dist/run-tasks-BPiZCUDh.cjs +0 -26
- package/dist/run-tasks-BwR-eZSD.cjs +0 -1
- package/dist/run-tasks-CzHOfpfu.js +0 -26
- package/dist/run-tasks-DfX2OfFK.js +0 -1
- package/dist/src-DJXRbf0z.cjs +0 -1
- package/dist/utils-BGOPmydq.cjs +0 -1
- package/dist/utils-BeqQVvh1.cjs +0 -1
- package/dist/utils-ChEwzXBK.js +0 -1
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Detailed description of what this Write does"
|
|
21
21
|
},
|
|
22
22
|
"enabled": {
|
|
23
|
-
"description": "Whether this
|
|
23
|
+
"description": "Whether this item should be executed/displayed. Can be a boolean, a string expression, or an object with executable or conditional configuration (optional, defaults to true).",
|
|
24
24
|
"default": true,
|
|
25
25
|
"oneOf": [
|
|
26
26
|
{
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"type": "string",
|
|
32
|
-
"description": "JavaScript expression to evaluate.
|
|
32
|
+
"description": "JavaScript expression to evaluate."
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"type": "object",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"properties": {
|
|
39
39
|
"condition": {
|
|
40
40
|
"type": "string",
|
|
41
|
-
"description": "JavaScript expression to evaluate.
|
|
41
|
+
"description": "JavaScript expression to evaluate."
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
},
|
|
@@ -60,6 +60,11 @@
|
|
|
60
60
|
}
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
+
"transformers": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"description": "Array of transformer definitions",
|
|
66
|
+
"items": { "$ref": "#/$defs/transformerItem" }
|
|
67
|
+
},
|
|
63
68
|
"dependencies": {
|
|
64
69
|
"type": "array",
|
|
65
70
|
"items": {
|
|
@@ -117,57 +122,13 @@
|
|
|
117
122
|
"description": "Whether failure of this task should stop the process (optional, defaults to true)",
|
|
118
123
|
"default": true
|
|
119
124
|
},
|
|
120
|
-
"enabled": {
|
|
121
|
-
"description": "Whether this task should be executed. Can be a boolean, a string expression, or an object with executable or conditional configuration (optional, defaults to true).",
|
|
122
|
-
"default": true,
|
|
123
|
-
"oneOf": [
|
|
124
|
-
{
|
|
125
|
-
"type": "boolean",
|
|
126
|
-
"description": "Static enabled state"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"type": "string",
|
|
130
|
-
"description": "JavaScript expression to evaluate. Task only executes if expression evaluates to true."
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"type": "object",
|
|
134
|
-
"description": "Conditional enabled configuration",
|
|
135
|
-
"required": ["condition"],
|
|
136
|
-
"properties": {
|
|
137
|
-
"condition": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"description": "JavaScript expression to evaluate. Task only executes if condition evaluates to true. Has access to all variables and prompt values."
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"type": "object",
|
|
145
|
-
"description": "Executable enabled configuration - determines enabled state by running a command",
|
|
146
|
-
"required": ["type", "value"],
|
|
147
|
-
"properties": {
|
|
148
|
-
"type": {
|
|
149
|
-
"type": "string",
|
|
150
|
-
"enum": ["exec"],
|
|
151
|
-
"description": "Type of enabled value. 'exec' executes a shell command to determine enabled state."
|
|
152
|
-
},
|
|
153
|
-
"value": {
|
|
154
|
-
"type": "string",
|
|
155
|
-
"description": "Shell command to execute. The command output will be trimmed and parsed as a boolean. Non-empty output or '1', 'true', 'yes' (case-insensitive) evaluates to true."
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
]
|
|
160
|
-
},
|
|
125
|
+
"enabled": { "$ref": "#/$defs/enabled" },
|
|
161
126
|
"dependencies": {
|
|
162
127
|
"type": "array",
|
|
163
128
|
"items": { "type": "string" },
|
|
164
129
|
"description": "IDs of tasks that must run before this one"
|
|
165
130
|
},
|
|
166
|
-
"override": {
|
|
167
|
-
"type": "string",
|
|
168
|
-
"enum": ["merge", "replace"],
|
|
169
|
-
"description": "Strategy for merging with base task when extending templates"
|
|
170
|
-
},
|
|
131
|
+
"override": { "$ref": "#/$defs/override" },
|
|
171
132
|
"$sourceUrl": { "type": "string" },
|
|
172
133
|
"type": {
|
|
173
134
|
"type": "string",
|
|
@@ -180,7 +141,11 @@
|
|
|
180
141
|
"delete",
|
|
181
142
|
"rename",
|
|
182
143
|
"git-init",
|
|
183
|
-
"exec"
|
|
144
|
+
"exec",
|
|
145
|
+
"move",
|
|
146
|
+
"copy",
|
|
147
|
+
"append",
|
|
148
|
+
"mkdir"
|
|
184
149
|
],
|
|
185
150
|
"description": "Type of task to execute"
|
|
186
151
|
},
|
|
@@ -243,12 +208,109 @@
|
|
|
243
208
|
"type": { "const": "exec" },
|
|
244
209
|
"config": { "$ref": "#/$defs/config-exec" }
|
|
245
210
|
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"properties": {
|
|
214
|
+
"type": { "const": "move" },
|
|
215
|
+
"config": { "$ref": "#/$defs/config-move" }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"properties": {
|
|
220
|
+
"type": { "const": "copy" },
|
|
221
|
+
"config": { "$ref": "#/$defs/config-copy" }
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"properties": {
|
|
226
|
+
"type": { "const": "append" },
|
|
227
|
+
"config": { "$ref": "#/$defs/config-append" }
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"properties": {
|
|
232
|
+
"type": { "const": "mkdir" },
|
|
233
|
+
"config": { "$ref": "#/$defs/config-mkdir" }
|
|
234
|
+
}
|
|
246
235
|
}
|
|
247
236
|
]
|
|
248
237
|
}
|
|
249
238
|
}
|
|
250
239
|
},
|
|
251
240
|
"$defs": {
|
|
241
|
+
"builtInTransformers": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"enum": [
|
|
244
|
+
"lowercase",
|
|
245
|
+
"uppercase",
|
|
246
|
+
"trim",
|
|
247
|
+
"slugify",
|
|
248
|
+
"capitalize",
|
|
249
|
+
"titlecase",
|
|
250
|
+
"camelcase",
|
|
251
|
+
"pascalcase",
|
|
252
|
+
"snakecase",
|
|
253
|
+
"kebabcase",
|
|
254
|
+
"constantcase",
|
|
255
|
+
"alphanumeric",
|
|
256
|
+
"collapse-spaces",
|
|
257
|
+
"remove-spaces",
|
|
258
|
+
"urlencode",
|
|
259
|
+
"dasherize",
|
|
260
|
+
"underscore"
|
|
261
|
+
],
|
|
262
|
+
"description": "Built-in transformer ID"
|
|
263
|
+
},
|
|
264
|
+
"enabled": {
|
|
265
|
+
"description": "Whether this item should be executed/displayed. Can be a boolean, a string expression, or an object with executable or conditional configuration (optional, defaults to true).",
|
|
266
|
+
"default": true,
|
|
267
|
+
"oneOf": [
|
|
268
|
+
{
|
|
269
|
+
"type": "boolean",
|
|
270
|
+
"description": "Static enabled state"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "JavaScript expression to evaluate."
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "object",
|
|
278
|
+
"description": "Conditional enabled configuration",
|
|
279
|
+
"required": ["condition"],
|
|
280
|
+
"properties": {
|
|
281
|
+
"condition": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"description": "JavaScript expression to evaluate."
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "object",
|
|
289
|
+
"description": "Executable enabled configuration - determines enabled state by running a command",
|
|
290
|
+
"required": ["type", "value"],
|
|
291
|
+
"properties": {
|
|
292
|
+
"type": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"enum": ["exec"],
|
|
295
|
+
"description": "Type of enabled value. 'exec' executes a shell command to determine enabled state."
|
|
296
|
+
},
|
|
297
|
+
"value": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "Shell command to execute. The command output will be trimmed and parsed as a boolean. Non-empty output or '1', 'true', 'yes' (case-insensitive) evaluates to true."
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"condition": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
308
|
+
},
|
|
309
|
+
"override": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"enum": ["merge", "replace"],
|
|
312
|
+
"description": "Strategy for merging with base item when extending templates"
|
|
313
|
+
},
|
|
252
314
|
"promptItem": {
|
|
253
315
|
"type": "object",
|
|
254
316
|
"required": ["id", "type", "message"],
|
|
@@ -272,65 +334,27 @@
|
|
|
272
334
|
"type": "boolean",
|
|
273
335
|
"description": "Whether the prompt value is required (cannot be empty)"
|
|
274
336
|
},
|
|
275
|
-
"enabled": {
|
|
276
|
-
"description": "Whether this prompt should be displayed. Can be a boolean, a string expression, or an object with executable or conditional configuration (optional, defaults to true). If false or condition evaluates to false, the prompt will be skipped.",
|
|
277
|
-
"default": true,
|
|
278
|
-
"oneOf": [
|
|
279
|
-
{
|
|
280
|
-
"type": "boolean",
|
|
281
|
-
"description": "Static enabled state"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"type": "string",
|
|
285
|
-
"description": "JavaScript expression to evaluate (shorthand for { condition: \"...\" }). Prompt only displays if expression evaluates to true."
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"type": "object",
|
|
289
|
-
"description": "Conditional enabled configuration",
|
|
290
|
-
"required": ["condition"],
|
|
291
|
-
"properties": {
|
|
292
|
-
"condition": {
|
|
293
|
-
"type": "string",
|
|
294
|
-
"description": "JavaScript expression to evaluate. Prompt only displays if condition evaluates to true. Has access to all variables and previously collected prompts."
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"type": "object",
|
|
300
|
-
"description": "Executable enabled configuration - determines enabled state by running a command",
|
|
301
|
-
"required": ["type", "value"],
|
|
302
|
-
"properties": {
|
|
303
|
-
"type": {
|
|
304
|
-
"type": "string",
|
|
305
|
-
"enum": ["exec"],
|
|
306
|
-
"description": "Type of enabled value. 'exec' executes a shell command to determine enabled state."
|
|
307
|
-
},
|
|
308
|
-
"value": {
|
|
309
|
-
"type": "string",
|
|
310
|
-
"description": "Shell command to execute. The command output will be trimmed and parsed as a boolean. Non-empty output or '1', 'true', 'yes' (case-insensitive) evaluates to true."
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
]
|
|
315
|
-
},
|
|
337
|
+
"enabled": { "$ref": "#/$defs/enabled" },
|
|
316
338
|
"default": {
|
|
317
339
|
"description": "Default value for the prompt. Can be a static value, an object with 'type' and 'value' properties for executable defaults, or a conditional default configuration.",
|
|
318
340
|
"oneOf": [
|
|
319
341
|
{
|
|
342
|
+
"type": ["string", "number", "boolean"],
|
|
320
343
|
"description": "Static default value (string, number, or boolean)"
|
|
321
344
|
},
|
|
322
345
|
{
|
|
323
346
|
"type": "object",
|
|
324
|
-
"description": "Default value configuration for
|
|
347
|
+
"description": "Default value configuration for executable or interpolate values",
|
|
325
348
|
"required": ["type", "value"],
|
|
349
|
+
"additionalProperties": false,
|
|
326
350
|
"properties": {
|
|
327
351
|
"type": {
|
|
328
352
|
"type": "string",
|
|
329
|
-
"enum": ["static", "exec"],
|
|
330
|
-
"description": "Type of default value. 'static' for explicit static values, 'exec' for command execution."
|
|
353
|
+
"enum": ["static", "exec", "interpolate"],
|
|
354
|
+
"description": "Type of default value. 'static' for explicit static values, 'exec' for command execution, 'interpolate' for interpolate strings with {{variable}} placeholders."
|
|
331
355
|
},
|
|
332
356
|
"value": {
|
|
333
|
-
"description": "For 'static' type: the static value. For 'exec' type: the shell command to execute. Commands can be any shell command including git, npm, node, etc. The command output will be trimmed and auto-parsed as JSON, number, or boolean when applicable."
|
|
357
|
+
"description": "For 'static' type: the static value. For 'exec' type: the shell command to execute. For 'interpolate' type: interpolate string with {{variable}} placeholders. Commands can be any shell command including git, npm, node, etc. The command output will be trimmed and auto-parsed as JSON, number, or boolean when applicable."
|
|
334
358
|
}
|
|
335
359
|
}
|
|
336
360
|
},
|
|
@@ -338,6 +362,7 @@
|
|
|
338
362
|
"type": "object",
|
|
339
363
|
"description": "Conditional default value configuration",
|
|
340
364
|
"required": ["type", "condition", "ifTrue", "ifFalse"],
|
|
365
|
+
"additionalProperties": false,
|
|
341
366
|
"properties": {
|
|
342
367
|
"type": {
|
|
343
368
|
"type": "string",
|
|
@@ -349,10 +374,10 @@
|
|
|
349
374
|
"description": "JavaScript expression to evaluate. Can reference variables, prompts, and config values."
|
|
350
375
|
},
|
|
351
376
|
"ifTrue": {
|
|
352
|
-
"description": "Value to use if condition evaluates to true. Can be a static value or
|
|
377
|
+
"description": "Value to use if condition evaluates to true. Can be a static value or an object with type property for interpolation (e.g., { type: 'interpolate', value: '{{variable}}' })."
|
|
353
378
|
},
|
|
354
379
|
"ifFalse": {
|
|
355
|
-
"description": "Value to use if condition evaluates to false. Can be a static value or
|
|
380
|
+
"description": "Value to use if condition evaluates to false. Can be a static value or an object with type property for interpolation (e.g., { type: 'interpolate', value: '{{variable}}' })."
|
|
356
381
|
}
|
|
357
382
|
}
|
|
358
383
|
}
|
|
@@ -383,6 +408,19 @@
|
|
|
383
408
|
}
|
|
384
409
|
}
|
|
385
410
|
},
|
|
411
|
+
"transformers": {
|
|
412
|
+
"description": "Array of transformer(s) to apply to the prompt value after input. Each item can be a built-in transformer ID or a custom transformer ID.",
|
|
413
|
+
"type": "array",
|
|
414
|
+
"items": {
|
|
415
|
+
"anyOf": [
|
|
416
|
+
{ "$ref": "#/$defs/builtInTransformers" },
|
|
417
|
+
{
|
|
418
|
+
"type": "string",
|
|
419
|
+
"description": "Custom transformer ID (references a transformer defined in the 'transformers' array)"
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
},
|
|
386
424
|
"override": {
|
|
387
425
|
"type": "string",
|
|
388
426
|
"enum": ["merge", "replace"],
|
|
@@ -404,37 +442,29 @@
|
|
|
404
442
|
"description": "Variable value. Can be a static value or an object with 'type' and 'value' properties for executable values, or a conditional configuration.",
|
|
405
443
|
"oneOf": [
|
|
406
444
|
{
|
|
445
|
+
"type": ["string", "number", "boolean"],
|
|
407
446
|
"description": "Static value (string, number, or boolean)"
|
|
408
447
|
},
|
|
409
448
|
{
|
|
410
449
|
"type": "object",
|
|
411
|
-
"description": "Value configuration for static, executable, or
|
|
450
|
+
"description": "Value configuration for static, executable, or interpolate values",
|
|
412
451
|
"required": ["type"],
|
|
452
|
+
"additionalProperties": false,
|
|
413
453
|
"properties": {
|
|
414
454
|
"type": {
|
|
415
455
|
"type": "string",
|
|
416
|
-
"enum": ["static", "exec", "
|
|
417
|
-
"description": "Type of value. 'static' for explicit static values, 'exec' for command execution, '
|
|
456
|
+
"enum": ["static", "exec", "interpolate"],
|
|
457
|
+
"description": "Type of value. 'static' for explicit static values, 'exec' for command execution, 'interpolate' for interpolate strings with {{variable}} placeholders."
|
|
418
458
|
},
|
|
419
459
|
"value": {
|
|
420
|
-
"description": "For 'static' type: the static value. For 'exec' type: the shell command to execute. Commands output will be trimmed and auto-parsed as JSON, number, or boolean when applicable.
|
|
421
|
-
},
|
|
422
|
-
"condition": {
|
|
423
|
-
"type": "string",
|
|
424
|
-
"description": "For 'conditional' type: JavaScript expression to evaluate. Can reference other variables, prompts, and config values."
|
|
425
|
-
},
|
|
426
|
-
"ifTrue": {
|
|
427
|
-
"description": "For 'conditional' type: Value to use if condition evaluates to true. Can be a static value or a template string with {{variables}}."
|
|
428
|
-
},
|
|
429
|
-
"ifFalse": {
|
|
430
|
-
"description": "For 'conditional' type: Value to use if condition evaluates to false. Can be a static value or a template string with {{variables}}."
|
|
460
|
+
"description": "For 'static' type: the static value. For 'exec' type: the shell command to execute. For 'interpolate' type: interpolate string with {{variable}} placeholders. Commands output will be trimmed and auto-parsed as JSON, number, or boolean when applicable."
|
|
431
461
|
}
|
|
432
462
|
},
|
|
433
463
|
"allOf": [
|
|
434
464
|
{
|
|
435
465
|
"if": {
|
|
436
466
|
"properties": {
|
|
437
|
-
"type": { "enum": ["static", "exec"] }
|
|
467
|
+
"type": { "enum": ["static", "exec", "interpolate"] }
|
|
438
468
|
}
|
|
439
469
|
},
|
|
440
470
|
"then": {
|
|
@@ -455,21 +485,47 @@
|
|
|
455
485
|
}
|
|
456
486
|
}
|
|
457
487
|
}
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"if": {
|
|
461
|
-
"properties": {
|
|
462
|
-
"type": { "const": "conditional" }
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
"then": {
|
|
466
|
-
"required": ["condition", "ifTrue", "ifFalse"]
|
|
467
|
-
}
|
|
468
488
|
}
|
|
469
489
|
]
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"type": "object",
|
|
493
|
+
"description": "Conditional value configuration",
|
|
494
|
+
"required": ["type", "condition", "ifTrue", "ifFalse"],
|
|
495
|
+
"additionalProperties": false,
|
|
496
|
+
"properties": {
|
|
497
|
+
"type": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"enum": ["conditional"],
|
|
500
|
+
"description": "Type of value. 'conditional' for condition-based values."
|
|
501
|
+
},
|
|
502
|
+
"condition": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "JavaScript expression to evaluate. Can reference other variables, prompts, and config values."
|
|
505
|
+
},
|
|
506
|
+
"ifTrue": {
|
|
507
|
+
"description": "Value to use if condition evaluates to true. Can be a static value or an object with type property for interpolation (e.g., { type: 'interpolate', value: '{{variable}}' })."
|
|
508
|
+
},
|
|
509
|
+
"ifFalse": {
|
|
510
|
+
"description": "Value to use if condition evaluates to false. Can be a static value or an object with type property for interpolation (e.g., { type: 'interpolate', value: '{{variable}}' })."
|
|
511
|
+
}
|
|
512
|
+
}
|
|
470
513
|
}
|
|
471
514
|
]
|
|
472
515
|
},
|
|
516
|
+
"transformers": {
|
|
517
|
+
"description": "Array of transformer(s) to apply to the variable value after resolution. Each item can be a built-in transformer ID or a custom transformer ID.",
|
|
518
|
+
"type": "array",
|
|
519
|
+
"items": {
|
|
520
|
+
"anyOf": [
|
|
521
|
+
{ "$ref": "#/$defs/builtInTransformers" },
|
|
522
|
+
{
|
|
523
|
+
"type": "string",
|
|
524
|
+
"description": "Custom transformer ID (references a transformer defined in the 'transformers' array)"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
},
|
|
473
529
|
"override": {
|
|
474
530
|
"type": "string",
|
|
475
531
|
"enum": ["merge", "replace"],
|
|
@@ -477,6 +533,150 @@
|
|
|
477
533
|
}
|
|
478
534
|
}
|
|
479
535
|
},
|
|
536
|
+
"transformerItem": {
|
|
537
|
+
"type": "object",
|
|
538
|
+
"required": ["id", "type"],
|
|
539
|
+
"additionalProperties": false,
|
|
540
|
+
"properties": {
|
|
541
|
+
"id": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"description": "Unique identifier for the transformer"
|
|
544
|
+
},
|
|
545
|
+
"name": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"description": "Optional display name for the transformer"
|
|
548
|
+
},
|
|
549
|
+
"description": {
|
|
550
|
+
"type": "string",
|
|
551
|
+
"description": "Optional description for the transformer"
|
|
552
|
+
},
|
|
553
|
+
"type": {
|
|
554
|
+
"type": "string",
|
|
555
|
+
"enum": [
|
|
556
|
+
"regex",
|
|
557
|
+
"computed",
|
|
558
|
+
"lowercase",
|
|
559
|
+
"uppercase",
|
|
560
|
+
"trim",
|
|
561
|
+
"slugify",
|
|
562
|
+
"capitalize",
|
|
563
|
+
"titlecase",
|
|
564
|
+
"camelcase",
|
|
565
|
+
"pascalcase",
|
|
566
|
+
"snakecase",
|
|
567
|
+
"kebabcase",
|
|
568
|
+
"constantcase",
|
|
569
|
+
"alphanumeric",
|
|
570
|
+
"collapse-spaces",
|
|
571
|
+
"remove-spaces",
|
|
572
|
+
"urlencode",
|
|
573
|
+
"dasherize",
|
|
574
|
+
"underscore",
|
|
575
|
+
"custom",
|
|
576
|
+
"chain"
|
|
577
|
+
],
|
|
578
|
+
"description": "Type of transformer"
|
|
579
|
+
},
|
|
580
|
+
"config": {
|
|
581
|
+
"type": "object",
|
|
582
|
+
"description": "Configuration specific to transformer type"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
"oneOf": [
|
|
586
|
+
{
|
|
587
|
+
"required": ["type"],
|
|
588
|
+
"properties": {
|
|
589
|
+
"type": { "const": "regex" },
|
|
590
|
+
"config": {
|
|
591
|
+
"type": "object",
|
|
592
|
+
"required": ["pattern", "replacement"],
|
|
593
|
+
"additionalProperties": false,
|
|
594
|
+
"properties": {
|
|
595
|
+
"pattern": {
|
|
596
|
+
"type": "string",
|
|
597
|
+
"description": "Regular expression pattern"
|
|
598
|
+
},
|
|
599
|
+
"flags": {
|
|
600
|
+
"type": "string",
|
|
601
|
+
"description": "Regex flags (g, i, m, etc.)",
|
|
602
|
+
"default": ""
|
|
603
|
+
},
|
|
604
|
+
"replacement": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"description": "Replacement string (can use $1, $2, etc.)"
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"required": ["type"],
|
|
614
|
+
"properties": {
|
|
615
|
+
"type": { "const": "computed" },
|
|
616
|
+
"config": {
|
|
617
|
+
"type": "object",
|
|
618
|
+
"required": ["expression"],
|
|
619
|
+
"additionalProperties": false,
|
|
620
|
+
"properties": {
|
|
621
|
+
"expression": {
|
|
622
|
+
"type": "string",
|
|
623
|
+
"description": "JavaScript expression to compute the transformed value"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"required": ["type"],
|
|
631
|
+
"properties": {
|
|
632
|
+
"type": { "const": "custom" },
|
|
633
|
+
"config": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"required": ["handler"],
|
|
636
|
+
"additionalProperties": false,
|
|
637
|
+
"properties": {
|
|
638
|
+
"handler": {
|
|
639
|
+
"oneOf": [
|
|
640
|
+
{ "type": "string", "description": "Function code as string" },
|
|
641
|
+
{ "instanceof": "Function", "description": "Function object" }
|
|
642
|
+
],
|
|
643
|
+
"description": "Custom transformation function"
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"required": ["type"],
|
|
651
|
+
"properties": {
|
|
652
|
+
"type": { "const": "chain" },
|
|
653
|
+
"config": {
|
|
654
|
+
"type": "object",
|
|
655
|
+
"required": ["transformers"],
|
|
656
|
+
"additionalProperties": false,
|
|
657
|
+
"properties": {
|
|
658
|
+
"transformers": {
|
|
659
|
+
"type": "array",
|
|
660
|
+
"items": { "type": "string" },
|
|
661
|
+
"description": "Array of transformer IDs to execute in sequence"
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"required": ["type"],
|
|
669
|
+
"properties": {
|
|
670
|
+
"type": { "$ref": "#/$defs/builtInTransformers" },
|
|
671
|
+
"config": {
|
|
672
|
+
"type": "object",
|
|
673
|
+
"additionalProperties": false,
|
|
674
|
+
"properties": {}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
},
|
|
480
680
|
"config-update-json": {
|
|
481
681
|
"title": "Update JSON Config",
|
|
482
682
|
"type": "object",
|
|
@@ -490,10 +690,7 @@
|
|
|
490
690
|
"type": "object",
|
|
491
691
|
"description": "Key-value pairs to update (supports nested paths with dot notation)"
|
|
492
692
|
},
|
|
493
|
-
"condition": {
|
|
494
|
-
"type": "string",
|
|
495
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
496
|
-
}
|
|
693
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
497
694
|
},
|
|
498
695
|
"required": ["file", "updates"]
|
|
499
696
|
},
|
|
@@ -514,10 +711,7 @@
|
|
|
514
711
|
"type": "string",
|
|
515
712
|
"description": "Path to external template file (relative to project root). Files with .hbs extension automatically use Handlebars templating. Cannot be used with template."
|
|
516
713
|
},
|
|
517
|
-
"condition": {
|
|
518
|
-
"type": "string",
|
|
519
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
520
|
-
},
|
|
714
|
+
"condition": { "$ref": "#/$defs/condition" },
|
|
521
715
|
"allowCreate": {
|
|
522
716
|
"type": "boolean",
|
|
523
717
|
"description": "Whether to allow creating the file if it does not exist. Defaults to true.",
|
|
@@ -551,10 +745,7 @@
|
|
|
551
745
|
"type": "string",
|
|
552
746
|
"description": "Path to external Write file (relative to project root). Files with .hbs extension automatically use Handlebars templating. Cannot be used with template."
|
|
553
747
|
},
|
|
554
|
-
"condition": {
|
|
555
|
-
"type": "string",
|
|
556
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
557
|
-
}
|
|
748
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
558
749
|
},
|
|
559
750
|
"required": ["file"],
|
|
560
751
|
"oneOf": [
|
|
@@ -587,10 +778,7 @@
|
|
|
587
778
|
"type": "string",
|
|
588
779
|
"description": "String to replace matches with"
|
|
589
780
|
},
|
|
590
|
-
"condition": {
|
|
591
|
-
"type": "string",
|
|
592
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
593
|
-
}
|
|
781
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
594
782
|
},
|
|
595
783
|
"required": ["file", "pattern", "replacement"]
|
|
596
784
|
},
|
|
@@ -620,10 +808,7 @@
|
|
|
620
808
|
"required": ["find", "replace"]
|
|
621
809
|
}
|
|
622
810
|
},
|
|
623
|
-
"condition": {
|
|
624
|
-
"type": "string",
|
|
625
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
626
|
-
}
|
|
811
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
627
812
|
},
|
|
628
813
|
"required": ["file", "replacements"]
|
|
629
814
|
},
|
|
@@ -659,10 +844,7 @@
|
|
|
659
844
|
"type": "string",
|
|
660
845
|
"description": "New file or directory path"
|
|
661
846
|
},
|
|
662
|
-
"condition": {
|
|
663
|
-
"type": "string",
|
|
664
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
665
|
-
}
|
|
847
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
666
848
|
},
|
|
667
849
|
"required": ["from", "to"]
|
|
668
850
|
},
|
|
@@ -683,10 +865,7 @@
|
|
|
683
865
|
"type": "string",
|
|
684
866
|
"description": "Initial commit message"
|
|
685
867
|
},
|
|
686
|
-
"condition": {
|
|
687
|
-
"type": "string",
|
|
688
|
-
"description": "Optional JavaScript expression to evaluate. Task only executes if condition evaluates to true."
|
|
689
|
-
}
|
|
868
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
690
869
|
},
|
|
691
870
|
"required": ["removeExisting", "initialCommit"]
|
|
692
871
|
},
|
|
@@ -703,12 +882,97 @@
|
|
|
703
882
|
"type": "string",
|
|
704
883
|
"description": "Working directory for the command"
|
|
705
884
|
},
|
|
706
|
-
"condition": {
|
|
885
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
886
|
+
},
|
|
887
|
+
"required": ["command"]
|
|
888
|
+
},
|
|
889
|
+
"config-move": {
|
|
890
|
+
"title": "Move Config",
|
|
891
|
+
"type": "object",
|
|
892
|
+
"additionalProperties": false,
|
|
893
|
+
"properties": {
|
|
894
|
+
"from": {
|
|
707
895
|
"type": "string",
|
|
708
|
-
"description": "
|
|
896
|
+
"description": "Current file or directory path"
|
|
897
|
+
},
|
|
898
|
+
"to": {
|
|
899
|
+
"type": "string",
|
|
900
|
+
"description": "New file or directory path"
|
|
901
|
+
},
|
|
902
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
903
|
+
},
|
|
904
|
+
"required": ["from", "to"]
|
|
905
|
+
},
|
|
906
|
+
"config-copy": {
|
|
907
|
+
"title": "Copy Config",
|
|
908
|
+
"type": "object",
|
|
909
|
+
"additionalProperties": false,
|
|
910
|
+
"properties": {
|
|
911
|
+
"from": {
|
|
912
|
+
"type": "string",
|
|
913
|
+
"description": "Source file or directory path"
|
|
914
|
+
},
|
|
915
|
+
"to": {
|
|
916
|
+
"type": "string",
|
|
917
|
+
"description": "Destination file or directory path"
|
|
918
|
+
},
|
|
919
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
920
|
+
},
|
|
921
|
+
"required": ["from", "to"]
|
|
922
|
+
},
|
|
923
|
+
"config-append": {
|
|
924
|
+
"title": "Append Config",
|
|
925
|
+
"type": "object",
|
|
926
|
+
"additionalProperties": false,
|
|
927
|
+
"properties": {
|
|
928
|
+
"file": {
|
|
929
|
+
"type": "string",
|
|
930
|
+
"description": "Path to the file to append to"
|
|
931
|
+
},
|
|
932
|
+
"content": {
|
|
933
|
+
"type": "string",
|
|
934
|
+
"description": "Inline content string with {{variable}} placeholders. Cannot be used with templateFile."
|
|
935
|
+
},
|
|
936
|
+
"template": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"description": "Alias for content"
|
|
939
|
+
},
|
|
940
|
+
"templateFile": {
|
|
941
|
+
"type": "string",
|
|
942
|
+
"description": "Path to external template file (relative to project root). Files with .hbs extension automatically use Handlebars templating. Cannot be used with content."
|
|
943
|
+
},
|
|
944
|
+
"newline": {
|
|
945
|
+
"type": "boolean",
|
|
946
|
+
"description": "Add newline before appending (default: true)",
|
|
947
|
+
"default": true
|
|
948
|
+
},
|
|
949
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
950
|
+
},
|
|
951
|
+
"required": ["file"],
|
|
952
|
+
"oneOf": [
|
|
953
|
+
{
|
|
954
|
+
"required": ["content"]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"required": ["template"]
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"required": ["templateFile"]
|
|
709
961
|
}
|
|
962
|
+
]
|
|
963
|
+
},
|
|
964
|
+
"config-mkdir": {
|
|
965
|
+
"title": "Mkdir Config",
|
|
966
|
+
"type": "object",
|
|
967
|
+
"additionalProperties": false,
|
|
968
|
+
"properties": {
|
|
969
|
+
"path": {
|
|
970
|
+
"type": "string",
|
|
971
|
+
"description": "Path to the directory to create"
|
|
972
|
+
},
|
|
973
|
+
"condition": { "$ref": "#/$defs/condition" }
|
|
710
974
|
},
|
|
711
|
-
"required": ["
|
|
975
|
+
"required": ["path"]
|
|
712
976
|
}
|
|
713
977
|
}
|
|
714
978
|
}
|