@ms-cloudpack/api-server 0.13.2 → 0.13.4
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.
- package/lib/apis/addPackageOverride.d.ts +2 -2
- package/lib/apis/ensurePackageBundled.d.ts +1114 -147
- package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
- package/lib/apis/ensurePackageBundled.js +56 -12
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/getData.d.ts +2 -2
- package/lib/apis/getSessionId.d.ts +2 -2
- package/lib/apis/index.d.ts +1 -0
- package/lib/apis/index.d.ts.map +1 -1
- package/lib/apis/index.js +1 -0
- package/lib/apis/index.js.map +1 -1
- package/lib/apis/onDataChanged.d.ts +2 -2
- package/lib/apis/openCodeEditor.d.ts +2 -2
- package/lib/apis/openConfigEditor.d.ts +2 -2
- package/lib/apis/openFilePath.d.ts +2 -2
- package/lib/apis/reportMetric.d.ts +2 -2
- package/lib/apis/syncDownload.d.ts +2 -2
- package/lib/apis/syncUpload.d.ts +18 -10
- package/lib/apis/syncUpload.d.ts.map +1 -1
- package/lib/apis/syncUpload.js +34 -5
- package/lib/apis/syncUpload.js.map +1 -1
- package/lib/apis/validatePackageOverride.d.ts +2 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/trpc/common.d.ts +3 -3
- package/lib/trpc/createAppRouter.d.ts +305 -23
- package/lib/trpc/createAppRouter.d.ts.map +1 -1
- package/lib/trpc/createCloudpackServer.d.ts +122 -1
- package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
- package/lib/trpc/createCloudpackServer.js.map +1 -1
- package/lib/trpc/createRouterFromApis.d.ts +1 -1
- package/lib/utilities/bundleTask.d.ts.map +1 -1
- package/lib/utilities/bundleTask.js +3 -6
- package/lib/utilities/bundleTask.js.map +1 -1
- package/lib/utilities/createBundleRequestForPackage.d.ts +4 -0
- package/lib/utilities/createBundleRequestForPackage.d.ts.map +1 -1
- package/lib/utilities/createBundleRequestForPackage.js +4 -3
- package/lib/utilities/createBundleRequestForPackage.js.map +1 -1
- package/lib/utilities/ensureFieldsExist.d.ts +8 -0
- package/lib/utilities/ensureFieldsExist.d.ts.map +1 -0
- package/lib/utilities/ensureFieldsExist.js +18 -0
- package/lib/utilities/ensureFieldsExist.js.map +1 -0
- package/lib/utilities/validateBundleRequestResult.d.ts +13 -0
- package/lib/utilities/validateBundleRequestResult.d.ts.map +1 -0
- package/lib/utilities/validateBundleRequestResult.js +28 -0
- package/lib/utilities/validateBundleRequestResult.js.map +1 -0
- package/package.json +6 -2
|
@@ -15,7 +15,7 @@ export declare function createAppRouter(): {
|
|
|
15
15
|
unwatchAll(): Promise<void>;
|
|
16
16
|
};
|
|
17
17
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
18
|
-
taskRunner: import("../
|
|
18
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
19
19
|
dispose(): Promise<void>;
|
|
20
20
|
};
|
|
21
21
|
meta: object;
|
|
@@ -37,7 +37,7 @@ export declare function createAppRouter(): {
|
|
|
37
37
|
unwatchAll(): Promise<void>;
|
|
38
38
|
};
|
|
39
39
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
40
|
-
taskRunner: import("../
|
|
40
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
41
41
|
dispose(): Promise<void>;
|
|
42
42
|
};
|
|
43
43
|
meta: object;
|
|
@@ -58,7 +58,7 @@ export declare function createAppRouter(): {
|
|
|
58
58
|
unwatchAll(): Promise<void>;
|
|
59
59
|
};
|
|
60
60
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
61
|
-
taskRunner: import("../
|
|
61
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
62
62
|
dispose(): Promise<void>;
|
|
63
63
|
};
|
|
64
64
|
_input_in: {
|
|
@@ -89,7 +89,7 @@ export declare function createAppRouter(): {
|
|
|
89
89
|
unwatchAll(): Promise<void>;
|
|
90
90
|
};
|
|
91
91
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
92
|
-
taskRunner: import("../
|
|
92
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
93
93
|
dispose(): Promise<void>;
|
|
94
94
|
};
|
|
95
95
|
meta: object;
|
|
@@ -110,7 +110,7 @@ export declare function createAppRouter(): {
|
|
|
110
110
|
unwatchAll(): Promise<void>;
|
|
111
111
|
};
|
|
112
112
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
113
|
-
taskRunner: import("../
|
|
113
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
114
114
|
dispose(): Promise<void>;
|
|
115
115
|
};
|
|
116
116
|
_input_in: {
|
|
@@ -137,7 +137,7 @@ export declare function createAppRouter(): {
|
|
|
137
137
|
unwatchAll(): Promise<void>;
|
|
138
138
|
};
|
|
139
139
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
140
|
-
taskRunner: import("../
|
|
140
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
141
141
|
dispose(): Promise<void>;
|
|
142
142
|
};
|
|
143
143
|
meta: object;
|
|
@@ -158,7 +158,7 @@ export declare function createAppRouter(): {
|
|
|
158
158
|
unwatchAll(): Promise<void>;
|
|
159
159
|
};
|
|
160
160
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
161
|
-
taskRunner: import("../
|
|
161
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
162
162
|
dispose(): Promise<void>;
|
|
163
163
|
};
|
|
164
164
|
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
@@ -181,7 +181,7 @@ export declare function createAppRouter(): {
|
|
|
181
181
|
unwatchAll(): Promise<void>;
|
|
182
182
|
};
|
|
183
183
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
184
|
-
taskRunner: import("../
|
|
184
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
185
185
|
dispose(): Promise<void>;
|
|
186
186
|
};
|
|
187
187
|
meta: object;
|
|
@@ -202,7 +202,7 @@ export declare function createAppRouter(): {
|
|
|
202
202
|
unwatchAll(): Promise<void>;
|
|
203
203
|
};
|
|
204
204
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
205
|
-
taskRunner: import("../
|
|
205
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
206
206
|
dispose(): Promise<void>;
|
|
207
207
|
};
|
|
208
208
|
_input_in: {
|
|
@@ -229,7 +229,7 @@ export declare function createAppRouter(): {
|
|
|
229
229
|
unwatchAll(): Promise<void>;
|
|
230
230
|
};
|
|
231
231
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
232
|
-
taskRunner: import("../
|
|
232
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
233
233
|
dispose(): Promise<void>;
|
|
234
234
|
};
|
|
235
235
|
meta: object;
|
|
@@ -250,7 +250,7 @@ export declare function createAppRouter(): {
|
|
|
250
250
|
unwatchAll(): Promise<void>;
|
|
251
251
|
};
|
|
252
252
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
253
|
-
taskRunner: import("../
|
|
253
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
254
254
|
dispose(): Promise<void>;
|
|
255
255
|
};
|
|
256
256
|
_input_in: {
|
|
@@ -283,7 +283,7 @@ export declare function createAppRouter(): {
|
|
|
283
283
|
unwatchAll(): Promise<void>;
|
|
284
284
|
};
|
|
285
285
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
286
|
-
taskRunner: import("../
|
|
286
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
287
287
|
dispose(): Promise<void>;
|
|
288
288
|
};
|
|
289
289
|
meta: object;
|
|
@@ -303,7 +303,7 @@ export declare function createAppRouter(): {
|
|
|
303
303
|
unwatchAll(): Promise<void>;
|
|
304
304
|
};
|
|
305
305
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
306
|
-
taskRunner: import("../
|
|
306
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
307
307
|
dispose(): Promise<void>;
|
|
308
308
|
};
|
|
309
309
|
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
@@ -327,7 +327,7 @@ export declare function createAppRouter(): {
|
|
|
327
327
|
unwatchAll(): Promise<void>;
|
|
328
328
|
};
|
|
329
329
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
330
|
-
taskRunner: import("../
|
|
330
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
331
331
|
dispose(): Promise<void>;
|
|
332
332
|
};
|
|
333
333
|
meta: object;
|
|
@@ -348,7 +348,7 @@ export declare function createAppRouter(): {
|
|
|
348
348
|
unwatchAll(): Promise<void>;
|
|
349
349
|
};
|
|
350
350
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
351
|
-
taskRunner: import("../
|
|
351
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
352
352
|
dispose(): Promise<void>;
|
|
353
353
|
};
|
|
354
354
|
_input_in: {
|
|
@@ -377,7 +377,7 @@ export declare function createAppRouter(): {
|
|
|
377
377
|
unwatchAll(): Promise<void>;
|
|
378
378
|
};
|
|
379
379
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
380
|
-
taskRunner: import("../
|
|
380
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
381
381
|
dispose(): Promise<void>;
|
|
382
382
|
};
|
|
383
383
|
meta: object;
|
|
@@ -398,7 +398,7 @@ export declare function createAppRouter(): {
|
|
|
398
398
|
unwatchAll(): Promise<void>;
|
|
399
399
|
};
|
|
400
400
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
401
|
-
taskRunner: import("../
|
|
401
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
402
402
|
dispose(): Promise<void>;
|
|
403
403
|
};
|
|
404
404
|
_input_in: {
|
|
@@ -427,7 +427,7 @@ export declare function createAppRouter(): {
|
|
|
427
427
|
unwatchAll(): Promise<void>;
|
|
428
428
|
};
|
|
429
429
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
430
|
-
taskRunner: import("../
|
|
430
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
431
431
|
dispose(): Promise<void>;
|
|
432
432
|
};
|
|
433
433
|
meta: object;
|
|
@@ -448,7 +448,7 @@ export declare function createAppRouter(): {
|
|
|
448
448
|
unwatchAll(): Promise<void>;
|
|
449
449
|
};
|
|
450
450
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
451
|
-
taskRunner: import("../
|
|
451
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
452
452
|
dispose(): Promise<void>;
|
|
453
453
|
};
|
|
454
454
|
_input_in: {
|
|
@@ -481,7 +481,7 @@ export declare function createAppRouter(): {
|
|
|
481
481
|
unwatchAll(): Promise<void>;
|
|
482
482
|
};
|
|
483
483
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
484
|
-
taskRunner: import("../
|
|
484
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
485
485
|
dispose(): Promise<void>;
|
|
486
486
|
};
|
|
487
487
|
meta: object;
|
|
@@ -501,7 +501,7 @@ export declare function createAppRouter(): {
|
|
|
501
501
|
unwatchAll(): Promise<void>;
|
|
502
502
|
};
|
|
503
503
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
504
|
-
taskRunner: import("../
|
|
504
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
505
505
|
dispose(): Promise<void>;
|
|
506
506
|
};
|
|
507
507
|
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
@@ -525,7 +525,7 @@ export declare function createAppRouter(): {
|
|
|
525
525
|
unwatchAll(): Promise<void>;
|
|
526
526
|
};
|
|
527
527
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
528
|
-
taskRunner: import("../
|
|
528
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
529
529
|
dispose(): Promise<void>;
|
|
530
530
|
};
|
|
531
531
|
meta: object;
|
|
@@ -545,7 +545,7 @@ export declare function createAppRouter(): {
|
|
|
545
545
|
unwatchAll(): Promise<void>;
|
|
546
546
|
};
|
|
547
547
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
548
|
-
taskRunner: import("../
|
|
548
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
549
549
|
dispose(): Promise<void>;
|
|
550
550
|
};
|
|
551
551
|
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
@@ -554,6 +554,288 @@ export declare function createAppRouter(): {
|
|
|
554
554
|
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
555
555
|
_meta: object;
|
|
556
556
|
}, void>;
|
|
557
|
+
ensurePackageBundled: import("@trpc/server").BuildProcedure<"mutation", {
|
|
558
|
+
_config: import("@trpc/server").RootConfig<{
|
|
559
|
+
ctx: {
|
|
560
|
+
session: import("../index.js").Session;
|
|
561
|
+
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
562
|
+
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
563
|
+
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
564
|
+
watcher: {
|
|
565
|
+
watch({ path, watchPaths, }: {
|
|
566
|
+
path: string;
|
|
567
|
+
watchPaths?: string[] | undefined;
|
|
568
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
569
|
+
unwatchAll(): Promise<void>;
|
|
570
|
+
};
|
|
571
|
+
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
572
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
573
|
+
dispose(): Promise<void>;
|
|
574
|
+
};
|
|
575
|
+
meta: object;
|
|
576
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
|
577
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
578
|
+
}>;
|
|
579
|
+
_meta: object;
|
|
580
|
+
_ctx_out: {
|
|
581
|
+
session: import("../index.js").Session;
|
|
582
|
+
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
583
|
+
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
584
|
+
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
585
|
+
watcher: {
|
|
586
|
+
watch({ path, watchPaths, }: {
|
|
587
|
+
path: string;
|
|
588
|
+
watchPaths?: string[] | undefined;
|
|
589
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
590
|
+
unwatchAll(): Promise<void>;
|
|
591
|
+
};
|
|
592
|
+
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
593
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
594
|
+
dispose(): Promise<void>;
|
|
595
|
+
};
|
|
596
|
+
_input_in: {
|
|
597
|
+
name: string;
|
|
598
|
+
version: string;
|
|
599
|
+
outputPath?: string | undefined;
|
|
600
|
+
bundlerType?: string | undefined;
|
|
601
|
+
disableSourceMaps?: boolean | undefined;
|
|
602
|
+
enqueueDependencies?: boolean | undefined;
|
|
603
|
+
shouldRerun?: boolean | undefined;
|
|
604
|
+
shouldWatch?: boolean | undefined;
|
|
605
|
+
shouldForce?: boolean | undefined;
|
|
606
|
+
};
|
|
607
|
+
_input_out: {
|
|
608
|
+
name: string;
|
|
609
|
+
version: string;
|
|
610
|
+
outputPath?: string | undefined;
|
|
611
|
+
bundlerType?: string | undefined;
|
|
612
|
+
disableSourceMaps?: boolean | undefined;
|
|
613
|
+
enqueueDependencies?: boolean | undefined;
|
|
614
|
+
shouldRerun?: boolean | undefined;
|
|
615
|
+
shouldWatch?: boolean | undefined;
|
|
616
|
+
shouldForce?: boolean | undefined;
|
|
617
|
+
};
|
|
618
|
+
_output_in: {
|
|
619
|
+
dependencies: Promise<{
|
|
620
|
+
name: string;
|
|
621
|
+
outputPath: string;
|
|
622
|
+
version: string;
|
|
623
|
+
isExternal: boolean;
|
|
624
|
+
bundlerName?: string | undefined;
|
|
625
|
+
inputPath?: string | undefined;
|
|
626
|
+
entries?: Record<string, string> | undefined;
|
|
627
|
+
dependencies?: string[] | undefined;
|
|
628
|
+
hash?: string | undefined;
|
|
629
|
+
outputFiles?: {
|
|
630
|
+
outputPath: string;
|
|
631
|
+
entryPoint?: string | undefined;
|
|
632
|
+
exports?: string[] | undefined;
|
|
633
|
+
}[] | undefined;
|
|
634
|
+
errors?: {
|
|
635
|
+
text: string;
|
|
636
|
+
pluginName?: string | undefined;
|
|
637
|
+
type?: string | undefined;
|
|
638
|
+
location?: {
|
|
639
|
+
line: number;
|
|
640
|
+
column: number;
|
|
641
|
+
file: string;
|
|
642
|
+
} | undefined;
|
|
643
|
+
notes?: {
|
|
644
|
+
text?: string | undefined;
|
|
645
|
+
location?: {
|
|
646
|
+
line: number;
|
|
647
|
+
column: number;
|
|
648
|
+
file: string;
|
|
649
|
+
} | undefined;
|
|
650
|
+
}[] | undefined;
|
|
651
|
+
}[] | undefined;
|
|
652
|
+
warnings?: {
|
|
653
|
+
text: string;
|
|
654
|
+
pluginName?: string | undefined;
|
|
655
|
+
type?: string | undefined;
|
|
656
|
+
location?: {
|
|
657
|
+
line: number;
|
|
658
|
+
column: number;
|
|
659
|
+
file: string;
|
|
660
|
+
} | undefined;
|
|
661
|
+
notes?: {
|
|
662
|
+
text?: string | undefined;
|
|
663
|
+
location?: {
|
|
664
|
+
line: number;
|
|
665
|
+
column: number;
|
|
666
|
+
file: string;
|
|
667
|
+
} | undefined;
|
|
668
|
+
}[] | undefined;
|
|
669
|
+
}[] | undefined;
|
|
670
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
671
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
672
|
+
}[]>;
|
|
673
|
+
result: {
|
|
674
|
+
name: string;
|
|
675
|
+
outputPath: string;
|
|
676
|
+
version: string;
|
|
677
|
+
isExternal: boolean;
|
|
678
|
+
bundlerName?: string | undefined;
|
|
679
|
+
inputPath?: string | undefined;
|
|
680
|
+
entries?: Record<string, string> | undefined;
|
|
681
|
+
dependencies?: string[] | undefined;
|
|
682
|
+
hash?: string | undefined;
|
|
683
|
+
outputFiles?: {
|
|
684
|
+
outputPath: string;
|
|
685
|
+
entryPoint?: string | undefined;
|
|
686
|
+
exports?: string[] | undefined;
|
|
687
|
+
}[] | undefined;
|
|
688
|
+
errors?: {
|
|
689
|
+
text: string;
|
|
690
|
+
pluginName?: string | undefined;
|
|
691
|
+
type?: string | undefined;
|
|
692
|
+
location?: {
|
|
693
|
+
line: number;
|
|
694
|
+
column: number;
|
|
695
|
+
file: string;
|
|
696
|
+
} | undefined;
|
|
697
|
+
notes?: {
|
|
698
|
+
text?: string | undefined;
|
|
699
|
+
location?: {
|
|
700
|
+
line: number;
|
|
701
|
+
column: number;
|
|
702
|
+
file: string;
|
|
703
|
+
} | undefined;
|
|
704
|
+
}[] | undefined;
|
|
705
|
+
}[] | undefined;
|
|
706
|
+
warnings?: {
|
|
707
|
+
text: string;
|
|
708
|
+
pluginName?: string | undefined;
|
|
709
|
+
type?: string | undefined;
|
|
710
|
+
location?: {
|
|
711
|
+
line: number;
|
|
712
|
+
column: number;
|
|
713
|
+
file: string;
|
|
714
|
+
} | undefined;
|
|
715
|
+
notes?: {
|
|
716
|
+
text?: string | undefined;
|
|
717
|
+
location?: {
|
|
718
|
+
line: number;
|
|
719
|
+
column: number;
|
|
720
|
+
file: string;
|
|
721
|
+
} | undefined;
|
|
722
|
+
}[] | undefined;
|
|
723
|
+
}[] | undefined;
|
|
724
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
725
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
_output_out: {
|
|
729
|
+
dependencies: Promise<{
|
|
730
|
+
name: string;
|
|
731
|
+
outputPath: string;
|
|
732
|
+
version: string;
|
|
733
|
+
isExternal: boolean;
|
|
734
|
+
bundlerName?: string | undefined;
|
|
735
|
+
inputPath?: string | undefined;
|
|
736
|
+
entries?: Record<string, string> | undefined;
|
|
737
|
+
dependencies?: string[] | undefined;
|
|
738
|
+
hash?: string | undefined;
|
|
739
|
+
outputFiles?: {
|
|
740
|
+
outputPath: string;
|
|
741
|
+
entryPoint?: string | undefined;
|
|
742
|
+
exports?: string[] | undefined;
|
|
743
|
+
}[] | undefined;
|
|
744
|
+
errors?: {
|
|
745
|
+
text: string;
|
|
746
|
+
pluginName?: string | undefined;
|
|
747
|
+
type?: string | undefined;
|
|
748
|
+
location?: {
|
|
749
|
+
line: number;
|
|
750
|
+
column: number;
|
|
751
|
+
file: string;
|
|
752
|
+
} | undefined;
|
|
753
|
+
notes?: {
|
|
754
|
+
text?: string | undefined;
|
|
755
|
+
location?: {
|
|
756
|
+
line: number;
|
|
757
|
+
column: number;
|
|
758
|
+
file: string;
|
|
759
|
+
} | undefined;
|
|
760
|
+
}[] | undefined;
|
|
761
|
+
}[] | undefined;
|
|
762
|
+
warnings?: {
|
|
763
|
+
text: string;
|
|
764
|
+
pluginName?: string | undefined;
|
|
765
|
+
type?: string | undefined;
|
|
766
|
+
location?: {
|
|
767
|
+
line: number;
|
|
768
|
+
column: number;
|
|
769
|
+
file: string;
|
|
770
|
+
} | undefined;
|
|
771
|
+
notes?: {
|
|
772
|
+
text?: string | undefined;
|
|
773
|
+
location?: {
|
|
774
|
+
line: number;
|
|
775
|
+
column: number;
|
|
776
|
+
file: string;
|
|
777
|
+
} | undefined;
|
|
778
|
+
}[] | undefined;
|
|
779
|
+
}[] | undefined;
|
|
780
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
781
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
782
|
+
}[]>;
|
|
783
|
+
result: {
|
|
784
|
+
name: string;
|
|
785
|
+
outputPath: string;
|
|
786
|
+
version: string;
|
|
787
|
+
isExternal: boolean;
|
|
788
|
+
bundlerName?: string | undefined;
|
|
789
|
+
inputPath?: string | undefined;
|
|
790
|
+
entries?: Record<string, string> | undefined;
|
|
791
|
+
dependencies?: string[] | undefined;
|
|
792
|
+
hash?: string | undefined;
|
|
793
|
+
outputFiles?: {
|
|
794
|
+
outputPath: string;
|
|
795
|
+
entryPoint?: string | undefined;
|
|
796
|
+
exports?: string[] | undefined;
|
|
797
|
+
}[] | undefined;
|
|
798
|
+
errors?: {
|
|
799
|
+
text: string;
|
|
800
|
+
pluginName?: string | undefined;
|
|
801
|
+
type?: string | undefined;
|
|
802
|
+
location?: {
|
|
803
|
+
line: number;
|
|
804
|
+
column: number;
|
|
805
|
+
file: string;
|
|
806
|
+
} | undefined;
|
|
807
|
+
notes?: {
|
|
808
|
+
text?: string | undefined;
|
|
809
|
+
location?: {
|
|
810
|
+
line: number;
|
|
811
|
+
column: number;
|
|
812
|
+
file: string;
|
|
813
|
+
} | undefined;
|
|
814
|
+
}[] | undefined;
|
|
815
|
+
}[] | undefined;
|
|
816
|
+
warnings?: {
|
|
817
|
+
text: string;
|
|
818
|
+
pluginName?: string | undefined;
|
|
819
|
+
type?: string | undefined;
|
|
820
|
+
location?: {
|
|
821
|
+
line: number;
|
|
822
|
+
column: number;
|
|
823
|
+
file: string;
|
|
824
|
+
} | undefined;
|
|
825
|
+
notes?: {
|
|
826
|
+
text?: string | undefined;
|
|
827
|
+
location?: {
|
|
828
|
+
line: number;
|
|
829
|
+
column: number;
|
|
830
|
+
file: string;
|
|
831
|
+
} | undefined;
|
|
832
|
+
}[] | undefined;
|
|
833
|
+
}[] | undefined;
|
|
834
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
835
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
}, unknown>;
|
|
557
839
|
}>;
|
|
558
840
|
};
|
|
559
841
|
export type AppRouter = ReturnType<typeof createAppRouter>['router'];
|
|
@@ -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
|
|
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"}
|
|
@@ -23,7 +23,7 @@ export declare function createCloudpackServer(options: {
|
|
|
23
23
|
unwatchAll(): Promise<void>;
|
|
24
24
|
};
|
|
25
25
|
packages: PackageDefinitionsCache;
|
|
26
|
-
taskRunner: import("../
|
|
26
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
27
27
|
dispose(): Promise<void>;
|
|
28
28
|
};
|
|
29
29
|
close: () => Promise<void>;
|
|
@@ -62,5 +62,126 @@ export declare function createCloudpackServer(options: {
|
|
|
62
62
|
}>;
|
|
63
63
|
syncDownload: (options: unknown) => Promise<void>;
|
|
64
64
|
syncUpload: (options: unknown) => Promise<void>;
|
|
65
|
+
ensurePackageBundled: (options: {
|
|
66
|
+
name: string;
|
|
67
|
+
version: string;
|
|
68
|
+
outputPath?: string | undefined;
|
|
69
|
+
bundlerType?: string | undefined;
|
|
70
|
+
disableSourceMaps?: boolean | undefined;
|
|
71
|
+
enqueueDependencies?: boolean | undefined;
|
|
72
|
+
shouldRerun?: boolean | undefined;
|
|
73
|
+
shouldWatch?: boolean | undefined;
|
|
74
|
+
shouldForce?: boolean | undefined;
|
|
75
|
+
}) => Promise<{
|
|
76
|
+
dependencies: Promise<{
|
|
77
|
+
name: string;
|
|
78
|
+
outputPath: string;
|
|
79
|
+
version: string;
|
|
80
|
+
isExternal: boolean;
|
|
81
|
+
bundlerName?: string | undefined;
|
|
82
|
+
inputPath?: string | undefined;
|
|
83
|
+
entries?: Record<string, string> | undefined;
|
|
84
|
+
dependencies?: string[] | undefined;
|
|
85
|
+
hash?: string | undefined;
|
|
86
|
+
outputFiles?: {
|
|
87
|
+
outputPath: string;
|
|
88
|
+
entryPoint?: string | undefined;
|
|
89
|
+
exports?: string[] | undefined;
|
|
90
|
+
}[] | undefined;
|
|
91
|
+
errors?: {
|
|
92
|
+
text: string;
|
|
93
|
+
pluginName?: string | undefined;
|
|
94
|
+
type?: string | undefined;
|
|
95
|
+
location?: {
|
|
96
|
+
line: number;
|
|
97
|
+
column: number;
|
|
98
|
+
file: string;
|
|
99
|
+
} | undefined;
|
|
100
|
+
notes?: {
|
|
101
|
+
text?: string | undefined;
|
|
102
|
+
location?: {
|
|
103
|
+
line: number;
|
|
104
|
+
column: number;
|
|
105
|
+
file: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
}[] | undefined;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
warnings?: {
|
|
110
|
+
text: string;
|
|
111
|
+
pluginName?: string | undefined;
|
|
112
|
+
type?: string | undefined;
|
|
113
|
+
location?: {
|
|
114
|
+
line: number;
|
|
115
|
+
column: number;
|
|
116
|
+
file: string;
|
|
117
|
+
} | undefined;
|
|
118
|
+
notes?: {
|
|
119
|
+
text?: string | undefined;
|
|
120
|
+
location?: {
|
|
121
|
+
line: number;
|
|
122
|
+
column: number;
|
|
123
|
+
file: string;
|
|
124
|
+
} | undefined;
|
|
125
|
+
}[] | undefined;
|
|
126
|
+
}[] | undefined;
|
|
127
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
128
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
129
|
+
}[]>;
|
|
130
|
+
result: {
|
|
131
|
+
name: string;
|
|
132
|
+
outputPath: string;
|
|
133
|
+
version: string;
|
|
134
|
+
isExternal: boolean;
|
|
135
|
+
bundlerName?: string | undefined;
|
|
136
|
+
inputPath?: string | undefined;
|
|
137
|
+
entries?: Record<string, string> | undefined;
|
|
138
|
+
dependencies?: string[] | undefined;
|
|
139
|
+
hash?: string | undefined;
|
|
140
|
+
outputFiles?: {
|
|
141
|
+
outputPath: string;
|
|
142
|
+
entryPoint?: string | undefined;
|
|
143
|
+
exports?: string[] | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
errors?: {
|
|
146
|
+
text: string;
|
|
147
|
+
pluginName?: string | undefined;
|
|
148
|
+
type?: string | undefined;
|
|
149
|
+
location?: {
|
|
150
|
+
line: number;
|
|
151
|
+
column: number;
|
|
152
|
+
file: string;
|
|
153
|
+
} | undefined;
|
|
154
|
+
notes?: {
|
|
155
|
+
text?: string | undefined;
|
|
156
|
+
location?: {
|
|
157
|
+
line: number;
|
|
158
|
+
column: number;
|
|
159
|
+
file: string;
|
|
160
|
+
} | undefined;
|
|
161
|
+
}[] | undefined;
|
|
162
|
+
}[] | undefined;
|
|
163
|
+
warnings?: {
|
|
164
|
+
text: string;
|
|
165
|
+
pluginName?: string | undefined;
|
|
166
|
+
type?: string | undefined;
|
|
167
|
+
location?: {
|
|
168
|
+
line: number;
|
|
169
|
+
column: number;
|
|
170
|
+
file: string;
|
|
171
|
+
} | undefined;
|
|
172
|
+
notes?: {
|
|
173
|
+
text?: string | undefined;
|
|
174
|
+
location?: {
|
|
175
|
+
line: number;
|
|
176
|
+
column: number;
|
|
177
|
+
file: string;
|
|
178
|
+
} | undefined;
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
rawInput?: Record<string, unknown> | undefined;
|
|
182
|
+
rawOutput?: Record<string, unknown> | undefined;
|
|
183
|
+
};
|
|
184
|
+
}>;
|
|
65
185
|
}>;
|
|
186
|
+
export type CloudpackServer = ReturnType<typeof createCloudpackServer>;
|
|
66
187
|
//# sourceMappingURL=createCloudpackServer.d.ts.map
|
|
@@ -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,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;CACnC
|
|
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,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;CACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCA;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCloudpackServer.js","sourceRoot":"","sources":["../../src/trpc/createCloudpackServer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI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,GAAG,CAAC;IACb,CAAC,EACD,EAAuG,CACxG,CAAC;AACJ,CAAC","sourcesContent":["import type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { Span } from '@ms-cloudpack/telemetry';\nimport { applyWSSHandler } from '@trpc/server/adapters/ws';\nimport getPort from 'get-port';\nimport { WebSocketServer } from 'ws';\nimport type { Session } from '../types/Session.js';\nimport { createAppRouter, type AppRouter } from './createAppRouter.js';\nimport { createContextFactory } from './createContextFactory.js';\nimport { createHTTPServer } from './httpAdapter.js';\nimport cors from 'cors';\nimport type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\n\nexport async function createCloudpackServer(options: {\n session: Session;\n rootSpan: Span | undefined;\n reporter: TaskReporter;\n packages: PackageDefinitionsCache;\n}) {\n const createContext = await createContextFactory(options);\n const hostname = options.session.config?.devServer?.domain || 'localhost';\n const https = options.session.config?.devServer?.https;\n const port = await getPort({ port: [9890, 9891, 9892, 9893] });\n const { router, apis } = createAppRouter();\n const { server, listen } = createHTTPServer({\n middleware: cors(),\n router,\n createContext,\n https,\n });\n const webSocketProtocol = https ? 'wss' : 'ws';\n const wss = new WebSocketServer({ server });\n\n applyWSSHandler<AppRouter>({\n wss,\n router,\n createContext,\n });\n\n listen(port, hostname);\n\n const localCallContext = await createContext();\n const apisWithContext = withContext(apis, localCallContext);\n\n return {\n ...apisWithContext,\n url: `${webSocketProtocol}://${hostname}:${port}`,\n port,\n ctx: localCallContext,\n\n close: async () => {\n await localCallContext.dispose();\n server.close();\n wss.close();\n },\n };\n}\n\nexport type CloudpackServer = ReturnType<typeof createCloudpackServer>;\n\n/** Helper to tie the local call context with the apis so callers don't have to cache them. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withContext<TApis extends { [key: string]: (options: { input: any; ctx: TContext }) => any }, TContext>(\n apis: TApis,\n ctx: TContext,\n) {\n return Object.entries(apis).reduce(\n (acc, [key, apiFunction]) => {\n acc[key as keyof TApis] = (input: Parameters<TApis[typeof key]>[0]['input']) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n apiFunction({ input, ctx });\n return acc;\n },\n {} as { [key in keyof TApis]: (options: Parameters<TApis[key]>[0]['input']) => ReturnType<TApis[key]> },\n );\n}\n"]}
|
|
@@ -17,7 +17,7 @@ export declare function createRouterFromApis<TData extends {
|
|
|
17
17
|
unwatchAll(): Promise<void>;
|
|
18
18
|
};
|
|
19
19
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
20
|
-
taskRunner: import("../
|
|
20
|
+
taskRunner: import("../index.js").TaskRunner;
|
|
21
21
|
dispose(): Promise<void>;
|
|
22
22
|
};
|
|
23
23
|
meta: object;
|