@akanjs/cli 0.0.61 → 0.0.63

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 (54) hide show
  1. package/index.js +67 -24
  2. package/package.json +1 -1
  3. package/pkgs/@akanjs/cli/src/application/application.command.d.ts +3 -0
  4. package/pkgs/@akanjs/cli/src/application/application.runner.d.ts +2 -0
  5. package/pkgs/@akanjs/cli/src/application/application.script.d.ts +3 -0
  6. package/pkgs/@akanjs/devkit/src/executors.d.ts +1 -0
  7. package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/{page.jsx → page.js} +5 -2
  8. package/src/templates/app/app/[lang]/(__appName__)/(public)/{page.jsx → page.js} +5 -2
  9. package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/{page.jsx → page.js} +5 -2
  10. package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/{page.jsx → page.js} +5 -2
  11. package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/{page.jsx → page.js} +5 -2
  12. package/src/templates/app/app/[lang]/(__appName__)/(user)/{layout.jsx → layout.js} +5 -2
  13. package/src/templates/app/app/[lang]/(__appName__)/(user)/self/{page.jsx → page.js} +5 -2
  14. package/src/templates/app/app/[lang]/(__appName__)/{layout.jsx → layout.js} +5 -2
  15. package/src/templates/app/app/[lang]/admin/{layout.jsx → layout.js} +5 -2
  16. package/src/templates/app/app/[lang]/admin/{page.jsx → page.js} +5 -2
  17. package/src/templates/app/app/{csr.jsx → csr.js} +5 -2
  18. package/src/templates/app/app/{layout.jsx → layout.js} +5 -2
  19. package/src/templates/app/env/env.client.js +4 -2
  20. package/src/templates/app/env/env.client.local.ts.template +7 -0
  21. package/src/templates/app/env/env.server.js +3 -2
  22. package/src/templates/app/env/env.server.local.ts.template +15 -0
  23. package/src/templates/app/lib/setting/{Setting.Template.jsx → Setting.Template.js} +5 -2
  24. package/src/templates/app/lib/setting/{Setting.Unit.jsx → Setting.Unit.js} +5 -2
  25. package/src/templates/app/lib/setting/{Setting.Util.jsx → Setting.Util.js} +5 -2
  26. package/src/templates/app/lib/setting/{Setting.View.jsx → Setting.View.js} +5 -2
  27. package/src/templates/app/lib/setting/{Setting.Zone.jsx → Setting.Zone.js} +5 -2
  28. package/src/templates/app/lib/setting/{index.jsx → index.js} +5 -2
  29. package/src/templates/app/lib/summary/{Summary.Template.jsx → Summary.Template.js} +5 -2
  30. package/src/templates/app/lib/summary/{Summary.Unit.jsx → Summary.Unit.js} +5 -2
  31. package/src/templates/app/lib/summary/{Summary.Util.jsx → Summary.Util.js} +5 -2
  32. package/src/templates/app/lib/summary/{Summary.View.jsx → Summary.View.js} +5 -2
  33. package/src/templates/app/lib/summary/{Summary.Zone.jsx → Summary.Zone.js} +5 -2
  34. package/src/templates/app/lib/summary/{index.jsx → index.js} +5 -2
  35. package/src/templates/app/lib/user/{User.Template.jsx → User.Template.js} +5 -2
  36. package/src/templates/app/lib/user/{User.Unit.jsx → User.Unit.js} +5 -2
  37. package/src/templates/app/lib/user/{User.Util.jsx → User.Util.js} +5 -2
  38. package/src/templates/app/lib/user/{User.View.jsx → User.View.js} +5 -2
  39. package/src/templates/app/lib/user/{User.Zone.jsx → User.Zone.js} +5 -2
  40. package/src/templates/app/lib/user/{index.jsx → index.js} +5 -2
  41. package/src/templates/app/ui/{Footer.jsx → Footer.js} +5 -2
  42. package/src/templates/app/ui/{MainHeader.jsx → MainHeader.js} +5 -2
  43. package/src/templates/crudPages/[__model__Id]/edit/{page.jsx → page.js} +5 -2
  44. package/src/templates/crudPages/[__model__Id]/{page.jsx → page.js} +5 -2
  45. package/src/templates/crudPages/new/{page.jsx → page.js} +5 -2
  46. package/src/templates/crudPages/{page.jsx → page.js} +5 -2
  47. package/src/templates/localDev/docker-compose.yaml.template +36 -0
  48. package/src/templates/module/{__Model__.Template.jsx → __Model__.Template.js} +5 -2
  49. package/src/templates/module/{__Model__.Unit.jsx → __Model__.Unit.js} +5 -2
  50. package/src/templates/module/{__Model__.Util.jsx → __Model__.Util.js} +5 -2
  51. package/src/templates/module/{__Model__.View.jsx → __Model__.View.js} +5 -2
  52. package/src/templates/module/{__Model__.Zone.jsx → __Model__.Zone.js} +5 -2
  53. package/src/templates/module/{index.jsx → index.js} +5 -2
  54. package/src/templates/workspaceRoot/.env.template +1 -1
package/index.js CHANGED
@@ -991,15 +991,22 @@ var Executor = class {
991
991
  });
992
992
  });
993
993
  }
994
+ #getPath(filePath) {
995
+ return import_path3.default.isAbsolute(filePath) ? filePath : `${this.cwdPath}/${filePath}`;
996
+ }
994
997
  mkdir(dirPath) {
995
- const writePath = import_path3.default.isAbsolute(dirPath) ? dirPath : `${this.cwdPath}/${dirPath}`;
998
+ const writePath = this.#getPath(dirPath);
996
999
  if (!import_fs7.default.existsSync(writePath))
997
1000
  import_fs7.default.mkdirSync(writePath, { recursive: true });
998
1001
  this.logger.verbose(`Make directory ${writePath}`);
999
1002
  return this;
1000
1003
  }
1004
+ exists(filePath) {
1005
+ const readPath = this.#getPath(filePath);
1006
+ return import_fs7.default.existsSync(readPath);
1007
+ }
1001
1008
  writeFile(filePath, content) {
1002
- const writePath = import_path3.default.isAbsolute(filePath) ? filePath : `${this.cwdPath}/${filePath}`;
1009
+ const writePath = this.#getPath(filePath);
1003
1010
  const dir = import_path3.default.dirname(writePath);
1004
1011
  if (!import_fs7.default.existsSync(dir))
1005
1012
  import_fs7.default.mkdirSync(dir, { recursive: true });
@@ -1028,16 +1035,16 @@ var Executor = class {
1028
1035
  return { filepath, content };
1029
1036
  }
1030
1037
  readFile(filePath) {
1031
- const readPath = import_path3.default.isAbsolute(filePath) ? filePath : `${this.cwdPath}/${filePath}`;
1038
+ const readPath = this.#getPath(filePath);
1032
1039
  return import_fs7.default.readFileSync(readPath, "utf8");
1033
1040
  }
1034
1041
  readJson(filePath) {
1035
- const readPath = import_path3.default.isAbsolute(filePath) ? filePath : `${this.cwdPath}/${filePath}`;
1042
+ const readPath = this.#getPath(filePath);
1036
1043
  return JSON.parse(import_fs7.default.readFileSync(readPath, "utf8"));
1037
1044
  }
1038
1045
  async cp(srcPath, destPath) {
1039
- const src = import_path3.default.isAbsolute(srcPath) ? srcPath : `${this.cwdPath}/${srcPath}`;
1040
- const dest = import_path3.default.isAbsolute(destPath) ? destPath : `${this.cwdPath}/${destPath}`;
1046
+ const src = this.#getPath(srcPath);
1047
+ const dest = this.#getPath(destPath);
1041
1048
  await import_promises.default.cp(src, dest, { recursive: true });
1042
1049
  }
1043
1050
  log(msg) {
@@ -1067,13 +1074,16 @@ var Executor = class {
1067
1074
  }, dict = {}) {
1068
1075
  if (targetPath.endsWith(".js") || targetPath.endsWith(".jsx")) {
1069
1076
  const getContent = await import(templatePath);
1070
- const content = getContent.default(scanResult ?? null, dict);
1077
+ const result = getContent.default(scanResult ?? null, dict);
1078
+ if (result === null)
1079
+ return;
1080
+ const filename = typeof result === "object" ? result.filename : import_path3.default.basename(targetPath).replace(".js", ".ts");
1081
+ const content = typeof result === "object" ? result.content : result;
1082
+ const dirname = import_path3.default.dirname(targetPath);
1071
1083
  const convertedTargetPath = Object.entries(dict).reduce(
1072
1084
  (path7, [key, value]) => path7.replace(new RegExp(`__${key}__`, "g"), value),
1073
- targetPath.replace(".js", ".ts")
1085
+ `${dirname}/${filename}`
1074
1086
  );
1075
- if (content === null)
1076
- return;
1077
1087
  this.logger.verbose(`Apply template ${templatePath} to ${convertedTargetPath}`);
1078
1088
  this.writeFile(convertedTargetPath, content);
1079
1089
  } else if (targetPath.endsWith(".template")) {
@@ -1101,8 +1111,6 @@ var Executor = class {
1101
1111
  const filename = import_path3.default.basename(templatePath);
1102
1112
  await this.#applyTemplateFile({ templatePath, targetPath: import_path3.default.join(basePath2, filename), scanResult }, dict);
1103
1113
  } else {
1104
- if (!import_fs7.default.existsSync(basePath2))
1105
- await import_promises.default.mkdir(basePath2, { recursive: true });
1106
1114
  const subdirs = await import_promises.default.readdir(templatePath);
1107
1115
  await Promise.all(
1108
1116
  subdirs.map(async (subdir) => {
@@ -3329,6 +3337,8 @@ var ApplicationRunner = class {
3329
3337
  await capacitorApp.releaseAndroid();
3330
3338
  }
3331
3339
  async #prepareMongo(app, environment) {
3340
+ if (environment === "local")
3341
+ return `mongodb://localhost:27017/${app.name}-${environment}`;
3332
3342
  const secret = getCredentials(app, environment);
3333
3343
  const mongoAccount = secret.mongo.account.user;
3334
3344
  const localUrl = await createTunnel({ appName: app.name, environment });
@@ -3351,6 +3361,13 @@ var ApplicationRunner = class {
3351
3361
  `./dump/${app.name}-${source}`
3352
3362
  ]);
3353
3363
  }
3364
+ async up(workspace) {
3365
+ await workspace.applyTemplate({ basePath: "local", template: "localDev", dict: { repoName: workspace.repoName } });
3366
+ await workspace.spawn(`docker`, ["compose", "up", "-d"], { cwd: `${workspace.workspaceRoot}/local` });
3367
+ }
3368
+ async down(workspace) {
3369
+ await workspace.spawn(`docker`, ["compose", "down"], { cwd: `${workspace.workspaceRoot}/local` });
3370
+ }
3354
3371
  async configureApp(app) {
3355
3372
  const capacitorApp = new CapacitorApp(app);
3356
3373
  await capacitorApp.init();
@@ -3613,12 +3630,26 @@ var ApplicationScript = class {
3613
3630
  async restoreDatabase(app, source, target) {
3614
3631
  await this.#runner.restoreDatabase(app, source, target);
3615
3632
  }
3633
+ async pullDatabase(app, environment, dump) {
3634
+ await this.down(app.workspace);
3635
+ const hasDump = app.workspace.exists(`dump/${app.name}-${environment}`);
3636
+ if (dump || !hasDump)
3637
+ await this.dumpDatabase(app, environment);
3638
+ await this.up(app.workspace);
3639
+ await this.restoreDatabase(app, environment, "local");
3640
+ }
3616
3641
  async configureApp(app) {
3617
3642
  await this.#runner.configureApp(app);
3618
3643
  }
3619
3644
  async releaseSource(app, options) {
3620
3645
  await this.#runner.releaseSource(app, options);
3621
3646
  }
3647
+ async up(workspace) {
3648
+ await this.#runner.up(workspace);
3649
+ }
3650
+ async down(workspace) {
3651
+ await this.#runner.down(workspace);
3652
+ }
3622
3653
  };
3623
3654
 
3624
3655
  // pkgs/@akanjs/cli/src/application/application.command.ts
@@ -3683,6 +3714,15 @@ var ApplicationCommand = class {
3683
3714
  async restoreDatabase(app, source, target) {
3684
3715
  await this.applicationScript.restoreDatabase(app, source, target);
3685
3716
  }
3717
+ async up(workspace) {
3718
+ await this.applicationScript.up(workspace);
3719
+ }
3720
+ async down(workspace) {
3721
+ await this.applicationScript.down(workspace);
3722
+ }
3723
+ async pullDatabase(app, env, dump) {
3724
+ await this.applicationScript.pullDatabase(app, env, dump);
3725
+ }
3686
3726
  async configureApp(app) {
3687
3727
  await this.applicationScript.configureApp(app);
3688
3728
  }
@@ -3793,6 +3833,20 @@ __decorateClass([
3793
3833
  ask: "Select the target environment to restore the database"
3794
3834
  }))
3795
3835
  ], ApplicationCommand.prototype, "restoreDatabase", 1);
3836
+ __decorateClass([
3837
+ Target.Public(),
3838
+ __decorateParam(0, Workspace())
3839
+ ], ApplicationCommand.prototype, "up", 1);
3840
+ __decorateClass([
3841
+ Target.Public(),
3842
+ __decorateParam(0, Workspace())
3843
+ ], ApplicationCommand.prototype, "down", 1);
3844
+ __decorateClass([
3845
+ Target.Public(),
3846
+ __decorateParam(0, App()),
3847
+ __decorateParam(1, Option("env", { default: "debug" })),
3848
+ __decorateParam(2, Option("dump", { default: true }))
3849
+ ], ApplicationCommand.prototype, "pullDatabase", 1);
3796
3850
  __decorateClass([
3797
3851
  Target.Public(),
3798
3852
  __decorateParam(0, App())
@@ -3848,7 +3902,7 @@ var PackageRunner = class {
3848
3902
  });
3849
3903
  await esbuild2.build({
3850
3904
  write: true,
3851
- entryPoints: [`${pkg.cwdPath}/src/templates/**/*.ts`],
3905
+ entryPoints: [`${pkg.cwdPath}/src/templates/**/*.ts`, `${pkg.cwdPath}/src/templates/**/*.tsx`],
3852
3906
  packages: "external",
3853
3907
  outdir: `${distPkg.cwdPath}/src/templates`,
3854
3908
  outbase: `${pkg.cwdPath}/src/templates`,
@@ -3856,17 +3910,6 @@ var PackageRunner = class {
3856
3910
  platform: "node",
3857
3911
  footer: { js: "module.exports = module.exports.default;" }
3858
3912
  });
3859
- await esbuild2.build({
3860
- write: true,
3861
- entryPoints: [`${pkg.cwdPath}/src/templates/**/*.tsx`],
3862
- packages: "external",
3863
- outdir: `${distPkg.cwdPath}/src/templates`,
3864
- outbase: `${pkg.cwdPath}/src/templates`,
3865
- format: "cjs",
3866
- platform: "node",
3867
- footer: { js: "module.exports = module.exports.default;" },
3868
- outExtension: { ".js": ".jsx" }
3869
- });
3870
3913
  await pkg.workspace.exec(
3871
3914
  `rsync -aq --exclude="*.ts" --exclude="*.tsx" ${pkg.cwdPath}/src/templates/ ${distPkg.cwdPath}/src/templates/`
3872
3915
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.61",
4
+ "version": "0.0.63",
5
5
  "bin": {
6
6
  "akan": "index.js"
7
7
  },
@@ -22,5 +22,8 @@ export declare class ApplicationCommand {
22
22
  releaseSource(app: App, rebuild: boolean, buildNum: number, environment: string, local: boolean): Promise<void>;
23
23
  dumpDatabase(app: App, environment: string): Promise<void>;
24
24
  restoreDatabase(app: App, source: string, target: string): Promise<void>;
25
+ up(workspace: Workspace): Promise<void>;
26
+ down(workspace: Workspace): Promise<void>;
27
+ pullDatabase(app: App, env: string, dump: boolean): Promise<void>;
25
28
  configureApp(app: App): Promise<void>;
26
29
  }
@@ -29,6 +29,8 @@ export declare class ApplicationRunner {
29
29
  releaseAndroid(app: App): Promise<void>;
30
30
  dumpDatabase(app: App, environment: string): Promise<void>;
31
31
  restoreDatabase(app: App, source: string, target: string): Promise<void>;
32
+ up(workspace: Workspace): Promise<void>;
33
+ down(workspace: Workspace): Promise<void>;
32
34
  configureApp(app: App): Promise<void>;
33
35
  releaseSource(app: App, { rebuild, buildNum, environment, local }?: ReleaseSourceOptions): Promise<void>;
34
36
  createApplicationTemplate(workspace: Workspace, appName: string): Promise<void>;
@@ -32,6 +32,9 @@ export declare class ApplicationScript {
32
32
  releaseAndroid(app: App): Promise<void>;
33
33
  dumpDatabase(app: App, environment: string): Promise<void>;
34
34
  restoreDatabase(app: App, source: string, target: string): Promise<void>;
35
+ pullDatabase(app: App, environment: string, dump?: boolean): Promise<void>;
35
36
  configureApp(app: App): Promise<void>;
36
37
  releaseSource(app: App, options: ReleaseSourceOptions): Promise<void>;
38
+ up(workspace: Workspace): Promise<void>;
39
+ down(workspace: Workspace): Promise<void>;
37
40
  }
@@ -14,6 +14,7 @@ export declare class Executor {
14
14
  }>;
15
15
  fork(modulePath: string, args?: string[], options?: ForkOptions): Promise<unknown>;
16
16
  mkdir(dirPath: string): this;
17
+ exists(filePath: string): boolean;
17
18
  writeFile(filePath: string, content: string | object): this;
18
19
  writeJson(filePath: string, content: object): this;
19
20
  getLocalFile(filePath: string): {
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { Image, Link } from "@util/ui";
26
28
  import { User } from "@shared/client";
27
29
 
@@ -38,6 +40,7 @@ export default function Page() {
38
40
  </div>
39
41
  );
40
42
  }
41
- `;
43
+ `
44
+ };
42
45
  }
43
46
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { Image, Link } from "@util/ui";
26
28
  import { getSelf } from "@akanjs/client";
27
29
 
@@ -39,6 +41,7 @@ export default function Page() {
39
41
  </div>
40
42
  );
41
43
  }
42
- `;
44
+ `
45
+ };
43
46
  }
44
47
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { Inform } from "@util/ui";
26
28
 
27
29
  export default function Page() {
@@ -33,6 +35,7 @@ export default function Page() {
33
35
  );
34
36
  }
35
37
 
36
- `;
38
+ `
39
+ };
37
40
  }
38
41
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { Image } from "@util/ui";
26
28
  import { User } from "@shared/client";
27
29
  import { getSelf, router } from "@akanjs/client";
@@ -41,6 +43,7 @@ export default function Page() {
41
43
  </div>
42
44
  );
43
45
  }
44
- `;
46
+ `
47
+ };
45
48
  }
46
49
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { Inform } from "@util/ui";
26
28
 
27
29
  export default function Page() {
@@ -32,6 +34,7 @@ export default function Page() {
32
34
  </div>
33
35
  );
34
36
  }
35
- `;
37
+ `
38
+ };
36
39
  }
37
40
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(layout_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(layout_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "layout.tsx",
26
+ content: `
25
27
  import { Footer } from "@${dict.appName}/ui";
26
28
  import { getSelf } from "@akanjs/client";
27
29
 
@@ -34,6 +36,7 @@ export default function Layout({ children }: any) {
34
36
  </>
35
37
  );
36
38
  }
37
- `;
39
+ `
40
+ };
38
41
  }
39
42
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { User as SharedUser } from "@shared/client";
26
28
  import { MainHeader } from "@${dict.appName}/ui";
27
29
  import { User } from "@${dict.appName}/client";
@@ -51,6 +53,7 @@ export default function Page() {
51
53
  </>
52
54
  );
53
55
  }
54
- `;
56
+ `
57
+ };
55
58
  }
56
59
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(layout_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(layout_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "layout.tsx",
26
+ content: `
25
27
  import { System } from "@shared/ui";
26
28
  import { env } from "@${dict.appName}/env/env.client";
27
29
  import { fetch } from "@${dict.appName}/client";
@@ -43,6 +45,7 @@ export default function Layout({ children, params }: RootLayoutProps) {
43
45
  </System.Provider>
44
46
  );
45
47
  }
46
- `;
48
+ `
49
+ };
47
50
  }
48
51
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(layout_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(layout_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "layout.tsx",
26
+ content: `
25
27
  import { System } from "@shared/ui";
26
28
  import { env } from "@${dict.appName}/env/env.client";
27
29
  import { fetch } from "@${dict.appName}/client";
@@ -44,6 +46,7 @@ export default function Layout({ children, params }: RootLayoutProps) {
44
46
  </System.Provider>
45
47
  );
46
48
  }
47
- `;
49
+ `
50
+ };
48
51
  }
49
52
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { Admin } from "@shared/client";
27
29
  import { User, st } from "@${dict.appName}/client";
@@ -54,6 +56,7 @@ export default function Page() {
54
56
  />
55
57
  );
56
58
  }
57
- `;
59
+ `
60
+ };
58
61
  }
59
62
  module.exports = module.exports.default;
@@ -21,10 +21,13 @@ __export(csr_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(csr_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "csr.tsx",
26
+ content: `
25
27
  import { bootCsr } from "@akanjs/next";
26
28
 
27
29
  void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx");
28
- `;
30
+ `
31
+ };
29
32
  }
30
33
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(layout_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(layout_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "layout.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { st } from "@${dict.appName}/client";
27
29
  import { System } from "@shared/ui";
@@ -29,6 +31,7 @@ import { System } from "@shared/ui";
29
31
  export default function Layout({ children }) {
30
32
  return <System.Root st={st}>{children}</System.Root>;
31
33
  }
32
- `;
34
+ `
35
+ };
33
36
  }
34
37
  module.exports = module.exports.default;
@@ -24,14 +24,16 @@ function getContent(scanResult, dict = {}) {
24
24
  return `
25
25
  import { env as debug } from "./env.client.debug";
26
26
  import { env as develop } from "./env.client.develop";
27
+ import { env as local } from "./env.client.local";
27
28
  import { env as main } from "./env.client.main";
28
29
  import { env as testing } from "./env.client.testing";
29
30
 
30
- const envConfigs = { debug, testing, develop, main };
31
- const currentEnv = process.env.NEXT_PUBLIC_ENV ?? "testing";
31
+ const envConfigs = { debug, testing, develop, main, local };
32
+ const currentEnv = process.env.NEXT_PUBLIC_ENV ?? "local";
32
33
  if (!(currentEnv in envConfigs)) throw new Error(\`Unknown environment: \${currentEnv}\`);
33
34
 
34
35
  export const env = envConfigs[currentEnv as keyof typeof envConfigs];
36
+
35
37
  `;
36
38
  }
37
39
  module.exports = module.exports.default;
@@ -0,0 +1,7 @@
1
+ import { baseClientEnv } from "@akanjs/base";
2
+
3
+ import { AppClientEnv } from "./env.client.type";
4
+
5
+ export const env: AppClientEnv = {
6
+ ...baseClientEnv,
7
+ } as const;
@@ -24,11 +24,12 @@ function getContent(scanResult, dict = {}) {
24
24
  return `
25
25
  import { env as debug } from "./env.server.debug";
26
26
  import { env as develop } from "./env.server.develop";
27
+ import { env as local } from "./env.server.local";
27
28
  import { env as main } from "./env.server.main";
28
29
  import { env as testing } from "./env.server.testing";
29
30
 
30
- const envConfigs = { debug, testing, develop, main };
31
- const currentEnv = process.env.NEXT_PUBLIC_ENV ?? "testing";
31
+ const envConfigs = { debug, testing, develop, main, local };
32
+ const currentEnv = process.env.NEXT_PUBLIC_ENV ?? "local";
32
33
  if (!(currentEnv in envConfigs)) throw new Error(\`Unknown environment: \${currentEnv}\`);
33
34
 
34
35
  export const env = envConfigs[currentEnv as keyof typeof envConfigs];
@@ -0,0 +1,15 @@
1
+ import { baseEnv } from "@akanjs/base";
2
+
3
+ import type { ModulesOptions } from "../lib/option";
4
+
5
+ export const env: ModulesOptions = {
6
+ ...baseEnv,
7
+ hostname: null,
8
+ redis: {},
9
+ mongo: {},
10
+ security: {
11
+ verifies: [["password", "phone", "naver", "kakao"]],
12
+ sso: {},
13
+ },
14
+ rootAdminInfo: { accountId: "akamirofficial@gmail.com", password: "akamir190319" },
15
+ };
@@ -21,7 +21,9 @@ __export(Setting_Template_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Setting_Template_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Setting.Template.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { st, usePage } from "@${dict.appName}/client";
27
29
 
@@ -48,6 +50,7 @@ export const General = ({ settingId = undefined }: GeneralProps) => {
48
50
  </div>
49
51
  );
50
52
  };
51
- `;
53
+ `
54
+ };
52
55
  }
53
56
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Setting_Unit_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Setting_Unit_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "Setting.Unit.tsx",
26
+ content: `
25
27
  import { ModelProps } from "@akanjs/client";
26
28
 
27
29
  import { cnst } from "../cnst";
@@ -29,6 +31,7 @@ import { cnst } from "../cnst";
29
31
  export const Card = ({ className, setting }: ModelProps<"setting", cnst.LightSetting>) => {
30
32
  return <div>{setting.id}</div>;
31
33
  };
32
- `;
34
+ `
35
+ };
33
36
  }
34
37
  module.exports = module.exports.default;
@@ -21,10 +21,13 @@ __export(Setting_Util_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Setting_Util_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "Setting.Util.tsx",
26
+ content: `
25
27
  "use client";
26
28
 
27
29
  export const aaa = 1;
28
- `;
30
+ `
31
+ };
29
32
  }
30
33
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Setting_View_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Setting_View_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Setting.View.tsx",
26
+ content: `
25
27
  import { clsx } from "@akanjs/client";
26
28
  import { usePage } from "@${dict.appName}/client";
27
29
 
@@ -42,6 +44,7 @@ export const General = ({ className, setting }: SettingViewProps) => {
42
44
  </div>
43
45
  );
44
46
  };
45
- `;
47
+ `
48
+ };
46
49
  }
47
50
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Setting_Zone_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Setting_Zone_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Setting.Zone.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { ModelsProps } from "@akanjs/client";
27
29
  import { Setting, st, usePage } from "@${dict.appName}/client";
@@ -71,6 +73,7 @@ export const Admin = ({ sliceName = "setting" }: ModelsProps<cnst.Setting>) => {
71
73
  </div>
72
74
  );
73
75
  };
74
- `;
76
+ `
77
+ };
75
78
  }
76
79
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(setting_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(setting_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "index.tsx",
26
+ content: `
25
27
  import { Signal } from "@util/ui";
26
28
  import { AiOutlineSetting } from "react-icons/ai";
27
29
 
@@ -52,6 +54,7 @@ export const Setting = {
52
54
  View,
53
55
  Zone,
54
56
  };
55
- `;
57
+ `
58
+ };
56
59
  }
57
60
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Summary_Template_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Summary_Template_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Summary.Template.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { st, usePage } from "@${dict.appName}/client";
27
29
 
@@ -34,6 +36,7 @@ export const General = ({ summaryId = undefined }: SummaryEditProps) => {
34
36
  const { l } = usePage();
35
37
  return <div className="flex items-center mb-4"></div>;
36
38
  };
37
- `;
39
+ `
40
+ };
38
41
  }
39
42
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Summary_Unit_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Summary_Unit_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "Summary.Unit.tsx",
26
+ content: `
25
27
  import { ModelProps } from "@akanjs/client";
26
28
 
27
29
  import { cnst } from "../cnst";
@@ -29,6 +31,7 @@ import { cnst } from "../cnst";
29
31
  export const Card = ({ className, summary }: ModelProps<"summary", cnst.LightSummary>) => {
30
32
  return <div>{summary.id}</div>;
31
33
  };
32
- `;
34
+ `
35
+ };
33
36
  }
34
37
  module.exports = module.exports.default;
@@ -21,9 +21,12 @@ __export(Summary_Util_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Summary_Util_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "Summary.Util.tsx",
26
+ content: `
25
27
  "use client";
26
28
  export const noData = 1;
27
- `;
29
+ `
30
+ };
28
31
  }
29
32
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Summary_View_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Summary_View_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Summary.View.tsx",
26
+ content: `
25
27
  import { User, usePage } from "@${dict.appName}/client";
26
28
  import { clsx } from "@akanjs/client";
27
29
 
@@ -42,6 +44,7 @@ export const General = ({ className, summary }: SummaryViewProps) => {
42
44
  </div>
43
45
  );
44
46
  };
45
- `;
47
+ `
48
+ };
46
49
  }
47
50
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Summary_Zone_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Summary_Zone_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Summary.Zone.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { ModelsProps } from "@akanjs/client";
27
29
  import { DefaultOf } from "@akanjs/signal";
@@ -53,6 +55,7 @@ export const Dashboard = () => {
53
55
  if (!summary) return <Loading.Skeleton active />;
54
56
  return <Summary.View.General summary={summary} />;
55
57
  };
56
- `;
58
+ `
59
+ };
57
60
  }
58
61
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(summary_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(summary_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "index.tsx",
26
+ content: `
25
27
  import { Signal } from "@util/ui";
26
28
  import { AiOutlineLineChart } from "react-icons/ai";
27
29
 
@@ -58,6 +60,7 @@ export const Summary = {
58
60
  View,
59
61
  Zone,
60
62
  };
61
- `;
63
+ `
64
+ };
62
65
  }
63
66
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(User_Template_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(User_Template_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "User.Template.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { clsx } from "@akanjs/client";
27
29
  import { Field } from "@shared/ui";
@@ -56,6 +58,7 @@ export const General = ({ className, userId = undefined }: UserEditProps) => {
56
58
  </Layout.Template>
57
59
  );
58
60
  };
59
- `;
61
+ `
62
+ };
60
63
  }
61
64
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(User_Unit_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(User_Unit_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "User.Unit.tsx",
26
+ content: `
25
27
  import { ModelProps } from "@akanjs/client";
26
28
 
27
29
  import { cnst } from "../cnst";
@@ -29,6 +31,7 @@ import { cnst } from "../cnst";
29
31
  export const Card = ({ className, user }: ModelProps<"user", cnst.LightUser>) => {
30
32
  return <div>{user.id}</div>;
31
33
  };
32
- `;
34
+ `
35
+ };
33
36
  }
34
37
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(User_Util_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(User_Util_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "User.Util.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { ModelDashboardProps, ModelInsightProps } from "@akanjs/client";
27
29
  import { getQueryMap } from "@akanjs/constant";
@@ -85,6 +87,7 @@ export const EditSelf = () => {
85
87
  </button>
86
88
  ) : null;
87
89
  };
88
- `;
90
+ `
91
+ };
89
92
  }
90
93
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(User_View_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(User_View_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "User.View.tsx",
26
+ content: `
25
27
  import { clsx } from "@akanjs/client";
26
28
  import { usePage } from "@${dict.appName}/client";
27
29
  import { Avatar } from "@util/ui";
@@ -57,6 +59,7 @@ export const General = ({ className, user }: UserViewProps) => {
57
59
  </div>
58
60
  );
59
61
  };
60
- `;
62
+ `
63
+ };
61
64
  }
62
65
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(User_Zone_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(User_Zone_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "User.Zone.tsx",
26
+ content: `
25
27
  "use client";
26
28
  import { ModelsProps } from "@akanjs/client";
27
29
  import { DefaultOf } from "@akanjs/signal";
@@ -65,6 +67,7 @@ export const Self = () => {
65
67
  <User.View.General user={self} />
66
68
  );
67
69
  };
68
- `;
70
+ `
71
+ };
69
72
  }
70
73
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(user_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(user_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: "index.tsx",
26
+ content: `
25
27
  import { Signal } from "@util/ui";
26
28
  import { AiOutlineUser } from "react-icons/ai";
27
29
 
@@ -52,6 +54,7 @@ export const User = {
52
54
  View,
53
55
  Zone,
54
56
  };
55
- `;
57
+ `
58
+ };
56
59
  }
57
60
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Footer_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Footer_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "Footer.tsx",
26
+ content: `
25
27
  import { Image, Link } from "@util/ui";
26
28
 
27
29
  export const Footer = () => {
@@ -58,6 +60,7 @@ export const Footer = () => {
58
60
  </div>
59
61
  );
60
62
  };
61
- `;
63
+ `
64
+ };
62
65
  }
63
66
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(MainHeader_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(MainHeader_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "MainHeader.tsx",
26
+ content: `
25
27
  import { usePage } from "@${dict.appName}/client";
26
28
  import {
27
29
  AiOutlineBuild,
@@ -122,6 +124,7 @@ export const MainHeader = ({ className, children, items, type = "view" }: MainHe
122
124
  </Layout.Header>
123
125
  );
124
126
  };
125
- `;
127
+ `
128
+ };
126
129
  }
127
130
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { AiOutlineTeam } from "react-icons/ai";
26
28
  import { Load } from "@shared/ui";
27
29
  import { fetch, usePage, ${dict.Model} } from "${dict.appName}/client";
@@ -64,6 +66,7 @@ export default function Page({ params }: PageProps) {
64
66
  );
65
67
  }
66
68
  Page.csrConfig = { transition: "none" } satisfies CsrConfig;
67
- `;
69
+ `
70
+ };
68
71
  }
69
72
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { ${dict.Model}, fetch, usePage } from "${dict.appName}/client";
26
28
  import { Link } from "@util/ui";
27
29
  import { Load } from "@shared/ui";
@@ -74,6 +76,7 @@ export default function Page({ params }: PageProps) {
74
76
  );
75
77
  }
76
78
  Page.csrConfig = { transition: "none" } satisfies CsrConfig;
77
- `;
79
+ `
80
+ };
78
81
  }
79
82
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { AiOutlineTeam } from "react-icons/ai";
26
28
  import { Load } from "@shared/ui";
27
29
  import { cnst, fetch, usePage, ${dict.Model} } from "${dict.appName}/client";
@@ -61,6 +63,7 @@ export default function Page() {
61
63
  );
62
64
  }
63
65
  Page.csrConfig = { transition: "none" } satisfies CsrConfig;
64
- `;
66
+ `
67
+ };
65
68
  }
66
69
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(page_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(page_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "page.tsx",
26
+ content: `
25
27
  import { ${dict.Model}, fetch, usePage } from "${dict.appName}/client";
26
28
  import { Link } from "@util/ui";
27
29
  import { Load } from "@shared/ui";
@@ -62,6 +64,7 @@ export default function Page() {
62
64
  );
63
65
  }
64
66
  Page.csrConfig = { transition: "none" } satisfies CsrConfig;
65
- `;
67
+ `
68
+ };
66
69
  }
67
70
  module.exports = module.exports.default;
@@ -0,0 +1,36 @@
1
+ version: "3.8"
2
+ networks:
3
+ <%= repoName %>-network:
4
+ driver: bridge
5
+ services:
6
+ redis:
7
+ container_name: redis
8
+ image: redis
9
+ restart: unless-stopped
10
+ ports:
11
+ - 6379:6379
12
+ networks:
13
+ - <%= repoName %>-network
14
+ mongo:
15
+ image: mongo
16
+ container_name: mongo
17
+ restart: unless-stopped
18
+ ports:
19
+ - 27017:27017
20
+ volumes:
21
+ - ./mongo/local/data:/data/db
22
+ command: mongod --dbpath /data/db
23
+ networks:
24
+ - <%= repoName %>-network
25
+ meili:
26
+ image: getmeili/meilisearch:latest
27
+ container_name: meili
28
+ restart: unless-stopped
29
+ ports:
30
+ - "7700:7700"
31
+ environment:
32
+ - MEILI_ENV=development
33
+ - MEILI_MASTER_KEY=masterKey
34
+ - MEILI_NO_ANALYTICS=true
35
+ networks:
36
+ - <%= repoName %>-network
@@ -21,7 +21,9 @@ __export(Model_Template_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Model_Template_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: `${dict.Model}.Template.tsx`,
26
+ content: `
25
27
  "use client";
26
28
  import { cnst, st, usePage } from "@${dict.appName}/client";
27
29
  import { Field } from "@shared/ui";
@@ -45,6 +47,7 @@ export const General = ({ ${dict.model}Id = undefined }: ${dict.Model}EditProps)
45
47
  </Layout.Template>
46
48
  );
47
49
  };
48
- `;
50
+ `
51
+ };
49
52
  }
50
53
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Model_Unit_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Model_Unit_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: `${dict.Model}.Unit.tsx`,
26
+ content: `
25
27
  import { ModelProps } from "@akanjs/client";
26
28
  import { cnst, ${dict.Model} } from "@${dict.appName}/client";
27
29
  import { Link } from "@util/ui";
@@ -33,6 +35,7 @@ export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.L
33
35
  </Link>
34
36
  );
35
37
  };
36
- `;
38
+ `
39
+ };
37
40
  }
38
41
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Model_Util_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Model_Util_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: `${dict.Model}.Util.tsx`,
26
+ content: `
25
27
  "use client";
26
28
  import { ModelDashboardProps, ModelInsightProps } from "@akanjs/client";
27
29
  import { getQueryMap } from "@akanjs/constant";
@@ -61,6 +63,7 @@ export const Insight = ({
61
63
  />
62
64
  );
63
65
  };
64
- `;
66
+ `
67
+ };
65
68
  }
66
69
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Model_View_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Model_View_exports);
23
23
  function getContent(scanResult, dict = {}) {
24
- return `
24
+ return {
25
+ filename: `${dict.Model}.View.tsx`,
26
+ content: `
25
27
  import { clsx } from "@akanjs/client";
26
28
  import { cnst } from "@${dict.appName}/client";
27
29
  import { Image } from "@util/ui";
@@ -39,6 +41,7 @@ export const General = ({ className, ${dict.model}, self }: ${dict.Model}ViewPro
39
41
  </div>
40
42
  );
41
43
  };
42
- `;
44
+ `
45
+ };
43
46
  }
44
47
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(Model_Zone_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(Model_Zone_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: `${dict.Model}.Zone.tsx`,
26
+ content: `
25
27
  "use client";
26
28
  import { Data, Load } from "@shared/ui";
27
29
  import { ModelsProps } from "@akanjs/client";
@@ -74,6 +76,7 @@ interface ViewProps {
74
76
  export const View = ({ view }: ViewProps) => {
75
77
  return <Load.View view={view} renderView={(${dict.model}) => <${dict.Model}.View.General ${dict.model}={${dict.model}} />} />;
76
78
  };
77
- `;
79
+ `
80
+ };
78
81
  }
79
82
  module.exports = module.exports.default;
@@ -21,7 +21,9 @@ __export(module_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(module_exports);
23
23
  function getContent(scanResult, dict) {
24
- return `
24
+ return {
25
+ filename: "index.tsx",
26
+ content: `
25
27
  import { Signal } from "@util/ui";
26
28
  import { AiOutlineDatabase } from "react-icons/ai";
27
29
 
@@ -52,6 +54,7 @@ export const ${dict.Model} = {
52
54
  View,
53
55
  Zone,
54
56
  };
55
- `;
57
+ `
58
+ };
56
59
  }
57
60
  module.exports = module.exports.default;
@@ -3,7 +3,7 @@ NEXT_PUBLIC_REPO_NAME=<%= repoName %>
3
3
  NEXT_PUBLIC_SERVE_DOMAIN="<%= serveDomain %>"
4
4
 
5
5
  # development branch, debug, develop, main, etc. mainly it changes databases.
6
- NEXT_PUBLIC_ENV=debug
6
+ NEXT_PUBLIC_ENV=local
7
7
 
8
8
  # local, cloud, edge it changes the connection point of the clients.
9
9
  NEXT_PUBLIC_OPERATION_MODE=local