@akanjs/cli 0.9.58-canary.0 → 0.9.58-canary.2
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 +555 -133
- 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/app/{middleware.js → proxy.js} +5 -5
- package/cjs/src/templates/lib/cnst.js +1 -1
- 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 +7 -1
- package/cjs/src/templates/module/__model__.service.js +1 -1
- package/cjs/src/templates/workspaceRoot/package.json.template +9 -9
- package/esm/index.js +549 -127
- 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/app/{middleware.js → proxy.js} +2 -2
- package/esm/src/templates/lib/cnst.js +1 -1
- 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 +7 -1
- package/esm/src/templates/module/__model__.service.js +1 -1
- package/esm/src/templates/workspaceRoot/package.json.template +9 -9
- package/package.json +4 -4
- package/src/application/application.command.d.ts +3 -3
- package/src/application/application.runner.d.ts +14 -5
- package/src/application/application.script.d.ts +7 -6
- /package/src/templates/app/{middleware.d.ts → proxy.d.ts} +0 -0
|
@@ -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
|
|
27
|
+
import { serviceDictionary } from "@akanjs/dictionary";
|
|
28
|
+
|
|
28
29
|
import type { ${dict.AppName}Endpoint } from "./${dict.appName}.signal";
|
|
29
30
|
|
|
30
|
-
export const dictionary =
|
|
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
|
}
|
|
@@ -16,12 +16,12 @@ 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/app/
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/app/proxy.ts
|
|
20
|
+
var proxy_exports = {};
|
|
21
|
+
__export(proxy_exports, {
|
|
22
22
|
default: () => getContent
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(proxy_exports);
|
|
25
25
|
function getContent(scanInfo, dict) {
|
|
26
26
|
return `
|
|
27
27
|
import { createNextMiddleware } from "@akanjs/next";
|
|
@@ -30,6 +30,6 @@ export const config = {
|
|
|
30
30
|
unstable_allowDynamic: ["/node_modules/reflect-metadata/**"],
|
|
31
31
|
matcher: ["/((?!api|_next|.*\\\\..*).*)"],
|
|
32
32
|
};
|
|
33
|
-
export const
|
|
33
|
+
export const proxy = createNextMiddleware();
|
|
34
34
|
`;
|
|
35
35
|
}
|
|
@@ -49,7 +49,7 @@ ${scalarModules.map((module2) => `export * from "./__scalar/${module2}/${module2
|
|
|
49
49
|
|
|
50
50
|
${databaseModules.map((module2) => {
|
|
51
51
|
const names = { Module: capitalize(module2) };
|
|
52
|
-
return `export const ${module2} = cnstOf("${module2}" as const, ${module2}Cnst.${names.Module}Input, ${module2}Cnst.${names.Module}, ${module2}Cnst.Light${names.Module}, ${module2}Cnst.${names.Module}Insight${extendedModelMap.has(module2) ? ", { overwrite: true }" : ""});`;
|
|
52
|
+
return `export const ${module2} = cnstOf("${module2}" as const, ${module2}Cnst.${names.Module}Input, ${module2}Cnst.${names.Module}Object, ${module2}Cnst.${names.Module}, ${module2}Cnst.Light${names.Module}, ${module2}Cnst.${names.Module}Insight${extendedModelMap.has(module2) ? ", { overwrite: true }" : ""});`;
|
|
53
53
|
}).join("\n")}
|
|
54
54
|
${scalarModules.map((module2) => `export const ${module2} = scalarCnstOf("${module2}" as const, ${capitalize(module2)});`).join("\n")}
|
|
55
55
|
`;
|
|
@@ -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
|
-
|
|
27
|
+
import { serviceDictionary } from "@akanjs/dictionary";
|
|
28
28
|
|
|
29
|
-
|
|
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
|
}
|
|
@@ -19,7 +19,13 @@ services:
|
|
|
19
19
|
- 27017:27017
|
|
20
20
|
volumes:
|
|
21
21
|
- ./mongo/local/data:/data/db
|
|
22
|
-
|
|
22
|
+
entrypoint: >
|
|
23
|
+
bash -c "
|
|
24
|
+
mongod --dbpath /data/db --replSet rs0 --bind_ip_all --fork --logpath /var/log/mongodb.log &&
|
|
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
|
+
tail -f /var/log/mongodb.log
|
|
28
|
+
"
|
|
23
29
|
networks:
|
|
24
30
|
- <%= repoName %>-network
|
|
25
31
|
meili:
|
|
@@ -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": "
|
|
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",
|