@ldsg/constants 0.3.9 → 0.3.10

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,159 @@
1
+ [
2
+ {
3
+ "path": "app.ts",
4
+ "data": "import { createApp } from '@ldsg/create-app';\nimport { Express } from 'express';\nimport MANIFEST_JSON from './manifest.json';\n\nconst { resourceRecords } = MANIFEST_JSON as any;\n\nexport const app: Express = createApp({\n resourceRecords\n});\n"
5
+ },
6
+ {
7
+ "path": "index.ts",
8
+ "data": "import { app } from './app';\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"
9
+ },
10
+ {
11
+ "path": "manifest.json",
12
+ "data": {
13
+ "resourceRecords": [
14
+ {
15
+ "id": "resource-definition-resource-definition",
16
+ "kind": "resource_definition",
17
+ "parentId": "root",
18
+ "settings": {
19
+ "title": "资源定义资源定义",
20
+ "description": "",
21
+ "kind": "resource_definition",
22
+ "parentKind": ""
23
+ }
24
+ },
25
+ {
26
+ "id": "resource-definition-resource-handler",
27
+ "kind": "handler",
28
+ "parentId": "resource-definition-resource-definition",
29
+ "settings": {
30
+ "title": "资源定义实例化资源处理程序",
31
+ "description": "",
32
+ "code": "export * from \"@ldsg/resource-definition\";",
33
+ "dependencies": [
34
+ {
35
+ "name": "@ldsg/resource-definition"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "id": "handler-resource-definition",
42
+ "kind": "resource_definition",
43
+ "parentId": "root",
44
+ "settings": {
45
+ "title": "处理程序资源定义",
46
+ "description": "主要包含引入模块列表与相应的处理程序代码,处理程序类型资源无子级资源。",
47
+ "kind": "handler",
48
+ "parentKind": ""
49
+ }
50
+ },
51
+ {
52
+ "id": "handler-resource-handler",
53
+ "kind": "handler",
54
+ "parentId": "handler-resource-definition",
55
+ "settings": {
56
+ "title": "处理程序实例化资源处理程序",
57
+ "description": "包含处理程序相应的模块,此模块主要通过",
58
+ "code": "export * from \"@ldsg/handler\";",
59
+ "dependencies": [
60
+ {
61
+ "name": "@ldsg/handler"
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "id": "application-resource-definition",
68
+ "kind": "resource_definition",
69
+ "parentId": "root",
70
+ "settings": {
71
+ "title": "应用资源定义",
72
+ "description": "",
73
+ "kind": "application",
74
+ "parentKind": ""
75
+ }
76
+ },
77
+ {
78
+ "id": "application-resource-handler",
79
+ "kind": "handler",
80
+ "parentId": "application-resource-definition",
81
+ "settings": {
82
+ "title": "应用实例化资源处理程序",
83
+ "description": "",
84
+ "code": "export * from \"@ldsg/application\";",
85
+ "dependencies": [
86
+ {
87
+ "name": "@ldsg/application"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ {
93
+ "id": "main-app",
94
+ "kind": "application",
95
+ "parentId": "root",
96
+ "settings": {
97
+ "title": "主要应用",
98
+ "description": ""
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ },
104
+ {
105
+ "path": "package.json",
106
+ "data": {
107
+ "name": "@ldsg/app-template",
108
+ "version": "0.0.0",
109
+ "private": true,
110
+ "description": "",
111
+ "license": "UNLICENSED",
112
+ "author": "",
113
+ "scripts": {
114
+ "build": "tsc --project tsconfig.json",
115
+ "start": "node dist/index.js"
116
+ },
117
+ "dependencies": {
118
+ "@ldsg/create-app": "workspace:*",
119
+ "graphql": "^16.9.0",
120
+ "graphql-middleware": "^6.1.35",
121
+ "graphql-shield": "^7.6.5"
122
+ },
123
+ "devDependencies": {
124
+ "@types/express": "^4.17.17",
125
+ "@types/node": "^22.1.0",
126
+ "ts-loader": "^9.5.1",
127
+ "tslib": "^2.6.3",
128
+ "typescript": "^5.5.4"
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "path": "tsconfig.json",
134
+ "data": {
135
+ "compilerOptions": {
136
+ "module": "commonjs",
137
+ "declaration": true,
138
+ "removeComments": true,
139
+ "emitDecoratorMetadata": true,
140
+ "experimentalDecorators": true,
141
+ "allowSyntheticDefaultImports": true,
142
+ "target": "ES2021",
143
+ "sourceMap": true,
144
+ "outDir": "./dist",
145
+ "baseUrl": "./",
146
+ "incremental": true,
147
+ "skipLibCheck": true,
148
+ "strictNullChecks": false,
149
+ "noImplicitAny": false,
150
+ "strictBindCallApply": false,
151
+ "forceConsistentCasingInFileNames": false,
152
+ "noFallthroughCasesInSwitch": false,
153
+ "resolveJsonModule": true,
154
+ "esModuleInterop": true
155
+ },
156
+ "include": ["./index.ts", "./app.ts", "./service-records.json"]
157
+ }
158
+ }
159
+ ]
@@ -0,0 +1,57 @@
1
+ [
2
+ {
3
+ "path": "index.ts",
4
+ "data": "export const handler = () => {};\n"
5
+ },
6
+ {
7
+ "path": "package.json",
8
+ "data": {
9
+ "name": "@ldsg/handler-template",
10
+ "version": "0.0.0",
11
+ "private": true,
12
+ "description": "",
13
+ "license": "UNLICENSED",
14
+ "main": "dist/index.js",
15
+ "types": "dist",
16
+ "files": ["dist/"],
17
+ "scripts": {
18
+ "build": "tsc"
19
+ },
20
+ "dependencies": {},
21
+ "devDependencies": {
22
+ "@types/express": "^4.17.17",
23
+ "@types/node": "^22.1.0",
24
+ "ts-loader": "^9.5.1",
25
+ "tslib": "^2.6.3",
26
+ "typescript": "^5.5.4"
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "path": "tsconfig.json",
32
+ "data": {
33
+ "compilerOptions": {
34
+ "module": "commonjs",
35
+ "declaration": true,
36
+ "removeComments": true,
37
+ "emitDecoratorMetadata": true,
38
+ "experimentalDecorators": true,
39
+ "allowSyntheticDefaultImports": true,
40
+ "target": "ES2021",
41
+ "sourceMap": true,
42
+ "outDir": "./dist",
43
+ "baseUrl": "./",
44
+ "incremental": true,
45
+ "skipLibCheck": true,
46
+ "strictNullChecks": false,
47
+ "noImplicitAny": false,
48
+ "strictBindCallApply": false,
49
+ "forceConsistentCasingInFileNames": false,
50
+ "noFallthroughCasesInSwitch": false,
51
+ "resolveJsonModule": true,
52
+ "esModuleInterop": true
53
+ },
54
+ "include": ["./index.ts"]
55
+ }
56
+ }
57
+ ]
package/dist/index.d.ts CHANGED
@@ -29,6 +29,19 @@ export declare const RESOURCE_DEFINITION_RELATED_RESOURCE_RECORDS: ({
29
29
  kind?: undefined;
30
30
  parentKind?: undefined;
31
31
  };
32
+ } | {
33
+ id: string;
34
+ kind: string;
35
+ parentId: string;
36
+ settings: {
37
+ handlerResourceId: string;
38
+ title: string;
39
+ description: string;
40
+ kind: string;
41
+ parentKind?: undefined;
42
+ code?: undefined;
43
+ dependencies?: undefined;
44
+ };
32
45
  })[];
33
46
  export declare const APP_MANIFEST: {
34
47
  resourceRecords: ({
@@ -59,6 +72,19 @@ export declare const APP_MANIFEST: {
59
72
  kind?: undefined;
60
73
  parentKind?: undefined;
61
74
  };
75
+ } | {
76
+ id: string;
77
+ kind: string;
78
+ parentId: string;
79
+ settings: {
80
+ handlerResourceId: string;
81
+ title: string;
82
+ description: string;
83
+ kind: string;
84
+ parentKind?: undefined;
85
+ code?: undefined;
86
+ dependencies?: undefined;
87
+ };
62
88
  } | {
63
89
  id: string;
64
90
  kind: string;
@@ -74,7 +100,7 @@ export declare const APP_MANIFEST: {
74
100
  };
75
101
  })[];
76
102
  };
77
- export declare const FILES_IN_ROOT_MODULE: ({
103
+ export declare const FILES_IN_APP_TEMPLATE_MODULE: ({
78
104
  path: string;
79
105
  data: string;
80
106
  } | {
@@ -121,10 +147,10 @@ export declare const FILES_IN_ROOT_MODULE: ({
121
147
  })[];
122
148
  name?: undefined;
123
149
  version?: undefined;
124
- description?: undefined;
125
- author?: undefined;
126
150
  private?: undefined;
151
+ description?: undefined;
127
152
  license?: undefined;
153
+ author?: undefined;
128
154
  scripts?: undefined;
129
155
  dependencies?: undefined;
130
156
  devDependencies?: undefined;
@@ -136,14 +162,12 @@ export declare const FILES_IN_ROOT_MODULE: ({
136
162
  data: {
137
163
  name: string;
138
164
  version: string;
139
- description: string;
140
- author: string;
141
165
  private: boolean;
166
+ description: string;
142
167
  license: string;
168
+ author: string;
143
169
  scripts: {
144
170
  build: string;
145
- "build:workspace-root": string;
146
- "build:recursive": string;
147
171
  start: string;
148
172
  };
149
173
  dependencies: {
@@ -153,6 +177,7 @@ export declare const FILES_IN_ROOT_MODULE: ({
153
177
  "graphql-shield": string;
154
178
  };
155
179
  devDependencies: {
180
+ "@types/express": string;
156
181
  "@types/node": string;
157
182
  "ts-loader": string;
158
183
  tslib: string;
@@ -190,16 +215,16 @@ export declare const FILES_IN_ROOT_MODULE: ({
190
215
  resourceRecords?: undefined;
191
216
  name?: undefined;
192
217
  version?: undefined;
193
- description?: undefined;
194
- author?: undefined;
195
218
  private?: undefined;
219
+ description?: undefined;
196
220
  license?: undefined;
221
+ author?: undefined;
197
222
  scripts?: undefined;
198
223
  dependencies?: undefined;
199
224
  devDependencies?: undefined;
200
225
  };
201
226
  })[];
202
- export declare const FILES_IN_HANDLER_MODULE: ({
227
+ export declare const FILES_IN_HANDLER_TEMPLATE_MODULE: ({
203
228
  path: string;
204
229
  data: string;
205
230
  } | {
@@ -207,16 +232,23 @@ export declare const FILES_IN_HANDLER_MODULE: ({
207
232
  data: {
208
233
  name: string;
209
234
  version: string;
235
+ private: boolean;
210
236
  description: string;
237
+ license: string;
211
238
  main: string;
212
- files: string[];
213
239
  types: string;
240
+ files: string[];
214
241
  scripts: {
215
242
  build: string;
216
243
  };
217
- private: boolean;
218
- license: string;
219
244
  dependencies: {};
245
+ devDependencies: {
246
+ "@types/express": string;
247
+ "@types/node": string;
248
+ "ts-loader": string;
249
+ tslib: string;
250
+ typescript: string;
251
+ };
220
252
  compilerOptions?: undefined;
221
253
  include?: undefined;
222
254
  };
@@ -247,14 +279,15 @@ export declare const FILES_IN_HANDLER_MODULE: ({
247
279
  include: string[];
248
280
  name?: undefined;
249
281
  version?: undefined;
282
+ private?: undefined;
250
283
  description?: undefined;
284
+ license?: undefined;
251
285
  main?: undefined;
252
- files?: undefined;
253
286
  types?: undefined;
287
+ files?: undefined;
254
288
  scripts?: undefined;
255
- private?: undefined;
256
- license?: undefined;
257
289
  dependencies?: undefined;
290
+ devDependencies?: undefined;
258
291
  };
259
292
  })[];
260
293
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoD,CAAC;AAE9G,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAC;AAE9C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA4B,CAAC;AAE9D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA+B,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,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoD,CAAC;AAE9G,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAC;AAE9C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAoC,CAAC;AAE9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAwC,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FILES_IN_HANDLER_MODULE = exports.FILES_IN_ROOT_MODULE = exports.APP_MANIFEST = exports.RESOURCE_DEFINITION_RELATED_RESOURCE_RECORDS = exports.ROOT_RESOURCE_KIND = exports.ROOT_RESOURCE_ID = exports.BASE_RESOURCE_KINDS = void 0;
6
+ exports.FILES_IN_HANDLER_TEMPLATE_MODULE = exports.FILES_IN_APP_TEMPLATE_MODULE = exports.APP_MANIFEST = exports.RESOURCE_DEFINITION_RELATED_RESOURCE_RECORDS = exports.ROOT_RESOURCE_KIND = exports.ROOT_RESOURCE_ID = exports.BASE_RESOURCE_KINDS = void 0;
7
7
  const base_resource_kinds_json_1 = __importDefault(require("./base-resource-kinds.json"));
8
8
  exports.BASE_RESOURCE_KINDS = base_resource_kinds_json_1.default;
9
9
  const root_resource_id_json_1 = __importDefault(require("./root-resource-id.json"));
@@ -14,7 +14,7 @@ const resource_definition_related_resource_records_json_1 = __importDefault(requ
14
14
  exports.RESOURCE_DEFINITION_RELATED_RESOURCE_RECORDS = resource_definition_related_resource_records_json_1.default;
15
15
  const app_manifest_json_1 = __importDefault(require("./app-manifest.json"));
16
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;
17
+ const files_in_app_template_module_json_1 = __importDefault(require("./files-in-app-template-module.json"));
18
+ exports.FILES_IN_APP_TEMPLATE_MODULE = files_in_app_template_module_json_1.default;
19
+ const files_in_handler_template_module_json_1 = __importDefault(require("./files-in-handler-template-module.json"));
20
+ exports.FILES_IN_HANDLER_TEMPLATE_MODULE = files_in_handler_template_module_json_1.default;