@akanjs/cli 0.9.58-canary.2 → 0.9.58-canary.4

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.
@@ -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
@@ -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}>) {
@@ -23,17 +23,5 @@ __export(model_signal_spec_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(model_signal_spec_exports);
25
25
  function getContent(scanInfo, dict) {
26
- return `
27
- import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
28
- import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
29
- import * as cnst from "../cnst";
30
- import { fetch } from "../sig";
31
- import { sampleOf } from "@akanjs/test";
32
-
33
- export const create${dict.Model} = async (adminAgent: userSpec.AdminAgent, userAgent: userSpec.UserAgent) => {
34
- const ${dict.model}Input = sampleOf(cnst.${dict.Model}Input);
35
- const ${dict.model} = await adminAgent.fetch.create${dict.Model}(${dict.model}Input);
36
- return ${dict.model};
37
- };
38
- `;
26
+ return null;
39
27
  }
@@ -23,26 +23,5 @@ __export(model_signal_test_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(model_signal_test_exports);
25
25
  function getContent(scanInfo, dict) {
26
- return `
27
- import * as adminSpec from "@shared/lib/admin/admin.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
- import * as cnst from "../cnst";
31
- import { fetch } from "../sig";
32
-
33
- describe("${dict.Model} Signal", () => {
34
- describe("${dict.Model} Service", () => {
35
- let adminAgent: userSpec.AdminAgent;
36
- let userAgent: userSpec.UserAgent;
37
- let ${dict.model}: cnst.${dict.Model};
38
- beforeAll(async () => {
39
- // adminAgent = await adminSpec.getAdminAgentWithInitialize();
40
- // userAgent = await userSpec.getUserAgentWithPhone();
41
- });
42
- it("can create ${dict.model}", async () => {
43
- // ${dict.model} = await ${dict.model}Spec.create${dict.Model}(adminAgent, userAgent);
44
- });
45
- });
46
- });
47
- `;
26
+ return null;
48
27
  }
@@ -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
@@ -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}>) {
@@ -1,18 +1,6 @@
1
1
  // pkgs/@akanjs/cli/src/templates/module/__model__.signal.spec.ts
2
2
  function getContent(scanInfo, dict) {
3
- return `
4
- import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
5
- import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
6
- import * as cnst from "../cnst";
7
- import { fetch } from "../sig";
8
- import { sampleOf } from "@akanjs/test";
9
-
10
- export const create${dict.Model} = async (adminAgent: userSpec.AdminAgent, userAgent: userSpec.UserAgent) => {
11
- const ${dict.model}Input = sampleOf(cnst.${dict.Model}Input);
12
- const ${dict.model} = await adminAgent.fetch.create${dict.Model}(${dict.model}Input);
13
- return ${dict.model};
14
- };
15
- `;
3
+ return null;
16
4
  }
17
5
  export {
18
6
  getContent as default
@@ -1,27 +1,6 @@
1
1
  // pkgs/@akanjs/cli/src/templates/module/__model__.signal.test.ts
2
2
  function getContent(scanInfo, dict) {
3
- return `
4
- import * as adminSpec from "@shared/lib/admin/admin.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
- import * as cnst from "../cnst";
8
- import { fetch } from "../sig";
9
-
10
- describe("${dict.Model} Signal", () => {
11
- describe("${dict.Model} Service", () => {
12
- let adminAgent: userSpec.AdminAgent;
13
- let userAgent: userSpec.UserAgent;
14
- let ${dict.model}: cnst.${dict.Model};
15
- beforeAll(async () => {
16
- // adminAgent = await adminSpec.getAdminAgentWithInitialize();
17
- // userAgent = await userSpec.getUserAgentWithPhone();
18
- });
19
- it("can create ${dict.model}", async () => {
20
- // ${dict.model} = await ${dict.model}Spec.create${dict.Model}(adminAgent, userAgent);
21
- });
22
- });
23
- });
24
- `;
3
+ return null;
25
4
  }
26
5
  export {
27
6
  getContent as default
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.2",
5
+ "version": "0.9.58-canary.4",
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
@@ -4,5 +4,5 @@ interface Dict {
4
4
  model: string;
5
5
  sysName: string;
6
6
  }
7
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
7
+ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): null;
8
8
  export {};
@@ -4,5 +4,5 @@ interface Dict {
4
4
  model: string;
5
5
  sysName: string;
6
6
  }
7
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): string;
7
+ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict): null;
8
8
  export {};