@epic-web/workshop-utils 4.3.0 → 4.5.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.
@@ -6,9 +6,12 @@ type CachifiedOptions = {
6
6
  timings?: Timings;
7
7
  request?: Request;
8
8
  };
9
- declare const BaseExerciseStepAppSchema: z.ZodObject<{
9
+ declare const BaseExerciseStepAppSchema: z.ZodObject<z.objectUtil.extendShape<{
10
+ /** a unique identifier for the app */
10
11
  name: z.ZodString;
12
+ /** the title of the app used for display (comes from the package.json title prop) */
11
13
  title: z.ZodString;
14
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
12
15
  dirName: z.ZodString;
13
16
  fullPath: z.ZodString;
14
17
  relativePath: z.ZodString;
@@ -70,9 +73,10 @@ declare const BaseExerciseStepAppSchema: z.ZodObject<{
70
73
  }, {
71
74
  type: "none";
72
75
  }>]>;
76
+ }, {
73
77
  exerciseNumber: z.ZodNumber;
74
78
  stepNumber: z.ZodNumber;
75
- }, "strip", z.ZodTypeAny, {
79
+ }>, "strip", z.ZodTypeAny, {
76
80
  name: string;
77
81
  title: string;
78
82
  dirName: string;
@@ -133,9 +137,12 @@ declare const BaseExerciseStepAppSchema: z.ZodObject<{
133
137
  instructionsCode?: string | undefined;
134
138
  epicVideoEmbeds?: string[] | undefined;
135
139
  }>;
136
- declare const ProblemAppSchema: z.ZodObject<{
140
+ declare const ProblemAppSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
141
+ /** a unique identifier for the app */
137
142
  name: z.ZodString;
143
+ /** the title of the app used for display (comes from the package.json title prop) */
138
144
  title: z.ZodString;
145
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
139
146
  dirName: z.ZodString;
140
147
  fullPath: z.ZodString;
141
148
  relativePath: z.ZodString;
@@ -197,11 +204,13 @@ declare const ProblemAppSchema: z.ZodObject<{
197
204
  }, {
198
205
  type: "none";
199
206
  }>]>;
207
+ }, {
200
208
  exerciseNumber: z.ZodNumber;
201
209
  stepNumber: z.ZodNumber;
210
+ }>, {
202
211
  type: z.ZodLiteral<"problem">;
203
212
  solutionName: z.ZodNullable<z.ZodString>;
204
- }, "strip", z.ZodTypeAny, {
213
+ }>, "strip", z.ZodTypeAny, {
205
214
  type: "problem";
206
215
  name: string;
207
216
  title: string;
@@ -266,9 +275,12 @@ declare const ProblemAppSchema: z.ZodObject<{
266
275
  instructionsCode?: string | undefined;
267
276
  epicVideoEmbeds?: string[] | undefined;
268
277
  }>;
269
- declare const SolutionAppSchema: z.ZodObject<{
278
+ declare const SolutionAppSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
279
+ /** a unique identifier for the app */
270
280
  name: z.ZodString;
281
+ /** the title of the app used for display (comes from the package.json title prop) */
271
282
  title: z.ZodString;
283
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
272
284
  dirName: z.ZodString;
273
285
  fullPath: z.ZodString;
274
286
  relativePath: z.ZodString;
@@ -330,11 +342,13 @@ declare const SolutionAppSchema: z.ZodObject<{
330
342
  }, {
331
343
  type: "none";
332
344
  }>]>;
345
+ }, {
333
346
  exerciseNumber: z.ZodNumber;
334
347
  stepNumber: z.ZodNumber;
348
+ }>, {
335
349
  type: z.ZodLiteral<"solution">;
336
350
  problemName: z.ZodNullable<z.ZodString>;
337
- }, "strip", z.ZodTypeAny, {
351
+ }>, "strip", z.ZodTypeAny, {
338
352
  type: "solution";
339
353
  name: string;
340
354
  title: string;
@@ -399,9 +413,12 @@ declare const SolutionAppSchema: z.ZodObject<{
399
413
  instructionsCode?: string | undefined;
400
414
  epicVideoEmbeds?: string[] | undefined;
401
415
  }>;
402
- declare const ExampleAppSchema: z.ZodObject<{
416
+ declare const ExampleAppSchema: z.ZodObject<z.objectUtil.extendShape<{
417
+ /** a unique identifier for the app */
403
418
  name: z.ZodString;
419
+ /** the title of the app used for display (comes from the package.json title prop) */
404
420
  title: z.ZodString;
421
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
405
422
  dirName: z.ZodString;
406
423
  fullPath: z.ZodString;
407
424
  relativePath: z.ZodString;
@@ -463,8 +480,9 @@ declare const ExampleAppSchema: z.ZodObject<{
463
480
  }, {
464
481
  type: "none";
465
482
  }>]>;
483
+ }, {
466
484
  type: z.ZodLiteral<"example">;
467
- }, "strip", z.ZodTypeAny, {
485
+ }>, "strip", z.ZodTypeAny, {
468
486
  type: "example";
469
487
  name: string;
470
488
  title: string;
@@ -523,9 +541,12 @@ declare const ExampleAppSchema: z.ZodObject<{
523
541
  instructionsCode?: string | undefined;
524
542
  epicVideoEmbeds?: string[] | undefined;
525
543
  }>;
526
- declare const PlaygroundAppSchema: z.ZodObject<{
544
+ declare const PlaygroundAppSchema: z.ZodObject<z.objectUtil.extendShape<{
545
+ /** a unique identifier for the app */
527
546
  name: z.ZodString;
547
+ /** the title of the app used for display (comes from the package.json title prop) */
528
548
  title: z.ZodString;
549
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
529
550
  dirName: z.ZodString;
530
551
  fullPath: z.ZodString;
531
552
  relativePath: z.ZodString;
@@ -587,10 +608,11 @@ declare const PlaygroundAppSchema: z.ZodObject<{
587
608
  }, {
588
609
  type: "none";
589
610
  }>]>;
611
+ }, {
590
612
  type: z.ZodLiteral<"playground">;
591
613
  appName: z.ZodString;
592
614
  isUpToDate: z.ZodBoolean;
593
- }, "strip", z.ZodTypeAny, {
615
+ }>, "strip", z.ZodTypeAny, {
594
616
  type: "playground";
595
617
  name: string;
596
618
  title: string;
@@ -666,9 +688,12 @@ declare const ExerciseSchema: z.ZodObject<{
666
688
  finishedEpicVideoEmbeds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
667
689
  steps: z.ZodArray<z.ZodUnion<[z.ZodObject<{
668
690
  stepNumber: z.ZodNumber;
669
- problem: z.ZodObject<{
691
+ problem: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
692
+ /** a unique identifier for the app */
670
693
  name: z.ZodString;
694
+ /** the title of the app used for display (comes from the package.json title prop) */
671
695
  title: z.ZodString;
696
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
672
697
  dirName: z.ZodString;
673
698
  fullPath: z.ZodString;
674
699
  relativePath: z.ZodString;
@@ -730,11 +755,13 @@ declare const ExerciseSchema: z.ZodObject<{
730
755
  }, {
731
756
  type: "none";
732
757
  }>]>;
758
+ }, {
733
759
  exerciseNumber: z.ZodNumber;
734
760
  stepNumber: z.ZodNumber;
761
+ }>, {
735
762
  type: z.ZodLiteral<"problem">;
736
763
  solutionName: z.ZodNullable<z.ZodString>;
737
- }, "strip", z.ZodTypeAny, {
764
+ }>, "strip", z.ZodTypeAny, {
738
765
  type: "problem";
739
766
  name: string;
740
767
  title: string;
@@ -799,9 +826,12 @@ declare const ExerciseSchema: z.ZodObject<{
799
826
  instructionsCode?: string | undefined;
800
827
  epicVideoEmbeds?: string[] | undefined;
801
828
  }>;
802
- solution: z.ZodObject<{
829
+ solution: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
830
+ /** a unique identifier for the app */
803
831
  name: z.ZodString;
832
+ /** the title of the app used for display (comes from the package.json title prop) */
804
833
  title: z.ZodString;
834
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
805
835
  dirName: z.ZodString;
806
836
  fullPath: z.ZodString;
807
837
  relativePath: z.ZodString;
@@ -863,11 +893,13 @@ declare const ExerciseSchema: z.ZodObject<{
863
893
  }, {
864
894
  type: "none";
865
895
  }>]>;
896
+ }, {
866
897
  exerciseNumber: z.ZodNumber;
867
898
  stepNumber: z.ZodNumber;
899
+ }>, {
868
900
  type: z.ZodLiteral<"solution">;
869
901
  problemName: z.ZodNullable<z.ZodString>;
870
- }, "strip", z.ZodTypeAny, {
902
+ }>, "strip", z.ZodTypeAny, {
871
903
  type: "solution";
872
904
  name: string;
873
905
  title: string;
@@ -1070,9 +1102,12 @@ declare const ExerciseSchema: z.ZodObject<{
1070
1102
  };
1071
1103
  }>, z.ZodObject<{
1072
1104
  stepNumber: z.ZodNumber;
1073
- problem: z.ZodObject<{
1105
+ problem: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1106
+ /** a unique identifier for the app */
1074
1107
  name: z.ZodString;
1108
+ /** the title of the app used for display (comes from the package.json title prop) */
1075
1109
  title: z.ZodString;
1110
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
1076
1111
  dirName: z.ZodString;
1077
1112
  fullPath: z.ZodString;
1078
1113
  relativePath: z.ZodString;
@@ -1134,11 +1169,13 @@ declare const ExerciseSchema: z.ZodObject<{
1134
1169
  }, {
1135
1170
  type: "none";
1136
1171
  }>]>;
1172
+ }, {
1137
1173
  exerciseNumber: z.ZodNumber;
1138
1174
  stepNumber: z.ZodNumber;
1175
+ }>, {
1139
1176
  type: z.ZodLiteral<"problem">;
1140
1177
  solutionName: z.ZodNullable<z.ZodString>;
1141
- }, "strip", z.ZodTypeAny, {
1178
+ }>, "strip", z.ZodTypeAny, {
1142
1179
  type: "problem";
1143
1180
  name: string;
1144
1181
  title: string;
@@ -1279,9 +1316,12 @@ declare const ExerciseSchema: z.ZodObject<{
1279
1316
  }>, z.ZodObject<{
1280
1317
  stepNumber: z.ZodNumber;
1281
1318
  problem: z.ZodOptional<z.ZodNever>;
1282
- solution: z.ZodObject<{
1319
+ solution: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1320
+ /** a unique identifier for the app */
1283
1321
  name: z.ZodString;
1322
+ /** the title of the app used for display (comes from the package.json title prop) */
1284
1323
  title: z.ZodString;
1324
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
1285
1325
  dirName: z.ZodString;
1286
1326
  fullPath: z.ZodString;
1287
1327
  relativePath: z.ZodString;
@@ -1343,11 +1383,13 @@ declare const ExerciseSchema: z.ZodObject<{
1343
1383
  }, {
1344
1384
  type: "none";
1345
1385
  }>]>;
1386
+ }, {
1346
1387
  exerciseNumber: z.ZodNumber;
1347
1388
  stepNumber: z.ZodNumber;
1389
+ }>, {
1348
1390
  type: z.ZodLiteral<"solution">;
1349
1391
  problemName: z.ZodNullable<z.ZodString>;
1350
- }, "strip", z.ZodTypeAny, {
1392
+ }>, "strip", z.ZodTypeAny, {
1351
1393
  type: "solution";
1352
1394
  name: string;
1353
1395
  title: string;
@@ -1485,9 +1527,12 @@ declare const ExerciseSchema: z.ZodObject<{
1485
1527
  };
1486
1528
  problem?: undefined;
1487
1529
  }>]>, "many">;
1488
- problems: z.ZodArray<z.ZodObject<{
1530
+ problems: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1531
+ /** a unique identifier for the app */
1489
1532
  name: z.ZodString;
1533
+ /** the title of the app used for display (comes from the package.json title prop) */
1490
1534
  title: z.ZodString;
1535
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
1491
1536
  dirName: z.ZodString;
1492
1537
  fullPath: z.ZodString;
1493
1538
  relativePath: z.ZodString;
@@ -1549,11 +1594,13 @@ declare const ExerciseSchema: z.ZodObject<{
1549
1594
  }, {
1550
1595
  type: "none";
1551
1596
  }>]>;
1597
+ }, {
1552
1598
  exerciseNumber: z.ZodNumber;
1553
1599
  stepNumber: z.ZodNumber;
1600
+ }>, {
1554
1601
  type: z.ZodLiteral<"problem">;
1555
1602
  solutionName: z.ZodNullable<z.ZodString>;
1556
- }, "strip", z.ZodTypeAny, {
1603
+ }>, "strip", z.ZodTypeAny, {
1557
1604
  type: "problem";
1558
1605
  name: string;
1559
1606
  title: string;
@@ -1618,9 +1665,12 @@ declare const ExerciseSchema: z.ZodObject<{
1618
1665
  instructionsCode?: string | undefined;
1619
1666
  epicVideoEmbeds?: string[] | undefined;
1620
1667
  }>, "many">;
1621
- solutions: z.ZodArray<z.ZodObject<{
1668
+ solutions: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
1669
+ /** a unique identifier for the app */
1622
1670
  name: z.ZodString;
1671
+ /** the title of the app used for display (comes from the package.json title prop) */
1623
1672
  title: z.ZodString;
1673
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
1624
1674
  dirName: z.ZodString;
1625
1675
  fullPath: z.ZodString;
1626
1676
  relativePath: z.ZodString;
@@ -1682,11 +1732,13 @@ declare const ExerciseSchema: z.ZodObject<{
1682
1732
  }, {
1683
1733
  type: "none";
1684
1734
  }>]>;
1735
+ }, {
1685
1736
  exerciseNumber: z.ZodNumber;
1686
1737
  stepNumber: z.ZodNumber;
1738
+ }>, {
1687
1739
  type: z.ZodLiteral<"solution">;
1688
1740
  problemName: z.ZodNullable<z.ZodString>;
1689
- }, "strip", z.ZodTypeAny, {
1741
+ }>, "strip", z.ZodTypeAny, {
1690
1742
  type: "solution";
1691
1743
  name: string;
1692
1744
  title: string;
@@ -2182,9 +2234,12 @@ declare const ExerciseSchema: z.ZodObject<{
2182
2234
  instructionsEpicVideoEmbeds?: string[] | undefined;
2183
2235
  finishedEpicVideoEmbeds?: string[] | undefined;
2184
2236
  }>;
2185
- declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<{
2237
+ declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2238
+ /** a unique identifier for the app */
2186
2239
  name: z.ZodString;
2240
+ /** the title of the app used for display (comes from the package.json title prop) */
2187
2241
  title: z.ZodString;
2242
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2188
2243
  dirName: z.ZodString;
2189
2244
  fullPath: z.ZodString;
2190
2245
  relativePath: z.ZodString;
@@ -2246,11 +2301,13 @@ declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<{
2246
2301
  }, {
2247
2302
  type: "none";
2248
2303
  }>]>;
2304
+ }, {
2249
2305
  exerciseNumber: z.ZodNumber;
2250
2306
  stepNumber: z.ZodNumber;
2307
+ }>, {
2251
2308
  type: z.ZodLiteral<"problem">;
2252
2309
  solutionName: z.ZodNullable<z.ZodString>;
2253
- }, "strip", z.ZodTypeAny, {
2310
+ }>, "strip", z.ZodTypeAny, {
2254
2311
  type: "problem";
2255
2312
  name: string;
2256
2313
  title: string;
@@ -2314,9 +2371,12 @@ declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<{
2314
2371
  solutionName: string | null;
2315
2372
  instructionsCode?: string | undefined;
2316
2373
  epicVideoEmbeds?: string[] | undefined;
2317
- }>, z.ZodObject<{
2374
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2375
+ /** a unique identifier for the app */
2318
2376
  name: z.ZodString;
2377
+ /** the title of the app used for display (comes from the package.json title prop) */
2319
2378
  title: z.ZodString;
2379
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2320
2380
  dirName: z.ZodString;
2321
2381
  fullPath: z.ZodString;
2322
2382
  relativePath: z.ZodString;
@@ -2378,11 +2438,13 @@ declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<{
2378
2438
  }, {
2379
2439
  type: "none";
2380
2440
  }>]>;
2441
+ }, {
2381
2442
  exerciseNumber: z.ZodNumber;
2382
2443
  stepNumber: z.ZodNumber;
2444
+ }>, {
2383
2445
  type: z.ZodLiteral<"solution">;
2384
2446
  problemName: z.ZodNullable<z.ZodString>;
2385
- }, "strip", z.ZodTypeAny, {
2447
+ }>, "strip", z.ZodTypeAny, {
2386
2448
  type: "solution";
2387
2449
  name: string;
2388
2450
  title: string;
@@ -2447,9 +2509,12 @@ declare const ExerciseStepAppSchema: z.ZodUnion<[z.ZodObject<{
2447
2509
  instructionsCode?: string | undefined;
2448
2510
  epicVideoEmbeds?: string[] | undefined;
2449
2511
  }>]>;
2450
- declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2512
+ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2513
+ /** a unique identifier for the app */
2451
2514
  name: z.ZodString;
2515
+ /** the title of the app used for display (comes from the package.json title prop) */
2452
2516
  title: z.ZodString;
2517
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2453
2518
  dirName: z.ZodString;
2454
2519
  fullPath: z.ZodString;
2455
2520
  relativePath: z.ZodString;
@@ -2511,11 +2576,13 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2511
2576
  }, {
2512
2577
  type: "none";
2513
2578
  }>]>;
2579
+ }, {
2514
2580
  exerciseNumber: z.ZodNumber;
2515
2581
  stepNumber: z.ZodNumber;
2582
+ }>, {
2516
2583
  type: z.ZodLiteral<"problem">;
2517
2584
  solutionName: z.ZodNullable<z.ZodString>;
2518
- }, "strip", z.ZodTypeAny, {
2585
+ }>, "strip", z.ZodTypeAny, {
2519
2586
  type: "problem";
2520
2587
  name: string;
2521
2588
  title: string;
@@ -2579,9 +2646,12 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2579
2646
  solutionName: string | null;
2580
2647
  instructionsCode?: string | undefined;
2581
2648
  epicVideoEmbeds?: string[] | undefined;
2582
- }>, z.ZodObject<{
2649
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
2650
+ /** a unique identifier for the app */
2583
2651
  name: z.ZodString;
2652
+ /** the title of the app used for display (comes from the package.json title prop) */
2584
2653
  title: z.ZodString;
2654
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2585
2655
  dirName: z.ZodString;
2586
2656
  fullPath: z.ZodString;
2587
2657
  relativePath: z.ZodString;
@@ -2643,11 +2713,13 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2643
2713
  }, {
2644
2714
  type: "none";
2645
2715
  }>]>;
2716
+ }, {
2646
2717
  exerciseNumber: z.ZodNumber;
2647
2718
  stepNumber: z.ZodNumber;
2719
+ }>, {
2648
2720
  type: z.ZodLiteral<"solution">;
2649
2721
  problemName: z.ZodNullable<z.ZodString>;
2650
- }, "strip", z.ZodTypeAny, {
2722
+ }>, "strip", z.ZodTypeAny, {
2651
2723
  type: "solution";
2652
2724
  name: string;
2653
2725
  title: string;
@@ -2711,9 +2783,12 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2711
2783
  problemName: string | null;
2712
2784
  instructionsCode?: string | undefined;
2713
2785
  epicVideoEmbeds?: string[] | undefined;
2714
- }>]>, z.ZodObject<{
2786
+ }>]>, z.ZodObject<z.objectUtil.extendShape<{
2787
+ /** a unique identifier for the app */
2715
2788
  name: z.ZodString;
2789
+ /** the title of the app used for display (comes from the package.json title prop) */
2716
2790
  title: z.ZodString;
2791
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2717
2792
  dirName: z.ZodString;
2718
2793
  fullPath: z.ZodString;
2719
2794
  relativePath: z.ZodString;
@@ -2775,10 +2850,11 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2775
2850
  }, {
2776
2851
  type: "none";
2777
2852
  }>]>;
2853
+ }, {
2778
2854
  type: z.ZodLiteral<"playground">;
2779
2855
  appName: z.ZodString;
2780
2856
  isUpToDate: z.ZodBoolean;
2781
- }, "strip", z.ZodTypeAny, {
2857
+ }>, "strip", z.ZodTypeAny, {
2782
2858
  type: "playground";
2783
2859
  name: string;
2784
2860
  title: string;
@@ -2840,9 +2916,12 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2840
2916
  isUpToDate: boolean;
2841
2917
  instructionsCode?: string | undefined;
2842
2918
  epicVideoEmbeds?: string[] | undefined;
2843
- }>, z.ZodObject<{
2919
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2920
+ /** a unique identifier for the app */
2844
2921
  name: z.ZodString;
2922
+ /** the title of the app used for display (comes from the package.json title prop) */
2845
2923
  title: z.ZodString;
2924
+ /** used when displaying the list of files to match the list of apps in the file system (comes the name of the directory of the app) */
2846
2925
  dirName: z.ZodString;
2847
2926
  fullPath: z.ZodString;
2848
2927
  relativePath: z.ZodString;
@@ -2904,8 +2983,9 @@ declare const AppSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2904
2983
  }, {
2905
2984
  type: "none";
2906
2985
  }>]>;
2986
+ }, {
2907
2987
  type: z.ZodLiteral<"example">;
2908
- }, "strip", z.ZodTypeAny, {
2988
+ }>, "strip", z.ZodTypeAny, {
2909
2989
  type: "example";
2910
2990
  name: string;
2911
2991
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"apps.server.d.ts","sourceRoot":"","sources":["../../src/apps.server.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAA;AAGnC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAMrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAiBvB,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAiBtE,KAAK,gBAAgB,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAiChE,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAA;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpB,CAAA;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;UAU3C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,UAInD;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAGpD;AAED,wBAAsB,aAAa,CAClC,MAAM,EAAE,MAAM,EACd,EAAE,KAAK,EAAE,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,iBA2InC;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,2BAgBzC;AA+BD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,UAmB5D;AAED,wBAAsB,gBAAgB,oBAQrC;AAED,wBAAsB,mBAAmB,2BAOxC;AAED,wBAAgB,eAAe,WAE9B;AAED,wBAAsB,uBAAuB,CAAC,EAC7C,OAAO,GACP,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;GAc5B;AAED,wBAAsB,mBAAmB,CAAC,EACzC,OAAO,GACP,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO;;;;;;;;;;;;GAkB5B;AAID,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,UAK/C"}
@@ -56,13 +56,13 @@ export declare const PlayerPreferencesSchema: z.ZodDefault<z.ZodOptional<z.ZodOb
56
56
  defaultView?: string | undefined;
57
57
  activeSidebarTab?: number | undefined;
58
58
  }, {
59
- volumeRate?: number | undefined;
60
- playbackRate?: number | undefined;
61
- autoplay?: boolean | undefined;
62
59
  subtitle?: {
63
60
  id?: string | null | undefined;
64
61
  mode?: "disabled" | "hidden" | "showing" | null | undefined;
65
62
  } | undefined;
63
+ volumeRate?: number | undefined;
64
+ playbackRate?: number | undefined;
65
+ autoplay?: boolean | undefined;
66
66
  muted?: boolean | undefined;
67
67
  theater?: boolean | undefined;
68
68
  defaultView?: string | undefined;
@@ -138,13 +138,13 @@ export declare function getPreferences(): Promise<{
138
138
  };
139
139
  } | null>;
140
140
  export declare function setPlayerPreferences(playerPreferences: z.input<typeof PlayerPreferencesSchema>): Promise<{
141
- volumeRate?: number | undefined;
142
- playbackRate?: number | undefined;
143
- autoplay?: boolean | undefined;
144
141
  subtitle?: {
145
142
  id?: string | null | undefined;
146
143
  mode?: "disabled" | "hidden" | "showing" | null | undefined;
147
144
  } | undefined;
145
+ volumeRate?: number | undefined;
146
+ playbackRate?: number | undefined;
147
+ autoplay?: boolean | undefined;
148
148
  muted?: boolean | undefined;
149
149
  theater?: boolean | undefined;
150
150
  defaultView?: string | undefined;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  import { type ChildProcess } from 'child_process';
3
3
  import closeWithGrace from 'close-with-grace';
4
+ import { type ResultPromise } from 'execa';
4
5
  import { type App } from './apps.server.js';
5
6
  type DevProcessesMap = Map<string, {
6
7
  color: (typeof colors)[number];
@@ -13,7 +14,7 @@ type OutputLine = {
13
14
  timestamp: number;
14
15
  };
15
16
  type TestProcessEntry = {
16
- process: ChildProcess | null;
17
+ process: ResultPromise | null;
17
18
  output: Array<OutputLine>;
18
19
  exitCode?: number | null;
19
20
  };
@@ -43,7 +44,18 @@ export declare function runAppDev(app: App): Promise<{
43
44
  readonly error?: undefined;
44
45
  readonly portNumber?: undefined;
45
46
  }>;
46
- export declare function runAppTests(app: App): Promise<import("execa").ExecaReturnValue<string> | {
47
+ export declare function runAppTests(app: App): Promise<import("execa").Result<{
48
+ cwd: string;
49
+ shell: true;
50
+ stdio: ["ignore", "pipe", "pipe"];
51
+ env: {
52
+ NODE_ENV: "development";
53
+ PORT: string | undefined;
54
+ APP_SERVER_PORT: string | undefined;
55
+ REMIX_DEV_SERVER_WS_PORT: string;
56
+ TZ?: string | undefined;
57
+ };
58
+ }> | {
47
59
  readonly status: "error";
48
60
  readonly error: "no-test";
49
61
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"process-manager.server.d.ts","sourceRoot":"","sources":["../../src/process-manager.server.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,eAAe,CAAA;AAIxD,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAG7C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAO3C,KAAK,eAAe,GAAG,GAAG,CACzB,MAAM,EACN;IACC,KAAK,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IAC9B,OAAO,EAAE,YAAY,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;CACZ,CACD,CAAA;AAED,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAC5B,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB,CAAA;AAED,KAAK,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AACrD,OAAO,CAAC,MAAM,CAAC;IACd,IAAI,uCAAuC,EAAE,UAAU,CACrD,OAAO,cAAc,CACrB,EACD,wCAAwC,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;CAC5E;AAmCD,QAAA,MAAM,MAAM,mIAWF,CAAA;AAEV,wBAAsB,SAAS,CAAC,GAAG,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;GAoEvC;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,GAAG;;;GAmDzC;AAED,wBAAsB,SAAS,CAAC,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QAAQ,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,EAAC;IAChD,IAAI,CAAC,aAAa,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAA;IACpE,CAAC;AACF,CAAC","sourcesContent":["import { type ChildProcess, spawn } from 'child_process'\nimport net from 'node:net'\nimport { remember } from '@epic-web/remember'\nimport chalk from 'chalk'\nimport closeWithGrace from 'close-with-grace'\nimport { execaCommand } from 'execa'\nimport fkill from 'fkill'\nimport { type App } from './apps.server.js'\nimport { getErrorMessage } from './utils.js'\n\nconst isDeployed =\n\tprocess.env.EPICSHOP_DEPLOYED === 'true' ||\n\tprocess.env.EPICSHOP_DEPLOYED === '1'\n\ntype DevProcessesMap = Map<\n\tstring,\n\t{\n\t\tcolor: (typeof colors)[number]\n\t\tprocess: ChildProcess\n\t\tport: number\n\t}\n>\n\ntype OutputLine = {\n\ttype: 'stdout' | 'stderr'\n\tcontent: string\n\ttimestamp: number\n}\n\ntype TestProcessEntry = {\n\tprocess: ChildProcess | null\n\toutput: Array<OutputLine>\n\texitCode?: number | null\n}\n\ntype TestProcessesMap = Map<string, TestProcessEntry>\ndeclare global {\n\tvar __process_dev_close_with_grace_return__: ReturnType<\n\t\t\ttypeof closeWithGrace\n\t\t>,\n\t\t__process_test_close_with_grace_return__: ReturnType<typeof closeWithGrace>\n}\n\nconst devProcesses = remember('dev_processes', getDevProcessesMap)\nconst testProcesses = remember('test_processes', getTestProcessesMap)\n\nfunction getDevProcessesMap() {\n\tconst procs: DevProcessesMap = new Map()\n\n\tglobal.__process_dev_close_with_grace_return__?.uninstall()\n\n\tglobal.__process_dev_close_with_grace_return__ = closeWithGrace(async () => {\n\t\tfor (const [name, proc] of procs.entries()) {\n\t\t\tconsole.log('closing', name)\n\t\t\tproc.process.kill()\n\t\t}\n\t})\n\treturn procs\n}\n\nfunction getTestProcessesMap() {\n\tconst procs: TestProcessesMap = new Map()\n\n\tglobal.__process_test_close_with_grace_return__?.uninstall()\n\n\tglobal.__process_test_close_with_grace_return__ = closeWithGrace(async () => {\n\t\tfor (const [id, proc] of procs.entries()) {\n\t\t\tif (proc.process) {\n\t\t\t\tconsole.log('closing', id)\n\t\t\t\tproc.process.kill()\n\t\t\t}\n\t\t}\n\t})\n\treturn procs\n}\n\nconst colors = [\n\t'blue',\n\t'green',\n\t'yellow',\n\t'red',\n\t'magenta',\n\t'redBright',\n\t'greenBright',\n\t'yellowBright',\n\t'blueBright',\n\t'magentaBright',\n] as const\n\nexport async function runAppDev(app: App) {\n\tif (isDeployed) throw new Error('cannot run apps in deployed mode')\n\tconst key = app.name\n\t// if the app is already running, don't start it again\n\tif (devProcesses.has(key)) {\n\t\treturn { status: 'process-running', running: true } as const\n\t}\n\n\tif (app.dev.type !== 'script') {\n\t\treturn { status: 'error', error: 'no-server' } as const\n\t}\n\n\tconst { portNumber } = app.dev\n\tif (!(await isPortAvailable(portNumber))) {\n\t\treturn { status: 'port-unavailable', running: false, portNumber } as const\n\t}\n\tconst availableColors = colors.filter(color =>\n\t\tArray.from(devProcesses.values()).every(p => p.color !== color),\n\t)\n\tconst color =\n\t\tavailableColors[devProcesses.size % availableColors.length] ?? 'blue'\n\tconst appProcess = spawn('npm', ['run', 'dev'], {\n\t\tcwd: app.fullPath,\n\t\tshell: true,\n\t\tstdio: ['ignore', 'pipe', 'pipe'],\n\t\tenv: {\n\t\t\t...process.env,\n\t\t\t// TODO: support specifying the env\n\t\t\tNODE_ENV: 'development',\n\t\t\t// TODO: support specifying the port\n\t\t\tPORT: String(portNumber),\n\t\t\tAPP_SERVER_PORT: String(portNumber),\n\t\t\t// let it pick a random port...\n\t\t\tREMIX_DEV_SERVER_WS_PORT: '',\n\t\t},\n\t})\n\tconst prefix = chalk[color](\n\t\t`[${app.name.replace(/^exercises\\./, '')}:${portNumber}]`,\n\t)\n\tfunction handleStdOutData(data: Buffer) {\n\t\tconsole.log(\n\t\t\tdata\n\t\t\t\t.toString('utf-8')\n\t\t\t\t.split('\\n')\n\t\t\t\t.map(line => `${prefix} ${line}`)\n\t\t\t\t.join('\\n'),\n\t\t)\n\t}\n\tappProcess.stdout.on('data', handleStdOutData)\n\tfunction handleStdErrData(data: Buffer) {\n\t\tconsole.error(\n\t\t\tdata\n\t\t\t\t.toString('utf-8')\n\t\t\t\t.split('\\n')\n\t\t\t\t.map(line => `${prefix} ${line}`)\n\t\t\t\t.join('\\n'),\n\t\t)\n\t}\n\tappProcess.stderr.on('data', handleStdErrData)\n\tdevProcesses.set(key, { color, process: appProcess, port: portNumber })\n\tappProcess.on('exit', code => {\n\t\tappProcess.stdout.off('data', handleStdOutData)\n\t\tappProcess.stderr.off('data', handleStdErrData)\n\t\tconsole.log(`${prefix} exited (${code})`)\n\t\tdevProcesses.delete(key)\n\t})\n\n\treturn { status: 'process-started', running: true } as const\n}\n\nexport async function runAppTests(app: App) {\n\tif (isDeployed) throw new Error('cannot run tests in deployed mode')\n\tconst key = app.name\n\n\tif (app.test.type !== 'script') {\n\t\treturn { status: 'error', error: 'no-test' } as const\n\t}\n\n\tconst testProcess = execaCommand(app.test.script, {\n\t\tcwd: app.fullPath,\n\t\tshell: true,\n\t\tstdio: ['ignore', 'pipe', 'pipe'],\n\t\tenv: {\n\t\t\t...process.env,\n\t\t\t// TODO: support specifying the env\n\t\t\tNODE_ENV: 'development',\n\t\t\t// TODO: support specifying the port\n\t\t\tPORT: app.dev.type === 'script' ? String(app.dev.portNumber) : undefined,\n\t\t\tAPP_SERVER_PORT:\n\t\t\t\tapp.dev.type === 'script' ? String(app.dev.portNumber) : undefined,\n\t\t\t// let it pick a random port...\n\t\t\tREMIX_DEV_SERVER_WS_PORT: '',\n\t\t},\n\t})\n\tconst output: Array<OutputLine> = []\n\tconst entry: TestProcessEntry = { process: testProcess, output }\n\tfunction handleStdOutData(data: Buffer) {\n\t\toutput.push({\n\t\t\ttype: 'stdout',\n\t\t\tcontent: data.toString('utf-8'),\n\t\t\ttimestamp: Date.now(),\n\t\t})\n\t}\n\ttestProcess.stdout?.on('data', handleStdOutData)\n\tfunction handleStdErrData(data: Buffer) {\n\t\toutput.push({\n\t\t\ttype: 'stderr',\n\t\t\tcontent: data.toString('utf-8'),\n\t\t\ttimestamp: Date.now(),\n\t\t})\n\t}\n\ttestProcess.stderr?.on('data', handleStdErrData)\n\tvoid testProcess.on('exit', code => {\n\t\ttestProcess.stdout?.off('data', handleStdOutData)\n\t\ttestProcess.stderr?.off('data', handleStdErrData)\n\t\t// don't delete the entry from the map so we can show the output at any time\n\t\tentry.process = null\n\t\tentry.exitCode = code\n\t})\n\ttestProcesses.set(key, entry)\n\treturn testProcess\n}\n\nexport async function waitOnApp(app: App) {\n\tif (app.dev.type === 'script') {\n\t\tconst startTime = Date.now()\n\n\t\tconst retryInterval = 100\n\t\tconst timeout = 20_000\n\t\tlet lastError: unknown\n\t\twhile (Date.now() - startTime < timeout) {\n\t\t\ttry {\n\t\t\t\tawait fetch(`http://localhost:${app.dev.portNumber}`, {\n\t\t\t\t\tmethod: 'HEAD',\n\t\t\t\t\theaders: { Accept: '*/*' },\n\t\t\t\t})\n\t\t\t\treturn { status: 'success' } as const\n\t\t\t} catch (error) {\n\t\t\t\tlastError = error\n\t\t\t\tawait new Promise(resolve => setTimeout(resolve, retryInterval))\n\t\t\t}\n\t\t}\n\n\t\treturn { status: 'error', error: getErrorMessage(lastError) } as const\n\t}\n\treturn null\n}\n\nexport function isPortAvailable(port: number | string): Promise<boolean> {\n\treturn new Promise(resolve => {\n\t\tconst server = net.createServer()\n\t\tserver.unref()\n\t\tserver.on('error', () => resolve(false))\n\n\t\tserver.listen(Number(port), () => {\n\t\t\tserver.close(() => {\n\t\t\t\tresolve(true)\n\t\t\t})\n\t\t})\n\t})\n}\n\nexport function isAppRunning(app: { name: string }) {\n\ttry {\n\t\tconst devProcess = devProcesses.get(app.name)\n\t\tif (!devProcess) return false\n\t\tdevProcess.process.kill(0)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport function isTestRunning(app: { name: string }) {\n\ttry {\n\t\tconst testProcess = testProcesses.get(app.name)\n\t\tif (!testProcess) return false\n\t\tif (testProcess.process === null) return false\n\t\ttestProcess.process.kill(0)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport function getTestProcessEntry(app: { name: string }) {\n\treturn testProcesses.get(app.name)\n}\n\nexport function clearTestProcessEntry(app: { name: string }) {\n\treturn testProcesses.delete(app.name)\n}\n\nexport function getProcesses() {\n\treturn { devProcesses, testProcesses }\n}\n\nexport async function closeProcess(key: string) {\n\tif (isDeployed) throw new Error('cannot close processes in deployed mode')\n\tconst proc = devProcesses.get(key)\n\tif (proc) {\n\t\tconst exitedPromise = new Promise(resolve =>\n\t\t\tproc.process.on('exit', resolve),\n\t\t)\n\t\tif (process.platform === 'win32') {\n\t\t\tconst { execa } = await import('execa')\n\t\t\tawait execa('taskkill', ['/pid', String(proc.process.pid), '/f', '/t'])\n\t\t} else {\n\t\t\tproc.process.kill()\n\t\t}\n\t\tawait Promise.race([\n\t\t\tnew Promise(resolve => setTimeout(resolve, 500)),\n\t\t\texitedPromise,\n\t\t])\n\t\tawait stopPort(proc.port) // just in case 🤷‍♂️\n\t\tdevProcesses.delete(key)\n\t}\n}\n\nconst sleep = (t: number) => new Promise(resolve => setTimeout(resolve, t))\n\nexport async function stopPort(port: string | number) {\n\tif (isDeployed) throw new Error('cannot stop ports in deployed mode')\n\tawait fkill(`:${port}`, { force: true, silent: true })\n\tawait waitForPortToBeAvailable(port)\n}\n\nexport async function waitForPortToBeAvailable(port: string | number) {\n\t// wait for the port to become available again\n\tconst timeout = Date.now() + 10_000\n\tlet portAvailable = false\n\tdo {\n\t\tportAvailable = await isPortAvailable(port)\n\t\tawait sleep(100)\n\t} while (!portAvailable && Date.now() < timeout)\n\tif (!portAvailable) {\n\t\tconsole.error('Timed out waiting for the port to become available')\n\t}\n}\n"]}
1
+ {"version":3,"file":"process-manager.server.js","sourceRoot":"","sources":["../../src/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AC,CAAA;IACpE,CAAC;AACF,CAAC","sourcesContent":["import { type ChildProcess, spawn } from 'child_process'\nimport net from 'node:net'\nimport { remember } from '@epic-web/remember'\nimport chalk from 'chalk'\nimport closeWithGrace from 'close-with-grace'\nimport { type ResultPromise, execaCommand } from 'execa'\nimport fkill from 'fkill'\nimport { type App } from './apps.server.js'\nimport { getErrorMessage } from './utils.js'\n\nconst isDeployed =\n\tprocess.env.EPICSHOP_DEPLOYED === 'true' ||\n\tprocess.env.EPICSHOP_DEPLOYED === '1'\n\ntype DevProcessesMap = Map<\n\tstring,\n\t{\n\t\tcolor: (typeof colors)[number]\n\t\tprocess: ChildProcess\n\t\tport: number\n\t}\n>\n\ntype OutputLine = {\n\ttype: 'stdout' | 'stderr'\n\tcontent: string\n\ttimestamp: number\n}\n\ntype TestProcessEntry = {\n\tprocess: ResultPromise | null\n\toutput: Array<OutputLine>\n\texitCode?: number | null\n}\n\ntype TestProcessesMap = Map<string, TestProcessEntry>\ndeclare global {\n\tvar __process_dev_close_with_grace_return__: ReturnType<\n\t\t\ttypeof closeWithGrace\n\t\t>,\n\t\t__process_test_close_with_grace_return__: ReturnType<typeof closeWithGrace>\n}\n\nconst devProcesses = remember('dev_processes', getDevProcessesMap)\nconst testProcesses = remember('test_processes', getTestProcessesMap)\n\nfunction getDevProcessesMap() {\n\tconst procs: DevProcessesMap = new Map()\n\n\tglobal.__process_dev_close_with_grace_return__?.uninstall()\n\n\tglobal.__process_dev_close_with_grace_return__ = closeWithGrace(async () => {\n\t\tfor (const [name, proc] of procs.entries()) {\n\t\t\tconsole.log('closing', name)\n\t\t\tproc.process.kill()\n\t\t}\n\t})\n\treturn procs\n}\n\nfunction getTestProcessesMap() {\n\tconst procs: TestProcessesMap = new Map()\n\n\tglobal.__process_test_close_with_grace_return__?.uninstall()\n\n\tglobal.__process_test_close_with_grace_return__ = closeWithGrace(async () => {\n\t\tfor (const [id, proc] of procs.entries()) {\n\t\t\tif (proc.process) {\n\t\t\t\tconsole.log('closing', id)\n\t\t\t\tproc.process.kill()\n\t\t\t}\n\t\t}\n\t})\n\treturn procs\n}\n\nconst colors = [\n\t'blue',\n\t'green',\n\t'yellow',\n\t'red',\n\t'magenta',\n\t'redBright',\n\t'greenBright',\n\t'yellowBright',\n\t'blueBright',\n\t'magentaBright',\n] as const\n\nexport async function runAppDev(app: App) {\n\tif (isDeployed) throw new Error('cannot run apps in deployed mode')\n\tconst key = app.name\n\t// if the app is already running, don't start it again\n\tif (devProcesses.has(key)) {\n\t\treturn { status: 'process-running', running: true } as const\n\t}\n\n\tif (app.dev.type !== 'script') {\n\t\treturn { status: 'error', error: 'no-server' } as const\n\t}\n\n\tconst { portNumber } = app.dev\n\tif (!(await isPortAvailable(portNumber))) {\n\t\treturn { status: 'port-unavailable', running: false, portNumber } as const\n\t}\n\tconst availableColors = colors.filter(color =>\n\t\tArray.from(devProcesses.values()).every(p => p.color !== color),\n\t)\n\tconst color =\n\t\tavailableColors[devProcesses.size % availableColors.length] ?? 'blue'\n\tconst appProcess = spawn('npm', ['run', 'dev'], {\n\t\tcwd: app.fullPath,\n\t\tshell: true,\n\t\tstdio: ['ignore', 'pipe', 'pipe'],\n\t\tenv: {\n\t\t\t...process.env,\n\t\t\t// TODO: support specifying the env\n\t\t\tNODE_ENV: 'development',\n\t\t\t// TODO: support specifying the port\n\t\t\tPORT: String(portNumber),\n\t\t\tAPP_SERVER_PORT: String(portNumber),\n\t\t\t// let it pick a random port...\n\t\t\tREMIX_DEV_SERVER_WS_PORT: '',\n\t\t},\n\t})\n\tconst prefix = chalk[color](\n\t\t`[${app.name.replace(/^exercises\\./, '')}:${portNumber}]`,\n\t)\n\tfunction handleStdOutData(data: Buffer) {\n\t\tconsole.log(\n\t\t\tdata\n\t\t\t\t.toString('utf-8')\n\t\t\t\t.split('\\n')\n\t\t\t\t.map(line => `${prefix} ${line}`)\n\t\t\t\t.join('\\n'),\n\t\t)\n\t}\n\tappProcess.stdout.on('data', handleStdOutData)\n\tfunction handleStdErrData(data: Buffer) {\n\t\tconsole.error(\n\t\t\tdata\n\t\t\t\t.toString('utf-8')\n\t\t\t\t.split('\\n')\n\t\t\t\t.map(line => `${prefix} ${line}`)\n\t\t\t\t.join('\\n'),\n\t\t)\n\t}\n\tappProcess.stderr.on('data', handleStdErrData)\n\tdevProcesses.set(key, { color, process: appProcess, port: portNumber })\n\tappProcess.on('exit', code => {\n\t\tappProcess.stdout.off('data', handleStdOutData)\n\t\tappProcess.stderr.off('data', handleStdErrData)\n\t\tconsole.log(`${prefix} exited (${code})`)\n\t\tdevProcesses.delete(key)\n\t})\n\n\treturn { status: 'process-started', running: true } as const\n}\n\nexport async function runAppTests(app: App) {\n\tif (isDeployed) throw new Error('cannot run tests in deployed mode')\n\tconst key = app.name\n\n\tif (app.test.type !== 'script') {\n\t\treturn { status: 'error', error: 'no-test' } as const\n\t}\n\n\tconst testProcess = execaCommand(app.test.script, {\n\t\tcwd: app.fullPath,\n\t\tshell: true,\n\t\tstdio: ['ignore', 'pipe', 'pipe'],\n\t\tenv: {\n\t\t\t...process.env,\n\t\t\t// TODO: support specifying the env\n\t\t\tNODE_ENV: 'development',\n\t\t\t// TODO: support specifying the port\n\t\t\tPORT: app.dev.type === 'script' ? String(app.dev.portNumber) : undefined,\n\t\t\tAPP_SERVER_PORT:\n\t\t\t\tapp.dev.type === 'script' ? String(app.dev.portNumber) : undefined,\n\t\t\t// let it pick a random port...\n\t\t\tREMIX_DEV_SERVER_WS_PORT: '',\n\t\t},\n\t})\n\tconst output: Array<OutputLine> = []\n\tconst entry: TestProcessEntry = { process: testProcess, output }\n\tfunction handleStdOutData(data: Buffer) {\n\t\toutput.push({\n\t\t\ttype: 'stdout',\n\t\t\tcontent: data.toString('utf-8'),\n\t\t\ttimestamp: Date.now(),\n\t\t})\n\t}\n\ttestProcess.stdout?.on('data', handleStdOutData)\n\tfunction handleStdErrData(data: Buffer) {\n\t\toutput.push({\n\t\t\ttype: 'stderr',\n\t\t\tcontent: data.toString('utf-8'),\n\t\t\ttimestamp: Date.now(),\n\t\t})\n\t}\n\ttestProcess.stderr?.on('data', handleStdErrData)\n\tvoid testProcess.on('exit', code => {\n\t\ttestProcess.stdout?.off('data', handleStdOutData)\n\t\ttestProcess.stderr?.off('data', handleStdErrData)\n\t\t// don't delete the entry from the map so we can show the output at any time\n\t\tentry.process = null\n\t\tentry.exitCode = code\n\t})\n\ttestProcesses.set(key, entry)\n\treturn testProcess\n}\n\nexport async function waitOnApp(app: App) {\n\tif (app.dev.type === 'script') {\n\t\tconst startTime = Date.now()\n\n\t\tconst retryInterval = 100\n\t\tconst timeout = 20_000\n\t\tlet lastError: unknown\n\t\twhile (Date.now() - startTime < timeout) {\n\t\t\ttry {\n\t\t\t\tawait fetch(`http://localhost:${app.dev.portNumber}`, {\n\t\t\t\t\tmethod: 'HEAD',\n\t\t\t\t\theaders: { Accept: '*/*' },\n\t\t\t\t})\n\t\t\t\treturn { status: 'success' } as const\n\t\t\t} catch (error) {\n\t\t\t\tlastError = error\n\t\t\t\tawait new Promise(resolve => setTimeout(resolve, retryInterval))\n\t\t\t}\n\t\t}\n\n\t\treturn { status: 'error', error: getErrorMessage(lastError) } as const\n\t}\n\treturn null\n}\n\nexport function isPortAvailable(port: number | string): Promise<boolean> {\n\treturn new Promise(resolve => {\n\t\tconst server = net.createServer()\n\t\tserver.unref()\n\t\tserver.on('error', () => resolve(false))\n\n\t\tserver.listen(Number(port), () => {\n\t\t\tserver.close(() => {\n\t\t\t\tresolve(true)\n\t\t\t})\n\t\t})\n\t})\n}\n\nexport function isAppRunning(app: { name: string }) {\n\ttry {\n\t\tconst devProcess = devProcesses.get(app.name)\n\t\tif (!devProcess) return false\n\t\tdevProcess.process.kill(0)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport function isTestRunning(app: { name: string }) {\n\ttry {\n\t\tconst testProcess = testProcesses.get(app.name)\n\t\tif (!testProcess) return false\n\t\tif (testProcess.process === null) return false\n\t\ttestProcess.process.kill(0)\n\t\treturn true\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport function getTestProcessEntry(app: { name: string }) {\n\treturn testProcesses.get(app.name)\n}\n\nexport function clearTestProcessEntry(app: { name: string }) {\n\treturn testProcesses.delete(app.name)\n}\n\nexport function getProcesses() {\n\treturn { devProcesses, testProcesses }\n}\n\nexport async function closeProcess(key: string) {\n\tif (isDeployed) throw new Error('cannot close processes in deployed mode')\n\tconst proc = devProcesses.get(key)\n\tif (proc) {\n\t\tconst exitedPromise = new Promise(resolve =>\n\t\t\tproc.process.on('exit', resolve),\n\t\t)\n\t\tif (process.platform === 'win32') {\n\t\t\tconst { execa } = await import('execa')\n\t\t\tawait execa('taskkill', ['/pid', String(proc.process.pid), '/f', '/t'])\n\t\t} else {\n\t\t\tproc.process.kill()\n\t\t}\n\t\tawait Promise.race([\n\t\t\tnew Promise(resolve => setTimeout(resolve, 500)),\n\t\t\texitedPromise,\n\t\t])\n\t\tawait stopPort(proc.port) // just in case 🤷‍♂️\n\t\tdevProcesses.delete(key)\n\t}\n}\n\nconst sleep = (t: number) => new Promise(resolve => setTimeout(resolve, t))\n\nexport async function stopPort(port: string | number) {\n\tif (isDeployed) throw new Error('cannot stop ports in deployed mode')\n\tawait fkill(`:${port}`, { force: true, silent: true })\n\tawait waitForPortToBeAvailable(port)\n}\n\nexport async function waitForPortToBeAvailable(port: string | number) {\n\t// wait for the port to become available again\n\tconst timeout = Date.now() + 10_000\n\tlet portAvailable = false\n\tdo {\n\t\tportAvailable = await isPortAvailable(port)\n\t\tawait sleep(100)\n\t} while (!portAvailable && Date.now() < timeout)\n\tif (!portAvailable) {\n\t\tconsole.error('Timed out waiting for the port to become available')\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-web/workshop-utils",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -100,29 +100,29 @@
100
100
  "build:watch": "nx watch --projects=@epic-web/workshop-utils -- nx run \\$NX_PROJECT_NAME:build"
101
101
  },
102
102
  "dependencies": {
103
- "@epic-web/cachified": "^5.1.2",
103
+ "@epic-web/cachified": "^5.2.0",
104
104
  "@epic-web/remember": "^1.0.2",
105
105
  "@kentcdodds/md-temp": "^8.0.1",
106
106
  "@mdx-js/mdx": "^3.0.1",
107
- "@playwright/test": "^1.42.1",
108
- "@remix-run/node": "^2.8.1",
109
- "@testing-library/dom": "^9.3.4",
107
+ "@playwright/test": "^1.44.1",
108
+ "@remix-run/node": "^2.9.2",
109
+ "@testing-library/dom": "^10.1.0",
110
110
  "@total-typescript/ts-reset": "^0.5.1",
111
- "chai": "^5.1.0",
111
+ "chai": "^5.1.1",
112
112
  "chai-dom": "^1.12.0",
113
113
  "chalk": "^5.3.0",
114
114
  "chokidar": "^3.6.0",
115
115
  "close-with-grace": "^1.3.0",
116
116
  "cross-spawn": "^7.0.3",
117
- "execa": "^8.0.1",
117
+ "execa": "^9.1.0",
118
118
  "fkill": "^9.0.0",
119
119
  "fs-extra": "^11.2.0",
120
- "glob": "^10.3.10",
120
+ "glob": "^10.3.16",
121
121
  "globby": "^14.0.1",
122
- "lru-cache": "^10.2.0",
122
+ "lru-cache": "^10.2.2",
123
123
  "md5-hex": "^5.0.0",
124
- "mdast-util-mdx-jsx": "^3.1.1",
125
- "mdx-bundler": "^10.0.1",
124
+ "mdast-util-mdx-jsx": "^3.1.2",
125
+ "mdx-bundler": "^10.0.2",
126
126
  "p-queue": "^8.0.1",
127
127
  "rehype": "^13.0.1",
128
128
  "remark": "^15.0.1",
@@ -132,13 +132,13 @@
132
132
  "unified": "^11.0.4",
133
133
  "unist-util-remove-position": "^5.0.0",
134
134
  "unist-util-visit": "^5.0.0",
135
- "zod": "^3.22.4"
135
+ "zod": "^3.23.8"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@types/hast": "^3.0.4",
139
- "@types/mdast": "^4.0.3",
140
- "@types/node": "^20.11.25",
141
- "tshy": "^1.11.1"
139
+ "@types/mdast": "^4.0.4",
140
+ "@types/node": "^20.12.12",
141
+ "tshy": "^1.14.0"
142
142
  },
143
143
  "tshy": {
144
144
  "project": "./tsconfig.build.json",