Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@stricli/create-app

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stricli/create-app - npm Package Compare versions

Comparing version
1.2.6
to
1.2.7
+1
dist/chunk-WD7TZLLM.js
var i={name:"@stricli/create-app",version:"1.2.7",description:"Generate a new Stricli application",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/create-app"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",bin:{"create-app":"dist/cli.js"},engines:{node:">=18.x"},scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src tests","lint:fix":"eslint src tests --fix",typecheck:"tsc -p tsconfig.json --noEmit",test:"vitest --run","test:update-snapshots":"vitest --run --update",coverage:"vitest --run --coverage.enabled",build:"tsup --silent",prepublishOnly:"npm run build"},tsup:{entry:["src/bin/cli.ts"],format:["esm"],tsconfig:"src/tsconfig.json",clean:!0,splitting:!0,minify:!0},dependencies:{"@stricli/auto-complete":"^1.2.7","@stricli/core":"^1.2.7"},devDependencies:{"@types/chai":"^4.3.16","@types/node":"^18.19.33","@types/sinon":"^17.0.3","@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-prettier":"^5.1.3","fs-extra":"^11.2.0",memfs:"^4.9.2",prettier:"^3.2.5",sinon:"^18.0.0",tsup:"^6.7.0",tsx:"^4.8.2","type-fest":"^3.5.4",typescript:"5.6.x"}};export{i as a};
import{a as r}from"./chunk-WD7TZLLM.js";var C=`# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Dependency directories
node_modules/
jspm_packages/
*.tsbuildinfo
dist
`,b=`import type { CommandContext } from "@stricli/core";
export interface LocalContext extends CommandContext {
readonly process: NodeJS.Process;
// ...
}
export function buildContext(process: NodeJS.Process): LocalContext {
return {
process,
};
}
`,x=`import type { CommandContext } from "@stricli/core";
import type { StricliAutoCompleteContext } from "@stricli/auto-complete";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
export interface LocalContext extends CommandContext, StricliAutoCompleteContext {
readonly process: NodeJS.Process;
// ...
}
export function buildContext(process: NodeJS.Process): LocalContext {
return {
process,
os,
fs,
path,
};
}
`,f=`import type { LocalContext } from "./context";
interface CommandFlags {
readonly count: number;
}
export default async function(this: LocalContext, flags: CommandFlags, name: string): Promise<void> {
this.process.stdout.write(\`Hello \${name}!\\n\`.repeat(flags.count));
}
`,g=`import { buildApplication, buildCommand, numberParser } from "@stricli/core";
import { name, version, description } from "../package.json";
const command = buildCommand({
loader: async () => import("./impl"),
parameters: {
positional: {
kind: "tuple",
parameters: [
{
brief: "Your name",
parse: String,
},
],
},
flags: {
count: {
kind: "parsed",
brief: "Number of times to say hello",
parse: numberParser,
},
},
},
docs: {
brief: description,
},
});
export const app = buildApplication(command, {
name,
versionInfo: {
currentVersion: version,
},
});
`,y=`import type { LocalContext } from "../../context";
interface SubdirCommandFlags {
// ...
}
export default async function(this: LocalContext, flags: SubdirCommandFlags): Promise<void> {
// ...
}
`,v=`import { buildCommand } from "@stricli/core";
export const subdirCommand = buildCommand({
loader: async () => import("./impl"),
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Command in subdirectory",
},
});
`,h=`import type { LocalContext } from "../../context";
interface FooCommandFlags {
// ...
}
export async function foo(this: LocalContext, flags: FooCommandFlags): Promise<void> {
// ...
}
interface BarCommandFlags {
// ...
}
export async function bar(this: LocalContext, flags: BarCommandFlags): Promise<void> {
// ...
}
`,T=`import { buildCommand, buildRouteMap } from "@stricli/core";
export const fooCommand = buildCommand({
loader: async () => {
const { foo } = await import("./impl");
return foo;
},
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Nested foo command",
},
});
export const barCommand = buildCommand({
loader: async () => {
const { bar } = await import("./impl");
return bar;
},
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Nested bar command",
},
});
export const nestedRoutes = buildRouteMap({
routes: {
foo: fooCommand,
bar: barCommand,
},
docs: {
brief: "Nested commands",
},
});
`,P=`import { buildApplication, buildRouteMap } from "@stricli/core";
import { name, version, description } from "../package.json";
import { subdirCommand } from "./commands/subdir/command";
import { nestedRoutes } from "./commands/nested/commands";
const routes = buildRouteMap({
routes: {
subdir: subdirCommand,
nested: nestedRoutes,
},
docs: {
brief: description,
},
});
export const app = buildApplication(routes, {
name,
versionInfo: {
currentVersion: version,
},
});
`;function k(e,t){return`import { buildApplication, buildRouteMap } from "@stricli/core";
import { buildInstallCommand, buildUninstallCommand } from "@stricli/auto-complete";
import { name, version, description } from "../package.json";
import { subdirCommand } from "./commands/subdir/command";
import { nestedRoutes } from "./commands/nested/commands";
const routes = buildRouteMap({
routes: {
subdir: subdirCommand,
nested: nestedRoutes,
install: buildInstallCommand("${e}", { bash: "${t}" }),
uninstall: buildUninstallCommand("${e}", { bash: true }),
},
docs: {
brief: description,
hideRoute: {
install: true,
uninstall: true,
},
},
});
export const app = buildApplication(routes, {
name,
versionInfo: {
currentVersion: version,
},
});
`}var w=`#!/usr/bin/env node
import { run } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
await run(app, process.argv.slice(2), buildContext(process));
`,S=`#!/usr/bin/env node
import { run } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
void run(app, process.argv.slice(2), buildContext(process));
`,J=`#!/usr/bin/env node
import { proposeCompletions } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
const inputs = process.argv.slice(3);
if (process.env["COMP_LINE"]?.endsWith(" ")) {
inputs.push("");
}
await proposeCompletions(app, inputs, buildContext(process));
try {
for (const { completion } of await proposeCompletions(app, inputs, buildContext(process))) {
process.stdout.write(\`\${completion}\\n\`);
}
} catch {
// ignore
}
`,L=`#!/usr/bin/env node
import { proposeCompletions } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
const inputs = process.argv.slice(3);
if (process.env["COMP_LINE"]?.endsWith(" ")) {
inputs.push("");
}
void proposeCompletions(app, inputs, buildContext(process)).then((completions) => {
for (const { completion } of completions) {
process.stdout.write(\`\${completion}\\n\`);
}
}, () => {
// ignore
});
`;var m={compilerOptions:{noEmit:!0,rootDir:"..",types:["node"],resolveJsonModule:!0,target:"esnext",module:"esnext",moduleResolution:"bundler",lib:["esnext"],skipLibCheck:!0,strict:!0,isolatedModules:!0,forceConsistentCasingInFileNames:!0,noImplicitOverride:!0,noPropertyAccessFromIndexSignature:!0,noUncheckedIndexedAccess:!0,verbatimModuleSyntax:!0},exclude:[],include:["**/*"]};function j(e){return`__${e}_bash_complete`}function M(e,t,n){return{...e,version:"0.0.0",files:["dist"],bin:{[t]:"dist/cli.js"},engines:{node:n&&`>=${n}`},scripts:{prebuild:"tsc -p src/tsconfig.json",build:"tsup --silent",prepublishOnly:"npm run build"},tsup:{entry:["src/bin/cli.ts"],format:[e.type==="commonjs"?"cjs":"esm"],tsconfig:"src/tsconfig.json",clean:!0,splitting:!0,minify:!0},dependencies:{"@stricli/core":r.dependencies["@stricli/core"]},devDependencies:{"@types/node":n&&`${n}.x`,tsup:r.devDependencies.tsup,typescript:r.devDependencies.typescript}}}function $(e,t){return{...e,dependencies:{...e.dependencies,"@stricli/auto-complete":r.dependencies["@stricli/auto-complete"]},bin:{...e.bin,[t]:"dist/bash-complete.js"},tsup:{...e.tsup,entry:[...e.tsup?.entry??[],"src/bin/bash-complete.ts"]}}}function A(e,t){return{...e,scripts:{...e.scripts,postinstall:t}}}async function W(e,t){let{fs:n,path:p}=this;await n.promises.mkdir(t,{recursive:!0});let o=async(l,d)=>{let F=p.join(t,l);await n.promises.writeFile(F,d)},a=async l=>{let d=p.join(t,l);await n.promises.mkdir(d,{recursive:!0})};await a("src");let u=e.name??p.basename(t),s=e.command??u,N=(typeof e.nodeVersion=="string"?e.nodeVersion:this.process.versions?.node)?.split(".")[0],i=M({name:u,author:e.author,description:e.description,license:e.license,type:e.type},s,N),c=j(s);e.autoComplete?(i=$(i,c),e.template==="multi"?i=A(i,`${s} install`):i=A(i,`npx @stricli/auto-complete@latest install ${s} --bash ${c}`),await o("src/context.ts",x)):await o("src/context.ts",b),await o("package.json",JSON.stringify(i,void 0,4)),await o(".gitignore",C);let I={compilerOptions:m.compilerOptions,include:m.include,exclude:m.exclude};await o("src/tsconfig.json",JSON.stringify(I,void 0,4)),e.template==="single"?(await o("src/impl.ts",f),await o("src/app.ts",g)):(await a("src/commands/subdir"),await o("src/commands/subdir/impl.ts",y),await o("src/commands/subdir/command.ts",v),await a("src/commands/nested"),await o("src/commands/nested/impl.ts",h),await o("src/commands/nested/commands.ts",T),e.autoComplete?await o("src/app.ts",k(s,c)):await o("src/app.ts",P)),await a("src/bin"),await o("src/bin/cli.ts",e.type==="module"?w:S),e.autoComplete&&await o("src/bin/bash-complete.ts",e.type==="module"?J:L)}export{W as default};
+1
-1
#!/usr/bin/env node
import{a as e}from"./chunk-BY423VVA.js";import{run as m}from"@stricli/core";import i from"node:fs";import n from"node:os";import a from"node:path";function t(o){return{process:o,os:n,fs:i,path:a}}import{buildApplication as s,buildCommand as p}from"@stricli/core";var d=p({loader:async()=>import("./impl-KRLOMRDU.js"),parameters:{positional:{kind:"tuple",parameters:[{brief:"Target path of new package directory",parse(o){return this.path.join(this.process.cwd(),o)},placeholder:"path"}]},flags:{type:{kind:"enum",brief:"Package type, controls output format of JS files",values:["commonjs","module"],default:"module"},template:{kind:"enum",brief:"Application template to generate",values:["single","multi"],default:"multi"},autoComplete:{kind:"boolean",brief:"Include auto complete postinstall script",default:!0},name:{kind:"parsed",brief:"Package name, if different from directory",parse:String,optional:!0},command:{kind:"parsed",brief:"Intended bin command, if different from name",parse:String,optional:!0},description:{kind:"parsed",brief:"Package description",parse:String,default:"Stricli command line application"},license:{kind:"parsed",brief:"Package license",parse:String,default:"MIT"},author:{kind:"parsed",brief:"Package author",parse:String,default:""},nodeVersion:{kind:"parsed",brief:"Node.js major version to use for engines.node minimum and @types/node, bypasses version discovery logic",parse:String,optional:!0,hidden:!0}},aliases:{n:"name",d:"description"}},docs:{brief:e.description}}),r=s(d,{name:e.name,versionInfo:{currentVersion:e.version},scanner:{caseStyle:"allow-kebab-for-camel"},documentation:{useAliasInUsageLine:!0}});await m(r,process.argv.slice(2),t(process));
import{a as e}from"./chunk-WD7TZLLM.js";import{run as m}from"@stricli/core";import i from"node:fs";import n from"node:os";import a from"node:path";function t(o){return{process:o,os:n,fs:i,path:a}}import{buildApplication as s,buildCommand as p}from"@stricli/core";var d=p({loader:async()=>import("./impl-YCPFBD63.js"),parameters:{positional:{kind:"tuple",parameters:[{brief:"Target path of new package directory",parse(o){return this.path.join(this.process.cwd(),o)},placeholder:"path"}]},flags:{type:{kind:"enum",brief:"Package type, controls output format of JS files",values:["commonjs","module"],default:"module"},template:{kind:"enum",brief:"Application template to generate",values:["single","multi"],default:"multi"},autoComplete:{kind:"boolean",brief:"Include auto complete postinstall script",default:!0},name:{kind:"parsed",brief:"Package name, if different from directory",parse:String,optional:!0},command:{kind:"parsed",brief:"Intended bin command, if different from name",parse:String,optional:!0},description:{kind:"parsed",brief:"Package description",parse:String,default:"Stricli command line application"},license:{kind:"parsed",brief:"Package license",parse:String,default:"MIT"},author:{kind:"parsed",brief:"Package author",parse:String,default:""},nodeVersion:{kind:"parsed",brief:"Node.js major version to use for engines.node minimum and @types/node, bypasses version discovery logic",parse:String,optional:!0,hidden:!0}},aliases:{n:"name",d:"description"}},docs:{brief:e.description}}),r=s(d,{name:e.name,versionInfo:{currentVersion:e.version},scanner:{caseStyle:"allow-kebab-for-camel"},documentation:{useAliasInUsageLine:!0}});await m(r,process.argv.slice(2),t(process));
/* v8 ignore start -- @preserve */
/* v8 ignore stop -- @preserve */
{
"name": "@stricli/create-app",
"version": "1.2.6",
"version": "1.2.7",
"description": "Generate a new Stricli application",

@@ -46,4 +46,4 @@ "license": "Apache-2.0",

"dependencies": {
"@stricli/auto-complete": "^1.2.6",
"@stricli/core": "^1.2.6"
"@stricli/auto-complete": "^1.2.7",
"@stricli/core": "^1.2.7"
},

@@ -50,0 +50,0 @@ "devDependencies": {

var i={name:"@stricli/create-app",version:"1.2.6",description:"Generate a new Stricli application",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/bloomberg/stricli/tree/main/packages/create-app"},author:"Michael Molisani <mmolisani@bloomberg.net>",files:["dist"],type:"module",bin:{"create-app":"dist/cli.js"},engines:{node:">=18.x"},scripts:{format:"prettier --config ../../.prettierrc -w .","format:check":"prettier --config ../../.prettierrc -c .",lint:"eslint src tests","lint:fix":"eslint src tests --fix",typecheck:"tsc -p tsconfig.json --noEmit",test:"vitest --run","test:update-snapshots":"vitest --run --update",coverage:"vitest --run --coverage.enabled",build:"tsup --silent",prepublishOnly:"npm run build"},tsup:{entry:["src/bin/cli.ts"],format:["esm"],tsconfig:"src/tsconfig.json",clean:!0,splitting:!0,minify:!0},dependencies:{"@stricli/auto-complete":"^1.2.6","@stricli/core":"^1.2.6"},devDependencies:{"@types/chai":"^4.3.16","@types/node":"^18.19.33","@types/sinon":"^17.0.3","@typescript-eslint/eslint-plugin":"^8.2.0","@typescript-eslint/parser":"^8.2.0",eslint:"^8.57.0","eslint-plugin-prettier":"^5.1.3","fs-extra":"^11.2.0",memfs:"^4.9.2",prettier:"^3.2.5",sinon:"^18.0.0",tsup:"^6.7.0",tsx:"^4.8.2","type-fest":"^3.5.4",typescript:"5.6.x"}};export{i as a};
import{a as r}from"./chunk-BY423VVA.js";var C=`# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Dependency directories
node_modules/
jspm_packages/
*.tsbuildinfo
dist
`,b=`import type { CommandContext } from "@stricli/core";
export interface LocalContext extends CommandContext {
readonly process: NodeJS.Process;
// ...
}
export function buildContext(process: NodeJS.Process): LocalContext {
return {
process,
};
}
`,x=`import type { CommandContext } from "@stricli/core";
import type { StricliAutoCompleteContext } from "@stricli/auto-complete";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
export interface LocalContext extends CommandContext, StricliAutoCompleteContext {
readonly process: NodeJS.Process;
// ...
}
export function buildContext(process: NodeJS.Process): LocalContext {
return {
process,
os,
fs,
path,
};
}
`,f=`import type { LocalContext } from "./context";
interface CommandFlags {
readonly count: number;
}
export default async function(this: LocalContext, flags: CommandFlags, name: string): Promise<void> {
this.process.stdout.write(\`Hello \${name}!\\n\`.repeat(flags.count));
}
`,g=`import { buildApplication, buildCommand, numberParser } from "@stricli/core";
import { name, version, description } from "../package.json";
const command = buildCommand({
loader: async () => import("./impl"),
parameters: {
positional: {
kind: "tuple",
parameters: [
{
brief: "Your name",
parse: String,
},
],
},
flags: {
count: {
kind: "parsed",
brief: "Number of times to say hello",
parse: numberParser,
},
},
},
docs: {
brief: description,
},
});
export const app = buildApplication(command, {
name,
versionInfo: {
currentVersion: version,
},
});
`,y=`import type { LocalContext } from "../../context";
interface SubdirCommandFlags {
// ...
}
export default async function(this: LocalContext, flags: SubdirCommandFlags): Promise<void> {
// ...
}
`,v=`import { buildCommand } from "@stricli/core";
export const subdirCommand = buildCommand({
loader: async () => import("./impl"),
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Command in subdirectory",
},
});
`,h=`import type { LocalContext } from "../../context";
interface FooCommandFlags {
// ...
}
export async function foo(this: LocalContext, flags: FooCommandFlags): Promise<void> {
// ...
}
interface BarCommandFlags {
// ...
}
export async function bar(this: LocalContext, flags: BarCommandFlags): Promise<void> {
// ...
}
`,T=`import { buildCommand, buildRouteMap } from "@stricli/core";
export const fooCommand = buildCommand({
loader: async () => {
const { foo } = await import("./impl");
return foo;
},
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Nested foo command",
},
});
export const barCommand = buildCommand({
loader: async () => {
const { bar } = await import("./impl");
return bar;
},
parameters: {
positional: {
kind: "tuple",
parameters: [],
},
},
docs: {
brief: "Nested bar command",
},
});
export const nestedRoutes = buildRouteMap({
routes: {
foo: fooCommand,
bar: barCommand,
},
docs: {
brief: "Nested commands",
},
});
`,P=`import { buildApplication, buildRouteMap } from "@stricli/core";
import { name, version, description } from "../package.json";
import { subdirCommand } from "./commands/subdir/command";
import { nestedRoutes } from "./commands/nested/commands";
const routes = buildRouteMap({
routes: {
subdir: subdirCommand,
nested: nestedRoutes,
},
docs: {
brief: description,
},
});
export const app = buildApplication(routes, {
name,
versionInfo: {
currentVersion: version,
},
});
`;function k(e,t){return`import { buildApplication, buildRouteMap } from "@stricli/core";
import { buildInstallCommand, buildUninstallCommand } from "@stricli/auto-complete";
import { name, version, description } from "../package.json";
import { subdirCommand } from "./commands/subdir/command";
import { nestedRoutes } from "./commands/nested/commands";
const routes = buildRouteMap({
routes: {
subdir: subdirCommand,
nested: nestedRoutes,
install: buildInstallCommand("${e}", { bash: "${t}" }),
uninstall: buildUninstallCommand("${e}", { bash: true }),
},
docs: {
brief: description,
hideRoute: {
install: true,
uninstall: true,
},
},
});
export const app = buildApplication(routes, {
name,
versionInfo: {
currentVersion: version,
},
});
`}var w=`#!/usr/bin/env node
import { run } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
await run(app, process.argv.slice(2), buildContext(process));
`,S=`#!/usr/bin/env node
import { run } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
void run(app, process.argv.slice(2), buildContext(process));
`,J=`#!/usr/bin/env node
import { proposeCompletions } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
const inputs = process.argv.slice(3);
if (process.env["COMP_LINE"]?.endsWith(" ")) {
inputs.push("");
}
await proposeCompletions(app, inputs, buildContext(process));
try {
for (const { completion } of await proposeCompletions(app, inputs, buildContext(process))) {
process.stdout.write(\`\${completion}\\n\`);
}
} catch {
// ignore
}
`,L=`#!/usr/bin/env node
import { proposeCompletions } from "@stricli/core";
import { buildContext } from "../context";
import { app } from "../app";
const inputs = process.argv.slice(3);
if (process.env["COMP_LINE"]?.endsWith(" ")) {
inputs.push("");
}
void proposeCompletions(app, inputs, buildContext(process)).then((completions) => {
for (const { completion } of completions) {
process.stdout.write(\`\${completion}\\n\`);
}
}, () => {
// ignore
});
`;var m={compilerOptions:{noEmit:!0,rootDir:"..",types:["node"],resolveJsonModule:!0,target:"esnext",module:"esnext",moduleResolution:"bundler",lib:["esnext"],skipLibCheck:!0,strict:!0,isolatedModules:!0,forceConsistentCasingInFileNames:!0,noImplicitOverride:!0,noPropertyAccessFromIndexSignature:!0,noUncheckedIndexedAccess:!0,verbatimModuleSyntax:!0},exclude:[],include:["**/*"]};function j(e){return`__${e}_bash_complete`}function M(e,t,n){return{...e,version:"0.0.0",files:["dist"],bin:{[t]:"dist/cli.js"},engines:{node:n&&`>=${n}`},scripts:{prebuild:"tsc -p src/tsconfig.json",build:"tsup --silent",prepublishOnly:"npm run build"},tsup:{entry:["src/bin/cli.ts"],format:[e.type==="commonjs"?"cjs":"esm"],tsconfig:"src/tsconfig.json",clean:!0,splitting:!0,minify:!0},dependencies:{"@stricli/core":r.dependencies["@stricli/core"]},devDependencies:{"@types/node":n&&`${n}.x`,tsup:r.devDependencies.tsup,typescript:r.devDependencies.typescript}}}function $(e,t){return{...e,dependencies:{...e.dependencies,"@stricli/auto-complete":r.dependencies["@stricli/auto-complete"]},bin:{...e.bin,[t]:"dist/bash-complete.js"},tsup:{...e.tsup,entry:[...e.tsup?.entry??[],"src/bin/bash-complete.ts"]}}}function A(e,t){return{...e,scripts:{...e.scripts,postinstall:t}}}async function W(e,t){let{fs:n,path:p}=this;await n.promises.mkdir(t,{recursive:!0});let o=async(l,d)=>{let F=p.join(t,l);await n.promises.writeFile(F,d)},a=async l=>{let d=p.join(t,l);await n.promises.mkdir(d,{recursive:!0})};await a("src");let u=e.name??p.basename(t),s=e.command??u,N=(typeof e.nodeVersion=="string"?e.nodeVersion:this.process.versions?.node)?.split(".")[0],i=M({name:u,author:e.author,description:e.description,license:e.license,type:e.type},s,N),c=j(s);e.autoComplete?(i=$(i,c),e.template==="multi"?i=A(i,`${s} install`):i=A(i,`npx @stricli/auto-complete@latest install ${s} --bash ${c}`),await o("src/context.ts",x)):await o("src/context.ts",b),await o("package.json",JSON.stringify(i,void 0,4)),await o(".gitignore",C);let I={compilerOptions:m.compilerOptions,include:m.include,exclude:m.exclude};await o("src/tsconfig.json",JSON.stringify(I,void 0,4)),e.template==="single"?(await o("src/impl.ts",f),await o("src/app.ts",g)):(await a("src/commands/subdir"),await o("src/commands/subdir/impl.ts",y),await o("src/commands/subdir/command.ts",v),await a("src/commands/nested"),await o("src/commands/nested/impl.ts",h),await o("src/commands/nested/commands.ts",T),e.autoComplete?await o("src/app.ts",k(s,c)):await o("src/app.ts",P)),await a("src/bin"),await o("src/bin/cli.ts",e.type==="module"?w:S),e.autoComplete&&await o("src/bin/bash-complete.ts",e.type==="module"?J:L)}export{W as default};