@akanjs/cli 0.0.121 → 0.0.123

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 (39) hide show
  1. package/cjs/index.js +1243 -615
  2. package/cjs/src/templates/module/__Model__.Template.js +1 -1
  3. package/cjs/src/templates/module/__Model__.Unit.js +1 -1
  4. package/cjs/src/templates/module/__Model__.Util.js +1 -1
  5. package/cjs/src/templates/module/__Model__.View.js +2 -2
  6. package/cjs/src/templates/module/__Model__.Zone.js +1 -1
  7. package/cjs/src/templates/module/__model__.document.js +1 -1
  8. package/cjs/src/templates/module/__model__.service.js +2 -2
  9. package/cjs/src/templates/module/__model__.signal.spec.js +1 -1
  10. package/cjs/src/templates/module/__model__.signal.test.js +2 -2
  11. package/cjs/src/templates/workspaceRoot/package.json.template +1 -1
  12. package/esm/index.js +1243 -615
  13. package/esm/src/templates/module/__Model__.Template.js +1 -1
  14. package/esm/src/templates/module/__Model__.Unit.js +1 -1
  15. package/esm/src/templates/module/__Model__.Util.js +1 -1
  16. package/esm/src/templates/module/__Model__.View.js +2 -2
  17. package/esm/src/templates/module/__Model__.Zone.js +1 -1
  18. package/esm/src/templates/module/__model__.document.js +1 -1
  19. package/esm/src/templates/module/__model__.service.js +2 -2
  20. package/esm/src/templates/module/__model__.signal.spec.js +1 -1
  21. package/esm/src/templates/module/__model__.signal.test.js +2 -2
  22. package/esm/src/templates/workspaceRoot/package.json.template +1 -1
  23. package/package.json +2 -1
  24. package/src/module/module.command.d.ts +2 -2
  25. package/src/module/module.prompt.d.ts +19 -4
  26. package/src/module/module.script.d.ts +1 -0
  27. package/src/templates/module/__Model__.Template.d.ts +1 -1
  28. package/src/templates/module/__Model__.Unit.d.ts +1 -1
  29. package/src/templates/module/__Model__.Util.d.ts +1 -1
  30. package/src/templates/module/__Model__.View.d.ts +4 -2
  31. package/src/templates/module/__Model__.Zone.d.ts +1 -1
  32. package/src/templates/module/__model__.constant.d.ts +1 -1
  33. package/src/templates/module/__model__.dictionary.d.ts +1 -1
  34. package/src/templates/module/__model__.signal.d.ts +1 -1
  35. package/src/templates/module/__model__.signal.spec.d.ts +1 -1
  36. package/src/templates/module/__model__.signal.test.d.ts +1 -1
  37. package/src/templates/module/__model__.store.d.ts +1 -1
  38. package/src/templates/module/_server.d.ts +1 -1
  39. package/src/workspace/workspace.runner.d.ts +2 -1
@@ -27,7 +27,7 @@ function getContent(scanResult, dict) {
27
27
  filename: `${dict.Model}.Template.tsx`,
28
28
  content: `
29
29
  "use client";
30
- import { cnst, st, usePage } from "@${dict.appName}/client";
30
+ import { cnst, st, usePage } from "@${dict.sysName}/client";
31
31
  import { Field } from "@shared/ui";
32
32
  import { Layout } from "@util/ui";
33
33
 
@@ -27,7 +27,7 @@ function getContent(scanResult, dict) {
27
27
  filename: `${dict.Model}.Unit.tsx`,
28
28
  content: `
29
29
  import { ModelProps } from "@akanjs/client";
30
- import { cnst, ${dict.Model} } from "@${dict.appName}/client";
30
+ import { cnst, ${dict.Model} } from "@${dict.sysName}/client";
31
31
  import { Link } from "@util/ui";
32
32
 
33
33
  export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>>) => {
@@ -29,7 +29,7 @@ function getContent(scanResult, dict) {
29
29
  "use client";
30
30
  import { ModelDashboardProps, ModelInsightProps } from "@akanjs/client";
31
31
  import { getQueryMap } from "@akanjs/constant";
32
- import { cnst } from "@${dict.appName}/client";
32
+ import { cnst } from "@${dict.sysName}/client";
33
33
  import { Data } from "@shared/ui";
34
34
 
35
35
  export const Stat = ({
@@ -22,12 +22,12 @@ __export(Model_View_exports, {
22
22
  default: () => getContent
23
23
  });
24
24
  module.exports = __toCommonJS(Model_View_exports);
25
- function getContent(scanResult, dict = {}) {
25
+ function getContent(scanResult, dict) {
26
26
  return {
27
27
  filename: `${dict.Model}.View.tsx`,
28
28
  content: `
29
29
  import { clsx } from "@akanjs/client";
30
- import { cnst } from "@${dict.appName}/client";
30
+ import { cnst } from "@${dict.sysName}/client";
31
31
  import { Image } from "@util/ui";
32
32
 
33
33
  interface ${dict.Model}ViewProps {
@@ -29,7 +29,7 @@ function getContent(scanResult, dict) {
29
29
  "use client";
30
30
  import { Data, Load } from "@shared/ui";
31
31
  import { ModelsProps } from "@akanjs/client";
32
- import { cnst, ${dict.Model} } from "@${dict.appName}/client";
32
+ import { cnst, ${dict.Model} } from "@${dict.sysName}/client";
33
33
  import { ClientInit, ClientView, DefaultOf } from "@akanjs/signal";
34
34
 
35
35
  export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<cnst.${dict.Model}>>) => {
@@ -35,7 +35,7 @@ export class ${dict.Model}Input extends by(cnst.${dict.Model}Input) {}
35
35
  export class ${dict.Model} extends by(cnst.${dict.Model}) {}
36
36
 
37
37
  @Database.Model(() => cnst.${dict.Model})
38
- export class ${dict.Model}Model extends into(${dict.Model}, cnst.${dict.Model}Cnst) {
38
+ export class ${dict.Model}Model extends into(${dict.Model}, cnst.${dict.model}Cnst) {
39
39
  async getSummary(): Promise<cnst.${dict.Model}Summary> {
40
40
  return {
41
41
  ...(await this.getDefaultSummary()),
@@ -30,10 +30,10 @@ import { cnst } from "../cnst";
30
30
  import * as db from "../db";
31
31
 
32
32
  @Service("${dict.Model}Service")
33
- export class ${dict.Model}Service extends DbService(db.${dict.Model}Db) {
33
+ export class ${dict.Model}Service extends DbService(db.${dict.model}Db) {
34
34
  async summarize(): Promise<cnst.${dict.Model}Summary> {
35
35
  return {
36
- ...(await this.${dict.Model}Model.getSummary()),
36
+ ...(await this.${dict.model}Model.getSummary()),
37
37
  };
38
38
  }
39
39
  }
@@ -25,7 +25,7 @@ module.exports = __toCommonJS(model_signal_spec_exports);
25
25
  function getContent(scanResult, dict) {
26
26
  return `
27
27
  import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
28
- import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
28
+ import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
29
29
  import { cnst } from "../cnst";
30
30
  import { fetch } from "../fetch";
31
31
  import { sampleOf } from "@akanjs/test";
@@ -25,8 +25,8 @@ module.exports = __toCommonJS(model_signal_test_exports);
25
25
  function getContent(scanResult, dict) {
26
26
  return `
27
27
  import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
28
- import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
29
- import * as ${dict.model}Spec from "@${dict.appName}/lib/${dict.model}/${dict.model}.signal.spec";
28
+ import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
29
+ import * as ${dict.model}Spec from "@${dict.sysName}/lib/${dict.model}/${dict.model}.signal.spec";
30
30
  import { cnst } from "../cnst";
31
31
  import { fetch } from "../fetch";
32
32
 
@@ -28,7 +28,7 @@
28
28
  "vite-plugin-commonjs": "^0.10.4",
29
29
  "vite-plugin-node-polyfills": "^0.23.0",
30
30
  "vite-tsconfig-paths": "^5.1.4",
31
- "vm-browserify": "^1.1.2",
31
+ "vm-browserify": "^1.1.2"
32
32
  },
33
33
  "packageManager": "pnpm@10.11.0",
34
34
  "engines": {