@memberjunction/open-app-engine 0.0.1 → 5.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.
Files changed (58) hide show
  1. package/dist/dependency/dependency-resolver.d.ts +23 -0
  2. package/dist/dependency/dependency-resolver.d.ts.map +1 -0
  3. package/dist/dependency/dependency-resolver.js +63 -0
  4. package/dist/dependency/dependency-resolver.js.map +1 -0
  5. package/dist/dependency/version-checker.d.ts +8 -0
  6. package/dist/dependency/version-checker.d.ts.map +1 -0
  7. package/dist/dependency/version-checker.js +65 -0
  8. package/dist/dependency/version-checker.js.map +1 -0
  9. package/dist/github/github-client.d.ts +29 -0
  10. package/dist/github/github-client.d.ts.map +1 -0
  11. package/dist/github/github-client.js +127 -0
  12. package/dist/github/github-client.js.map +1 -0
  13. package/dist/index.d.ts +25 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +13 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/install/client-bootstrap-gen.d.ts +8 -0
  18. package/dist/install/client-bootstrap-gen.d.ts.map +1 -0
  19. package/dist/install/client-bootstrap-gen.js +35 -0
  20. package/dist/install/client-bootstrap-gen.js.map +1 -0
  21. package/dist/install/config-manager.d.ts +15 -0
  22. package/dist/install/config-manager.d.ts.map +1 -0
  23. package/dist/install/config-manager.js +114 -0
  24. package/dist/install/config-manager.js.map +1 -0
  25. package/dist/install/history-recorder.d.ts +25 -0
  26. package/dist/install/history-recorder.d.ts.map +1 -0
  27. package/dist/install/history-recorder.js +184 -0
  28. package/dist/install/history-recorder.js.map +1 -0
  29. package/dist/install/install-orchestrator.d.ts +20 -0
  30. package/dist/install/install-orchestrator.d.ts.map +1 -0
  31. package/dist/install/install-orchestrator.js +634 -0
  32. package/dist/install/install-orchestrator.js.map +1 -0
  33. package/dist/install/migration-runner.d.ts +23 -0
  34. package/dist/install/migration-runner.d.ts.map +1 -0
  35. package/dist/install/migration-runner.js +66 -0
  36. package/dist/install/migration-runner.js.map +1 -0
  37. package/dist/install/package-manager.d.ts +19 -0
  38. package/dist/install/package-manager.d.ts.map +1 -0
  39. package/dist/install/package-manager.js +89 -0
  40. package/dist/install/package-manager.js.map +1 -0
  41. package/dist/install/schema-manager.d.ts +11 -0
  42. package/dist/install/schema-manager.d.ts.map +1 -0
  43. package/dist/install/schema-manager.js +125 -0
  44. package/dist/install/schema-manager.js.map +1 -0
  45. package/dist/manifest/manifest-loader.d.ts +10 -0
  46. package/dist/manifest/manifest-loader.d.ts.map +1 -0
  47. package/dist/manifest/manifest-loader.js +30 -0
  48. package/dist/manifest/manifest-loader.js.map +1 -0
  49. package/dist/manifest/manifest-schema.d.ts +351 -0
  50. package/dist/manifest/manifest-schema.d.ts.map +1 -0
  51. package/dist/manifest/manifest-schema.js +80 -0
  52. package/dist/manifest/manifest-schema.js.map +1 -0
  53. package/dist/types/open-app-types.d.ts +66 -0
  54. package/dist/types/open-app-types.d.ts.map +1 -0
  55. package/dist/types/open-app-types.js +2 -0
  56. package/dist/types/open-app-types.js.map +1 -0
  57. package/package.json +34 -7
  58. package/README.md +0 -45
@@ -0,0 +1,351 @@
1
+ import { z } from 'zod';
2
+ declare const packageRoleSchema: z.ZodEnum<["bootstrap", "actions", "engine", "provider", "module", "components", "library"]>;
3
+ declare const packageEntrySchema: z.ZodEffects<z.ZodObject<{
4
+ name: z.ZodString;
5
+ role: z.ZodEnum<["bootstrap", "actions", "engine", "provider", "module", "components", "library"]>;
6
+ startupExport: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name?: string;
9
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
10
+ startupExport?: string;
11
+ }, {
12
+ name?: string;
13
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
14
+ startupExport?: string;
15
+ }>, {
16
+ name?: string;
17
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
18
+ startupExport?: string;
19
+ }, {
20
+ name?: string;
21
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
22
+ startupExport?: string;
23
+ }>;
24
+ export declare const mjAppManifestSchema: z.ZodObject<{
25
+ $schema: z.ZodOptional<z.ZodString>;
26
+ manifestVersion: z.ZodLiteral<1>;
27
+ name: z.ZodString;
28
+ displayName: z.ZodString;
29
+ description: z.ZodString;
30
+ version: z.ZodString;
31
+ license: z.ZodOptional<z.ZodString>;
32
+ icon: z.ZodOptional<z.ZodString>;
33
+ color: z.ZodOptional<z.ZodString>;
34
+ publisher: z.ZodObject<{
35
+ name: z.ZodString;
36
+ email: z.ZodOptional<z.ZodString>;
37
+ url: z.ZodOptional<z.ZodString>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ name?: string;
40
+ email?: string;
41
+ url?: string;
42
+ }, {
43
+ name?: string;
44
+ email?: string;
45
+ url?: string;
46
+ }>;
47
+ repository: z.ZodString;
48
+ mjVersionRange: z.ZodString;
49
+ schema: z.ZodOptional<z.ZodObject<{
50
+ name: z.ZodString;
51
+ createIfNotExists: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ name?: string;
54
+ createIfNotExists?: boolean;
55
+ }, {
56
+ name?: string;
57
+ createIfNotExists?: boolean;
58
+ }>>;
59
+ migrations: z.ZodOptional<z.ZodObject<{
60
+ directory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
61
+ engine: z.ZodDefault<z.ZodOptional<z.ZodEnum<["flyway", "skyway"]>>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ engine?: "flyway" | "skyway";
64
+ directory?: string;
65
+ }, {
66
+ engine?: "flyway" | "skyway";
67
+ directory?: string;
68
+ }>>;
69
+ metadata: z.ZodOptional<z.ZodObject<{
70
+ directory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ directory?: string;
73
+ }, {
74
+ directory?: string;
75
+ }>>;
76
+ packages: z.ZodObject<{
77
+ registry: z.ZodOptional<z.ZodString>;
78
+ server: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
79
+ name: z.ZodString;
80
+ role: z.ZodEnum<["bootstrap", "actions", "engine", "provider", "module", "components", "library"]>;
81
+ startupExport: z.ZodOptional<z.ZodString>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ name?: string;
84
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
85
+ startupExport?: string;
86
+ }, {
87
+ name?: string;
88
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
89
+ startupExport?: string;
90
+ }>, {
91
+ name?: string;
92
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
93
+ startupExport?: string;
94
+ }, {
95
+ name?: string;
96
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
97
+ startupExport?: string;
98
+ }>, "many">>;
99
+ client: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
100
+ name: z.ZodString;
101
+ role: z.ZodEnum<["bootstrap", "actions", "engine", "provider", "module", "components", "library"]>;
102
+ startupExport: z.ZodOptional<z.ZodString>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ name?: string;
105
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
106
+ startupExport?: string;
107
+ }, {
108
+ name?: string;
109
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
110
+ startupExport?: string;
111
+ }>, {
112
+ name?: string;
113
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
114
+ startupExport?: string;
115
+ }, {
116
+ name?: string;
117
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
118
+ startupExport?: string;
119
+ }>, "many">>;
120
+ shared: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
121
+ name: z.ZodString;
122
+ role: z.ZodEnum<["bootstrap", "actions", "engine", "provider", "module", "components", "library"]>;
123
+ startupExport: z.ZodOptional<z.ZodString>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ name?: string;
126
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
127
+ startupExport?: string;
128
+ }, {
129
+ name?: string;
130
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
131
+ startupExport?: string;
132
+ }>, {
133
+ name?: string;
134
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
135
+ startupExport?: string;
136
+ }, {
137
+ name?: string;
138
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
139
+ startupExport?: string;
140
+ }>, "many">>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ registry?: string;
143
+ server?: {
144
+ name?: string;
145
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
146
+ startupExport?: string;
147
+ }[];
148
+ client?: {
149
+ name?: string;
150
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
151
+ startupExport?: string;
152
+ }[];
153
+ shared?: {
154
+ name?: string;
155
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
156
+ startupExport?: string;
157
+ }[];
158
+ }, {
159
+ registry?: string;
160
+ server?: {
161
+ name?: string;
162
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
163
+ startupExport?: string;
164
+ }[];
165
+ client?: {
166
+ name?: string;
167
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
168
+ startupExport?: string;
169
+ }[];
170
+ shared?: {
171
+ name?: string;
172
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
173
+ startupExport?: string;
174
+ }[];
175
+ }>;
176
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
177
+ version: z.ZodString;
178
+ repository: z.ZodString;
179
+ }, "strip", z.ZodTypeAny, {
180
+ version?: string;
181
+ repository?: string;
182
+ }, {
183
+ version?: string;
184
+ repository?: string;
185
+ }>]>>>;
186
+ code: z.ZodOptional<z.ZodObject<{
187
+ visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<["public", "private"]>>>;
188
+ sourceDirectory: z.ZodOptional<z.ZodString>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ visibility?: "public" | "private";
191
+ sourceDirectory?: string;
192
+ }, {
193
+ visibility?: "public" | "private";
194
+ sourceDirectory?: string;
195
+ }>>;
196
+ configuration: z.ZodOptional<z.ZodObject<{
197
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ schema?: Record<string, unknown>;
200
+ }, {
201
+ schema?: Record<string, unknown>;
202
+ }>>;
203
+ hooks: z.ZodOptional<z.ZodObject<{
204
+ postInstall: z.ZodOptional<z.ZodString>;
205
+ postUpgrade: z.ZodOptional<z.ZodString>;
206
+ preRemove: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ postInstall?: string;
209
+ postUpgrade?: string;
210
+ preRemove?: string;
211
+ }, {
212
+ postInstall?: string;
213
+ postUpgrade?: string;
214
+ preRemove?: string;
215
+ }>>;
216
+ categories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
217
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ name?: string;
220
+ code?: {
221
+ visibility?: "public" | "private";
222
+ sourceDirectory?: string;
223
+ };
224
+ migrations?: {
225
+ engine?: "flyway" | "skyway";
226
+ directory?: string;
227
+ };
228
+ metadata?: {
229
+ directory?: string;
230
+ };
231
+ schema?: {
232
+ name?: string;
233
+ createIfNotExists?: boolean;
234
+ };
235
+ $schema?: string;
236
+ manifestVersion?: 1;
237
+ displayName?: string;
238
+ description?: string;
239
+ version?: string;
240
+ license?: string;
241
+ icon?: string;
242
+ color?: string;
243
+ publisher?: {
244
+ name?: string;
245
+ email?: string;
246
+ url?: string;
247
+ };
248
+ repository?: string;
249
+ mjVersionRange?: string;
250
+ packages?: {
251
+ registry?: string;
252
+ server?: {
253
+ name?: string;
254
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
255
+ startupExport?: string;
256
+ }[];
257
+ client?: {
258
+ name?: string;
259
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
260
+ startupExport?: string;
261
+ }[];
262
+ shared?: {
263
+ name?: string;
264
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
265
+ startupExport?: string;
266
+ }[];
267
+ };
268
+ dependencies?: Record<string, string | {
269
+ version?: string;
270
+ repository?: string;
271
+ }>;
272
+ configuration?: {
273
+ schema?: Record<string, unknown>;
274
+ };
275
+ hooks?: {
276
+ postInstall?: string;
277
+ postUpgrade?: string;
278
+ preRemove?: string;
279
+ };
280
+ categories?: string[];
281
+ tags?: string[];
282
+ }, {
283
+ name?: string;
284
+ code?: {
285
+ visibility?: "public" | "private";
286
+ sourceDirectory?: string;
287
+ };
288
+ migrations?: {
289
+ engine?: "flyway" | "skyway";
290
+ directory?: string;
291
+ };
292
+ metadata?: {
293
+ directory?: string;
294
+ };
295
+ schema?: {
296
+ name?: string;
297
+ createIfNotExists?: boolean;
298
+ };
299
+ $schema?: string;
300
+ manifestVersion?: 1;
301
+ displayName?: string;
302
+ description?: string;
303
+ version?: string;
304
+ license?: string;
305
+ icon?: string;
306
+ color?: string;
307
+ publisher?: {
308
+ name?: string;
309
+ email?: string;
310
+ url?: string;
311
+ };
312
+ repository?: string;
313
+ mjVersionRange?: string;
314
+ packages?: {
315
+ registry?: string;
316
+ server?: {
317
+ name?: string;
318
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
319
+ startupExport?: string;
320
+ }[];
321
+ client?: {
322
+ name?: string;
323
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
324
+ startupExport?: string;
325
+ }[];
326
+ shared?: {
327
+ name?: string;
328
+ role?: "bootstrap" | "actions" | "engine" | "provider" | "module" | "components" | "library";
329
+ startupExport?: string;
330
+ }[];
331
+ };
332
+ dependencies?: Record<string, string | {
333
+ version?: string;
334
+ repository?: string;
335
+ }>;
336
+ configuration?: {
337
+ schema?: Record<string, unknown>;
338
+ };
339
+ hooks?: {
340
+ postInstall?: string;
341
+ postUpgrade?: string;
342
+ preRemove?: string;
343
+ };
344
+ categories?: string[];
345
+ tags?: string[];
346
+ }>;
347
+ export type MJAppManifest = z.infer<typeof mjAppManifestSchema>;
348
+ export type ManifestPackageEntry = z.infer<typeof packageEntrySchema>;
349
+ export type PackageRole = z.infer<typeof packageRoleSchema>;
350
+ export {};
351
+ //# sourceMappingURL=manifest-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/manifest-schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,QAAA,MAAM,iBAAiB,8FAErB,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AAwDF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyD9B,CAAC;AAMH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAKhE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAKtE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { z } from 'zod';
2
+ const semverRegex = /^\d+\.\d+\.\d+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?(\+[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$/;
3
+ const appNameRegex = /^[a-z][a-z0-9-]{1,62}[a-z0-9]$/;
4
+ const schemaNameRegex = /^[a-z][a-z0-9_]{1,126}[a-z0-9]$/;
5
+ const hexColorRegex = /^#[0-9a-fA-F]{6}$/;
6
+ const githubRepoRegex = /^https:\/\/github\.com\/.+\/.+$/;
7
+ const tagRegex = /^[a-z0-9-]{1,50}$/;
8
+ const publisherSchema = z.object({
9
+ name: z.string().min(1).max(200),
10
+ email: z.string().email().optional(),
11
+ url: z.string().url().optional(),
12
+ });
13
+ const packageRoleSchema = z.enum([
14
+ 'bootstrap', 'actions', 'engine', 'provider', 'module', 'components', 'library'
15
+ ]);
16
+ const packageEntrySchema = z.object({
17
+ name: z.string().min(1).max(200),
18
+ role: packageRoleSchema,
19
+ startupExport: z.string().optional(),
20
+ }).refine((pkg) => pkg.role !== 'bootstrap' || (pkg.startupExport != null && pkg.startupExport.length > 0), { message: 'startupExport is required for packages with the "bootstrap" role', path: ['startupExport'] });
21
+ const packagesSchema = z.object({
22
+ registry: z.string().url().optional(),
23
+ server: z.array(packageEntrySchema).optional(),
24
+ client: z.array(packageEntrySchema).optional(),
25
+ shared: z.array(packageEntrySchema).optional(),
26
+ });
27
+ const dbSchemaSchema = z.object({
28
+ name: z.string().regex(schemaNameRegex, 'Schema name must be lowercase alphanumeric + underscores, 3-128 chars'),
29
+ createIfNotExists: z.boolean().optional().default(true),
30
+ });
31
+ const migrationsSchema = z.object({
32
+ directory: z.string().optional().default('migrations'),
33
+ engine: z.enum(['flyway', 'skyway']).optional().default('skyway'),
34
+ });
35
+ const metadataSchema = z.object({
36
+ directory: z.string().optional().default('metadata'),
37
+ });
38
+ const codeSchema = z.object({
39
+ visibility: z.enum(['public', 'private']).optional().default('private'),
40
+ sourceDirectory: z.string().optional(),
41
+ });
42
+ const configurationSchema = z.object({
43
+ schema: z.record(z.string(), z.unknown()).optional(),
44
+ });
45
+ const hooksSchema = z.object({
46
+ postInstall: z.string().optional(),
47
+ postUpgrade: z.string().optional(),
48
+ preRemove: z.string().optional(),
49
+ });
50
+ export const mjAppManifestSchema = z.object({
51
+ $schema: z.string().optional(),
52
+ manifestVersion: z.literal(1),
53
+ name: z.string().regex(appNameRegex, 'App name must be 3-64 chars, lowercase alphanumeric + hyphens'),
54
+ displayName: z.string().min(1).max(200),
55
+ description: z.string().min(10).max(500),
56
+ version: z.string().regex(semverRegex, 'Version must be valid semver'),
57
+ license: z.string().optional(),
58
+ icon: z.string().optional(),
59
+ color: z.string().regex(hexColorRegex, 'Color must be a hex color (#RRGGBB)').optional(),
60
+ publisher: publisherSchema,
61
+ repository: z.string().regex(githubRepoRegex, 'Repository must be a GitHub URL'),
62
+ mjVersionRange: z.string().min(1),
63
+ schema: dbSchemaSchema.optional(),
64
+ migrations: migrationsSchema.optional(),
65
+ metadata: metadataSchema.optional(),
66
+ packages: packagesSchema,
67
+ dependencies: z.record(z.string().regex(appNameRegex, 'Dependency app name must match app name format'), z.union([
68
+ z.string().min(1),
69
+ z.object({
70
+ version: z.string().min(1),
71
+ repository: z.string().regex(githubRepoRegex, 'Dependency repository must be a GitHub URL'),
72
+ })
73
+ ])).optional(),
74
+ code: codeSchema.optional(),
75
+ configuration: configurationSchema.optional(),
76
+ hooks: hooksSchema.optional(),
77
+ categories: z.array(z.string()).max(5).optional(),
78
+ tags: z.array(z.string().regex(tagRegex, 'Tags must be lowercase alphanumeric + hyphens, max 50 chars')).max(20).optional(),
79
+ });
80
+ //# sourceMappingURL=manifest-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-schema.js","sourceRoot":"","sources":["../../src/manifest/manifest-schema.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,MAAM,WAAW,GAAG,oFAAoF,CAAC;AAGzG,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAGtD,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAG1D,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAG1C,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAG1D,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAIrC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAKH,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7B,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS;CAClF,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC,MAAM,CACL,CAAC,GAAG,EAAE,EAAE,CAAC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,EAAE;IAG7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACjD,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,6DAA6D,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9H,CAAC,CAAC"}
@@ -0,0 +1,66 @@
1
+ export type AppStatus = 'Active' | 'Disabled' | 'Error' | 'Installing' | 'Upgrading' | 'Removing' | 'Removed';
2
+ export type InstallAction = 'Install' | 'Upgrade' | 'Remove';
3
+ export type ErrorPhase = 'Schema' | 'Migration' | 'Packages' | 'Config' | 'Hooks' | 'Record';
4
+ export type DependencyStatus = 'Satisfied' | 'Missing' | 'Incompatible';
5
+ export interface AppInstallCallbacks {
6
+ OnProgress?: (phase: string, message: string) => void;
7
+ OnSuccess?: (phase: string, message: string) => void;
8
+ OnError?: (phase: string, message: string) => void;
9
+ OnWarn?: (phase: string, message: string) => void;
10
+ OnLog?: (message: string) => void;
11
+ OnConfirm?: (message: string) => Promise<boolean>;
12
+ }
13
+ export interface InstallOptions {
14
+ Source: string;
15
+ Version?: string;
16
+ Verbose?: boolean;
17
+ }
18
+ export interface UpgradeOptions {
19
+ AppName: string;
20
+ Version?: string;
21
+ Verbose?: boolean;
22
+ }
23
+ export interface RemoveOptions {
24
+ AppName: string;
25
+ KeepData?: boolean;
26
+ Force?: boolean;
27
+ Verbose?: boolean;
28
+ }
29
+ export interface AppOperationResult {
30
+ Success: boolean;
31
+ Action: InstallAction;
32
+ AppName: string;
33
+ Version: string;
34
+ ErrorMessage?: string;
35
+ ErrorPhase?: ErrorPhase;
36
+ DurationSeconds: number;
37
+ Summary?: string;
38
+ }
39
+ export interface InstalledAppInfo {
40
+ ID: string;
41
+ Name: string;
42
+ DisplayName: string;
43
+ Description: string | null;
44
+ Version: string;
45
+ Publisher: string;
46
+ PublisherEmail: string | null;
47
+ PublisherURL: string | null;
48
+ RepositoryURL: string;
49
+ SchemaName: string | null;
50
+ MJVersionRange: string;
51
+ License: string | null;
52
+ Icon: string | null;
53
+ Color: string | null;
54
+ ManifestJSON: string;
55
+ ConfigurationSchemaJSON: string | null;
56
+ InstalledByUserID: string;
57
+ Status: AppStatus;
58
+ }
59
+ export interface ResolvedDependency {
60
+ AppName: string;
61
+ VersionRange: string;
62
+ Repository: string;
63
+ AlreadyInstalled: boolean;
64
+ InstalledVersion?: string;
65
+ }
66
+ //# sourceMappingURL=open-app-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-app-types.d.ts","sourceRoot":"","sources":["../../src/types/open-app-types.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAM9G,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAM7D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAM7F,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,CAAC;AAMxE,MAAM,WAAW,mBAAmB;IAEhC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAErD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE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C;IAE5B,aAAa,EAAE,MAAM,CAAC;IAEtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,cAAc,EAAE,MAAM,CAAC;IAEvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,YAAY,EAAE,MAAM,CAAC;IAErB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,MAAM,EAAE,SAAS,CAAC;CACrB;AAKD,MAAM,WAAW,kBAAkB;IAE/B,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;IAEnB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=open-app-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-app-types.js","sourceRoot":"","sources":["../../src/types/open-app-types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,10 +1,37 @@
1
1
  {
2
2
  "name": "@memberjunction/open-app-engine",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @memberjunction/open-app-engine",
5
- "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
3
+ "version": "5.2.0",
4
+ "description": "MemberJunction: MJ Open App Engine - packaging, distribution, and installation system for MJ Open Apps.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "/dist"
10
+ ],
11
+ "scripts": {
12
+ "start": "ts-node-dev src/index.ts",
13
+ "build": "tsc && tsc-alias -f",
14
+ "test": "vitest run"
15
+ },
16
+ "author": "MemberJunction.com",
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "@memberjunction/core": "5.2.0",
20
+ "@memberjunction/global": "5.2.0",
21
+ "semver": "^7.7.1",
22
+ "simple-git": "^3.27.0",
23
+ "zod": "^3.24.3"
24
+ },
25
+ "devDependencies": {
26
+ "@types/semver": "^7.5.8",
27
+ "@types/node": "24.10.11",
28
+ "tsc-alias": "^1.8.16",
29
+ "ts-node-dev": "^2.0.0",
30
+ "vitest": "^3.1.1",
31
+ "typescript": "^5.9.3"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/MemberJunction/MJ"
36
+ }
10
37
  }
package/README.md DELETED
@@ -1,45 +0,0 @@
1
- # @memberjunction/open-app-engine
2
-
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
4
-
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
6
-
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
8
-
9
- ## Purpose
10
-
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@memberjunction/open-app-engine`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
15
-
16
- ## What is OIDC Trusted Publishing?
17
-
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
19
-
20
- ## Setup Instructions
21
-
22
- To properly configure OIDC trusted publishing for this package:
23
-
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
28
-
29
- ## DO NOT USE THIS PACKAGE
30
-
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
36
-
37
- ## More Information
38
-
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
42
-
43
- ---
44
-
45
- **Maintained for OIDC setup purposes only**