@akanjs/cli 0.9.58 → 0.9.59
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/cjs/index.js +104 -80
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
- package/cjs/src/templates/app/akan.config.js +3 -4
- package/cjs/src/templates/app/app/[lang]/layout.js +4 -4
- package/cjs/src/templates/app/app/layout.js +4 -1
- package/cjs/src/templates/app/env/env.server.testing.ts.template +2 -3
- package/cjs/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -3
- package/cjs/src/templates/app/lib/___appName__/__appName__.service.js +1 -1
- package/cjs/src/templates/env/env.server.type.js +36 -0
- package/cjs/src/templates/lib/__lib/lib.signal.js +1 -2
- package/cjs/src/templates/lib/sig.js +1 -1
- package/cjs/src/templates/libRoot/.gitignore.template +9 -8
- package/cjs/src/templates/libRoot/akan.config.js +0 -1
- package/cjs/src/templates/libRoot/env/env.server.example.ts.template +2 -3
- package/cjs/src/templates/libRoot/env/env.server.testing.ts.template +2 -3
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +7 -3
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
- package/cjs/src/templates/localDev/docker-compose.yaml.template +2 -2
- package/cjs/src/templates/module/__model__.dictionary.js +0 -1
- package/cjs/src/templates/module/__model__.document.js +1 -1
- package/cjs/src/templates/module/__model__.service.js +1 -1
- package/cjs/src/templates/module/__model__.signal.js +1 -2
- package/cjs/src/templates/module/__model__.signal.spec.js +1 -13
- package/cjs/src/templates/module/__model__.signal.test.js +1 -22
- package/cjs/src/templates/workspaceRoot/.gitignore.template +1 -0
- package/cjs/src/templates/workspaceRoot/package.json.template +9 -9
- package/esm/index.js +104 -80
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
- package/esm/src/templates/app/akan.config.js +3 -4
- package/esm/src/templates/app/app/[lang]/layout.js +4 -4
- package/esm/src/templates/app/app/layout.js +4 -1
- package/esm/src/templates/app/env/env.server.testing.ts.template +2 -3
- package/esm/src/templates/app/lib/___appName__/__appName__.dictionary.js +6 -3
- package/esm/src/templates/app/lib/___appName__/__appName__.service.js +1 -1
- package/esm/src/templates/env/env.server.type.js +16 -0
- package/esm/src/templates/lib/__lib/lib.signal.js +1 -2
- package/esm/src/templates/lib/sig.js +1 -1
- package/esm/src/templates/libRoot/.gitignore.template +9 -8
- package/esm/src/templates/libRoot/akan.config.js +0 -1
- package/esm/src/templates/libRoot/env/env.server.example.ts.template +2 -3
- package/esm/src/templates/libRoot/env/env.server.testing.ts.template +2 -3
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +7 -3
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +1 -1
- package/esm/src/templates/localDev/docker-compose.yaml.template +2 -2
- package/esm/src/templates/module/__model__.dictionary.js +0 -1
- package/esm/src/templates/module/__model__.document.js +1 -1
- package/esm/src/templates/module/__model__.service.js +1 -1
- package/esm/src/templates/module/__model__.signal.js +1 -2
- package/esm/src/templates/module/__model__.signal.spec.js +1 -13
- package/esm/src/templates/module/__model__.signal.test.js +1 -22
- package/esm/src/templates/workspaceRoot/.gitignore.template +1 -0
- package/esm/src/templates/workspaceRoot/package.json.template +9 -9
- package/package.json +1 -1
- package/src/application/application.runner.d.ts +1 -1
- package/src/application/application.script.d.ts +2 -1
- package/src/cloud/cloud.command.d.ts +1 -1
- package/src/cloud/cloud.runner.d.ts +1 -1
- package/src/cloud/cloud.script.d.ts +1 -1
- package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -3
- package/src/templates/app/akan.config.d.ts +3 -1
- package/src/templates/app/app/[lang]/layout.d.ts +3 -1
- package/src/templates/env/env.server.type.d.ts +4 -0
- package/src/templates/module/__model__.signal.spec.d.ts +1 -1
- package/src/templates/module/__model__.signal.test.d.ts +1 -1
- package/src/workspace/workspace.command.d.ts +1 -1
- package/src/workspace/workspace.script.d.ts +1 -1
- package/cjs/src/templates/app/page.test.ts.template +0 -10
- package/cjs/src/templates/app/playwright.config.ts.template +0 -6
- package/esm/src/templates/app/page.test.ts.template +0 -10
- package/esm/src/templates/app/playwright.config.ts.template +0 -6
|
@@ -7,7 +7,10 @@ function getContent(scanInfo, dict) {
|
|
|
7
7
|
import { st } from "@${dict.appName}/client";
|
|
8
8
|
import { System } from "@akanjs/ui";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface LayoutProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export default function Layout({ children }: LayoutProps) {
|
|
11
14
|
return <System.Root st={st}>{children}</System.Root>;
|
|
12
15
|
}
|
|
13
16
|
`
|
|
@@ -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
|
|
4
|
+
import { serviceDictionary } from "@akanjs/dictionary";
|
|
5
|
+
|
|
5
6
|
import type { ${dict.AppName}Endpoint } from "./${dict.appName}.signal";
|
|
6
7
|
|
|
7
|
-
export const dictionary =
|
|
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 {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// pkgs/@akanjs/cli/src/templates/env/env.server.type.ts
|
|
2
|
+
function getContent(scanInfo, dict = {}) {
|
|
3
|
+
if (!scanInfo)
|
|
4
|
+
return null;
|
|
5
|
+
const libs = scanInfo.getLibs();
|
|
6
|
+
return `
|
|
7
|
+
${libs.length ? libs.map((lib) => `import { env as ${lib}Option } from "@${lib}/server";`).join("\n") : 'import { baseEnv } from "@akanjs/base";'}
|
|
8
|
+
|
|
9
|
+
export const libEnv = {
|
|
10
|
+
${libs.length ? libs.map((lib) => ` ...${lib}Option,`).join("\n") : " ...baseEnv,"}
|
|
11
|
+
};
|
|
12
|
+
`;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
getContent as default
|
|
16
|
+
};
|
|
@@ -4,7 +4,6 @@ function getContent(scanInfo, dict = {}) {
|
|
|
4
4
|
if (!scanInfo)
|
|
5
5
|
return null;
|
|
6
6
|
const libs = scanInfo.getLibs();
|
|
7
|
-
const rootLib = scanInfo.akanConfig.rootLib;
|
|
8
7
|
const libInfos = [...scanInfo.getLibInfos().values()];
|
|
9
8
|
const extendedModels = Object.fromEntries(
|
|
10
9
|
[...scanInfo.file.signal.databases].map(
|
|
@@ -27,7 +26,7 @@ ${Object.entries(extendedModels).map(([modelName, extendedModels2]) => {
|
|
|
27
26
|
}`;
|
|
28
27
|
}).join("\n")}
|
|
29
28
|
|
|
30
|
-
export const root = ${libs.length ?
|
|
29
|
+
export const root = ${libs.length ? libs[0] : "baseFetch"};
|
|
31
30
|
export const libFetches = [${libs.length ? libs.map((lib) => `${lib}.fetch`).join(", ") : "baseFetch"}] as const;
|
|
32
31
|
`;
|
|
33
32
|
}
|
|
@@ -34,7 +34,7 @@ ${[...databaseModules, ...serviceModules].map((module) => ` ${capitalize(module
|
|
|
34
34
|
);
|
|
35
35
|
export const serializedSignals = signals.map((signal) => signalInfo.serialize(signal));
|
|
36
36
|
|
|
37
|
-
${databaseModules.map((module) => `export const ${module} = gqlOf(cnst.${module}, db.${module}.Filter, ${capitalize(module)}Signal
|
|
37
|
+
${databaseModules.map((module) => `export const ${module} = gqlOf(cnst.${module}, db.${module}.Filter, ${capitalize(module)}Signal);`).join("\n")}
|
|
38
38
|
|
|
39
39
|
export const fetch = makeFetch(...libFetches, {
|
|
40
40
|
${databaseModules.map((module) => `...${module},`).join("\n")}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
**/script.ts
|
|
2
2
|
**/script*.ts
|
|
3
3
|
**/.env
|
|
4
|
-
**/env.client.debug.ts
|
|
5
|
-
**/env.client.develop.ts
|
|
6
|
-
**/env.client.main.ts
|
|
7
|
-
**/env.client.testing.ts
|
|
8
|
-
**/env.server.debug.ts
|
|
9
|
-
**/env.server.develop.ts
|
|
10
|
-
**/env.server.main.ts
|
|
11
|
-
**/env.server.testing.ts
|
|
4
|
+
**/env.client.debug.ts
|
|
5
|
+
**/env.client.develop.ts
|
|
6
|
+
**/env.client.main.ts
|
|
7
|
+
**/env.client.testing.ts
|
|
8
|
+
**/env.server.debug.ts
|
|
9
|
+
**/env.server.develop.ts
|
|
10
|
+
**/env.server.main.ts
|
|
11
|
+
**/env.server.testing.ts
|
|
12
|
+
**/env.server.type.ts
|
|
12
13
|
|
|
13
14
|
# System Files
|
|
14
15
|
.DS_Store
|
|
@@ -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
|
-
|
|
4
|
+
import { serviceDictionary } from "@akanjs/dictionary";
|
|
5
5
|
|
|
6
|
-
|
|
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 '
|
|
26
|
-
mongosh --eval 'try { rs.status() } catch(e) { rs.initiate({_id: \"rs0\", members: [{_id: 0, host: \"
|
|
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,14 +3,13 @@ function getContent(scanInfo, dict) {
|
|
|
3
3
|
return `
|
|
4
4
|
import { Public } from "@akanjs/nest";
|
|
5
5
|
import { endpoint, internal, slice } from "@akanjs/signal";
|
|
6
|
-
import { Admin } from "@shared/nest";
|
|
7
6
|
|
|
8
7
|
import * as cnst from "../cnst";
|
|
9
8
|
import * as srv from "../srv";
|
|
10
9
|
|
|
11
10
|
export class ${dict.Model}Internal extends internal(srv.${dict.model}, () => ({})) {}
|
|
12
11
|
|
|
13
|
-
export class ${dict.Model}Slice extends slice(srv.${dict.model}, { guards: { root:
|
|
12
|
+
export class ${dict.Model}Slice extends slice(srv.${dict.model}, { guards: { root: Public, get: Public, cru: Public } }, (init) => ({
|
|
14
13
|
inPublic: init()
|
|
15
14
|
.exec(function () {
|
|
16
15
|
return this.${dict.model}Service.queryAny();
|
|
@@ -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
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
"description": "<%= repoName %> workspace",
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"next": "
|
|
7
|
-
"react": "19.
|
|
8
|
-
"react-dom": "19.
|
|
9
|
-
"tailwindcss": "^4.1.
|
|
10
|
-
"daisyui": "^5.
|
|
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.
|
|
14
|
-
"@tailwindcss/postcss": "^4.1.
|
|
15
|
-
"@types/react": "19.
|
|
16
|
-
"@types/react-dom": "19.
|
|
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
|
@@ -10,7 +10,7 @@ export interface ReleaseSourceOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export declare class ApplicationRunner {
|
|
12
12
|
#private;
|
|
13
|
-
createApplication(appName: string, workspace: Workspace): Promise<AppExecutor>;
|
|
13
|
+
createApplication(appName: string, workspace: Workspace, libs?: string[]): Promise<AppExecutor>;
|
|
14
14
|
removeApplication(app: App): Promise<void>;
|
|
15
15
|
getConfig(app: App): Promise<import("@akanjs/config").AppConfigResult>;
|
|
16
16
|
scanSync(app: App, { refresh }?: {
|
|
@@ -4,8 +4,9 @@ import { type ReleaseSourceOptions } from "./application.runner";
|
|
|
4
4
|
export declare class ApplicationScript {
|
|
5
5
|
#private;
|
|
6
6
|
libraryScript: LibraryScript;
|
|
7
|
-
createApplication(appName: string, workspace: Workspace, { start }?: {
|
|
7
|
+
createApplication(appName: string, workspace: Workspace, { start, libs }?: {
|
|
8
8
|
start?: boolean;
|
|
9
|
+
libs?: string[];
|
|
9
10
|
}): Promise<void>;
|
|
10
11
|
removeApplication(app: App): Promise<void>;
|
|
11
12
|
sync(sys: Sys): Promise<void>;
|
|
@@ -8,5 +8,5 @@ export declare class CloudCommand {
|
|
|
8
8
|
resetLlm(workspace: Workspace): void;
|
|
9
9
|
ask(question: string, workspace: Workspace): Promise<void>;
|
|
10
10
|
deployAkan(workspace: Workspace): Promise<void>;
|
|
11
|
-
update(workspace: Workspace): Promise<void>;
|
|
11
|
+
update(workspace: Workspace, tag: string): Promise<void>;
|
|
12
12
|
}
|
|
@@ -7,5 +7,5 @@ export declare class CloudRunner {
|
|
|
7
7
|
resetLlm(): void;
|
|
8
8
|
getAkanPkgs(workspace: Workspace): Promise<string[]>;
|
|
9
9
|
deployAkan(workspace: Workspace, akanPkgs: string[]): Promise<void>;
|
|
10
|
-
update(workspace: Workspace): Promise<void>;
|
|
10
|
+
update(workspace: Workspace, tag?: string): Promise<void>;
|
|
11
11
|
}
|
|
@@ -7,5 +7,5 @@ export declare class CloudScript {
|
|
|
7
7
|
resetLlm(workspace: Workspace): void;
|
|
8
8
|
ask(question: string, workspace: Workspace): Promise<void>;
|
|
9
9
|
deployAkan(workspace: Workspace): Promise<void>;
|
|
10
|
-
update(workspace: Workspace): Promise<void>;
|
|
10
|
+
update(workspace: Workspace, tag?: string): Promise<void>;
|
|
11
11
|
}
|
|
@@ -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
|
|
@@ -2,5 +2,7 @@ import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: {
|
|
6
|
+
libs: string[];
|
|
7
|
+
}): string;
|
|
6
8
|
export {};
|
|
@@ -2,7 +2,9 @@ import type { AppInfo, LibInfo } from "@akanjs/devkit";
|
|
|
2
2
|
interface Dict {
|
|
3
3
|
appName: string;
|
|
4
4
|
}
|
|
5
|
-
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict
|
|
5
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: {
|
|
6
|
+
libs: string[];
|
|
7
|
+
}): {
|
|
6
8
|
filename: string;
|
|
7
9
|
content: string;
|
|
8
10
|
};
|
|
@@ -2,7 +2,7 @@ import { Exec, Workspace } from "@akanjs/devkit";
|
|
|
2
2
|
import { WorkspaceScript } from "./workspace.script";
|
|
3
3
|
export declare class WorkspaceCommand {
|
|
4
4
|
workspaceScript: WorkspaceScript;
|
|
5
|
-
createWorkspace(workspaceName: string, app: string, dir: string): Promise<void>;
|
|
5
|
+
createWorkspace(workspaceName: string, app: string, dir: string, libs: boolean): Promise<void>;
|
|
6
6
|
generateMongo(workspace: Workspace): Promise<void>;
|
|
7
7
|
lint(exec: Exec, fix: boolean, workspace: Workspace): Promise<void>;
|
|
8
8
|
lintAll(fix: boolean, workspace: Workspace): Promise<void>;
|
|
@@ -5,7 +5,7 @@ export declare class WorkspaceScript {
|
|
|
5
5
|
#private;
|
|
6
6
|
applicationScript: ApplicationScript;
|
|
7
7
|
libraryScript: LibraryScript;
|
|
8
|
-
createWorkspace(repoName: string, appName: string, dirname
|
|
8
|
+
createWorkspace(repoName: string, appName: string, dirname: string | undefined, installLibs: boolean): Promise<void>;
|
|
9
9
|
generateMongo(workspace: Workspace): Promise<void>;
|
|
10
10
|
lint(exec: Exec, workspace: Workspace, { fix }?: {
|
|
11
11
|
fix?: boolean;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// import { PageAgent } from "@akanjs/next";
|
|
2
|
-
// import { expect, test } from "@playwright/test";
|
|
3
|
-
|
|
4
|
-
// test.describe("index page", () => {
|
|
5
|
-
// test("has title", async ({ page }) => {
|
|
6
|
-
// const agent = new PageAgent(page);
|
|
7
|
-
// await agent.goto("/");
|
|
8
|
-
// expect(agent.page).toBeTruthy();
|
|
9
|
-
// });
|
|
10
|
-
// });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// import { PageAgent } from "@akanjs/next";
|
|
2
|
-
// import { expect, test } from "@playwright/test";
|
|
3
|
-
|
|
4
|
-
// test.describe("index page", () => {
|
|
5
|
-
// test("has title", async ({ page }) => {
|
|
6
|
-
// const agent = new PageAgent(page);
|
|
7
|
-
// await agent.goto("/");
|
|
8
|
-
// expect(agent.page).toBeTruthy();
|
|
9
|
-
// });
|
|
10
|
-
// });
|