@arkstack/console 0.1.4 → 0.1.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.js +33 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -210,18 +210,30 @@ var ModelsSyncCommand$1 = class extends ModelsSyncCommand {
|
|
|
210
210
|
var RouteList = class extends Command {
|
|
211
211
|
signature = `route:list
|
|
212
212
|
{--p|path? : Path to filter routes by}
|
|
213
|
+
{--m|method? : Method to filter routes by}
|
|
213
214
|
`;
|
|
214
215
|
description = "List all registered routes";
|
|
215
216
|
async handle() {
|
|
216
217
|
const routes = await this.app.core.getRouter().list(this.options(), this.app.core.getAppInstance());
|
|
217
|
-
|
|
218
|
+
const filteredRoutes = this.filterRoutes(routes);
|
|
219
|
+
console.log(this.formatRoutes(filteredRoutes.reverse()));
|
|
218
220
|
this.newLine();
|
|
219
|
-
this.info(`Total routes: ${
|
|
221
|
+
this.info(`Total routes: ${filteredRoutes.length}`);
|
|
222
|
+
}
|
|
223
|
+
filterRoutes(routes) {
|
|
224
|
+
const path = this.option("path");
|
|
225
|
+
const method = this.option("method");
|
|
226
|
+
if (!path && !method) return routes;
|
|
227
|
+
return routes.filter((route) => {
|
|
228
|
+
const pathMatches = path ? route.path.includes(path) : true;
|
|
229
|
+
const methodMatches = method ? route.methods.includes(method.toLowerCase()) : true;
|
|
230
|
+
return pathMatches && methodMatches;
|
|
231
|
+
});
|
|
220
232
|
}
|
|
221
233
|
formatRoutes(routes) {
|
|
222
234
|
if (routes.length === 0) return "No routes registered.";
|
|
223
235
|
const rows = routes.map((route) => ({
|
|
224
|
-
method: route.methods.join("|").toUpperCase(),
|
|
236
|
+
method: route.methods.join(" | ").toUpperCase(),
|
|
225
237
|
path: route.path,
|
|
226
238
|
handler: route.controllerName ? `${route.controllerName} → ${route.actionName}` : route.actionName ?? "N/A"
|
|
227
239
|
}));
|
|
@@ -231,9 +243,25 @@ var RouteList = class extends Command {
|
|
|
231
243
|
return [
|
|
232
244
|
`${"METHOD".padEnd(methodWidth)} ${"PATH".padEnd(pathWidth)} ${"HANDLER".padEnd(handlerWidth)}`,
|
|
233
245
|
`${"-".repeat(methodWidth)} ${"-".repeat(pathWidth)} ${"-".repeat(handlerWidth)}`,
|
|
234
|
-
...rows.map((row) => `${
|
|
246
|
+
...rows.map((row) => `${this.formatMethod(row.method.padEnd(methodWidth))} ${chalk.blue(row.path.padEnd(pathWidth))} ${chalk.yellow(row.handler.padEnd(handlerWidth))}`)
|
|
235
247
|
].join("\n");
|
|
236
248
|
}
|
|
249
|
+
methodColor(method) {
|
|
250
|
+
switch (method) {
|
|
251
|
+
case "GET": return chalk.green(method);
|
|
252
|
+
case "POST": return chalk.blue(method);
|
|
253
|
+
case "PUT": return chalk.yellow(method);
|
|
254
|
+
case "DELETE": return chalk.red(method);
|
|
255
|
+
case "PATCH": return chalk.magenta(method);
|
|
256
|
+
case "OPTIONS": return chalk.cyan(method);
|
|
257
|
+
default: return chalk.gray(method);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
formatMethod(method) {
|
|
261
|
+
const methods = method.split(" | ");
|
|
262
|
+
if (methods.length > 1) return methods.map((m) => this.methodColor(m)).join(chalk.gray(" | "));
|
|
263
|
+
return this.methodColor(method.toUpperCase());
|
|
264
|
+
}
|
|
237
265
|
};
|
|
238
266
|
|
|
239
267
|
//#endregion
|
|
@@ -294,7 +322,7 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
294
322
|
ModelsSyncCommand$1,
|
|
295
323
|
SeedCommand$1
|
|
296
324
|
],
|
|
297
|
-
discoveryPaths: [join(process.cwd(), "dist/
|
|
325
|
+
discoveryPaths: [join(process.cwd(), "dist/app/console/commands/*.js")],
|
|
298
326
|
exceptionHandler(exception) {
|
|
299
327
|
throw exception;
|
|
300
328
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CliApp","MakeFactoryCommand","Command","CliApp","CliApp","MakeMigrationCommand","Command","CliApp","MakeModelCommand","Command","CliApp","MakeResource","MakeResourceBase","MakeSeederCommand","Command","CliApp","MigrateCommand","Command","CliApp","ModelsSyncCommand","Command","CliApp","SeedCommand","Command","CliApp","logo","MakeResource","MakeFactoryCommand","MakeMigrationCommand","MakeModelCommand","MakeSeederCommand","MigrateCommand","ModelsSyncCommand","SeedCommand"],"sources":["../src/commands/BuildCommand.ts","../src/commands/DevCommand.ts","../src/commands/MakeController.ts","../src/commands/MakeFactoryCommand.ts","../src/commands/MakeFullResource.ts","../src/commands/MakeMigrationCommand.ts","../src/commands/MakeModelCommand.ts","../src/commands/MakeResource.ts","../src/commands/MakeSeederCommand.ts","../src/commands/MigrateCommand.ts","../src/commands/ModelsSyncCommand.ts","../src/commands/RouteList.ts","../src/commands/SeedCommand.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 { CliApp } from 'arkormx'\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 {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--x|migration : Create a migration file for the model (only if --model is specified)}\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 const app = new CliApp()\n\n const model = this.option('model')\n ? app.makeModel(this.argument('model'), { ...this.options(), force: false })\n : null\n\n this.success('Controller created successfully!');\n\n [\n ['Controller', name],\n model ? ['Model', model.model.path] : '',\n model ? [`Prisma schema ${model.prisma.updated ? '(updated)' : '(already up to date)'}`, model?.prisma.path] : '',\n model?.factory ? ['Factory', model.factory.path] : '',\n model?.seeder ? ['Seeder', model.seeder.path] : '',\n model?.migration ? ['Migration', model.migration.path] : ''\n ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name!, path!)))\n }\n}\n","import { CliApp, MakeFactoryCommand as Command } from 'arkormx'\n\nexport class MakeFactoryCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { CliApp } from 'arkormx'\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 (will be created if it doesn't exist)}\n {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--x|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 res = this.app.makeResource(this.argument('prefix'), {\n force: this.option('force')\n })\n\n const col = this.app.makeResource(this.argument('prefix') + 'Collection', {\n collection: true,\n force: this.option('force'),\n })\n\n const cont = this.app.makeController(\n this.argument('prefix'),\n Object.assign({}, this.options(), { api: true, force: this.option('force') }),\n )\n\n const app = new CliApp()\n\n const model = this.option('model')\n ? app.makeModel(this.argument('prefix'), { ...this.options(), force: false })\n : null\n\n this.success('Created full resource set:');\n\n [\n ['Resource', res.path],\n ['Collection', col.path],\n ['Controller', cont],\n model ? ['Model', model.model.path] : '',\n model ? [`Prisma schema ${model.prisma.updated ? '(updated)' : '(already up to date)'}`, model.prisma.path] : '',\n model?.factory ? ['Factory', model.factory.path] : '',\n model?.seeder ? ['Seeder', model.seeder.path] : '',\n model?.migration ? ['Migration', model.migration.path] : ''\n ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name!, path!)))\n }\n}\n","import { CliApp, MakeMigrationCommand as Command } from 'arkormx'\n\nexport class MakeMigrationCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, MakeModelCommand as Command } from 'arkormx'\n\nexport class MakeModelCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { MakeResource as MakeResourceBase } from 'resora'\n\nexport class MakeResource extends MakeResourceBase {\n}\n","import { CliApp, MakeSeederCommand as Command } from 'arkormx'\n\nexport class MakeSeederCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, MigrateCommand as Command } from 'arkormx'\n\nexport class MigrateCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, ModelsSyncCommand as Command } from 'arkormx'\n\nexport class ModelsSyncCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\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","import { CliApp, SeedCommand as Command } from 'arkormx'\n\nexport class SeedCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\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 { MakeFactoryCommand } from './commands/MakeFactoryCommand'\nimport { MakeFullResource } from './commands/MakeFullResource'\nimport { MakeMigrationCommand } from './commands/MakeMigrationCommand'\nimport { MakeModelCommand } from './commands/MakeModelCommand'\nimport { MakeResource } from './commands/MakeResource'\nimport { MakeSeederCommand } from './commands/MakeSeederCommand'\nimport { MigrateCommand } from './commands/MigrateCommand'\nimport { ModelsSyncCommand } from './commands/ModelsSyncCommand'\nimport { RouteList } from './commands/RouteList'\nimport { SeedCommand } from './commands/SeedCommand'\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 MakeFactoryCommand,\n MakeMigrationCommand,\n MakeModelCommand,\n MakeSeederCommand,\n MigrateCommand,\n ModelsSyncCommand,\n SeedCommand,\n ],\n discoveryPaths: [join(process.cwd(), 'src/core/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;;;;;;AC7B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R7B,mBAAe,OAAO,GAAG;;;;;;;;;;;;;;;;ACiCzB,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;GACAC;GACAC;GACAC;GACAC;GACAC;GACAC;GACAC;GACH;EACD,gBAAgB,CAAC,KAAK,QAAQ,KAAK,EAAE,iCAAiC,CAAC;EACvE,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":["CliApp","MakeFactoryCommand","Command","CliApp","CliApp","MakeMigrationCommand","Command","CliApp","MakeModelCommand","Command","CliApp","MakeResource","MakeResourceBase","MakeSeederCommand","Command","CliApp","MigrateCommand","Command","CliApp","ModelsSyncCommand","Command","CliApp","SeedCommand","Command","CliApp","logo","MakeResource","MakeFactoryCommand","MakeMigrationCommand","MakeModelCommand","MakeSeederCommand","MigrateCommand","ModelsSyncCommand","SeedCommand"],"sources":["../src/commands/BuildCommand.ts","../src/commands/DevCommand.ts","../src/commands/MakeController.ts","../src/commands/MakeFactoryCommand.ts","../src/commands/MakeFullResource.ts","../src/commands/MakeMigrationCommand.ts","../src/commands/MakeModelCommand.ts","../src/commands/MakeResource.ts","../src/commands/MakeSeederCommand.ts","../src/commands/MigrateCommand.ts","../src/commands/ModelsSyncCommand.ts","../src/commands/RouteList.ts","../src/commands/SeedCommand.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 { CliApp } from 'arkormx'\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 {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--x|migration : Create a migration file for the model (only if --model is specified)}\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 const app = new CliApp()\n\n const model = this.option('model')\n ? app.makeModel(this.argument('model'), { ...this.options(), force: false })\n : null\n\n this.success('Controller created successfully!');\n\n [\n ['Controller', name],\n model ? ['Model', model.model.path] : '',\n model ? [`Prisma schema ${model.prisma.updated ? '(updated)' : '(already up to date)'}`, model?.prisma.path] : '',\n model?.factory ? ['Factory', model.factory.path] : '',\n model?.seeder ? ['Seeder', model.seeder.path] : '',\n model?.migration ? ['Migration', model.migration.path] : ''\n ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name!, path!)))\n }\n}\n","import { CliApp, MakeFactoryCommand as Command } from 'arkormx'\n\nexport class MakeFactoryCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { ArkstackConsoleApp } from '../app'\nimport { CliApp } from 'arkormx'\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 (will be created if it doesn't exist)}\n {--f|factory : Create and link a factory}\n {--s|seeder : Create a seeder file for the model (only if --model is specified)}\n {--x|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 res = this.app.makeResource(this.argument('prefix'), {\n force: this.option('force')\n })\n\n const col = this.app.makeResource(this.argument('prefix') + 'Collection', {\n collection: true,\n force: this.option('force'),\n })\n\n const cont = this.app.makeController(\n this.argument('prefix'),\n Object.assign({}, this.options(), { api: true, force: this.option('force') }),\n )\n\n const app = new CliApp()\n\n const model = this.option('model')\n ? app.makeModel(this.argument('prefix'), { ...this.options(), force: false })\n : null\n\n this.success('Created full resource set:');\n\n [\n ['Resource', res.path],\n ['Collection', col.path],\n ['Controller', cont],\n model ? ['Model', model.model.path] : '',\n model ? [`Prisma schema ${model.prisma.updated ? '(updated)' : '(already up to date)'}`, model.prisma.path] : '',\n model?.factory ? ['Factory', model.factory.path] : '',\n model?.seeder ? ['Seeder', model.seeder.path] : '',\n model?.migration ? ['Migration', model.migration.path] : ''\n ].filter(Boolean).map(([name, path]) => this.success(app.splitLogger(name!, path!)))\n }\n}\n","import { CliApp, MakeMigrationCommand as Command } from 'arkormx'\n\nexport class MakeMigrationCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, MakeModelCommand as Command } from 'arkormx'\n\nexport class MakeModelCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { MakeResource as MakeResourceBase } from 'resora'\n\nexport class MakeResource extends MakeResourceBase {\n}\n","import { CliApp, MakeSeederCommand as Command } from 'arkormx'\n\nexport class MakeSeederCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, MigrateCommand as Command } from 'arkormx'\n\nexport class MigrateCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\n}\n","import { CliApp, ModelsSyncCommand as Command } from 'arkormx'\n\nexport class ModelsSyncCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\n }\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 {--m|method? : Method 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 const filteredRoutes = this.filterRoutes(routes)\n\n console.log(this.formatRoutes(filteredRoutes.reverse()))\n this.newLine()\n this.info(`Total routes: ${filteredRoutes.length}`)\n }\n\n private filterRoutes (routes: Route[]) {\n const path = this.option('path')\n const method = this.option('method')\n\n if (!path && !method) {\n return routes\n }\n\n return routes.filter((route) => {\n const pathMatches = path ? route.path.includes(path) : true\n const methodMatches = method ? route.methods.includes(method.toLowerCase()) : true\n\n return pathMatches && methodMatches\n })\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) => `${this.formatMethod(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 private methodColor (method: string) {\n switch (method) {\n case 'GET':\n return chalk.green(method)\n case 'POST':\n return chalk.blue(method)\n case 'PUT':\n return chalk.yellow(method)\n case 'DELETE':\n return chalk.red(method)\n case 'PATCH':\n return chalk.magenta(method)\n case 'OPTIONS':\n return chalk.cyan(method)\n default:\n return chalk.gray(method)\n }\n }\n\n private formatMethod (method: string) {\n const methods = method.split(' | ')\n if (methods.length > 1) {\n return methods.map((m) => this.methodColor(m)).join(chalk.gray(' | '))\n }\n\n return this.methodColor(method.toUpperCase())\n }\n}\n","import { CliApp, SeedCommand as Command } from 'arkormx'\n\nexport class SeedCommand extends Command {\n async handle () {\n this.app.command = this\n\n this.app = new CliApp()\n\n return super.handle()\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 { MakeFactoryCommand } from './commands/MakeFactoryCommand'\nimport { MakeFullResource } from './commands/MakeFullResource'\nimport { MakeMigrationCommand } from './commands/MakeMigrationCommand'\nimport { MakeModelCommand } from './commands/MakeModelCommand'\nimport { MakeResource } from './commands/MakeResource'\nimport { MakeSeederCommand } from './commands/MakeSeederCommand'\nimport { MigrateCommand } from './commands/MigrateCommand'\nimport { ModelsSyncCommand } from './commands/ModelsSyncCommand'\nimport { RouteList } from './commands/RouteList'\nimport { SeedCommand } from './commands/SeedCommand'\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 MakeFactoryCommand,\n MakeMigrationCommand,\n MakeModelCommand,\n MakeSeederCommand,\n MigrateCommand,\n ModelsSyncCommand,\n SeedCommand,\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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AM,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;GACAC;GACAC;GACAC;GACAC;GACAC;GACAC;GACAC;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",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Console package for Arkstack providing console-specific implementations of core Arkstack features such as routing, middleware, and database integration.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"clear-router": "^2.1.
|
|
44
|
+
"clear-router": "^2.1.7",
|
|
45
45
|
"arkormx": "^0.2.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@h3ravel/musket": "^0.10.1",
|
|
49
49
|
"chalk": "^5.6.2",
|
|
50
50
|
"resora": "^0.2.6",
|
|
51
|
-
"@arkstack/
|
|
52
|
-
"@arkstack/
|
|
51
|
+
"@arkstack/common": "^0.1.5",
|
|
52
|
+
"@arkstack/contract": "^0.1.5"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsdown",
|