@arkstack/console 0.1.10 → 0.1.11

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.
Files changed (2) hide show
  1. package/dist/app.js +1 -1
  2. package/package.json +3 -3
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=(e,r)=>{let i=e?.localStubsDir;return i?t(i)?i:n(process.cwd(),i):r?.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).split(`/`).pop().split(`.`).shift(),s=e.resolve(process.cwd(),`src`,`app/http/controllers`),c=o.endsWith(`Controller`)?o:`${o}Controller`,l=n(s,`${c}.${r?.ext??`ts`}`),u=a(this.config,this.options);u||(console.error(`Error: stubsDir is not configured. Set stubsDir in resora.config.js.`),process.exit(1));let d=n(u,r.model?this.config.stubs.model:r.api?this.config.stubs.api:this.config.stubs.controller);return i(d)||(console.error(`Error: Stub file ${d} not found.`),process.exit(1)),this.generateFile(d,l,{ControllerName:c,Model:r.model?.pascalCase(),ModelName:r.model?.camelCase(),Name:c.replace(/controller/i,``)},r),l};normalizePath=e=>e.replace(process.cwd(),``)};export{o as ArkstackConsoleApp,a as resolveStubsDir};
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=(e,r)=>{let i=e?.localStubsDir;return i?t(i)?i:n(process.cwd(),i):r?.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);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.10",
3
+ "version": "0.1.11",
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",
@@ -49,8 +49,8 @@
49
49
  "@h3ravel/musket": "^0.10.1",
50
50
  "chalk": "^5.6.2",
51
51
  "resora": "^0.2.6",
52
- "@arkstack/common": "^0.1.10",
53
- "@arkstack/contract": "^0.1.10"
52
+ "@arkstack/common": "^0.1.11",
53
+ "@arkstack/contract": "^0.1.11"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "tsdown",