@akanjs/cli 0.0.117 → 0.0.119
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 +16 -9
- package/cjs/src/templates/libRoot/akan.config.js +36 -0
- package/cjs/src/templates/libRoot/base/baseLogic.js +35 -0
- package/cjs/src/templates/libRoot/base/index.js +29 -0
- package/cjs/src/templates/libRoot/common/commonLogic.js +35 -0
- package/cjs/src/templates/libRoot/common/index.js +29 -0
- package/cjs/src/templates/libRoot/jest.config.js +1 -1
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +31 -0
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +42 -0
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.store.js +36 -0
- package/cjs/src/templates/libRoot/lib/___libName__/_server.js +34 -0
- package/cjs/src/templates/libRoot/lib/option.js +42 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +57 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +34 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +80 -0
- package/cjs/src/templates/libRoot/lib/setting/_server.js +48 -0
- package/cjs/src/templates/libRoot/lib/setting/index.js +61 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.constant.js +46 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.dictionary.js +46 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.document.js +48 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.service.js +37 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.signal.js +34 -0
- package/cjs/src/templates/libRoot/lib/setting/setting.store.js +41 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +43 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +33 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +62 -0
- package/cjs/src/templates/libRoot/lib/summary/_server.js +48 -0
- package/cjs/src/templates/libRoot/lib/summary/index.js +67 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.constant.js +44 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.dictionary.js +49 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.document.js +48 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.service.js +34 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.signal.js +34 -0
- package/cjs/src/templates/libRoot/lib/summary/summary.store.js +41 -0
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +65 -0
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +94 -0
- package/cjs/src/templates/libRoot/lib/user/User.View.js +66 -0
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +74 -0
- package/cjs/src/templates/libRoot/lib/user/_server.js +48 -0
- package/cjs/src/templates/libRoot/lib/user/index.js +61 -0
- package/cjs/src/templates/libRoot/lib/user/user.constant.js +67 -0
- package/cjs/src/templates/libRoot/lib/user/user.dictionary.js +52 -0
- package/cjs/src/templates/libRoot/lib/user/user.document.js +54 -0
- package/cjs/src/templates/libRoot/lib/user/user.service.js +42 -0
- package/cjs/src/templates/libRoot/lib/user/user.signal.js +34 -0
- package/cjs/src/templates/libRoot/lib/user/user.signal.spec.js +37 -0
- package/cjs/src/templates/libRoot/lib/user/user.signal.test.js +39 -0
- package/cjs/src/templates/libRoot/lib/user/user.store.js +39 -0
- package/cjs/src/templates/libRoot/nest/backendLogic.js +34 -0
- package/cjs/src/templates/libRoot/nest/index.js +29 -0
- package/cjs/src/templates/libRoot/next/frontendLogic.js +34 -0
- package/cjs/src/templates/libRoot/next/index.js +29 -0
- package/cjs/src/templates/libRoot/ui/index.js +29 -0
- package/esm/index.js +16 -9
- package/esm/src/templates/libRoot/akan.config.js +16 -0
- package/esm/src/templates/libRoot/base/baseLogic.js +15 -0
- package/esm/src/templates/libRoot/base/index.js +9 -0
- package/esm/src/templates/libRoot/common/commonLogic.js +15 -0
- package/esm/src/templates/libRoot/common/index.js +9 -0
- package/esm/src/templates/libRoot/jest.config.js +1 -1
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +11 -0
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +22 -0
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.store.js +16 -0
- package/esm/src/templates/libRoot/lib/___libName__/_server.js +14 -0
- package/esm/src/templates/libRoot/lib/option.js +22 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +37 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +14 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +31 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +60 -0
- package/esm/src/templates/libRoot/lib/setting/_server.js +28 -0
- package/esm/src/templates/libRoot/lib/setting/index.js +41 -0
- package/esm/src/templates/libRoot/lib/setting/setting.constant.js +26 -0
- package/esm/src/templates/libRoot/lib/setting/setting.dictionary.js +26 -0
- package/esm/src/templates/libRoot/lib/setting/setting.document.js +28 -0
- package/esm/src/templates/libRoot/lib/setting/setting.service.js +17 -0
- package/esm/src/templates/libRoot/lib/setting/setting.signal.js +14 -0
- package/esm/src/templates/libRoot/lib/setting/setting.store.js +21 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +23 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +13 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +31 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +42 -0
- package/esm/src/templates/libRoot/lib/summary/_server.js +28 -0
- package/esm/src/templates/libRoot/lib/summary/index.js +47 -0
- package/esm/src/templates/libRoot/lib/summary/summary.constant.js +24 -0
- package/esm/src/templates/libRoot/lib/summary/summary.dictionary.js +29 -0
- package/esm/src/templates/libRoot/lib/summary/summary.document.js +28 -0
- package/esm/src/templates/libRoot/lib/summary/summary.service.js +14 -0
- package/esm/src/templates/libRoot/lib/summary/summary.signal.js +14 -0
- package/esm/src/templates/libRoot/lib/summary/summary.store.js +21 -0
- package/esm/src/templates/libRoot/lib/user/User.Template.js +45 -0
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/user/User.Util.js +74 -0
- package/esm/src/templates/libRoot/lib/user/User.View.js +46 -0
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +54 -0
- package/esm/src/templates/libRoot/lib/user/_server.js +28 -0
- package/esm/src/templates/libRoot/lib/user/index.js +41 -0
- package/esm/src/templates/libRoot/lib/user/user.constant.js +47 -0
- package/esm/src/templates/libRoot/lib/user/user.dictionary.js +32 -0
- package/esm/src/templates/libRoot/lib/user/user.document.js +34 -0
- package/esm/src/templates/libRoot/lib/user/user.service.js +22 -0
- package/esm/src/templates/libRoot/lib/user/user.signal.js +14 -0
- package/esm/src/templates/libRoot/lib/user/user.signal.spec.js +17 -0
- package/esm/src/templates/libRoot/lib/user/user.signal.test.js +19 -0
- package/esm/src/templates/libRoot/lib/user/user.store.js +19 -0
- package/esm/src/templates/libRoot/nest/backendLogic.js +14 -0
- package/esm/src/templates/libRoot/nest/index.js +9 -0
- package/esm/src/templates/libRoot/next/frontendLogic.js +14 -0
- package/esm/src/templates/libRoot/next/index.js +9 -0
- package/esm/src/templates/libRoot/ui/index.js +9 -0
- package/package.json +1 -1
- package/src/library/library.runner.d.ts +1 -1
- package/src/templates/libRoot/akan.config.d.ts +5 -0
- package/src/templates/libRoot/base/baseLogic.d.ts +5 -0
- package/src/templates/libRoot/base/index.d.ts +5 -0
- package/src/templates/libRoot/common/commonLogic.d.ts +5 -0
- package/src/templates/libRoot/common/index.d.ts +5 -0
- package/src/templates/libRoot/env/env.server.example.ts.template +7 -0
- package/src/templates/libRoot/env/env.server.testing.ts.template +7 -0
- package/src/templates/libRoot/jest.config.d.ts +1 -1
- package/src/templates/libRoot/lib/___libName__/__libName__.dictionary.d.ts +6 -0
- package/src/templates/libRoot/lib/___libName__/__libName__.service.d.ts +6 -0
- package/src/templates/libRoot/lib/___libName__/__libName__.store.d.ts +6 -0
- package/src/templates/libRoot/lib/___libName__/_server.d.ts +7 -0
- package/src/templates/libRoot/lib/option.d.ts +6 -0
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/_server.d.ts +6 -0
- package/src/templates/libRoot/lib/setting/index.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/setting.constant.d.ts +7 -0
- package/src/templates/libRoot/lib/setting/setting.dictionary.d.ts +7 -0
- package/src/templates/libRoot/lib/setting/setting.document.d.ts +6 -0
- package/src/templates/libRoot/lib/setting/setting.service.d.ts +7 -0
- package/src/templates/libRoot/lib/setting/setting.signal.d.ts +6 -0
- package/src/templates/libRoot/lib/setting/setting.store.d.ts +6 -0
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/_server.d.ts +6 -0
- package/src/templates/libRoot/lib/summary/index.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/summary.constant.d.ts +7 -0
- package/src/templates/libRoot/lib/summary/summary.dictionary.d.ts +7 -0
- package/src/templates/libRoot/lib/summary/summary.document.d.ts +6 -0
- package/src/templates/libRoot/lib/summary/summary.service.d.ts +7 -0
- package/src/templates/libRoot/lib/summary/summary.signal.d.ts +6 -0
- package/src/templates/libRoot/lib/summary/summary.store.d.ts +6 -0
- package/src/templates/libRoot/lib/user/User.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.View.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/user/_server.d.ts +6 -0
- package/src/templates/libRoot/lib/user/index.d.ts +9 -0
- package/src/templates/libRoot/lib/user/user.constant.d.ts +7 -0
- package/src/templates/libRoot/lib/user/user.dictionary.d.ts +7 -0
- package/src/templates/libRoot/lib/user/user.document.d.ts +7 -0
- package/src/templates/libRoot/lib/user/user.service.d.ts +7 -0
- package/src/templates/libRoot/lib/user/user.signal.d.ts +6 -0
- package/src/templates/libRoot/lib/user/user.signal.spec.d.ts +6 -0
- package/src/templates/libRoot/lib/user/user.signal.test.d.ts +6 -0
- package/src/templates/libRoot/lib/user/user.store.d.ts +6 -0
- package/src/templates/libRoot/nest/backendLogic.d.ts +5 -0
- package/src/templates/libRoot/nest/index.d.ts +5 -0
- package/src/templates/libRoot/next/frontendLogic.d.ts +5 -0
- package/src/templates/libRoot/next/index.d.ts +5 -0
- package/src/templates/libRoot/package.json.template +2 -3
- package/src/templates/libRoot/ui/index.d.ts +5 -0
- package/src/templates/workspaceRoot/package.json.template +7 -0
package/cjs/index.js
CHANGED
|
@@ -2040,6 +2040,7 @@ var runCommands = async (...commands) => {
|
|
|
2040
2040
|
} catch (e) {
|
|
2041
2041
|
const errMsg = e instanceof Error ? e.message : typeof e === "string" ? e : JSON.stringify(e);
|
|
2042
2042
|
Logger.error(`Command Error: ${import_chalk2.default.red(errMsg)}`);
|
|
2043
|
+
console.error(e);
|
|
2043
2044
|
}
|
|
2044
2045
|
});
|
|
2045
2046
|
}
|
|
@@ -2195,11 +2196,6 @@ var Builder = class {
|
|
|
2195
2196
|
platform: this.#pkgJson.esbuild?.platform,
|
|
2196
2197
|
format,
|
|
2197
2198
|
outdir: `${this.#distExecutor.cwdPath}/${format}`,
|
|
2198
|
-
// outdir: this.#distExecutor.cwdPath,
|
|
2199
|
-
// outExtension: { ".js": format === "cjs" ? ".js" : ".esm.js" },
|
|
2200
|
-
// format === "cjs"
|
|
2201
|
-
// ? { ".js": this.#pkgJson.type === "module" ? ".cjs" : ".js" }
|
|
2202
|
-
// : { ".js": this.#pkgJson.type === "module" ? ".js" : ".mjs" },
|
|
2203
2199
|
logLevel: "error"
|
|
2204
2200
|
};
|
|
2205
2201
|
}
|
|
@@ -2240,8 +2236,6 @@ var Builder = class {
|
|
|
2240
2236
|
require: "./cjs/index.js",
|
|
2241
2237
|
import: "./esm/index.js",
|
|
2242
2238
|
types: "./index.d.ts"
|
|
2243
|
-
// require: this.#pkgJson.type === "module" ? "./index.cjs" : "./index.js",
|
|
2244
|
-
// import: this.#pkgJson.type === "module" ? "./index.js" : "./index.mjs",
|
|
2245
2239
|
}
|
|
2246
2240
|
}
|
|
2247
2241
|
};
|
|
@@ -2261,6 +2255,18 @@ var LibraryRunner = class {
|
|
|
2261
2255
|
return scanResult;
|
|
2262
2256
|
}
|
|
2263
2257
|
async createLibrary(libName, workspace) {
|
|
2258
|
+
await workspace.exec(`mkdir -p libs/${libName}`);
|
|
2259
|
+
const lib = LibExecutor.from(workspace, libName);
|
|
2260
|
+
await lib.applyTemplate({ basePath: ".", template: "libRoot", dict: { libName, Libname: capitalize(libName) } });
|
|
2261
|
+
const rootTsConfig = workspace.readJson("tsconfig.json");
|
|
2262
|
+
rootTsConfig.compilerOptions.paths[`@${libName}`] = [`libs/${libName}/index.ts`];
|
|
2263
|
+
rootTsConfig.compilerOptions.paths[`@${libName}/*`] = [`libs/${libName}/*`];
|
|
2264
|
+
if (rootTsConfig.references) {
|
|
2265
|
+
if (!rootTsConfig.references.some((ref) => ref.path === `./libs/${libName}/tsconfig.json`))
|
|
2266
|
+
rootTsConfig.references.push({ path: `./libs/${libName}/tsconfig.json` });
|
|
2267
|
+
}
|
|
2268
|
+
workspace.writeJson("tsconfig.json", rootTsConfig);
|
|
2269
|
+
return lib;
|
|
2264
2270
|
}
|
|
2265
2271
|
async removeLibrary(lib) {
|
|
2266
2272
|
await lib.workspace.exec(`rm -rf libs/${lib.name}`);
|
|
@@ -2356,7 +2362,8 @@ var LibraryScript = class {
|
|
|
2356
2362
|
await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
|
|
2357
2363
|
}
|
|
2358
2364
|
async createLibrary(libName, workspace) {
|
|
2359
|
-
await this.#runner.createLibrary(libName, workspace);
|
|
2365
|
+
const lib = await this.#runner.createLibrary(libName, workspace);
|
|
2366
|
+
await this.syncLibrary(lib);
|
|
2360
2367
|
}
|
|
2361
2368
|
async removeLibrary(lib) {
|
|
2362
2369
|
await this.#runner.removeLibrary(lib);
|
|
@@ -2394,9 +2401,9 @@ var import_open = __toESM(require("open"));
|
|
|
2394
2401
|
var import_ora2 = __toESM(require("ora"));
|
|
2395
2402
|
var import_path4 = __toESM(require("path"));
|
|
2396
2403
|
var vite = __toESM(require("vite"));
|
|
2404
|
+
var import_vite_plugin_commonjs = __toESM(require("vite-plugin-commonjs"));
|
|
2397
2405
|
var import_vite_plugin_node_polyfills = require("vite-plugin-node-polyfills");
|
|
2398
2406
|
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"));
|
|
2399
|
-
var import_vite_plugin_commonjs = __toESM(require("vite-plugin-commonjs"));
|
|
2400
2407
|
|
|
2401
2408
|
// pkgs/@akanjs/cli/src/module/module.prompt.ts
|
|
2402
2409
|
var frameworkDescription = `
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/akan.config.ts
|
|
20
|
+
var akan_config_exports = {};
|
|
21
|
+
__export(akan_config_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(akan_config_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import type { LibConfig } from "@akanjs/config";
|
|
28
|
+
|
|
29
|
+
const config: LibConfig = {
|
|
30
|
+
rootLib: "shared",
|
|
31
|
+
libs: ["util", "shared"],
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/base/baseLogic.ts
|
|
20
|
+
var baseLogic_exports = {};
|
|
21
|
+
__export(baseLogic_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(baseLogic_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
// \uD604 \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C\uB294 \uD504\uB85C\uC81D\uD2B8 \uB0B4 \uC804\uCCB4\uC801\uC73C\uB85C \uC0AC\uC6A9\uB418\uB294 \uB85C\uC9C1\uC744 \uAD6C\uD604\uD558\uBA70, \uB530\uB77C\uC11C \uBC31/\uD504\uB860\uD2B8 \uBE44\uC758\uC874\uC801\uC778 pure js \uCF54\uB4DC\uB9CC \uAD6C\uD604 \uAC00\uB2A5\uD569\uB2C8\uB2E4.
|
|
28
|
+
// common\uD3F4\uB354\uC640 \uB2E4\uB978\uC810\uC740, base \uCF54\uB4DC\uB294 \uC2DC\uC2A4\uD15C \uC804\uCCB4\uC5D0\uC11C import\uB418\uC5B4 \uC0AC\uC6A9\uB418\uBBC0\uB85C, \uAC00\uC7A5 \uD575\uC2EC\uC801\uC778 \uB85C\uC9C1\uACFC \uCD94\uC0C1\uD654\uB41C \uAE30\uB2A5\uB9CC \uAD6C\uD604\uD574\uC57C\uD569\uB2C8\uB2E4.
|
|
29
|
+
// @${dict.libName}/base\uC5D0\uC11C\uB294 \uC11C\uBC84/\uD074\uB77C\uC774\uC5B8\uD2B8 \uAD00\uB828 \uB77C\uC774\uBE0C\uB7EC\uB9AC(@*/server, @*/nest, @*/client, @*/next)\uB97C \uBAA8\uB450 import\uD560 \uC218 \uC5C6\uC73C\uBA70, @*/base \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB9CC import \uAC00\uB2A5\uD569\uB2C8\uB2E4.
|
|
30
|
+
|
|
31
|
+
export const someBaseLogic = () => {
|
|
32
|
+
//
|
|
33
|
+
};
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/base/index.ts
|
|
20
|
+
var base_exports = {};
|
|
21
|
+
__export(base_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(base_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
export * from "./baseLogic";
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/common/commonLogic.ts
|
|
20
|
+
var commonLogic_exports = {};
|
|
21
|
+
__export(commonLogic_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(commonLogic_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
// \uD604 \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C\uB294 \uD504\uB85C\uC81D\uD2B8 \uB0B4 \uC804\uCCB4\uC801\uC73C\uB85C \uC0AC\uC6A9\uB418\uB294 \uC138\uBD80\uC801\uC778 \uB85C\uC9C1\uC744 \uAD6C\uD604\uD558\uBA70, \uB530\uB77C\uC11C \uBC31/\uD504\uB860\uD2B8 \uBE44\uC758\uC874\uC801\uC778 pure js \uCF54\uB4DC\uB9CC \uAD6C\uD604 \uAC00\uB2A5\uD569\uB2C8\uB2E4.
|
|
28
|
+
// base\uD3F4\uB354\uC640 \uB2E4\uB978\uC810\uC740, common \uCF54\uB4DC\uB294 \uC0AC\uC6A9\uD558\uB294 \uD30C\uC77C\uC5D0\uC11C\uB9CC import\uB418\uAE30 \uB54C\uBB38\uC5D0, \uC678\uBD80\uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C import\uD574\uC11C \uC0AC\uC6A9\uD558\uAC70\uB098 \uC0C1\uC138\uD55C \uB85C\uC9C1\uC744 \uAD6C\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
29
|
+
// @${dict.libName}/common\uC5D0\uC11C\uB294 \uC11C\uBC84/\uD074\uB77C\uC774\uC5B8\uD2B8 \uAD00\uB828 \uB77C\uC774\uBE0C\uB7EC\uB9AC(@*/server, @*/nest, @*/client, @*/next)\uB97C \uBAA8\uB450 import\uD560 \uC218 \uC5C6\uC73C\uBA70, @*/base\uC640 @*/common \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB9CC import \uAC00\uB2A5\uD569\uB2C8\uB2E4.
|
|
30
|
+
|
|
31
|
+
export const someCommonLogic = () => {
|
|
32
|
+
//
|
|
33
|
+
};
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/common/index.ts
|
|
20
|
+
var common_exports = {};
|
|
21
|
+
__export(common_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(common_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
export * from "./commonLogic";
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/__libName__.dictionary.ts
|
|
20
|
+
var libName_dictionary_exports = {};
|
|
21
|
+
__export(libName_dictionary_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(libName_dictionary_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
const dictionary = {} as const;
|
|
28
|
+
|
|
29
|
+
export const ${dict.libName}Dictionary = dictionary;
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/__libName__.service.ts
|
|
20
|
+
var libName_service_exports = {};
|
|
21
|
+
__export(libName_service_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(libName_service_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Cron } from "@akanjs/nest";
|
|
28
|
+
import { LogService, Service, Srv } from "@akanjs/service";
|
|
29
|
+
|
|
30
|
+
import type * as srv from "../srv";
|
|
31
|
+
|
|
32
|
+
@Service("${dict.libName}Service", { serverMode: "batch" })
|
|
33
|
+
export class ${dict.LibName}Service extends LogService("${dict.libName}Service") {
|
|
34
|
+
@Srv() protected readonly summaryService: srv.SummaryService;
|
|
35
|
+
|
|
36
|
+
@Cron("0 * * * *")
|
|
37
|
+
async takePeriodicSnapshot() {
|
|
38
|
+
await this.summaryService.makeSummary();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/__libName__.store.ts
|
|
20
|
+
var libName_store_exports = {};
|
|
21
|
+
__export(libName_store_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(libName_store_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { scalarStateOf, Store } from "@akanjs/store";
|
|
28
|
+
|
|
29
|
+
@Store({ name: "${dict.libName}" })
|
|
30
|
+
export class ${dict.LibName}Store extends scalarStateOf("${dict.libName}" as const, {
|
|
31
|
+
// state
|
|
32
|
+
}) {
|
|
33
|
+
// action
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/___libName__/_server.ts
|
|
20
|
+
var server_exports = {};
|
|
21
|
+
__export(server_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(server_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { batchModuleOf } from "@akanjs/server";
|
|
28
|
+
|
|
29
|
+
import type { ModulesOptions } from "../option";
|
|
30
|
+
import { ${dict.AppName}Service } from "./${dict.appName}.service";
|
|
31
|
+
|
|
32
|
+
export const register${dict.AppName}Module = (option: ModulesOptions) => batchModuleOf({ service: ${dict.AppName}Service, uses: {} });
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/option.ts
|
|
20
|
+
var option_exports = {};
|
|
21
|
+
__export(option_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(option_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
import { useGlobals } from "@akanjs/server";
|
|
28
|
+
|
|
29
|
+
import type { LibOptions } from "./__lib/lib.service";
|
|
30
|
+
|
|
31
|
+
export type ModulesOptions = LibOptions & {
|
|
32
|
+
//
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const registerGlobalModule = (options: ModulesOptions) => {
|
|
36
|
+
return useGlobals({
|
|
37
|
+
uses: {},
|
|
38
|
+
useAsyncs: {},
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Template.tsx
|
|
20
|
+
var Setting_Template_exports = {};
|
|
21
|
+
__export(Setting_Template_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Template_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Template.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
import { st, usePage } from "@${dict.libName}/client";
|
|
31
|
+
|
|
32
|
+
interface GeneralProps {
|
|
33
|
+
settingId?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const General = ({ settingId = undefined }: GeneralProps) => {
|
|
37
|
+
const settingForm = st.use.settingForm();
|
|
38
|
+
const { l } = usePage();
|
|
39
|
+
return (
|
|
40
|
+
<div className="mb-4 flex items-center">
|
|
41
|
+
<div className="flex items-center gap-2">
|
|
42
|
+
<div className="w-32">{l("setting.resignupDays")}</div>
|
|
43
|
+
<input
|
|
44
|
+
type="number"
|
|
45
|
+
className="input"
|
|
46
|
+
value={settingForm.resignupDays}
|
|
47
|
+
onChange={(e) => {
|
|
48
|
+
st.do.setResignupDaysOnSetting(e.target.valueAsNumber);
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Unit.tsx
|
|
20
|
+
var Setting_Unit_exports = {};
|
|
21
|
+
__export(Setting_Unit_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Unit_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Unit.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { ModelProps } from "@akanjs/client";
|
|
30
|
+
|
|
31
|
+
import { cnst } from "../cnst";
|
|
32
|
+
|
|
33
|
+
export const Card = ({ className, setting }: ModelProps<"setting", cnst.LightSetting>) => {
|
|
34
|
+
return <div>{setting.id}</div>;
|
|
35
|
+
};
|
|
36
|
+
`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.Util.tsx
|
|
20
|
+
var Setting_Util_exports = {};
|
|
21
|
+
__export(Setting_Util_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_Util_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.Util.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
"use client";
|
|
30
|
+
|
|
31
|
+
export const aaa = 1;
|
|
32
|
+
`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// pkgs/@akanjs/cli/src/templates/libRoot/lib/setting/Setting.View.tsx
|
|
20
|
+
var Setting_View_exports = {};
|
|
21
|
+
__export(Setting_View_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Setting_View_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return {
|
|
27
|
+
filename: "Setting.View.tsx",
|
|
28
|
+
content: `
|
|
29
|
+
import { clsx } from "@akanjs/client";
|
|
30
|
+
import { usePage } from "@${dict.libName}/client";
|
|
31
|
+
|
|
32
|
+
import { cnst } from "../cnst";
|
|
33
|
+
|
|
34
|
+
interface SettingViewProps {
|
|
35
|
+
className?: string;
|
|
36
|
+
setting: cnst.Setting;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const General = ({ className, setting }: SettingViewProps) => {
|
|
40
|
+
const { l } = usePage();
|
|
41
|
+
return (
|
|
42
|
+
<div className={clsx(className, "mr-12")}>
|
|
43
|
+
<div>
|
|
44
|
+
{l("setting.resignupDays")}: {setting.resignupDays}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
`
|
|
50
|
+
};
|
|
51
|
+
}
|