@ldsg/constants 0.1.0-alpha.9 → 0.2.0

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.
@@ -0,0 +1 @@
1
+ { "resourceRecords": [{ "id": "application-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "application-resource-definition-handler", "title": "应用类型资源定义", "description": "", "kind": "application", "parentKind": "root" } }, { "id": "application-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "应用类型资源处理程序", "description": "", "code": "export * from \"@ldsg/application\";", "dependencies": [{ "name": "@ldsg/application" }] } }, { "id": "database-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "database-resource-definition-handler", "title": "数据库类型资源定义", "description": "", "kind": "database", "parentKind": "root" } }, { "id": "database-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "数据库类型资源处理程序", "description": "", "code": "export * from \"@ldsg/database\";", "dependencies": [{ "name": "@ldsg/database" }] } }, { "id": "field-type-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "field-type-resource-definition-handler", "title": "字段类型类型资源定义", "description": "", "kind": "field_type", "parentKind": "root" } }, { "id": "field-type-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "字段类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/field-type\";", "dependencies": [{ "name": "@ldsg/field-type" }] } }, { "id": "form-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "form-resource-definition-handler", "title": "表单资源定义", "description": "", "kind": "form", "parentKind": "forms" } }, { "id": "form-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表单资源处理程序", "description": "", "code": "export * from \"@ldsg/form\";", "dependencies": [{ "name": "@ldsg/form" }] } }, { "id": "forms-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "forms-resource-definition-handler", "title": "表单组类型资源定义", "description": "", "kind": "forms", "parentKind": "application" } }, { "id": "forms-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表单组类型资源处理程序", "description": "", "code": "export * from \"@ldsg/forms\";", "dependencies": [{ "name": "@ldsg/forms" }] } }, { "id": "graphql-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "graphql-resource-definition-handler", "title": "GraphQL类型资源定义", "description": "", "kind": "graphql", "parentKind": "application" } }, { "id": "graphql-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "GraphQL类型资源处理程序", "description": "", "code": "export * from \"@ldsg/graphql\";", "dependencies": [{ "name": "@ldsg/graphql" }] } }, { "id": "handler-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "handler-resource-definition-handler", "title": "处理程序类型资源定义", "description": "主要包含引入模块列表与相应的处理程序代码,处理程序类型资源无子级资源。", "kind": "handler", "parentKind": "root" } }, { "id": "handler-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "处理程序类型资源处理程序", "description": "包含处理程序相应的模块,此模块主要通过", "code": "export * from \"@ldsg/handler\";", "dependencies": [{ "name": "@ldsg/handler" }] } }, { "id": "object-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "object-resource-definition-handler", "title": "对象类型资源定义", "description": "", "kind": "object", "parentKind": "root" } }, { "id": "object-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "对象类型资源处理程序", "description": "", "code": "export * from \"@ldsg/object\";", "dependencies": [{ "name": "@ldsg/object" }] } }, { "id": "object-field-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "object-field-resource-definition-handler", "title": "对象字段类型资源定义", "description": "", "kind": "object_field", "parentKind": "object" } }, { "id": "object-field-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "对象字段类型资源处理程序", "description": "", "code": "export * from \"@ldsg/object-field\";", "dependencies": [{ "name": "@ldsg/object-field" }] } }, { "id": "resource-definition-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "resource-definition-resource-definition-handler", "title": "资源定义类型资源定义", "description": "", "kind": "resource_definition", "parentKind": "root" } }, { "id": "resource-definition-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "资源定义类型资源处理程序", "description": "", "code": "export * from \"@ldsg/resource-definition\";", "dependencies": [{ "name": "@ldsg/resource-definition" }] } }, { "id": "route-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "route-resource-definition-handler", "title": "路由类型资源定义", "description": "", "kind": "route", "parentKind": "application" } }, { "id": "route-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "路由类型资源处理程序", "description": "", "code": "export * from \"@ldsg/route\";", "dependencies": [{ "name": "@ldsg/route" }] } }, { "id": "table-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "table-resource-definition-handler", "title": "表格资源定义", "description": "", "kind": "table", "parentKind": "tables" } }, { "id": "table-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表格资源处理程序", "description": "", "code": "export * from \"@ldsg/table\";", "dependencies": [{ "name": "@ldsg/table" }] } }, { "id": "tables-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "tables-resource-definition-handler", "title": "表格组类型资源定义", "description": "", "kind": "tables", "parentKind": "application" } }, { "id": "tables-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表格组类型资源处理程序", "description": "", "code": "export * from \"@ldsg/tables\";", "dependencies": [{ "name": "@ldsg/tables" }] } }, { "id": "workflow-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-resource-definition-handler", "title": "工作流类型资源定义", "description": "", "kind": "workflow", "parentKind": "root" } }, { "id": "workflow-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow\";", "dependencies": [{ "name": "@ldsg/workflow" }] } }, { "id": "workflow-edge-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-edge-resource-definition-handler", "title": "工作流连线类型资源定义", "description": "", "kind": "workflow_edge", "parentKind": "workflow" } }, { "id": "workflow-edge-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-edge\";", "dependencies": [{ "name": "@ldsg/workflow-edge" }] } }, { "id": "workflow-node-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-node-resource-definition-handler", "title": "工作流节点类型资源定义", "description": "", "kind": "workflow_node", "parentKind": "workflow" } }, { "id": "workflow-node-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-node\";", "dependencies": [{ "name": "@ldsg/workflow-node" }] } }, { "id": "workflow-node-type-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-node-type-resource-definition-handler", "title": "工作流节点类型类型资源定义", "description": "", "kind": "workflow_node_type", "parentKind": "root" } }, { "id": "workflow-node-type-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-node-type\";", "dependencies": [{ "name": "@ldsg/workflow-node-type" }] } }, { "id": "main-app", "kind": "application", "parentId": "root", "settings": { "title": "主要应用", "description": "" } }] }
@@ -0,0 +1 @@
1
+ ["resource_definition", "handler"]
@@ -0,0 +1 @@
1
+ [{ "path": "index.ts", "data": "export const handler = () => {};\n" }, { "path": "package.json", "data": { "name": "ldsg-handler-template", "version": "0.0.0", "description": "", "main": "dist/index.js", "files": ["dist/"], "types": "dist", "scripts": { "build": "tsc" }, "private": true, "license": "UNLICENSED", "dependencies": {} } }, { "path": "tsconfig.json", "data": { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2021", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "resolveJsonModule": true, "esModuleInterop": true }, "include": ["./index.ts"] } }]
@@ -0,0 +1 @@
1
+ [{ "path": ".env", "data": "" }, { "path": "index.ts", "data": "import { createApp } from \"@ldsg/create-app\";\nimport MANIFEST_JSON from \"./manifest.json\";\n\nconst { resourceRecords } = MANIFEST_JSON;\n\nconst app = createApp({\n resourceRecords,\n});\n\nconst port = process.env.PORT || \"3000\";\n\napp.listen(port, () => {\n console.log(`App listening on http://localhost:${port}`);\n\n console.log(`GraphQL listening on http://localhost:${port}/graphql`);\n});\n" }, { "path": "manifest.json", "data": { "resourceRecords": [{ "id": "resource-definition-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "title": "资源定义类型资源定义", "description": "", "kind": "resource_definition", "parentKind": "" } }, { "id": "resource-definition-resource-handler", "kind": "handler", "parentId": "resource-definition-resource-definition", "settings": { "title": "资源定义类型资源处理程序", "description": "", "code": "export * from \"@ldsg/resource-definition\";", "dependencies": [{ "name": "@ldsg/resource-definition" }] } }, { "id": "handler-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "title": "处理程序类型资源定义", "description": "主要包含引入模块列表与相应的处理程序代码,处理程序类型资源无子级资源。", "kind": "handler", "parentKind": "" } }, { "id": "handler-resource-handler", "kind": "handler", "parentId": "handler-resource-definition", "settings": { "title": "处理程序类型资源处理程序", "description": "包含处理程序相应的模块,此模块主要通过", "code": "export * from \"@ldsg/handler\";", "dependencies": [{ "name": "@ldsg/handler" }] } }, { "id": "application-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "title": "应用类型资源定义", "description": "", "kind": "application", "parentKind": "" } }, { "id": "application-resource-handler", "kind": "handler", "parentId": "application-resource-definition", "settings": { "title": "应用类型资源处理程序", "description": "", "code": "export * from \"@ldsg/application\";", "dependencies": [{ "name": "@ldsg/application" }] } }, { "id": "main-app", "kind": "application", "parentId": "root", "settings": { "title": "主要应用", "description": "" } }] } }, { "path": "package.json", "data": { "name": "ldsg-app-template", "version": "0.0.0", "description": "", "author": "", "private": true, "license": "UNLICENSED", "scripts": { "build": "pnpm run --workspace-root build:workspace-root && pnpm run --workspace-root build:recursive", "build:workspace-root": "tsc --project tsconfig.json", "build:recursive": "pnpm run --recursive build", "start": "node dist/index.js" }, "dependencies": { "@ldsg/create-app": "latest", "graphql": "^16.9.0", "graphql-middleware": "^6.1.35", "graphql-shield": "^7.6.5" }, "devDependencies": { "@types/node": "^22.1.0", "ts-loader": "^9.5.1", "tslib": "^2.6.3", "typescript": "^5.5.4" } } }, { "path": "pnpm-workspace.yaml", "data": "packages:\n - \"handlers/*\"\n" }, { "path": "tsconfig.json", "data": { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2021", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, "resolveJsonModule": true, "esModuleInterop": true }, "include": ["./index.ts", "./service-records.json"] } }]
package/dist/index.d.ts CHANGED
@@ -1,4 +1,260 @@
1
- export * from "./constants";
2
- export * from "./manifests";
3
- export * from "./utils";
1
+ export declare const BASE_RESOURCE_KINDS: string[];
2
+ export declare const ROOT_RESOURCE_ID: string;
3
+ export declare const ROOT_RESOURCE_KIND: string;
4
+ export declare const RESOURCE_MODULE_RELATED_RESOURCE_RECORDS: ({
5
+ id: string;
6
+ kind: string;
7
+ parentId: string;
8
+ settings: {
9
+ handlerResourceId: string;
10
+ title: string;
11
+ description: string;
12
+ kind: string;
13
+ parentKind: string;
14
+ code?: undefined;
15
+ dependencies?: undefined;
16
+ };
17
+ } | {
18
+ id: string;
19
+ kind: string;
20
+ parentId: string;
21
+ settings: {
22
+ title: string;
23
+ description: string;
24
+ code: string;
25
+ dependencies: {
26
+ name: string;
27
+ }[];
28
+ handlerResourceId?: undefined;
29
+ kind?: undefined;
30
+ parentKind?: undefined;
31
+ };
32
+ })[];
33
+ export declare const APP_MANIFEST: {
34
+ resourceRecords: ({
35
+ id: string;
36
+ kind: string;
37
+ parentId: string;
38
+ settings: {
39
+ handlerResourceId: string;
40
+ title: string;
41
+ description: string;
42
+ kind: string;
43
+ parentKind: string;
44
+ code?: undefined;
45
+ dependencies?: undefined;
46
+ };
47
+ } | {
48
+ id: string;
49
+ kind: string;
50
+ parentId: string;
51
+ settings: {
52
+ title: string;
53
+ description: string;
54
+ code: string;
55
+ dependencies: {
56
+ name: string;
57
+ }[];
58
+ handlerResourceId?: undefined;
59
+ kind?: undefined;
60
+ parentKind?: undefined;
61
+ };
62
+ } | {
63
+ id: string;
64
+ kind: string;
65
+ parentId: string;
66
+ settings: {
67
+ title: string;
68
+ description: string;
69
+ handlerResourceId?: undefined;
70
+ kind?: undefined;
71
+ parentKind?: undefined;
72
+ code?: undefined;
73
+ dependencies?: undefined;
74
+ };
75
+ })[];
76
+ };
77
+ export declare const FILES_IN_ROOT_MODULE: ({
78
+ path: string;
79
+ data: string;
80
+ } | {
81
+ path: string;
82
+ data: {
83
+ resourceRecords: ({
84
+ id: string;
85
+ kind: string;
86
+ parentId: string;
87
+ settings: {
88
+ title: string;
89
+ description: string;
90
+ kind: string;
91
+ parentKind: string;
92
+ code?: undefined;
93
+ dependencies?: undefined;
94
+ };
95
+ } | {
96
+ id: string;
97
+ kind: string;
98
+ parentId: string;
99
+ settings: {
100
+ title: string;
101
+ description: string;
102
+ code: string;
103
+ dependencies: {
104
+ name: string;
105
+ }[];
106
+ kind?: undefined;
107
+ parentKind?: undefined;
108
+ };
109
+ } | {
110
+ id: string;
111
+ kind: string;
112
+ parentId: string;
113
+ settings: {
114
+ title: string;
115
+ description: string;
116
+ kind?: undefined;
117
+ parentKind?: undefined;
118
+ code?: undefined;
119
+ dependencies?: undefined;
120
+ };
121
+ })[];
122
+ name?: undefined;
123
+ version?: undefined;
124
+ description?: undefined;
125
+ author?: undefined;
126
+ private?: undefined;
127
+ license?: undefined;
128
+ scripts?: undefined;
129
+ dependencies?: undefined;
130
+ devDependencies?: undefined;
131
+ compilerOptions?: undefined;
132
+ include?: undefined;
133
+ };
134
+ } | {
135
+ path: string;
136
+ data: {
137
+ name: string;
138
+ version: string;
139
+ description: string;
140
+ author: string;
141
+ private: boolean;
142
+ license: string;
143
+ scripts: {
144
+ build: string;
145
+ "build:workspace-root": string;
146
+ "build:recursive": string;
147
+ start: string;
148
+ };
149
+ dependencies: {
150
+ "@ldsg/create-app": string;
151
+ graphql: string;
152
+ "graphql-middleware": string;
153
+ "graphql-shield": string;
154
+ };
155
+ devDependencies: {
156
+ "@types/node": string;
157
+ "ts-loader": string;
158
+ tslib: string;
159
+ typescript: string;
160
+ };
161
+ resourceRecords?: undefined;
162
+ compilerOptions?: undefined;
163
+ include?: undefined;
164
+ };
165
+ } | {
166
+ path: string;
167
+ data: {
168
+ compilerOptions: {
169
+ module: string;
170
+ declaration: boolean;
171
+ removeComments: boolean;
172
+ emitDecoratorMetadata: boolean;
173
+ experimentalDecorators: boolean;
174
+ allowSyntheticDefaultImports: boolean;
175
+ target: string;
176
+ sourceMap: boolean;
177
+ outDir: string;
178
+ baseUrl: string;
179
+ incremental: boolean;
180
+ skipLibCheck: boolean;
181
+ strictNullChecks: boolean;
182
+ noImplicitAny: boolean;
183
+ strictBindCallApply: boolean;
184
+ forceConsistentCasingInFileNames: boolean;
185
+ noFallthroughCasesInSwitch: boolean;
186
+ resolveJsonModule: boolean;
187
+ esModuleInterop: boolean;
188
+ };
189
+ include: string[];
190
+ resourceRecords?: undefined;
191
+ name?: undefined;
192
+ version?: undefined;
193
+ description?: undefined;
194
+ author?: undefined;
195
+ private?: undefined;
196
+ license?: undefined;
197
+ scripts?: undefined;
198
+ dependencies?: undefined;
199
+ devDependencies?: undefined;
200
+ };
201
+ })[];
202
+ export declare const FILES_IN_HANDLER_MODULE: ({
203
+ path: string;
204
+ data: string;
205
+ } | {
206
+ path: string;
207
+ data: {
208
+ name: string;
209
+ version: string;
210
+ description: string;
211
+ main: string;
212
+ files: string[];
213
+ types: string;
214
+ scripts: {
215
+ build: string;
216
+ };
217
+ private: boolean;
218
+ license: string;
219
+ dependencies: {};
220
+ compilerOptions?: undefined;
221
+ include?: undefined;
222
+ };
223
+ } | {
224
+ path: string;
225
+ data: {
226
+ compilerOptions: {
227
+ module: string;
228
+ declaration: boolean;
229
+ removeComments: boolean;
230
+ emitDecoratorMetadata: boolean;
231
+ experimentalDecorators: boolean;
232
+ allowSyntheticDefaultImports: boolean;
233
+ target: string;
234
+ sourceMap: boolean;
235
+ outDir: string;
236
+ baseUrl: string;
237
+ incremental: boolean;
238
+ skipLibCheck: boolean;
239
+ strictNullChecks: boolean;
240
+ noImplicitAny: boolean;
241
+ strictBindCallApply: boolean;
242
+ forceConsistentCasingInFileNames: boolean;
243
+ noFallthroughCasesInSwitch: boolean;
244
+ resolveJsonModule: boolean;
245
+ esModuleInterop: boolean;
246
+ };
247
+ include: string[];
248
+ name?: undefined;
249
+ version?: undefined;
250
+ description?: undefined;
251
+ main?: undefined;
252
+ files?: undefined;
253
+ types?: undefined;
254
+ scripts?: undefined;
255
+ private?: undefined;
256
+ license?: undefined;
257
+ dependencies?: undefined;
258
+ };
259
+ })[];
4
260
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,UAA2B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,QAAwB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,QAA0B,CAAC;AAE1D,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAC;AAEtG,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAC;AAE9C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA4B,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA+B,CAAC"}
package/dist/index.js CHANGED
@@ -1,19 +1,20 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
4
  };
16
5
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants"), exports);
18
- __exportStar(require("./manifests"), exports);
19
- __exportStar(require("./utils"), exports);
6
+ exports.FILES_IN_HANDLER_MODULE = exports.FILES_IN_ROOT_MODULE = exports.APP_MANIFEST = exports.RESOURCE_MODULE_RELATED_RESOURCE_RECORDS = exports.ROOT_RESOURCE_KIND = exports.ROOT_RESOURCE_ID = exports.BASE_RESOURCE_KINDS = void 0;
7
+ const base_resource_kinds_json_1 = __importDefault(require("./base-resource-kinds.json"));
8
+ exports.BASE_RESOURCE_KINDS = base_resource_kinds_json_1.default;
9
+ const root_resource_id_json_1 = __importDefault(require("./root-resource-id.json"));
10
+ exports.ROOT_RESOURCE_ID = root_resource_id_json_1.default;
11
+ const root_resource_kind_json_1 = __importDefault(require("./root-resource-kind.json"));
12
+ exports.ROOT_RESOURCE_KIND = root_resource_kind_json_1.default;
13
+ const resource_module_related_resource_records_json_1 = __importDefault(require("./resource-module-related-resource-records.json"));
14
+ exports.RESOURCE_MODULE_RELATED_RESOURCE_RECORDS = resource_module_related_resource_records_json_1.default;
15
+ const app_manifest_json_1 = __importDefault(require("./app-manifest.json"));
16
+ exports.APP_MANIFEST = app_manifest_json_1.default;
17
+ const files_in_root_module_json_1 = __importDefault(require("./files-in-root-module.json"));
18
+ exports.FILES_IN_ROOT_MODULE = files_in_root_module_json_1.default;
19
+ const files_in_handler_module_json_1 = __importDefault(require("./files-in-handler-module.json"));
20
+ exports.FILES_IN_HANDLER_MODULE = files_in_handler_module_json_1.default;
@@ -0,0 +1 @@
1
+ [{ "id": "application-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "application-resource-definition-handler", "title": "应用类型资源定义", "description": "", "kind": "application", "parentKind": "root" } }, { "id": "application-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "应用类型资源处理程序", "description": "", "code": "export * from \"@ldsg/application\";", "dependencies": [{ "name": "@ldsg/application" }] } }, { "id": "database-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "database-resource-definition-handler", "title": "数据库类型资源定义", "description": "", "kind": "database", "parentKind": "root" } }, { "id": "database-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "数据库类型资源处理程序", "description": "", "code": "export * from \"@ldsg/database\";", "dependencies": [{ "name": "@ldsg/database" }] } }, { "id": "field-type-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "field-type-resource-definition-handler", "title": "字段类型类型资源定义", "description": "", "kind": "field_type", "parentKind": "root" } }, { "id": "field-type-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "字段类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/field-type\";", "dependencies": [{ "name": "@ldsg/field-type" }] } }, { "id": "form-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "form-resource-definition-handler", "title": "表单资源定义", "description": "", "kind": "form", "parentKind": "forms" } }, { "id": "form-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表单资源处理程序", "description": "", "code": "export * from \"@ldsg/form\";", "dependencies": [{ "name": "@ldsg/form" }] } }, { "id": "forms-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "forms-resource-definition-handler", "title": "表单组类型资源定义", "description": "", "kind": "forms", "parentKind": "application" } }, { "id": "forms-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表单组类型资源处理程序", "description": "", "code": "export * from \"@ldsg/forms\";", "dependencies": [{ "name": "@ldsg/forms" }] } }, { "id": "graphql-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "graphql-resource-definition-handler", "title": "GraphQL类型资源定义", "description": "", "kind": "graphql", "parentKind": "application" } }, { "id": "graphql-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "GraphQL类型资源处理程序", "description": "", "code": "export * from \"@ldsg/graphql\";", "dependencies": [{ "name": "@ldsg/graphql" }] } }, { "id": "handler-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "handler-resource-definition-handler", "title": "处理程序类型资源定义", "description": "主要包含引入模块列表与相应的处理程序代码,处理程序类型资源无子级资源。", "kind": "handler", "parentKind": "root" } }, { "id": "handler-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "处理程序类型资源处理程序", "description": "包含处理程序相应的模块,此模块主要通过", "code": "export * from \"@ldsg/handler\";", "dependencies": [{ "name": "@ldsg/handler" }] } }, { "id": "object-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "object-resource-definition-handler", "title": "对象类型资源定义", "description": "", "kind": "object", "parentKind": "root" } }, { "id": "object-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "对象类型资源处理程序", "description": "", "code": "export * from \"@ldsg/object\";", "dependencies": [{ "name": "@ldsg/object" }] } }, { "id": "object-field-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "object-field-resource-definition-handler", "title": "对象字段类型资源定义", "description": "", "kind": "object_field", "parentKind": "object" } }, { "id": "object-field-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "对象字段类型资源处理程序", "description": "", "code": "export * from \"@ldsg/object-field\";", "dependencies": [{ "name": "@ldsg/object-field" }] } }, { "id": "resource-definition-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "resource-definition-resource-definition-handler", "title": "资源定义类型资源定义", "description": "", "kind": "resource_definition", "parentKind": "root" } }, { "id": "resource-definition-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "资源定义类型资源处理程序", "description": "", "code": "export * from \"@ldsg/resource-definition\";", "dependencies": [{ "name": "@ldsg/resource-definition" }] } }, { "id": "route-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "route-resource-definition-handler", "title": "路由类型资源定义", "description": "", "kind": "route", "parentKind": "application" } }, { "id": "route-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "路由类型资源处理程序", "description": "", "code": "export * from \"@ldsg/route\";", "dependencies": [{ "name": "@ldsg/route" }] } }, { "id": "table-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "table-resource-definition-handler", "title": "表格资源定义", "description": "", "kind": "table", "parentKind": "tables" } }, { "id": "table-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表格资源处理程序", "description": "", "code": "export * from \"@ldsg/table\";", "dependencies": [{ "name": "@ldsg/table" }] } }, { "id": "tables-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "tables-resource-definition-handler", "title": "表格组类型资源定义", "description": "", "kind": "tables", "parentKind": "application" } }, { "id": "tables-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "表格组类型资源处理程序", "description": "", "code": "export * from \"@ldsg/tables\";", "dependencies": [{ "name": "@ldsg/tables" }] } }, { "id": "workflow-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-resource-definition-handler", "title": "工作流类型资源定义", "description": "", "kind": "workflow", "parentKind": "root" } }, { "id": "workflow-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow\";", "dependencies": [{ "name": "@ldsg/workflow" }] } }, { "id": "workflow-edge-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-edge-resource-definition-handler", "title": "工作流连线类型资源定义", "description": "", "kind": "workflow_edge", "parentKind": "workflow" } }, { "id": "workflow-edge-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-edge\";", "dependencies": [{ "name": "@ldsg/workflow-edge" }] } }, { "id": "workflow-node-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-node-resource-definition-handler", "title": "工作流节点类型资源定义", "description": "", "kind": "workflow_node", "parentKind": "workflow" } }, { "id": "workflow-node-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-node\";", "dependencies": [{ "name": "@ldsg/workflow-node" }] } }, { "id": "workflow-node-type-resource-definition", "kind": "resource_definition", "parentId": "root", "settings": { "handlerResourceId": "workflow-node-type-resource-definition-handler", "title": "工作流节点类型类型资源定义", "description": "", "kind": "workflow_node_type", "parentKind": "root" } }, { "id": "workflow-node-type-resource-definition-handler", "kind": "handler", "parentId": "root", "settings": { "title": "工作流节点类型类型资源处理程序", "description": "", "code": "export * from \"@ldsg/workflow-node-type\";", "dependencies": [{ "name": "@ldsg/workflow-node-type" }] } }]
@@ -0,0 +1 @@
1
+ "root"
@@ -0,0 +1 @@
1
+ "root"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldsg/constants",
3
- "version": "0.1.0-alpha.9",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -13,23 +13,8 @@
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
16
- "devDependencies": {
17
- "@types/fs-extra": "^11.0.4",
18
- "@types/lodash": "^4.14.202",
19
- "@types/node": "^20.13.0",
20
- "@types/supertest": "^6.0.0",
21
- "fs-extra": "^11.3.0",
22
- "lodash": "^4.17.21",
23
- "supertest": "^6.3.4",
24
- "tsx": "^4.19.3",
25
- "@ldsg/handler": "0.1.0-alpha.9",
26
- "@ldsg/resource": "0.1.0-alpha.9",
27
- "@ldsg/resource-definition": "0.1.0-alpha.9",
28
- "@ldsg/application": "0.1.0-alpha.9"
29
- },
30
16
  "scripts": {
31
- "build": "npm run clean && npm run generate && tsc --project tsconfig.build.json",
32
- "generate": "npx tsx src/scripts/generate.ts",
33
- "clean": "rm -rf dist src/manifests"
17
+ "build": "npm run clean && tsc --project tsconfig.build.json",
18
+ "clean": "rm -rf dist"
34
19
  }
35
20
  }
@@ -1,16 +0,0 @@
1
- import * as application from "@ldsg/application";
2
- import * as handler from "@ldsg/handler";
3
- import { Manifest } from "@ldsg/resource";
4
- import * as resourceDefinition from "@ldsg/resource-definition";
5
- export declare const ROOT_RESOURCE_ID = "root";
6
- /**
7
- * 基础层资源类型组
8
- */
9
- export declare const BASE_RESOURCE_KINDS: (typeof handler | typeof resourceDefinition)[];
10
- /**
11
- * 应用层资源类型组
12
- */
13
- export declare const APPLICATION_RESOURCE_KINDS: (typeof application)[];
14
- export declare const RESOURCE_KINDS: (typeof application | typeof handler | typeof resourceDefinition)[];
15
- export declare const RESOURCE_KINDS_RESOURCES: Manifest.Resource[];
16
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAGhE,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAgC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,0BAA0B,wBAAgB,CAAC;AAExD,eAAO,MAAM,cAAc,qEAG1B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,QAAQ,EA4BvD,CAAC"}
package/dist/constants.js DELETED
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.RESOURCE_KINDS_RESOURCES = exports.RESOURCE_KINDS = exports.APPLICATION_RESOURCE_KINDS = exports.BASE_RESOURCE_KINDS = exports.ROOT_RESOURCE_ID = void 0;
30
- const application = __importStar(require("@ldsg/application"));
31
- const handler = __importStar(require("@ldsg/handler"));
32
- const resourceDefinition = __importStar(require("@ldsg/resource-definition"));
33
- const lodash_1 = __importDefault(require("lodash"));
34
- exports.ROOT_RESOURCE_ID = "root";
35
- /**
36
- * 基础层资源类型组
37
- */
38
- exports.BASE_RESOURCE_KINDS = [resourceDefinition, handler];
39
- /**
40
- * 应用层资源类型组
41
- */
42
- exports.APPLICATION_RESOURCE_KINDS = [application];
43
- exports.RESOURCE_KINDS = [
44
- ...exports.BASE_RESOURCE_KINDS,
45
- ...exports.APPLICATION_RESOURCE_KINDS,
46
- ];
47
- exports.RESOURCE_KINDS_RESOURCES = lodash_1.default.flatMap(exports.RESOURCE_KINDS.map((value) => {
48
- const { resourceDefinitionResourceSettings, handlerResourceSettings } = value;
49
- const resourceKind = lodash_1.default.kebabCase(resourceDefinitionResourceSettings.kind);
50
- const resourceDefinitionResourceId = `${resourceKind}-resource-definition`;
51
- const handlerResourceId = `${resourceKind}-resource-handler`;
52
- const res = [
53
- {
54
- id: resourceDefinitionResourceId,
55
- kind: "RESOURCE_DEFINITION",
56
- parentId: exports.ROOT_RESOURCE_ID,
57
- settings: resourceDefinitionResourceSettings,
58
- },
59
- {
60
- id: handlerResourceId,
61
- kind: "HANDLER",
62
- parentId: resourceDefinitionResourceId,
63
- settings: handlerResourceSettings,
64
- },
65
- ];
66
- return res;
67
- }));
@@ -1 +0,0 @@
1
- { "resources": [{ "id": "resource-definition-resource-definition", "kind": "RESOURCE_DEFINITION", "parentId": "root", "settings": { "title": "资源定义类型资源定义", "description": "", "kind": "RESOURCE_DEFINITION", "subKinds": [] } }, { "id": "resource-definition-resource-handler", "kind": "HANDLER", "parentId": "resource-definition-resource-definition", "settings": { "title": "资源定义类型资源处理程序", "description": "", "code": "export * from \"@ldsg/resource-definition\";", "dependencies": [{ "name": "@ldsg/resource-definition" }] } }, { "id": "handler-resource-definition", "kind": "RESOURCE_DEFINITION", "parentId": "root", "settings": { "title": "处理程序类型资源定义", "description": "主要包含引入模块列表与相应的处理程序代码,处理程序类型资源无子级资源。", "kind": "HANDLER", "subKinds": [] } }, { "id": "handler-resource-handler", "kind": "HANDLER", "parentId": "handler-resource-definition", "settings": { "title": "处理程序类型资源处理程序", "description": "包含处理程序相应的模块,此模块主要通过", "code": "export * from \"@ldsg/handler\";", "dependencies": [{ "name": "@ldsg/handler" }] } }, { "id": "application-resource-definition", "kind": "RESOURCE_DEFINITION", "parentId": "root", "settings": { "title": "应用类型资源定义", "description": "", "kind": "APPLICATION", "subKinds": [] } }, { "id": "application-resource-handler", "kind": "HANDLER", "parentId": "application-resource-definition", "settings": { "title": "应用类型资源处理程序", "description": "", "code": "export * from \"@ldsg/application\";", "dependencies": [{ "name": "@ldsg/application" }] } }, { "id": "main-app", "kind": "APPLICATION", "parentId": "root", "settings": { "title": "主要应用", "description": "" } }] }
@@ -1,42 +0,0 @@
1
- export declare const appManifest: {
2
- resources: ({
3
- id: string;
4
- kind: string;
5
- parentId: string;
6
- settings: {
7
- title: string;
8
- description: string;
9
- kind: string;
10
- subKinds: never[];
11
- code?: undefined;
12
- dependencies?: undefined;
13
- };
14
- } | {
15
- id: string;
16
- kind: string;
17
- parentId: string;
18
- settings: {
19
- title: string;
20
- description: string;
21
- code: string;
22
- dependencies: {
23
- name: string;
24
- }[];
25
- kind?: undefined;
26
- subKinds?: undefined;
27
- };
28
- } | {
29
- id: string;
30
- kind: string;
31
- parentId: string;
32
- settings: {
33
- title: string;
34
- description: string;
35
- kind?: undefined;
36
- subKinds?: undefined;
37
- code?: undefined;
38
- dependencies?: undefined;
39
- };
40
- })[];
41
- };
42
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifests/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAW,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.appManifest = void 0;
7
- const app_json_1 = __importDefault(require("./app.json"));
8
- exports.appManifest = app_json_1.default;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=generate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/scripts/generate.ts"],"names":[],"mappings":""}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const fs_extra_1 = __importDefault(require("fs-extra"));
16
- const lodash_1 = __importDefault(require("lodash"));
17
- const path_1 = __importDefault(require("path"));
18
- const constants_1 = require("../constants");
19
- const utils_1 = require("../utils");
20
- const main = () => __awaiter(void 0, void 0, void 0, function* () {
21
- const fileNameManifestMap = {
22
- app: {
23
- resources: [
24
- {
25
- id: "main-app",
26
- kind: "APPLICATION",
27
- parentId: constants_1.ROOT_RESOURCE_ID,
28
- settings: {
29
- title: "主要应用",
30
- description: "",
31
- },
32
- },
33
- ],
34
- },
35
- };
36
- const manifestsDirPath = path_1.default.join(__dirname, "..", "manifests");
37
- yield fs_extra_1.default.ensureDir(manifestsDirPath);
38
- const fileNames = lodash_1.default.keys(fileNameManifestMap);
39
- for (const fileName of fileNames) {
40
- const { resources } = fileNameManifestMap[fileName];
41
- const { manifest } = (0, utils_1.getConstants)({
42
- resources,
43
- });
44
- yield fs_extra_1.default.writeJson(path_1.default.join(manifestsDirPath, `${fileName}.json`), manifest);
45
- }
46
- const INDEX_TS_CODE = fileNames.map((fileName) => `import ${lodash_1.default.upperCase(fileName)}_JSON from "./${fileName}.json";
47
- export const ${lodash_1.default.camelCase(fileName)}Manifest = ${lodash_1.default.upperCase(fileName)}_JSON;`).join(`
48
- `);
49
- yield fs_extra_1.default.writeFile(path_1.default.join(manifestsDirPath, "index.ts"), INDEX_TS_CODE);
50
- });
51
- main();
@@ -1,5 +0,0 @@
1
- import { Manifest } from "@ldsg/resource";
2
- export declare const getConstants: (params: Manifest) => {
3
- manifest: Manifest;
4
- };
5
- //# sourceMappingURL=get-constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-constants.d.ts","sourceRoot":"","sources":["../../src/utils/get-constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,YAAY,WAAY,QAAQ;;CAU5C,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConstants = void 0;
4
- const constants_1 = require("../constants");
5
- const getConstants = (params) => {
6
- const { resources } = params;
7
- const manifest = {
8
- resources: [...constants_1.RESOURCE_KINDS_RESOURCES, ...resources],
9
- };
10
- const res = { manifest };
11
- return res;
12
- };
13
- exports.getConstants = getConstants;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=get-constants.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-constants.test.d.ts","sourceRoot":"","sources":["../../src/utils/get-constants.test.ts"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const constants_1 = require("../constants");
4
- const get_constants_1 = require("./get-constants");
5
- const applicationResources = [
6
- {
7
- id: "main-app",
8
- kind: "APPLICATION",
9
- parentId: constants_1.ROOT_RESOURCE_ID,
10
- settings: {
11
- title: "主要应用",
12
- description: "",
13
- },
14
- },
15
- ];
16
- test("get constants", () => {
17
- const { manifest } = (0, get_constants_1.getConstants)({
18
- resources: applicationResources,
19
- });
20
- expect(manifest).toMatchSnapshot();
21
- });
@@ -1,2 +0,0 @@
1
- export * from "./get-constants";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-constants"), exports);