@virmator/init 13.3.11 → 13.3.13
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/dist/init.d.ts +42 -41
- package/dist/init.js +43 -42
- package/package.json +7 -6
package/dist/init.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
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 {
|
|
5
|
+
import { RuntimeEnv } from '@augment-vir/common';
|
|
6
|
+
import { PackageType } from '@virmator/core';
|
|
6
7
|
/** A virmator plugin for initializing entire repositories or just npm packages within them. */
|
|
7
8
|
export declare const virmatorInitPlugin: Readonly<Readonly<{
|
|
8
9
|
name: string;
|
|
@@ -20,140 +21,140 @@ export declare const virmatorInitPlugin: Readonly<Readonly<{
|
|
|
20
21
|
readonly ghPages: {
|
|
21
22
|
readonly copyFromPath: string;
|
|
22
23
|
readonly copyToPath: string;
|
|
23
|
-
readonly env: [
|
|
24
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
24
25
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
25
26
|
readonly required: false;
|
|
26
27
|
};
|
|
27
28
|
readonly ghTaggedRelease: {
|
|
28
29
|
readonly copyFromPath: string;
|
|
29
30
|
readonly copyToPath: string;
|
|
30
|
-
readonly env: [
|
|
31
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
31
32
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
32
33
|
readonly required: false;
|
|
33
34
|
};
|
|
34
35
|
readonly ghTestsNode: {
|
|
35
36
|
readonly copyFromPath: string;
|
|
36
37
|
readonly copyToPath: string;
|
|
37
|
-
readonly env: [
|
|
38
|
+
readonly env: [RuntimeEnv.Node];
|
|
38
39
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
39
40
|
readonly required: false;
|
|
40
41
|
};
|
|
41
42
|
readonly ghTestsWeb: {
|
|
42
43
|
readonly copyFromPath: string;
|
|
43
44
|
readonly copyToPath: string;
|
|
44
|
-
readonly env: [
|
|
45
|
+
readonly env: [RuntimeEnv.Web];
|
|
45
46
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
46
47
|
readonly required: false;
|
|
47
48
|
};
|
|
48
49
|
readonly vscodeSettings: {
|
|
49
50
|
readonly copyFromPath: string;
|
|
50
51
|
readonly copyToPath: string;
|
|
51
|
-
readonly env: [
|
|
52
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
52
53
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
53
54
|
readonly required: false;
|
|
54
55
|
};
|
|
55
56
|
readonly appElement: {
|
|
56
57
|
readonly copyFromPath: string;
|
|
57
58
|
readonly copyToPath: string;
|
|
58
|
-
readonly env: [
|
|
59
|
+
readonly env: [RuntimeEnv.Web];
|
|
59
60
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
60
61
|
readonly required: false;
|
|
61
62
|
};
|
|
62
63
|
readonly indexHtml: {
|
|
63
64
|
readonly copyFromPath: string;
|
|
64
65
|
readonly copyToPath: string;
|
|
65
|
-
readonly env: [
|
|
66
|
+
readonly env: [RuntimeEnv.Web];
|
|
66
67
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
67
68
|
readonly required: false;
|
|
68
69
|
};
|
|
69
70
|
readonly indexCss: {
|
|
70
71
|
readonly copyFromPath: string;
|
|
71
72
|
readonly copyToPath: string;
|
|
72
|
-
readonly env: [
|
|
73
|
+
readonly env: [RuntimeEnv.Web];
|
|
73
74
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
74
75
|
readonly required: false;
|
|
75
76
|
};
|
|
76
77
|
readonly redirects: {
|
|
77
78
|
readonly copyFromPath: string;
|
|
78
79
|
readonly copyToPath: string;
|
|
79
|
-
readonly env: [
|
|
80
|
+
readonly env: [RuntimeEnv.Web];
|
|
80
81
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
81
82
|
readonly required: false;
|
|
82
83
|
};
|
|
83
84
|
readonly gitAttributes: {
|
|
84
85
|
readonly copyFromPath: string;
|
|
85
86
|
readonly copyToPath: string;
|
|
86
|
-
readonly env: [
|
|
87
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
87
88
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
88
89
|
readonly required: false;
|
|
89
90
|
};
|
|
90
91
|
readonly nvmrc: {
|
|
91
92
|
readonly copyFromPath: string;
|
|
92
93
|
readonly copyToPath: string;
|
|
93
|
-
readonly env: [
|
|
94
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
94
95
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
95
96
|
readonly required: false;
|
|
96
97
|
};
|
|
97
98
|
readonly gitignore: {
|
|
98
99
|
readonly copyFromPath: string;
|
|
99
100
|
readonly copyToPath: string;
|
|
100
|
-
readonly env: [
|
|
101
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
101
102
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
102
103
|
readonly required: false;
|
|
103
104
|
};
|
|
104
105
|
readonly licenseMit: {
|
|
105
106
|
readonly copyFromPath: string;
|
|
106
107
|
readonly copyToPath: string;
|
|
107
|
-
readonly env: [
|
|
108
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
108
109
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
|
|
109
110
|
readonly required: false;
|
|
110
111
|
};
|
|
111
112
|
readonly licenseCc0: {
|
|
112
113
|
readonly copyFromPath: string;
|
|
113
114
|
readonly copyToPath: string;
|
|
114
|
-
readonly env: [
|
|
115
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
115
116
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
|
|
116
117
|
readonly required: false;
|
|
117
118
|
};
|
|
118
119
|
readonly npmIgnore: {
|
|
119
120
|
readonly copyFromPath: string;
|
|
120
121
|
readonly copyToPath: string;
|
|
121
|
-
readonly env: [
|
|
122
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
122
123
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
123
124
|
readonly required: false;
|
|
124
125
|
};
|
|
125
126
|
readonly monoPackageNodePackageJson: {
|
|
126
127
|
readonly copyFromPath: string;
|
|
127
128
|
readonly copyToPath: string;
|
|
128
|
-
readonly env: [
|
|
129
|
+
readonly env: [RuntimeEnv.Node];
|
|
129
130
|
readonly packageType: [PackageType.MonoPackage];
|
|
130
131
|
readonly required: false;
|
|
131
132
|
};
|
|
132
133
|
readonly monoPackageWebPackageJson: {
|
|
133
134
|
readonly copyFromPath: string;
|
|
134
135
|
readonly copyToPath: string;
|
|
135
|
-
readonly env: [
|
|
136
|
+
readonly env: [RuntimeEnv.Web];
|
|
136
137
|
readonly packageType: [PackageType.MonoPackage];
|
|
137
138
|
readonly required: false;
|
|
138
139
|
};
|
|
139
140
|
readonly monoRootPackageJson: {
|
|
140
141
|
readonly copyFromPath: string;
|
|
141
142
|
readonly copyToPath: string;
|
|
142
|
-
readonly env: [
|
|
143
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
143
144
|
readonly packageType: [PackageType.MonoRoot];
|
|
144
145
|
readonly required: false;
|
|
145
146
|
};
|
|
146
147
|
readonly topPackageNodePackageJson: {
|
|
147
148
|
readonly copyFromPath: string;
|
|
148
149
|
readonly copyToPath: string;
|
|
149
|
-
readonly env: [
|
|
150
|
+
readonly env: [RuntimeEnv.Node];
|
|
150
151
|
readonly packageType: [PackageType.TopPackage];
|
|
151
152
|
readonly required: false;
|
|
152
153
|
};
|
|
153
154
|
readonly topPackageWebPackageJson: {
|
|
154
155
|
readonly copyFromPath: string;
|
|
155
156
|
readonly copyToPath: string;
|
|
156
|
-
readonly env: [
|
|
157
|
+
readonly env: [RuntimeEnv.Web];
|
|
157
158
|
readonly packageType: [PackageType.TopPackage];
|
|
158
159
|
readonly required: false;
|
|
159
160
|
};
|
|
@@ -176,140 +177,140 @@ export declare const virmatorInitPlugin: Readonly<Readonly<{
|
|
|
176
177
|
readonly ghPages: {
|
|
177
178
|
readonly copyFromPath: string;
|
|
178
179
|
readonly copyToPath: string;
|
|
179
|
-
readonly env: [
|
|
180
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
180
181
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
181
182
|
readonly required: false;
|
|
182
183
|
};
|
|
183
184
|
readonly ghTaggedRelease: {
|
|
184
185
|
readonly copyFromPath: string;
|
|
185
186
|
readonly copyToPath: string;
|
|
186
|
-
readonly env: [
|
|
187
|
+
readonly env: [RuntimeEnv.Node, RuntimeEnv.Web];
|
|
187
188
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
188
189
|
readonly required: false;
|
|
189
190
|
};
|
|
190
191
|
readonly ghTestsNode: {
|
|
191
192
|
readonly copyFromPath: string;
|
|
192
193
|
readonly copyToPath: string;
|
|
193
|
-
readonly env: [
|
|
194
|
+
readonly env: [RuntimeEnv.Node];
|
|
194
195
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
195
196
|
readonly required: false;
|
|
196
197
|
};
|
|
197
198
|
readonly ghTestsWeb: {
|
|
198
199
|
readonly copyFromPath: string;
|
|
199
200
|
readonly copyToPath: string;
|
|
200
|
-
readonly env: [
|
|
201
|
+
readonly env: [RuntimeEnv.Web];
|
|
201
202
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
202
203
|
readonly required: false;
|
|
203
204
|
};
|
|
204
205
|
readonly vscodeSettings: {
|
|
205
206
|
readonly copyFromPath: string;
|
|
206
207
|
readonly copyToPath: string;
|
|
207
|
-
readonly env: [
|
|
208
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
208
209
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
209
210
|
readonly required: false;
|
|
210
211
|
};
|
|
211
212
|
readonly appElement: {
|
|
212
213
|
readonly copyFromPath: string;
|
|
213
214
|
readonly copyToPath: string;
|
|
214
|
-
readonly env: [
|
|
215
|
+
readonly env: [RuntimeEnv.Web];
|
|
215
216
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
216
217
|
readonly required: false;
|
|
217
218
|
};
|
|
218
219
|
readonly indexHtml: {
|
|
219
220
|
readonly copyFromPath: string;
|
|
220
221
|
readonly copyToPath: string;
|
|
221
|
-
readonly env: [
|
|
222
|
+
readonly env: [RuntimeEnv.Web];
|
|
222
223
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
223
224
|
readonly required: false;
|
|
224
225
|
};
|
|
225
226
|
readonly indexCss: {
|
|
226
227
|
readonly copyFromPath: string;
|
|
227
228
|
readonly copyToPath: string;
|
|
228
|
-
readonly env: [
|
|
229
|
+
readonly env: [RuntimeEnv.Web];
|
|
229
230
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
230
231
|
readonly required: false;
|
|
231
232
|
};
|
|
232
233
|
readonly redirects: {
|
|
233
234
|
readonly copyFromPath: string;
|
|
234
235
|
readonly copyToPath: string;
|
|
235
|
-
readonly env: [
|
|
236
|
+
readonly env: [RuntimeEnv.Web];
|
|
236
237
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
237
238
|
readonly required: false;
|
|
238
239
|
};
|
|
239
240
|
readonly gitAttributes: {
|
|
240
241
|
readonly copyFromPath: string;
|
|
241
242
|
readonly copyToPath: string;
|
|
242
|
-
readonly env: [
|
|
243
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
243
244
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
244
245
|
readonly required: false;
|
|
245
246
|
};
|
|
246
247
|
readonly nvmrc: {
|
|
247
248
|
readonly copyFromPath: string;
|
|
248
249
|
readonly copyToPath: string;
|
|
249
|
-
readonly env: [
|
|
250
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
250
251
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
251
252
|
readonly required: false;
|
|
252
253
|
};
|
|
253
254
|
readonly gitignore: {
|
|
254
255
|
readonly copyFromPath: string;
|
|
255
256
|
readonly copyToPath: string;
|
|
256
|
-
readonly env: [
|
|
257
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
257
258
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot];
|
|
258
259
|
readonly required: false;
|
|
259
260
|
};
|
|
260
261
|
readonly licenseMit: {
|
|
261
262
|
readonly copyFromPath: string;
|
|
262
263
|
readonly copyToPath: string;
|
|
263
|
-
readonly env: [
|
|
264
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
264
265
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
|
|
265
266
|
readonly required: false;
|
|
266
267
|
};
|
|
267
268
|
readonly licenseCc0: {
|
|
268
269
|
readonly copyFromPath: string;
|
|
269
270
|
readonly copyToPath: string;
|
|
270
|
-
readonly env: [
|
|
271
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
271
272
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoRoot, PackageType.MonoPackage];
|
|
272
273
|
readonly required: false;
|
|
273
274
|
};
|
|
274
275
|
readonly npmIgnore: {
|
|
275
276
|
readonly copyFromPath: string;
|
|
276
277
|
readonly copyToPath: string;
|
|
277
|
-
readonly env: [
|
|
278
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
278
279
|
readonly packageType: [PackageType.TopPackage, PackageType.MonoPackage];
|
|
279
280
|
readonly required: false;
|
|
280
281
|
};
|
|
281
282
|
readonly monoPackageNodePackageJson: {
|
|
282
283
|
readonly copyFromPath: string;
|
|
283
284
|
readonly copyToPath: string;
|
|
284
|
-
readonly env: [
|
|
285
|
+
readonly env: [RuntimeEnv.Node];
|
|
285
286
|
readonly packageType: [PackageType.MonoPackage];
|
|
286
287
|
readonly required: false;
|
|
287
288
|
};
|
|
288
289
|
readonly monoPackageWebPackageJson: {
|
|
289
290
|
readonly copyFromPath: string;
|
|
290
291
|
readonly copyToPath: string;
|
|
291
|
-
readonly env: [
|
|
292
|
+
readonly env: [RuntimeEnv.Web];
|
|
292
293
|
readonly packageType: [PackageType.MonoPackage];
|
|
293
294
|
readonly required: false;
|
|
294
295
|
};
|
|
295
296
|
readonly monoRootPackageJson: {
|
|
296
297
|
readonly copyFromPath: string;
|
|
297
298
|
readonly copyToPath: string;
|
|
298
|
-
readonly env: [
|
|
299
|
+
readonly env: [RuntimeEnv.Web, RuntimeEnv.Node];
|
|
299
300
|
readonly packageType: [PackageType.MonoRoot];
|
|
300
301
|
readonly required: false;
|
|
301
302
|
};
|
|
302
303
|
readonly topPackageNodePackageJson: {
|
|
303
304
|
readonly copyFromPath: string;
|
|
304
305
|
readonly copyToPath: string;
|
|
305
|
-
readonly env: [
|
|
306
|
+
readonly env: [RuntimeEnv.Node];
|
|
306
307
|
readonly packageType: [PackageType.TopPackage];
|
|
307
308
|
readonly required: false;
|
|
308
309
|
};
|
|
309
310
|
readonly topPackageWebPackageJson: {
|
|
310
311
|
readonly copyFromPath: string;
|
|
311
312
|
readonly copyToPath: string;
|
|
312
|
-
readonly env: [
|
|
313
|
+
readonly env: [RuntimeEnv.Web];
|
|
313
314
|
readonly packageType: [PackageType.TopPackage];
|
|
314
315
|
readonly required: false;
|
|
315
316
|
};
|
package/dist/init.js
CHANGED
|
@@ -2,23 +2,24 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { check } from '@augment-vir/assert';
|
|
6
|
+
import { awaitedBlockingMap, filterObject, getEnumValues, joinWithFinalConjunction, pickObjectKeys, RuntimeEnv, safeMatch, } from '@augment-vir/common';
|
|
7
|
+
import { readPackageJson, writeJsonFile } from '@augment-vir/node';
|
|
8
|
+
import { copyConfigFile, defineVirmatorPlugin, NpmDepType, PackageType, VirmatorNoTraceError, } from '@virmator/core';
|
|
8
9
|
import { basename, join } from 'node:path';
|
|
9
10
|
import { simpleGit } from 'simple-git';
|
|
10
11
|
const deps = {
|
|
11
12
|
'mono-vir': {
|
|
12
13
|
env: [
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
RuntimeEnv.Node,
|
|
15
|
+
RuntimeEnv.Web,
|
|
15
16
|
],
|
|
16
17
|
packageType: [PackageType.MonoRoot],
|
|
17
18
|
type: NpmDepType.Dev,
|
|
18
19
|
},
|
|
19
20
|
tsx: {
|
|
20
21
|
env: [
|
|
21
|
-
|
|
22
|
+
RuntimeEnv.Node,
|
|
22
23
|
],
|
|
23
24
|
packageType: [
|
|
24
25
|
PackageType.MonoPackage,
|
|
@@ -28,7 +29,7 @@ const deps = {
|
|
|
28
29
|
},
|
|
29
30
|
'element-vir': {
|
|
30
31
|
env: [
|
|
31
|
-
|
|
32
|
+
RuntimeEnv.Web,
|
|
32
33
|
],
|
|
33
34
|
packageType: [
|
|
34
35
|
PackageType.MonoPackage,
|
|
@@ -62,8 +63,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
62
63
|
copyFromPath: join('configs', 'github', 'workflows', 'build-for-gh-pages.yml'),
|
|
63
64
|
copyToPath: join('.github', 'workflows', 'build-for-gh-pages.yml'),
|
|
64
65
|
env: [
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
RuntimeEnv.Node,
|
|
67
|
+
RuntimeEnv.Web,
|
|
67
68
|
],
|
|
68
69
|
packageType: [
|
|
69
70
|
PackageType.TopPackage,
|
|
@@ -75,8 +76,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
75
76
|
copyFromPath: join('configs', 'github', 'workflows', 'tagged-release.yml'),
|
|
76
77
|
copyToPath: join('.github', 'workflows', 'tagged-release.yml'),
|
|
77
78
|
env: [
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
RuntimeEnv.Node,
|
|
80
|
+
RuntimeEnv.Web,
|
|
80
81
|
],
|
|
81
82
|
packageType: [
|
|
82
83
|
PackageType.TopPackage,
|
|
@@ -88,7 +89,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
88
89
|
copyFromPath: join('configs', 'github', 'workflows', 'tests-node.yml'),
|
|
89
90
|
copyToPath: join('.github', 'workflows', 'tests.yml'),
|
|
90
91
|
env: [
|
|
91
|
-
|
|
92
|
+
RuntimeEnv.Node,
|
|
92
93
|
],
|
|
93
94
|
packageType: [
|
|
94
95
|
PackageType.TopPackage,
|
|
@@ -100,7 +101,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
100
101
|
copyFromPath: join('configs', 'github', 'workflows', 'tests-web.yml'),
|
|
101
102
|
copyToPath: join('.github', 'workflows', 'tests.yml'),
|
|
102
103
|
env: [
|
|
103
|
-
|
|
104
|
+
RuntimeEnv.Web,
|
|
104
105
|
],
|
|
105
106
|
packageType: [
|
|
106
107
|
PackageType.TopPackage,
|
|
@@ -112,8 +113,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
112
113
|
copyFromPath: join('configs', 'vscode', 'settings.json'),
|
|
113
114
|
copyToPath: join('.vscode', 'settings.json'),
|
|
114
115
|
env: [
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
RuntimeEnv.Web,
|
|
117
|
+
RuntimeEnv.Node,
|
|
117
118
|
],
|
|
118
119
|
packageType: [
|
|
119
120
|
PackageType.TopPackage,
|
|
@@ -125,7 +126,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
125
126
|
copyFromPath: join('configs', 'src', 'ui', 'elements', 'vir-app.element.ts'),
|
|
126
127
|
copyToPath: join('src', 'ui', 'elements', 'vir-app.element.ts'),
|
|
127
128
|
env: [
|
|
128
|
-
|
|
129
|
+
RuntimeEnv.Web,
|
|
129
130
|
],
|
|
130
131
|
packageType: [
|
|
131
132
|
PackageType.TopPackage,
|
|
@@ -137,7 +138,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
137
138
|
copyFromPath: join('configs', 'src', 'index.html'),
|
|
138
139
|
copyToPath: join('src', 'index.html'),
|
|
139
140
|
env: [
|
|
140
|
-
|
|
141
|
+
RuntimeEnv.Web,
|
|
141
142
|
],
|
|
142
143
|
packageType: [
|
|
143
144
|
PackageType.TopPackage,
|
|
@@ -149,7 +150,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
149
150
|
copyFromPath: join('configs', 'www-static', 'index.css'),
|
|
150
151
|
copyToPath: join('www-static', 'index.css'),
|
|
151
152
|
env: [
|
|
152
|
-
|
|
153
|
+
RuntimeEnv.Web,
|
|
153
154
|
],
|
|
154
155
|
packageType: [
|
|
155
156
|
PackageType.TopPackage,
|
|
@@ -161,7 +162,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
161
162
|
copyFromPath: join('configs', 'www-static', '_redirects'),
|
|
162
163
|
copyToPath: join('www-static', '_redirects'),
|
|
163
164
|
env: [
|
|
164
|
-
|
|
165
|
+
RuntimeEnv.Web,
|
|
165
166
|
],
|
|
166
167
|
packageType: [
|
|
167
168
|
PackageType.TopPackage,
|
|
@@ -173,8 +174,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
173
174
|
copyFromPath: join('configs', 'gitattributes.txt'),
|
|
174
175
|
copyToPath: join('.gitattributes'),
|
|
175
176
|
env: [
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
RuntimeEnv.Web,
|
|
178
|
+
RuntimeEnv.Node,
|
|
178
179
|
],
|
|
179
180
|
packageType: [
|
|
180
181
|
PackageType.TopPackage,
|
|
@@ -186,8 +187,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
186
187
|
copyFromPath: join('configs', 'nvmrc.txt'),
|
|
187
188
|
copyToPath: join('.nvmrc'),
|
|
188
189
|
env: [
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
RuntimeEnv.Web,
|
|
191
|
+
RuntimeEnv.Node,
|
|
191
192
|
],
|
|
192
193
|
packageType: [
|
|
193
194
|
PackageType.TopPackage,
|
|
@@ -199,8 +200,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
199
200
|
copyFromPath: join('configs', 'gitignore.txt'),
|
|
200
201
|
copyToPath: join('.gitignore'),
|
|
201
202
|
env: [
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
RuntimeEnv.Web,
|
|
204
|
+
RuntimeEnv.Node,
|
|
204
205
|
],
|
|
205
206
|
packageType: [
|
|
206
207
|
PackageType.TopPackage,
|
|
@@ -212,8 +213,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
212
213
|
copyFromPath: join('configs', 'LICENSE-MIT'),
|
|
213
214
|
copyToPath: join('LICENSE-MIT'),
|
|
214
215
|
env: [
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
RuntimeEnv.Web,
|
|
217
|
+
RuntimeEnv.Node,
|
|
217
218
|
],
|
|
218
219
|
packageType: [
|
|
219
220
|
PackageType.TopPackage,
|
|
@@ -226,8 +227,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
226
227
|
copyFromPath: join('configs', 'LICENSE-CC0'),
|
|
227
228
|
copyToPath: join('LICENSE-CC0'),
|
|
228
229
|
env: [
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
RuntimeEnv.Web,
|
|
231
|
+
RuntimeEnv.Node,
|
|
231
232
|
],
|
|
232
233
|
packageType: [
|
|
233
234
|
PackageType.TopPackage,
|
|
@@ -240,8 +241,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
240
241
|
copyFromPath: join('configs', 'npmignore.txt'),
|
|
241
242
|
copyToPath: join('.npmignore'),
|
|
242
243
|
env: [
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
RuntimeEnv.Web,
|
|
245
|
+
RuntimeEnv.Node,
|
|
245
246
|
],
|
|
246
247
|
packageType: [
|
|
247
248
|
PackageType.TopPackage,
|
|
@@ -253,7 +254,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
253
254
|
copyFromPath: join('configs', 'package-mono-package-node', 'package.json'),
|
|
254
255
|
copyToPath: join('package.json'),
|
|
255
256
|
env: [
|
|
256
|
-
|
|
257
|
+
RuntimeEnv.Node,
|
|
257
258
|
],
|
|
258
259
|
packageType: [
|
|
259
260
|
PackageType.MonoPackage,
|
|
@@ -264,7 +265,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
264
265
|
copyFromPath: join('configs', 'package-mono-package-web', 'package.json'),
|
|
265
266
|
copyToPath: join('package.json'),
|
|
266
267
|
env: [
|
|
267
|
-
|
|
268
|
+
RuntimeEnv.Web,
|
|
268
269
|
],
|
|
269
270
|
packageType: [
|
|
270
271
|
PackageType.MonoPackage,
|
|
@@ -275,8 +276,8 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
275
276
|
copyFromPath: join('configs', 'package-mono-root', 'package.json'),
|
|
276
277
|
copyToPath: join('package.json'),
|
|
277
278
|
env: [
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
RuntimeEnv.Web,
|
|
280
|
+
RuntimeEnv.Node,
|
|
280
281
|
],
|
|
281
282
|
packageType: [
|
|
282
283
|
PackageType.MonoRoot,
|
|
@@ -287,7 +288,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
287
288
|
copyFromPath: join('configs', 'package-top-package-node', 'package.json'),
|
|
288
289
|
copyToPath: join('package.json'),
|
|
289
290
|
env: [
|
|
290
|
-
|
|
291
|
+
RuntimeEnv.Node,
|
|
291
292
|
],
|
|
292
293
|
packageType: [
|
|
293
294
|
PackageType.TopPackage,
|
|
@@ -298,7 +299,7 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
298
299
|
copyFromPath: join('configs', 'package-top-package-web', 'package.json'),
|
|
299
300
|
copyToPath: join('package.json'),
|
|
300
301
|
env: [
|
|
301
|
-
|
|
302
|
+
RuntimeEnv.Web,
|
|
302
303
|
],
|
|
303
304
|
packageType: [
|
|
304
305
|
PackageType.TopPackage,
|
|
@@ -309,13 +310,13 @@ export const virmatorInitPlugin = defineVirmatorPlugin(import.meta.dirname, {
|
|
|
309
310
|
},
|
|
310
311
|
},
|
|
311
312
|
}, async ({ cliInputs: { filteredArgs }, package: { cwdPackagePath, cwdPackageJson }, virmator: { allPlugins }, log, runInstallDeps, }) => {
|
|
312
|
-
const packageType = filteredArgs.find((arg) => isEnumValue(arg, PackageType));
|
|
313
|
-
const packageEnv = filteredArgs.find((arg) => isEnumValue(arg,
|
|
313
|
+
const packageType = filteredArgs.find((arg) => check.isEnumValue(arg, PackageType));
|
|
314
|
+
const packageEnv = filteredArgs.find((arg) => check.isEnumValue(arg, RuntimeEnv));
|
|
314
315
|
if (!packageEnv) {
|
|
315
|
-
throw new VirmatorNoTraceError(`Missing env. Expected one of ${joinWithFinalConjunction(
|
|
316
|
+
throw new VirmatorNoTraceError(`Missing env. Expected one of ${joinWithFinalConjunction(getEnumValues(RuntimeEnv), 'or')}`);
|
|
316
317
|
}
|
|
317
318
|
else if (!packageType) {
|
|
318
|
-
throw new VirmatorNoTraceError(`Missing package type. Expected one of ${joinWithFinalConjunction(
|
|
319
|
+
throw new VirmatorNoTraceError(`Missing package type. Expected one of ${joinWithFinalConjunction(getEnumValues(PackageType), 'or')}`);
|
|
319
320
|
}
|
|
320
321
|
const depsToInstall = filterObject(deps, (depName, depOptions) => {
|
|
321
322
|
return (depOptions.env.includes(packageEnv) && depOptions.packageType.includes(packageType));
|
|
@@ -347,7 +348,7 @@ async function writePackageJson(originalPackageJson, packagePath) {
|
|
|
347
348
|
'peerDependencies',
|
|
348
349
|
]),
|
|
349
350
|
};
|
|
350
|
-
await
|
|
351
|
+
await writeJsonFile(join(packagePath, 'package.json'), packageJson);
|
|
351
352
|
}
|
|
352
353
|
function createGitUrls(ref) {
|
|
353
354
|
// looks like `https://github.com/electrovir/augment-vir`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virmator/init",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.13",
|
|
4
4
|
"description": "Default init plugin for virmator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"virmator",
|
|
@@ -30,16 +30,17 @@
|
|
|
30
30
|
"test:update": "npm test"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@augment-vir/
|
|
34
|
-
"@augment-vir/
|
|
35
|
-
"@
|
|
33
|
+
"@augment-vir/assert": "^30.0.4",
|
|
34
|
+
"@augment-vir/common": "^30.0.4",
|
|
35
|
+
"@augment-vir/node": "^30.0.4",
|
|
36
|
+
"@virmator/core": "^13.3.13",
|
|
36
37
|
"simple-git": "^3.26.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^22.5.
|
|
40
|
+
"@types/node": "^22.5.5",
|
|
40
41
|
"element-vir": "^22.2.2",
|
|
41
42
|
"mono-vir": "^1.0.1",
|
|
42
|
-
"tsx": "^4.19.
|
|
43
|
+
"tsx": "^4.19.1",
|
|
43
44
|
"type-fest": "^4.26.1"
|
|
44
45
|
},
|
|
45
46
|
"engines": {
|