@akanjs/cli 3.1.1-rc.13 → 3.1.1-rc.15
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.
- package/.build-stamp +1 -1
- package/{CodeAgent-eaazb526.js → CodeAgent-gtwn7tmb.js} +2 -2
- package/{CodeTui-e7nh3rv9.js → CodeTui-v941fqdh.js} +1 -1
- package/akanCode.js +2 -2
- package/{code.command-at39gpkg.js → code.command-dyet4xn6.js} +4 -4
- package/{context.command-d35ppstw.js → context.command-79gxczm4.js} +2 -2
- package/{context.runner-azvkkzdr.js → context.runner-ejag7mhr.js} +1 -1
- package/guidelines/queryRule/queryRule.instruction.md +4 -0
- package/{index-qsz6w3d6.js → index-41d3zx66.js} +3 -3
- package/{index-8wd5r2xv.js → index-jjd97ya6.js} +1 -1
- package/{index-trvk51ht.js → index-jtydvvq7.js} +1 -1
- package/{index-7yzcaymm.js → index-pc9ps0hx.js} +1 -2
- package/index.js +3 -3
- package/package.json +2 -2
- package/templates/__scalar/__model__/__model__.constant.ts +3 -5
- package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
- package/templates/__scalar/__model__/__model__.document.ts +3 -3
- package/templates/app/akan.config.ts +2 -3
- package/templates/app/env/env.client.ts +2 -4
- package/templates/app/env/env.client.type.ts +2 -3
- package/templates/app/env/env.server.ts +2 -3
- package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
- package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
- package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
- package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
- package/templates/app/lib/option.ts +2 -3
- package/templates/app/main.ts +2 -4
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +13 -10
- package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
- package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
- package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
- package/templates/appSample/lib/task/Task.Template.tsx +2 -1
- package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
- package/templates/appSample/lib/task/Task.Util.tsx +16 -4
- package/templates/appSample/lib/task/task.constant.ts +1 -5
- package/templates/appSample/lib/task/task.dictionary.ts +2 -8
- package/templates/appSample/lib/task/task.document.ts +1 -1
- package/templates/appSample/page/task/_index.tsx +2 -1
- package/templates/appSample/page/task/new.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +5 -9
- package/templates/biomeForm.ts +144 -0
- package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
- package/templates/crudPages/[__model__Id]/page.tsx +5 -5
- package/templates/crudPages/new/page.tsx +4 -3
- package/templates/crudPages/page.tsx +3 -3
- package/templates/crudSinglePage/page.tsx +9 -5
- package/templates/libRoot/akan.config.ts +2 -3
- package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
- package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
- package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
- package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
- package/templates/libRoot/lib/option.ts +1 -2
- package/templates/module/__Model__.Template.tsx +11 -10
- package/templates/module/__Model__.Unit.tsx +18 -5
- package/templates/module/__Model__.Util.tsx +9 -7
- package/templates/module/__Model__.View.tsx +9 -6
- package/templates/module/__Model__.Zone.tsx +25 -17
- package/templates/module/__model__.constant.ts +8 -9
- package/templates/module/__model__.dictionary.ts +16 -17
- package/templates/module/__model__.document.ts +6 -8
- package/templates/module/__model__.service.ts +3 -3
- package/templates/module/__model__.signal.ts +11 -10
- package/templates/module/__model__.store.ts +3 -5
- package/templates/service/__model__.dictionary.ts +6 -5
- package/templates/service/__model__.service.ts +3 -3
- package/templates/service/__model__.signal.ts +5 -4
- package/templates/service/__model__.store.ts +3 -5
- package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
- package/{workspace.command-j1680trm.js → workspace.command-097hv6n1.js} +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -7,37 +8,44 @@ interface Dict {
|
|
|
7
8
|
sysType: string;
|
|
8
9
|
}
|
|
9
10
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
11
|
+
const { Model, model } = dict;
|
|
12
|
+
const card = {
|
|
13
|
+
tag: `${Model}.Unit.Card`,
|
|
14
|
+
attrs: [`key={${model}.id}`, `href={\`/${model}/\${${model}.id}\`}`, `${model}={${model}}`],
|
|
15
|
+
};
|
|
16
|
+
const units = {
|
|
17
|
+
tag: "Load.Units",
|
|
18
|
+
attrs: ["className={className}", "init={init}", { name: "renderItem", param: model, body: card }],
|
|
19
|
+
};
|
|
20
|
+
const view = {
|
|
21
|
+
tag: "Load.View",
|
|
22
|
+
attrs: [
|
|
23
|
+
"view={view}",
|
|
24
|
+
{ name: "renderView", param: model, body: { tag: `${Model}.View.General`, attrs: [`${model}={${model}}`] } },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
10
27
|
return {
|
|
11
|
-
filename: `${
|
|
12
|
-
content: `
|
|
13
|
-
"
|
|
14
|
-
import { Load } from "akanjs/ui";
|
|
15
|
-
import { type cnst, ${dict.Model} as ${dict.Model} } from "@${dict.sysType}s/${dict.sysName}/client";
|
|
28
|
+
filename: `${Model}.Zone.tsx`,
|
|
29
|
+
content: `"use client";
|
|
30
|
+
${BiomeForm.importFrom(["type cnst", Model], `@${dict.sysType}s/${dict.sysName}/client`)}
|
|
16
31
|
import type { ClientInit, ClientView, SliceMeta } from "akanjs/fetch";
|
|
32
|
+
import { Load } from "akanjs/ui";
|
|
17
33
|
|
|
18
34
|
interface CardProps {
|
|
19
35
|
className?: string;
|
|
20
|
-
init: ClientInit
|
|
36
|
+
${BiomeForm.typeArgs(" ", "init: ClientInit", [`"${model}"`, `cnst.Light${Model}`], ";")}
|
|
21
37
|
slice?: SliceMeta;
|
|
22
38
|
}
|
|
23
39
|
export const Card = ({ className, init, slice }: CardProps) => {
|
|
24
|
-
|
|
25
|
-
<Load.Units
|
|
26
|
-
className={className}
|
|
27
|
-
init={init}
|
|
28
|
-
renderItem={(${dict.model}) => (
|
|
29
|
-
<${dict.Model}.Unit.Card key={${dict.model}.id} href={\`/${dict.model}/\${${dict.model}.id}\`} ${dict.model}={${dict.model}} />
|
|
30
|
-
)}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
40
|
+
${BiomeForm.returnElement(units, " ")}
|
|
33
41
|
};
|
|
34
42
|
|
|
35
43
|
interface ViewProps {
|
|
36
44
|
className?: string;
|
|
37
|
-
view: ClientView
|
|
45
|
+
${BiomeForm.typeArgs(" ", "view: ClientView", [`"${model}"`, `cnst.${Model}`], ";")}
|
|
38
46
|
}
|
|
39
47
|
export const View = ({ view }: ViewProps) => {
|
|
40
|
-
|
|
48
|
+
${BiomeForm.returnElement(view, " ")}
|
|
41
49
|
};
|
|
42
50
|
`,
|
|
43
51
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -6,19 +7,17 @@ interface Dict {
|
|
|
6
7
|
sysName: string;
|
|
7
8
|
}
|
|
8
9
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
9
|
-
|
|
10
|
-
import { via } from "akanjs/constant";
|
|
10
|
+
const { Model } = dict;
|
|
11
|
+
return `import { via } from "akanjs/constant";
|
|
11
12
|
|
|
12
|
-
export class ${
|
|
13
|
-
name: field(String),
|
|
14
|
-
})) {}
|
|
13
|
+
${BiomeForm.callArgs("", `export class ${Model}Input extends via`, ["(field) => ({\n name: field(String),\n})"], " {}")}
|
|
15
14
|
|
|
16
|
-
export class ${
|
|
15
|
+
${BiomeForm.callArgs("", `export class ${Model}Object extends via`, [`${Model}Input`, "(field) => ({})"], " {}")}
|
|
17
16
|
|
|
18
|
-
export class Light${
|
|
17
|
+
${BiomeForm.callArgs("", `export class Light${Model} extends via`, [`${Model}Object`, '["name"] as const', "(resolve) => ({})"], " {}")}
|
|
19
18
|
|
|
20
|
-
export class ${
|
|
19
|
+
${BiomeForm.callArgs("", `export class ${Model} extends via`, [`${Model}Object`, `Light${Model}`, "(resolve) => ({})"], " {}")}
|
|
21
20
|
|
|
22
|
-
export class ${
|
|
21
|
+
${BiomeForm.callArgs("", `export class ${Model}Insight extends via`, [Model, "(field) => ({})"], " {}")}
|
|
23
22
|
`;
|
|
24
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -10,31 +11,29 @@ interface Dict {
|
|
|
10
11
|
sysName: string;
|
|
11
12
|
}
|
|
12
13
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
14
|
+
const { Model, model } = dict;
|
|
15
|
+
const modelLabelEn = dict.modelLabelEn ?? Model;
|
|
16
|
+
const modelLabelKo = dict.modelLabelKo ?? Model;
|
|
15
17
|
const modelDescEn = dict.modelDescEn ?? `Manage ${modelLabelEn.toLowerCase()}.`;
|
|
16
18
|
const modelDescKo = dict.modelDescKo ?? `${modelLabelKo}을 관리합니다.`;
|
|
17
|
-
return `
|
|
18
|
-
import { modelDictionary } from "akanjs/dictionary";
|
|
19
|
+
return `import { modelDictionary } from "akanjs/dictionary";
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
${BiomeForm.importFrom([Model, `${Model}Insight`], `./${model}.constant`, { typeOnly: true })}
|
|
22
|
+
${BiomeForm.importFrom([`${Model}Filter`], `./${model}.document`, { typeOnly: true })}
|
|
23
|
+
${BiomeForm.importFrom([`${Model}Endpoint`, `${Model}Slice`], `./${model}.signal`, { typeOnly: true })}
|
|
23
24
|
|
|
24
25
|
export const dictionary = modelDictionary(["en", "ko"])
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
.model<${dict.Model}>((t) => ({
|
|
26
|
+
${BiomeForm.dictionaryOf([modelLabelEn, modelLabelKo], [modelDescEn, modelDescKo])}
|
|
27
|
+
.model<${Model}>((t) => ({
|
|
29
28
|
name: t(["Name", "이름"]).desc(["Name", "이름"]),
|
|
30
29
|
}))
|
|
31
|
-
.insight<${
|
|
32
|
-
.query<${
|
|
33
|
-
.sort<${
|
|
34
|
-
.slice<${
|
|
35
|
-
|
|
30
|
+
.insight<${Model}Insight>((t) => ({}))
|
|
31
|
+
.query<${Model}Filter>((fn) => ({}))
|
|
32
|
+
.sort<${Model}Filter>((t) => ({}))
|
|
33
|
+
.slice<${Model}Slice>((fn) => ({
|
|
34
|
+
${BiomeForm.dictionarySlice("inPublic", [`${Model} In Public`, `${Model} 공개`])}
|
|
36
35
|
}))
|
|
37
|
-
.endpoint<${
|
|
36
|
+
.endpoint<${Model}Endpoint>((fn) => ({}))
|
|
38
37
|
.error({})
|
|
39
38
|
.translate({});
|
|
40
39
|
`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -6,18 +7,15 @@ interface Dict {
|
|
|
6
7
|
appName: string;
|
|
7
8
|
}
|
|
8
9
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
9
|
-
|
|
10
|
-
import { by, from, into } from "akanjs/document";
|
|
10
|
+
const { Model, model } = dict;
|
|
11
|
+
return `import { by, from, into } from "akanjs/document";
|
|
11
12
|
|
|
12
13
|
import * as cnst from "../cnst";
|
|
13
14
|
|
|
14
|
-
export class ${
|
|
15
|
-
query: {},
|
|
16
|
-
sort: {},
|
|
17
|
-
})) {}
|
|
15
|
+
${BiomeForm.callArgs("", `export class ${Model}Filter extends from`, [`cnst.${Model}`, "(filter) => ({\n query: {},\n sort: {},\n})"], " {}")}
|
|
18
16
|
|
|
19
|
-
export class ${
|
|
17
|
+
${BiomeForm.callArgs("", `export class ${Model} extends by`, [`cnst.${Model}`], " {}")}
|
|
20
18
|
|
|
21
|
-
export class ${
|
|
19
|
+
${BiomeForm.callArgs("", `export class ${Model}Model extends into`, [Model, `${Model}Filter`, `cnst.${model}`, "() => ({})"], " {}")}
|
|
22
20
|
`;
|
|
23
21
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -6,11 +7,10 @@ interface Dict {
|
|
|
6
7
|
appName: string;
|
|
7
8
|
}
|
|
8
9
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
9
|
-
return `
|
|
10
|
-
import { serve } from "akanjs/service";
|
|
10
|
+
return `import { serve } from "akanjs/service";
|
|
11
11
|
|
|
12
12
|
import * as db from "../db";
|
|
13
13
|
|
|
14
|
-
export class ${dict.Model}Service extends serve
|
|
14
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Service extends serve`, [`db.${dict.model}`, "({ use, service }) => ({})"], " {}")}
|
|
15
15
|
`;
|
|
16
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -10,25 +11,25 @@ interface Options {
|
|
|
10
11
|
sharedGuards?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: Options = {}) {
|
|
14
|
+
const { Model, model } = dict;
|
|
13
15
|
// Admin lives in libs/shared; without it root and cru stay None, shut until the app names a guard of its own.
|
|
14
16
|
const guardImports = options.sharedGuards
|
|
15
17
|
? `import { Admin } from "@libs/shared/srvkit";\nimport { endpoint, internal, Public, slice } from "akanjs/signal";`
|
|
16
18
|
: `import { endpoint, internal, None, Public, slice } from "akanjs/signal";`;
|
|
17
19
|
const writeGuard = options.sharedGuards ? "Admin" : "None";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
const sliceBody = `(init) => ({
|
|
21
|
+
inPublic: init({ guards: [Public] }).exec(function () {
|
|
22
|
+
return this.${model}Service.queryAny();
|
|
23
|
+
}),
|
|
24
|
+
})`;
|
|
25
|
+
return `${guardImports}
|
|
20
26
|
|
|
21
27
|
import * as srv from "../srv";
|
|
22
28
|
|
|
23
|
-
export class ${
|
|
29
|
+
${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "({ interval }) => ({})"], " {}")}
|
|
24
30
|
|
|
25
|
-
export class ${
|
|
26
|
-
inPublic: init({ guards: [Public] })
|
|
27
|
-
.exec(function () {
|
|
28
|
-
return this.${dict.model}Service.queryAny();
|
|
29
|
-
}),
|
|
30
|
-
})) {}
|
|
31
|
+
${BiomeForm.callArgs("", `export class ${Model}Slice extends slice`, [`srv.${model}`, `{ guards: { root: ${writeGuard}, get: Public, cru: ${writeGuard} } }`, sliceBody], " {}")}
|
|
31
32
|
|
|
32
|
-
export class ${
|
|
33
|
+
${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
|
|
33
34
|
`;
|
|
34
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -6,14 +7,11 @@ interface Dict {
|
|
|
6
7
|
sysName: string;
|
|
7
8
|
}
|
|
8
9
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
9
|
-
return `
|
|
10
|
-
import { store } from "akanjs/store";
|
|
10
|
+
return `import { store } from "akanjs/store";
|
|
11
11
|
|
|
12
12
|
import { sig } from "../useClient";
|
|
13
13
|
|
|
14
|
-
export class ${dict.Model}Store extends store
|
|
15
|
-
// state
|
|
16
|
-
})) {
|
|
14
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`sig.${dict.model}`, "() => ({\n // state\n})"], " {")}
|
|
17
15
|
// action
|
|
18
16
|
}
|
|
19
17
|
`;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
|
|
9
|
-
import { modelDictionary } from "akanjs/dictionary";
|
|
9
|
+
const { Model, model } = dict;
|
|
10
|
+
return `import { modelDictionary } from "akanjs/dictionary";
|
|
10
11
|
|
|
11
|
-
import type { ${
|
|
12
|
+
import type { ${Model}Endpoint } from "../sig";
|
|
12
13
|
|
|
13
14
|
export const dictionary = modelDictionary(["en", "ko"])
|
|
14
|
-
|
|
15
|
-
.endpoint<${
|
|
15
|
+
${BiomeForm.dictionaryOf([model, model], [`${model} description`, `${model} 설명`])}
|
|
16
|
+
.endpoint<${Model}Endpoint>((fn) => ({}))
|
|
16
17
|
.error({})
|
|
17
18
|
.translate({});
|
|
18
19
|
`;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { serve } from "akanjs/service";
|
|
9
|
+
return `import { serve } from "akanjs/service";
|
|
10
10
|
|
|
11
|
-
export class ${dict.Model}Service extends serve
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Service extends serve`, [`"${dict.model}" as const`, "({ use, service, env, signal }) => ({})"], " {}")}
|
|
12
12
|
`;
|
|
13
13
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
|
|
9
|
-
import { endpoint, internal } from "akanjs/signal";
|
|
9
|
+
const { Model, model } = dict;
|
|
10
|
+
return `import { endpoint, internal } from "akanjs/signal";
|
|
10
11
|
|
|
11
12
|
import * as srv from "../srv";
|
|
12
13
|
|
|
13
|
-
export class ${
|
|
14
|
+
${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "() => ({})"], " {}")}
|
|
14
15
|
|
|
15
|
-
export class ${
|
|
16
|
+
${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
|
|
16
17
|
`;
|
|
17
18
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { store } from "akanjs/store";
|
|
9
|
+
return `import { store } from "akanjs/store";
|
|
10
10
|
|
|
11
|
-
export class ${dict.Model}Store extends store
|
|
12
|
-
// state
|
|
13
|
-
})) {
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`"${dict.model}" as const`, "() => ({\n // state\n})"], " {")}
|
|
14
12
|
// action
|
|
15
13
|
}
|
|
16
14
|
`;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll.biome": "always"
|
|
7
|
+
},
|
|
8
|
+
"[typescript]": {
|
|
9
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
10
|
+
},
|
|
11
|
+
"[typescriptreact]": {
|
|
12
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
13
|
+
},
|
|
14
|
+
"[javascript]": {
|
|
15
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
16
|
+
},
|
|
17
|
+
"[javascriptreact]": {
|
|
18
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
19
|
+
},
|
|
20
|
+
"[json]": {
|
|
21
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
22
|
+
}
|
|
23
23
|
}
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
CloudScript2
|
|
62
62
|
} from "./index-brpk7gd8.js";
|
|
63
|
-
import"./index-
|
|
63
|
+
import"./index-pc9ps0hx.js";
|
|
64
64
|
import"./index-wvvwdzfw.js";
|
|
65
65
|
import"./index-ygy8c12j.js";
|
|
66
66
|
import"./index-nmy1rana.js";
|
|
@@ -69,7 +69,7 @@ import"./index-kbbyzs6j.js";
|
|
|
69
69
|
import"./index-y5m4j2w6.js";
|
|
70
70
|
import {
|
|
71
71
|
ContextScript
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-jtydvvq7.js";
|
|
73
73
|
import"./index-553xyb55.js";
|
|
74
74
|
|
|
75
75
|
// pkgs/@akanjs/cli/workspace/workspace.runner.ts
|