@akanjs/cli 0.9.58-canary.1 → 0.9.58-canary.3

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 (24) hide show
  1. package/cjs/index.js +1 -1
  2. package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
  3. package/cjs/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -3
  4. package/cjs/src/templates/app/lib/___appName__/__appName__.service.js +1 -1
  5. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +7 -3
  6. package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
  7. package/cjs/src/templates/localDev/docker-compose.yaml.template +2 -2
  8. package/cjs/src/templates/module/__model__.dictionary.js +0 -1
  9. package/cjs/src/templates/module/__model__.document.js +1 -1
  10. package/cjs/src/templates/module/__model__.service.js +1 -1
  11. package/cjs/src/templates/workspaceRoot/package.json.template +9 -9
  12. package/esm/index.js +1 -1
  13. package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
  14. package/esm/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -3
  15. package/esm/src/templates/app/lib/___appName__/__appName__.service.js +1 -1
  16. package/esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +7 -3
  17. package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
  18. package/esm/src/templates/localDev/docker-compose.yaml.template +2 -2
  19. package/esm/src/templates/module/__model__.dictionary.js +0 -1
  20. package/esm/src/templates/module/__model__.document.js +1 -1
  21. package/esm/src/templates/module/__model__.service.js +1 -1
  22. package/esm/src/templates/workspaceRoot/package.json.template +9 -9
  23. package/package.json +1 -1
  24. package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
package/cjs/index.js CHANGED
@@ -5836,7 +5836,7 @@ ${import_chalk6.default.green("\u27A4")} Authentication Required`));
5836
5836
  const nextVersion2 = `${prefix}.${latestPatch + 1}`;
5837
5837
  return { nextVersion: nextVersion2, latestPublishedVersion: latestPublishedVersionOfBase };
5838
5838
  } catch (e) {
5839
- return { nextVersion: `${prefix}.1`, latestPublishedVersion: null };
5839
+ return { nextVersion: `${prefix}.0`, latestPublishedVersion: null };
5840
5840
  }
5841
5841
  };
5842
5842
  const { nextVersion, latestPublishedVersion } = await getNextVersion(targetVersionPrefix, tag);
@@ -88,8 +88,6 @@ const MyComponent = () => {
88
88
  value={formState.status}
89
89
  items={cnst.Status}
90
90
  onChange={(status) => st.do.setStatusOnMyModel(status)}
91
- model="myModel"
92
- field="status"
93
91
  />
94
92
  </>
95
93
  );
@@ -280,7 +278,6 @@ Components seamlessly integrate with the state management:
280
278
  ## Best Practices
281
279
 
282
280
  1. **Use the appropriate component type** for each part of your feature:
283
-
284
281
  - Use **Field** components for data entry
285
282
  - Use **Data** components for data visualization and management
286
283
  - Use **Load** components for data fetching
@@ -24,9 +24,12 @@ __export(appName_dictionary_exports, {
24
24
  module.exports = __toCommonJS(appName_dictionary_exports);
25
25
  function getContent(scanInfo, dict) {
26
26
  return `
27
- import type { SignalDictionary } from "@akanjs/dictionary";
27
+ import { serviceDictionary } from "@akanjs/dictionary";
28
+
28
29
  import type { ${dict.AppName}Endpoint } from "./${dict.appName}.signal";
29
30
 
30
- export const dictionary = {} satisfies SignalDictionary<${dict.AppName}Endpoint>;
31
- `;
31
+ export const dictionary = serviceDictionary(["en", "ko"])
32
+ .endpoint<${dict.AppName}Endpoint>((fn) => ({}))
33
+ .translate({});
34
+ `;
32
35
  }
@@ -26,6 +26,6 @@ function getContent(scanInfo, dict) {
26
26
  return `
27
27
  import { serve } from "@akanjs/service";
28
28
 
29
- export class ${dict.AppName}Service extends serve("${dict.appName}" as const, { serverMode: "batch" }) {}
29
+ export class ${dict.AppName}Service extends serve("${dict.appName}" as const, { serverMode: "batch" }, () => ({})) {}
30
30
  `;
31
31
  }
@@ -24,8 +24,12 @@ __export(libName_dictionary_exports, {
24
24
  module.exports = __toCommonJS(libName_dictionary_exports);
25
25
  function getContent(scanInfo, dict) {
26
26
  return `
27
- const dictionary = {} as const;
27
+ import { serviceDictionary } from "@akanjs/dictionary";
28
28
 
29
- export const ${dict.libName}Dictionary = dictionary;
30
- `;
29
+ import type { ${dict.LibName}Endpoint } from "./${dict.libName}.signal";
30
+
31
+ export const dictionary = serviceDictionary(["en", "ko"])
32
+ .endpoint<${dict.LibName}Endpoint>((fn) => ({}))
33
+ .translate({});
34
+ `;
31
35
  }
@@ -28,6 +28,6 @@ import { serve } from "@akanjs/service";
28
28
 
29
29
  // import type * as srv from "../srv";
30
30
 
31
- export class ${dict.LibName}Service extends serve("${dict.libName}" as const, { serverMode: "batch" }) {}
31
+ export class ${dict.LibName}Service extends serve("${dict.libName}" as const, { serverMode: "batch" }, () => ({})) {}
32
32
  `;
33
33
  }
@@ -22,8 +22,8 @@ services:
22
22
  entrypoint: >
23
23
  bash -c "
24
24
  mongod --dbpath /data/db --replSet rs0 --bind_ip_all --fork --logpath /var/log/mongodb.log &&
25
- mongosh --eval 'rs.status().ok || rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"mongo:27017\"}]})' &&
26
- mongosh --eval 'try { rs.status() } catch(e) { rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"mongo:27017\"}]}) }' &&
25
+ until mongosh --eval 'db.adminCommand(\"ping\")' > /dev/null 2>&1; do sleep 1; done &&
26
+ mongosh --eval 'try { rs.status() } catch(e) { rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"localhost:27017\"}]}) }' &&
27
27
  tail -f /var/log/mongodb.log
28
28
  "
29
29
  networks:
@@ -38,7 +38,6 @@ export const dictionary = modelDictionary(["en", "ko"])
38
38
  field: t(["Field", "\uD544\uB4DC"]).desc(["Field description", "\uD544\uB4DC \uC124\uBA85"]),
39
39
  }))
40
40
  .insight<${dict.Model}Insight>((t) => ({}))
41
- .query<${dict.Model}Filter>((fn) => ({}))
42
41
  .slice<${dict.Model}Slice>((fn) => ({
43
42
  inPublic: fn(["${dict.Model} In Public", "${dict.Model} \uACF5\uAC1C"]).arg((t) => ({})),
44
43
  }))
@@ -35,7 +35,7 @@ export class ${dict.Model}Filter extends from(cnst.${dict.Model}, (filter) => ({
35
35
 
36
36
  export class ${dict.Model} extends by(cnst.${dict.Model}) {}
37
37
 
38
- export class ${dict.Model}Model extends into(${dict.Model}, ${dict.Model}Filter, cnst.${dict.model}) {}
38
+ export class ${dict.Model}Model extends into(${dict.Model}, ${dict.Model}Filter, cnst.${dict.model}, () => ({})) {}
39
39
 
40
40
  export class ${dict.Model}Middleware extends beyond(${dict.Model}Model, ${dict.Model}) {
41
41
  onSchema(schema: SchemaOf<${dict.Model}Model, ${dict.Model}>) {
@@ -29,6 +29,6 @@ import { serve } from "@akanjs/service";
29
29
  import * as cnst from "../cnst";
30
30
  import * as db from "../db";
31
31
 
32
- export class ${dict.Model}Service extends serve(db.${dict.model}) {}
32
+ export class ${dict.Model}Service extends serve(db.${dict.model}, () => ({})) {}
33
33
  `;
34
34
  }
@@ -3,17 +3,17 @@
3
3
  "description": "<%= repoName %> workspace",
4
4
  "version": "0.0.1",
5
5
  "dependencies": {
6
- "next": "15.3.2",
7
- "react": "19.1.1",
8
- "react-dom": "19.1.1",
9
- "tailwindcss": "^4.1.7",
10
- "daisyui": "^5.0.35"
6
+ "next": "16.0.3",
7
+ "react": "19.2.0",
8
+ "react-dom": "19.2.0",
9
+ "tailwindcss": "^4.1.11",
10
+ "daisyui": "^5.5.5"
11
11
  },
12
12
  "devDependencies": {
13
- "@types/node": "^22.9.0",
14
- "@tailwindcss/postcss": "^4.1.7",
15
- "@types/react": "19.1.1",
16
- "@types/react-dom": "19.1.1",
13
+ "@types/node": "^22.10.4",
14
+ "@tailwindcss/postcss": "^4.1.11",
15
+ "@types/react": "19.2.0",
16
+ "@types/react-dom": "19.2.0",
17
17
  "crypto-browserify": "^3.12.1",
18
18
  "eslint": "^9.19.0",
19
19
  "https-browserify": "^1.0.0",
package/esm/index.js CHANGED
@@ -5817,7 +5817,7 @@ ${chalk6.green("\u27A4")} Authentication Required`));
5817
5817
  const nextVersion2 = `${prefix}.${latestPatch + 1}`;
5818
5818
  return { nextVersion: nextVersion2, latestPublishedVersion: latestPublishedVersionOfBase };
5819
5819
  } catch (e) {
5820
- return { nextVersion: `${prefix}.1`, latestPublishedVersion: null };
5820
+ return { nextVersion: `${prefix}.0`, latestPublishedVersion: null };
5821
5821
  }
5822
5822
  };
5823
5823
  const { nextVersion, latestPublishedVersion } = await getNextVersion(targetVersionPrefix, tag);
@@ -88,8 +88,6 @@ const MyComponent = () => {
88
88
  value={formState.status}
89
89
  items={cnst.Status}
90
90
  onChange={(status) => st.do.setStatusOnMyModel(status)}
91
- model="myModel"
92
- field="status"
93
91
  />
94
92
  </>
95
93
  );
@@ -280,7 +278,6 @@ Components seamlessly integrate with the state management:
280
278
  ## Best Practices
281
279
 
282
280
  1. **Use the appropriate component type** for each part of your feature:
283
-
284
281
  - Use **Field** components for data entry
285
282
  - Use **Data** components for data visualization and management
286
283
  - Use **Load** components for data fetching
@@ -1,11 +1,14 @@
1
1
  // pkgs/@akanjs/cli/src/templates/app/lib/___appName__/__appName__.dictionary.ts
2
2
  function getContent(scanInfo, dict) {
3
3
  return `
4
- import type { SignalDictionary } from "@akanjs/dictionary";
4
+ import { serviceDictionary } from "@akanjs/dictionary";
5
+
5
6
  import type { ${dict.AppName}Endpoint } from "./${dict.appName}.signal";
6
7
 
7
- export const dictionary = {} satisfies SignalDictionary<${dict.AppName}Endpoint>;
8
- `;
8
+ export const dictionary = serviceDictionary(["en", "ko"])
9
+ .endpoint<${dict.AppName}Endpoint>((fn) => ({}))
10
+ .translate({});
11
+ `;
9
12
  }
10
13
  export {
11
14
  getContent as default
@@ -3,7 +3,7 @@ function getContent(scanInfo, dict) {
3
3
  return `
4
4
  import { serve } from "@akanjs/service";
5
5
 
6
- export class ${dict.AppName}Service extends serve("${dict.appName}" as const, { serverMode: "batch" }) {}
6
+ export class ${dict.AppName}Service extends serve("${dict.appName}" as const, { serverMode: "batch" }, () => ({})) {}
7
7
  `;
8
8
  }
9
9
  export {
@@ -1,10 +1,14 @@
1
1
  // pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/__libName__.dictionary.ts
2
2
  function getContent(scanInfo, dict) {
3
3
  return `
4
- const dictionary = {} as const;
4
+ import { serviceDictionary } from "@akanjs/dictionary";
5
5
 
6
- export const ${dict.libName}Dictionary = dictionary;
7
- `;
6
+ import type { ${dict.LibName}Endpoint } from "./${dict.libName}.signal";
7
+
8
+ export const dictionary = serviceDictionary(["en", "ko"])
9
+ .endpoint<${dict.LibName}Endpoint>((fn) => ({}))
10
+ .translate({});
11
+ `;
8
12
  }
9
13
  export {
10
14
  getContent as default
@@ -5,7 +5,7 @@ import { serve } from "@akanjs/service";
5
5
 
6
6
  // import type * as srv from "../srv";
7
7
 
8
- export class ${dict.LibName}Service extends serve("${dict.libName}" as const, { serverMode: "batch" }) {}
8
+ export class ${dict.LibName}Service extends serve("${dict.libName}" as const, { serverMode: "batch" }, () => ({})) {}
9
9
  `;
10
10
  }
11
11
  export {
@@ -22,8 +22,8 @@ services:
22
22
  entrypoint: >
23
23
  bash -c "
24
24
  mongod --dbpath /data/db --replSet rs0 --bind_ip_all --fork --logpath /var/log/mongodb.log &&
25
- mongosh --eval 'rs.status().ok || rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"mongo:27017\"}]})' &&
26
- mongosh --eval 'try { rs.status() } catch(e) { rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"mongo:27017\"}]}) }' &&
25
+ until mongosh --eval 'db.adminCommand(\"ping\")' > /dev/null 2>&1; do sleep 1; done &&
26
+ mongosh --eval 'try { rs.status() } catch(e) { rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"localhost:27017\"}]}) }' &&
27
27
  tail -f /var/log/mongodb.log
28
28
  "
29
29
  networks:
@@ -15,7 +15,6 @@ export const dictionary = modelDictionary(["en", "ko"])
15
15
  field: t(["Field", "\uD544\uB4DC"]).desc(["Field description", "\uD544\uB4DC \uC124\uBA85"]),
16
16
  }))
17
17
  .insight<${dict.Model}Insight>((t) => ({}))
18
- .query<${dict.Model}Filter>((fn) => ({}))
19
18
  .slice<${dict.Model}Slice>((fn) => ({
20
19
  inPublic: fn(["${dict.Model} In Public", "${dict.Model} \uACF5\uAC1C"]).arg((t) => ({})),
21
20
  }))
@@ -12,7 +12,7 @@ export class ${dict.Model}Filter extends from(cnst.${dict.Model}, (filter) => ({
12
12
 
13
13
  export class ${dict.Model} extends by(cnst.${dict.Model}) {}
14
14
 
15
- export class ${dict.Model}Model extends into(${dict.Model}, ${dict.Model}Filter, cnst.${dict.model}) {}
15
+ export class ${dict.Model}Model extends into(${dict.Model}, ${dict.Model}Filter, cnst.${dict.model}, () => ({})) {}
16
16
 
17
17
  export class ${dict.Model}Middleware extends beyond(${dict.Model}Model, ${dict.Model}) {
18
18
  onSchema(schema: SchemaOf<${dict.Model}Model, ${dict.Model}>) {
@@ -6,7 +6,7 @@ import { serve } from "@akanjs/service";
6
6
  import * as cnst from "../cnst";
7
7
  import * as db from "../db";
8
8
 
9
- export class ${dict.Model}Service extends serve(db.${dict.model}) {}
9
+ export class ${dict.Model}Service extends serve(db.${dict.model}, () => ({})) {}
10
10
  `;
11
11
  }
12
12
  export {
@@ -3,17 +3,17 @@
3
3
  "description": "<%= repoName %> workspace",
4
4
  "version": "0.0.1",
5
5
  "dependencies": {
6
- "next": "15.3.2",
7
- "react": "19.1.1",
8
- "react-dom": "19.1.1",
9
- "tailwindcss": "^4.1.7",
10
- "daisyui": "^5.0.35"
6
+ "next": "16.0.3",
7
+ "react": "19.2.0",
8
+ "react-dom": "19.2.0",
9
+ "tailwindcss": "^4.1.11",
10
+ "daisyui": "^5.5.5"
11
11
  },
12
12
  "devDependencies": {
13
- "@types/node": "^22.9.0",
14
- "@tailwindcss/postcss": "^4.1.7",
15
- "@types/react": "19.1.1",
16
- "@types/react-dom": "19.1.1",
13
+ "@types/node": "^22.10.4",
14
+ "@tailwindcss/postcss": "^4.1.11",
15
+ "@types/react": "19.2.0",
16
+ "@types/react-dom": "19.2.0",
17
17
  "crypto-browserify": "^3.12.1",
18
18
  "eslint": "^9.19.0",
19
19
  "https-browserify": "^1.0.0",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "sourceType": "module",
4
4
  "name": "@akanjs/cli",
5
- "version": "0.9.58-canary.1",
5
+ "version": "0.9.58-canary.3",
6
6
  "bin": {
7
7
  "akan": "esm/index.js"
8
8
  },
@@ -88,8 +88,6 @@ const MyComponent = () => {
88
88
  value={formState.status}
89
89
  items={cnst.Status}
90
90
  onChange={(status) => st.do.setStatusOnMyModel(status)}
91
- model="myModel"
92
- field="status"
93
91
  />
94
92
  </>
95
93
  );
@@ -280,7 +278,6 @@ Components seamlessly integrate with the state management:
280
278
  ## Best Practices
281
279
 
282
280
  1. **Use the appropriate component type** for each part of your feature:
283
-
284
281
  - Use **Field** components for data entry
285
282
  - Use **Data** components for data visualization and management
286
283
  - Use **Load** components for data fetching