@ms-cloudpack/api-server 0.25.1 → 0.26.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 (43) hide show
  1. package/lib/apis/ensurePackageBundled.d.ts +40 -1793
  2. package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
  3. package/lib/apis/ensurePackageBundled.js +7 -6
  4. package/lib/apis/ensurePackageBundled.js.map +1 -1
  5. package/lib/apis/index.d.ts +1 -1
  6. package/lib/apis/index.d.ts.map +1 -1
  7. package/lib/apis/index.js.map +1 -1
  8. package/lib/apis.d.ts +1 -1
  9. package/lib/apis.d.ts.map +1 -1
  10. package/lib/apis.js.map +1 -1
  11. package/lib/index.d.ts +2 -1
  12. package/lib/index.d.ts.map +1 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/startApiServer.js +1 -1
  15. package/lib/startApiServer.js.map +1 -1
  16. package/lib/trpc/createAppRouter.d.ts +4 -298
  17. package/lib/trpc/createAppRouter.d.ts.map +1 -1
  18. package/lib/trpc/createCloudpackServer.d.ts +1 -148
  19. package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
  20. package/lib/types/BundleRequest.d.ts +26 -5
  21. package/lib/types/BundleRequest.d.ts.map +1 -1
  22. package/lib/types/BundleRequest.js.map +1 -1
  23. package/lib/types/DetectedImports.d.ts +6 -0
  24. package/lib/types/DetectedImports.d.ts.map +1 -0
  25. package/lib/types/DetectedImports.js +2 -0
  26. package/lib/types/DetectedImports.js.map +1 -0
  27. package/lib/utilities/bundleTask.d.ts.map +1 -1
  28. package/lib/utilities/bundleTask.js +23 -27
  29. package/lib/utilities/bundleTask.js.map +1 -1
  30. package/lib/utilities/createBundleRequestForPackage.d.ts +1 -1
  31. package/lib/utilities/createBundleRequestForPackage.js +2 -2
  32. package/lib/utilities/createBundleRequestForPackage.js.map +1 -1
  33. package/lib/utilities/findImports.d.ts +4 -3
  34. package/lib/utilities/findImports.d.ts.map +1 -1
  35. package/lib/utilities/findImports.js +2 -2
  36. package/lib/utilities/findImports.js.map +1 -1
  37. package/lib/utilities/isCachedResultValid.js +3 -3
  38. package/lib/utilities/isCachedResultValid.js.map +1 -1
  39. package/lib/utilities/matchingZodObject.d.ts +14 -0
  40. package/lib/utilities/matchingZodObject.d.ts.map +1 -0
  41. package/lib/utilities/matchingZodObject.js +9 -0
  42. package/lib/utilities/matchingZodObject.js.map +1 -0
  43. package/package.json +8 -8
@@ -38,304 +38,10 @@ export declare function createAppRouter(): {
38
38
  }>;
39
39
  _meta: object;
40
40
  _ctx_out: import("../index.js").Context;
41
- _input_in: {
42
- name: string;
43
- version: string;
44
- outputPath?: string | undefined;
45
- bundlerType?: string | undefined;
46
- disableSourceMaps?: boolean | undefined;
47
- enqueueDependencies?: boolean | undefined;
48
- shouldFindImports?: boolean | undefined;
49
- shouldRerun?: boolean | undefined;
50
- shouldWatch?: boolean | undefined;
51
- shouldForce?: boolean | undefined;
52
- disableCache?: boolean | undefined;
53
- };
54
- _input_out: {
55
- name: string;
56
- version: string;
57
- outputPath?: string | undefined;
58
- bundlerType?: string | undefined;
59
- disableSourceMaps?: boolean | undefined;
60
- enqueueDependencies?: boolean | undefined;
61
- shouldFindImports?: boolean | undefined;
62
- shouldRerun?: boolean | undefined;
63
- shouldWatch?: boolean | undefined;
64
- shouldForce?: boolean | undefined;
65
- disableCache?: boolean | undefined;
66
- };
67
- _output_in: {
68
- dependencies: Promise<{
69
- name: string;
70
- outputPath: string;
71
- version: string;
72
- isExternal: boolean;
73
- bundlerName?: string | undefined;
74
- inputPath?: string | undefined;
75
- entries?: Record<string, string> | undefined;
76
- dependencies?: string[] | undefined;
77
- hash?: string | undefined;
78
- outputFiles?: {
79
- outputPath: string;
80
- entryPoint?: string | undefined;
81
- exports?: string[] | undefined;
82
- }[] | undefined;
83
- errors?: {
84
- text: string;
85
- pluginName?: string | undefined;
86
- type?: string | undefined;
87
- location?: {
88
- file: string;
89
- line: number;
90
- column: number;
91
- length?: number | undefined;
92
- lineText?: string | undefined;
93
- suggestion?: string | undefined;
94
- } | undefined;
95
- notes?: {
96
- text: string;
97
- location?: {
98
- file: string;
99
- line: number;
100
- column: number;
101
- length?: number | undefined;
102
- lineText?: string | undefined;
103
- suggestion?: string | undefined;
104
- } | undefined;
105
- }[] | undefined;
106
- }[] | undefined;
107
- warnings?: {
108
- text: string;
109
- pluginName?: string | undefined;
110
- type?: string | undefined;
111
- location?: {
112
- file: string;
113
- line: number;
114
- column: number;
115
- length?: number | undefined;
116
- lineText?: string | undefined;
117
- suggestion?: string | undefined;
118
- } | undefined;
119
- notes?: {
120
- text: string;
121
- location?: {
122
- file: string;
123
- line: number;
124
- column: number;
125
- length?: number | undefined;
126
- lineText?: string | undefined;
127
- suggestion?: string | undefined;
128
- } | undefined;
129
- }[] | undefined;
130
- }[] | undefined;
131
- rawInput?: Record<string, unknown> | undefined;
132
- rawOutput?: Record<string, unknown> | undefined;
133
- imports?: Record<string, string[]> | undefined;
134
- }[]>;
135
- result: {
136
- name: string;
137
- outputPath: string;
138
- version: string;
139
- isExternal: boolean;
140
- bundlerName?: string | undefined;
141
- inputPath?: string | undefined;
142
- entries?: Record<string, string> | undefined;
143
- dependencies?: string[] | undefined;
144
- hash?: string | undefined;
145
- outputFiles?: {
146
- outputPath: string;
147
- entryPoint?: string | undefined;
148
- exports?: string[] | undefined;
149
- }[] | undefined;
150
- errors?: {
151
- text: string;
152
- pluginName?: string | undefined;
153
- type?: string | undefined;
154
- location?: {
155
- file: string;
156
- line: number;
157
- column: number;
158
- length?: number | undefined;
159
- lineText?: string | undefined;
160
- suggestion?: string | undefined;
161
- } | undefined;
162
- notes?: {
163
- text: string;
164
- location?: {
165
- file: string;
166
- line: number;
167
- column: number;
168
- length?: number | undefined;
169
- lineText?: string | undefined;
170
- suggestion?: string | undefined;
171
- } | undefined;
172
- }[] | undefined;
173
- }[] | undefined;
174
- warnings?: {
175
- text: string;
176
- pluginName?: string | undefined;
177
- type?: string | undefined;
178
- location?: {
179
- file: string;
180
- line: number;
181
- column: number;
182
- length?: number | undefined;
183
- lineText?: string | undefined;
184
- suggestion?: string | undefined;
185
- } | undefined;
186
- notes?: {
187
- text: string;
188
- location?: {
189
- file: string;
190
- line: number;
191
- column: number;
192
- length?: number | undefined;
193
- lineText?: string | undefined;
194
- suggestion?: string | undefined;
195
- } | undefined;
196
- }[] | undefined;
197
- }[] | undefined;
198
- rawInput?: Record<string, unknown> | undefined;
199
- rawOutput?: Record<string, unknown> | undefined;
200
- imports?: Record<string, string[]> | undefined;
201
- };
202
- };
203
- _output_out: {
204
- dependencies: Promise<{
205
- name: string;
206
- outputPath: string;
207
- version: string;
208
- isExternal: boolean;
209
- bundlerName?: string | undefined;
210
- inputPath?: string | undefined;
211
- entries?: Record<string, string> | undefined;
212
- dependencies?: string[] | undefined;
213
- hash?: string | undefined;
214
- outputFiles?: {
215
- outputPath: string;
216
- entryPoint?: string | undefined;
217
- exports?: string[] | undefined;
218
- }[] | undefined;
219
- errors?: {
220
- text: string;
221
- pluginName?: string | undefined;
222
- type?: string | undefined;
223
- location?: {
224
- file: string;
225
- line: number;
226
- column: number;
227
- length?: number | undefined;
228
- lineText?: string | undefined;
229
- suggestion?: string | undefined;
230
- } | undefined;
231
- notes?: {
232
- text: string;
233
- location?: {
234
- file: string;
235
- line: number;
236
- column: number;
237
- length?: number | undefined;
238
- lineText?: string | undefined;
239
- suggestion?: string | undefined;
240
- } | undefined;
241
- }[] | undefined;
242
- }[] | undefined;
243
- warnings?: {
244
- text: string;
245
- pluginName?: string | undefined;
246
- type?: string | undefined;
247
- location?: {
248
- file: string;
249
- line: number;
250
- column: number;
251
- length?: number | undefined;
252
- lineText?: string | undefined;
253
- suggestion?: string | undefined;
254
- } | undefined;
255
- notes?: {
256
- text: string;
257
- location?: {
258
- file: string;
259
- line: number;
260
- column: number;
261
- length?: number | undefined;
262
- lineText?: string | undefined;
263
- suggestion?: string | undefined;
264
- } | undefined;
265
- }[] | undefined;
266
- }[] | undefined;
267
- rawInput?: Record<string, unknown> | undefined;
268
- rawOutput?: Record<string, unknown> | undefined;
269
- imports?: Record<string, string[]> | undefined;
270
- }[]>;
271
- result: {
272
- name: string;
273
- outputPath: string;
274
- version: string;
275
- isExternal: boolean;
276
- bundlerName?: string | undefined;
277
- inputPath?: string | undefined;
278
- entries?: Record<string, string> | undefined;
279
- dependencies?: string[] | undefined;
280
- hash?: string | undefined;
281
- outputFiles?: {
282
- outputPath: string;
283
- entryPoint?: string | undefined;
284
- exports?: string[] | undefined;
285
- }[] | undefined;
286
- errors?: {
287
- text: string;
288
- pluginName?: string | undefined;
289
- type?: string | undefined;
290
- location?: {
291
- file: string;
292
- line: number;
293
- column: number;
294
- length?: number | undefined;
295
- lineText?: string | undefined;
296
- suggestion?: string | undefined;
297
- } | undefined;
298
- notes?: {
299
- text: string;
300
- location?: {
301
- file: string;
302
- line: number;
303
- column: number;
304
- length?: number | undefined;
305
- lineText?: string | undefined;
306
- suggestion?: string | undefined;
307
- } | undefined;
308
- }[] | undefined;
309
- }[] | undefined;
310
- warnings?: {
311
- text: string;
312
- pluginName?: string | undefined;
313
- type?: string | undefined;
314
- location?: {
315
- file: string;
316
- line: number;
317
- column: number;
318
- length?: number | undefined;
319
- lineText?: string | undefined;
320
- suggestion?: string | undefined;
321
- } | undefined;
322
- notes?: {
323
- text: string;
324
- location?: {
325
- file: string;
326
- line: number;
327
- column: number;
328
- length?: number | undefined;
329
- lineText?: string | undefined;
330
- suggestion?: string | undefined;
331
- } | undefined;
332
- }[] | undefined;
333
- }[] | undefined;
334
- rawInput?: Record<string, unknown> | undefined;
335
- rawOutput?: Record<string, unknown> | undefined;
336
- imports?: Record<string, string[]> | undefined;
337
- };
338
- };
41
+ _input_in: apis.EnsurePackageBundledInput;
42
+ _input_out: apis.EnsurePackageBundledInput;
43
+ _output_in: apis.EnsurePackageBundledOutput;
44
+ _output_out: apis.EnsurePackageBundledOutput;
339
45
  }, unknown>;
340
46
  getData: import("@trpc/server").BuildProcedure<"query", {
341
47
  _config: import("@trpc/server").RootConfig<{
@@ -1 +1 @@
1
- {"version":3,"file":"createAppRouter.d.ts","sourceRoot":"","sources":["../../src/trpc/createAppRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AAGzC,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9B;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"createAppRouter.d.ts","sourceRoot":"","sources":["../../src/trpc/createAppRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AAGzC,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9B;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC"}
@@ -21,154 +21,7 @@ export declare function createCloudpackServer(options: {
21
21
  importPath: string;
22
22
  issuerUrl?: string | undefined;
23
23
  }) => Promise<void>;
24
- ensurePackageBundled: (options: {
25
- name: string;
26
- version: string;
27
- outputPath?: string | undefined;
28
- bundlerType?: string | undefined;
29
- disableSourceMaps?: boolean | undefined;
30
- enqueueDependencies?: boolean | undefined;
31
- shouldFindImports?: boolean | undefined;
32
- shouldRerun?: boolean | undefined;
33
- shouldWatch?: boolean | undefined;
34
- shouldForce?: boolean | undefined;
35
- disableCache?: boolean | undefined;
36
- }) => Promise<{
37
- dependencies: Promise<{
38
- name: string;
39
- outputPath: string;
40
- version: string;
41
- isExternal: boolean;
42
- bundlerName?: string | undefined;
43
- inputPath?: string | undefined;
44
- entries?: Record<string, string> | undefined;
45
- dependencies?: string[] | undefined;
46
- hash?: string | undefined;
47
- outputFiles?: {
48
- outputPath: string;
49
- entryPoint?: string | undefined;
50
- exports?: string[] | undefined;
51
- }[] | undefined;
52
- errors?: {
53
- text: string;
54
- pluginName?: string | undefined;
55
- type?: string | undefined;
56
- location?: {
57
- file: string;
58
- line: number;
59
- column: number;
60
- length?: number | undefined;
61
- lineText?: string | undefined;
62
- suggestion?: string | undefined;
63
- } | undefined;
64
- notes?: {
65
- text: string;
66
- location?: {
67
- file: string;
68
- line: number;
69
- column: number;
70
- length?: number | undefined;
71
- lineText?: string | undefined;
72
- suggestion?: string | undefined;
73
- } | undefined;
74
- }[] | undefined;
75
- }[] | undefined;
76
- warnings?: {
77
- text: string;
78
- pluginName?: string | undefined;
79
- type?: string | undefined;
80
- location?: {
81
- file: string;
82
- line: number;
83
- column: number;
84
- length?: number | undefined;
85
- lineText?: string | undefined;
86
- suggestion?: string | undefined;
87
- } | undefined;
88
- notes?: {
89
- text: string;
90
- location?: {
91
- file: string;
92
- line: number;
93
- column: number;
94
- length?: number | undefined;
95
- lineText?: string | undefined;
96
- suggestion?: string | undefined;
97
- } | undefined;
98
- }[] | undefined;
99
- }[] | undefined;
100
- rawInput?: Record<string, unknown> | undefined;
101
- rawOutput?: Record<string, unknown> | undefined;
102
- imports?: Record<string, string[]> | undefined;
103
- }[]>;
104
- result: {
105
- name: string;
106
- outputPath: string;
107
- version: string;
108
- isExternal: boolean;
109
- bundlerName?: string | undefined;
110
- inputPath?: string | undefined;
111
- entries?: Record<string, string> | undefined;
112
- dependencies?: string[] | undefined;
113
- hash?: string | undefined;
114
- outputFiles?: {
115
- outputPath: string;
116
- entryPoint?: string | undefined;
117
- exports?: string[] | undefined;
118
- }[] | undefined;
119
- errors?: {
120
- text: string;
121
- pluginName?: string | undefined;
122
- type?: string | undefined;
123
- location?: {
124
- file: string;
125
- line: number;
126
- column: number;
127
- length?: number | undefined;
128
- lineText?: string | undefined;
129
- suggestion?: string | undefined;
130
- } | undefined;
131
- notes?: {
132
- text: string;
133
- location?: {
134
- file: string;
135
- line: number;
136
- column: number;
137
- length?: number | undefined;
138
- lineText?: string | undefined;
139
- suggestion?: string | undefined;
140
- } | undefined;
141
- }[] | undefined;
142
- }[] | undefined;
143
- warnings?: {
144
- text: string;
145
- pluginName?: string | undefined;
146
- type?: string | undefined;
147
- location?: {
148
- file: string;
149
- line: number;
150
- column: number;
151
- length?: number | undefined;
152
- lineText?: string | undefined;
153
- suggestion?: string | undefined;
154
- } | undefined;
155
- notes?: {
156
- text: string;
157
- location?: {
158
- file: string;
159
- line: number;
160
- column: number;
161
- length?: number | undefined;
162
- lineText?: string | undefined;
163
- suggestion?: string | undefined;
164
- } | undefined;
165
- }[] | undefined;
166
- }[] | undefined;
167
- rawInput?: Record<string, unknown> | undefined;
168
- rawOutput?: Record<string, unknown> | undefined;
169
- imports?: Record<string, string[]> | undefined;
170
- };
171
- }>;
24
+ ensurePackageBundled: (options: import("../index.js").EnsurePackageBundledInput) => Promise<import("../index.js").EnsurePackageBundledOutput>;
172
25
  getData: (options: {
173
26
  path: string[];
174
27
  }) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"createCloudpackServer.d.ts","sourceRoot":"","sources":["../../src/trpc/createCloudpackServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,aAAa,EAAE,aAAa,CAAC;CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCA;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"createCloudpackServer.d.ts","sourceRoot":"","sources":["../../src/trpc/createCloudpackServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,aAAa,EAAE,aAAa,CAAC;CAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCA;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,30 +1,51 @@
1
1
  import type { BundleResult, PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';
2
2
  import type { CloudpackConfig } from '@ms-cloudpack/config';
3
3
  import type { PackageHashes } from '@ms-cloudpack/package-hashes';
4
+ import type { DetectedImports } from './DetectedImports.js';
4
5
  /**
5
6
  * Tracks a given bundle request and its result.
6
7
  */
7
8
  export interface BundleRequest {
9
+ /** ID for the bundle */
8
10
  id: string;
11
+ /** Package name being bundled */
9
12
  packageName: string;
13
+ /** Package version being bundled */
10
14
  version: string;
15
+ /** Absolute path to the package */
11
16
  packagePath: string;
17
+ /** Absolute path for the bundle output */
12
18
  outputPath?: string;
19
+ /** Whether this is an external package (in node_modules) */
13
20
  isExternal: boolean;
21
+ /** Force using this bundler */
14
22
  bundlerType?: string;
15
- result?: BundleResult & {
16
- imports?: Record<string, string[]>;
23
+ /** Result of bundling */
24
+ result?: Omit<BundleResult, 'outputPath'> & Required<Pick<BundleRequest, 'outputPath'>> & {
25
+ /**
26
+ * Mapping from dependency name to list of paths that are actually imported in the bundled files.
27
+ * e.g. `{ '@fluentui/react': [ '.', './lib/Button' ] }`
28
+ */
29
+ imports?: DetectedImports;
17
30
  hash?: string;
18
- outputPath: string;
19
31
  };
32
+ /** Whether the result was retrieved from the cache (set while bundling) */
20
33
  resultFromCache?: boolean;
34
+ /** Whether to disable source maps */
21
35
  disableSourceMaps?: boolean;
22
- enableFindImports?: boolean;
23
- enableCacheInternalPackages?: boolean;
36
+ /** Whether to scan the bundled code for imports of other packages */
37
+ shouldFindImports?: boolean;
38
+ /** Whether to enable caching of bundled packages from within the repo */
39
+ shouldCacheInternalPackages?: boolean;
40
+ /** Whether to disable caching */
24
41
  disableCache?: boolean;
42
+ /** Whether to use package hashes in the import map (as cache breakers) */
25
43
  hashPackages?: boolean;
44
+ /** Cached package.jsons */
26
45
  packages: PackageDefinitionsCache;
46
+ /** Cloudpack config */
27
47
  config: CloudpackConfig;
48
+ /** Cached package hashes */
28
49
  packageHashes: PackageHashes;
29
50
  }
30
51
  //# sourceMappingURL=BundleRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BundleRequest.d.ts","sourceRoot":"","sources":["../../src/types/BundleRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAClG,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,MAAM,EAAE,eAAe,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;CAC9B"}
1
+ {"version":3,"file":"BundleRequest.d.ts","sourceRoot":"","sources":["../../src/types/BundleRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GACvC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,GAAG;QAC5C;;;WAGG;QACH,OAAO,CAAC,EAAE,eAAe,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACJ,2EAA2E;IAE3E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yEAAyE;IACzE,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,iCAAiC;IACjC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2BAA2B;IAC3B,QAAQ,EAAE,uBAAuB,CAAC;IAClC,uBAAuB;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,4BAA4B;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleRequest.js","sourceRoot":"","sources":["../../src/types/BundleRequest.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleResult, PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\nimport type { CloudpackConfig } from '@ms-cloudpack/config';\nimport type { PackageHashes } from '@ms-cloudpack/package-hashes';\n\n/**\n * Tracks a given bundle request and its result.\n */\n\nexport interface BundleRequest {\n id: string;\n packageName: string;\n version: string;\n packagePath: string;\n outputPath?: string;\n isExternal: boolean;\n bundlerType?: string;\n result?: BundleResult & { imports?: Record<string, string[]>; hash?: string; outputPath: string };\n resultFromCache?: boolean;\n disableSourceMaps?: boolean;\n enableFindImports?: boolean;\n enableCacheInternalPackages?: boolean;\n disableCache?: boolean;\n hashPackages?: boolean;\n packages: PackageDefinitionsCache;\n config: CloudpackConfig;\n packageHashes: PackageHashes;\n}\n"]}
1
+ {"version":3,"file":"BundleRequest.js","sourceRoot":"","sources":["../../src/types/BundleRequest.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleResult, PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\nimport type { CloudpackConfig } from '@ms-cloudpack/config';\nimport type { PackageHashes } from '@ms-cloudpack/package-hashes';\nimport type { DetectedImports } from './DetectedImports.js';\n\n/**\n * Tracks a given bundle request and its result.\n */\nexport interface BundleRequest {\n /** ID for the bundle */\n id: string;\n /** Package name being bundled */\n packageName: string;\n /** Package version being bundled */\n version: string;\n /** Absolute path to the package */\n packagePath: string;\n /** Absolute path for the bundle output */\n outputPath?: string;\n /** Whether this is an external package (in node_modules) */\n isExternal: boolean;\n /** Force using this bundler */\n bundlerType?: string;\n /** Result of bundling */\n result?: Omit<BundleResult, 'outputPath'> &\n Required<Pick<BundleRequest, 'outputPath'>> & {\n /**\n * Mapping from dependency name to list of paths that are actually imported in the bundled files.\n * e.g. `{ '@fluentui/react': [ '.', './lib/Button' ] }`\n */\n imports?: DetectedImports;\n hash?: string;\n };\n /** Whether the result was retrieved from the cache (set while bundling) */\n // TODO: this seems like it should be a property of the result?\n resultFromCache?: boolean;\n /** Whether to disable source maps */\n disableSourceMaps?: boolean;\n /** Whether to scan the bundled code for imports of other packages */\n shouldFindImports?: boolean;\n /** Whether to enable caching of bundled packages from within the repo */\n shouldCacheInternalPackages?: boolean;\n /** Whether to disable caching */\n disableCache?: boolean;\n /** Whether to use package hashes in the import map (as cache breakers) */\n hashPackages?: boolean;\n /** Cached package.jsons */\n packages: PackageDefinitionsCache;\n /** Cloudpack config */\n config: CloudpackConfig;\n /** Cached package hashes */\n packageHashes: PackageHashes;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Mapping from dependency name to list of paths that are actually imported in the bundled files.
3
+ * e.g. `{ '@fluentui/react': [ '.', './lib/Button' ] }`
4
+ */
5
+ export type DetectedImports = Record<string, string[]>;
6
+ //# sourceMappingURL=DetectedImports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetectedImports.d.ts","sourceRoot":"","sources":["../../src/types/DetectedImports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DetectedImports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetectedImports.js","sourceRoot":"","sources":["../../src/types/DetectedImports.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Mapping from dependency name to list of paths that are actually imported in the bundled files.\n * e.g. `{ '@fluentui/react': [ '.', './lib/Button' ] }`\n */\nexport type DetectedImports = Record<string, string[]>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"bundleTask.d.ts","sourceRoot":"","sources":["../../src/utilities/bundleTask.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,wBAAsB,UAAU,CAAC,MAAM,EAAE;IACvC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,GAAG,OAAO,CAAC,aAAa,CAAC,CA8EzB"}
1
+ {"version":3,"file":"bundleTask.d.ts","sourceRoot":"","sources":["../../src/utilities/bundleTask.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,wBAAsB,UAAU,CAAC,MAAM,EAAE;IACvC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,GAAG,OAAO,CAAC,aAAa,CAAC,CAqEzB"}