plekta 0.0.4 → 0.0.5

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/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{checkForUpdate as e,checkForUpdateFresh as t,createCli as n,createSpinner as r,display as i,getPackageManager as a,onCancel as o,showTree as s,symbols as c,typedCommand as l}from"@plekta/utils";import u from"chalk";import{Command as d}from"commander";import{confirm as f,input as p}from"@inquirer/prompts";import{execFile as m}from"node:child_process";import{promisify as h}from"node:util";const g={name:`plekta`,version:`0.0.4`,description:`Description coming soon`,type:`module`,license:`MIT`,author:{name:`Osilama`,email:`thelastofinusa@gmail.com`,url:`https://thelastofinusa.vercel.app`},main:`./dist/index.mjs`,module:`./dist/index.mjs`,types:`./dist/index.d.ts`,exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.mjs`}},bin:{plekta:`./dist/index.mjs`},files:[`dist`,`README.md`],engines:{node:`>=18`},scripts:{build:`tsdown`,start:`bun run ./src/index.ts`,lint:`biome check .`,clean:`rm -rf .turbo dist node_modules`,"pack:dry":`bun run build && bun pm pack --dry-run`,prepublishOnly:`bun run build`,typecheck:`tsdown --noEmit`},dependencies:{"@inquirer/prompts":`^8.7.2`,"@plekta/utils":`^0.0.1`,chalk:`^6.0.0`,commander:`^15.0.0`,ora:`^9.4.1`},devDependencies:{"@plekta/tsconfig":`^0.0.0`,"@types/bun":`^1.4.3`,"@types/node":`^22.20.2`,tsdown:`0.22.14`}},{createCommandTitle:_,resolveCommandName:v}=n({name:g.name,aliases:[g.name]}),y=()=>({definition:e=>l(e,`init`).description(`scaffold a new ${g.name} project`).argument(`[name]`,`name of the project directory (defaults to the current folder)`),handler:async(e,t)=>{let{commandTitle:n}=_({command:t,version:g.version});i.intro({title:n,color:u.cyan});let a=r(`cyan`),o=t?.args[0];try{let e=o||await p({message:`Where should your project live?`,default:`${g.name}-dApp`,validate:e=>e.trim()?!0:`directory name cannot be empty.`});a.succeed(`${u.cyan(e)} created successfully`),i.outro({title:n,color:u.magenta})}catch(e){a.stop(),exitWithError(e)}}}),b=()=>({definition:e=>l(e,`test`).description(`testing the cli command`).option(`-f, --flag`,`show flag in display`).option(`-d, --disk`,`show something`),handler:async(e,t)=>{let{commandTitle:n}=_({command:t,version:g.version});i.intro({title:n,color:u.magenta}),console.log({options:e}),i.outro({title:n,color:u.magenta})}}),x=h(m),S=()=>({definition:e=>l(e,`update`).description(`check and update to newest version`).option(`-y, --yes`,`skip update confirmation`),handler:async(e,n)=>{let o=a(),{commandTitle:l}=_({command:n,version:g.version});i.intro({title:l,color:u.cyan,symbol:`gear`});let d=r(`cyan`);d.start(`checking npm registry..`);let p=await t(g.name,g.version),m=()=>{s({headerTitle:`version status`,items:[{title:`latest: v${p.latest}`,description:`installed: v${p.current}`}],color:p.outdated?u.yellow:u.cyan})};if(!p.outdated)d.succeed(`already up to date`),console.log(),m(),console.log(),i.outro({title:`you're on the latest version (v${p.current}).`,color:u.green,symbol:`success`,margin:{top:!1}});else if(d.succeed(`new version found ${c.chevron} v${p.latest}`),console.log(),m(),console.log(),!e.yes&&!await f({message:`update to the latest version (v${p.latest})?`,default:!0}))i.outro({title:`update skipped.`,color:u.dim,symbol:`info`});else{d.start(`installing ${g.name}@${p.latest}..`);try{let[e,...t]=o.installer.split(` `);await x(e,[...t,`-g`,`${g.name}@${p.latest}`]),d.succeed(`updated ${g.name} to v${p.latest}`),i.outro({title:`successfully updated.`,color:u.green,symbol:`success`})}catch(e){d.fail(`failed to update ${g.name}.`);let t=e instanceof Error?e.message:`unknown update error.`;i.outro({title:t,color:u.red,symbol:`error`,exitType:1})}}}}),C={init:{register(e){y().definition(e).action((e,t)=>y().handler(e,t))}},test:{register(e){b().definition(e).action((e,t)=>b().handler(e,t))}},update:{register(e){S().definition(e).action((e,t)=>S().handler(e,t))}}},w=process.argv[2],T=/* @__PURE__ */ new Set([`update`,`-h`,`--help`]);async function E(){T.has(w)||await Promise.race([(async()=>{let t=v(),n=await e(g.name,g.version);n.outdated&&(console.log(),s({headerTitle:`update available`,items:[{title:`v${n.latest} is now available (current: v${n.current})`,description:`Run \`${t} update\` to upgrade to the latest version.`}],color:u.yellow}))})(),new Promise(e=>setTimeout(e,1500))]);let t=new d;t.name(g.name).description(g.description).version(g.version,`-v, --version`,`show version`),t.configureOutput({writeOut:e=>{if(e.trim()===g.version){let e=process.version;process.stdout.write(`v${g.version}\n${`${c.chevron} node ${e} (from PATH)`}\n`)}else process.stdout.write(e)}}),Object.values(C).forEach(e=>{e.register(t)}),await o(async()=>{await t.parseAsync(process.argv)})()}E();export{};
2
+ import e from"chalk";import{Command as t}from"commander";import{checkForUpdate as n,checkForUpdateFresh as r,createCli as i,createSpinner as a,display as o,getPackageManager as s,onCancel as c,showTree as l,symbols as u,typedCommand as d}from"@plekta/utils";import{confirm as f,input as p}from"@inquirer/prompts";import{execFile as m}from"node:child_process";import{promisify as h}from"node:util";const g={name:`plekta`,version:`0.0.5`,description:`Description coming soon`,type:`module`,license:`MIT`,author:{name:`Osilama`,email:`thelastofinusa@gmail.com`,url:`https://thelastofinusa.vercel.app`},main:`./dist/index.mjs`,module:`./dist/index.mjs`,types:`./dist/index.d.ts`,exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.mjs`}},bin:{plekta:`./dist/index.mjs`},files:[`dist`,`README.md`],engines:{node:`>=18`},scripts:{build:`tsdown`,start:`bun run ./src/index.ts`,lint:`biome check .`,clean:`rm -rf .turbo dist node_modules`,"pack:dry":`bun run build && bun pm pack --dry-run`,prepublishOnly:`bun run build`,typecheck:`tsdown --noEmit`},dependencies:{"@inquirer/prompts":`^8.7.2`,"@plekta/utils":`^0.0.2`,chalk:`^6.0.0`,commander:`^15.0.0`,ora:`^9.4.1`},devDependencies:{"@plekta/tsconfig":`^0.0.0`,"@types/bun":`^1.4.3`,"@types/node":`^22.20.2`,tsdown:`0.22.14`}},{createCommandTitle:_,resolveCommandName:v}=i({name:g.name,aliases:[g.name]});var y=class extends Error{code;constructor(e,t){super(t),this.name=`TamioError`,this.code=e}};function b(t){if(t instanceof Error&&t.name===`ExitPromptError`)throw t;let n=t instanceof Error?t.message:String(t);return!(t instanceof y)&&process.env.TAMIO_DEBUG&&console.error(t),o.outro({title:n,color:e.red,symbol:`error`,exitType:1}),process.exit(1)}const x=()=>({definition:e=>d(e,`init`).description(`scaffold a new ${g.name} project`).argument(`[name]`,`name of the project directory (defaults to the current folder)`),handler:async(t,n)=>{let{commandTitle:r}=_({command:n,version:g.version});o.intro({title:r,color:e.cyan});let i=a(`cyan`),s=n?.args[0];try{let t=s||await p({message:`Where should your project live?`,default:`${g.name}-dApp`,validate:e=>e.trim()?!0:`directory name cannot be empty.`});i.succeed(`${e.cyan(t)} created successfully`),o.outro({title:r,color:e.magenta})}catch(e){i.stop(),b(e)}}}),S=()=>({definition:e=>d(e,`test`).description(`testing the cli command`).option(`-f, --flag`,`show flag in display`).option(`-d, --disk`,`show something`),handler:async(t,n)=>{let{commandTitle:r}=_({command:n,version:g.version});o.intro({title:r,color:e.magenta}),console.log({options:t}),o.outro({title:r,color:e.magenta})}}),C=h(m),w=()=>({definition:e=>d(e,`update`).description(`check and update to newest version`).option(`-y, --yes`,`skip update confirmation`),handler:async(t,n)=>{let i=s(),{commandTitle:c}=_({command:n,version:g.version});o.intro({title:c,color:e.cyan,symbol:`gear`});let d=a(`cyan`);d.start(`checking npm registry..`);let p=await r(g.name,g.version),m=()=>{l({headerTitle:`version status`,items:[{title:`latest: v${p.latest}`,description:`installed: v${p.current}`}],color:p.outdated?e.yellow:e.cyan})};if(!p.outdated)d.succeed(`already up to date`),console.log(),m(),console.log(),o.outro({title:`you're on the latest version (v${p.current}).`,color:e.green,symbol:`success`,margin:{top:!1}});else if(d.succeed(`new version found ${u.chevron} v${p.latest}`),console.log(),m(),console.log(),!t.yes&&!await f({message:`update to the latest version (v${p.latest})?`,default:!0}))o.outro({title:`update skipped.`,color:e.dim,symbol:`info`});else{d.start(`installing ${g.name}@${p.latest}..`);try{let[t,...n]=i.installer.split(` `);await C(t,[...n,`-g`,`${g.name}@${p.latest}`]),d.succeed(`updated ${g.name} to v${p.latest}`),o.outro({title:`successfully updated.`,color:e.green,symbol:`success`})}catch(t){d.fail(`failed to update ${g.name}.`);let n=t instanceof Error?t.message:`unknown update error.`;o.outro({title:n,color:e.red,symbol:`error`,exitType:1})}}}}),T={init:{register(e){x().definition(e).action((e,t)=>x().handler(e,t))}},test:{register(e){S().definition(e).action((e,t)=>S().handler(e,t))}},update:{register(e){w().definition(e).action((e,t)=>w().handler(e,t))}}},E=process.argv[2],D=/* @__PURE__ */ new Set([`update`,`-h`,`--help`]);async function O(){D.has(E)||await Promise.race([(async()=>{let t=v(),r=await n(g.name,g.version);r.outdated&&(console.log(),l({headerTitle:`update available`,items:[{title:`v${r.latest} is now available (current: v${r.current})`,description:`Run \`${t} update\` to upgrade to the latest version.`}],color:e.yellow}))})(),new Promise(e=>setTimeout(e,1500))]);let r=new t;r.name(g.name).description(g.description).version(g.version,`-v, --version`,`show version`),r.configureOutput({writeOut:e=>{if(e.trim()===g.version){let e=process.version;process.stdout.write(`v${g.version}\n${`${u.chevron} node ${e} (from PATH)`}\n`)}else process.stdout.write(e)}}),Object.values(T).forEach(e=>{e.register(r)}),await c(async()=>{await r.parseAsync(process.argv)})()}O();export{};
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["packageJson","chalk","pkg","\"name\"","\"email\"","\"url\"","\"types\"","\"import\"","\"plekta\"","\"node\"","\"build\"","\"start\"","\"lint\"","\"clean\"","\"prepublishOnly\"","\"typecheck\"","\"chalk\"","\"commander\"","\"ora\"","\"tsdown\"","createCli","initCommand","typedCommand","program","createCommandTitle","display","commandTitle","spinner","createSpinner","dir","command","directoryName","input","value","error","testCommand","execFileAsync","promisify","execFile","updateCommand","pm","getPackageManager","info","checkForUpdateFresh","renderVersionTree","showTree","symbols","options","confirm","executable","args","message","commandHandlers","invoked","SKIP_PASSIVE_CHECK","main","resolveCommandName","checkForUpdate","resolve","Command","str","nodeVersion","handler","onCancel"],"sources":["../package.json","../src/config/package.ts","../src/core/cli.ts","../src/commands/handlers/init.helper.ts","../src/commands/handlers/test.handler.ts","../src/commands/handlers/update.handler.ts","../src/commands/index.ts","../src/index.ts"],"sourcesContent":["","import packageJson from \"../../package.json\";\n\nexport const pkg = { ...packageJson };\n","import { createCli } from \"@plekta/utils\";\nimport { pkg } from \"../config/package\";\n\nexport const { createCommandTitle, resolveCommandName } = createCli({\n name: pkg.name,\n aliases: [pkg.name],\n});\n","import { input } from \"@inquirer/prompts\";\nimport {\n createSpinner,\n display,\n type InferCommandOptions,\n typedCommand,\n} from \"@plekta/utils\";\nimport chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\n\nexport const initCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"init\")\n .description(`scaffold a new ${pkg.name} project`)\n .argument(\n \"[name]\",\n \"name of the project directory (defaults to the current folder)\",\n );\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n _options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.cyan,\n });\n\n const spinner = createSpinner(\"cyan\");\n const dir = command?.args[0];\n\n try {\n const directoryName =\n dir ||\n (await input({\n message: \"Where should your project live?\",\n default: `${pkg.name}-dApp`,\n validate: (value) => {\n if (!value.trim()) return \"directory name cannot be empty.\";\n return true;\n },\n }));\n\n spinner.succeed(`${chalk.cyan(directoryName)} created successfully`);\n\n display.outro({\n title: commandTitle,\n color: chalk.magenta,\n });\n } catch (error) {\n spinner.stop();\n exitWithError(error);\n }\n };\n\n return { definition, handler };\n};\n","import { display, type InferCommandOptions, typedCommand } from \"@plekta/utils\";\nimport chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\n\nexport const testCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"test\")\n .description(\"testing the cli command\")\n .option(\"-f, --flag\", \"show flag in display\")\n .option(\"-d, --disk\", \"show something\");\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.magenta,\n });\n\n console.log({ options });\n\n display.outro({\n title: commandTitle,\n color: chalk.magenta,\n });\n };\n\n return { definition, handler };\n};\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { confirm } from \"@inquirer/prompts\";\nimport {\n checkForUpdateFresh,\n createSpinner,\n display,\n getPackageManager,\n type InferCommandOptions,\n showTree,\n symbols,\n typedCommand,\n} from \"@plekta/utils\";\nimport chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\n\nconst execFileAsync = promisify(execFile);\n\nexport const updateCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"update\")\n .description(\"check and update to newest version\")\n .option(\"-y, --yes\", \"skip update confirmation\");\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const pm = getPackageManager();\n\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.cyan,\n symbol: \"gear\",\n });\n\n const spinner = createSpinner(\"cyan\");\n spinner.start(\"checking npm registry..\");\n\n const info = await checkForUpdateFresh(pkg.name, pkg.version);\n\n const renderVersionTree = () => {\n showTree({\n headerTitle: \"version status\",\n items: [\n {\n title: `latest: v${info.latest}`,\n description: `installed: v${info.current}`,\n },\n ],\n color: info.outdated ? chalk.yellow : chalk.cyan,\n });\n };\n\n if (!info.outdated) {\n spinner.succeed(\"already up to date\");\n\n console.log();\n renderVersionTree();\n console.log();\n\n display.outro({\n title: `you're on the latest version (v${info.current}).`,\n color: chalk.green,\n symbol: \"success\",\n margin: { top: false },\n });\n\n return;\n }\n\n spinner.succeed(`new version found ${symbols.chevron} v${info.latest}`);\n\n console.log();\n renderVersionTree();\n console.log();\n\n if (!options.yes) {\n const shouldUpdate = await confirm({\n message: `update to the latest version (v${info.latest})?`,\n default: true,\n });\n\n if (!shouldUpdate) {\n display.outro({\n title: \"update skipped.\",\n color: chalk.dim,\n symbol: \"info\",\n });\n\n return;\n }\n }\n\n spinner.start(`installing ${pkg.name}@${info.latest}..`);\n\n try {\n const [executable, ...args] = pm.installer.split(\" \");\n\n await execFileAsync(executable, [\n ...args,\n \"-g\",\n `${pkg.name}@${info.latest}`,\n ]);\n\n spinner.succeed(`updated ${pkg.name} to v${info.latest}`);\n\n display.outro({\n title: \"successfully updated.\",\n color: chalk.green,\n symbol: \"success\",\n });\n } catch (error) {\n spinner.fail(`failed to update ${pkg.name}.`);\n\n const message =\n error instanceof Error ? error.message : \"unknown update error.\";\n\n display.outro({\n title: message,\n color: chalk.red,\n symbol: \"error\",\n exitType: 1,\n });\n }\n };\n\n return { definition, handler };\n};\n","import type { Command } from \"commander\";\nimport { initCommand } from \"./handlers/init.helper\";\nimport { testCommand } from \"./handlers/test.handler\";\nimport { updateCommand } from \"./handlers/update.handler\";\n\nexport const commandHandlers = {\n init: {\n register(program: Command) {\n initCommand()\n .definition(program)\n .action((options, command) => initCommand().handler(options, command));\n },\n },\n test: {\n register(program: Command) {\n testCommand()\n .definition(program)\n .action((options, command) => testCommand().handler(options, command));\n },\n },\n update: {\n register(program: Command) {\n updateCommand()\n .definition(program)\n .action((options, command) =>\n updateCommand().handler(options, command),\n );\n },\n },\n};\n","import { checkForUpdate, onCancel, showTree, symbols } from \"@plekta/utils\";\nimport chalk from \"chalk\";\nimport { Command } from \"commander\";\nimport { commandHandlers } from \"./commands\";\nimport { pkg } from \"./config/package\";\nimport { resolveCommandName } from \"./core/cli\";\n\nconst invoked = process.argv[2];\nconst SKIP_PASSIVE_CHECK = new Set([\"update\", \"-h\", \"--help\"]);\n\nasync function main() {\n if (!SKIP_PASSIVE_CHECK.has(invoked)) {\n await Promise.race([\n (async () => {\n const command = resolveCommandName();\n\n const info = await checkForUpdate(pkg.name, pkg.version);\n\n if (info.outdated) {\n console.log();\n\n showTree({\n headerTitle: \"update available\",\n items: [\n {\n title: `v${info.latest} is now available (current: v${info.current})`,\n description: `Run \\`${command} update\\` to upgrade to the latest version.`,\n },\n ],\n color: chalk.yellow,\n });\n }\n })(),\n new Promise((resolve) => setTimeout(resolve, 1500)),\n ]);\n }\n\n const program = new Command();\n\n program\n .name(pkg.name)\n .description(pkg.description)\n .version(pkg.version, \"-v, --version\", \"show version\");\n\n program.configureOutput({\n writeOut: (str) => {\n if (str.trim() === pkg.version) {\n const nodeVersion = process.version;\n\n process.stdout.write(\n `v${pkg.version}\\n${`${symbols.chevron} node ${nodeVersion} (from PATH)`}\\n`,\n );\n\n return;\n }\n\n process.stdout.write(str);\n },\n });\n\n Object.values(commandHandlers).forEach((handler) => {\n handler.register(program);\n });\n\n // Parse arguments inside the shared cancellation wrapper.\n await onCancel(async () => {\n await program.parseAsync(process.argv);\n })();\n}\n\nvoid main();\n"],"mappings":";A,6YCEA,MAAaE,EAAM,C,w2BAAiB,ECCvB,CAAE,qBAAoB,sBAAuBkB,EAAU,CAClE,KAAMlB,EAAI,KACV,QAAS,CAACA,EAAI,IAAI,CACpB,CAAC,ECMYmB,OAwDJ,CAAE,WApDW,GAClBC,EAAaC,EAAS,MAAM,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G,EAAS,CACP,YAAa,mBACb,MAAO,CACL,CACE,MAAO,IAAIH,EAAK,OAAO,+BAA+BA,EAAK,QAAQ,GACnE,YAAa,SAASZ,EAAQ,4CAChC,CACF,EACA,MAAO7B,EAAM,MACf,CAAC,EAEL,EAAA,CAAG,EACH,IAAI,QAAS,GAAY,WAAWyD,EAAS,IAAI,CAAC,CACpD,CAAC,EAGH,IAAMnC,EAAU,IAAIoC,EAEpBpC,EACG,KAAKrB,EAAI,IAAI,CAAC,CACd,YAAYA,EAAI,WAAW,CAAC,CAC5B,QAAQA,EAAI,QAAS,gBAAiB,cAAc,EAEvDqB,EAAQ,gBAAgB,CACtB,SAAW,GAAQ,CACjB,GAAIqC,EAAI,KAAK,IAAM1D,EAAI,QAAS,CAC9B,IAAM2D,EAAc,QAAQ,QAE5B,QAAQ,OAAO,MACb,IAAI3D,EAAI,QAAQ,IAAI,GAAG4C,EAAQ,QAAQ,QAAQe,EAAY,cAAc,GAC3E,CAGF,MAEA,QAAQ,OAAO,MAAMD,CAAG,CAC1B,CACF,CAAC,EAED,OAAO,OAAOR,CAAe,CAAC,CAAC,QAAS,GAAY,CAClDU,EAAQ,SAASvC,CAAO,CAC1B,CAAC,EAGD,MAAMwC,EAAS,SAAY,CACzB,MAAMxC,EAAQ,WAAW,QAAQ,IAAI,CACvC,CAAC,CAAC,CAAC,CACL,CAEKgC,EAAK,E"}
1
+ {"version":3,"file":"index.mjs","names":["packageJson","chalk","pkg","\"name\"","\"email\"","\"url\"","\"types\"","\"import\"","\"plekta\"","\"node\"","\"build\"","\"start\"","\"lint\"","\"clean\"","\"prepublishOnly\"","\"typecheck\"","\"chalk\"","\"commander\"","\"ora\"","\"tsdown\"","createCli","TamioError","message","code","exitWithError","error","display","initCommand","typedCommand","program","createCommandTitle","commandTitle","spinner","createSpinner","dir","command","directoryName","input","value","testCommand","execFileAsync","promisify","execFile","updateCommand","pm","getPackageManager","info","checkForUpdateFresh","renderVersionTree","showTree","symbols","options","confirm","executable","args","commandHandlers","invoked","SKIP_PASSIVE_CHECK","main","resolveCommandName","checkForUpdate","resolve","Command","str","nodeVersion","handler","onCancel"],"sources":["../package.json","../src/config/package.ts","../src/core/cli.ts","../src/core/errors.ts","../src/commands/handlers/init.helper.ts","../src/commands/handlers/test.handler.ts","../src/commands/handlers/update.handler.ts","../src/commands/index.ts","../src/index.ts"],"sourcesContent":["","import packageJson from \"../../package.json\";\n\nexport const pkg = { ...packageJson };\n","import { createCli } from \"@plekta/utils\";\nimport { pkg } from \"../config/package\";\n\nexport const { createCommandTitle, resolveCommandName } = createCli({\n name: pkg.name,\n aliases: [pkg.name],\n});\n","import chalk from \"chalk\";\nimport { display } from \"@plekta/utils\";\n\nexport type TamioErrorCode =\n | \"INVALID_PACKAGE_NAME\"\n | \"INVALID_VERSION\"\n | \"VERSION_NOT_FOUND\"\n | \"VERSION_EXISTS\"\n | \"INVALID_TRANSITION\"\n | \"NOTHING_TO_PUBLISH\"\n | \"ALREADY_PUBLISHED\"\n | \"VERSION_SKIPPED\"\n | \"CORRUPT_STORE\"\n | \"INVALID_PACKAGE_JSON\"\n | \"PACKAGE_PRIVATE\"\n | \"UNSUPPORTED_PACKAGE_MANAGER\"\n | \"BUILD_FAILED\"\n | \"PACK_FAILED\";\n\n/**\n * Every failure raised by \"@tamio/core\". The `code` is stable, so the CLI and\n * Studio can branch on it instead of matching message text.\n */\nexport class TamioError extends Error {\n readonly code: TamioErrorCode;\n\n constructor(code: TamioErrorCode, message: string) {\n super(message);\n this.name = \"TamioError\";\n this.code = code;\n }\n}\n\n/**\n * Print an error the way every command does, then exit with code 1.\n *\n * A cancelled prompt (Ctrl-C) is rethrown instead, so the shared\n * cancellation handler in index.ts can deal with it.\n */\nexport function exitWithError(error: unknown): never {\n if (error instanceof Error && error.name === \"ExitPromptError\") {\n throw error;\n }\n\n const message = error instanceof Error ? error.message : String(error);\n\n // Unexpected errors (bugs, not Tamio's own checks) get their stack on request.\n if (!(error instanceof TamioError) && process.env.TAMIO_DEBUG) {\n console.error(error);\n }\n\n display.outro({\n title: message,\n color: chalk.red,\n symbol: \"error\",\n exitType: 1,\n });\n\n return process.exit(1);\n}\n","import { input } from \"@inquirer/prompts\";\nimport chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport {\n createSpinner,\n display,\n type InferCommandOptions,\n typedCommand,\n} from \"@plekta/utils\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\nimport { exitWithError } from \"../../core/errors\";\n\nexport const initCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"init\")\n .description(`scaffold a new ${pkg.name} project`)\n .argument(\n \"[name]\",\n \"name of the project directory (defaults to the current folder)\",\n );\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n _options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.cyan,\n });\n\n const spinner = createSpinner(\"cyan\");\n const dir = command?.args[0];\n\n try {\n const directoryName =\n dir ||\n (await input({\n message: \"Where should your project live?\",\n default: `${pkg.name}-dApp`,\n validate: (value) => {\n if (!value.trim()) return \"directory name cannot be empty.\";\n return true;\n },\n }));\n\n spinner.succeed(`${chalk.cyan(directoryName)} created successfully`);\n\n display.outro({\n title: commandTitle,\n color: chalk.magenta,\n });\n } catch (error) {\n spinner.stop();\n exitWithError(error);\n }\n };\n\n return { definition, handler };\n};\n","import chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport {\n display,\n type InferCommandOptions,\n typedCommand,\n} from \"@plekta/utils\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\n\nexport const testCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"test\")\n .description(\"testing the cli command\")\n .option(\"-f, --flag\", \"show flag in display\")\n .option(\"-d, --disk\", \"show something\");\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.magenta,\n });\n\n console.log({ options });\n\n display.outro({\n title: commandTitle,\n color: chalk.magenta,\n });\n };\n\n return { definition, handler };\n};\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { confirm } from \"@inquirer/prompts\";\nimport chalk from \"chalk\";\nimport type { Command } from \"commander\";\nimport {\n checkForUpdateFresh,\n createSpinner,\n display,\n getPackageManager,\n type InferCommandOptions,\n showTree,\n symbols,\n typedCommand,\n} from \"@plekta/utils\";\nimport { pkg } from \"../../config/package\";\nimport { createCommandTitle } from \"../../core/cli\";\n\nconst execFileAsync = promisify(execFile);\n\nexport const updateCommand = () => {\n //? ==========================================\n //? COMMAND DEFINITION\n //? ==========================================\n const definition = (program: Command) =>\n typedCommand(program, \"update\")\n .description(\"check and update to newest version\")\n .option(\"-y, --yes\", \"skip update confirmation\");\n\n //? ==========================================\n //? COMMAND HANDLER\n //? ==========================================\n const handler = async (\n options: InferCommandOptions<ReturnType<typeof definition>>,\n command?: Command,\n ) => {\n const pm = getPackageManager();\n\n const { commandTitle } = createCommandTitle({\n command,\n version: pkg.version,\n });\n\n display.intro({\n title: commandTitle,\n color: chalk.cyan,\n symbol: \"gear\",\n });\n\n const spinner = createSpinner(\"cyan\");\n spinner.start(\"checking npm registry..\");\n\n const info = await checkForUpdateFresh(pkg.name, pkg.version);\n\n const renderVersionTree = () => {\n showTree({\n headerTitle: \"version status\",\n items: [\n {\n title: `latest: v${info.latest}`,\n description: `installed: v${info.current}`,\n },\n ],\n color: info.outdated ? chalk.yellow : chalk.cyan,\n });\n };\n\n if (!info.outdated) {\n spinner.succeed(\"already up to date\");\n\n console.log();\n renderVersionTree();\n console.log();\n\n display.outro({\n title: `you're on the latest version (v${info.current}).`,\n color: chalk.green,\n symbol: \"success\",\n margin: { top: false },\n });\n\n return;\n }\n\n spinner.succeed(`new version found ${symbols.chevron} v${info.latest}`);\n\n console.log();\n renderVersionTree();\n console.log();\n\n if (!options.yes) {\n const shouldUpdate = await confirm({\n message: `update to the latest version (v${info.latest})?`,\n default: true,\n });\n\n if (!shouldUpdate) {\n display.outro({\n title: \"update skipped.\",\n color: chalk.dim,\n symbol: \"info\",\n });\n\n return;\n }\n }\n\n spinner.start(`installing ${pkg.name}@${info.latest}..`);\n\n try {\n const [executable, ...args] = pm.installer.split(\" \");\n\n await execFileAsync(executable, [\n ...args,\n \"-g\",\n `${pkg.name}@${info.latest}`,\n ]);\n\n spinner.succeed(`updated ${pkg.name} to v${info.latest}`);\n\n display.outro({\n title: \"successfully updated.\",\n color: chalk.green,\n symbol: \"success\",\n });\n } catch (error) {\n spinner.fail(`failed to update ${pkg.name}.`);\n\n const message =\n error instanceof Error ? error.message : \"unknown update error.\";\n\n display.outro({\n title: message,\n color: chalk.red,\n symbol: \"error\",\n exitType: 1,\n });\n }\n };\n\n return { definition, handler };\n};\n","import type { Command } from \"commander\";\nimport { initCommand } from \"./handlers/init.helper\";\nimport { testCommand } from \"./handlers/test.handler\";\nimport { updateCommand } from \"./handlers/update.handler\";\n\nexport const commandHandlers = {\n init: {\n register(program: Command) {\n initCommand()\n .definition(program)\n .action((options, command) => initCommand().handler(options, command));\n },\n },\n test: {\n register(program: Command) {\n testCommand()\n .definition(program)\n .action((options, command) => testCommand().handler(options, command));\n },\n },\n update: {\n register(program: Command) {\n updateCommand()\n .definition(program)\n .action((options, command) =>\n updateCommand().handler(options, command),\n );\n },\n },\n};\n","import chalk from \"chalk\";\nimport { Command } from \"commander\";\nimport {\n checkForUpdate,\n onCancel,\n showTree,\n symbols,\n} from \"@plekta/utils\";\nimport { commandHandlers } from \"./commands\";\nimport { pkg } from \"./config/package\";\nimport { resolveCommandName } from \"./core/cli\";\n\nconst invoked = process.argv[2];\nconst SKIP_PASSIVE_CHECK = new Set([\"update\", \"-h\", \"--help\"]);\n\nasync function main() {\n if (!SKIP_PASSIVE_CHECK.has(invoked)) {\n await Promise.race([\n (async () => {\n const command = resolveCommandName();\n\n const info = await checkForUpdate(pkg.name, pkg.version);\n\n if (info.outdated) {\n console.log();\n\n showTree({\n headerTitle: \"update available\",\n items: [\n {\n title: `v${info.latest} is now available (current: v${info.current})`,\n description: `Run \\`${command} update\\` to upgrade to the latest version.`,\n },\n ],\n color: chalk.yellow,\n });\n }\n })(),\n new Promise((resolve) => setTimeout(resolve, 1500)),\n ]);\n }\n\n const program = new Command();\n\n program\n .name(pkg.name)\n .description(pkg.description)\n .version(pkg.version, \"-v, --version\", \"show version\");\n\n program.configureOutput({\n writeOut: (str) => {\n if (str.trim() === pkg.version) {\n const nodeVersion = process.version;\n\n process.stdout.write(\n `v${pkg.version}\\n${`${symbols.chevron} node ${nodeVersion} (from PATH)`}\\n`,\n );\n\n return;\n }\n\n process.stdout.write(str);\n },\n });\n\n Object.values(commandHandlers).forEach((handler) => {\n handler.register(program);\n });\n\n // Parse arguments inside the shared cancellation wrapper.\n await onCancel(async () => {\n await program.parseAsync(process.argv);\n })();\n}\n\nvoid main();\n"],"mappings":";A,6YCEA,MAAaE,EAAM,C,w2BAAiB,ECCvB,CAAE,qBAAoB,sBAAuBkB,EAAU,CAClE,KAAMlB,EAAI,KACV,QAAS,CAACA,EAAI,IAAI,CACpB,CAAC,ECiBD,IAAamB,EAAb,cAAgC,KAAM,CACpC,KAEA,YAAY,EAAsB,EAAiB,CACjD,MAAMC,CAAO,EACb,KAAK,KAAO,aACZ,KAAK,KAAOC,CACd,CACF,EAQA,SAAgBC,EAAc,EAAuB,CACnD,GAAIC,aAAiB,OAASA,EAAM,OAAS,kBAC3C,MAAMA,EAGR,IAAMH,EAAUG,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,EAcrE,MAXI,EAAEA,aA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,SAAU,KAAM,QAAQ,CAAC,EAE7D,eAAeC,GAAO,CACfD,EAAmB,IAAID,CAAO,GACjC,MAAM,QAAQ,KAAK,EAChB,SAAY,CACX,IAAMrB,EAAUwB,EAAmB,EAE7Bb,EAAO,MAAMc,EAAe1D,EAAI,KAAMA,EAAI,OAAO,EAEnD4C,EAAK,WACP,QAAQ,IAAI,EAEZG,EAAS,CACP,YAAa,mBACb,MAAO,CACL,CACE,MAAO,IAAIH,EAAK,OAAO,+BAA+BA,EAAK,QAAQ,GACnE,YAAa,SAASX,EAAQ,4CAChC,CACF,EACA,MAAOlC,EAAM,MACf,CAAC,EAEL,EAAA,CAAG,EACH,IAAI,QAAS,GAAY,WAAW4D,EAAS,IAAI,CAAC,CACpD,CAAC,EAGH,IAAMhC,EAAU,IAAIiC,EAEpBjC,EACG,KAAK3B,EAAI,IAAI,CAAC,CACd,YAAYA,EAAI,WAAW,CAAC,CAC5B,QAAQA,EAAI,QAAS,gBAAiB,cAAc,EAEvD2B,EAAQ,gBAAgB,CACtB,SAAW,GAAQ,CACjB,GAAIkC,EAAI,KAAK,IAAM7D,EAAI,QAAS,CAC9B,IAAM8D,EAAc,QAAQ,QAE5B,QAAQ,OAAO,MACb,IAAI9D,EAAI,QAAQ,IAAI,GAAGgD,EAAQ,QAAQ,QAAQc,EAAY,cAAc,GAC3E,CAGF,MAEA,QAAQ,OAAO,MAAMD,CAAG,CAC1B,CACF,CAAC,EAED,OAAO,OAAOR,CAAe,CAAC,CAAC,QAAS,GAAY,CAClDU,EAAQ,SAASpC,CAAO,CAC1B,CAAC,EAGD,MAAMqC,EAAS,SAAY,CACzB,MAAMrC,EAAQ,WAAW,QAAQ,IAAI,CACvC,CAAC,CAAC,CAAC,CACL,CAEK6B,EAAK,E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plekta",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Description coming soon",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@inquirer/prompts": "^8.7.2",
42
- "@plekta/utils": "^0.0.1",
42
+ "@plekta/utils": "^0.0.2",
43
43
  "chalk": "^6.0.0",
44
44
  "commander": "^15.0.0",
45
45
  "ora": "^9.4.1"