@codenotch/codenotch.cli 1.0.33 → 1.0.34

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.
Files changed (97) hide show
  1. package/dist/commands/index.js +2 -0
  2. package/dist/commands/index.js.map +1 -1
  3. package/dist/commands/validation/ValidationUtils.d.ts +28 -0
  4. package/dist/commands/validation/ValidationUtils.js +182 -0
  5. package/dist/commands/validation/ValidationUtils.js.map +1 -0
  6. package/dist/commands/validation/files/AppManifestValidator.d.ts +6 -0
  7. package/dist/commands/validation/files/AppManifestValidator.js +93 -0
  8. package/dist/commands/validation/files/AppManifestValidator.js.map +1 -0
  9. package/dist/commands/validation/files/BpmnValidator.d.ts +5 -0
  10. package/dist/commands/validation/files/BpmnValidator.js +32 -0
  11. package/dist/commands/validation/files/BpmnValidator.js.map +1 -0
  12. package/dist/commands/validation/files/DbSchemaValidator.d.ts +5 -0
  13. package/dist/commands/validation/files/DbSchemaValidator.js +16 -0
  14. package/dist/commands/validation/files/DbSchemaValidator.js.map +1 -0
  15. package/dist/commands/validation/files/DocumentValidator.d.ts +5 -0
  16. package/dist/commands/validation/files/DocumentValidator.js +12 -0
  17. package/dist/commands/validation/files/DocumentValidator.js.map +1 -0
  18. package/dist/commands/validation/files/I18nValidator.d.ts +5 -0
  19. package/dist/commands/validation/files/I18nValidator.js +13 -0
  20. package/dist/commands/validation/files/I18nValidator.js.map +1 -0
  21. package/dist/commands/validation/files/JsonValidator.d.ts +5 -0
  22. package/dist/commands/validation/files/JsonValidator.js +13 -0
  23. package/dist/commands/validation/files/JsonValidator.js.map +1 -0
  24. package/dist/commands/validation/files/ManifestCacheValidator.d.ts +5 -0
  25. package/dist/commands/validation/files/ManifestCacheValidator.js +121 -0
  26. package/dist/commands/validation/files/ManifestCacheValidator.js.map +1 -0
  27. package/dist/commands/validation/files/ManifestValidator.d.ts +5 -0
  28. package/dist/commands/validation/files/ManifestValidator.js +14 -0
  29. package/dist/commands/validation/files/ManifestValidator.js.map +1 -0
  30. package/dist/commands/validation/files/ScriptValidator.d.ts +12 -0
  31. package/dist/commands/validation/files/ScriptValidator.js +128 -0
  32. package/dist/commands/validation/files/ScriptValidator.js.map +1 -0
  33. package/dist/commands/validation/files/TableValidator.d.ts +5 -0
  34. package/dist/commands/validation/files/TableValidator.js +19 -0
  35. package/dist/commands/validation/files/TableValidator.js.map +1 -0
  36. package/dist/commands/validation/validate.d.ts +2 -0
  37. package/dist/commands/validation/validate.js +245 -0
  38. package/dist/commands/validation/validate.js.map +1 -0
  39. package/dist/utils/BuildUtils.d.ts +22 -4
  40. package/dist/utils/BuildUtils.js +45 -16
  41. package/dist/utils/BuildUtils.js.map +1 -1
  42. package/dist/utils/FileUtils.d.ts +13 -0
  43. package/dist/utils/FileUtils.js +30 -0
  44. package/dist/utils/FileUtils.js.map +1 -1
  45. package/dist/utils/I18nUtils.js +0 -2
  46. package/dist/utils/I18nUtils.js.map +1 -1
  47. package/package.json +14 -6
  48. package/.github/copilot-instructions.md +0 -3
  49. package/bin/cli.js +0 -3
  50. package/docs/ARCHITECTURE.md +0 -179
  51. package/docs/TODO.md +0 -18
  52. package/src/bin/cli.ts +0 -4
  53. package/src/commands/index.ts +0 -13
  54. package/src/commands/project/compile.ts +0 -20
  55. package/src/commands/project/deploy.ts +0 -11
  56. package/src/commands/project/index.ts +0 -28
  57. package/src/commands/project/inspect.ts +0 -12
  58. package/src/commands/project/new.ts +0 -11
  59. package/src/commands/project/open.ts +0 -21
  60. package/src/commands/project/package.ts +0 -20
  61. package/src/commands/project/refresh.ts +0 -13
  62. package/src/commands/project/remove.ts +0 -12
  63. package/src/commands/project/shared.ts +0 -9
  64. package/src/commands/project/start.ts +0 -24
  65. package/src/commands/project/test.ts +0 -15
  66. package/src/commands/react/build.ts +0 -12
  67. package/src/commands/react/index.ts +0 -12
  68. package/src/commands/react/serve.ts +0 -13
  69. package/src/commands/runtime/clear.ts +0 -11
  70. package/src/commands/runtime/index.ts +0 -24
  71. package/src/commands/runtime/info.ts +0 -47
  72. package/src/commands/runtime/latest.ts +0 -18
  73. package/src/commands/runtime/portal.ts +0 -20
  74. package/src/commands/runtime/start.ts +0 -16
  75. package/src/commands/runtime/stop.ts +0 -13
  76. package/src/commands/runtime/update.ts +0 -12
  77. package/src/commands/system/index.ts +0 -9
  78. package/src/commands/system/info.ts +0 -23
  79. package/src/commands/system/read.ts +0 -25
  80. package/src/index.ts +0 -22
  81. package/src/models/Codenotch.ts +0 -361
  82. package/src/models/DbModels.ts +0 -428
  83. package/src/models/OpenApiModels.ts +0 -145
  84. package/src/utils/BuildUtils.ts +0 -739
  85. package/src/utils/ConsoleUtils.ts +0 -22
  86. package/src/utils/FileUtils.ts +0 -266
  87. package/src/utils/GitHubAuthUtils.ts +0 -83
  88. package/src/utils/I18nUtils.ts +0 -58
  89. package/src/utils/OpenAPIUtils.ts +0 -285
  90. package/src/utils/OsUtils.ts +0 -32
  91. package/src/utils/ProjectCompilationUtils.ts +0 -1002
  92. package/src/utils/ProjectUtils.ts +0 -151
  93. package/src/utils/RuntimeUtils.ts +0 -743
  94. package/src/utils/ServeUtils.ts +0 -175
  95. package/src/utils/ShellUtils.ts +0 -26
  96. package/src/utils/StringUtils.ts +0 -80
  97. package/tsconfig.json +0 -35
@@ -1,361 +0,0 @@
1
- import { JSONSchema7 } from "json-schema";
2
-
3
- export interface IWorkspaceCache {
4
- apis: ProjectManifestApi[];
5
- applications: ProjectManifestApplication[];
6
- reactApplications: ProjectManifestReactApplication[];
7
- expressComponents: ProjectManifestExpressComponent[];
8
- scripts: ProjectManifestScript[];
9
- pdfs: ProjectManifestPdf[];
10
- emails: ProjectManifestEmail[];
11
- htmls: ProjectManifestHtml[];
12
- processes: ProjectManifestProcess[];
13
- tableDataSources: ProjectManifestDatastore[];
14
- documentDataSources: ProjectManifestDatastore[];
15
- }
16
-
17
- export class ProjectManifest {
18
- projectName: string;
19
- serviceName: string;
20
- version: string;
21
- index?: string; // The app that is served for the project root (/Tenant/myProject), default to Index.auml
22
- packages: { [packageSource: string]: string };
23
- apis: ProjectManifestApi[];
24
- languages?: string[];
25
-
26
- dependencies?: (ProjectManifestDependency | string)[];
27
-
28
- applications: ProjectManifestApplication[];
29
- reactApplications: ProjectManifestReactApplication[] | undefined; // React applications that can be served and embedded in express applications
30
- expressComponents: ProjectManifestExpressComponent[] | undefined; // reusable AUML components that can be embedded in applications
31
- scripts: ProjectManifestScript[] | undefined;
32
- pdfs: ProjectManifestPdf[] | undefined;
33
- emails: ProjectManifestEmail[] | undefined;
34
- htmls: ProjectManifestHtml[] | undefined;
35
-
36
- processes: ProjectManifestProcess[];
37
-
38
- tableDataSources: ProjectManifestDatastore[];
39
- documentDataSources: ProjectManifestDatastore[];
40
-
41
- roles: ProjectManifestRole[];
42
-
43
- postInstallationProcesses?: ProjectManifestPostInstallationProcess[];
44
-
45
- constructor() {
46
- this.projectName = '';
47
- this.serviceName = '';
48
- this.version = '0.0.0';
49
- this.packages = {};
50
- this.apis = [];
51
- this.applications = [];
52
- this.expressComponents = [];
53
- this.scripts = [];
54
- this.pdfs = [];
55
- this.emails = [];
56
- this.htmls = [];
57
- this.processes = [];
58
- this.tableDataSources = [];
59
- this.documentDataSources = [];
60
- this.roles = [];
61
- this.languages = [];
62
- this.postInstallationProcesses = [];
63
- }
64
- }
65
-
66
- export class ProjectManifestPostInstallationProcess {
67
- processName: string = '';;
68
- startEvent: string = '';;
69
- }
70
-
71
- export class ProjectManifestDependency {
72
- name: string = '';
73
- version?: string = '';
74
- //TODO more options ? optional dependency, auto install, ...
75
- }
76
-
77
- export class ProjectManifestRole {
78
- name: string = ''
79
- description: string = ''
80
- }
81
-
82
- export class ProjectManifestDatastore {
83
- name: string;
84
- file: string;
85
- ttlMinutes?: number;
86
-
87
- constructor() {
88
- this.name = '';
89
- this.file = '';
90
- }
91
- }
92
-
93
- export class ProjectManifestProcess {
94
- processName: string;
95
- file: string;
96
- startEvents: ProjectManifestProcessStartEvent[];
97
- endEvent: JSONSchema7;
98
- signals: ProjectManigestSignal[];
99
- priority?: "immediate" | "high" | "medium" | "low";
100
- minThreads?: number;
101
- maxThreads?: number;
102
-
103
- constructor() {
104
- this.processName = '';
105
- this.file = '';
106
- this.startEvents = [];
107
- this.endEvent = {};
108
- this.signals = [];
109
- }
110
- }
111
-
112
- export class ProjectManigestSignal {
113
- signalId: string = '';
114
- type: string = '';
115
- }
116
-
117
- export class ProjectManifestProcessStartEvent {
118
- nodeId: string;
119
- kind: string;
120
- scope: string;
121
- roles: string[];
122
- input: JSONSchema7;
123
-
124
- constructor() {
125
- this.nodeId = '';
126
- this.kind = '';
127
- this.scope = '';
128
- this.roles = [];
129
- this.input = {};
130
- }
131
- }
132
-
133
- export class ProjectManifestReactApplication {
134
- applicationName: string;
135
- file: string;
136
- scope: string;
137
- roles: string[];
138
-
139
- constructor() {
140
- this.applicationName = '';
141
- this.file = '';
142
- this.scope = '';
143
- this.roles = [];
144
- }
145
- }
146
- export class ProjectManifestApplication {
147
- applicationName: string;
148
- file: string;
149
- scope: string;
150
- roles: string[];
151
-
152
- constructor() {
153
- this.applicationName = '';
154
- this.file = '';
155
- this.scope = '';
156
- this.roles = [];
157
- }
158
- }
159
-
160
- export class ProjectManifestPdf {
161
- name: string;
162
- file: string;
163
-
164
- constructor() {
165
- this.name = '';
166
- this.file = '';
167
- }
168
- }
169
-
170
- export class ProjectManifestEmail {
171
- name: string;
172
- file: string;
173
-
174
- constructor() {
175
- this.name = '';
176
- this.file = '';
177
- }
178
- }
179
-
180
- export class ProjectManifestHtml {
181
- name: string;
182
- file: string;
183
-
184
- constructor() {
185
- this.name = '';
186
- this.file = '';
187
- }
188
- }
189
-
190
- export class ProjectManifestExpressComponent {
191
- componentName: string;
192
- file: string;
193
-
194
- constructor() {
195
- this.componentName = '';
196
- this.file = '';
197
- }
198
- }
199
-
200
- export class ProjectManifestScript {
201
- file: string;
202
-
203
- constructor() {
204
- this.file = '';
205
- }
206
- }
207
-
208
- export class ProjectManifestApplicationInsight {
209
- key: string;
210
- constructor() {
211
- this.key = '';
212
- }
213
- }
214
-
215
- export class ProjectManifestApi {
216
- path: string;
217
- method: string;
218
- bpmn: string;
219
- startNode: string;
220
- accept: string;
221
- priority?: "immediate" | "high" | "medium" | "low";
222
- minThreads?: number;
223
- maxThreads?: number;
224
-
225
- constructor() {
226
- this.path = '';
227
- this.method = '';
228
- this.bpmn = '';
229
- this.startNode = '';
230
- this.accept = '';
231
- }
232
- }
233
-
234
- export class ProjectManifestParameter {
235
- key: string;
236
- value: string;
237
-
238
- constructor() {
239
- this.key = '';
240
- this.value = '';
241
- }
242
- }
243
- export interface IScenarioProjectManifest {
244
- projectName: string;
245
- serviceName: string;
246
- version: string;
247
-
248
- /**
249
- * Expect an auml application name
250
- */
251
- index?: string;
252
- packages: {
253
- [packageSource: string]: string;
254
- };
255
- languages?: string[];
256
- dependencies?: (ProjectManifestDependency | string)[];
257
- roles: ProjectManifestRole[];
258
- postInstallationProcesses?: ProjectManifestPostInstallationProcess[];
259
- bpmnActivities?: { name: string, version: string }[];
260
- }
261
-
262
- export interface ApplicationManifest {
263
- pwa?: PWAManifest;
264
- html?: HTMLManifest;
265
- auml?: AUMLManifest;
266
- }
267
- export interface HTMLManifest {
268
- title?: string;
269
- description?: string;
270
- author?: string;
271
- keywords?: string;
272
- charset?: string;
273
- }
274
-
275
-
276
- export interface PWAManifest {
277
- background_color?: string;
278
- description?: string;
279
- dir?: string;
280
- display?: string;
281
- icons?: PWAManifestIcon[];
282
- lang?: string;
283
- name?: string;
284
- orientation?: string;
285
- prefer_related_applications?: boolean;
286
- related_applications?: PWAManifestRelatedApplications[];
287
- scope?: string;
288
- short_name?: string;
289
- start_url?: string;
290
- theme_color?: string;
291
- shortcuts?: string;
292
-
293
- display_override?: string[];
294
- }
295
-
296
-
297
-
298
- export interface PWAManifestIcon {
299
- src?: string;
300
- sizes?: string;
301
- type?: string;
302
- }
303
-
304
- export interface PWAManifestRelatedApplications {
305
- platform?: string;
306
- url?: string;
307
- id?: string;
308
- }
309
-
310
- export interface AUMLManifest {
311
- name?: string;
312
- description?: string;
313
- logoURL?: string;
314
- roles?: string[];
315
- scope?: 'Public' | 'Internal' | 'External';
316
- }
317
-
318
-
319
- export interface ProjectState {
320
- projectId: string;
321
- projectLocation: ProjectLocation;
322
- projectVersion: string;
323
- serviceName: string;
324
- time: string;
325
- status: ProjectDeploymentStatus;
326
- errors: string[] | null;
327
- warnings: string[] | null;
328
- }
329
-
330
- export type ProjectDeploymentStatus = 'READY' | 'IN_PROGRESS' | 'FAILURE' | 'REMOVING';
331
- export type ProjectLocation = 'marketplace' | 'git' | 'upload';
332
-
333
- export interface IProcessTestReport {
334
-
335
- ExecutionId: string; // Unique id for this execution of the test
336
-
337
- Project: string; // Name of the project, NOT the service
338
-
339
- ProjectVersion: string;
340
-
341
- Success: boolean; // Overall result of the test
342
-
343
- SuccessCount: number;
344
-
345
- FailureCount: number;
346
-
347
- Tests: IProcessTestExecutionResult[]; // Individual results for each test
348
- }
349
-
350
- export interface IProcessTestExecutionResult {
351
- Name: string;
352
- Success: boolean;
353
- Errors: string[];
354
- Asserts: IProcessTestAssertionResult[];
355
- }
356
-
357
- export interface IProcessTestAssertionResult {
358
- Name: string;
359
- Success: boolean;
360
- Errors: string[];
361
- }