@akanjs/cli 0.0.42 → 0.0.44
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/index.js +126 -95
- package/package.json +1 -1
- package/src/templates/__scalar/__model__/__model__.constant.js +36 -0
- package/src/templates/__scalar/__model__/__model__.dictionary.js +47 -0
- package/src/templates/__scalar/__model__/__model__.document.js +34 -0
- package/src/templates/app/akan.config.ts.template +5 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +45 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +46 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +40 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +48 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +39 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +41 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +58 -0
- package/src/templates/app/app/[lang]/(__appName__)/layout.js +50 -0
- package/src/templates/app/app/[lang]/admin/layout.js +51 -0
- package/src/templates/app/app/[lang]/admin/page.js +61 -0
- package/src/templates/app/app/csr.js +32 -0
- package/src/templates/app/app/index.html.template +13 -0
- package/src/templates/app/app/layout.js +36 -0
- package/src/templates/app/app/robots.js +41 -0
- package/src/templates/app/app/sitemap.js +37 -0
- package/src/templates/app/base/baseLogic.js +36 -0
- package/src/templates/app/base/index.js +30 -0
- package/src/templates/app/capacitor.config.ts.template +8 -0
- package/src/templates/app/common/commonLogic.js +36 -0
- package/src/templates/app/common/index.js +30 -0
- package/src/templates/app/env/env.client.js +39 -0
- package/src/templates/app/env/env.client.type.js +36 -0
- package/src/templates/app/env/env.server.js +39 -0
- package/src/templates/app/jest.config.js +37 -0
- package/src/templates/app/lib/___appName__/__appName__.dictionary.js +32 -0
- package/src/templates/app/lib/___appName__/__appName__.service.js +43 -0
- package/src/templates/app/lib/___appName__/__appName__.store.js +37 -0
- package/src/templates/app/lib/___appName__/_server.js +35 -0
- package/src/templates/app/lib/option.js +43 -0
- package/src/templates/app/lib/setting/Setting.Template.js +55 -0
- package/src/templates/app/lib/setting/Setting.Unit.js +36 -0
- package/src/templates/app/lib/setting/Setting.Util.js +32 -0
- package/src/templates/app/lib/setting/Setting.View.js +49 -0
- package/src/templates/app/lib/setting/Setting.Zone.js +78 -0
- package/src/templates/app/lib/setting/_server.js +49 -0
- package/src/templates/app/lib/setting/index.js +59 -0
- package/src/templates/app/lib/setting/setting.constant.js +47 -0
- package/src/templates/app/lib/setting/setting.dictionary.js +47 -0
- package/src/templates/app/lib/setting/setting.document.js +49 -0
- package/src/templates/app/lib/setting/setting.service.js +38 -0
- package/src/templates/app/lib/setting/setting.signal.js +35 -0
- package/src/templates/app/lib/setting/setting.store.js +42 -0
- package/src/templates/app/lib/summary/Summary.Template.js +41 -0
- package/src/templates/app/lib/summary/Summary.Unit.js +36 -0
- package/src/templates/app/lib/summary/Summary.Util.js +31 -0
- package/src/templates/app/lib/summary/Summary.View.js +49 -0
- package/src/templates/app/lib/summary/Summary.Zone.js +60 -0
- package/src/templates/app/lib/summary/_server.js +49 -0
- package/src/templates/app/lib/summary/index.js +65 -0
- package/src/templates/app/lib/summary/summary.constant.js +45 -0
- package/src/templates/app/lib/summary/summary.dictionary.js +50 -0
- package/src/templates/app/lib/summary/summary.document.js +49 -0
- package/src/templates/app/lib/summary/summary.service.js +35 -0
- package/src/templates/app/lib/summary/summary.signal.js +35 -0
- package/src/templates/app/lib/summary/summary.store.js +42 -0
- package/src/templates/app/lib/user/User.Template.js +63 -0
- package/src/templates/app/lib/user/User.Unit.js +36 -0
- package/src/templates/app/lib/user/User.Util.js +92 -0
- package/src/templates/app/lib/user/User.View.js +64 -0
- package/src/templates/app/lib/user/User.Zone.js +72 -0
- package/src/templates/app/lib/user/_server.js +49 -0
- package/src/templates/app/lib/user/index.js +59 -0
- package/src/templates/app/lib/user/user.constant.js +68 -0
- package/src/templates/app/lib/user/user.dictionary.js +53 -0
- package/src/templates/app/lib/user/user.document.js +55 -0
- package/src/templates/app/lib/user/user.service.js +43 -0
- package/src/templates/app/lib/user/user.signal.js +35 -0
- package/src/templates/app/lib/user/user.signal.spec.js +38 -0
- package/src/templates/app/lib/user/user.signal.test.js +40 -0
- package/src/templates/app/lib/user/user.store.js +40 -0
- package/src/templates/app/main.js +41 -0
- package/src/templates/app/middleware.js +36 -0
- package/src/templates/app/nest/backendLogic.js +35 -0
- package/src/templates/app/nest/index.js +30 -0
- package/src/templates/app/next/frontendLogic.js +35 -0
- package/src/templates/app/next/index.js +30 -0
- package/src/templates/app/page.test.ts.template +10 -0
- package/src/templates/app/playwright.config.ts.template +6 -0
- package/src/templates/app/postcss.config.js.template +10 -0
- package/src/templates/app/public/favicon.ico +0 -0
- package/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/src/templates/app/public/logo.svg +70 -0
- package/src/templates/app/public/manifest.json.template +67 -0
- package/src/templates/app/tsconfig.json.template +22 -0
- package/src/templates/app/tsconfig.spec.json.template +7 -0
- package/src/templates/app/ui/Footer.js +65 -0
- package/src/templates/app/ui/MainHeader.js +129 -0
- package/src/templates/app/ui/index.js +31 -0
- package/src/templates/client.js +43 -0
- package/src/templates/crudPages/[__model__Id]/edit/page.js +71 -0
- package/src/templates/crudPages/[__model__Id]/page.js +81 -0
- package/src/templates/crudPages/new/page.js +68 -0
- package/src/templates/crudPages/page.js +69 -0
- package/src/templates/index.js +32 -0
- package/src/templates/lib/__lib/extends/summary.constant.js +44 -0
- package/src/templates/lib/__lib/lib.constant.js +54 -0
- package/src/templates/lib/__lib/lib.dictionary.js +43 -0
- package/src/templates/lib/__lib/lib.document.js +42 -0
- package/src/templates/lib/__lib/lib.service.js +84 -0
- package/src/templates/lib/__lib/lib.signal.js +37 -0
- package/src/templates/lib/__lib/lib.store.js +35 -0
- package/src/templates/lib/__scalar/_server.js +40 -0
- package/src/templates/lib/cnst.js +33 -0
- package/src/templates/lib/cnst_.js +52 -0
- package/src/templates/lib/db.js +54 -0
- package/src/templates/lib/dict.js +46 -0
- package/src/templates/lib/fetch.js +49 -0
- package/src/templates/lib/sig.js +38 -0
- package/src/templates/lib/srv.js +53 -0
- package/src/templates/lib/st.js +37 -0
- package/src/templates/lib/store.js +53 -0
- package/src/templates/lib/usePage.js +34 -0
- package/src/templates/libRoot/.gitignore.template +15 -0
- package/src/templates/libRoot/jest.config.js +37 -0
- package/src/templates/libRoot/package.json.template +5 -0
- package/src/templates/libRoot/tsconfig.json.template +11 -0
- package/src/templates/libRoot/tsconfig.spec.json.template +7 -0
- package/src/templates/module/__Model__.Template.js +52 -0
- package/src/templates/module/__Model__.Unit.js +40 -0
- package/src/templates/module/__Model__.Util.js +68 -0
- package/src/templates/module/__Model__.View.js +46 -0
- package/src/templates/module/__Model__.Zone.js +81 -0
- package/src/templates/module/__model__.constant.js +70 -0
- package/src/templates/module/__model__.dictionary.js +99 -0
- package/src/templates/module/__model__.document.js +54 -0
- package/src/templates/module/__model__.service.js +42 -0
- package/src/templates/module/__model__.signal.js +61 -0
- package/src/templates/module/__model__.signal.spec.js +40 -0
- package/src/templates/module/__model__.signal.test.js +49 -0
- package/src/templates/module/__model__.store.js +40 -0
- package/src/templates/module/_server.js +48 -0
- package/src/templates/module/index.js +59 -0
- package/src/templates/pkgRoot/tsconfig.json.template +12 -0
- package/src/templates/server.js +60 -0
- package/src/templates/workplaceRoot/.env.template +20 -0
- package/src/templates/workplaceRoot/.gitignore.template +195 -0
- package/src/templates/workplaceRoot/.prettierignore.template +10 -0
- package/src/templates/workplaceRoot/.prettierrc.json.template +5 -0
- package/src/templates/workplaceRoot/.swcrc.template +9 -0
- package/src/templates/workplaceRoot/README.md.template +37 -0
- package/src/templates/workplaceRoot/eslint.config.js.template +141 -0
- package/src/templates/workplaceRoot/tsconfig.json.template +29 -0
|
@@ -0,0 +1,45 @@
|
|
|
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/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict = {}) {
|
|
26
|
+
return `
|
|
27
|
+
import { Image, Link } from "@util/ui";
|
|
28
|
+
import { User } from "@shared/client";
|
|
29
|
+
|
|
30
|
+
export default function Page() {
|
|
31
|
+
return (
|
|
32
|
+
<div className="relative w-full h-screen overflow-hidden flex items-center justify-center">
|
|
33
|
+
<div className="z-10 md:w-[400px] px-12 pt-12 pb-4 shadow-lg rounded-xl bg-base-100/50 backdrop-blur-xs">
|
|
34
|
+
<User.Util.ForgotPassword />
|
|
35
|
+
<Link.Back className="text-center">
|
|
36
|
+
<button className="mt-2 underline btn btn-ghost">Back</button>
|
|
37
|
+
</Link.Back>
|
|
38
|
+
</div>
|
|
39
|
+
<Image className="absolute left-0 right-0 top-0 bottom-0 -z-50" width={1920} height={1080} src="/back.jpg" />
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,46 @@
|
|
|
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/app/app/[lang]/(__appName__)/(public)/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Image, Link } from "@util/ui";
|
|
28
|
+
import { getSelf } from "@akanjs/client";
|
|
29
|
+
|
|
30
|
+
export default function Page() {
|
|
31
|
+
const self = getSelf();
|
|
32
|
+
return (
|
|
33
|
+
<div className="relative w-full h-screen overflow-hidden flex items-center justify-center">
|
|
34
|
+
<div className="max-w-md bg-base-100/50 shadow-lg rounded-xl backdrop-blur-xs w-full py-8 px-16 flex flex-col items-center justify-center gap-3">
|
|
35
|
+
<h1 className="text-4xl mt-2">${dict.appName}</h1>
|
|
36
|
+
<h2 className="text-lg">${dict.appName} description</h2>
|
|
37
|
+
<Link className="w-full" href={self ? "/self" : "/signin"}>
|
|
38
|
+
<button className="btn w-full btn-primary">Go to dashboard</button>
|
|
39
|
+
</Link>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,40 @@
|
|
|
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/app/app/[lang]/(__appName__)/(public)/privacy/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Inform } from "@util/ui";
|
|
28
|
+
|
|
29
|
+
export default function Page() {
|
|
30
|
+
return (
|
|
31
|
+
<div className="container whitespace-pre-wrap">
|
|
32
|
+
<h1 className="flex justify-center">Privacy Policy</h1>
|
|
33
|
+
<Inform.PrivacyPolicy companyName="${dict.CompanyName}" />
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,48 @@
|
|
|
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/app/app/[lang]/(__appName__)/(public)/signin/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Image } from "@util/ui";
|
|
28
|
+
import { User } from "@shared/client";
|
|
29
|
+
import { getSelf, router } from "@akanjs/client";
|
|
30
|
+
|
|
31
|
+
export default function Page() {
|
|
32
|
+
const self = getSelf();
|
|
33
|
+
return (
|
|
34
|
+
<div className="relative w-full h-screen overflow-hidden flex items-center justify-center">
|
|
35
|
+
<div className="max-w-md bg-base-100/50 shadow-lg rounded-xl backdrop-blur-xs w-full py-4 pb-10 px-16">
|
|
36
|
+
<div className="my-6 flex justify-center text-4xl">${dict.appName}</div>
|
|
37
|
+
<User.Util.SignInPassword
|
|
38
|
+
siteKey=""
|
|
39
|
+
redirect="/self"
|
|
40
|
+
signupHref={null}
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,39 @@
|
|
|
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/app/app/[lang]/(__appName__)/(public)/termsofservice/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Inform } from "@util/ui";
|
|
28
|
+
|
|
29
|
+
export default function Page() {
|
|
30
|
+
return (
|
|
31
|
+
<div className="container">
|
|
32
|
+
<h1 className="flex justify-center">Terms of Service</h1>
|
|
33
|
+
<Inform.ServicePolicy companyName="${dict.CompanyName}" serviceName="${dict.AppName}" />
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,41 @@
|
|
|
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/app/app/[lang]/(__appName__)/(user)/layout.tsx
|
|
20
|
+
var layout_exports = {};
|
|
21
|
+
__export(layout_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(layout_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { Footer } from "@${dict.appName}/ui";
|
|
28
|
+
import { getSelf } from "@akanjs/client";
|
|
29
|
+
|
|
30
|
+
export default function Layout({ children }: any) {
|
|
31
|
+
getSelf({ unauthorize: "/signin" });
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<div className="w-full min-h-screen pt-20 px-2 container flex flex-col gap-2">{children}</div>
|
|
35
|
+
<Footer />
|
|
36
|
+
</>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,58 @@
|
|
|
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/app/app/[lang]/(__appName__)/(user)/self/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { User as SharedUser } from "@shared/client";
|
|
28
|
+
import { MainHeader } from "@${dict.appName}/ui";
|
|
29
|
+
import { User } from "@${dict.appName}/client";
|
|
30
|
+
import { getSelf } from "@akanjs/client";
|
|
31
|
+
|
|
32
|
+
export default function Page() {
|
|
33
|
+
const self = getSelf({ unauthorize: "/signin" });
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<MainHeader items={[{ type: "self", name: "profile" }]} />
|
|
37
|
+
<div className="flex items-center gap-2">
|
|
38
|
+
<div className="text-2xl">My Profile</div>
|
|
39
|
+
<User.Util.EditSelf />
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<User.Zone.Self />
|
|
43
|
+
</div>
|
|
44
|
+
<div>
|
|
45
|
+
<div className="font-bold">Password</div>
|
|
46
|
+
<div>
|
|
47
|
+
*******
|
|
48
|
+
<span>
|
|
49
|
+
<SharedUser.Util.SetPasswordWithPhone />
|
|
50
|
+
</span>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,50 @@
|
|
|
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/app/app/[lang]/(__appName__)/layout.tsx
|
|
20
|
+
var layout_exports = {};
|
|
21
|
+
__export(layout_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(layout_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { System } from "@shared/ui";
|
|
28
|
+
import { env } from "@${dict.appName}/env/env.client";
|
|
29
|
+
import { fetch } from "@${dict.appName}/client";
|
|
30
|
+
|
|
31
|
+
export const metadata = { title: "${dict.appName}" };
|
|
32
|
+
|
|
33
|
+
export default function Layout({ children, params }: RootLayoutProps) {
|
|
34
|
+
return (
|
|
35
|
+
<System.Provider
|
|
36
|
+
of={Layout}
|
|
37
|
+
appName="${dict.appName}"
|
|
38
|
+
params={params}
|
|
39
|
+
head={<link rel="icon" href="/favicon.ico" />}
|
|
40
|
+
// className="bg-base-100"
|
|
41
|
+
env={env}
|
|
42
|
+
fetch={fetch}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</System.Provider>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
module.exports = module.exports.default;
|
|
@@ -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/app/app/[lang]/admin/layout.tsx
|
|
20
|
+
var layout_exports = {};
|
|
21
|
+
__export(layout_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(layout_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { System } from "@shared/ui";
|
|
28
|
+
import { env } from "@${dict.appName}/env/env.client";
|
|
29
|
+
import { fetch } from "@${dict.appName}/client";
|
|
30
|
+
import type { RootLayoutProps } from "@akanjs/client";
|
|
31
|
+
|
|
32
|
+
export const metadata = { title: "${dict.appName}" };
|
|
33
|
+
|
|
34
|
+
export default function Layout({ children, params }: RootLayoutProps) {
|
|
35
|
+
return (
|
|
36
|
+
<System.Provider
|
|
37
|
+
of={Layout}
|
|
38
|
+
appName="${dict.appName}"
|
|
39
|
+
params={params}
|
|
40
|
+
head={<link rel="icon" href="/favicon.ico" />}
|
|
41
|
+
// className="bg-base-100"
|
|
42
|
+
env={env}
|
|
43
|
+
fetch={fetch}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</System.Provider>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,61 @@
|
|
|
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/app/app/[lang]/admin/page.tsx
|
|
20
|
+
var page_exports = {};
|
|
21
|
+
__export(page_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(page_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
"use client";
|
|
28
|
+
import { Admin } from "@shared/client";
|
|
29
|
+
import { User, st } from "@${dict.appName}/client";
|
|
30
|
+
|
|
31
|
+
export default function Page() {
|
|
32
|
+
const me = st.use.me();
|
|
33
|
+
return (
|
|
34
|
+
<Admin.Zone.Layout
|
|
35
|
+
password
|
|
36
|
+
// ssoTypes={["google"]}
|
|
37
|
+
logo={<div className="text-white ">${dict.appName}</div>}
|
|
38
|
+
pageMenus={[
|
|
39
|
+
{
|
|
40
|
+
key: "data",
|
|
41
|
+
title: "Data",
|
|
42
|
+
menus: [
|
|
43
|
+
Admin.Menu.Admin,
|
|
44
|
+
User.Menu.Admin,
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "api",
|
|
49
|
+
title: "API Doc",
|
|
50
|
+
menus: [
|
|
51
|
+
Admin.Menu.Doc,
|
|
52
|
+
User.Menu.Doc,
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,32 @@
|
|
|
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/app/app/csr.tsx
|
|
20
|
+
var csr_exports = {};
|
|
21
|
+
__export(csr_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(csr_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { bootCsr } from "@akanjs/next";
|
|
28
|
+
|
|
29
|
+
void bootCsr(import.meta.glob("./**/*.tsx"), "./[lang]/${dict.appName}/layout.tsx");
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>CSR</title>
|
|
6
|
+
<base href="/" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/csr.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -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/app/app/layout.tsx
|
|
20
|
+
var layout_exports = {};
|
|
21
|
+
__export(layout_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(layout_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
"use client";
|
|
28
|
+
import { st } from "@${dict.appName}/client";
|
|
29
|
+
import { System } from "@shared/ui";
|
|
30
|
+
|
|
31
|
+
export default function Layout({ children }) {
|
|
32
|
+
return <System.Root st={st}>{children}</System.Root>;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,41 @@
|
|
|
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/app/app/robots.ts
|
|
20
|
+
var robots_exports = {};
|
|
21
|
+
__export(robots_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(robots_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { MetadataRoute } from "next";
|
|
28
|
+
import { env } from "@${dict.appName}/env/env.client";
|
|
29
|
+
export default function robots(): MetadataRoute.Robots {
|
|
30
|
+
return {
|
|
31
|
+
rules: {
|
|
32
|
+
userAgent: "*",
|
|
33
|
+
allow: "/",
|
|
34
|
+
disallow: "/admin/",
|
|
35
|
+
},
|
|
36
|
+
sitemap: \`\${env.clientHttpUri}/sitemap.xml\`,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
module.exports = module.exports.default;
|
|
@@ -0,0 +1,37 @@
|
|
|
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/app/app/sitemap.ts
|
|
20
|
+
var sitemap_exports = {};
|
|
21
|
+
__export(sitemap_exports, {
|
|
22
|
+
default: () => getContent
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(sitemap_exports);
|
|
25
|
+
function getContent(scanResult, dict) {
|
|
26
|
+
return `
|
|
27
|
+
import { MetadataRoute } from "next";
|
|
28
|
+
import { env } from "@${dict.appName}/env/env.client";
|
|
29
|
+
export default function sitemap(): MetadataRoute.Sitemap {
|
|
30
|
+
return [
|
|
31
|
+
{ url: \`\${env.clientHttpUri}\`, lastModified: new Date() },
|
|
32
|
+
//
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
module.exports = module.exports.default;
|