plano-cli 0.8.0 → 0.9.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/dist/cli/plano.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{compileTemplate as t,generate as e,getContextPrompts as a,getTemplate as p,promptForContext as s,promptForTemplate as o}from"../chunk-2FL24MYQ.js";import{Command as n}from"commander";import{z as r}from"zod";var i=new n;i.name("plano").description("CLI to scaffold files and directories from templates").version("0.8.0","-v, --version"),i.command("generate").description("Generate files or directories from a template").argument("[name]","template name").option("-p, --paths <path...>",'Paths to templates, must be directory named "plano"',[]).action(async(t,n)=>{try{let i=r.optional(r.string()).parse(t);const{paths:m}=r.object({paths:r.array(r.string())}).parse(n);void 0===i&&(i=await o({paths:m,type:"file"}));const c=p({name:i,paths:m,type:"file"}),{helpers:l,prompts:h}=await a({template:c}),{context:d,helpers:f}=await s({helpers:l,prompts:h});e({context:d,helpers:f,template:c})}catch(t){t instanceof Error&&console.log(t.message)}}),i.command("snippet").description("Generate a snippet from a template").argument("[name]","template name").option("-p, --paths <path...>",'Paths to snippets, must be directory named "plano"',[]).action(async(e,a)=>{try{let s=r.optional(r.string()).parse(e);const{paths:n}=r.object({paths:r.array(r.string())}).parse(a);void 0===s&&(s=await o({paths:n,type:"snippet"}));const i=p({name:s,paths:n,type:"snippet"});process.stdout.write(t({context:{},path:`${i.path}/${i.template}/snippet.handlebars`}))}catch(t){t instanceof Error&&console.log(t.message)}}),i.parse();
2
+ import{compileTemplate as t,generate as e,getContextPrompts as a,getTemplate as p,promptForContext as s,promptForTemplate as o}from"../chunk-2FL24MYQ.js";import{Command as n}from"commander";import{z as r}from"zod";var i=new n;i.name("plano").description("CLI to scaffold files and directories from templates").version("0.9.0","-v, --version"),i.command("generate").description("Generate files or directories from a template").argument("[name]","template name").option("-p, --paths <path...>",'Paths to templates, must be directory named "plano"',[]).action(async(t,n)=>{try{let i=r.optional(r.string()).parse(t);const{paths:m}=r.object({paths:r.array(r.string())}).parse(n);void 0===i&&(i=await o({paths:m,type:"file"}));const c=p({name:i,paths:m,type:"file"}),{helpers:l,prompts:h}=await a({template:c}),{context:d,helpers:f}=await s({helpers:l,prompts:h});e({context:d,helpers:f,template:c})}catch(t){t instanceof Error&&console.log(t.message)}}),i.command("snippet").description("Generate a snippet from a template").argument("[name]","template name").option("-p, --paths <path...>",'Paths to snippets, must be directory named "plano"',[]).action(async(e,a)=>{try{let s=r.optional(r.string()).parse(e);const{paths:n}=r.object({paths:r.array(r.string())}).parse(a);void 0===s&&(s=await o({paths:n,type:"snippet"}));const i=p({name:s,paths:n,type:"snippet"});process.stdout.write(t({context:{},path:`${i.path}/${i.template}/snippet.handlebars`}))}catch(t){t instanceof Error&&console.log(t.message)}}),i.parse();
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as zod_v4_core_schemas_cjs from 'zod/v4/core/schemas.cjs';
1
+ import * as zod_v4_core from 'zod/v4/core';
2
2
  import * as zod from 'zod';
3
3
  import { z } from 'zod';
4
4
  import { HelperDelegate } from 'handlebars';
@@ -71,7 +71,7 @@ interface PromptForContextOptions {
71
71
  }
72
72
  declare function promptForContext({ helpers, prompts, }: PromptForContextOptions): Promise<{
73
73
  context: Record<string, unknown>;
74
- helpers: Record<string, zod_v4_core_schemas_cjs.$InferOuterFunctionType<zod.ZodTuple<[zod.ZodString], null>, zod.ZodString>>;
74
+ helpers: Record<string, zod_v4_core.$InferOuterFunctionType<zod.ZodTuple<[zod.ZodString], null>, zod.ZodString>>;
75
75
  }>;
76
76
 
77
77
  interface CompileTemplate {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plano-cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -29,21 +29,21 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/lodash-es": "^4.17.12",
32
- "@types/node": "^22.18.0",
32
+ "@types/node": "^22.18.10",
33
33
  "@vitest/coverage-v8": "^3.2.4",
34
34
  "prettier": "^3.6.2",
35
- "terser": "^5.43.1",
35
+ "terser": "^5.44.0",
36
36
  "tsup": "^8.5.0",
37
- "typescript": "^5.9.2",
37
+ "typescript": "^5.9.3",
38
38
  "vitest": "^3.1.1"
39
39
  },
40
40
  "dependencies": {
41
- "@inquirer/prompts": "^7.8.4",
42
- "chalk": "^5.6.0",
43
- "commander": "^14.0.0",
41
+ "@inquirer/prompts": "^7.8.6",
42
+ "chalk": "^5.6.2",
43
+ "commander": "^14.0.1",
44
44
  "glob": "^11.0.3",
45
45
  "handlebars": "^4.7.8",
46
46
  "lodash-es": "^4.17.21",
47
- "zod": "^4.1.5"
47
+ "zod": "^4.1.12"
48
48
  }
49
49
  }