@akanjs/cli 0.0.118 → 0.0.120
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 +45 -1
- 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 +45 -1
- 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/cloud/cloud.command.d.ts +1 -0
- package/src/cloud/cloud.runner.d.ts +1 -0
- package/src/cloud/cloud.script.d.ts +1 -0
- 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/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
|
}
|
|
@@ -2254,6 +2255,18 @@ var LibraryRunner = class {
|
|
|
2254
2255
|
return scanResult;
|
|
2255
2256
|
}
|
|
2256
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;
|
|
2257
2270
|
}
|
|
2258
2271
|
async removeLibrary(lib) {
|
|
2259
2272
|
await lib.workspace.exec(`rm -rf libs/${lib.name}`);
|
|
@@ -2349,7 +2362,8 @@ var LibraryScript = class {
|
|
|
2349
2362
|
await this.syncLibrary(LibExecutor.from(lib.workspace, libName), { recursive: false });
|
|
2350
2363
|
}
|
|
2351
2364
|
async createLibrary(libName, workspace) {
|
|
2352
|
-
await this.#runner.createLibrary(libName, workspace);
|
|
2365
|
+
const lib = await this.#runner.createLibrary(libName, workspace);
|
|
2366
|
+
await this.syncLibrary(lib);
|
|
2353
2367
|
}
|
|
2354
2368
|
async removeLibrary(lib) {
|
|
2355
2369
|
await this.#runner.removeLibrary(lib);
|
|
@@ -4961,6 +4975,26 @@ ${import_chalk4.default.green("\u27A4")} Authentication Required`));
|
|
|
4961
4975
|
);
|
|
4962
4976
|
Logger.info("All libraries are published to npm");
|
|
4963
4977
|
}
|
|
4978
|
+
async update(workspace) {
|
|
4979
|
+
const latestPublishedVersionOfBase = await (0, import_latest_version.default)("@akanjs/base");
|
|
4980
|
+
const rootPackageJson = workspace.readJson("package.json");
|
|
4981
|
+
if (!rootPackageJson.dependencies)
|
|
4982
|
+
throw new Error("No dependencies found in package.json");
|
|
4983
|
+
Object.keys(rootPackageJson.dependencies).forEach((dependency) => {
|
|
4984
|
+
if (dependency.startsWith("@akanjs/"))
|
|
4985
|
+
Object.assign(rootPackageJson.dependencies ?? {}, { [dependency]: latestPublishedVersionOfBase });
|
|
4986
|
+
});
|
|
4987
|
+
Object.keys(rootPackageJson.devDependencies ?? {}).forEach((dependency) => {
|
|
4988
|
+
if (dependency.startsWith("@akanjs/"))
|
|
4989
|
+
Object.assign(rootPackageJson.devDependencies ?? {}, { [dependency]: latestPublishedVersionOfBase });
|
|
4990
|
+
});
|
|
4991
|
+
workspace.writeJson("package.json", rootPackageJson);
|
|
4992
|
+
await Promise.all([
|
|
4993
|
+
workspace.spawn("npm", ["update", "-g", "@akanjs/cli", "--latest"]),
|
|
4994
|
+
workspace.spawn("pnpm", ["install"])
|
|
4995
|
+
]);
|
|
4996
|
+
Logger.info(`Akan.js is updated to the latest version ${latestPublishedVersionOfBase}`);
|
|
4997
|
+
}
|
|
4964
4998
|
};
|
|
4965
4999
|
|
|
4966
5000
|
// pkgs/@akanjs/cli/src/cloud/cloud.script.ts
|
|
@@ -4991,6 +5025,9 @@ var CloudScript = class {
|
|
|
4991
5025
|
);
|
|
4992
5026
|
await this.#runner.deployAkan(workspace, akanPkgs);
|
|
4993
5027
|
}
|
|
5028
|
+
async update(workspace) {
|
|
5029
|
+
await this.#runner.update(workspace);
|
|
5030
|
+
}
|
|
4994
5031
|
};
|
|
4995
5032
|
|
|
4996
5033
|
// pkgs/@akanjs/cli/src/cloud/cloud.command.ts
|
|
@@ -5014,6 +5051,9 @@ var CloudCommand = class {
|
|
|
5014
5051
|
async deployAkan(workspace) {
|
|
5015
5052
|
await this.cloudScript.deployAkan(workspace);
|
|
5016
5053
|
}
|
|
5054
|
+
async update(workspace) {
|
|
5055
|
+
await this.cloudScript.update(workspace);
|
|
5056
|
+
}
|
|
5017
5057
|
};
|
|
5018
5058
|
__decorateClass([
|
|
5019
5059
|
Target.Public()
|
|
@@ -5035,6 +5075,10 @@ __decorateClass([
|
|
|
5035
5075
|
Target.Public({ devOnly: true }),
|
|
5036
5076
|
__decorateParam(0, Workspace())
|
|
5037
5077
|
], CloudCommand.prototype, "deployAkan", 1);
|
|
5078
|
+
__decorateClass([
|
|
5079
|
+
Target.Public(),
|
|
5080
|
+
__decorateParam(0, Workspace())
|
|
5081
|
+
], CloudCommand.prototype, "update", 1);
|
|
5038
5082
|
CloudCommand = __decorateClass([
|
|
5039
5083
|
Commands()
|
|
5040
5084
|
], CloudCommand);
|
|
@@ -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
|
+
}
|