@arkstack/console 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/app-DtecNuLP.js +1 -2
- package/dist/app.d.ts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +5 -114
- package/dist/prepare.js +1 -2
- package/package.json +9 -8
- package/dist/app-DtecNuLP.js.map +0 -1
- package/dist/app.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/prepare.js.map +0 -1
package/README.md
CHANGED
package/dist/app-DtecNuLP.js
CHANGED
package/dist/app.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,8 +9,9 @@ import { Command, Kernel } from "@h3ravel/musket";
|
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { resolve } from "path";
|
|
11
11
|
import { writeFile } from "fs/promises";
|
|
12
|
-
import { CliApp as CliApp$1
|
|
12
|
+
import { CliApp as CliApp$1 } from "arkormx";
|
|
13
13
|
import chalk from "chalk";
|
|
14
|
+
import { str } from "@h3ravel/support";
|
|
14
15
|
|
|
15
16
|
//#region dist/commands/BuildCommand.js
|
|
16
17
|
var BuildCommand = class extends Command {
|
|
@@ -137,16 +138,6 @@ var MakeController = class extends Command {
|
|
|
137
138
|
}
|
|
138
139
|
};
|
|
139
140
|
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region dist/commands/MakeFactoryCommand.js
|
|
142
|
-
var MakeFactoryCommand$1 = class extends MakeFactoryCommand {
|
|
143
|
-
async handle() {
|
|
144
|
-
this.app.command = this;
|
|
145
|
-
this.app = new CliApp$1();
|
|
146
|
-
return super.handle();
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
141
|
//#endregion
|
|
151
142
|
//#region dist/commands/MakeFullResource.js
|
|
152
143
|
var MakeFullResource = class extends Command {
|
|
@@ -188,90 +179,10 @@ var MakeFullResource = class extends Command {
|
|
|
188
179
|
}
|
|
189
180
|
};
|
|
190
181
|
|
|
191
|
-
//#endregion
|
|
192
|
-
//#region dist/commands/MakeMigrationCommand.js
|
|
193
|
-
var MakeMigrationCommand$1 = class extends MakeMigrationCommand {
|
|
194
|
-
async handle() {
|
|
195
|
-
this.app.command = this;
|
|
196
|
-
this.app = new CliApp$1();
|
|
197
|
-
return super.handle();
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region dist/commands/MakeModelCommand.js
|
|
203
|
-
var MakeModelCommand$1 = class extends MakeModelCommand {
|
|
204
|
-
async handle() {
|
|
205
|
-
this.app.command = this;
|
|
206
|
-
this.app = new CliApp$1();
|
|
207
|
-
return super.handle();
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
|
|
211
182
|
//#endregion
|
|
212
183
|
//#region dist/commands/MakeResource.js
|
|
213
184
|
var MakeResource$1 = class extends MakeResource {};
|
|
214
185
|
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region dist/commands/MakeSeederCommand.js
|
|
217
|
-
var MakeSeederCommand$1 = class extends MakeSeederCommand {
|
|
218
|
-
async handle() {
|
|
219
|
-
this.app.command = this;
|
|
220
|
-
this.app = new CliApp$1();
|
|
221
|
-
return super.handle();
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region dist/commands/MigrateCommand.js
|
|
227
|
-
var MigrateCommand$1 = class extends MigrateCommand {
|
|
228
|
-
async handle() {
|
|
229
|
-
this.app.command = this;
|
|
230
|
-
this.app = new CliApp$1();
|
|
231
|
-
return super.handle();
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region dist/commands/MigrateFreshCommand.js
|
|
237
|
-
var MigrateFreshCommand$1 = class extends MigrateFreshCommand {
|
|
238
|
-
async handle() {
|
|
239
|
-
this.app.command = this;
|
|
240
|
-
this.app = new CliApp$1();
|
|
241
|
-
return super.handle();
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
//#endregion
|
|
246
|
-
//#region dist/commands/MigrateRollbackCommand.js
|
|
247
|
-
var MigrateRollbackCommand$1 = class extends MigrateRollbackCommand {
|
|
248
|
-
async handle() {
|
|
249
|
-
this.app.command = this;
|
|
250
|
-
this.app = new CliApp$1();
|
|
251
|
-
return super.handle();
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
//#endregion
|
|
256
|
-
//#region dist/commands/MigrationHistoryCommand.js
|
|
257
|
-
var MigrationHistoryCommand$1 = class extends MigrationHistoryCommand {
|
|
258
|
-
async handle() {
|
|
259
|
-
this.app.command = this;
|
|
260
|
-
this.app = new CliApp$1();
|
|
261
|
-
return super.handle();
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region dist/commands/ModelsSyncCommand.js
|
|
267
|
-
var ModelsSyncCommand$1 = class extends ModelsSyncCommand {
|
|
268
|
-
async handle() {
|
|
269
|
-
this.app.command = this;
|
|
270
|
-
this.app = new CliApp$1();
|
|
271
|
-
return super.handle();
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
|
|
275
186
|
//#endregion
|
|
276
187
|
//#region dist/commands/RouteList.js
|
|
277
188
|
var RouteList = class extends Command {
|
|
@@ -331,16 +242,6 @@ var RouteList = class extends Command {
|
|
|
331
242
|
}
|
|
332
243
|
};
|
|
333
244
|
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region dist/commands/SeedCommand.js
|
|
336
|
-
var SeedCommand$1 = class extends SeedCommand {
|
|
337
|
-
async handle() {
|
|
338
|
-
this.app.command = this;
|
|
339
|
-
this.app = new CliApp$1();
|
|
340
|
-
return super.handle();
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
|
|
344
245
|
//#endregion
|
|
345
246
|
//#region dist/logo.js
|
|
346
247
|
var logo_default = String.raw`
|
|
@@ -376,6 +277,7 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
376
277
|
globalThis.app = () => app;
|
|
377
278
|
globalThis.env = env;
|
|
378
279
|
globalThis.config = config;
|
|
280
|
+
globalThis.str = str;
|
|
379
281
|
globalThis.arkctx = { runtime: "CLI" };
|
|
380
282
|
await Kernel.init(await new ArkstackConsoleApp(app, { stubsDir }).loadConfig(), {
|
|
381
283
|
logo: options.logo ?? logo_default,
|
|
@@ -387,17 +289,7 @@ const runConsoleKernel = async (options = {}) => {
|
|
|
387
289
|
MakeFullResource,
|
|
388
290
|
DevCommand,
|
|
389
291
|
BuildCommand,
|
|
390
|
-
|
|
391
|
-
MakeMigrationCommand$1,
|
|
392
|
-
MakeModelCommand$1,
|
|
393
|
-
MakeSeederCommand$1,
|
|
394
|
-
MigrateCommand$1,
|
|
395
|
-
ModelsSyncCommand$1,
|
|
396
|
-
SeedCommand$1,
|
|
397
|
-
MakeCommand,
|
|
398
|
-
MigrateFreshCommand$1,
|
|
399
|
-
MigrateRollbackCommand$1,
|
|
400
|
-
MigrationHistoryCommand$1
|
|
292
|
+
MakeCommand
|
|
401
293
|
],
|
|
402
294
|
discoveryPaths: [
|
|
403
295
|
join(process.cwd(), "src", "app", "console", "commands/*.js"),
|
|
@@ -430,5 +322,4 @@ const isEntrypointExecution = () => {
|
|
|
430
322
|
if (isEntrypointExecution()) await runConsoleKernel();
|
|
431
323
|
|
|
432
324
|
//#endregion
|
|
433
|
-
export { runConsoleKernel };
|
|
434
|
-
//# sourceMappingURL=index.js.map
|
|
325
|
+
export { runConsoleKernel };
|
package/dist/prepare.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Console
|
|
6
|
-
"homepage": "https://arkstack.toneflix.net",
|
|
5
|
+
"description": "Console module for Arkstack, providing the command-line runtime and console integration layer.",
|
|
6
|
+
"homepage": "https://arkstack.toneflix.net/guide/cli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/arkstack-hq/arkstack.git",
|
|
@@ -42,15 +42,16 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"clear-router": "^2.
|
|
46
|
-
"arkormx": "^2.0.
|
|
45
|
+
"clear-router": "^2.6.4",
|
|
46
|
+
"arkormx": "^2.0.10"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@h3ravel/musket": "^0.10.1",
|
|
50
|
+
"@h3ravel/support": "^0.15.11",
|
|
50
51
|
"chalk": "^5.6.2",
|
|
51
|
-
"resora": "^1.2.
|
|
52
|
-
"@arkstack/common": "^0.
|
|
53
|
-
"@arkstack/contract": "^0.
|
|
52
|
+
"resora": "^1.2.3",
|
|
53
|
+
"@arkstack/common": "^0.5.0",
|
|
54
|
+
"@arkstack/contract": "^0.5.0"
|
|
54
55
|
},
|
|
55
56
|
"scripts": {
|
|
56
57
|
"build": "tsdown",
|
package/dist/app-DtecNuLP.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-DtecNuLP.js","names":[],"sources":["../src/config.ts","../src/app.ts"],"sourcesContent":["import { Core } from './types'\n\nexport const defaultConfig = (app: Core) => {\n const driver = app.getDriver().name ?? 'h3'\n\n return {\n resourcesDir: 'src/app/http/resources',\n localStubsDir: `node_modules/@arkstack/driver-${driver}/stubs`,\n stubs: {\n resource: 'resource.stub',\n collection: 'resource.collection.stub',\n controller: 'controller.stub',\n api: 'controller.api.stub',\n model: 'controller.model.stub',\n apiResource: 'controller.api.resource.stub',\n }\n }\n}","import { ConsoleAppOptions, Core } from './types'\n// oxlint-disable typescript/no-explicit-any\nimport path, { isAbsolute, join } from 'node:path'\n\nimport { CliApp } from 'resora'\nimport { defaultConfig } from './config'\nimport { existsSync } from 'node:fs'\n\nexport const resolveStubsDir = (\n config: { localStubsDir?: string } | undefined,\n options?: ConsoleAppOptions,\n core?: Core\n\n) => {\n const configuredDir = config?.localStubsDir\n\n if (configuredDir) {\n return isAbsolute(configuredDir)\n ? configuredDir\n : join(process.cwd(), configuredDir)\n }\n\n if (!options?.stubsDir) {\n const driver = core?.getDriver().name ?? 'h3'\n let stubsDir = path.resolve(process.cwd(), `node_modules/@arkstack/driver-${driver}/stubs`)\n if (!existsSync(stubsDir)) {\n stubsDir = path.resolve(process.cwd(), 'stubs')\n }\n\n return stubsDir\n }\n\n return options?.stubsDir\n}\n\nexport class ArkstackConsoleApp<TCore extends Core> 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 this.mergeConfig()\n }\n\n makeController = (name: string, opts: any) => {\n this.mergeConfig()\n const normalized = (name.endsWith('Controller') ? name.replace(/controller/i, '') : name)\n\n let controllerName = normalized.endsWith('Controller') ? normalized : `${normalized}Controller`\n const controllersDir = path.resolve(process.cwd(), 'src', 'app/http/controllers')\n const fileName = `${controllerName}.${opts?.ext ?? 'ts'}`\n const outputPath = join(controllersDir, fileName)\n\n const stubsDir = resolveStubsDir(this.config as any, this.options, this.core)\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 controllerName = controllerName.split('/').pop() as string\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 /**\n * Normalize a file path by removing the current working directory from it. \n * \n * @param p \n * @returns \n */\n normalizePath = (p: string) => {\n return p.replace(process.cwd(), '')\n }\n\n /**\n * Recursively merge defaultConfig with config from resora.config.js, giving \n * precedence to resora.\n */\n mergeConfig = () => {\n this.config = {\n ...defaultConfig(this.core),\n ...this.config,\n stubs: {\n ...defaultConfig(this.core).stubs,\n ...this.config?.stubs,\n },\n }\n }\n}\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,QAAc;AAGxC,QAAO;EACH,cAAc;EACd,eAAe,iCAJJ,IAAI,WAAW,CAAC,QAAQ,KAIoB;EACvD,OAAO;GACH,UAAU;GACV,YAAY;GACZ,YAAY;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GAChB;EACJ;;;;;ACRL,MAAa,mBACT,QACA,SACA,SAEC;CACD,MAAM,gBAAgB,QAAQ;AAE9B,KAAI,cACA,QAAO,WAAW,cAAc,GAC1B,gBACA,KAAK,QAAQ,KAAK,EAAE,cAAc;AAG5C,KAAI,CAAC,SAAS,UAAU;EACpB,MAAM,SAAS,MAAM,WAAW,CAAC,QAAQ;EACzC,IAAI,WAAW,KAAK,QAAQ,QAAQ,KAAK,EAAE,iCAAiC,OAAO,QAAQ;AAC3F,MAAI,CAAC,WAAW,SAAS,CACrB,YAAW,KAAK,QAAQ,QAAQ,KAAK,EAAE,QAAQ;AAGnD,SAAO;;AAGX,QAAO,SAAS;;AAGpB,IAAa,qBAAb,cAA4D,OAAO;CAC/D;CACA,AAAiB;CAEjB,YACI,MACA,SACF;AACE,SAAO;AACP,OAAK,OAAO;AACZ,OAAK,UAAU;AACf,OAAK,aAAa;;CAGtB,kBAAkB,MAAc,SAAc;AAC1C,OAAK,aAAa;EAClB,MAAM,aAAc,KAAK,SAAS,aAAa,GAAG,KAAK,QAAQ,eAAe,GAAG,GAAG;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;EACb,QAAA;AAAA;;;cCDS,eAAA,GACT,MAAA;EAAU,aAAA;AAAA,eACV,OAAA,GAAU,iBAAA,EACV,IAAA,GAAO,IAAA;AAAA,cAwBE,kBAAA,eAAiC,IAAA,UAAc,MAAA;EACxD,IAAA,EAAM,KAAA;EAAA,iBACW,OAAA;cAGb,IAAA,EAAM,KAAA,EACN,OAAA,EAAS,iBAAA;EAQb,cAAA,GAAkB,IAAA,UAAc,IAAA;EAqDhC,aAAA,GAAiB,CAAA;EAQjB,WAAA;AAAA"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";UA4BiB,iBAAA;EACb,IAAA;AAAA;AAAA,cAuBS,gBAAA,GAA0B,OAAA,GAAS,iBAAA,KAAsB,OAAA"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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","MigrateFreshCommand","Command","CliApp","MigrateRollbackCommand","Command","CliApp","MigrationHistoryCommand","Command","CliApp","ModelsSyncCommand","Command","CliApp","SeedCommand","Command","CliApp","logo","MakeResource","MakeFactoryCommand","MakeMigrationCommand","MakeModelCommand","MakeSeederCommand","MigrateCommand","ModelsSyncCommand","SeedCommand","MigrateFreshCommand","MigrateRollbackCommand","MigrationHistoryCommand"],"sources":["../src/commands/BuildCommand.ts","../src/commands/DevCommand.ts","../src/commands/MakeCommand.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/MigrateFreshCommand.ts","../src/commands/MigrateRollbackCommand.ts","../src/commands/MigrationHistoryCommand.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\n return\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 env: Object.assign(process.env, {\n NODE_ENV: 'development',\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\n return\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 { 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?.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?.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, MigrateFreshCommand as Command } from 'arkormx'\n\nexport class MigrateFreshCommand 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, MigrateRollbackCommand as Command } from 'arkormx'\n\nexport class MigrateRollbackCommand 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, MigrationHistoryCommand as Command } from 'arkormx'\n\nexport class MigrationHistoryCommand 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 { config, env, importFile, loadPrototypes, outputDir } from '@arkstack/common'\nimport { fileURLToPath, pathToFileURL } from 'node:url'\nimport path, { join } from 'node:path'\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 { 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 { MigrateFreshCommand } from './commands/MigrateFreshCommand'\nimport { MigrateRollbackCommand } from './commands/MigrateRollbackCommand'\nimport { MigrationHistoryCommand } from './commands/MigrationHistoryCommand'\nimport { ModelsSyncCommand } from './commands/ModelsSyncCommand'\nimport { RouteList } from './commands/RouteList'\nimport { SeedCommand } from './commands/SeedCommand'\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 dist = path.relative(process.cwd(), outputDir())\n\n const bootstrapPath = join(process.cwd(), `${dist}/core/bootstrap.js`)\n\n const module = await importFile<{ app: any }>(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 dist = path.relative(process.cwd(), outputDir())\n const stubsDir = process.env.ARKSTACK_STUBS_DIR\n globalThis.app = () => app as never\n globalThis.env = env\n globalThis.config = config\n globalThis.arkctx = {\n runtime: 'CLI',\n }\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 MakeCommand,\n MigrateFreshCommand,\n MigrateRollbackCommand,\n MigrationHistoryCommand,\n ],\n discoveryPaths: [\n join(process.cwd(), 'src', 'app', 'console', 'commands/*.ts'),\n join(process.cwd(), 'src', 'app/console/commands/*.js'),\n join(process.cwd(), 'src', 'app/console/commands/*.mjs'),\n join(process.cwd(), dist, 'app/console/commands/*.js'),\n join(process.cwd(), dist, 'app/console/commands/*.mjs'),\n join(process.cwd(), 'node_modules', '@arkstack/*', 'dist', 'commands', '*.js'),\n ],\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,QA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AC,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/dist/prepare.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","names":[],"sources":["../src/prepare.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { spawn } from 'node:child_process'\n\nconst NODE_ENV = process.env.NODE_ENV || 'development'\nconst command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'\nconst child = spawn(command, ['exec', 'tsdown', '--log-level=silent'], {\n cwd: process.cwd(),\n stdio: 'inherit',\n env: Object.assign({}, process.env, {\n NODE_ENV,\n CLI_BUILD: 'true',\n }),\n})\n\nchild.on('error', (error) => {\n throw error\n})\n\nchild.on('exit', (code) => {\n if (code === 0 || code === null) {\n console.log(chalk.green(`Arkstak is ready for ${NODE_ENV === 'production' ? 'deployment' : NODE_ENV}!`))\n\n return\n }\n\n throw new Error(`tsdown exited with code ${code}`)\n\n})"],"mappings":";;;;AAGA,MAAM,WAAW,QAAQ,IAAI,YAAY;AAEzC,MAAM,QAAQ,MADE,QAAQ,aAAa,UAAU,aAAa,QAC/B;CAAC;CAAQ;CAAU;CAAqB,EAAE;CACnE,KAAK,QAAQ,KAAK;CAClB,OAAO;CACP,KAAK,OAAO,OAAO,EAAE,EAAE,QAAQ,KAAK;EAChC;EACA,WAAW;EACd,CAAC;CACL,CAAC;AAEF,MAAM,GAAG,UAAU,UAAU;AACzB,OAAM;EACR;AAEF,MAAM,GAAG,SAAS,SAAS;AACvB,KAAI,SAAS,KAAK,SAAS,MAAM;AAC7B,UAAQ,IAAI,MAAM,MAAM,wBAAwB,aAAa,eAAe,eAAe,SAAS,GAAG,CAAC;AAExG;;AAGJ,OAAM,IAAI,MAAM,2BAA2B,OAAO"}
|