@pixpilot/scaffoldfy 0.25.0 → 0.26.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 +10 -11
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/src-CTMK0qMs.cjs +1 -0
- package/dist/src-KJ0l6Sth.js +1 -0
- package/package.json +3 -3
- package/dist/src-BlvCkBsJ.cjs +0 -1
- package/dist/src-DfhwwM_Y.js +0 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ pnpm add @pixpilot/scaffoldfy
|
|
|
34
34
|
scaffoldfy
|
|
35
35
|
|
|
36
36
|
# With custom tasks file
|
|
37
|
-
scaffoldfy --
|
|
37
|
+
scaffoldfy --config ./my-tasks.json
|
|
38
38
|
|
|
39
39
|
# Preview changes (dry run)
|
|
40
40
|
scaffoldfy --dry-run
|
|
@@ -47,7 +47,7 @@ Or run without installing using npx:
|
|
|
47
47
|
npx @pixpilot/scaffoldfy
|
|
48
48
|
|
|
49
49
|
# With custom tasks file
|
|
50
|
-
npx @pixpilot/scaffoldfy --
|
|
50
|
+
npx @pixpilot/scaffoldfy --config ./my-tasks.json
|
|
51
51
|
|
|
52
52
|
# Preview changes (dry run)
|
|
53
53
|
npx @pixpilot/scaffoldfy --dry-run
|
|
@@ -55,14 +55,13 @@ npx @pixpilot/scaffoldfy --dry-run
|
|
|
55
55
|
|
|
56
56
|
### CLI Options
|
|
57
57
|
|
|
58
|
-
| Option
|
|
59
|
-
|
|
|
60
|
-
| `--
|
|
61
|
-
| `--
|
|
62
|
-
| `--
|
|
63
|
-
|
|
|
64
|
-
| `-
|
|
65
|
-
| `-v, --version` | Show version |
|
|
58
|
+
| Option | Description |
|
|
59
|
+
| ----------------- | ------------------------------------------------------------------------------- |
|
|
60
|
+
| `--config <path>` | Path to config file (JSON or TypeScript, default: `./template-tasks.json`) |
|
|
61
|
+
| `--dry-run` | Preview changes without applying them |
|
|
62
|
+
| `--no-validate` | Skip schema validation of task configuration (validation is enabled by default) |
|
|
63
|
+
| `-h, --help` | Show help message |
|
|
64
|
+
| `-v, --version` | Show version |
|
|
66
65
|
|
|
67
66
|
### Programmatic API
|
|
68
67
|
|
|
@@ -270,7 +269,7 @@ You can extend multiple templates, override tasks by ID, and merge dependencies
|
|
|
270
269
|
Preview exactly what will change before applying:
|
|
271
270
|
|
|
272
271
|
```bash
|
|
273
|
-
scaffoldfy --
|
|
272
|
+
scaffoldfy --config ./tasks.json --dry-run
|
|
274
273
|
```
|
|
275
274
|
|
|
276
275
|
See color-coded diffs for all file modifications, deletions, and additions.
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=require(`./utils-Bhsv13ij.cjs`);require(`./config-DlJs75hK.cjs`);const t=require(`./run-tasks-Bn4lboAE.cjs`),n=require(`./src-
|
|
2
|
+
const e=require(`./utils-Bhsv13ij.cjs`);require(`./config-DlJs75hK.cjs`);const t=require(`./run-tasks-Bn4lboAE.cjs`),n=require(`./src-CTMK0qMs.cjs`);let r=require(`node:fs`);r=e._(r);let i=require(`node:path`);i=e._(i);let a=require(`node:process`);a=e._(a);let o=require(`commander`);o=e._(o);let s=require(`node:url`);s=e._(s);let c=require(`ajv`);c=e._(c);const l=1,u=(0,s.fileURLToPath)(require(`url`).pathToFileURL(__filename).href),d=i.default.dirname(u);function f(){return new c.default({allErrors:!0,verbose:!0,strict:!1,discriminator:!0})}function p(){let e=i.default.join(d,`..`,`schema`,`tasks.schema.json`);try{let t=r.default.readFileSync(e,`utf-8`);return JSON.parse(t)}catch(t){throw Error(`Failed to load tasks schema from ${e}: ${t instanceof Error?t.message:String(t)}`)}}function m(e){return e.filter(t=>{if(t.keyword===`oneOf`){let e=t.params;if(e.passingSchemas&&e.passingSchemas.length>0)return!1}if(t.keyword===`required`){let n=e.find(e=>e.keyword===`oneOf`&&e.instancePath===t.instancePath);if(n){let e=n.params;if(e.passingSchemas&&e.passingSchemas.length>0)return!1}}return!0}).map(e=>{let t=e.instancePath||`root`,n=e.message??`Unknown error`;switch(e.keyword){case`required`:return`${t}: Missing required property "${String(e.params.missingProperty??`unknown`)}"`;case`type`:return`${t}: Expected type "${String(e.params.type??`unknown`)}", received "${typeof e.data}"`;case`enum`:{let r=e.params.allowedValues;return`${t}: ${n}. Allowed values: ${Array.isArray(r)?r.join(`, `):String(r)}`}case`pattern`:{let{pattern:r}=e.params;return`${t}: ${n}. Value must match pattern: ${String(r)}`}case`oneOf`:return`${t}: ${n}. Configuration must match exactly one of the allowed schemas`;case`additionalProperties`:return`${t}: ${n}. Unknown property: "${String(e.params.additionalProperty??`unknown`)}"`;default:return`${t}: ${n}`}})}function h(t,n={}){try{let e=f(),r=p(),i=e.compile(r);if(!i(t)&&i.errors){let e=m(i.errors);return e.length===0?{valid:!0,errors:[]}:(n.silent||g(e),{valid:!1,errors:e})}return{valid:!0,errors:[]}}catch(t){let r=t instanceof Error?t.message:`Unknown error occurred during schema validation`;return n.silent||(e.i(`❌ Schema validation error:`,`error`),e.i(` ${r}`,`error`)),{valid:!1,errors:[r]}}}function g(t){e.i(`❌ Schema validation failed:`,`error`),e.i(``,`error`),e.i(`The following validation errors were found:`,`error`),e.i(``,`error`);for(let n of t)e.i(` • ${n}`,`error`);e.i(``,`error`),e.i(`Please fix these errors in your template configuration file.`,`error`),e.i(``,`error`),e.i(`For schema documentation, see: https://github.com/pixpilot/scaffoldfy/tree/main/packages/scaffoldfy/schema`,`info`)}const _=new o.Command,v=i.default.join(__dirname,`..`,`package.json`);let y=`0.0.0`;try{y=JSON.parse(r.default.readFileSync(v,`utf-8`)).version??`0.0.0`}catch{}_.name(`scaffoldfy`).description(`Automate project setup and configuration with customizable tasks`).version(y),_.option(`--dry-run`,`Run in dry mode without making any changes`).option(`--force`,`Force execution even if checks fail`).option(`--config <path>`,`Path to task configuration file (JSON or TypeScript)`,`./template-tasks.json`).option(`--no-validate`,`Skip schema validation of task configuration (validation is enabled by default)`).action(async o=>{try{let s=[],c,l,u,d;if(o.config!=null&&o.config!==``){let n=i.default.resolve(a.default.cwd(),o.config);if(r.default.existsSync(n))if(d=n,n.endsWith(`.ts`)||n.endsWith(`.mts`)){e.i(`Loading tasks from TypeScript file: ${o.config}`,`info`);try{let t=await import(n);s=t.default??t.tasks??[],(!Array.isArray(s)||s.length===0)&&(e.i(`⚠️ No tasks found in TypeScript file or invalid format`,`warn`),e.i(`Expected default export or named export "tasks" with TaskDefinition[]`,`info`))}catch(t){e.i(`Failed to load TypeScript config file: ${o.config}`,`error`),t instanceof Error&&e.i(` Error: ${t.message}`,`error`),a.default.exit(1)}}else try{if(o.validate!==!1){e.i(`Validating task configuration against schema...`,`info`);let t=r.default.readFileSync(n,`utf-8`);h(JSON.parse(t),{silent:!1}).valid||(e.i(``,`error`),e.i(`💡 You can skip validation with --no-validate flag, but this is not recommended.`,`info`),a.default.exit(1)),e.i(`✓ Schema validation passed`,`success`)}let i=await t.q(n,{sequential:!0});if(i.templates!=null&&i.templates.length>0){e.i(`Using sequential template processing mode`,`info`);let{runTemplatesSequentially:t}=await Promise.resolve().then(()=>require(`./run-tasks-BZQH28T_.cjs`)),{createInitialConfig:r}=await Promise.resolve().then(()=>require(`./config-DmK0Erv2.cjs`));await t(i.templates,{dryRun:o.dryRun??!1,force:o.force??!1,tasksFilePath:n},r()),a.default.exit(0)}s=i.tasks,c=i.variables,l=i.prompts,u=i.enabled,Array.isArray(s)||(e.i(`❌ Invalid config file format`,`error`),e.i(`Expected JSON with { "tasks": [...] } structure`,`info`),a.default.exit(1))}catch(t){e.i(`Failed to load JSON config file: ${o.config}`,`error`),t instanceof Error&&e.i(` Error: ${t.message}`,`error`),a.default.exit(1)}else e.i(`Config file not found: ${o.config}`,`warn`)}let f=l!=null&&l.length>0||c!=null&&c.length>0;s.length===0&&!f&&(e.i(`❌ No tasks defined`,`error`),e.i(`Please provide tasks using one of these methods:`,`info`),e.i(` 1. Create a template-tasks.json file in the current directory`,`info`),e.i(` 2. Create a template-tasks.ts file in the current directory`,`info`),e.i(` 3. Use --config option to specify a different config file`,`info`),e.i(`Example JSON structure:`,`info`),console.log(JSON.stringify({tasks:[{id:`update-package`,name:`Update package.json`,description:`Update package.json with repository information`,required:!0,enabled:!0,type:`update-json`,prompts:[{id:`projectName`,type:`input`,message:`What is your project name?`,default:`my-project`,required:!0},{id:`includeTests`,type:`confirm`,message:`Include test files?`,default:!0}],config:{file:`package.json`,updates:{name:`{{projectName}}`,author:`{{author}}`}}}]},null,2)),a.default.exit(1)),s.length===0?e.i(`Loaded template with 0 tasks (template may only provide prompts/variables for extending)`,`info`):e.i(`Loaded ${s.length} task(s)`,`success`),await n.n(s,{dryRun:o.dryRun,force:o.force,tasksFilePath:d,globalVariables:c,globalPrompts:l,templateEnabled:u})}catch(t){if(e.i(`❌ CLI execution failed`,`error`),t instanceof Error){e.i(`Error: ${t.message}`,`error`);let n=a.default.env.DEBUG;n!=null&&n!==``&&console.error(t.stack)}else console.error(t);a.default.exit(1)}}),_.parse(a.default.argv);
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./config-DfRbCqsT.js";import{i as e}from"./utils-D61aLjOR.js";import{q as t}from"./run-tasks-C859oQ3R.js";import{n}from"./src-
|
|
2
|
+
import"./config-DfRbCqsT.js";import{i as e}from"./utils-D61aLjOR.js";import{q as t}from"./run-tasks-C859oQ3R.js";import{n}from"./src-KJ0l6Sth.js";import r from"node:path";import{fileURLToPath as i}from"node:url";import a from"node:fs";import o from"node:process";import{Command as s}from"commander";import c from"ajv";const l=()=>i(import.meta.url),u=(()=>r.dirname(l()))(),d=i(import.meta.url),f=r.dirname(d);function p(){return new c({allErrors:!0,verbose:!0,strict:!1,discriminator:!0})}function m(){let e=r.join(f,`..`,`schema`,`tasks.schema.json`);try{let t=a.readFileSync(e,`utf-8`);return JSON.parse(t)}catch(t){throw Error(`Failed to load tasks schema from ${e}: ${t instanceof Error?t.message:String(t)}`)}}function h(e){return e.filter(t=>{if(t.keyword===`oneOf`){let e=t.params;if(e.passingSchemas&&e.passingSchemas.length>0)return!1}if(t.keyword===`required`){let n=e.find(e=>e.keyword===`oneOf`&&e.instancePath===t.instancePath);if(n){let e=n.params;if(e.passingSchemas&&e.passingSchemas.length>0)return!1}}return!0}).map(e=>{let t=e.instancePath||`root`,n=e.message??`Unknown error`;switch(e.keyword){case`required`:return`${t}: Missing required property "${String(e.params.missingProperty??`unknown`)}"`;case`type`:return`${t}: Expected type "${String(e.params.type??`unknown`)}", received "${typeof e.data}"`;case`enum`:{let r=e.params.allowedValues;return`${t}: ${n}. Allowed values: ${Array.isArray(r)?r.join(`, `):String(r)}`}case`pattern`:{let{pattern:r}=e.params;return`${t}: ${n}. Value must match pattern: ${String(r)}`}case`oneOf`:return`${t}: ${n}. Configuration must match exactly one of the allowed schemas`;case`additionalProperties`:return`${t}: ${n}. Unknown property: "${String(e.params.additionalProperty??`unknown`)}"`;default:return`${t}: ${n}`}})}function g(t,n={}){try{let e=p(),r=m(),i=e.compile(r);if(!i(t)&&i.errors){let e=h(i.errors);return e.length===0?{valid:!0,errors:[]}:(n.silent||_(e),{valid:!1,errors:e})}return{valid:!0,errors:[]}}catch(t){let r=t instanceof Error?t.message:`Unknown error occurred during schema validation`;return n.silent||(e(`❌ Schema validation error:`,`error`),e(` ${r}`,`error`)),{valid:!1,errors:[r]}}}function _(t){e(`❌ Schema validation failed:`,`error`),e(``,`error`),e(`The following validation errors were found:`,`error`),e(``,`error`);for(let n of t)e(` • ${n}`,`error`);e(``,`error`),e(`Please fix these errors in your template configuration file.`,`error`),e(``,`error`),e(`For schema documentation, see: https://github.com/pixpilot/scaffoldfy/tree/main/packages/scaffoldfy/schema`,`info`)}const v=new s,y=r.join(u,`..`,`package.json`);let b=`0.0.0`;try{b=JSON.parse(a.readFileSync(y,`utf-8`)).version??`0.0.0`}catch{}v.name(`scaffoldfy`).description(`Automate project setup and configuration with customizable tasks`).version(b),v.option(`--dry-run`,`Run in dry mode without making any changes`).option(`--force`,`Force execution even if checks fail`).option(`--config <path>`,`Path to task configuration file (JSON or TypeScript)`,`./template-tasks.json`).option(`--no-validate`,`Skip schema validation of task configuration (validation is enabled by default)`).action(async i=>{try{let s=[],c,l,u,d;if(i.config!=null&&i.config!==``){let n=r.resolve(o.cwd(),i.config);if(a.existsSync(n))if(d=n,n.endsWith(`.ts`)||n.endsWith(`.mts`)){e(`Loading tasks from TypeScript file: ${i.config}`,`info`);try{let t=await import(n);s=t.default??t.tasks??[],(!Array.isArray(s)||s.length===0)&&(e(`⚠️ No tasks found in TypeScript file or invalid format`,`warn`),e(`Expected default export or named export "tasks" with TaskDefinition[]`,`info`))}catch(t){e(`Failed to load TypeScript config file: ${i.config}`,`error`),t instanceof Error&&e(` Error: ${t.message}`,`error`),o.exit(1)}}else try{if(i.validate!==!1){e(`Validating task configuration against schema...`,`info`);let t=a.readFileSync(n,`utf-8`);g(JSON.parse(t),{silent:!1}).valid||(e(``,`error`),e(`💡 You can skip validation with --no-validate flag, but this is not recommended.`,`info`),o.exit(1)),e(`✓ Schema validation passed`,`success`)}let r=await t(n,{sequential:!0});if(r.templates!=null&&r.templates.length>0){e(`Using sequential template processing mode`,`info`);let{runTemplatesSequentially:t}=await import(`./run-tasks-D-CbjBoy.js`),{createInitialConfig:a}=await import(`./config-C8hh88Lc.js`);await t(r.templates,{dryRun:i.dryRun??!1,force:i.force??!1,tasksFilePath:n},a()),o.exit(0)}s=r.tasks,c=r.variables,l=r.prompts,u=r.enabled,Array.isArray(s)||(e(`❌ Invalid config file format`,`error`),e(`Expected JSON with { "tasks": [...] } structure`,`info`),o.exit(1))}catch(t){e(`Failed to load JSON config file: ${i.config}`,`error`),t instanceof Error&&e(` Error: ${t.message}`,`error`),o.exit(1)}else e(`Config file not found: ${i.config}`,`warn`)}let f=l!=null&&l.length>0||c!=null&&c.length>0;s.length===0&&!f&&(e(`❌ No tasks defined`,`error`),e(`Please provide tasks using one of these methods:`,`info`),e(` 1. Create a template-tasks.json file in the current directory`,`info`),e(` 2. Create a template-tasks.ts file in the current directory`,`info`),e(` 3. Use --config option to specify a different config file`,`info`),e(`Example JSON structure:`,`info`),console.log(JSON.stringify({tasks:[{id:`update-package`,name:`Update package.json`,description:`Update package.json with repository information`,required:!0,enabled:!0,type:`update-json`,prompts:[{id:`projectName`,type:`input`,message:`What is your project name?`,default:`my-project`,required:!0},{id:`includeTests`,type:`confirm`,message:`Include test files?`,default:!0}],config:{file:`package.json`,updates:{name:`{{projectName}}`,author:`{{author}}`}}}]},null,2)),o.exit(1)),s.length===0?e(`Loaded template with 0 tasks (template may only provide prompts/variables for extending)`,`info`):e(`Loaded ${s.length} task(s)`,`success`),await n(s,{dryRun:i.dryRun,force:i.force,tasksFilePath:d,globalVariables:c,globalPrompts:l,templateEnabled:u})}catch(t){if(e(`❌ CLI execution failed`,`error`),t instanceof Error){e(`Error: ${t.message}`,`error`);let n=o.env.DEBUG;n!=null&&n!==``&&console.error(t.stack)}else console.error(t);o.exit(1)}}),v.parse(o.argv);export{};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./utils-Bhsv13ij.cjs`);require(`./config-DlJs75hK.cjs`);const t=require(`./run-tasks-Bn4lboAE.cjs`),n=require(`./src-
|
|
1
|
+
const e=require(`./utils-Bhsv13ij.cjs`);require(`./config-DlJs75hK.cjs`);const t=require(`./run-tasks-Bn4lboAE.cjs`),n=require(`./src-CTMK0qMs.cjs`);exports.callHook=t.h,exports.clearPlugins=t.g,exports.clearTemplateCache=t.G,exports.collectPrompts=t.p,exports.collectVariables=t.o,exports.createPlugin=t._,exports.displayTasksDiff=t.O,exports.evaluateCondition=e.t,exports.executePluginTask=t.v,exports.executeTask=t.c,exports.getCreateDiff=t.k,exports.getDeleteDiff=t.A,exports.getExecDiff=t.j,exports.getGitInitDiff=t.M,exports.getGitRepoInfo=e.n,exports.getPlugin=t.y,exports.getPluginForTaskType=t.b,exports.getPluginTaskDiff=t.x,exports.getRegexReplaceDiff=t.N,exports.getRenameDiff=t.P,exports.getReplaceInFileDiff=t.F,exports.getTaskDiff=t.I,exports.getTemplateSourceDescription=t.z,exports.getUpdateJsonDiff=t.L,exports.getWriteDiff=t.R,exports.hasInlineTemplate=t.B,exports.hasTemplateFile=t.V,exports.interpolateTemplate=e.r,exports.isPluginTaskType=t.S,exports.listPlugins=t.C,exports.loadAndMergeTemplate=t.K,exports.loadTasksWithInheritance=t.q,exports.loadTemplate=t.J,exports.loadTemplatesInOrder=t.Y,exports.log=e.i,exports.main=n.t,exports.mergeTemplates=t.X,exports.processTemplate=t.H,exports.prompt=e.a,exports.promptYesNo=e.o,exports.registerBuiltInPlugins=t.l,exports.registerHooks=t.w,exports.registerPlugin=t.T,exports.resolveAllDefaultValues=t.f,exports.resolveAllVariableValues=t.i,exports.resolveDefaultValue=t.m,exports.resolveVariableValue=t.a,exports.runTask=t.u,exports.runTasks=t.t,exports.runTemplatesSequentially=t.n,exports.runWithTasks=n.n,exports.setNestedProperty=e.s,exports.shouldUseHandlebars=t.U,exports.topologicalSort=t.s,exports.unregisterPlugin=t.E,exports.validatePluginTask=t.D,exports.validatePrompts=t.d,exports.validateTemplateConfig=t.W,exports.validateVariables=t.r;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./config-DfRbCqsT.js";import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./utils-D61aLjOR.js";import{A as s,B as c,C as l,D as u,E as d,F as f,G as p,H as m,I as h,J as g,K as _,L as v,M as y,N as b,O as x,P as S,R as C,S as w,T,U as E,V as D,W as O,X as k,Y as A,_ as j,a as M,b as N,c as P,d as F,f as I,g as L,h as R,i as z,j as B,k as V,l as H,m as U,n as W,o as G,p as K,q,r as J,s as Y,t as X,u as Z,v as Q,w as $,x as ee,y as te,z as ne}from"./run-tasks-C859oQ3R.js";import{n as re,t as ie}from"./src-
|
|
1
|
+
import"./config-DfRbCqsT.js";import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./utils-D61aLjOR.js";import{A as s,B as c,C as l,D as u,E as d,F as f,G as p,H as m,I as h,J as g,K as _,L as v,M as y,N as b,O as x,P as S,R as C,S as w,T,U as E,V as D,W as O,X as k,Y as A,_ as j,a as M,b as N,c as P,d as F,f as I,g as L,h as R,i as z,j as B,k as V,l as H,m as U,n as W,o as G,p as K,q,r as J,s as Y,t as X,u as Z,v as Q,w as $,x as ee,y as te,z as ne}from"./run-tasks-C859oQ3R.js";import{n as re,t as ie}from"./src-KJ0l6Sth.js";export{R as callHook,L as clearPlugins,p as clearTemplateCache,K as collectPrompts,G as collectVariables,j as createPlugin,x as displayTasksDiff,o as evaluateCondition,Q as executePluginTask,P as executeTask,V as getCreateDiff,s as getDeleteDiff,B as getExecDiff,y as getGitInitDiff,n as getGitRepoInfo,te as getPlugin,N as getPluginForTaskType,ee as getPluginTaskDiff,b as getRegexReplaceDiff,S as getRenameDiff,f as getReplaceInFileDiff,h as getTaskDiff,ne as getTemplateSourceDescription,v as getUpdateJsonDiff,C as getWriteDiff,c as hasInlineTemplate,D as hasTemplateFile,i as interpolateTemplate,w as isPluginTaskType,l as listPlugins,_ as loadAndMergeTemplate,q as loadTasksWithInheritance,g as loadTemplate,A as loadTemplatesInOrder,t as log,ie as main,k as mergeTemplates,m as processTemplate,e as prompt,r as promptYesNo,H as registerBuiltInPlugins,$ as registerHooks,T as registerPlugin,I as resolveAllDefaultValues,z as resolveAllVariableValues,U as resolveDefaultValue,M as resolveVariableValue,Z as runTask,X as runTasks,W as runTemplatesSequentially,re as runWithTasks,a as setNestedProperty,E as shouldUseHandlebars,Y as topologicalSort,d as unregisterPlugin,u as validatePluginTask,F as validatePrompts,O as validateTemplateConfig,J as validateVariables};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./utils-Bhsv13ij.cjs`),t=require(`./run-tasks-Bn4lboAE.cjs`);let n=require(`node:process`);n=e._(n);const r=n.default.argv.includes(`--dry-run`),i=n.default.argv.includes(`--force`);async function a(a){try{let o=a||[];o.length===0&&(e.i(`⚠️ No tasks defined. Use --config to specify tasks or call runWithTasks() programmatically.`,`warn`),e.i(`Example: scaffoldfy --config ./tasks.json`,`info`),n.default.exit(1)),await t.t(o,{dryRun:r,force:i,tasksFilePath:void 0})}catch(t){e.i(`❌ Task execution failed`,`error`),t instanceof Error?(e.i(`Error: ${t.message}`,`error`),n.default.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.default.exit(1)}}async function o(a,o){try{await t.t(a,{dryRun:o?.dryRun??r,force:o?.force??i,tasksFilePath:o?.tasksFilePath??void 0,...o?.globalVariables!=null&&{globalVariables:o.globalVariables},...o?.globalPrompts!=null&&{globalPrompts:o.globalPrompts},...o?.templateEnabled!=null&&{templateEnabled:o.templateEnabled}})}catch(t){e.i(`❌ Task execution failed`,`error`),t instanceof Error?(e.i(`Error: ${t.message}`,`error`),n.default.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.default.exit(1)}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./utils-D61aLjOR.js";import{t}from"./run-tasks-C859oQ3R.js";import n from"node:process";const r=n.argv.includes(`--dry-run`),i=n.argv.includes(`--force`);async function a(a){try{let o=a||[];o.length===0&&(e(`⚠️ No tasks defined. Use --config to specify tasks or call runWithTasks() programmatically.`,`warn`),e(`Example: scaffoldfy --config ./tasks.json`,`info`),n.exit(1)),await t(o,{dryRun:r,force:i,tasksFilePath:void 0})}catch(t){e(`❌ Task execution failed`,`error`),t instanceof Error?(e(`Error: ${t.message}`,`error`),n.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.exit(1)}}async function o(a,o){try{await t(a,{dryRun:o?.dryRun??r,force:o?.force??i,tasksFilePath:o?.tasksFilePath??void 0,...o?.globalVariables!=null&&{globalVariables:o.globalVariables},...o?.globalPrompts!=null&&{globalPrompts:o.globalPrompts},...o?.templateEnabled!=null&&{templateEnabled:o.templateEnabled}})}catch(t){e(`❌ Task execution failed`,`error`),t instanceof Error?(e(`Error: ${t.message}`,`error`),n.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.exit(1)}}export{o as n,a as t};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/scaffoldfy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.0",
|
|
5
5
|
"author": "PixPilot <m.doaie@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"eslint": "^9.38.0",
|
|
48
48
|
"tsdown": "^0.15.8",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
|
-
"@internal/
|
|
50
|
+
"@internal/eslint-config": "0.3.0",
|
|
51
51
|
"@internal/tsdown-config": "0.1.0",
|
|
52
52
|
"@internal/tsconfig": "0.1.0",
|
|
53
53
|
"@internal/vitest-config": "0.1.0",
|
|
54
|
-
"@internal/
|
|
54
|
+
"@internal/prettier-config": "0.0.1"
|
|
55
55
|
},
|
|
56
56
|
"prettier": "@internal/prettier-config",
|
|
57
57
|
"scripts": {
|
package/dist/src-BlvCkBsJ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./utils-Bhsv13ij.cjs`),t=require(`./run-tasks-Bn4lboAE.cjs`);let n=require(`node:process`);n=e._(n);const r=n.default.argv.includes(`--dry-run`),i=n.default.argv.includes(`--force`);async function a(a){try{let o=a||[];o.length===0&&(e.i(`⚠️ No tasks defined. Use --tasks-file to specify tasks or call runWithTasks() programmatically.`,`warn`),e.i(`Example: scaffoldfy --tasks-file ./tasks.json`,`info`),n.default.exit(1)),await t.t(o,{dryRun:r,force:i,tasksFilePath:void 0})}catch(t){e.i(`❌ Task execution failed`,`error`),t instanceof Error?(e.i(`Error: ${t.message}`,`error`),n.default.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.default.exit(1)}}async function o(a,o){try{await t.t(a,{dryRun:o?.dryRun??r,force:o?.force??i,tasksFilePath:o?.tasksFilePath??void 0,...o?.globalVariables!=null&&{globalVariables:o.globalVariables},...o?.globalPrompts!=null&&{globalPrompts:o.globalPrompts},...o?.templateEnabled!=null&&{templateEnabled:o.templateEnabled}})}catch(t){e.i(`❌ Task execution failed`,`error`),t instanceof Error?(e.i(`Error: ${t.message}`,`error`),n.default.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.default.exit(1)}}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
package/dist/src-DfhwwM_Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./utils-D61aLjOR.js";import{t}from"./run-tasks-C859oQ3R.js";import n from"node:process";const r=n.argv.includes(`--dry-run`),i=n.argv.includes(`--force`);async function a(a){try{let o=a||[];o.length===0&&(e(`⚠️ No tasks defined. Use --tasks-file to specify tasks or call runWithTasks() programmatically.`,`warn`),e(`Example: scaffoldfy --tasks-file ./tasks.json`,`info`),n.exit(1)),await t(o,{dryRun:r,force:i,tasksFilePath:void 0})}catch(t){e(`❌ Task execution failed`,`error`),t instanceof Error?(e(`Error: ${t.message}`,`error`),n.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.exit(1)}}async function o(a,o){try{await t(a,{dryRun:o?.dryRun??r,force:o?.force??i,tasksFilePath:o?.tasksFilePath??void 0,...o?.globalVariables!=null&&{globalVariables:o.globalVariables},...o?.globalPrompts!=null&&{globalPrompts:o.globalPrompts},...o?.templateEnabled!=null&&{templateEnabled:o.templateEnabled}})}catch(t){e(`❌ Task execution failed`,`error`),t instanceof Error?(e(`Error: ${t.message}`,`error`),n.env.DEBUG!=null&&console.error(t.stack)):console.error(t),n.exit(1)}}export{o as n,a as t};
|