@virmator/init 13.16.2 → 14.0.1

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.
@@ -13,7 +13,7 @@
13
13
  "lint": "virmator lint fix",
14
14
  "publish": "virmator publish npm run test:all",
15
15
  "test": "mono-vir for-each-async npm run test",
16
- "test:all": "npm run compile && concurrently --colors --kill-others-on-fail -c auto --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
16
+ "test:all": "npm run compile && runstorm --kill-on=failure --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
17
17
  "test:coverage": "mono-vir for-each-async npm run test:coverage",
18
18
  "test:deps": "virmator deps check",
19
19
  "test:docs": "virmator docs check",
@@ -15,7 +15,7 @@
15
15
  "publish": "virmator publish npm run test:all",
16
16
  "start": "tsx src/index.ts",
17
17
  "test": "virmator test node",
18
- "test:all": "npm run compile && concurrently --colors --kill-others-on-fail -c auto --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
18
+ "test:all": "npm run compile && runstorm --kill-on=failure --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
19
19
  "test:coverage": "npm run test coverage",
20
20
  "test:deps": "virmator deps check",
21
21
  "test:docs": "virmator docs check",
@@ -16,7 +16,7 @@
16
16
  "publish": "virmator publish npm run test:all",
17
17
  "start": "virmator frontend",
18
18
  "test": "virmator test web",
19
- "test:all": "npm run compile && concurrently --colors --kill-others-on-fail -c auto --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
19
+ "test:all": "npm run compile && runstorm --kill-on=failure --names tests,spelling,format,docs,deps,lint \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\" \"npm run test:lint\"",
20
20
  "test:coverage": "npm run test coverage",
21
21
  "test:deps": "virmator deps check",
22
22
  "test:docs": "virmator docs check",
package/dist/init.d.ts CHANGED
@@ -2,8 +2,6 @@
2
2
  * Tests for this plugin are inside the `virmator` package since a lot of `init`'s functionality is
3
3
  * missed without the other packages.
4
4
  */
5
- import { RuntimeEnv } from '@augment-vir/common';
6
- import { PackageType } from '@virmator/core';
7
5
  /** A virmator plugin for initializing entire repositories or just npm packages within them. */
8
6
  export declare const virmatorInitPlugin: Readonly<Readonly<{
9
7
  name: string;
@@ -21,141 +19,248 @@ export declare const virmatorInitPlugin: Readonly<Readonly<{
21
19
  readonly ghPages: {
22
20
  readonly copyFromPath: string;
23
21
  readonly copyToPath: string;
24
- readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
25
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
22
+ readonly env: {
23
+ readonly node: true;
24
+ readonly web: true;
25
+ };
26
+ readonly packageType: {
27
+ readonly "top-level-package": true;
28
+ readonly "mono-root": true;
29
+ };
26
30
  readonly required: false;
27
31
  };
28
32
  readonly ghTaggedRelease: {
29
33
  readonly copyFromPath: string;
30
34
  readonly copyToPath: string;
31
- readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
32
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
35
+ readonly env: {
36
+ readonly node: true;
37
+ readonly web: true;
38
+ };
39
+ readonly packageType: {
40
+ readonly "top-level-package": true;
41
+ readonly "mono-root": true;
42
+ };
33
43
  readonly required: false;
34
44
  };
35
45
  readonly ghTestsNode: {
36
46
  readonly copyFromPath: string;
37
47
  readonly copyToPath: string;
38
- readonly env: [RuntimeEnv.Node];
39
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
48
+ readonly env: {
49
+ readonly node: true;
50
+ };
51
+ readonly packageType: {
52
+ readonly "top-level-package": true;
53
+ readonly "mono-root": true;
54
+ };
40
55
  readonly required: false;
41
56
  };
42
57
  readonly ghTestsWeb: {
43
58
  readonly copyFromPath: string;
44
59
  readonly copyToPath: string;
45
- readonly env: [RuntimeEnv.Web];
46
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
60
+ readonly env: {
61
+ readonly web: true;
62
+ };
63
+ readonly packageType: {
64
+ readonly "top-level-package": true;
65
+ readonly "mono-root": true;
66
+ };
47
67
  readonly required: false;
48
68
  };
49
69
  readonly vscodeSettings: {
50
70
  readonly copyFromPath: string;
51
71
  readonly copyToPath: string;
52
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
53
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
72
+ readonly env: {
73
+ readonly web: true;
74
+ readonly node: true;
75
+ };
76
+ readonly packageType: {
77
+ readonly "top-level-package": true;
78
+ readonly "mono-root": true;
79
+ };
54
80
  readonly required: false;
55
81
  };
56
82
  readonly appElement: {
57
83
  readonly copyFromPath: string;
58
84
  readonly copyToPath: string;
59
- readonly env: [RuntimeEnv.Web];
60
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
85
+ readonly env: {
86
+ readonly web: true;
87
+ };
88
+ readonly packageType: {
89
+ readonly "top-level-package": true;
90
+ readonly "mono-package": true;
91
+ };
61
92
  readonly required: false;
62
93
  };
63
94
  readonly indexHtml: {
64
95
  readonly copyFromPath: string;
65
96
  readonly copyToPath: string;
66
- readonly env: [RuntimeEnv.Web];
67
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
97
+ readonly env: {
98
+ readonly web: true;
99
+ };
100
+ readonly packageType: {
101
+ readonly "top-level-package": true;
102
+ readonly "mono-package": true;
103
+ };
68
104
  readonly required: false;
69
105
  };
70
106
  readonly indexCss: {
71
107
  readonly copyFromPath: string;
72
108
  readonly copyToPath: string;
73
- readonly env: [RuntimeEnv.Web];
74
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
109
+ readonly env: {
110
+ readonly web: true;
111
+ };
112
+ readonly packageType: {
113
+ readonly "top-level-package": true;
114
+ readonly "mono-package": true;
115
+ };
75
116
  readonly required: false;
76
117
  };
77
118
  readonly redirects: {
78
119
  readonly copyFromPath: string;
79
120
  readonly copyToPath: string;
80
- readonly env: [RuntimeEnv.Web];
81
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
121
+ readonly env: {
122
+ readonly web: true;
123
+ };
124
+ readonly packageType: {
125
+ readonly "top-level-package": true;
126
+ readonly "mono-package": true;
127
+ };
82
128
  readonly required: false;
83
129
  };
84
130
  readonly gitAttributes: {
85
131
  readonly copyFromPath: string;
86
132
  readonly copyToPath: string;
87
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
88
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
133
+ readonly env: {
134
+ readonly web: true;
135
+ readonly node: true;
136
+ };
137
+ readonly packageType: {
138
+ readonly "top-level-package": true;
139
+ readonly "mono-root": true;
140
+ };
89
141
  readonly required: false;
90
142
  };
91
143
  readonly nvmrc: {
92
144
  readonly copyFromPath: string;
93
145
  readonly copyToPath: string;
94
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
95
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
146
+ readonly env: {
147
+ readonly web: true;
148
+ readonly node: true;
149
+ };
150
+ readonly packageType: {
151
+ readonly "top-level-package": true;
152
+ readonly "mono-root": true;
153
+ };
96
154
  readonly required: false;
97
155
  };
98
156
  readonly gitignore: {
99
157
  readonly copyFromPath: string;
100
158
  readonly copyToPath: string;
101
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
102
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
159
+ readonly env: {
160
+ readonly web: true;
161
+ readonly node: true;
162
+ };
163
+ readonly packageType: {
164
+ readonly "top-level-package": true;
165
+ readonly "mono-root": true;
166
+ };
103
167
  readonly required: false;
104
168
  };
105
169
  readonly licenseMit: {
106
170
  readonly copyFromPath: string;
107
171
  readonly copyToPath: string;
108
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
109
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
172
+ readonly env: {
173
+ readonly web: true;
174
+ readonly node: true;
175
+ };
176
+ readonly packageType: {
177
+ readonly "top-level-package": true;
178
+ readonly "mono-root": true;
179
+ readonly "mono-package": true;
180
+ };
110
181
  readonly required: false;
111
182
  };
112
183
  readonly licenseCc0: {
113
184
  readonly copyFromPath: string;
114
185
  readonly copyToPath: string;
115
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
116
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
186
+ readonly env: {
187
+ readonly web: true;
188
+ readonly node: true;
189
+ };
190
+ readonly packageType: {
191
+ readonly "top-level-package": true;
192
+ readonly "mono-root": true;
193
+ readonly "mono-package": true;
194
+ };
117
195
  readonly required: false;
118
196
  };
119
197
  readonly npmIgnore: {
120
198
  readonly copyFromPath: string;
121
199
  readonly copyToPath: string;
122
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
123
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
200
+ readonly env: {
201
+ readonly web: true;
202
+ readonly node: true;
203
+ };
204
+ readonly packageType: {
205
+ readonly "top-level-package": true;
206
+ readonly "mono-package": true;
207
+ };
124
208
  readonly required: false;
125
209
  };
126
210
  readonly monoPackageNodePackageJson: {
127
211
  readonly copyFromPath: string;
128
212
  readonly copyToPath: string;
129
- readonly env: [RuntimeEnv.Node];
130
- readonly packageType: [PackageType.MonoPackage];
213
+ readonly env: {
214
+ readonly node: true;
215
+ };
216
+ readonly packageType: {
217
+ readonly "mono-package": true;
218
+ };
131
219
  readonly required: false;
132
220
  };
133
221
  readonly monoPackageWebPackageJson: {
134
222
  readonly copyFromPath: string;
135
223
  readonly copyToPath: string;
136
- readonly env: [RuntimeEnv.Web];
137
- readonly packageType: [PackageType.MonoPackage];
224
+ readonly env: {
225
+ readonly web: true;
226
+ };
227
+ readonly packageType: {
228
+ readonly "mono-package": true;
229
+ };
138
230
  readonly required: false;
139
231
  };
140
232
  readonly monoRootPackageJson: {
141
233
  readonly copyFromPath: string;
142
234
  readonly copyToPath: string;
143
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
144
- readonly packageType: [PackageType.MonoRoot];
235
+ readonly env: {
236
+ readonly web: true;
237
+ readonly node: true;
238
+ };
239
+ readonly packageType: {
240
+ readonly "mono-root": true;
241
+ };
145
242
  readonly required: false;
146
243
  };
147
244
  readonly topPackageNodePackageJson: {
148
245
  readonly copyFromPath: string;
149
246
  readonly copyToPath: string;
150
- readonly env: [RuntimeEnv.Node];
151
- readonly packageType: [PackageType.TopPackage];
247
+ readonly env: {
248
+ readonly node: true;
249
+ };
250
+ readonly packageType: {
251
+ readonly "top-level-package": true;
252
+ };
152
253
  readonly required: false;
153
254
  };
154
255
  readonly topPackageWebPackageJson: {
155
256
  readonly copyFromPath: string;
156
257
  readonly copyToPath: string;
157
- readonly env: [RuntimeEnv.Web];
158
- readonly packageType: [PackageType.TopPackage];
258
+ readonly env: {
259
+ readonly web: true;
260
+ };
261
+ readonly packageType: {
262
+ readonly "top-level-package": true;
263
+ };
159
264
  readonly required: false;
160
265
  };
161
266
  };
@@ -177,141 +282,248 @@ export declare const virmatorInitPlugin: Readonly<Readonly<{
177
282
  readonly ghPages: {
178
283
  readonly copyFromPath: string;
179
284
  readonly copyToPath: string;
180
- readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
181
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
285
+ readonly env: {
286
+ readonly node: true;
287
+ readonly web: true;
288
+ };
289
+ readonly packageType: {
290
+ readonly "top-level-package": true;
291
+ readonly "mono-root": true;
292
+ };
182
293
  readonly required: false;
183
294
  };
184
295
  readonly ghTaggedRelease: {
185
296
  readonly copyFromPath: string;
186
297
  readonly copyToPath: string;
187
- readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
188
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
298
+ readonly env: {
299
+ readonly node: true;
300
+ readonly web: true;
301
+ };
302
+ readonly packageType: {
303
+ readonly "top-level-package": true;
304
+ readonly "mono-root": true;
305
+ };
189
306
  readonly required: false;
190
307
  };
191
308
  readonly ghTestsNode: {
192
309
  readonly copyFromPath: string;
193
310
  readonly copyToPath: string;
194
- readonly env: [RuntimeEnv.Node];
195
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
311
+ readonly env: {
312
+ readonly node: true;
313
+ };
314
+ readonly packageType: {
315
+ readonly "top-level-package": true;
316
+ readonly "mono-root": true;
317
+ };
196
318
  readonly required: false;
197
319
  };
198
320
  readonly ghTestsWeb: {
199
321
  readonly copyFromPath: string;
200
322
  readonly copyToPath: string;
201
- readonly env: [RuntimeEnv.Web];
202
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
323
+ readonly env: {
324
+ readonly web: true;
325
+ };
326
+ readonly packageType: {
327
+ readonly "top-level-package": true;
328
+ readonly "mono-root": true;
329
+ };
203
330
  readonly required: false;
204
331
  };
205
332
  readonly vscodeSettings: {
206
333
  readonly copyFromPath: string;
207
334
  readonly copyToPath: string;
208
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
209
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
335
+ readonly env: {
336
+ readonly web: true;
337
+ readonly node: true;
338
+ };
339
+ readonly packageType: {
340
+ readonly "top-level-package": true;
341
+ readonly "mono-root": true;
342
+ };
210
343
  readonly required: false;
211
344
  };
212
345
  readonly appElement: {
213
346
  readonly copyFromPath: string;
214
347
  readonly copyToPath: string;
215
- readonly env: [RuntimeEnv.Web];
216
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
348
+ readonly env: {
349
+ readonly web: true;
350
+ };
351
+ readonly packageType: {
352
+ readonly "top-level-package": true;
353
+ readonly "mono-package": true;
354
+ };
217
355
  readonly required: false;
218
356
  };
219
357
  readonly indexHtml: {
220
358
  readonly copyFromPath: string;
221
359
  readonly copyToPath: string;
222
- readonly env: [RuntimeEnv.Web];
223
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
360
+ readonly env: {
361
+ readonly web: true;
362
+ };
363
+ readonly packageType: {
364
+ readonly "top-level-package": true;
365
+ readonly "mono-package": true;
366
+ };
224
367
  readonly required: false;
225
368
  };
226
369
  readonly indexCss: {
227
370
  readonly copyFromPath: string;
228
371
  readonly copyToPath: string;
229
- readonly env: [RuntimeEnv.Web];
230
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
372
+ readonly env: {
373
+ readonly web: true;
374
+ };
375
+ readonly packageType: {
376
+ readonly "top-level-package": true;
377
+ readonly "mono-package": true;
378
+ };
231
379
  readonly required: false;
232
380
  };
233
381
  readonly redirects: {
234
382
  readonly copyFromPath: string;
235
383
  readonly copyToPath: string;
236
- readonly env: [RuntimeEnv.Web];
237
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
384
+ readonly env: {
385
+ readonly web: true;
386
+ };
387
+ readonly packageType: {
388
+ readonly "top-level-package": true;
389
+ readonly "mono-package": true;
390
+ };
238
391
  readonly required: false;
239
392
  };
240
393
  readonly gitAttributes: {
241
394
  readonly copyFromPath: string;
242
395
  readonly copyToPath: string;
243
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
244
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
396
+ readonly env: {
397
+ readonly web: true;
398
+ readonly node: true;
399
+ };
400
+ readonly packageType: {
401
+ readonly "top-level-package": true;
402
+ readonly "mono-root": true;
403
+ };
245
404
  readonly required: false;
246
405
  };
247
406
  readonly nvmrc: {
248
407
  readonly copyFromPath: string;
249
408
  readonly copyToPath: string;
250
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
251
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
409
+ readonly env: {
410
+ readonly web: true;
411
+ readonly node: true;
412
+ };
413
+ readonly packageType: {
414
+ readonly "top-level-package": true;
415
+ readonly "mono-root": true;
416
+ };
252
417
  readonly required: false;
253
418
  };
254
419
  readonly gitignore: {
255
420
  readonly copyFromPath: string;
256
421
  readonly copyToPath: string;
257
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
258
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
422
+ readonly env: {
423
+ readonly web: true;
424
+ readonly node: true;
425
+ };
426
+ readonly packageType: {
427
+ readonly "top-level-package": true;
428
+ readonly "mono-root": true;
429
+ };
259
430
  readonly required: false;
260
431
  };
261
432
  readonly licenseMit: {
262
433
  readonly copyFromPath: string;
263
434
  readonly copyToPath: string;
264
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
265
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
435
+ readonly env: {
436
+ readonly web: true;
437
+ readonly node: true;
438
+ };
439
+ readonly packageType: {
440
+ readonly "top-level-package": true;
441
+ readonly "mono-root": true;
442
+ readonly "mono-package": true;
443
+ };
266
444
  readonly required: false;
267
445
  };
268
446
  readonly licenseCc0: {
269
447
  readonly copyFromPath: string;
270
448
  readonly copyToPath: string;
271
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
272
- readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
449
+ readonly env: {
450
+ readonly web: true;
451
+ readonly node: true;
452
+ };
453
+ readonly packageType: {
454
+ readonly "top-level-package": true;
455
+ readonly "mono-root": true;
456
+ readonly "mono-package": true;
457
+ };
273
458
  readonly required: false;
274
459
  };
275
460
  readonly npmIgnore: {
276
461
  readonly copyFromPath: string;
277
462
  readonly copyToPath: string;
278
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
279
- readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
463
+ readonly env: {
464
+ readonly web: true;
465
+ readonly node: true;
466
+ };
467
+ readonly packageType: {
468
+ readonly "top-level-package": true;
469
+ readonly "mono-package": true;
470
+ };
280
471
  readonly required: false;
281
472
  };
282
473
  readonly monoPackageNodePackageJson: {
283
474
  readonly copyFromPath: string;
284
475
  readonly copyToPath: string;
285
- readonly env: [RuntimeEnv.Node];
286
- readonly packageType: [PackageType.MonoPackage];
476
+ readonly env: {
477
+ readonly node: true;
478
+ };
479
+ readonly packageType: {
480
+ readonly "mono-package": true;
481
+ };
287
482
  readonly required: false;
288
483
  };
289
484
  readonly monoPackageWebPackageJson: {
290
485
  readonly copyFromPath: string;
291
486
  readonly copyToPath: string;
292
- readonly env: [RuntimeEnv.Web];
293
- readonly packageType: [PackageType.MonoPackage];
487
+ readonly env: {
488
+ readonly web: true;
489
+ };
490
+ readonly packageType: {
491
+ readonly "mono-package": true;
492
+ };
294
493
  readonly required: false;
295
494
  };
296
495
  readonly monoRootPackageJson: {
297
496
  readonly copyFromPath: string;
298
497
  readonly copyToPath: string;
299
- readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
300
- readonly packageType: [PackageType.MonoRoot];
498
+ readonly env: {
499
+ readonly web: true;
500
+ readonly node: true;
501
+ };
502
+ readonly packageType: {
503
+ readonly "mono-root": true;
504
+ };
301
505
  readonly required: false;
302
506
  };
303
507
  readonly topPackageNodePackageJson: {
304
508
  readonly copyFromPath: string;
305
509
  readonly copyToPath: string;
306
- readonly env: [RuntimeEnv.Node];
307
- readonly packageType: [PackageType.TopPackage];
510
+ readonly env: {
511
+ readonly node: true;
512
+ };
513
+ readonly packageType: {
514
+ readonly "top-level-package": true;
515
+ };
308
516
  readonly required: false;
309
517
  };
310
518
  readonly topPackageWebPackageJson: {
311
519
  readonly copyFromPath: string;
312
520
  readonly copyToPath: string;
313
- readonly env: [RuntimeEnv.Web];
314
- readonly packageType: [PackageType.TopPackage];
521
+ readonly env: {
522
+ readonly web: true;
523
+ };
524
+ readonly packageType: {
525
+ readonly "top-level-package": true;
526
+ };
315
527
  readonly required: false;
316
528
  };
317
529
  };
package/dist/init.js CHANGED
@@ -3,38 +3,51 @@
3
3
  * missed without the other packages.
4
4
  */
5
5
  import { check } from '@augment-vir/assert';
6
- import { awaitedBlockingMap, filterObject, getEnumValues, joinWithFinalConjunction, pickObjectKeys, RuntimeEnv, safeMatch, } from '@augment-vir/common';
6
+ import { awaitedBlockingMap, getEnumValues, joinWithFinalConjunction, pickObjectKeys, RuntimeEnv, safeMatch, } from '@augment-vir/common';
7
7
  import { readPackageJson, writeJsonFile } from '@augment-vir/node';
8
8
  import { copyConfigFile, defineVirmatorPlugin, NpmDepType, PackageType, VirmatorNoTraceError, } from '@virmator/core';
9
9
  import { basename, join } from 'node:path';
10
10
  import { simpleGit } from 'simple-git';
11
11
  const deps = {
12
12
  'mono-vir': {
13
- env: [
14
- RuntimeEnv.Node,
15
- RuntimeEnv.Web,
16
- ],
17
- packageType: [PackageType.MonoRoot],
13
+ env: {
14
+ [RuntimeEnv.Node]: true,
15
+ [RuntimeEnv.Web]: true,
16
+ },
17
+ packageType: {
18
+ [PackageType.MonoRoot]: true,
19
+ },
20
+ type: NpmDepType.Dev,
21
+ },
22
+ runstorm: {
23
+ env: {
24
+ [RuntimeEnv.Node]: true,
25
+ [RuntimeEnv.Web]: true,
26
+ },
27
+ packageType: {
28
+ [PackageType.TopPackage]: true,
29
+ [PackageType.MonoRoot]: true,
30
+ },
18
31
  type: NpmDepType.Dev,
19
32
  },
20
33
  tsx: {
21
- env: [
22
- RuntimeEnv.Node,
23
- ],
24
- packageType: [
25
- PackageType.MonoPackage,
26
- PackageType.TopPackage,
27
- ],
34
+ env: {
35
+ [RuntimeEnv.Node]: true,
36
+ },
37
+ packageType: {
38
+ [PackageType.MonoPackage]: true,
39
+ [PackageType.TopPackage]: true,
40
+ },
28
41
  type: NpmDepType.Dev,
29
42
  },
30
43
  'element-vir': {
31
- env: [
32
- RuntimeEnv.Web,
33
- ],
34
- packageType: [
35
- PackageType.MonoPackage,
36
- PackageType.TopPackage,
37
- ],
44
+ env: {
45
+ [RuntimeEnv.Web]: true,
46
+ },
47
+ packageType: {
48
+ [PackageType.MonoPackage]: true,
49
+ [PackageType.TopPackage]: true,
50
+ },
38
51
  type: NpmDepType.Regular,
39
52
  },
40
53
  };
@@ -62,248 +75,248 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
62
75
  ghPages: {
63
76
  copyFromPath: join('configs', 'github', 'workflows', 'build-for-gh-pages.yml'),
64
77
  copyToPath: join('.github', 'workflows', 'build-for-gh-pages.yml'),
65
- env: [
66
- RuntimeEnv.Node,
67
- RuntimeEnv.Web,
68
- ],
69
- packageType: [
70
- PackageType.TopPackage,
71
- PackageType.MonoRoot,
72
- ],
78
+ env: {
79
+ [RuntimeEnv.Node]: true,
80
+ [RuntimeEnv.Web]: true,
81
+ },
82
+ packageType: {
83
+ [PackageType.TopPackage]: true,
84
+ [PackageType.MonoRoot]: true,
85
+ },
73
86
  required: false,
74
87
  },
75
88
  ghTaggedRelease: {
76
89
  copyFromPath: join('configs', 'github', 'workflows', 'tagged-release.yml'),
77
90
  copyToPath: join('.github', 'workflows', 'tagged-release.yml'),
78
- env: [
79
- RuntimeEnv.Node,
80
- RuntimeEnv.Web,
81
- ],
82
- packageType: [
83
- PackageType.TopPackage,
84
- PackageType.MonoRoot,
85
- ],
91
+ env: {
92
+ [RuntimeEnv.Node]: true,
93
+ [RuntimeEnv.Web]: true,
94
+ },
95
+ packageType: {
96
+ [PackageType.TopPackage]: true,
97
+ [PackageType.MonoRoot]: true,
98
+ },
86
99
  required: false,
87
100
  },
88
101
  ghTestsNode: {
89
102
  copyFromPath: join('configs', 'github', 'workflows', 'tests-node.yml'),
90
103
  copyToPath: join('.github', 'workflows', 'tests.yml'),
91
- env: [
92
- RuntimeEnv.Node,
93
- ],
94
- packageType: [
95
- PackageType.TopPackage,
96
- PackageType.MonoRoot,
97
- ],
104
+ env: {
105
+ [RuntimeEnv.Node]: true,
106
+ },
107
+ packageType: {
108
+ [PackageType.TopPackage]: true,
109
+ [PackageType.MonoRoot]: true,
110
+ },
98
111
  required: false,
99
112
  },
100
113
  ghTestsWeb: {
101
114
  copyFromPath: join('configs', 'github', 'workflows', 'tests-web.yml'),
102
115
  copyToPath: join('.github', 'workflows', 'tests.yml'),
103
- env: [
104
- RuntimeEnv.Web,
105
- ],
106
- packageType: [
107
- PackageType.TopPackage,
108
- PackageType.MonoRoot,
109
- ],
116
+ env: {
117
+ [RuntimeEnv.Web]: true,
118
+ },
119
+ packageType: {
120
+ [PackageType.TopPackage]: true,
121
+ [PackageType.MonoRoot]: true,
122
+ },
110
123
  required: false,
111
124
  },
112
125
  vscodeSettings: {
113
126
  copyFromPath: join('configs', 'vscode', 'settings.json'),
114
127
  copyToPath: join('.vscode', 'settings.json'),
115
- env: [
116
- RuntimeEnv.Web,
117
- RuntimeEnv.Node,
118
- ],
119
- packageType: [
120
- PackageType.TopPackage,
121
- PackageType.MonoRoot,
122
- ],
128
+ env: {
129
+ [RuntimeEnv.Web]: true,
130
+ [RuntimeEnv.Node]: true,
131
+ },
132
+ packageType: {
133
+ [PackageType.TopPackage]: true,
134
+ [PackageType.MonoRoot]: true,
135
+ },
123
136
  required: false,
124
137
  },
125
138
  appElement: {
126
139
  copyFromPath: join('configs', 'src', 'ui', 'elements', 'vir-app.element.ts'),
127
140
  copyToPath: join('src', 'ui', 'elements', 'vir-app.element.ts'),
128
- env: [
129
- RuntimeEnv.Web,
130
- ],
131
- packageType: [
132
- PackageType.TopPackage,
133
- PackageType.MonoPackage,
134
- ],
141
+ env: {
142
+ [RuntimeEnv.Web]: true,
143
+ },
144
+ packageType: {
145
+ [PackageType.TopPackage]: true,
146
+ [PackageType.MonoPackage]: true,
147
+ },
135
148
  required: false,
136
149
  },
137
150
  indexHtml: {
138
151
  copyFromPath: join('configs', 'src', 'index.html'),
139
152
  copyToPath: join('src', 'index.html'),
140
- env: [
141
- RuntimeEnv.Web,
142
- ],
143
- packageType: [
144
- PackageType.TopPackage,
145
- PackageType.MonoPackage,
146
- ],
153
+ env: {
154
+ [RuntimeEnv.Web]: true,
155
+ },
156
+ packageType: {
157
+ [PackageType.TopPackage]: true,
158
+ [PackageType.MonoPackage]: true,
159
+ },
147
160
  required: false,
148
161
  },
149
162
  indexCss: {
150
163
  copyFromPath: join('configs', 'www-static', 'index.css'),
151
164
  copyToPath: join('www-static', 'index.css'),
152
- env: [
153
- RuntimeEnv.Web,
154
- ],
155
- packageType: [
156
- PackageType.TopPackage,
157
- PackageType.MonoPackage,
158
- ],
165
+ env: {
166
+ [RuntimeEnv.Web]: true,
167
+ },
168
+ packageType: {
169
+ [PackageType.TopPackage]: true,
170
+ [PackageType.MonoPackage]: true,
171
+ },
159
172
  required: false,
160
173
  },
161
174
  redirects: {
162
175
  copyFromPath: join('configs', 'www-static', '_redirects'),
163
176
  copyToPath: join('www-static', '_redirects'),
164
- env: [
165
- RuntimeEnv.Web,
166
- ],
167
- packageType: [
168
- PackageType.TopPackage,
169
- PackageType.MonoPackage,
170
- ],
177
+ env: {
178
+ [RuntimeEnv.Web]: true,
179
+ },
180
+ packageType: {
181
+ [PackageType.TopPackage]: true,
182
+ [PackageType.MonoPackage]: true,
183
+ },
171
184
  required: false,
172
185
  },
173
186
  gitAttributes: {
174
187
  copyFromPath: join('configs', 'gitattributes.txt'),
175
188
  copyToPath: join('.gitattributes'),
176
- env: [
177
- RuntimeEnv.Web,
178
- RuntimeEnv.Node,
179
- ],
180
- packageType: [
181
- PackageType.TopPackage,
182
- PackageType.MonoRoot,
183
- ],
189
+ env: {
190
+ [RuntimeEnv.Web]: true,
191
+ [RuntimeEnv.Node]: true,
192
+ },
193
+ packageType: {
194
+ [PackageType.TopPackage]: true,
195
+ [PackageType.MonoRoot]: true,
196
+ },
184
197
  required: false,
185
198
  },
186
199
  nvmrc: {
187
200
  copyFromPath: join('configs', 'nvmrc.txt'),
188
201
  copyToPath: join('.nvmrc'),
189
- env: [
190
- RuntimeEnv.Web,
191
- RuntimeEnv.Node,
192
- ],
193
- packageType: [
194
- PackageType.TopPackage,
195
- PackageType.MonoRoot,
196
- ],
202
+ env: {
203
+ [RuntimeEnv.Web]: true,
204
+ [RuntimeEnv.Node]: true,
205
+ },
206
+ packageType: {
207
+ [PackageType.TopPackage]: true,
208
+ [PackageType.MonoRoot]: true,
209
+ },
197
210
  required: false,
198
211
  },
199
212
  gitignore: {
200
213
  copyFromPath: join('configs', 'gitignore.txt'),
201
214
  copyToPath: join('.gitignore'),
202
- env: [
203
- RuntimeEnv.Web,
204
- RuntimeEnv.Node,
205
- ],
206
- packageType: [
207
- PackageType.TopPackage,
208
- PackageType.MonoRoot,
209
- ],
215
+ env: {
216
+ [RuntimeEnv.Web]: true,
217
+ [RuntimeEnv.Node]: true,
218
+ },
219
+ packageType: {
220
+ [PackageType.TopPackage]: true,
221
+ [PackageType.MonoRoot]: true,
222
+ },
210
223
  required: false,
211
224
  },
212
225
  licenseMit: {
213
226
  copyFromPath: join('configs', 'LICENSE-MIT'),
214
227
  copyToPath: join('LICENSE-MIT'),
215
- env: [
216
- RuntimeEnv.Web,
217
- RuntimeEnv.Node,
218
- ],
219
- packageType: [
220
- PackageType.TopPackage,
221
- PackageType.MonoRoot,
222
- PackageType.MonoPackage,
223
- ],
228
+ env: {
229
+ [RuntimeEnv.Web]: true,
230
+ [RuntimeEnv.Node]: true,
231
+ },
232
+ packageType: {
233
+ [PackageType.TopPackage]: true,
234
+ [PackageType.MonoRoot]: true,
235
+ [PackageType.MonoPackage]: true,
236
+ },
224
237
  required: false,
225
238
  },
226
239
  licenseCc0: {
227
240
  copyFromPath: join('configs', 'LICENSE-CC0'),
228
241
  copyToPath: join('LICENSE-CC0'),
229
- env: [
230
- RuntimeEnv.Web,
231
- RuntimeEnv.Node,
232
- ],
233
- packageType: [
234
- PackageType.TopPackage,
235
- PackageType.MonoRoot,
236
- PackageType.MonoPackage,
237
- ],
242
+ env: {
243
+ [RuntimeEnv.Web]: true,
244
+ [RuntimeEnv.Node]: true,
245
+ },
246
+ packageType: {
247
+ [PackageType.TopPackage]: true,
248
+ [PackageType.MonoRoot]: true,
249
+ [PackageType.MonoPackage]: true,
250
+ },
238
251
  required: false,
239
252
  },
240
253
  npmIgnore: {
241
254
  copyFromPath: join('configs', 'npmignore.txt'),
242
255
  copyToPath: join('.npmignore'),
243
- env: [
244
- RuntimeEnv.Web,
245
- RuntimeEnv.Node,
246
- ],
247
- packageType: [
248
- PackageType.TopPackage,
249
- PackageType.MonoPackage,
250
- ],
256
+ env: {
257
+ [RuntimeEnv.Web]: true,
258
+ [RuntimeEnv.Node]: true,
259
+ },
260
+ packageType: {
261
+ [PackageType.TopPackage]: true,
262
+ [PackageType.MonoPackage]: true,
263
+ },
251
264
  required: false,
252
265
  },
253
266
  monoPackageNodePackageJson: {
254
267
  copyFromPath: join('configs', 'package-mono-package-node', 'package.json'),
255
268
  copyToPath: join('package.json'),
256
- env: [
257
- RuntimeEnv.Node,
258
- ],
259
- packageType: [
260
- PackageType.MonoPackage,
261
- ],
269
+ env: {
270
+ [RuntimeEnv.Node]: true,
271
+ },
272
+ packageType: {
273
+ [PackageType.MonoPackage]: true,
274
+ },
262
275
  required: false,
263
276
  },
264
277
  monoPackageWebPackageJson: {
265
278
  copyFromPath: join('configs', 'package-mono-package-web', 'package.json'),
266
279
  copyToPath: join('package.json'),
267
- env: [
268
- RuntimeEnv.Web,
269
- ],
270
- packageType: [
271
- PackageType.MonoPackage,
272
- ],
280
+ env: {
281
+ [RuntimeEnv.Web]: true,
282
+ },
283
+ packageType: {
284
+ [PackageType.MonoPackage]: true,
285
+ },
273
286
  required: false,
274
287
  },
275
288
  monoRootPackageJson: {
276
289
  copyFromPath: join('configs', 'package-mono-root', 'package.json'),
277
290
  copyToPath: join('package.json'),
278
- env: [
279
- RuntimeEnv.Web,
280
- RuntimeEnv.Node,
281
- ],
282
- packageType: [
283
- PackageType.MonoRoot,
284
- ],
291
+ env: {
292
+ [RuntimeEnv.Web]: true,
293
+ [RuntimeEnv.Node]: true,
294
+ },
295
+ packageType: {
296
+ [PackageType.MonoRoot]: true,
297
+ },
285
298
  required: false,
286
299
  },
287
300
  topPackageNodePackageJson: {
288
301
  copyFromPath: join('configs', 'package-top-package-node', 'package.json'),
289
302
  copyToPath: join('package.json'),
290
- env: [
291
- RuntimeEnv.Node,
292
- ],
293
- packageType: [
294
- PackageType.TopPackage,
295
- ],
303
+ env: {
304
+ [RuntimeEnv.Node]: true,
305
+ },
306
+ packageType: {
307
+ [PackageType.TopPackage]: true,
308
+ },
296
309
  required: false,
297
310
  },
298
311
  topPackageWebPackageJson: {
299
312
  copyFromPath: join('configs', 'package-top-package-web', 'package.json'),
300
313
  copyToPath: join('package.json'),
301
- env: [
302
- RuntimeEnv.Web,
303
- ],
304
- packageType: [
305
- PackageType.TopPackage,
306
- ],
314
+ env: {
315
+ [RuntimeEnv.Web]: true,
316
+ },
317
+ packageType: {
318
+ [PackageType.TopPackage]: true,
319
+ },
307
320
  required: false,
308
321
  },
309
322
  },
@@ -318,13 +331,10 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
318
331
  else if (!packageType) {
319
332
  throw new VirmatorNoTraceError(`Missing package type. Expected one of ${joinWithFinalConjunction(getEnumValues(PackageType), 'or')}`);
320
333
  }
321
- const depsToInstall = filterObject(deps, (depName, depOptions) => {
322
- return (depOptions.env.includes(packageEnv) && depOptions.packageType.includes(packageType));
323
- });
324
- await runInstallDeps(depsToInstall);
334
+ await runInstallDeps(deps, packageEnv);
325
335
  const allConfigs = flattenAllConfigs(cwdPackagePath, allPlugins);
326
336
  const relevantConfigs = allConfigs.filter((config) => {
327
- return config.env.includes(packageEnv) && config.packageType.includes(packageType);
337
+ return config.env[packageEnv] && config.packageType[packageType];
328
338
  });
329
339
  await awaitedBlockingMap(relevantConfigs, async (config) => {
330
340
  await copyConfigFile(config, log, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/init",
3
- "version": "13.16.2",
3
+ "version": "14.0.1",
4
4
  "description": "Default init plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -31,17 +31,18 @@
31
31
  "test:update": "npm test"
32
32
  },
33
33
  "dependencies": {
34
- "@augment-vir/assert": "^31.31.0",
35
- "@augment-vir/common": "^31.31.0",
36
- "@augment-vir/node": "^31.31.0",
37
- "@virmator/core": "^13.16.2",
34
+ "@augment-vir/assert": "^31.33.0",
35
+ "@augment-vir/common": "^31.33.0",
36
+ "@augment-vir/node": "^31.33.0",
37
+ "@virmator/core": "^14.0.1",
38
38
  "simple-git": "^3.28.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/node": "^24.2.0",
42
- "element-vir": "^26.7.1",
43
- "mono-vir": "^2.0.6",
44
- "tsx": "^4.20.3",
41
+ "@types/node": "^24.3.0",
42
+ "element-vir": "^26.8.0",
43
+ "mono-vir": "^2.2.1",
44
+ "runstorm": "^0.6.1",
45
+ "tsx": "^4.20.4",
45
46
  "type-fest": "^4.41.0"
46
47
  },
47
48
  "engines": {