@akanjs/cli 0.0.122 → 0.0.124

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 (41) hide show
  1. package/cjs/index.js +46 -39
  2. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +3 -11
  3. package/cjs/src/templates/module/__Model__.Template.js +1 -1
  4. package/cjs/src/templates/module/__Model__.Unit.js +2 -2
  5. package/cjs/src/templates/module/__Model__.Util.js +1 -1
  6. package/cjs/src/templates/module/__Model__.View.js +2 -2
  7. package/cjs/src/templates/module/__Model__.Zone.js +4 -4
  8. package/cjs/src/templates/module/__model__.document.js +1 -1
  9. package/cjs/src/templates/module/__model__.service.js +2 -2
  10. package/cjs/src/templates/module/__model__.signal.spec.js +1 -1
  11. package/cjs/src/templates/module/__model__.signal.test.js +2 -2
  12. package/esm/index.js +46 -39
  13. package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +3 -11
  14. package/esm/src/templates/module/__Model__.Template.js +1 -1
  15. package/esm/src/templates/module/__Model__.Unit.js +2 -2
  16. package/esm/src/templates/module/__Model__.Util.js +1 -1
  17. package/esm/src/templates/module/__Model__.View.js +2 -2
  18. package/esm/src/templates/module/__Model__.Zone.js +4 -4
  19. package/esm/src/templates/module/__model__.document.js +1 -1
  20. package/esm/src/templates/module/__model__.service.js +2 -2
  21. package/esm/src/templates/module/__model__.signal.spec.js +1 -1
  22. package/esm/src/templates/module/__model__.signal.test.js +2 -2
  23. package/package.json +1 -1
  24. package/src/application/application.runner.d.ts +3 -1
  25. package/src/application/application.script.d.ts +1 -1
  26. package/src/library/library.runner.d.ts +0 -1
  27. package/src/library/library.script.d.ts +1 -1
  28. package/src/module/module.command.d.ts +1 -1
  29. package/src/module/module.script.d.ts +1 -0
  30. package/src/templates/module/__Model__.Template.d.ts +1 -1
  31. package/src/templates/module/__Model__.Unit.d.ts +1 -1
  32. package/src/templates/module/__Model__.Util.d.ts +1 -1
  33. package/src/templates/module/__Model__.View.d.ts +4 -2
  34. package/src/templates/module/__Model__.Zone.d.ts +1 -1
  35. package/src/templates/module/__model__.constant.d.ts +1 -1
  36. package/src/templates/module/__model__.dictionary.d.ts +1 -1
  37. package/src/templates/module/__model__.signal.d.ts +1 -1
  38. package/src/templates/module/__model__.signal.spec.d.ts +1 -1
  39. package/src/templates/module/__model__.signal.test.d.ts +1 -1
  40. package/src/templates/module/__model__.store.d.ts +1 -1
  41. package/src/templates/module/_server.d.ts +1 -1
package/cjs/index.js CHANGED
@@ -2122,7 +2122,9 @@ var AiSession = class _AiSession {
2122
2122
  }
2123
2123
  } = {}) {
2124
2124
  if (!_AiSession.#chat)
2125
- throw new Error("Please initialize the AI session first");
2125
+ await _AiSession.init();
2126
+ if (!_AiSession.#chat)
2127
+ throw new Error("Failed to initialize the AI session");
2126
2128
  try {
2127
2129
  const humanMessage = new import_messages.HumanMessage(question);
2128
2130
  this.messageHistory.push(humanMessage);
@@ -2251,15 +2253,10 @@ var Builder = class {
2251
2253
  var import_compare_versions = require("compare-versions");
2252
2254
  var import_dotenv2 = __toESM(require("dotenv"));
2253
2255
  var LibraryRunner = class {
2254
- async scanSync(lib) {
2255
- const akanConfig = await lib.getConfig();
2256
- const scanResult = await lib.scan({ akanConfig });
2257
- return scanResult;
2258
- }
2259
2256
  async createLibrary(libName, workspace) {
2260
2257
  await workspace.exec(`mkdir -p libs/${libName}`);
2261
2258
  const lib = LibExecutor.from(workspace, libName);
2262
- await lib.applyTemplate({ basePath: ".", template: "libRoot", dict: { libName, Libname: capitalize(libName) } });
2259
+ await lib.applyTemplate({ basePath: ".", template: "libRoot", dict: { libName, LibName: capitalize(libName) } });
2263
2260
  const rootTsConfig = workspace.readJson("tsconfig.json");
2264
2261
  rootTsConfig.compilerOptions.paths[`@${libName}`] = [`libs/${libName}/index.ts`];
2265
2262
  rootTsConfig.compilerOptions.paths[`@${libName}/*`] = [`libs/${libName}/*`];
@@ -2351,17 +2348,18 @@ var LibraryRunner = class {
2351
2348
  var LibraryScript = class {
2352
2349
  #runner = new LibraryRunner();
2353
2350
  async scanLibrary(lib, verbose = false) {
2354
- const scanResult = await this.#runner.scanSync(lib);
2351
+ const akanConfig = await lib.getConfig();
2352
+ const scanResult = await lib.scan({ akanConfig });
2355
2353
  if (verbose)
2356
2354
  lib.logger.rawLog(JSON.stringify(scanResult, null, 2));
2357
2355
  return scanResult;
2358
2356
  }
2359
2357
  async syncLibrary(lib, { recursive = true } = {}) {
2360
- const scanResult = await this.scanLibrary(lib);
2361
- if (!recursive)
2362
- return;
2363
- for (const libName of scanResult.akanConfig.libs)
2364
- await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
2358
+ const akanConfig = await lib.getConfig();
2359
+ if (recursive)
2360
+ for (const libName of akanConfig.libs)
2361
+ await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
2362
+ return await lib.scan({ akanConfig });
2365
2363
  }
2366
2364
  async createLibrary(libName, workspace) {
2367
2365
  const lib = await this.#runner.createLibrary(libName, workspace);
@@ -4568,13 +4566,15 @@ var ApplicationRunner = class {
4568
4566
  await app.workspace.exec(`rm -rf apps/${app.name}`);
4569
4567
  app.log(`Application ${app.name} removed`);
4570
4568
  }
4571
- async scanSync(app) {
4572
- const akanConfig = await getAppConfig(app.cwdPath, {
4569
+ async getConfig(app) {
4570
+ return await getAppConfig(app.cwdPath, {
4573
4571
  ...app.workspace.getBaseDevEnv(),
4574
4572
  type: "app",
4575
4573
  name: app.name,
4576
4574
  command: "start"
4577
4575
  });
4576
+ }
4577
+ async scanSync(app, akanConfig) {
4578
4578
  const scanResult = await app.scan({ akanConfig });
4579
4579
  await app.syncAssets(scanResult.akanConfig.libs);
4580
4580
  return scanResult;
@@ -5077,17 +5077,18 @@ var ApplicationScript = class {
5077
5077
  await this.#runner.removeApplication(app);
5078
5078
  }
5079
5079
  async scanApplication(app, verbose = false) {
5080
- const scanResult = await this.#runner.scanSync(app);
5080
+ const akanConfig = await this.#runner.getConfig(app);
5081
+ const scanResult = await this.#runner.scanSync(app, akanConfig);
5081
5082
  if (verbose)
5082
5083
  app.logger.rawLog(JSON.stringify(scanResult, null, 2));
5083
5084
  return scanResult;
5084
5085
  }
5085
5086
  async syncApplication(app, { recursive = true } = {}) {
5086
- const scanResult = await this.#runner.scanSync(app);
5087
- if (!recursive)
5088
- return;
5089
- for (const libName of scanResult.akanConfig.libs)
5090
- await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
5087
+ const akanConfig = await this.#runner.getConfig(app);
5088
+ if (recursive)
5089
+ for (const libName of akanConfig.libs)
5090
+ await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
5091
+ return await this.#runner.scanSync(app, akanConfig);
5091
5092
  }
5092
5093
  async build(app) {
5093
5094
  await this.syncApplication(app);
@@ -5778,7 +5779,7 @@ var ModuleRunner = class {
5778
5779
  basePath: "./lib/__scalar",
5779
5780
  template: "__scalar",
5780
5781
  scanResult,
5781
- dict: { model: name, Model: capitalize(name) }
5782
+ dict: { model: name, Model: capitalize(name), sysName: sys2.name, SysName: capitalize(sys2.name) }
5782
5783
  });
5783
5784
  await sys2.scan({ akanConfig });
5784
5785
  return {
@@ -5796,50 +5797,50 @@ var ModuleRunner = class {
5796
5797
  basePath: `./lib/${name}`,
5797
5798
  template: "module",
5798
5799
  scanResult,
5799
- dict: { model: name, Model: capitalize(name) }
5800
+ dict: { model: name, Model: capitalize(name), sysName: sys2.name, SysName: capitalize(sys2.name) }
5800
5801
  });
5801
5802
  await sys2.scan({ akanConfig });
5802
5803
  return {
5803
- constant: { filename: `${name}.constant.ts`, content: sys2.readFile(`lib/module/${name}/${name}.constant.ts`) },
5804
+ constant: { filename: `${name}.constant.ts`, content: sys2.readFile(`lib/${name}/${name}.constant.ts`) },
5804
5805
  dictionary: {
5805
5806
  filename: `${name}.dictionary.ts`,
5806
- content: sys2.readFile(`lib/module/${name}/${name}.dictionary.ts`)
5807
+ content: sys2.readFile(`lib/${name}/${name}.dictionary.ts`)
5807
5808
  },
5808
5809
  service: {
5809
5810
  filename: `${name}.service.ts`,
5810
- content: sys2.readFile(`lib/module/${name}/${name}.service.ts`)
5811
+ content: sys2.readFile(`lib/${name}/${name}.service.ts`)
5811
5812
  },
5812
5813
  store: {
5813
5814
  filename: `${name}.store.ts`,
5814
- content: sys2.readFile(`lib/module/${name}/${name}.store.ts`)
5815
+ content: sys2.readFile(`lib/${name}/${name}.store.ts`)
5815
5816
  },
5816
5817
  signal: {
5817
5818
  filename: `${name}.signal.ts`,
5818
- content: sys2.readFile(`lib/module/${name}/${name}.signal.ts`)
5819
+ content: sys2.readFile(`lib/${name}/${name}.signal.spec.ts`)
5819
5820
  },
5820
5821
  test: {
5821
5822
  filename: `${name}.test.ts`,
5822
- content: sys2.readFile(`lib/module/${name}/${name}.test.ts`)
5823
+ content: sys2.readFile(`lib/${name}/${name}.signal.test.ts`)
5823
5824
  },
5824
5825
  unit: {
5825
5826
  filename: `${name}.Unit.tsx`,
5826
- content: sys2.readFile(`lib/module/${name}/${name}.Unit.tsx`)
5827
+ content: sys2.readFile(`lib/${name}/${name}.Unit.tsx`)
5827
5828
  },
5828
5829
  view: {
5829
5830
  filename: `${name}.View.tsx`,
5830
- content: sys2.readFile(`lib/module/${name}/${name}.View.tsx`)
5831
+ content: sys2.readFile(`lib/${name}/${name}.View.tsx`)
5831
5832
  },
5832
5833
  template: {
5833
5834
  filename: `${name}.Template.tsx`,
5834
- content: sys2.readFile(`lib/module/${name}/${name}.Template.tsx`)
5835
+ content: sys2.readFile(`lib/${name}/${name}.Template.tsx`)
5835
5836
  },
5836
5837
  zone: {
5837
5838
  filename: `${name}.Zone.tsx`,
5838
- content: sys2.readFile(`lib/module/${name}/${name}.Zone.tsx`)
5839
+ content: sys2.readFile(`lib/${name}/${name}.Zone.tsx`)
5839
5840
  },
5840
5841
  util: {
5841
5842
  filename: `${name}.Util.tsx`,
5842
- content: sys2.readFile(`lib/module/${name}/${name}.Util.tsx`)
5843
+ content: sys2.readFile(`lib/${name}/${name}.Util.tsx`)
5843
5844
  }
5844
5845
  };
5845
5846
  }
@@ -5906,6 +5907,10 @@ var ModuleRunner = class {
5906
5907
  // pkgs/@akanjs/cli/src/module/module.script.ts
5907
5908
  var ModuleScript = class {
5908
5909
  #runner = new ModuleRunner();
5910
+ async createModuleTemplate(sys2, name) {
5911
+ await this.#runner.createModuleTemplate(sys2, name);
5912
+ sys2.log(`Module ${name} created in ${sys2.type}s/${sys2.name}/lib/${name}`);
5913
+ }
5909
5914
  async createModule(sys2) {
5910
5915
  const [appNames, libNames] = await sys2.workspace.getSyss();
5911
5916
  const constantExampleFiles = [
@@ -5926,6 +5931,7 @@ var ModuleScript = class {
5926
5931
  async removeModule(workspace, name) {
5927
5932
  }
5928
5933
  async createScalar(sys2, name, description, schemaDescription) {
5934
+ await AiSession.init();
5929
5935
  const scalarConstantExampleFiles = await sys2.workspace.getScalarConstantFiles();
5930
5936
  const { constant, dictionary } = await this.#runner.createScalarTemplate(sys2, name);
5931
5937
  const session = new AiSession();
@@ -6012,8 +6018,8 @@ var ModuleScript = class {
6012
6018
  // pkgs/@akanjs/cli/src/module/module.command.ts
6013
6019
  var ModuleCommand = class {
6014
6020
  moduleScript = new ModuleScript();
6015
- async createModule(sys2, workspace) {
6016
- await this.moduleScript.createModule(sys2);
6021
+ async createModule(sys2, name, workspace) {
6022
+ await this.moduleScript.createModuleTemplate(sys2, name);
6017
6023
  }
6018
6024
  async removeModule(name, workspace) {
6019
6025
  }
@@ -6036,7 +6042,8 @@ var ModuleCommand = class {
6036
6042
  __decorateClass([
6037
6043
  Target.Public(),
6038
6044
  __decorateParam(0, Sys()),
6039
- __decorateParam(1, Workspace())
6045
+ __decorateParam(1, Option("name", { desc: "name of module" })),
6046
+ __decorateParam(2, Workspace())
6040
6047
  ], ModuleCommand.prototype, "createModule", 1);
6041
6048
  __decorateClass([
6042
6049
  Target.Public(),
@@ -6154,10 +6161,10 @@ PageCommand = __decorateClass([
6154
6161
  ], PageCommand);
6155
6162
 
6156
6163
  // pkgs/@akanjs/cli/src/workspace/workspace.runner.ts
6157
- var import_uuid2 = require("uuid");
6158
- var import_lodash = require("lodash");
6159
6164
  var import_latest_version2 = __toESM(require("latest-version"));
6165
+ var import_lodash = require("lodash");
6160
6166
  var import_path5 = __toESM(require("path"));
6167
+ var import_uuid2 = require("uuid");
6161
6168
  var WorkspaceRunner = class {
6162
6169
  async createWorkspace(repoName, appName, dirname = ".") {
6163
6170
  const cwdPath = process.cwd();
@@ -24,19 +24,11 @@ __export(libName_service_exports, {
24
24
  module.exports = __toCommonJS(libName_service_exports);
25
25
  function getContent(scanResult, dict) {
26
26
  return `
27
- import { Cron } from "@akanjs/nest";
28
- import { LogService, Service, Srv } from "@akanjs/service";
27
+ import { LogService, Service } from "@akanjs/service";
29
28
 
30
- import type * as srv from "../srv";
29
+ // import type * as srv from "../srv";
31
30
 
32
31
  @Service("${dict.libName}Service", { serverMode: "batch" })
33
- export class ${dict.LibName}Service extends LogService("${dict.libName}Service") {
34
- @Srv() protected readonly summaryService: srv.SummaryService;
35
-
36
- @Cron("0 * * * *")
37
- async takePeriodicSnapshot() {
38
- await this.summaryService.makeSummary();
39
- }
40
- }
32
+ export class ${dict.LibName}Service extends LogService("${dict.libName}Service") {}
41
33
  `;
42
34
  }
@@ -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,10 +27,10 @@ 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
- export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>>) => {
33
+ export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>) => {
34
34
  return (
35
35
  <Link href={href} className="animate-fadeIn w-full h-36 flex rounded-lg shadow-sm hover:shadow-lg duration-300">
36
36
  <div>{${dict.model}.id}</div>
@@ -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,10 +29,10 @@ 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
- export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<cnst.${dict.Model}>>) => {
35
+ export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<cnst.${dict.Model}>) => {
36
36
  return (
37
37
  <Data.ListContainer
38
38
  init={init}
@@ -42,8 +42,8 @@ export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<
42
42
  renderDashboard={${dict.Model}.Util.Stat}
43
43
  renderInsight={${dict.Model}.Util.Insight}
44
44
  renderTemplate={${dict.Model}.Template.General}
45
- renderTitle={(${dict.model}: DefaultOf<cnst.${dict.Model}>>) => \`${dict.Model} - \${${dict.model}.id ? ${dict.model}.id : "New"}\`}
46
- renderView={(${dict.model}: cnst.${dict.Model}>) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />}
45
+ renderTitle={(${dict.model}: DefaultOf<cnst.${dict.Model}>) => \`${dict.Model} - \${${dict.model}.id ? ${dict.model}.id : "New"}\`}
46
+ renderView={(${dict.model}: cnst.${dict.Model}) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />}
47
47
  columns={[
48
48
  "id",
49
49
  "status",
@@ -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
 
package/esm/index.js CHANGED
@@ -2109,7 +2109,9 @@ var AiSession = class _AiSession {
2109
2109
  }
2110
2110
  } = {}) {
2111
2111
  if (!_AiSession.#chat)
2112
- throw new Error("Please initialize the AI session first");
2112
+ await _AiSession.init();
2113
+ if (!_AiSession.#chat)
2114
+ throw new Error("Failed to initialize the AI session");
2113
2115
  try {
2114
2116
  const humanMessage = new HumanMessage(question);
2115
2117
  this.messageHistory.push(humanMessage);
@@ -2238,15 +2240,10 @@ var Builder = class {
2238
2240
  import { compareVersions } from "compare-versions";
2239
2241
  import dotenv2 from "dotenv";
2240
2242
  var LibraryRunner = class {
2241
- async scanSync(lib) {
2242
- const akanConfig = await lib.getConfig();
2243
- const scanResult = await lib.scan({ akanConfig });
2244
- return scanResult;
2245
- }
2246
2243
  async createLibrary(libName, workspace) {
2247
2244
  await workspace.exec(`mkdir -p libs/${libName}`);
2248
2245
  const lib = LibExecutor.from(workspace, libName);
2249
- await lib.applyTemplate({ basePath: ".", template: "libRoot", dict: { libName, Libname: capitalize(libName) } });
2246
+ await lib.applyTemplate({ basePath: ".", template: "libRoot", dict: { libName, LibName: capitalize(libName) } });
2250
2247
  const rootTsConfig = workspace.readJson("tsconfig.json");
2251
2248
  rootTsConfig.compilerOptions.paths[`@${libName}`] = [`libs/${libName}/index.ts`];
2252
2249
  rootTsConfig.compilerOptions.paths[`@${libName}/*`] = [`libs/${libName}/*`];
@@ -2338,17 +2335,18 @@ var LibraryRunner = class {
2338
2335
  var LibraryScript = class {
2339
2336
  #runner = new LibraryRunner();
2340
2337
  async scanLibrary(lib, verbose = false) {
2341
- const scanResult = await this.#runner.scanSync(lib);
2338
+ const akanConfig = await lib.getConfig();
2339
+ const scanResult = await lib.scan({ akanConfig });
2342
2340
  if (verbose)
2343
2341
  lib.logger.rawLog(JSON.stringify(scanResult, null, 2));
2344
2342
  return scanResult;
2345
2343
  }
2346
2344
  async syncLibrary(lib, { recursive = true } = {}) {
2347
- const scanResult = await this.scanLibrary(lib);
2348
- if (!recursive)
2349
- return;
2350
- for (const libName of scanResult.akanConfig.libs)
2351
- await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
2345
+ const akanConfig = await lib.getConfig();
2346
+ if (recursive)
2347
+ for (const libName of akanConfig.libs)
2348
+ await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
2349
+ return await lib.scan({ akanConfig });
2352
2350
  }
2353
2351
  async createLibrary(libName, workspace) {
2354
2352
  const lib = await this.#runner.createLibrary(libName, workspace);
@@ -4555,13 +4553,15 @@ var ApplicationRunner = class {
4555
4553
  await app.workspace.exec(`rm -rf apps/${app.name}`);
4556
4554
  app.log(`Application ${app.name} removed`);
4557
4555
  }
4558
- async scanSync(app) {
4559
- const akanConfig = await getAppConfig(app.cwdPath, {
4556
+ async getConfig(app) {
4557
+ return await getAppConfig(app.cwdPath, {
4560
4558
  ...app.workspace.getBaseDevEnv(),
4561
4559
  type: "app",
4562
4560
  name: app.name,
4563
4561
  command: "start"
4564
4562
  });
4563
+ }
4564
+ async scanSync(app, akanConfig) {
4565
4565
  const scanResult = await app.scan({ akanConfig });
4566
4566
  await app.syncAssets(scanResult.akanConfig.libs);
4567
4567
  return scanResult;
@@ -5064,17 +5064,18 @@ var ApplicationScript = class {
5064
5064
  await this.#runner.removeApplication(app);
5065
5065
  }
5066
5066
  async scanApplication(app, verbose = false) {
5067
- const scanResult = await this.#runner.scanSync(app);
5067
+ const akanConfig = await this.#runner.getConfig(app);
5068
+ const scanResult = await this.#runner.scanSync(app, akanConfig);
5068
5069
  if (verbose)
5069
5070
  app.logger.rawLog(JSON.stringify(scanResult, null, 2));
5070
5071
  return scanResult;
5071
5072
  }
5072
5073
  async syncApplication(app, { recursive = true } = {}) {
5073
- const scanResult = await this.#runner.scanSync(app);
5074
- if (!recursive)
5075
- return;
5076
- for (const libName of scanResult.akanConfig.libs)
5077
- await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
5074
+ const akanConfig = await this.#runner.getConfig(app);
5075
+ if (recursive)
5076
+ for (const libName of akanConfig.libs)
5077
+ await this.libraryScript.syncLibrary(LibExecutor.from(app, libName), { recursive: false });
5078
+ return await this.#runner.scanSync(app, akanConfig);
5078
5079
  }
5079
5080
  async build(app) {
5080
5081
  await this.syncApplication(app);
@@ -5765,7 +5766,7 @@ var ModuleRunner = class {
5765
5766
  basePath: "./lib/__scalar",
5766
5767
  template: "__scalar",
5767
5768
  scanResult,
5768
- dict: { model: name, Model: capitalize(name) }
5769
+ dict: { model: name, Model: capitalize(name), sysName: sys2.name, SysName: capitalize(sys2.name) }
5769
5770
  });
5770
5771
  await sys2.scan({ akanConfig });
5771
5772
  return {
@@ -5783,50 +5784,50 @@ var ModuleRunner = class {
5783
5784
  basePath: `./lib/${name}`,
5784
5785
  template: "module",
5785
5786
  scanResult,
5786
- dict: { model: name, Model: capitalize(name) }
5787
+ dict: { model: name, Model: capitalize(name), sysName: sys2.name, SysName: capitalize(sys2.name) }
5787
5788
  });
5788
5789
  await sys2.scan({ akanConfig });
5789
5790
  return {
5790
- constant: { filename: `${name}.constant.ts`, content: sys2.readFile(`lib/module/${name}/${name}.constant.ts`) },
5791
+ constant: { filename: `${name}.constant.ts`, content: sys2.readFile(`lib/${name}/${name}.constant.ts`) },
5791
5792
  dictionary: {
5792
5793
  filename: `${name}.dictionary.ts`,
5793
- content: sys2.readFile(`lib/module/${name}/${name}.dictionary.ts`)
5794
+ content: sys2.readFile(`lib/${name}/${name}.dictionary.ts`)
5794
5795
  },
5795
5796
  service: {
5796
5797
  filename: `${name}.service.ts`,
5797
- content: sys2.readFile(`lib/module/${name}/${name}.service.ts`)
5798
+ content: sys2.readFile(`lib/${name}/${name}.service.ts`)
5798
5799
  },
5799
5800
  store: {
5800
5801
  filename: `${name}.store.ts`,
5801
- content: sys2.readFile(`lib/module/${name}/${name}.store.ts`)
5802
+ content: sys2.readFile(`lib/${name}/${name}.store.ts`)
5802
5803
  },
5803
5804
  signal: {
5804
5805
  filename: `${name}.signal.ts`,
5805
- content: sys2.readFile(`lib/module/${name}/${name}.signal.ts`)
5806
+ content: sys2.readFile(`lib/${name}/${name}.signal.spec.ts`)
5806
5807
  },
5807
5808
  test: {
5808
5809
  filename: `${name}.test.ts`,
5809
- content: sys2.readFile(`lib/module/${name}/${name}.test.ts`)
5810
+ content: sys2.readFile(`lib/${name}/${name}.signal.test.ts`)
5810
5811
  },
5811
5812
  unit: {
5812
5813
  filename: `${name}.Unit.tsx`,
5813
- content: sys2.readFile(`lib/module/${name}/${name}.Unit.tsx`)
5814
+ content: sys2.readFile(`lib/${name}/${name}.Unit.tsx`)
5814
5815
  },
5815
5816
  view: {
5816
5817
  filename: `${name}.View.tsx`,
5817
- content: sys2.readFile(`lib/module/${name}/${name}.View.tsx`)
5818
+ content: sys2.readFile(`lib/${name}/${name}.View.tsx`)
5818
5819
  },
5819
5820
  template: {
5820
5821
  filename: `${name}.Template.tsx`,
5821
- content: sys2.readFile(`lib/module/${name}/${name}.Template.tsx`)
5822
+ content: sys2.readFile(`lib/${name}/${name}.Template.tsx`)
5822
5823
  },
5823
5824
  zone: {
5824
5825
  filename: `${name}.Zone.tsx`,
5825
- content: sys2.readFile(`lib/module/${name}/${name}.Zone.tsx`)
5826
+ content: sys2.readFile(`lib/${name}/${name}.Zone.tsx`)
5826
5827
  },
5827
5828
  util: {
5828
5829
  filename: `${name}.Util.tsx`,
5829
- content: sys2.readFile(`lib/module/${name}/${name}.Util.tsx`)
5830
+ content: sys2.readFile(`lib/${name}/${name}.Util.tsx`)
5830
5831
  }
5831
5832
  };
5832
5833
  }
@@ -5893,6 +5894,10 @@ var ModuleRunner = class {
5893
5894
  // pkgs/@akanjs/cli/src/module/module.script.ts
5894
5895
  var ModuleScript = class {
5895
5896
  #runner = new ModuleRunner();
5897
+ async createModuleTemplate(sys2, name) {
5898
+ await this.#runner.createModuleTemplate(sys2, name);
5899
+ sys2.log(`Module ${name} created in ${sys2.type}s/${sys2.name}/lib/${name}`);
5900
+ }
5896
5901
  async createModule(sys2) {
5897
5902
  const [appNames, libNames] = await sys2.workspace.getSyss();
5898
5903
  const constantExampleFiles = [
@@ -5913,6 +5918,7 @@ var ModuleScript = class {
5913
5918
  async removeModule(workspace, name) {
5914
5919
  }
5915
5920
  async createScalar(sys2, name, description, schemaDescription) {
5921
+ await AiSession.init();
5916
5922
  const scalarConstantExampleFiles = await sys2.workspace.getScalarConstantFiles();
5917
5923
  const { constant, dictionary } = await this.#runner.createScalarTemplate(sys2, name);
5918
5924
  const session = new AiSession();
@@ -5999,8 +6005,8 @@ var ModuleScript = class {
5999
6005
  // pkgs/@akanjs/cli/src/module/module.command.ts
6000
6006
  var ModuleCommand = class {
6001
6007
  moduleScript = new ModuleScript();
6002
- async createModule(sys2, workspace) {
6003
- await this.moduleScript.createModule(sys2);
6008
+ async createModule(sys2, name, workspace) {
6009
+ await this.moduleScript.createModuleTemplate(sys2, name);
6004
6010
  }
6005
6011
  async removeModule(name, workspace) {
6006
6012
  }
@@ -6023,7 +6029,8 @@ var ModuleCommand = class {
6023
6029
  __decorateClass([
6024
6030
  Target.Public(),
6025
6031
  __decorateParam(0, Sys()),
6026
- __decorateParam(1, Workspace())
6032
+ __decorateParam(1, Option("name", { desc: "name of module" })),
6033
+ __decorateParam(2, Workspace())
6027
6034
  ], ModuleCommand.prototype, "createModule", 1);
6028
6035
  __decorateClass([
6029
6036
  Target.Public(),
@@ -6141,10 +6148,10 @@ PageCommand = __decorateClass([
6141
6148
  ], PageCommand);
6142
6149
 
6143
6150
  // pkgs/@akanjs/cli/src/workspace/workspace.runner.ts
6144
- import { v5 as uuid } from "uuid";
6145
- import { capitalize as capitalize2 } from "lodash";
6146
6151
  import latestVersion2 from "latest-version";
6152
+ import { capitalize as capitalize2 } from "lodash";
6147
6153
  import path6 from "path";
6154
+ import { v5 as uuid } from "uuid";
6148
6155
  var WorkspaceRunner = class {
6149
6156
  async createWorkspace(repoName, appName, dirname = ".") {
6150
6157
  const cwdPath = process.cwd();
@@ -1,20 +1,12 @@
1
1
  // pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/__libName__.service.ts
2
2
  function getContent(scanResult, dict) {
3
3
  return `
4
- import { Cron } from "@akanjs/nest";
5
- import { LogService, Service, Srv } from "@akanjs/service";
4
+ import { LogService, Service } from "@akanjs/service";
6
5
 
7
- import type * as srv from "../srv";
6
+ // import type * as srv from "../srv";
8
7
 
9
8
  @Service("${dict.libName}Service", { serverMode: "batch" })
10
- export class ${dict.LibName}Service extends LogService("${dict.libName}Service") {
11
- @Srv() protected readonly summaryService: srv.SummaryService;
12
-
13
- @Cron("0 * * * *")
14
- async takePeriodicSnapshot() {
15
- await this.summaryService.makeSummary();
16
- }
17
- }
9
+ export class ${dict.LibName}Service extends LogService("${dict.libName}Service") {}
18
10
  `;
19
11
  }
20
12
  export {
@@ -4,7 +4,7 @@ function getContent(scanResult, dict) {
4
4
  filename: `${dict.Model}.Template.tsx`,
5
5
  content: `
6
6
  "use client";
7
- import { cnst, st, usePage } from "@${dict.appName}/client";
7
+ import { cnst, st, usePage } from "@${dict.sysName}/client";
8
8
  import { Field } from "@shared/ui";
9
9
  import { Layout } from "@util/ui";
10
10
 
@@ -4,10 +4,10 @@ function getContent(scanResult, dict) {
4
4
  filename: `${dict.Model}.Unit.tsx`,
5
5
  content: `
6
6
  import { ModelProps } from "@akanjs/client";
7
- import { cnst, ${dict.Model} } from "@${dict.appName}/client";
7
+ import { cnst, ${dict.Model} } from "@${dict.sysName}/client";
8
8
  import { Link } from "@util/ui";
9
9
 
10
- export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>>) => {
10
+ export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>) => {
11
11
  return (
12
12
  <Link href={href} className="animate-fadeIn w-full h-36 flex rounded-lg shadow-sm hover:shadow-lg duration-300">
13
13
  <div>{${dict.model}.id}</div>
@@ -6,7 +6,7 @@ function getContent(scanResult, dict) {
6
6
  "use client";
7
7
  import { ModelDashboardProps, ModelInsightProps } from "@akanjs/client";
8
8
  import { getQueryMap } from "@akanjs/constant";
9
- import { cnst } from "@${dict.appName}/client";
9
+ import { cnst } from "@${dict.sysName}/client";
10
10
  import { Data } from "@shared/ui";
11
11
 
12
12
  export const Stat = ({
@@ -1,10 +1,10 @@
1
1
  // pkgs/@akanjs/cli/src/templates/module/__Model__.View.tsx
2
- function getContent(scanResult, dict = {}) {
2
+ function getContent(scanResult, dict) {
3
3
  return {
4
4
  filename: `${dict.Model}.View.tsx`,
5
5
  content: `
6
6
  import { clsx } from "@akanjs/client";
7
- import { cnst } from "@${dict.appName}/client";
7
+ import { cnst } from "@${dict.sysName}/client";
8
8
  import { Image } from "@util/ui";
9
9
 
10
10
  interface ${dict.Model}ViewProps {
@@ -6,10 +6,10 @@ function getContent(scanResult, dict) {
6
6
  "use client";
7
7
  import { Data, Load } from "@shared/ui";
8
8
  import { ModelsProps } from "@akanjs/client";
9
- import { cnst, ${dict.Model} } from "@${dict.appName}/client";
9
+ import { cnst, ${dict.Model} } from "@${dict.sysName}/client";
10
10
  import { ClientInit, ClientView, DefaultOf } from "@akanjs/signal";
11
11
 
12
- export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<cnst.${dict.Model}>>) => {
12
+ export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<cnst.${dict.Model}>) => {
13
13
  return (
14
14
  <Data.ListContainer
15
15
  init={init}
@@ -19,8 +19,8 @@ export const Admin = ({ sliceName = "${dict.model}", init, query }: ModelsProps<
19
19
  renderDashboard={${dict.Model}.Util.Stat}
20
20
  renderInsight={${dict.Model}.Util.Insight}
21
21
  renderTemplate={${dict.Model}.Template.General}
22
- renderTitle={(${dict.model}: DefaultOf<cnst.${dict.Model}>>) => \`${dict.Model} - \${${dict.model}.id ? ${dict.model}.id : "New"}\`}
23
- renderView={(${dict.model}: cnst.${dict.Model}>) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />}
22
+ renderTitle={(${dict.model}: DefaultOf<cnst.${dict.Model}>) => \`${dict.Model} - \${${dict.model}.id ? ${dict.model}.id : "New"}\`}
23
+ renderView={(${dict.model}: cnst.${dict.Model}) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />}
24
24
  columns={[
25
25
  "id",
26
26
  "status",
@@ -12,7 +12,7 @@ export class ${dict.Model}Input extends by(cnst.${dict.Model}Input) {}
12
12
  export class ${dict.Model} extends by(cnst.${dict.Model}) {}
13
13
 
14
14
  @Database.Model(() => cnst.${dict.Model})
15
- export class ${dict.Model}Model extends into(${dict.Model}, cnst.${dict.Model}Cnst) {
15
+ export class ${dict.Model}Model extends into(${dict.Model}, cnst.${dict.model}Cnst) {
16
16
  async getSummary(): Promise<cnst.${dict.Model}Summary> {
17
17
  return {
18
18
  ...(await this.getDefaultSummary()),
@@ -7,10 +7,10 @@ import { cnst } from "../cnst";
7
7
  import * as db from "../db";
8
8
 
9
9
  @Service("${dict.Model}Service")
10
- export class ${dict.Model}Service extends DbService(db.${dict.Model}Db) {
10
+ export class ${dict.Model}Service extends DbService(db.${dict.model}Db) {
11
11
  async summarize(): Promise<cnst.${dict.Model}Summary> {
12
12
  return {
13
- ...(await this.${dict.Model}Model.getSummary()),
13
+ ...(await this.${dict.model}Model.getSummary()),
14
14
  };
15
15
  }
16
16
  }
@@ -2,7 +2,7 @@
2
2
  function getContent(scanResult, dict) {
3
3
  return `
4
4
  import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
5
- import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
5
+ import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
6
6
  import { cnst } from "../cnst";
7
7
  import { fetch } from "../fetch";
8
8
  import { sampleOf } from "@akanjs/test";
@@ -2,8 +2,8 @@
2
2
  function getContent(scanResult, dict) {
3
3
  return `
4
4
  import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
5
- import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
6
- import * as ${dict.model}Spec from "@${dict.appName}/lib/${dict.model}/${dict.model}.signal.spec";
5
+ import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
6
+ import * as ${dict.model}Spec from "@${dict.sysName}/lib/${dict.model}/${dict.model}.signal.spec";
7
7
  import { cnst } from "../cnst";
8
8
  import { fetch } from "../fetch";
9
9
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sourceType": "module",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.122",
4
+ "version": "0.0.124",
5
5
  "bin": {
6
6
  "akan": "cjs/index.js"
7
7
  },
@@ -1,3 +1,4 @@
1
+ import { type AppConfigResult } from "@akanjs/config";
1
2
  import { App, AppExecutor, type Workspace } from "@akanjs/devkit";
2
3
  export interface ReleaseSourceOptions {
3
4
  rebuild?: boolean;
@@ -9,7 +10,8 @@ export declare class ApplicationRunner {
9
10
  #private;
10
11
  createApplication(appName: string, workspace: Workspace): Promise<AppExecutor>;
11
12
  removeApplication(app: App): Promise<void>;
12
- scanSync(app: App): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
13
+ getConfig(app: App): Promise<AppConfigResult>;
14
+ scanSync(app: App, akanConfig: AppConfigResult): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
13
15
  buildBackend(app: App): Promise<void>;
14
16
  startBackend(app: App, { open }?: {
15
17
  open?: boolean;
@@ -11,7 +11,7 @@ export declare class ApplicationScript {
11
11
  scanApplication(app: App, verbose?: boolean): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
12
12
  syncApplication(app: App, { recursive }?: {
13
13
  recursive?: boolean;
14
- }): Promise<void>;
14
+ }): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
15
15
  build(app: App): Promise<void>;
16
16
  start(app: App, { open }?: {
17
17
  open?: boolean;
@@ -1,7 +1,6 @@
1
1
  import { Lib, LibExecutor, Workspace } from "@akanjs/devkit";
2
2
  export declare class LibraryRunner {
3
3
  #private;
4
- scanSync(lib: Lib): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
5
4
  createLibrary(libName: string, workspace: Workspace): Promise<LibExecutor>;
6
5
  removeLibrary(lib: Lib): Promise<void>;
7
6
  installLibrary(workspace: Workspace, libName: string): Promise<LibExecutor>;
@@ -4,7 +4,7 @@ export declare class LibraryScript {
4
4
  scanLibrary(lib: Lib, verbose?: boolean): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
5
5
  syncLibrary(lib: Lib, { recursive }?: {
6
6
  recursive?: boolean;
7
- }): Promise<void>;
7
+ }): Promise<import("@akanjs/config").AppScanResult | import("@akanjs/config").LibScanResult>;
8
8
  createLibrary(libName: string, workspace: Workspace): Promise<void>;
9
9
  removeLibrary(lib: Lib): Promise<void>;
10
10
  installLibrary(workspace: Workspace, libName: string): Promise<void>;
@@ -2,7 +2,7 @@ import { Sys, Workspace } from "@akanjs/devkit";
2
2
  import { ModuleScript } from "./module.script";
3
3
  export declare class ModuleCommand {
4
4
  moduleScript: ModuleScript;
5
- createModule(sys: Sys, workspace: Workspace): Promise<void>;
5
+ createModule(sys: Sys, name: string, workspace: Workspace): Promise<void>;
6
6
  removeModule(name: string, workspace: Workspace): Promise<void>;
7
7
  scanModule(name: string, workspace: Workspace): Promise<void>;
8
8
  createScalar(sys: Sys, name: string, description: string, schemaDescription: string, workspace: Workspace): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  import { type Sys, Workspace } from "@akanjs/devkit";
2
2
  export declare class ModuleScript {
3
3
  #private;
4
+ createModuleTemplate(sys: Sys, name: string): Promise<void>;
4
5
  createModule(sys: Sys): Promise<void>;
5
6
  removeModule(workspace: Workspace, name: string): Promise<void>;
6
7
  createScalar(sys: Sys, name: string, description: string, schemaDescription: string): Promise<void>;
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
8
8
  filename: string;
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
8
8
  filename: string;
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
8
8
  filename: string;
@@ -1,8 +1,10 @@
1
1
  import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
- [key: string]: string;
3
+ Model: string;
4
+ model: string;
5
+ sysName: string;
4
6
  }
5
- export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict?: Dict): {
7
+ export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
6
8
  filename: string;
7
9
  content: string;
8
10
  };
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): {
8
8
  filename: string;
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};
@@ -3,7 +3,7 @@ interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
5
  models: string;
6
- appName: string;
6
+ sysName: string;
7
7
  }
8
8
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
9
9
  export {};
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};
@@ -2,7 +2,7 @@ import type { AppScanResult, LibScanResult } from "@akanjs/config";
2
2
  interface Dict {
3
3
  Model: string;
4
4
  model: string;
5
- appName: string;
5
+ sysName: string;
6
6
  }
7
7
  export default function getContent(scanResult: AppScanResult | LibScanResult | null, dict: Dict): string;
8
8
  export {};