@ldsg/constants 0.3.9 → 0.3.17

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,165 @@
1
+ [
2
+ {
3
+ "path": "app.ts",
4
+ "data": "import { createApp } from '@ldsg/create-app';\nimport { Express } from 'express';\nimport MANIFEST_JSON from './manifest.json' with { type: '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.js';\n\nconst port = process.env.PORT || '3253';\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
+ "type": "module",
114
+ "scripts": {
115
+ "build": "tsc --project tsconfig.json",
116
+ "dev:obs": "tsx --import @ldsg/opentelemetry-node index.ts",
117
+ "start": "node dist/index.js",
118
+ "start:obs": "node --import @ldsg/opentelemetry-node ./dist/index.js"
119
+ },
120
+ "dependencies": {
121
+ "@ldsg/create-app": "workspace:*",
122
+ "@ldsg/opentelemetry-node": "workspace:*",
123
+ "graphql": "^16.9.0",
124
+ "graphql-middleware": "^6.1.35",
125
+ "graphql-shield": "^7.6.5"
126
+ },
127
+ "devDependencies": {
128
+ "@types/express": "^4.17.17",
129
+ "@types/node": "^22.1.0",
130
+ "ts-loader": "^9.5.1",
131
+ "ts-node": "~10.9.2",
132
+ "tslib": "^2.6.3",
133
+ "tsx": "~4.21.0",
134
+ "typescript": "^5.5.4"
135
+ }
136
+ }
137
+ },
138
+ {
139
+ "path": "tsconfig.json",
140
+ "data": {
141
+ "compilerOptions": {
142
+ "module": "NodeNext",
143
+ "declaration": true,
144
+ "removeComments": true,
145
+ "emitDecoratorMetadata": true,
146
+ "experimentalDecorators": true,
147
+ "allowSyntheticDefaultImports": true,
148
+ "target": "esnext",
149
+ "sourceMap": true,
150
+ "outDir": "./dist",
151
+ "baseUrl": "./",
152
+ "incremental": true,
153
+ "skipLibCheck": true,
154
+ "strictNullChecks": false,
155
+ "noImplicitAny": false,
156
+ "strictBindCallApply": false,
157
+ "forceConsistentCasingInFileNames": false,
158
+ "noFallthroughCasesInSwitch": false,
159
+ "resolveJsonModule": true,
160
+ "esModuleInterop": true
161
+ },
162
+ "include": ["./*.ts", "./service-records.json"]
163
+ }
164
+ }
165
+ ]
@@ -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,11 @@ 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;
154
+ type?: undefined;
128
155
  scripts?: undefined;
129
156
  dependencies?: undefined;
130
157
  devDependencies?: undefined;
@@ -136,26 +163,31 @@ export declare const FILES_IN_ROOT_MODULE: ({
136
163
  data: {
137
164
  name: string;
138
165
  version: string;
139
- description: string;
140
- author: string;
141
166
  private: boolean;
167
+ description: string;
142
168
  license: string;
169
+ author: string;
170
+ type: string;
143
171
  scripts: {
144
172
  build: string;
145
- "build:workspace-root": string;
146
- "build:recursive": string;
173
+ "dev:obs": string;
147
174
  start: string;
175
+ "start:obs": string;
148
176
  };
149
177
  dependencies: {
150
178
  "@ldsg/create-app": string;
179
+ "@ldsg/opentelemetry-node": string;
151
180
  graphql: string;
152
181
  "graphql-middleware": string;
153
182
  "graphql-shield": string;
154
183
  };
155
184
  devDependencies: {
185
+ "@types/express": string;
156
186
  "@types/node": string;
157
187
  "ts-loader": string;
188
+ "ts-node": string;
158
189
  tslib: string;
190
+ tsx: string;
159
191
  typescript: string;
160
192
  };
161
193
  resourceRecords?: undefined;
@@ -190,16 +222,17 @@ export declare const FILES_IN_ROOT_MODULE: ({
190
222
  resourceRecords?: undefined;
191
223
  name?: undefined;
192
224
  version?: undefined;
193
- description?: undefined;
194
- author?: undefined;
195
225
  private?: undefined;
226
+ description?: undefined;
196
227
  license?: undefined;
228
+ author?: undefined;
229
+ type?: undefined;
197
230
  scripts?: undefined;
198
231
  dependencies?: undefined;
199
232
  devDependencies?: undefined;
200
233
  };
201
234
  })[];
202
- export declare const FILES_IN_HANDLER_MODULE: ({
235
+ export declare const FILES_IN_HANDLER_TEMPLATE_MODULE: ({
203
236
  path: string;
204
237
  data: string;
205
238
  } | {
@@ -207,16 +240,23 @@ export declare const FILES_IN_HANDLER_MODULE: ({
207
240
  data: {
208
241
  name: string;
209
242
  version: string;
243
+ private: boolean;
210
244
  description: string;
245
+ license: string;
211
246
  main: string;
212
- files: string[];
213
247
  types: string;
248
+ files: string[];
214
249
  scripts: {
215
250
  build: string;
216
251
  };
217
- private: boolean;
218
- license: string;
219
252
  dependencies: {};
253
+ devDependencies: {
254
+ "@types/express": string;
255
+ "@types/node": string;
256
+ "ts-loader": string;
257
+ tslib: string;
258
+ typescript: string;
259
+ };
220
260
  compilerOptions?: undefined;
221
261
  include?: undefined;
222
262
  };
@@ -247,14 +287,15 @@ export declare const FILES_IN_HANDLER_MODULE: ({
247
287
  include: string[];
248
288
  name?: undefined;
249
289
  version?: undefined;
290
+ private?: undefined;
250
291
  description?: undefined;
292
+ license?: undefined;
251
293
  main?: undefined;
252
- files?: undefined;
253
294
  types?: undefined;
295
+ files?: undefined;
254
296
  scripts?: undefined;
255
- private?: undefined;
256
- license?: undefined;
257
297
  dependencies?: undefined;
298
+ devDependencies?: undefined;
258
299
  };
259
300
  })[];
260
301
  //# 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;