@akanjs/cli 0.0.39 → 0.0.41
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.d.ts +1 -0
- package/index.js +75 -59
- package/package.json +2 -1
- package/src/application/application.command.d.ts +26 -0
- package/src/application/application.prompt.d.ts +2 -0
- package/src/application/application.runner.d.ts +35 -0
- package/src/application/application.script.d.ts +36 -0
- package/src/cloud/cloud.command.d.ts +8 -0
- package/src/cloud/cloud.runner.d.ts +7 -0
- package/src/cloud/cloud.script.d.ts +7 -0
- package/src/library/library.command.d.ts +8 -0
- package/src/library/library.runner.d.ts +4 -0
- package/src/library/library.script.d.ts +8 -0
- package/src/module/module.command.d.ts +13 -0
- package/src/module/module.prompt.d.ts +15 -0
- package/src/module/module.runner.d.ts +17 -0
- package/src/module/module.script.d.ts +11 -0
- package/src/package/package.command.d.ts +9 -0
- package/src/package/package.runner.d.ts +6 -0
- package/src/package/package.script.d.ts +7 -0
- package/src/package/page/page.command.d.ts +6 -0
- package/src/package/page/page.runner.d.ts +4 -0
- package/src/package/page/page.script.d.ts +5 -0
- package/src/workspace/workspace.command.d.ts +8 -0
- package/src/workspace/workspace.runner.d.ts +6 -0
- package/src/workspace/workspace.script.d.ts +7 -0
- package/templates/__scalar/__model__/__model__.constant.js +0 -34
- package/templates/__scalar/__model__/__model__.dictionary.js +0 -45
- package/templates/__scalar/__model__/__model__.document.js +0 -32
- package/templates/app/akan.config.ts.template +0 -5
- package/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -43
- package/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -44
- package/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -38
- package/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -46
- package/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -37
- package/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -39
- package/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -56
- package/templates/app/app/[lang]/(__appName__)/layout.js +0 -48
- package/templates/app/app/[lang]/admin/layout.js +0 -49
- package/templates/app/app/[lang]/admin/page.js +0 -59
- package/templates/app/app/csr.js +0 -30
- package/templates/app/app/index.html.template +0 -13
- package/templates/app/app/layout.js +0 -34
- package/templates/app/app/robots.js +0 -39
- package/templates/app/app/sitemap.js +0 -35
- package/templates/app/base/baseLogic.js +0 -34
- package/templates/app/base/index.js +0 -28
- package/templates/app/capacitor.config.ts.template +0 -8
- package/templates/app/common/commonLogic.js +0 -34
- package/templates/app/common/index.js +0 -28
- package/templates/app/env/env.client.js +0 -37
- package/templates/app/env/env.client.type.js +0 -34
- package/templates/app/env/env.server.js +0 -37
- package/templates/app/jest.config.js +0 -35
- package/templates/app/lib/___appName__/__appName__.dictionary.js +0 -30
- package/templates/app/lib/___appName__/__appName__.service.js +0 -41
- package/templates/app/lib/___appName__/__appName__.store.js +0 -35
- package/templates/app/lib/___appName__/_server.js +0 -33
- package/templates/app/lib/option.js +0 -41
- package/templates/app/lib/setting/Setting.Template.js +0 -53
- package/templates/app/lib/setting/Setting.Unit.js +0 -34
- package/templates/app/lib/setting/Setting.Util.js +0 -30
- package/templates/app/lib/setting/Setting.View.js +0 -47
- package/templates/app/lib/setting/Setting.Zone.js +0 -76
- package/templates/app/lib/setting/_server.js +0 -47
- package/templates/app/lib/setting/index.js +0 -57
- package/templates/app/lib/setting/setting.constant.js +0 -45
- package/templates/app/lib/setting/setting.dictionary.js +0 -45
- package/templates/app/lib/setting/setting.document.js +0 -47
- package/templates/app/lib/setting/setting.service.js +0 -36
- package/templates/app/lib/setting/setting.signal.js +0 -33
- package/templates/app/lib/setting/setting.store.js +0 -40
- package/templates/app/lib/summary/Summary.Template.js +0 -39
- package/templates/app/lib/summary/Summary.Unit.js +0 -34
- package/templates/app/lib/summary/Summary.Util.js +0 -29
- package/templates/app/lib/summary/Summary.View.js +0 -47
- package/templates/app/lib/summary/Summary.Zone.js +0 -58
- package/templates/app/lib/summary/_server.js +0 -47
- package/templates/app/lib/summary/index.js +0 -63
- package/templates/app/lib/summary/summary.constant.js +0 -43
- package/templates/app/lib/summary/summary.dictionary.js +0 -48
- package/templates/app/lib/summary/summary.document.js +0 -47
- package/templates/app/lib/summary/summary.service.js +0 -33
- package/templates/app/lib/summary/summary.signal.js +0 -33
- package/templates/app/lib/summary/summary.store.js +0 -40
- package/templates/app/lib/user/User.Template.js +0 -61
- package/templates/app/lib/user/User.Unit.js +0 -34
- package/templates/app/lib/user/User.Util.js +0 -90
- package/templates/app/lib/user/User.View.js +0 -62
- package/templates/app/lib/user/User.Zone.js +0 -70
- package/templates/app/lib/user/_server.js +0 -47
- package/templates/app/lib/user/index.js +0 -57
- package/templates/app/lib/user/user.constant.js +0 -66
- package/templates/app/lib/user/user.dictionary.js +0 -51
- package/templates/app/lib/user/user.document.js +0 -53
- package/templates/app/lib/user/user.service.js +0 -41
- package/templates/app/lib/user/user.signal.js +0 -33
- package/templates/app/lib/user/user.signal.spec.js +0 -36
- package/templates/app/lib/user/user.signal.test.js +0 -38
- package/templates/app/lib/user/user.store.js +0 -38
- package/templates/app/main.js +0 -39
- package/templates/app/middleware.js +0 -34
- package/templates/app/nest/backendLogic.js +0 -33
- package/templates/app/nest/index.js +0 -28
- package/templates/app/next/frontendLogic.js +0 -33
- package/templates/app/next/index.js +0 -28
- package/templates/app/page.test.ts.template +0 -10
- package/templates/app/playwright.config.ts.template +0 -6
- package/templates/app/postcss.config.js.template +0 -10
- package/templates/app/public/favicon.ico +0 -0
- package/templates/app/public/icons/icon-128x128.png +0 -0
- package/templates/app/public/icons/icon-144x144.png +0 -0
- package/templates/app/public/icons/icon-152x152.png +0 -0
- package/templates/app/public/icons/icon-192x192.png +0 -0
- package/templates/app/public/icons/icon-256x256.png +0 -0
- package/templates/app/public/icons/icon-384x384.png +0 -0
- package/templates/app/public/icons/icon-48x48.png +0 -0
- package/templates/app/public/icons/icon-512x512.png +0 -0
- package/templates/app/public/icons/icon-72x72.png +0 -0
- package/templates/app/public/icons/icon-96x96.png +0 -0
- package/templates/app/public/logo.svg +0 -70
- package/templates/app/public/manifest.json.template +0 -67
- package/templates/app/tsconfig.json.template +0 -22
- package/templates/app/tsconfig.spec.json.template +0 -7
- package/templates/app/ui/Footer.js +0 -63
- package/templates/app/ui/MainHeader.js +0 -127
- package/templates/app/ui/index.js +0 -29
- package/templates/client.js +0 -41
- package/templates/crudPages/[__model__Id]/edit/page.js +0 -69
- package/templates/crudPages/[__model__Id]/page.js +0 -79
- package/templates/crudPages/new/page.js +0 -66
- package/templates/crudPages/page.js +0 -67
- package/templates/index.js +0 -30
- package/templates/lib/__lib/extends/summary.constant.js +0 -42
- package/templates/lib/__lib/lib.constant.js +0 -52
- package/templates/lib/__lib/lib.dictionary.js +0 -41
- package/templates/lib/__lib/lib.document.js +0 -40
- package/templates/lib/__lib/lib.service.js +0 -82
- package/templates/lib/__lib/lib.signal.js +0 -35
- package/templates/lib/__lib/lib.store.js +0 -33
- package/templates/lib/__scalar/_server.js +0 -38
- package/templates/lib/cnst.js +0 -31
- package/templates/lib/cnst_.js +0 -50
- package/templates/lib/db.js +0 -52
- package/templates/lib/dict.js +0 -44
- package/templates/lib/fetch.js +0 -47
- package/templates/lib/sig.js +0 -36
- package/templates/lib/srv.js +0 -51
- package/templates/lib/st.js +0 -35
- package/templates/lib/store.js +0 -51
- package/templates/lib/usePage.js +0 -32
- package/templates/libRoot/.gitignore.template +0 -15
- package/templates/libRoot/jest.config.js +0 -35
- package/templates/libRoot/package.json.template +0 -5
- package/templates/libRoot/tsconfig.json.template +0 -11
- package/templates/libRoot/tsconfig.spec.json.template +0 -7
- package/templates/module/__Model__.Template.js +0 -50
- package/templates/module/__Model__.Unit.js +0 -38
- package/templates/module/__Model__.Util.js +0 -66
- package/templates/module/__Model__.View.js +0 -44
- package/templates/module/__Model__.Zone.js +0 -79
- package/templates/module/__model__.constant.js +0 -68
- package/templates/module/__model__.dictionary.js +0 -97
- package/templates/module/__model__.document.js +0 -52
- package/templates/module/__model__.service.js +0 -40
- package/templates/module/__model__.signal.js +0 -59
- package/templates/module/__model__.signal.spec.js +0 -38
- package/templates/module/__model__.signal.test.js +0 -47
- package/templates/module/__model__.store.js +0 -38
- package/templates/module/_server.js +0 -46
- package/templates/module/index.js +0 -57
- package/templates/pkgRoot/tsconfig.json.template +0 -12
- package/templates/server.js +0 -58
- package/templates/workplaceRoot/.env.template +0 -20
- package/templates/workplaceRoot/.gitignore.template +0 -195
- package/templates/workplaceRoot/.prettierignore.template +0 -10
- package/templates/workplaceRoot/.prettierrc.json.template +0 -5
- package/templates/workplaceRoot/.swcrc.template +0 -9
- package/templates/workplaceRoot/README.md.template +0 -37
- package/templates/workplaceRoot/eslint.config.js.template +0 -141
- package/templates/workplaceRoot/tsconfig.json.template +0 -29
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
var model_signal_test_exports = {};
|
|
19
|
-
__export(model_signal_test_exports, {
|
|
20
|
-
default: () => getContent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(model_signal_test_exports);
|
|
23
|
-
function getContent(scanResult, dict) {
|
|
24
|
-
return `
|
|
25
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
26
|
-
import * as userSpec from "@${dict.appName}/lib/user/user.signal.spec";
|
|
27
|
-
import * as ${dict.model}Spec from "@${dict.appName}/lib/${dict.model}/${dict.model}.signal.spec";
|
|
28
|
-
import { cnst } from "../cnst";
|
|
29
|
-
import { fetch } from "../fetch";
|
|
30
|
-
|
|
31
|
-
describe("${dict.Model} Signal", () => {
|
|
32
|
-
describe("${dict.Model} Service", () => {
|
|
33
|
-
let adminAgent: userSpec.AdminAgent;
|
|
34
|
-
let userAgent: userSpec.UserAgent;
|
|
35
|
-
let ${dict.model}: cnst.${dict.Model};
|
|
36
|
-
beforeAll(async () => {
|
|
37
|
-
// adminAgent = await adminSpec.getAdminAgentWithInitialize();
|
|
38
|
-
// userAgent = await userSpec.getUserAgentWithPhone();
|
|
39
|
-
});
|
|
40
|
-
it("can create ${dict.model}", async () => {
|
|
41
|
-
// ${dict.model} = await ${dict.model}Spec.create${dict.Model}(adminAgent, userAgent);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
`;
|
|
46
|
-
}
|
|
47
|
-
module.exports = module.exports.default;
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
var model_store_exports = {};
|
|
19
|
-
__export(model_store_exports, {
|
|
20
|
-
default: () => getContent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(model_store_exports);
|
|
23
|
-
function getContent(scanResult, dict) {
|
|
24
|
-
return `
|
|
25
|
-
import { stateOf, Store } from "@akanjs/store";
|
|
26
|
-
|
|
27
|
-
import { cnst } from "../cnst";
|
|
28
|
-
import { fetch } from "../fetch";
|
|
29
|
-
|
|
30
|
-
@Store(() => cnst.${dict.Model})
|
|
31
|
-
export class ${dict.Model}Store extends stateOf(fetch.${dict.model}Gql, {
|
|
32
|
-
// state
|
|
33
|
-
}) {
|
|
34
|
-
// action
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
}
|
|
38
|
-
module.exports = module.exports.default;
|
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
var server_exports = {};
|
|
19
|
-
__export(server_exports, {
|
|
20
|
-
default: () => getContent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(server_exports);
|
|
23
|
-
function getContent(scanResult, dict) {
|
|
24
|
-
return `
|
|
25
|
-
import { databaseModuleOf } from "@akanjs/server";
|
|
26
|
-
|
|
27
|
-
import * as db from "../db";
|
|
28
|
-
import type { ModulesOptions } from "../option";
|
|
29
|
-
import { ${dict.Model}Service } from "./${dict.model}.service";
|
|
30
|
-
import { ${dict.Model}Signal } from "./${dict.model}.signal";
|
|
31
|
-
import { allSrvs } from "../srv";
|
|
32
|
-
import { cnst } from "../cnst";
|
|
33
|
-
|
|
34
|
-
export const register${dict.Model}Module = (option: ModulesOptions) =>
|
|
35
|
-
databaseModuleOf(
|
|
36
|
-
{
|
|
37
|
-
constant: cnst.${dict.Model}Cnst,
|
|
38
|
-
database: db.${dict.Model}Db,
|
|
39
|
-
signal: ${dict.Model}Signal,
|
|
40
|
-
service: ${dict.Model}Service,
|
|
41
|
-
},
|
|
42
|
-
allSrvs
|
|
43
|
-
);
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
module.exports = module.exports.default;
|
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
var module_exports = {};
|
|
19
|
-
__export(module_exports, {
|
|
20
|
-
default: () => getContent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(module_exports);
|
|
23
|
-
function getContent(scanResult, dict) {
|
|
24
|
-
return `
|
|
25
|
-
import { Signal } from "@util/ui";
|
|
26
|
-
import { AiOutlineDatabase } from "react-icons/ai";
|
|
27
|
-
|
|
28
|
-
import * as Template from "./${dict.Model}.Template";
|
|
29
|
-
import * as Unit from "./${dict.Model}.Unit";
|
|
30
|
-
import * as Util from "./${dict.Model}.Util";
|
|
31
|
-
import * as View from "./${dict.Model}.View";
|
|
32
|
-
import * as Zone from "./${dict.Model}.Zone";
|
|
33
|
-
|
|
34
|
-
export const ${dict.Model} = {
|
|
35
|
-
Menu: {
|
|
36
|
-
Admin: {
|
|
37
|
-
key: "${dict.model}",
|
|
38
|
-
label: "${dict.Model}",
|
|
39
|
-
icon: <AiOutlineDatabase />,
|
|
40
|
-
render: () => <Zone.Admin />,
|
|
41
|
-
},
|
|
42
|
-
Doc: {
|
|
43
|
-
key: "${dict.model}",
|
|
44
|
-
label: "${dict.Model}",
|
|
45
|
-
icon: <AiOutlineDatabase />,
|
|
46
|
-
render: () => <Signal.Doc.Zone refName="${dict.model}" />,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
Template,
|
|
50
|
-
Unit,
|
|
51
|
-
Util,
|
|
52
|
-
View,
|
|
53
|
-
Zone,
|
|
54
|
-
};
|
|
55
|
-
`;
|
|
56
|
-
}
|
|
57
|
-
module.exports = module.exports.default;
|
package/templates/server.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
var server_exports = {};
|
|
19
|
-
__export(server_exports, {
|
|
20
|
-
default: () => getContent
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(server_exports);
|
|
23
|
-
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
24
|
-
function getContent(scanResult, dict = {}) {
|
|
25
|
-
if (!scanResult)
|
|
26
|
-
return null;
|
|
27
|
-
const libs = scanResult.akanConfig.libs;
|
|
28
|
-
const databaseModules = scanResult.files.services.databases;
|
|
29
|
-
const serviceModules = scanResult.files.services.services;
|
|
30
|
-
return `
|
|
31
|
-
import type { Module } from "@akanjs/server";
|
|
32
|
-
${libs.map((lib) => `import { registerModules as register${capitalize(lib)}Modules } from "@${lib}/server";`).join("\n")}
|
|
33
|
-
|
|
34
|
-
import { registerScalarModule } from "./lib/__scalar/_server";
|
|
35
|
-
${serviceModules.map((module2) => `import { register${capitalize(module2)}Module } from "./lib/_${module2}/_server";`).join("\n")}
|
|
36
|
-
${databaseModules.map((module2) => `import { register${capitalize(module2)}Module } from "./lib/${module2}/_server";`).join("\n")}
|
|
37
|
-
import { type ModulesOptions, registerGlobalModule } from "./lib/option";
|
|
38
|
-
|
|
39
|
-
export const registerModules = (options: ModulesOptions, isChild?: boolean) => {
|
|
40
|
-
const modules = [
|
|
41
|
-
${libs.map((lib) => ` ...(!isChild ? register${capitalize(lib)}Modules(options, true) : []),`).join("\n")}
|
|
42
|
-
registerGlobalModule(options),
|
|
43
|
-
registerScalarModule(options),
|
|
44
|
-
${serviceModules.map((module2) => ` register${capitalize(module2)}Module(options),`).join("\n")}
|
|
45
|
-
${databaseModules.map((module2) => ` register${capitalize(module2)}Module(options),`).join("\n")}
|
|
46
|
-
] as Module[];
|
|
47
|
-
return modules;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { env } from "./env/env.server.testing";
|
|
51
|
-
export * as db from "./lib/db";
|
|
52
|
-
export * as srv from "./lib/srv";
|
|
53
|
-
export * as option from "./lib/option";
|
|
54
|
-
export { cnst } from "./lib/cnst";
|
|
55
|
-
export { fetch } from "./lib/fetch";
|
|
56
|
-
`;
|
|
57
|
-
}
|
|
58
|
-
module.exports = module.exports.default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# organization configuration, no need to change
|
|
2
|
-
NEXT_PUBLIC_REPO_NAME=<%= repoName %>
|
|
3
|
-
NEXT_PUBLIC_SERVE_DOMAIN="<%= serveDomain %>"
|
|
4
|
-
|
|
5
|
-
# development branch, debug, develop, main, etc. mainly it changes databases.
|
|
6
|
-
NEXT_PUBLIC_ENV=debug
|
|
7
|
-
|
|
8
|
-
# local, cloud, edge it changes the connection point of the clients.
|
|
9
|
-
NEXT_PUBLIC_OPERATION_MODE=local
|
|
10
|
-
# hybrid app specific config, will be depreciated in the future
|
|
11
|
-
APP_OPERATION_MODE=local
|
|
12
|
-
|
|
13
|
-
# backend service mode, federation, batch, all
|
|
14
|
-
SERVER_MODE=federation
|
|
15
|
-
|
|
16
|
-
# analyze the bundle size
|
|
17
|
-
ANALYZE=false
|
|
18
|
-
|
|
19
|
-
# log level, debug, info, warn, error
|
|
20
|
-
NEXT_PUBLIC_LOG_LEVEL=debug
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# compiled output
|
|
4
|
-
**/dist
|
|
5
|
-
/tmp
|
|
6
|
-
/out-tsc
|
|
7
|
-
|
|
8
|
-
# dependencies
|
|
9
|
-
/node_modules
|
|
10
|
-
package-lock.json
|
|
11
|
-
/.yarn
|
|
12
|
-
yarn.lock
|
|
13
|
-
.pnp.cjs
|
|
14
|
-
.pnp.loader.mjs
|
|
15
|
-
/.nx
|
|
16
|
-
|
|
17
|
-
# IDEs and editors
|
|
18
|
-
/.idea
|
|
19
|
-
.project
|
|
20
|
-
.classpath
|
|
21
|
-
.c9/
|
|
22
|
-
*.launch
|
|
23
|
-
.settings/
|
|
24
|
-
*.sublime-workspace
|
|
25
|
-
|
|
26
|
-
# IDE - VSCode
|
|
27
|
-
.vscode/*
|
|
28
|
-
!.vscode/settings.json
|
|
29
|
-
!.vscode/tasks.json
|
|
30
|
-
!.vscode/launch.json
|
|
31
|
-
!.vscode/extensions.json
|
|
32
|
-
|
|
33
|
-
# misc
|
|
34
|
-
/.sass-cache
|
|
35
|
-
/connect.lock
|
|
36
|
-
/coverage
|
|
37
|
-
/libpeerconnection.log
|
|
38
|
-
npm-debug.log
|
|
39
|
-
yarn-error.log
|
|
40
|
-
testem.log
|
|
41
|
-
/typings
|
|
42
|
-
|
|
43
|
-
# System Files
|
|
44
|
-
.DS_Store
|
|
45
|
-
Thumbs.db
|
|
46
|
-
|
|
47
|
-
# Environment
|
|
48
|
-
*.env
|
|
49
|
-
tokens
|
|
50
|
-
**/build
|
|
51
|
-
**/node_modules
|
|
52
|
-
/data
|
|
53
|
-
apps/*/data
|
|
54
|
-
/secure
|
|
55
|
-
/releases
|
|
56
|
-
/src
|
|
57
|
-
schema.gql
|
|
58
|
-
**/script.js
|
|
59
|
-
**/script.ts
|
|
60
|
-
**/script*.ts
|
|
61
|
-
**/contract.ts
|
|
62
|
-
|
|
63
|
-
**/abi
|
|
64
|
-
|
|
65
|
-
**/.env
|
|
66
|
-
**/env.client.debug.ts*
|
|
67
|
-
**/env.client.develop.ts*
|
|
68
|
-
**/env.client.main.ts*
|
|
69
|
-
**/env.client.testing.ts*
|
|
70
|
-
**/env.server.debug.ts*
|
|
71
|
-
**/env.server.develop.ts*
|
|
72
|
-
**/env.server.main.ts*
|
|
73
|
-
**/env.server.testing.ts*
|
|
74
|
-
pkgs/contract/env.ts
|
|
75
|
-
# Kubernetes
|
|
76
|
-
**/*secrets.yaml
|
|
77
|
-
**/kubeconfig.yaml
|
|
78
|
-
**/secrets.*
|
|
79
|
-
|
|
80
|
-
# Next.js
|
|
81
|
-
.next
|
|
82
|
-
|
|
83
|
-
**/.secret/*
|
|
84
|
-
**/**.p8
|
|
85
|
-
dump
|
|
86
|
-
|
|
87
|
-
# Expo
|
|
88
|
-
node_modules/
|
|
89
|
-
.expo/
|
|
90
|
-
.yarn/
|
|
91
|
-
dist/
|
|
92
|
-
npm-debug.*
|
|
93
|
-
*.jks
|
|
94
|
-
*.p8
|
|
95
|
-
*.p12
|
|
96
|
-
*.key
|
|
97
|
-
*.mobileprovision
|
|
98
|
-
*.orig.*
|
|
99
|
-
web-build/
|
|
100
|
-
cache/
|
|
101
|
-
|
|
102
|
-
# React Native
|
|
103
|
-
|
|
104
|
-
# OSX
|
|
105
|
-
#
|
|
106
|
-
.DS_Store
|
|
107
|
-
|
|
108
|
-
# Xcode
|
|
109
|
-
#
|
|
110
|
-
build/
|
|
111
|
-
*.pbxuser
|
|
112
|
-
!default.pbxuser
|
|
113
|
-
*.mode1v3
|
|
114
|
-
!default.mode1v3
|
|
115
|
-
*.mode2v3
|
|
116
|
-
!default.mode2v3
|
|
117
|
-
*.perspectivev3
|
|
118
|
-
!default.perspectivev3
|
|
119
|
-
xcuserdata
|
|
120
|
-
*.xccheckout
|
|
121
|
-
*.moved-aside
|
|
122
|
-
DerivedData
|
|
123
|
-
*.hmap
|
|
124
|
-
*.ipa
|
|
125
|
-
*.xcuserstate
|
|
126
|
-
# ios
|
|
127
|
-
# Android/IntelliJ
|
|
128
|
-
#
|
|
129
|
-
# **/android
|
|
130
|
-
build/
|
|
131
|
-
.idea
|
|
132
|
-
.gradle
|
|
133
|
-
local.properties
|
|
134
|
-
*.iml
|
|
135
|
-
*.hprof
|
|
136
|
-
.cxx/
|
|
137
|
-
*.keystore
|
|
138
|
-
!debug.keystore
|
|
139
|
-
|
|
140
|
-
# node.js
|
|
141
|
-
#
|
|
142
|
-
node_modules/
|
|
143
|
-
npm-debug.log
|
|
144
|
-
yarn-error.log
|
|
145
|
-
|
|
146
|
-
# fastlane
|
|
147
|
-
#
|
|
148
|
-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
|
149
|
-
# screenshots whenever they are needed.
|
|
150
|
-
# For more information about the recommended setup visit:
|
|
151
|
-
# https://docs.fastlane.tools/best-practices/source-control/
|
|
152
|
-
|
|
153
|
-
**/fastlane/report.xml
|
|
154
|
-
**/fastlane/Preview.html
|
|
155
|
-
**/fastlane/screenshots
|
|
156
|
-
**/fastlane/test_output
|
|
157
|
-
|
|
158
|
-
# Bundle artifact
|
|
159
|
-
*.jsbundle
|
|
160
|
-
|
|
161
|
-
# Ruby / CocoaPods
|
|
162
|
-
# **/ios/Pods/
|
|
163
|
-
**/vendor/bundle/
|
|
164
|
-
# **/android/
|
|
165
|
-
# Temporary files created by Metro to check the health of the file watcher
|
|
166
|
-
.metro-health-check*
|
|
167
|
-
|
|
168
|
-
# testing
|
|
169
|
-
**/coverage
|
|
170
|
-
|
|
171
|
-
**/public/precache.*.*.js
|
|
172
|
-
**/public/sw.js
|
|
173
|
-
**/public/workbox-*.js
|
|
174
|
-
**/public/worker-*.js
|
|
175
|
-
**/public/fallback-*.js
|
|
176
|
-
**/public/precache.*.*.js.map
|
|
177
|
-
**/public/sw.js.map
|
|
178
|
-
**/public/workbox-*.js.map
|
|
179
|
-
**/public/worker-*.js.map
|
|
180
|
-
**/public/fallback-*.js
|
|
181
|
-
**/public/libs
|
|
182
|
-
# **/android/app/src/main/assets/public
|
|
183
|
-
# **/ios/App/App/Assets.xcassets/*
|
|
184
|
-
**/ios/App/App/public
|
|
185
|
-
**/ios/App/App/Podfile.lock
|
|
186
|
-
**/ios/App/App.pbxproj
|
|
187
|
-
**/*-secret.yaml
|
|
188
|
-
**/akamir-id
|
|
189
|
-
**/akamir-id.pub
|
|
190
|
-
**/.jenkins.conf
|
|
191
|
-
**/regcred.yaml
|
|
192
|
-
**/mongo-connections.json
|
|
193
|
-
**/redis-connections.json
|
|
194
|
-
infra/master/createRecords.ts
|
|
195
|
-
local
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
## Get Started
|
|
2
|
-
|
|
3
|
-
Run the code below.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
npm run downloadEnv # Need to register your public key
|
|
7
|
-
|
|
8
|
-
npm i -g akan pnpm
|
|
9
|
-
|
|
10
|
-
pnpm i
|
|
11
|
-
|
|
12
|
-
cat <<EOF >> .env
|
|
13
|
-
# organization configuration, no need to change
|
|
14
|
-
NEXT_PUBLIC_REPO_NAME=<%= repoName %>
|
|
15
|
-
NEXT_PUBLIC_SERVE_DOMAIN="<%= serveDomain %>"
|
|
16
|
-
|
|
17
|
-
# development branch, debug, develop, main, etc. mainly it changes databases.
|
|
18
|
-
NEXT_PUBLIC_ENV=debug
|
|
19
|
-
|
|
20
|
-
# local, cloud, edge it changes the connection point of the clients.
|
|
21
|
-
NEXT_PUBLIC_OPERATION_MODE=local
|
|
22
|
-
# hybrid app specific config, will be depreciated in the future
|
|
23
|
-
APP_OPERATION_MODE=local
|
|
24
|
-
|
|
25
|
-
# backend service mode, federation, batch, all
|
|
26
|
-
SERVER_MODE=federation
|
|
27
|
-
|
|
28
|
-
# analyze the bundle size
|
|
29
|
-
ANALYZE=false
|
|
30
|
-
|
|
31
|
-
# log level, debug, info, warn, error
|
|
32
|
-
NEXT_PUBLIC_LOG_LEVEL=debug
|
|
33
|
-
EOF
|
|
34
|
-
|
|
35
|
-
akan serve-backend <%= appName %>
|
|
36
|
-
# or akan serve-frontend <%= appName %>, etc
|
|
37
|
-
```
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
const nx = require("@nx/eslint-plugin");
|
|
2
|
-
const unusedImports = require("eslint-plugin-unused-imports");
|
|
3
|
-
const simpleImportSort = require("eslint-plugin-simple-import-sort");
|
|
4
|
-
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
|
|
5
|
-
const nxWorkspace = require("./tools/eslint-rules/index.ts");
|
|
6
|
-
const tsParser = require("@typescript-eslint/parser");
|
|
7
|
-
const js = require("@eslint/js");
|
|
8
|
-
|
|
9
|
-
const { FlatCompat } = require("@eslint/eslintrc");
|
|
10
|
-
|
|
11
|
-
const compat = new FlatCompat({
|
|
12
|
-
baseDirectory: __dirname,
|
|
13
|
-
recommendedConfig: js.configs.recommended,
|
|
14
|
-
allConfig: js.configs.all,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
module.exports = [
|
|
18
|
-
{
|
|
19
|
-
ignores: [
|
|
20
|
-
"**/node_modules/**/*",
|
|
21
|
-
"**/photoshop/**/*",
|
|
22
|
-
"**/public/**/*",
|
|
23
|
-
"**/ios/**/*",
|
|
24
|
-
"**/android/**/*",
|
|
25
|
-
"**/*.js",
|
|
26
|
-
"**/*.jsx",
|
|
27
|
-
"**/.next/**/*",
|
|
28
|
-
"**/typechain-types/**/*",
|
|
29
|
-
"**/script*.ts",
|
|
30
|
-
"data/**/*",
|
|
31
|
-
"dist/**/*",
|
|
32
|
-
"releases/**/*",
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
...compat.extends(
|
|
36
|
-
"next",
|
|
37
|
-
"next/core-web-vitals",
|
|
38
|
-
"eslint:recommended",
|
|
39
|
-
"plugin:@typescript-eslint/recommended-type-checked",
|
|
40
|
-
"plugin:@typescript-eslint/strict-type-checked",
|
|
41
|
-
"plugin:@typescript-eslint/stylistic-type-checked"
|
|
42
|
-
// "plugin:tailwindcss/recommended"
|
|
43
|
-
),
|
|
44
|
-
{
|
|
45
|
-
plugins: {
|
|
46
|
-
"@nx": nx,
|
|
47
|
-
"@nx/workspace": nxWorkspace,
|
|
48
|
-
"unused-imports": unusedImports,
|
|
49
|
-
"simple-import-sort": simpleImportSort,
|
|
50
|
-
"@typescript-eslint": typescriptEslint,
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
languageOptions: {
|
|
54
|
-
parser: tsParser,
|
|
55
|
-
ecmaVersion: 6,
|
|
56
|
-
sourceType: "module",
|
|
57
|
-
|
|
58
|
-
parserOptions: {
|
|
59
|
-
project: true,
|
|
60
|
-
projectService: true,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
settings: {
|
|
65
|
-
"import/parsers": {
|
|
66
|
-
"@typescript-eslint/parser": [".ts", ".tsx"],
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
"import/resolver": {
|
|
70
|
-
typescript: "./tsconfig.json",
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
76
|
-
ignores: ["**/*.js", "**/*.jsx"],
|
|
77
|
-
|
|
78
|
-
rules: {
|
|
79
|
-
"no-console": "error",
|
|
80
|
-
"@nx/workspace/useClientByFile": "error",
|
|
81
|
-
"@nx/workspace/noImportClientFunctions": "error",
|
|
82
|
-
"@nx/workspace/nonScalarPropsRestricted": "error",
|
|
83
|
-
"@nx/workspace/noImportExternalLibrary": "error",
|
|
84
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
|
85
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
|
86
|
-
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
87
|
-
"@typescript-eslint/no-extraneous-class": "off",
|
|
88
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
89
|
-
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
90
|
-
|
|
91
|
-
"@typescript-eslint/no-misused-promises": [
|
|
92
|
-
"error",
|
|
93
|
-
{
|
|
94
|
-
checksVoidReturn: false,
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
"tailwindcss/no-custom-classname": "off",
|
|
99
|
-
"react/display-name": "off",
|
|
100
|
-
"react-hooks/exhaustive-deps": "off",
|
|
101
|
-
"@next/next/no-html-link-for-pages": "off",
|
|
102
|
-
"jsx-a11y/alt-text": [0],
|
|
103
|
-
"unused-imports/no-unused-imports": "warn",
|
|
104
|
-
"no-unused-vars": "off",
|
|
105
|
-
"simple-import-sort/imports": "warn",
|
|
106
|
-
"simple-import-sort/exports": "off",
|
|
107
|
-
"import/first": "warn",
|
|
108
|
-
"import/newline-after-import": "warn",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
...compat.extends("plugin:@nx/typescript").map((config) => ({
|
|
112
|
-
...config,
|
|
113
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
114
|
-
})),
|
|
115
|
-
{
|
|
116
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
117
|
-
rules: {},
|
|
118
|
-
},
|
|
119
|
-
...compat.extends("plugin:@typescript-eslint/recommended").map((config) => ({
|
|
120
|
-
...config,
|
|
121
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
122
|
-
})),
|
|
123
|
-
// ...fixupConfigRules(compat.extends("plugin:import/recommended")).map((config) => ({
|
|
124
|
-
// ...config,
|
|
125
|
-
// files: ["**/*.ts", "**/*.tsx"],
|
|
126
|
-
// })),
|
|
127
|
-
{
|
|
128
|
-
files: ["**/*.ts", "**/*.tsx"],
|
|
129
|
-
|
|
130
|
-
rules: {
|
|
131
|
-
"import/no-duplicates": "warn",
|
|
132
|
-
"import/no-unresolved": "off",
|
|
133
|
-
"import/named": "off",
|
|
134
|
-
"import/namespace": "off",
|
|
135
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
136
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
137
|
-
"@typescript-eslint/no-misused-spread": "off",
|
|
138
|
-
"react-hooks/rules-of-hooks": "off",
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
];
|