@arkstack/console 0.1.25 → 0.1.27
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.d.ts +9 -2
- package/dist/app.js +1 -1
- package/package.json +5 -5
package/dist/app.d.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { CliApp } from "resora";
|
|
2
2
|
|
|
3
3
|
//#region src/app.d.ts
|
|
4
|
+
interface Core {
|
|
5
|
+
[k: string]: any;
|
|
6
|
+
getDriver: () => {
|
|
7
|
+
[k: string]: any;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
4
11
|
interface ConsoleAppOptions {
|
|
5
12
|
stubsDir?: string;
|
|
6
13
|
}
|
|
7
14
|
declare const resolveStubsDir: (config: {
|
|
8
15
|
localStubsDir?: string;
|
|
9
|
-
} | undefined, options?: ConsoleAppOptions) => string;
|
|
10
|
-
declare class ArkstackConsoleApp<TCore> extends CliApp {
|
|
16
|
+
} | undefined, options?: ConsoleAppOptions, core?: Core) => string;
|
|
17
|
+
declare class ArkstackConsoleApp<TCore extends Core> extends CliApp {
|
|
11
18
|
core: TCore;
|
|
12
19
|
private readonly options;
|
|
13
20
|
constructor(core: TCore, options: ConsoleAppOptions);
|
package/dist/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{isAbsolute as t,join as n}from"node:path";import{CliApp as r}from"resora";import{existsSync as i}from"node:fs";const a=(
|
|
1
|
+
import e,{isAbsolute as t,join as n}from"node:path";import{CliApp as r}from"resora";import{existsSync as i}from"node:fs";const a=(r,a,o)=>{let s=r?.localStubsDir;if(s)return t(s)?s:n(process.cwd(),s);if(!a?.stubsDir){let t=o?.getDriver().name??`h3`,n=e.resolve(process.cwd(),`node_modules/@arkstack/driver-${t}/stubs`);return i(n)||(n=e.resolve(process.cwd(),`stubs`)),n}return a?.stubsDir};var o=class extends r{core;options;constructor(e,t){super(),this.core=e,this.options=t}makeController=(t,r)=>{let o=t.endsWith(`Controller`)?t.replace(/controller/i,``):t,s=o.endsWith(`Controller`)?o:`${o}Controller`,c=n(e.resolve(process.cwd(),`src`,`app/http/controllers`),`${s}.${r?.ext??`ts`}`),l=a(this.config,this.options,this.core);l||(console.error(`Error: stubsDir is not configured. Set stubsDir in resora.config.js.`),process.exit(1));let u=n(l,r.model?this.config.stubs.model:r.api?this.config.stubs.api:this.config.stubs.controller);return i(u)||(console.error(`Error: Stub file ${u} not found.`),process.exit(1)),s=s.split(`/`).pop(),this.generateFile(u,c,{ControllerName:s,Model:r.model?.pascalCase(),ModelName:r.model?.camelCase(),Name:s.replace(/controller/i,``)},r),c};normalizePath=e=>e.replace(process.cwd(),``)};export{o as ArkstackConsoleApp,a as resolveStubsDir};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/console",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
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",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"clear-router": "^2.1.8",
|
|
46
|
-
"arkormx": "^0.2.
|
|
46
|
+
"arkormx": "^0.2.11"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@h3ravel/musket": "^0.10.1",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
|
-
"resora": "^0.2.
|
|
52
|
-
"@arkstack/common": "^0.1.
|
|
53
|
-
"@arkstack/contract": "^0.1.
|
|
51
|
+
"resora": "^0.2.14",
|
|
52
|
+
"@arkstack/common": "^0.1.27",
|
|
53
|
+
"@arkstack/contract": "^0.1.27"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsdown",
|