@arkstack/console-slim 0.1.8 → 0.1.10

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/app.js CHANGED
@@ -17,7 +17,7 @@ var ArkstackConsoleApp = class extends CliApp {
17
17
  this.options = options;
18
18
  }
19
19
  makeController = (name, opts) => {
20
- const normalized = name.endsWith("Controller") ? name.replace(/controller/i, "") : name;
20
+ const normalized = (name.endsWith("Controller") ? name.replace(/controller/i, "") : name).split("/").pop().split(".").shift();
21
21
  const controllersDir = path.resolve(process.cwd(), "src", "app/http/controllers");
22
22
  const controllerName = normalized.endsWith("Controller") ? normalized : `${normalized}Controller`;
23
23
  const outputPath = join(controllersDir, `${controllerName}.${opts?.ext ?? "ts"}`);
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","names":[],"sources":["../src/app.ts"],"sourcesContent":["// oxlint-disable typescript/no-explicit-any\nimport path, { isAbsolute, join } from 'node:path'\n\nimport { CliApp } from 'resora'\nimport { existsSync } from 'node:fs'\n\nexport interface ConsoleAppOptions {\n stubsDir?: string;\n}\n\nexport const resolveStubsDir = (\n config: { localStubsDir?: string } | undefined,\n options?: ConsoleAppOptions,\n) => {\n const configuredDir = config?.localStubsDir\n\n if (configuredDir) {\n return isAbsolute(configuredDir)\n ? configuredDir\n : join(process.cwd(), configuredDir)\n }\n\n return options?.stubsDir\n}\n\nexport class ArkstackConsoleApp<TCore> extends CliApp {\n core: TCore\n private readonly options: ConsoleAppOptions\n\n constructor(\n core: TCore,\n options: ConsoleAppOptions,\n ) {\n super()\n this.core = core\n this.options = options\n }\n\n makeController = (name: string, opts: any) => {\n const normalized = name.endsWith('Controller') ? name.replace(/controller/i, '') : name\n\n const controllersDir = path.resolve(process.cwd(), 'src', 'app/http/controllers')\n const controllerName = normalized.endsWith('Controller') ? normalized : `${normalized}Controller`\n const fileName = `${controllerName}.${opts?.ext ?? 'ts'}`\n const outputPath = join(controllersDir, fileName)\n const stubsDir = resolveStubsDir(this.config as any, this.options)\n if (!stubsDir) {\n console.error('Error: stubsDir is not configured. Set stubsDir in resora.config.js.')\n process.exit(1)\n }\n\n const stubPath = join(\n stubsDir,\n opts.model\n ? (this.config.stubs as any).model\n : opts.api\n ? (this.config.stubs as any).api\n : (this.config.stubs as any).controller,\n )\n\n if (!existsSync(stubPath)) {\n console.error(`Error: Stub file ${stubPath} not found.`)\n process.exit(1)\n }\n\n this.generateFile(\n stubPath,\n outputPath,\n {\n ControllerName: controllerName,\n Model: opts.model?.pascalCase(),\n ModelName: opts.model?.camelCase(),\n Name: controllerName.replace(/controller/i, ''),\n },\n opts,\n )\n\n return outputPath\n }\n\n normalizePath = (p: string) => {\n return p.replace(process.cwd(), '')\n }\n}\n"],"mappings":";;;;;AAUA,MAAa,mBACT,QACA,YACC;CACD,MAAM,gBAAgB,QAAQ;AAE9B,KAAI,cACA,QAAO,WAAW,cAAc,GAC1B,gBACA,KAAK,QAAQ,KAAK,EAAE,cAAc;AAG5C,QAAO,SAAS;;AAGpB,IAAa,qBAAb,cAA+C,OAAO;CAClD;CACA,AAAiB;CAEjB,YACI,MACA,SACF;AACE,SAAO;AACP,OAAK,OAAO;AACZ,OAAK,UAAU;;CAGnB,kBAAkB,MAAc,SAAc;EAC1C,MAAM,aAAa,KAAK,SAAS,aAAa,GAAG,KAAK,QAAQ,eAAe,GAAG,GAAG;EAEnF,MAAM,iBAAiB,KAAK,QAAQ,QAAQ,KAAK,EAAE,OAAO,uBAAuB;EACjF,MAAM,iBAAiB,WAAW,SAAS,aAAa,GAAG,aAAa,GAAG,WAAW;EAEtF,MAAM,aAAa,KAAK,gBADP,GAAG,eAAe,GAAG,MAAM,OAAO,OACF;EACjD,MAAM,WAAW,gBAAgB,KAAK,QAAe,KAAK,QAAQ;AAClE,MAAI,CAAC,UAAU;AACX,WAAQ,MAAM,uEAAuE;AACrF,WAAQ,KAAK,EAAE;;EAGnB,MAAM,WAAW,KACb,UACA,KAAK,QACE,KAAK,OAAO,MAAc,QAC3B,KAAK,MACA,KAAK,OAAO,MAAc,MAC1B,KAAK,OAAO,MAAc,WACxC;AAED,MAAI,CAAC,WAAW,SAAS,EAAE;AACvB,WAAQ,MAAM,oBAAoB,SAAS,aAAa;AACxD,WAAQ,KAAK,EAAE;;AAGnB,OAAK,aACD,UACA,YACA;GACI,gBAAgB;GAChB,OAAO,KAAK,OAAO,YAAY;GAC/B,WAAW,KAAK,OAAO,WAAW;GAClC,MAAM,eAAe,QAAQ,eAAe,GAAG;GAClD,EACD,KACH;AAED,SAAO;;CAGX,iBAAiB,MAAc;AAC3B,SAAO,EAAE,QAAQ,QAAQ,KAAK,EAAE,GAAG"}
1
+ {"version":3,"file":"app.js","names":[],"sources":["../src/app.ts"],"sourcesContent":["// oxlint-disable typescript/no-explicit-any\nimport path, { isAbsolute, join } from 'node:path'\n\nimport { CliApp } from 'resora'\nimport { existsSync } from 'node:fs'\n\nexport interface ConsoleAppOptions {\n stubsDir?: string;\n}\n\nexport const resolveStubsDir = (\n config: { localStubsDir?: string } | undefined,\n options?: ConsoleAppOptions,\n) => {\n const configuredDir = config?.localStubsDir\n\n if (configuredDir) {\n return isAbsolute(configuredDir)\n ? configuredDir\n : join(process.cwd(), configuredDir)\n }\n\n return options?.stubsDir\n}\n\nexport class ArkstackConsoleApp<TCore> extends CliApp {\n core: TCore\n private readonly options: ConsoleAppOptions\n\n constructor(\n core: TCore,\n options: ConsoleAppOptions,\n ) {\n super()\n this.core = core\n this.options = options\n }\n\n makeController = (name: string, opts: any) => {\n const normalized = (name.endsWith('Controller') ? name.replace(/controller/i, '') : name).split('/').pop()!.split('.').shift()!\n\n const controllersDir = path.resolve(process.cwd(), 'src', 'app/http/controllers')\n const controllerName = normalized.endsWith('Controller') ? normalized : `${normalized}Controller`\n const fileName = `${controllerName}.${opts?.ext ?? 'ts'}`\n const outputPath = join(controllersDir, fileName)\n const stubsDir = resolveStubsDir(this.config as any, this.options)\n if (!stubsDir) {\n console.error('Error: stubsDir is not configured. Set stubsDir in resora.config.js.')\n process.exit(1)\n }\n\n const stubPath = join(\n stubsDir,\n opts.model\n ? (this.config.stubs as any).model\n : opts.api\n ? (this.config.stubs as any).api\n : (this.config.stubs as any).controller,\n )\n\n if (!existsSync(stubPath)) {\n console.error(`Error: Stub file ${stubPath} not found.`)\n process.exit(1)\n }\n\n this.generateFile(\n stubPath,\n outputPath,\n {\n // If class name contains / or ., take only the last part for the class name\n ControllerName: controllerName,\n Model: opts.model?.pascalCase(),\n ModelName: opts.model?.camelCase(),\n Name: controllerName.replace(/controller/i, ''),\n },\n opts,\n )\n\n return outputPath\n }\n\n normalizePath = (p: string) => {\n return p.replace(process.cwd(), '')\n }\n}\n"],"mappings":";;;;;AAUA,MAAa,mBACT,QACA,YACC;CACD,MAAM,gBAAgB,QAAQ;AAE9B,KAAI,cACA,QAAO,WAAW,cAAc,GAC1B,gBACA,KAAK,QAAQ,KAAK,EAAE,cAAc;AAG5C,QAAO,SAAS;;AAGpB,IAAa,qBAAb,cAA+C,OAAO;CAClD;CACA,AAAiB;CAEjB,YACI,MACA,SACF;AACE,SAAO;AACP,OAAK,OAAO;AACZ,OAAK,UAAU;;CAGnB,kBAAkB,MAAc,SAAc;EAC1C,MAAM,cAAc,KAAK,SAAS,aAAa,GAAG,KAAK,QAAQ,eAAe,GAAG,GAAG,MAAM,MAAM,IAAI,CAAC,KAAK,CAAE,MAAM,IAAI,CAAC,OAAO;EAE9H,MAAM,iBAAiB,KAAK,QAAQ,QAAQ,KAAK,EAAE,OAAO,uBAAuB;EACjF,MAAM,iBAAiB,WAAW,SAAS,aAAa,GAAG,aAAa,GAAG,WAAW;EAEtF,MAAM,aAAa,KAAK,gBADP,GAAG,eAAe,GAAG,MAAM,OAAO,OACF;EACjD,MAAM,WAAW,gBAAgB,KAAK,QAAe,KAAK,QAAQ;AAClE,MAAI,CAAC,UAAU;AACX,WAAQ,MAAM,uEAAuE;AACrF,WAAQ,KAAK,EAAE;;EAGnB,MAAM,WAAW,KACb,UACA,KAAK,QACE,KAAK,OAAO,MAAc,QAC3B,KAAK,MACA,KAAK,OAAO,MAAc,MAC1B,KAAK,OAAO,MAAc,WACxC;AAED,MAAI,CAAC,WAAW,SAAS,EAAE;AACvB,WAAQ,MAAM,oBAAoB,SAAS,aAAa;AACxD,WAAQ,KAAK,EAAE;;AAGnB,OAAK,aACD,UACA,YACA;GAEI,gBAAgB;GAChB,OAAO,KAAK,OAAO,YAAY;GAC/B,WAAW,KAAK,OAAO,WAAW;GAClC,MAAM,eAAe,QAAQ,eAAe,GAAG;GAClD,EACD,KACH;AAED,SAAO;;CAGX,iBAAiB,MAAc;AAC3B,SAAO,EAAE,QAAQ,QAAQ,KAAK,EAAE,GAAG"}
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ import { MakeResource } from "resora";
6
6
  import { realpathSync } from "node:fs";
7
7
  import { Command, Kernel } from "@h3ravel/musket";
8
8
  import { spawn } from "node:child_process";
9
+ import { resolve } from "path";
10
+ import { writeFile } from "fs/promises";
9
11
  import chalk from "chalk";
10
12
  import { loadPrototypes } from "@arkstack/common";
11
13
 
@@ -64,6 +66,42 @@ var DevCommand = class extends Command {
64
66
  }
65
67
  };
66
68
 
69
+ //#endregion
70
+ //#region dist/commands/MakeCommand.js
71
+ var MakeCommand = class extends Command {
72
+ signature = `make:command
73
+ {name : name of the command to create}
74
+ `;
75
+ description = "Creates a new console command class.";
76
+ async handle() {
77
+ const name = String(this.argument("name")).replace(/\s+/g, "").replace(/\.js$/, "").trim();
78
+ if (!name) return void this.error("Command name is required");
79
+ const stubContent = this.stub(name);
80
+ const filePath = resolve(process.cwd(), "src", `app/console/commands/${name}.js`);
81
+ await writeFile(filePath, stubContent, { flag: "wx" });
82
+ this.success(`Command ${name} created successfully at ${filePath}`);
83
+ }
84
+ stub(name) {
85
+ name = name.endsWith("Command") ? name : `${name}Command`;
86
+ name = name.split("/").pop().split(".").shift();
87
+ const signature = `app:${name.toLowerCase()}`;
88
+ const description = `Description for ${signature} command`;
89
+ return [
90
+ "import { Command } from '@h3ravel/musket'",
91
+ "",
92
+ `export class ${name} extends Command {`,
93
+ ` signature = '${signature}'`,
94
+ "",
95
+ ` description = '${description}'`,
96
+ "",
97
+ " async handle () {",
98
+ " // Command logic goes here",
99
+ " }",
100
+ "}"
101
+ ].join("\n");
102
+ }
103
+ };
104
+
67
105
  //#endregion
68
106
  //#region dist/commands/MakeController.js
69
107
  var MakeController = class extends Command {
@@ -183,7 +221,8 @@ const runConsoleKernel = async (options = {}) => {
183
221
  MakeController,
184
222
  MakeFullResource,
185
223
  DevCommand,
186
- BuildCommand
224
+ BuildCommand,
225
+ MakeCommand
187
226
  ],
188
227
  discoveryPaths: [join(process.cwd(), "dist/app/console/commands/*.js")],
189
228
  exceptionHandler(exception) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["MakeResource","MakeResourceBase","logo","MakeResource"],"sources":["../src/commands/BuildCommand.ts","../src/commands/DevCommand.ts","../src/commands/MakeController.ts","../src/commands/MakeFullResource.ts","../src/commands/MakeResource.ts","../src/commands/RouteList.ts","../src/logo.ts","../src/index.ts"],"sourcesContent":["import { Command } from '@h3ravel/musket'\nimport { spawn } from 'node:child_process'\n\nexport class BuildCommand extends Command {\n protected signature = 'build'\n\n protected description = 'Build the application for production'\n\n async handle () {\n await new Promise<void>((resolve, reject) => {\n const command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'\n const child = spawn(command, ['exec', 'tsdown'], {\n cwd: process.cwd(),\n stdio: 'inherit',\n env: Object.assign({}, process.env, {\n NODE_ENV: 'production',\n }),\n })\n\n child.on('error', (error) => {\n reject(error)\n })\n\n child.on('exit', (code) => {\n if (code === 0 || code === null) {\n resolve()\n \nreturn\n }\n\n reject(new Error(`tsdown exited with code ${code}`))\n })\n })\n }\n}\n","import { Command } from '@h3ravel/musket'\nimport { spawn } from 'node:child_process'\n\nexport class DevCommand extends Command {\n protected signature = 'dev'\n\n protected description = 'Run the development server'\n\n async handle () {\n await new Promise<void>((resolve, reject) => {\n const command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'\n const child = spawn(command, ['exec', 'tsdown', '--log-level', 'silent'], {\n cwd: process.cwd(),\n stdio: 'inherit',\n })\n\n child.on('error', (error) => {\n reject(error)\n })\n\n child.on('exit', (code) => {\n if (code === 0 || code === null) {\n resolve()\n \nreturn\n }\n\n reject(new Error(`tsdown exited with code ${code}`))\n })\n })\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { Command } from '@h3ravel/musket'\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport class MakeController extends Command<ArkstackConsoleApp<any>> {\n protected signature = `make:controller\n {name : name of the controller to create}\n {--api : make an API controller}\n {--m|model? : name of model to attach to controller}\n {--force : force overwrite if controller already exists}\n `\n\n protected description = 'Create a new controller file'\n\n async handle () {\n this.app.command = this\n\n if (!this.argument('name')) return void this.error('Error: Controller name is required.')\n\n const name = this.app.makeController(this.argument('name'), this.options())\n\n this.success(`Controller: ${this.app.normalizePath(name)} created successfully!`)\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { Command } from '@h3ravel/musket'\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport class MakeFullResource extends Command<ArkstackConsoleApp<any>> {\n protected signature = `make:full-resource\n {prefix : prefix of the resources to create, \"Admin\" will create AdminResource, AdminCollection and AdminController}\n {--m|model? : name of model to attach to the generated controller}\n {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--m|migration : Create a migration file for the model (only if --model is specified)}\n {--force : force overwrite if resources already exist}\n `\n\n protected description =\n 'Create a full new set of API resources (Controller, Resource, Collection)'\n\n async handle () {\n this.app.command = this\n\n const res1 = this.app.makeResource(this.argument('prefix'), {\n force: this.option('force')\n })\n const res2 = this.app.makeResource(this.argument('prefix') + 'Collection', {\n collection: true,\n force: this.option('force'),\n })\n const name3 = this.app.makeController(\n this.argument('prefix'),\n Object.assign({}, this.options(), { api: true, force: this.option('force') }),\n )\n\n this.success(`Created full resource set: ${this.app.normalizePath(res1.name)}, ${this.app.normalizePath(res2.name)}, ${this.app.normalizePath(name3)} successfully!`)\n }\n}\n","import { MakeResource as MakeResourceBase } from 'resora'\n\nexport class MakeResource extends MakeResourceBase {\n}\n","import { ArkstackConsoleApp } from '../app'\nimport type { ArkstackRouterAwareCore } from '@arkstack/contract'\nimport { Command } from '@h3ravel/musket'\nimport type { Route } from 'clear-router'\nimport chalk from 'chalk'\n\ntype App = ArkstackConsoleApp<ArkstackRouterAwareCore<unknown, Route[]>>;\n\nexport class RouteList extends Command<App> {\n protected signature = `route:list\n {--p|path? : Path to filter routes by}\n `\n\n protected description = 'List all registered routes'\n\n async handle () {\n const routes = await this.app.core.getRouter().list(this.options(), this.app.core.getAppInstance())\n\n console.log(this.formatRoutes(routes.reverse()))\n this.newLine()\n this.info(`Total routes: ${routes.length}`)\n }\n\n private formatRoutes (routes: Route[]) {\n if (routes.length === 0) {\n return 'No routes registered.'\n }\n\n const rows = routes.map((route) => ({\n method: route.methods.join('|').toUpperCase(),\n path: route.path,\n handler: route.controllerName ? `${route.controllerName} → ${route.actionName}` : route.actionName ?? 'N/A',\n }))\n\n const methodWidth = Math.max('METHOD'.length, ...rows.map((row) => row.method.length))\n const pathWidth = Math.max('PATH'.length, ...rows.map((row) => row.path.length))\n const handlerWidth = Math.max('HANDLER'.length, ...rows.map((row) => row.handler.length))\n\n const header = `${'METHOD'.padEnd(methodWidth)} ${'PATH'.padEnd(pathWidth)} ${'HANDLER'.padEnd(handlerWidth)}`\n const divider = `${'-'.repeat(methodWidth)} ${'-'.repeat(pathWidth)} ${'-'.repeat(handlerWidth)}`\n const body = rows.map(\n (row) => `${chalk.green(row.method.padEnd(methodWidth))} ${chalk.blue(row.path.padEnd(pathWidth))} ${chalk.yellow(row.handler.padEnd(handlerWidth))}`\n )\n\n return [header, divider, ...body].join('\\n')\n }\n}\n","export default String.raw`\n ___ _ _ \n / _ \\ | | | | \n/ /_\\ \\_ __ ___ ___| |_ __ _ ___| | __\n| _ | '__/ __/ __| __/ _' |/ __| |/ /\n| | | | | | (__\\__ \\ || (_| | (__| < \n\\_| |_/_| \\___|___/\\__\\__,_|\\___|_|\\_\\ \n`","#!/usr/bin/env node\n\nimport { fileURLToPath, pathToFileURL } from 'node:url'\n\nimport { ArkstackConsoleApp } from './app'\nimport { BuildCommand } from './commands/BuildCommand'\nimport { DevCommand } from './commands/DevCommand'\nimport { Kernel } from '@h3ravel/musket'\nimport { MakeController } from './commands/MakeController'\nimport { MakeFullResource } from './commands/MakeFullResource'\nimport { MakeResource } from './commands/MakeResource'\nimport { RouteList } from './commands/RouteList'\nimport { join } from 'node:path'\nimport { loadPrototypes } from '@arkstack/common'\nimport logo from './logo'\nimport { realpathSync } from 'node:fs'\n\nexport interface RunConsoleOptions {\n logo?: string;\n}\n\n/**\n * Loads the core application instance by importing the bootstrap file.\n * \n * @returns \n */\nconst loadCoreApp = async () => {\n const bootstrapPath = pathToFileURL(join(process.cwd(), 'src/core/bootstrap.ts')).href\n const module = await import(bootstrapPath)\n\n return module.app\n}\n\n/**\n * Runs the console kernel, initializing the application and registering commands.\n * \n * @param options \n */\nexport const runConsoleKernel = async (options: RunConsoleOptions = {}) => {\n loadPrototypes()\n\n const app = await loadCoreApp()\n const stubsDir = process.env.ARKSTACK_STUBS_DIR\n\n await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {\n logo: options.logo ?? logo,\n name: 'Cmd',\n baseCommands: [\n RouteList,\n MakeResource,\n MakeController,\n MakeFullResource,\n DevCommand,\n BuildCommand,\n ],\n discoveryPaths: [join(process.cwd(), 'src/app/console/commands/*.ts')],\n exceptionHandler (exception) {\n throw exception\n },\n })\n}\n\n/**\n * Determines if the current module is being executed as the entry \n * point of the application.\n * \n * @returns \n */\nconst isEntrypointExecution = () => {\n const argvEntry = process.argv[1]\n\n if (!argvEntry) {\n return false\n }\n\n try {\n const currentModulePath = realpathSync(fileURLToPath(import.meta.url))\n const entryPath = realpathSync(argvEntry)\n\n return currentModulePath === entryPath\n } catch {\n return import.meta.url === pathToFileURL(argvEntry).href\n }\n}\n\nif (isEntrypointExecution()) {\n await runConsoleKernel()\n}\n"],"mappings":";;;;;;;;;;;;AAGA,IAAa,eAAb,cAAkC,QAAQ;CACtC,AAAU,YAAY;CAEtB,AAAU,cAAc;CAExB,MAAM,SAAU;AACZ,QAAM,IAAI,SAAe,SAAS,WAAW;GAEzC,MAAM,QAAQ,MADE,QAAQ,aAAa,UAAU,aAAa,QAC/B,CAAC,QAAQ,SAAS,EAAE;IAC7C,KAAK,QAAQ,KAAK;IAClB,OAAO;IACP,KAAK,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK,EAChC,UAAU,cACb,CAAC;IACL,CAAC;AAEF,SAAM,GAAG,UAAU,UAAU;AACzB,WAAO,MAAM;KACf;AAEF,SAAM,GAAG,SAAS,SAAS;AACvB,QAAI,SAAS,KAAK,SAAS,MAAM;AAC7B,cAAS;AAE7B;;AAGgB,2BAAO,IAAI,MAAM,2BAA2B,OAAO,CAAC;KACtD;IACJ;;;;;;AC7BV,IAAa,aAAb,cAAgC,QAAQ;CACpC,AAAU,YAAY;CAEtB,AAAU,cAAc;CAExB,MAAM,SAAU;AACZ,QAAM,IAAI,SAAe,SAAS,WAAW;GAEzC,MAAM,QAAQ,MADE,QAAQ,aAAa,UAAU,aAAa,QAC/B;IAAC;IAAQ;IAAU;IAAe;IAAS,EAAE;IACtE,KAAK,QAAQ,KAAK;IAClB,OAAO;IACV,CAAC;AAEF,SAAM,GAAG,UAAU,UAAU;AACzB,WAAO,MAAM;KACf;AAEF,SAAM,GAAG,SAAS,SAAS;AACvB,QAAI,SAAS,KAAK,SAAS,MAAM;AAC7B,cAAS;AAE7B;;AAGgB,2BAAO,IAAI,MAAM,2BAA2B,OAAO,CAAC;KACtD;IACJ;;;;;;ACzBV,IAAa,iBAAb,cAAoC,QAAiC;CACjE,AAAU,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E,KAAK;AACvE,iBAAgB;CAEhB,MAAM,MAAM,MAAM,aAAa;CAC/B,MAAM,WAAW,QAAQ,IAAI;AAE7B,OAAM,OAAO,KAAK,MAAM,IAAI,mBAAmB,KAAK,EAAE,UAAU,CAAC,CAAC,YAAY,EAAE;EAC5E,MAAM,QAAQ,QAAQC;EACtB,MAAM;EACN,cAAc;GACV;GACAC;GACA;GACA;GACA;GACA;GACH;EACD,gBAAgB,CAAC,KAAK,QAAQ,KAAK,EAAE,gCAAgC,CAAC;EACtE,iBAAkB,WAAW;AACzB,SAAM;;EAEb,CAAC;;;;;;;;AASN,MAAM,8BAA8B;CAChC,MAAM,YAAY,QAAQ,KAAK;AAE/B,KAAI,CAAC,UACD,QAAO;AAGX,KAAI;AAIA,SAH0B,aAAa,cAAc,OAAO,KAAK,IAAI,CAAC,KACpD,aAAa,UAAU;SAGrC;AACJ,SAAO,OAAO,KAAK,QAAQ,cAAc,UAAU,CAAC;;;AAI5D,IAAI,uBAAuB,CACvB,OAAM,kBAAkB"}
1
+ {"version":3,"file":"index.js","names":["MakeResource","MakeResourceBase","logo","MakeResource"],"sources":["../src/commands/BuildCommand.ts","../src/commands/DevCommand.ts","../src/commands/MakeCommand.ts","../src/commands/MakeController.ts","../src/commands/MakeFullResource.ts","../src/commands/MakeResource.ts","../src/commands/RouteList.ts","../src/logo.ts","../src/index.ts"],"sourcesContent":["import { Command } from '@h3ravel/musket'\nimport { spawn } from 'node:child_process'\n\nexport class BuildCommand extends Command {\n protected signature = 'build'\n\n protected description = 'Build the application for production'\n\n async handle () {\n await new Promise<void>((resolve, reject) => {\n const command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'\n const child = spawn(command, ['exec', 'tsdown'], {\n cwd: process.cwd(),\n stdio: 'inherit',\n env: Object.assign({}, process.env, {\n NODE_ENV: 'production',\n }),\n })\n\n child.on('error', (error) => {\n reject(error)\n })\n\n child.on('exit', (code) => {\n if (code === 0 || code === null) {\n resolve()\n \nreturn\n }\n\n reject(new Error(`tsdown exited with code ${code}`))\n })\n })\n }\n}\n","import { Command } from '@h3ravel/musket'\nimport { spawn } from 'node:child_process'\n\nexport class DevCommand extends Command {\n protected signature = 'dev'\n\n protected description = 'Run the development server'\n\n async handle () {\n await new Promise<void>((resolve, reject) => {\n const command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'\n const child = spawn(command, ['exec', 'tsdown', '--log-level', 'silent'], {\n cwd: process.cwd(),\n stdio: 'inherit',\n })\n\n child.on('error', (error) => {\n reject(error)\n })\n\n child.on('exit', (code) => {\n if (code === 0 || code === null) {\n resolve()\n \nreturn\n }\n\n reject(new Error(`tsdown exited with code ${code}`))\n })\n })\n }\n}\n","import { Command } from '@h3ravel/musket'\nimport { resolve } from 'path'\nimport { writeFile } from 'fs/promises'\n\nexport class MakeCommand extends Command {\n protected signature = `make:command \n {name : name of the command to create}\n `\n\n protected description = 'Creates a new console command class.'\n\n async handle () {\n const name = String(this.argument('name'))\n .replace(/\\s+/g, '')\n .replace(/\\.ts$/, '').trim()\n\n if (!name) return void this.error('Command name is required')\n\n const stubContent = this.stub(name)\n const filePath = resolve(process.cwd(), 'src', `app/console/commands/${name}.ts`)\n\n await writeFile(filePath, stubContent, { flag: 'wx' })\n this.success(`Command ${name} created successfully at ${filePath}`)\n }\n\n stub (name: string) {\n name = name.endsWith('Command') ? name : `${name}Command`\n name = name.split('/').pop()!.split('.').shift()!\n const signature = `app:${name.toLowerCase()}`\n const description = `Description for ${signature} command`\n\n const stub = [\n 'import { Command } from \\'@h3ravel/musket\\'',\n '',\n `export class ${name} extends Command {`,\n ` signature = '${signature}'`,\n '',\n ` description = '${description}'`,\n '',\n ' async handle () {',\n ' // Command logic goes here',\n ' }',\n '}',\n ]\n\n return stub.join('\\n')\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { Command } from '@h3ravel/musket'\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport class MakeController extends Command<ArkstackConsoleApp<any>> {\n protected signature = `make:controller\n {name : name of the controller to create}\n {--api : make an API controller}\n {--m|model? : name of model to attach to controller}\n {--force : force overwrite if controller already exists}\n `\n\n protected description = 'Create a new controller file'\n\n async handle () {\n this.app.command = this\n\n if (!this.argument('name')) return void this.error('Error: Controller name is required.')\n\n const name = this.app.makeController(this.argument('name'), this.options())\n\n this.success(`Controller: ${this.app.normalizePath(name)} created successfully!`)\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { Command } from '@h3ravel/musket'\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport class MakeFullResource extends Command<ArkstackConsoleApp<any>> {\n protected signature = `make:full-resource\n {prefix : prefix of the resources to create, \"Admin\" will create AdminResource, AdminCollection and AdminController}\n {--m|model? : name of model to attach to the generated controller}\n {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--m|migration : Create a migration file for the model (only if --model is specified)}\n {--force : force overwrite if resources already exist}\n `\n\n protected description =\n 'Create a full new set of API resources (Controller, Resource, Collection)'\n\n async handle () {\n this.app.command = this\n\n const res1 = this.app.makeResource(this.argument('prefix'), {\n force: this.option('force')\n })\n const res2 = this.app.makeResource(this.argument('prefix') + 'Collection', {\n collection: true,\n force: this.option('force'),\n })\n const name3 = this.app.makeController(\n this.argument('prefix'),\n Object.assign({}, this.options(), { api: true, force: this.option('force') }),\n )\n\n this.success(`Created full resource set: ${this.app.normalizePath(res1.name)}, ${this.app.normalizePath(res2.name)}, ${this.app.normalizePath(name3)} successfully!`)\n }\n}\n","import { MakeResource as MakeResourceBase } from 'resora'\n\nexport class MakeResource extends MakeResourceBase {\n}\n","import { ArkstackConsoleApp } from '../app'\nimport type { ArkstackRouterAwareCore } from '@arkstack/contract'\nimport { Command } from '@h3ravel/musket'\nimport type { Route } from 'clear-router'\nimport chalk from 'chalk'\n\ntype App = ArkstackConsoleApp<ArkstackRouterAwareCore<unknown, Route[]>>;\n\nexport class RouteList extends Command<App> {\n protected signature = `route:list\n {--p|path? : Path to filter routes by}\n `\n\n protected description = 'List all registered routes'\n\n async handle () {\n const routes = await this.app.core.getRouter().list(this.options(), this.app.core.getAppInstance())\n\n console.log(this.formatRoutes(routes.reverse()))\n this.newLine()\n this.info(`Total routes: ${routes.length}`)\n }\n\n private formatRoutes (routes: Route[]) {\n if (routes.length === 0) {\n return 'No routes registered.'\n }\n\n const rows = routes.map((route) => ({\n method: route.methods.join('|').toUpperCase(),\n path: route.path,\n handler: route.controllerName ? `${route.controllerName} → ${route.actionName}` : route.actionName ?? 'N/A',\n }))\n\n const methodWidth = Math.max('METHOD'.length, ...rows.map((row) => row.method.length))\n const pathWidth = Math.max('PATH'.length, ...rows.map((row) => row.path.length))\n const handlerWidth = Math.max('HANDLER'.length, ...rows.map((row) => row.handler.length))\n\n const header = `${'METHOD'.padEnd(methodWidth)} ${'PATH'.padEnd(pathWidth)} ${'HANDLER'.padEnd(handlerWidth)}`\n const divider = `${'-'.repeat(methodWidth)} ${'-'.repeat(pathWidth)} ${'-'.repeat(handlerWidth)}`\n const body = rows.map(\n (row) => `${chalk.green(row.method.padEnd(methodWidth))} ${chalk.blue(row.path.padEnd(pathWidth))} ${chalk.yellow(row.handler.padEnd(handlerWidth))}`\n )\n\n return [header, divider, ...body].join('\\n')\n }\n}\n","export default String.raw`\n ___ _ _ \n / _ \\ | | | | \n/ /_\\ \\_ __ ___ ___| |_ __ _ ___| | __\n| _ | '__/ __/ __| __/ _' |/ __| |/ /\n| | | | | | (__\\__ \\ || (_| | (__| < \n\\_| |_/_| \\___|___/\\__\\__,_|\\___|_|\\_\\ \n`","#!/usr/bin/env node\n\nimport { fileURLToPath, pathToFileURL } from 'node:url'\n\nimport { ArkstackConsoleApp } from './app'\nimport { BuildCommand } from './commands/BuildCommand'\nimport { DevCommand } from './commands/DevCommand'\nimport { Kernel } from '@h3ravel/musket'\nimport { MakeCommand } from './commands/MakeCommand'\nimport { MakeController } from './commands/MakeController'\nimport { MakeFullResource } from './commands/MakeFullResource'\nimport { MakeResource } from './commands/MakeResource'\nimport { RouteList } from './commands/RouteList'\nimport { join } from 'node:path'\nimport { loadPrototypes } from '@arkstack/common'\nimport logo from './logo'\nimport { realpathSync } from 'node:fs'\n\nexport interface RunConsoleOptions {\n logo?: string;\n}\n\n/**\n * Loads the core application instance by importing the bootstrap file.\n * \n * @returns \n */\nconst loadCoreApp = async () => {\n const bootstrapPath = pathToFileURL(join(process.cwd(), 'src/core/bootstrap.ts')).href\n const module = await import(bootstrapPath)\n\n return module.app\n}\n\n/**\n * Runs the console kernel, initializing the application and registering commands.\n * \n * @param options \n */\nexport const runConsoleKernel = async (options: RunConsoleOptions = {}) => {\n loadPrototypes()\n\n const app = await loadCoreApp()\n const stubsDir = process.env.ARKSTACK_STUBS_DIR\n\n await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {\n logo: options.logo ?? logo,\n name: 'Cmd',\n baseCommands: [\n RouteList,\n MakeResource,\n MakeController,\n MakeFullResource,\n DevCommand,\n BuildCommand,\n MakeCommand,\n ],\n discoveryPaths: [join(process.cwd(), 'src/app/console/commands/*.ts')],\n exceptionHandler (exception) {\n throw exception\n },\n })\n}\n\n/**\n * Determines if the current module is being executed as the entry \n * point of the application.\n * \n * @returns \n */\nconst isEntrypointExecution = () => {\n const argvEntry = process.argv[1]\n\n if (!argvEntry) {\n return false\n }\n\n try {\n const currentModulePath = realpathSync(fileURLToPath(import.meta.url))\n const entryPath = realpathSync(argvEntry)\n\n return currentModulePath === entryPath\n } catch {\n return import.meta.url === pathToFileURL(argvEntry).href\n }\n}\n\nif (isEntrypointExecution()) {\n await runConsoleKernel()\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAa,eAAb,cAAkC,QAAQ;CACtC,AAAU,YAAY;CAEtB,AAAU,cAAc;CAExB,MAAM,SAAU;AACZ,QAAM,IAAI,SAAe,SAAS,WAAW;GAEzC,MAAM,QAAQ,MADE,QAAQ,aAAa,UAAU,aAAa,QAC/B,CAAC,QAAQ,SAAS,EAAE;IAC7C,K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,aAAa;GAKxE,GAJZ,KAAK,KACb,QAAQ,GAAG,MAAM,MAAM,IAAI,OAAO,OAAO,YAAY,CAAC,CAAC,IAAI,MAAM,KAAK,IAAI,KAAK,OAAO,UAAU,CAAC,CAAC,IAAI,MAAM,OAAO,IAAI,QAAQ,OAAO,aAAa,CAAC,GACxJ;GAEgC,CAAC,KAAK,KAAK;;;;;;AC5CpD,mBAAe,OAAO,GAAG;;;;;;;;;;;;;;;;AC2BzB,MAAM,cAAc,YAAY;AAI5B,SAFe,MAAM,OADC,cAAc,KAAK,QAAQ,KAAK,EAAE,wBAAwB,CAAC,CAAC,OAGpE;;;;;;;AAQlB,MAAa,mBAAmB,OAAO,UAA6B,EAAE,KAAK;AACvE,iBAAgB;CAEhB,MAAM,MAAM,MAAM,aAAa;CAC/B,MAAM,WAAW,QAAQ,IAAI;AAE7B,OAAM,OAAO,KAAK,MAAM,IAAI,mBAAmB,KAAK,EAAE,UAAU,CAAC,CAAC,YAAY,EAAE;EAC5E,MAAM,QAAQ,QAAQC;EACtB,MAAM;EACN,cAAc;GACV;GACAC;GACA;GACA;GACA;GACA;GACA;GACH;EACD,gBAAgB,CAAC,KAAK,QAAQ,KAAK,EAAE,gCAAgC,CAAC;EACtE,iBAAkB,WAAW;AACzB,SAAM;;EAEb,CAAC;;;;;;;;AASN,MAAM,8BAA8B;CAChC,MAAM,YAAY,QAAQ,KAAK;AAE/B,KAAI,CAAC,UACD,QAAO;AAGX,KAAI;AAIA,SAH0B,aAAa,cAAc,OAAO,KAAK,IAAI,CAAC,KACpD,aAAa,UAAU;SAGrC;AACJ,SAAO,OAAO,KAAK,QAAQ,cAAc,UAAU,CAAC;;;AAI5D,IAAI,uBAAuB,CACvB,OAAM,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/console-slim",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "description": "Slim console package for Arkstack providing lightweight console-specific implementations of core Arkstack features such as routing, middleware.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -48,8 +48,8 @@
48
48
  "@h3ravel/musket": "^0.10.1",
49
49
  "chalk": "^5.6.2",
50
50
  "resora": "^0.2.6",
51
- "@arkstack/common": "^0.1.8",
52
- "@arkstack/contract": "^0.1.8"
51
+ "@arkstack/common": "^0.1.10",
52
+ "@arkstack/contract": "^0.1.10"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsdown",