@akanjs/cli 0.9.60-canary.0 → 0.9.60-canary.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/cjs/index.js +126 -110
  2. package/cjs/src/guidelines/scalarConstant/scalarConstant.generate.json +24 -20
  3. package/cjs/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
  4. package/cjs/src/guidelines/scalarDictionary/scalarDictionary.generate.json +32 -32
  5. package/cjs/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
  6. package/cjs/src/templates/__scalar/__model__/__model__.dictionary.js +6 -13
  7. package/cjs/src/templates/app/akan.config.js +2 -4
  8. package/cjs/src/templates/env/{env.server.type.js → _env.server.type.js} +6 -3
  9. package/cjs/src/templates/lib/__lib/lib.constant.js +1 -1
  10. package/cjs/src/templates/lib/__lib/lib.dictionary.js +1 -1
  11. package/cjs/src/templates/libRoot/akan.config.js +1 -3
  12. package/cjs/src/templates/module/__Model__.Unit.js +1 -1
  13. package/cjs/src/templates/module/__Model__.View.js +2 -3
  14. package/cjs/src/templates/module/__model__.constant.js +0 -1
  15. package/cjs/src/templates/module/__model__.dictionary.js +0 -1
  16. package/cjs/src/templates/workspaceRoot/package.json.template +5 -5
  17. package/esm/index.js +126 -110
  18. package/esm/src/guidelines/scalarConstant/scalarConstant.generate.json +24 -20
  19. package/esm/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
  20. package/esm/src/guidelines/scalarDictionary/scalarDictionary.generate.json +32 -32
  21. package/esm/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
  22. package/esm/src/templates/__scalar/__model__/__model__.dictionary.js +6 -13
  23. package/esm/src/templates/app/akan.config.js +2 -4
  24. package/esm/src/templates/env/{env.server.type.js → _env.server.type.js} +6 -3
  25. package/esm/src/templates/lib/__lib/lib.constant.js +1 -1
  26. package/esm/src/templates/lib/__lib/lib.dictionary.js +1 -1
  27. package/esm/src/templates/libRoot/akan.config.js +1 -3
  28. package/esm/src/templates/module/__Model__.Unit.js +1 -1
  29. package/esm/src/templates/module/__Model__.View.js +2 -3
  30. package/esm/src/templates/module/__model__.constant.js +0 -1
  31. package/esm/src/templates/module/__model__.dictionary.js +0 -1
  32. package/esm/src/templates/workspaceRoot/package.json.template +5 -5
  33. package/package.json +5 -4
  34. package/src/guidelines/scalarConstant/scalarConstant.instruction.md +284 -326
  35. package/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +175 -249
  36. package/src/library/library.command.d.ts +0 -2
  37. package/src/library/library.runner.d.ts +0 -2
  38. package/src/library/library.script.d.ts +0 -2
  39. package/src/module/module.runner.d.ts +0 -4
  40. package/src/scalar/scalar.command.d.ts +2 -2
  41. package/src/scalar/scalar.runner.d.ts +1 -0
  42. package/src/scalar/scalar.script.d.ts +1 -0
  43. package/src/templates/app/akan.config.d.ts +1 -3
  44. package/src/templates/env/{env.server.type.d.ts → _env.server.type.d.ts} +4 -1
  45. package/src/workspace/workspace.command.d.ts +1 -1
  46. package/src/workspace/workspace.runner.d.ts +4 -1
  47. package/src/workspace/workspace.script.d.ts +5 -1
  48. package/cjs/src/guidelines/fieldDecorator/fieldDecorator.generate.json +0 -135
  49. package/cjs/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
  50. package/cjs/src/templates/module/__model__.signal.spec.js +0 -27
  51. package/cjs/src/templates/module/__model__.signal.test.js +0 -27
  52. package/esm/src/guidelines/fieldDecorator/fieldDecorator.generate.json +0 -135
  53. package/esm/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
  54. package/esm/src/templates/module/__model__.signal.spec.js +0 -7
  55. package/esm/src/templates/module/__model__.signal.test.js +0 -7
  56. package/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +0 -606
  57. package/src/templates/module/__model__.signal.spec.d.ts +0 -8
  58. package/src/templates/module/__model__.signal.test.d.ts +0 -8
@@ -24,21 +24,14 @@ __export(model_dictionary_exports, {
24
24
  module.exports = __toCommonJS(model_dictionary_exports);
25
25
  function getContent(scanInfo, dict) {
26
26
  return `
27
- import { ModelDictionary } from "@akanjs/dictionary";
27
+ import { scalarDictionary } from "@akanjs/dictionary";
28
28
 
29
29
  import type { ${dict.Model} } from "./${dict.model}.constant";
30
30
 
31
- export const dictionary = {
32
- modelName: ["${dict.Model}", "${dict.Model}"],
33
- modelDesc: ["${dict.Model}", "${dict.Model}"],
34
-
35
- // * ==================== Model ==================== * //
36
- field: ["Field", "\uD544\uB4DC"],
37
- "desc-field": ["Field", "\uD544\uB4DC"],
38
- // * ==================== Model ==================== * //
39
-
40
- // * ==================== Etc ==================== * //
41
- // * ==================== Etc ==================== * //
42
- } satisfies ModelDictionary<${dict.Model}>;
31
+ export const dictionary = scalarDictionary(["en", "ko"])
32
+ .of((t) => t(["${dict.Model}", "${dict.Model}"]).desc(["${dict.Model} description", "${dict.Model} \uC124\uBA85"]))
33
+ .model<${dict.Model}>((t) => ({
34
+ field: t(["Field", "\uD544\uB4DC"]).desc(["Field Description", "\uD544\uB4DC \uC124\uBA85"]),
35
+ }));
43
36
  `;
44
37
  }
@@ -22,13 +22,11 @@ __export(akan_config_exports, {
22
22
  default: () => getContent
23
23
  });
24
24
  module.exports = __toCommonJS(akan_config_exports);
25
- function getContent(scanInfo, dict, options) {
25
+ function getContent(scanInfo, dict) {
26
26
  return `
27
27
  import type { AppConfig } from "@akanjs/config";
28
28
 
29
- const config: AppConfig = ${options.libs.length ? `{
30
- libs: ["util", "shared"],
31
- }` : "{}"};
29
+ const config: AppConfig = {};
32
30
 
33
31
  export default config;
34
32
  `;
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // pkgs/@akanjs/cli/src/templates/env/env.server.type.ts
19
+ // pkgs/@akanjs/cli/src/templates/env/_env.server.type.ts
20
20
  var env_server_type_exports = {};
21
21
  __export(env_server_type_exports, {
22
22
  default: () => getContent
@@ -26,11 +26,14 @@ function getContent(scanInfo, dict = {}) {
26
26
  if (!scanInfo)
27
27
  return null;
28
28
  const libs = scanInfo.getLibs();
29
- return `
29
+ return {
30
+ filename: "env.server.type.ts",
31
+ content: `
30
32
  ${libs.length ? libs.map((lib) => `import { env as ${lib}Option } from "@${lib}/server";`).join("\n") : 'import { baseEnv } from "@akanjs/base";'}
31
33
 
32
34
  export const libEnv = {
33
35
  ${libs.length ? libs.map((lib) => ` ...${lib}Option,`).join("\n") : " ...baseEnv,"}
34
36
  };
35
- `;
37
+ `
38
+ };
36
39
  }
@@ -27,7 +27,7 @@ function getContent(scanInfo, dict = {}) {
27
27
  if (!scanInfo)
28
28
  return null;
29
29
  const scanResult = scanInfo.getScanResult();
30
- const libs = scanResult.akanConfig.libs;
30
+ const libs = scanResult.libDeps;
31
31
  const libInfos = scanInfo.getLibInfos();
32
32
  const extendedModels = Object.fromEntries(
33
33
  [...scanInfo.file.constant.databases].map(
@@ -26,7 +26,7 @@ function getContent(scanInfo, dict = {}) {
26
26
  if (!scanInfo)
27
27
  return null;
28
28
  const scanResult = scanInfo.getScanResult();
29
- const libs = scanInfo.akanConfig.libs;
29
+ const libs = scanResult.libDeps;
30
30
  const libInfos = scanInfo.getLibInfos();
31
31
  const extendedModels = Object.fromEntries(
32
32
  [...scanInfo.file.dictionary.databases].map(
@@ -26,9 +26,7 @@ function getContent(scanInfo, dict) {
26
26
  return `
27
27
  import type { LibConfig } from "@akanjs/config";
28
28
 
29
- const config: LibConfig = {
30
- libs: ["util", "shared"],
31
- };
29
+ const config: LibConfig = {};
32
30
 
33
31
  export default config;
34
32
  `;
@@ -33,7 +33,7 @@ import { Link } from "@akanjs/ui";
33
33
  export const Card = ({ ${dict.model}, href }: ModelProps<"${dict.model}", cnst.Light${dict.Model}>) => {
34
34
  const { l } = usePage();
35
35
  return (
36
- <Link href={href} className="animate-fadeIn w-full h-36 flex rounded-lg shadow-sm hover:shadow-lg duration-300">
36
+ <Link href={href} className="w-full">
37
37
  <div>{l("${dict.model}.id")}:{${dict.model}.id}</div>
38
38
  </Link>
39
39
  );
@@ -29,12 +29,11 @@ function getContent(scanInfo, dict) {
29
29
  import { clsx } from "@akanjs/client";
30
30
  import { cnst, usePage } from "@${dict.sysName}/client";
31
31
 
32
- interface ${dict.Model}ViewProps {
32
+ interface GeneralProps {
33
33
  className?: string;
34
34
  ${dict.model}: cnst.${dict.Model};
35
35
  }
36
-
37
- export const General = ({ className, ${dict.model} }: ${dict.Model}ViewProps) => {
36
+ export const General = ({ className, ${dict.model} }: GeneralProps) => {
38
37
  const { l } = usePage();
39
38
  return (
40
39
  <div className={clsx("w-full", className)}>
@@ -24,7 +24,6 @@ __export(model_constant_exports, {
24
24
  module.exports = __toCommonJS(model_constant_exports);
25
25
  function getContent(scanInfo, dict) {
26
26
  return `
27
- import { Int } from "@akanjs/base";
28
27
  import { via } from "@akanjs/constant";
29
28
 
30
29
  export class ${dict.Model}Input extends via((field) => ({
@@ -27,7 +27,6 @@ function getContent(scanInfo, dict) {
27
27
  import { modelDictionary } from "@akanjs/dictionary";
28
28
 
29
29
  import type { ${dict.Model}, ${dict.Model}Insight } from "./${dict.model}.constant";
30
- import type { ${dict.Model}Filter } from "./${dict.model}.document";
31
30
  import type { ${dict.Model}Endpoint, ${dict.Model}Slice } from "./${dict.model}.signal";
32
31
 
33
32
  export const dictionary = modelDictionary(["en", "ko"])
@@ -3,17 +3,17 @@
3
3
  "description": "<%= repoName %> workspace",
4
4
  "version": "0.0.1",
5
5
  "dependencies": {
6
- "next": "16.0.3",
7
- "react": "19.2.0",
8
- "react-dom": "19.2.0",
6
+ "next": "16.0.7",
7
+ "react": "19.2.1",
8
+ "react-dom": "19.2.1",
9
9
  "tailwindcss": "^4.1.11",
10
10
  "daisyui": "^5.5.5"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^22.10.4",
14
14
  "@tailwindcss/postcss": "^4.1.11",
15
- "@types/react": "19.2.0",
16
- "@types/react-dom": "19.2.0",
15
+ "@types/react": "19.2.1",
16
+ "@types/react-dom": "19.2.1",
17
17
  "crypto-browserify": "^3.12.1",
18
18
  "eslint": "^9.19.0",
19
19
  "https-browserify": "^1.0.0",