nx-lifecycle 0.0.10 → 0.1.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.
- package/README.md +83 -31
- package/bin.mjs +3 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.js +16 -0
- package/dist/cli.d.ts +22 -0
- package/dist/cli.js +45 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.js +14 -0
- package/dist/commands/lib/dependencies.d.ts +10 -0
- package/dist/commands/lib/dependencies.js +12 -0
- package/dist/commands/lib/types.d.ts +9 -0
- package/dist/commands/lib/types.js +3 -0
- package/dist/commands/lifecycle-command.d.ts +22 -0
- package/dist/commands/lifecycle-command.js +54 -0
- package/dist/executors/lifecycle/index.cjs +4 -2
- package/dist/executors/lifecycle/index.d.cts +54 -4
- package/dist/executors/lifecycle/index.d.ts +3 -45
- package/dist/executors/lifecycle/index.js +9 -21
- package/dist/executors/lifecycle/lifecycle.d.ts +6 -10
- package/dist/executors/lifecycle/lifecycle.js +14 -94
- package/dist/{executors/lifecycle → lifecycle}/constants.js +2 -1
- package/dist/{executors/lifecycle → lifecycle}/depedencies.d.ts +3 -1
- package/dist/{executors/lifecycle → lifecycle}/depedencies.js +5 -2
- package/dist/lifecycle/index.d.ts +5 -0
- package/dist/lifecycle/index.js +25 -0
- package/dist/lifecycle/lifecycle-internal.d.ts +22 -0
- package/dist/lifecycle/lifecycle-internal.js +102 -0
- package/dist/lifecycle/normalizer.d.ts +25 -0
- package/dist/lifecycle/normalizer.js +44 -0
- package/dist/{executors/lifecycle → lifecycle}/processor.js +2 -1
- package/dist/lifecycle/schema.d.ts +337 -0
- package/dist/lifecycle/schema.js +54 -0
- package/dist/lifecycle/types.d.ts +9 -0
- package/dist/lifecycle/types.js +3 -0
- package/dist/schemas/configurations.js +2 -1
- package/dist/schemas/depend-on.js +2 -1
- package/dist/schemas/empty.js +2 -1
- package/dist/schemas/index.js +2 -1
- package/dist/schemas/lib/ajv.js +6 -2
- package/dist/schemas/nx-json.js +2 -1
- package/dist/schemas/project-json.js +2 -1
- package/dist/schemas/target.js +2 -1
- package/executors.json +1 -1
- package/package.json +31 -23
- package/dist/executors/lifecycle/normalizer.d.ts +0 -23
- package/dist/executors/lifecycle/normalizer.js +0 -21
- package/dist/executors/lifecycle/types.d.ts +0 -3
- package/dist/executors/lifecycle/types.js +0 -2
- package/src/executors/lifecycle/schema.json +0 -98
- /package/dist/{executors/lifecycle → lifecycle}/constants.d.ts +0 -0
- /package/dist/{executors/lifecycle → lifecycle}/processor.d.ts +0 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { type SchemaType } from 'juniper';
|
|
2
|
+
declare const lifecycleOptionsSchema: import("juniper").ObjectSchema<{
|
|
3
|
+
$schema: import("juniper").StringSchema<string, false>;
|
|
4
|
+
check: import("juniper").BooleanSchema<false>;
|
|
5
|
+
dryRun: import("juniper").BooleanSchema<false>;
|
|
6
|
+
} & {
|
|
7
|
+
stages: import("juniper").ObjectSchema<{}, never, import("juniper").ObjectSchema<{
|
|
8
|
+
dependsOn: import("juniper").ArraySchema<(string | (Partial<{
|
|
9
|
+
projects: string | string[];
|
|
10
|
+
}> & Required<Pick<{
|
|
11
|
+
projects: string | string[];
|
|
12
|
+
}, "projects">> & Partial<{
|
|
13
|
+
target: string;
|
|
14
|
+
params: string;
|
|
15
|
+
}> & Required<Pick<{
|
|
16
|
+
target: string;
|
|
17
|
+
params: string;
|
|
18
|
+
}, "target">>) | (Partial<{
|
|
19
|
+
dependencies: boolean;
|
|
20
|
+
}> & Partial<{
|
|
21
|
+
target: string;
|
|
22
|
+
params: string;
|
|
23
|
+
}> & Required<Pick<{
|
|
24
|
+
target: string;
|
|
25
|
+
params: string;
|
|
26
|
+
}, "target">>)) & (string | (Partial<{
|
|
27
|
+
projects: string | string[];
|
|
28
|
+
}> & Required<Pick<{
|
|
29
|
+
projects: string | string[];
|
|
30
|
+
}, "projects">> & Partial<{
|
|
31
|
+
target: string;
|
|
32
|
+
params: string;
|
|
33
|
+
}> & Required<Pick<{
|
|
34
|
+
target: string;
|
|
35
|
+
params: string;
|
|
36
|
+
}, "target">>) | (Partial<{
|
|
37
|
+
dependencies: boolean;
|
|
38
|
+
}> & Partial<{
|
|
39
|
+
target: string;
|
|
40
|
+
params: string;
|
|
41
|
+
}> & Required<Pick<{
|
|
42
|
+
target: string;
|
|
43
|
+
params: string;
|
|
44
|
+
}, "target">>) | undefined), [], never, unknown, false>;
|
|
45
|
+
hooks: import("juniper").ArraySchema<string, [], never, unknown, false>;
|
|
46
|
+
}, never, boolean, import("juniper").EmptyIndex, unknown, false>, import("juniper").EmptyIndex, unknown, false>;
|
|
47
|
+
bindings: import("juniper").ObjectSchema<{}, never, import("juniper").StringSchema<string, false>, import("juniper").EmptyIndex, unknown, false>;
|
|
48
|
+
}, "stages" | "bindings", false, import("juniper").EmptyIndex, unknown, false>;
|
|
49
|
+
export type LifecycleOptions = SchemaType<typeof lifecycleOptionsSchema>;
|
|
50
|
+
export declare const isLifecycleOptions: import("ajv").ValidateFunction<Partial<{
|
|
51
|
+
$schema: string;
|
|
52
|
+
check: boolean;
|
|
53
|
+
dryRun: boolean;
|
|
54
|
+
stages: Record<string, Partial<{
|
|
55
|
+
dependsOn: ((string | (Partial<{
|
|
56
|
+
projects: string | string[];
|
|
57
|
+
}> & Required<Pick<{
|
|
58
|
+
projects: string | string[];
|
|
59
|
+
}, "projects">> & Partial<{
|
|
60
|
+
target: string;
|
|
61
|
+
params: string;
|
|
62
|
+
}> & Required<Pick<{
|
|
63
|
+
target: string;
|
|
64
|
+
params: string;
|
|
65
|
+
}, "target">>) | (Partial<{
|
|
66
|
+
dependencies: boolean;
|
|
67
|
+
}> & Partial<{
|
|
68
|
+
target: string;
|
|
69
|
+
params: string;
|
|
70
|
+
}> & Required<Pick<{
|
|
71
|
+
target: string;
|
|
72
|
+
params: string;
|
|
73
|
+
}, "target">>)) & (string | (Partial<{
|
|
74
|
+
projects: string | string[];
|
|
75
|
+
}> & Required<Pick<{
|
|
76
|
+
projects: string | string[];
|
|
77
|
+
}, "projects">> & Partial<{
|
|
78
|
+
target: string;
|
|
79
|
+
params: string;
|
|
80
|
+
}> & Required<Pick<{
|
|
81
|
+
target: string;
|
|
82
|
+
params: string;
|
|
83
|
+
}, "target">>) | (Partial<{
|
|
84
|
+
dependencies: boolean;
|
|
85
|
+
}> & Partial<{
|
|
86
|
+
target: string;
|
|
87
|
+
params: string;
|
|
88
|
+
}> & Required<Pick<{
|
|
89
|
+
target: string;
|
|
90
|
+
params: string;
|
|
91
|
+
}, "target">>) | undefined))[];
|
|
92
|
+
hooks: string[];
|
|
93
|
+
}>>;
|
|
94
|
+
bindings: Record<string, string>;
|
|
95
|
+
}> & Required<Pick<{
|
|
96
|
+
$schema: string;
|
|
97
|
+
check: boolean;
|
|
98
|
+
dryRun: boolean;
|
|
99
|
+
stages: Record<string, Partial<{
|
|
100
|
+
dependsOn: ((string | (Partial<{
|
|
101
|
+
projects: string | string[];
|
|
102
|
+
}> & Required<Pick<{
|
|
103
|
+
projects: string | string[];
|
|
104
|
+
}, "projects">> & Partial<{
|
|
105
|
+
target: string;
|
|
106
|
+
params: string;
|
|
107
|
+
}> & Required<Pick<{
|
|
108
|
+
target: string;
|
|
109
|
+
params: string;
|
|
110
|
+
}, "target">>) | (Partial<{
|
|
111
|
+
dependencies: boolean;
|
|
112
|
+
}> & Partial<{
|
|
113
|
+
target: string;
|
|
114
|
+
params: string;
|
|
115
|
+
}> & Required<Pick<{
|
|
116
|
+
target: string;
|
|
117
|
+
params: string;
|
|
118
|
+
}, "target">>)) & (string | (Partial<{
|
|
119
|
+
projects: string | string[];
|
|
120
|
+
}> & Required<Pick<{
|
|
121
|
+
projects: string | string[];
|
|
122
|
+
}, "projects">> & Partial<{
|
|
123
|
+
target: string;
|
|
124
|
+
params: string;
|
|
125
|
+
}> & Required<Pick<{
|
|
126
|
+
target: string;
|
|
127
|
+
params: string;
|
|
128
|
+
}, "target">>) | (Partial<{
|
|
129
|
+
dependencies: boolean;
|
|
130
|
+
}> & Partial<{
|
|
131
|
+
target: string;
|
|
132
|
+
params: string;
|
|
133
|
+
}> & Required<Pick<{
|
|
134
|
+
target: string;
|
|
135
|
+
params: string;
|
|
136
|
+
}, "target">>) | undefined))[];
|
|
137
|
+
hooks: string[];
|
|
138
|
+
}>>;
|
|
139
|
+
bindings: Record<string, string>;
|
|
140
|
+
}, "stages" | "bindings">>>;
|
|
141
|
+
declare const lifecycleOptionsOrConfigSchema: import("juniper").MergeSchema<(Partial<{
|
|
142
|
+
$schema: string;
|
|
143
|
+
check: boolean;
|
|
144
|
+
dryRun: boolean;
|
|
145
|
+
stages: Record<string, Partial<{
|
|
146
|
+
dependsOn: ((string | (Partial<{
|
|
147
|
+
projects: string | string[];
|
|
148
|
+
}> & Required<Pick<{
|
|
149
|
+
projects: string | string[];
|
|
150
|
+
}, "projects">> & Partial<{
|
|
151
|
+
target: string;
|
|
152
|
+
params: string;
|
|
153
|
+
}> & Required<Pick<{
|
|
154
|
+
target: string;
|
|
155
|
+
params: string;
|
|
156
|
+
}, "target">>) | (Partial<{
|
|
157
|
+
dependencies: boolean;
|
|
158
|
+
}> & Partial<{
|
|
159
|
+
target: string;
|
|
160
|
+
params: string;
|
|
161
|
+
}> & Required<Pick<{
|
|
162
|
+
target: string;
|
|
163
|
+
params: string;
|
|
164
|
+
}, "target">>)) & (string | (Partial<{
|
|
165
|
+
projects: string | string[];
|
|
166
|
+
}> & Required<Pick<{
|
|
167
|
+
projects: string | string[];
|
|
168
|
+
}, "projects">> & Partial<{
|
|
169
|
+
target: string;
|
|
170
|
+
params: string;
|
|
171
|
+
}> & Required<Pick<{
|
|
172
|
+
target: string;
|
|
173
|
+
params: string;
|
|
174
|
+
}, "target">>) | (Partial<{
|
|
175
|
+
dependencies: boolean;
|
|
176
|
+
}> & Partial<{
|
|
177
|
+
target: string;
|
|
178
|
+
params: string;
|
|
179
|
+
}> & Required<Pick<{
|
|
180
|
+
target: string;
|
|
181
|
+
params: string;
|
|
182
|
+
}, "target">>) | undefined))[];
|
|
183
|
+
hooks: string[];
|
|
184
|
+
}>>;
|
|
185
|
+
bindings: Record<string, string>;
|
|
186
|
+
}> & Required<Pick<{
|
|
187
|
+
$schema: string;
|
|
188
|
+
check: boolean;
|
|
189
|
+
dryRun: boolean;
|
|
190
|
+
stages: Record<string, Partial<{
|
|
191
|
+
dependsOn: ((string | (Partial<{
|
|
192
|
+
projects: string | string[];
|
|
193
|
+
}> & Required<Pick<{
|
|
194
|
+
projects: string | string[];
|
|
195
|
+
}, "projects">> & Partial<{
|
|
196
|
+
target: string;
|
|
197
|
+
params: string;
|
|
198
|
+
}> & Required<Pick<{
|
|
199
|
+
target: string;
|
|
200
|
+
params: string;
|
|
201
|
+
}, "target">>) | (Partial<{
|
|
202
|
+
dependencies: boolean;
|
|
203
|
+
}> & Partial<{
|
|
204
|
+
target: string;
|
|
205
|
+
params: string;
|
|
206
|
+
}> & Required<Pick<{
|
|
207
|
+
target: string;
|
|
208
|
+
params: string;
|
|
209
|
+
}, "target">>)) & (string | (Partial<{
|
|
210
|
+
projects: string | string[];
|
|
211
|
+
}> & Required<Pick<{
|
|
212
|
+
projects: string | string[];
|
|
213
|
+
}, "projects">> & Partial<{
|
|
214
|
+
target: string;
|
|
215
|
+
params: string;
|
|
216
|
+
}> & Required<Pick<{
|
|
217
|
+
target: string;
|
|
218
|
+
params: string;
|
|
219
|
+
}, "target">>) | (Partial<{
|
|
220
|
+
dependencies: boolean;
|
|
221
|
+
}> & Partial<{
|
|
222
|
+
target: string;
|
|
223
|
+
params: string;
|
|
224
|
+
}> & Required<Pick<{
|
|
225
|
+
target: string;
|
|
226
|
+
params: string;
|
|
227
|
+
}, "target">>) | undefined))[];
|
|
228
|
+
hooks: string[];
|
|
229
|
+
}>>;
|
|
230
|
+
bindings: Record<string, string>;
|
|
231
|
+
}, "stages" | "bindings">>) | Partial<{
|
|
232
|
+
$schema: string;
|
|
233
|
+
check: boolean;
|
|
234
|
+
dryRun: boolean;
|
|
235
|
+
configFile: string;
|
|
236
|
+
cwd: string;
|
|
237
|
+
}>>;
|
|
238
|
+
declare const _default: import("juniper").JsonSchema<(Partial<{
|
|
239
|
+
$schema: string;
|
|
240
|
+
check: boolean;
|
|
241
|
+
dryRun: boolean;
|
|
242
|
+
stages: Record<string, Partial<{
|
|
243
|
+
dependsOn: ((string | (Partial<{
|
|
244
|
+
projects: string | string[];
|
|
245
|
+
}> & Required<Pick<{
|
|
246
|
+
projects: string | string[];
|
|
247
|
+
}, "projects">> & Partial<{
|
|
248
|
+
target: string;
|
|
249
|
+
params: string;
|
|
250
|
+
}> & Required<Pick<{
|
|
251
|
+
target: string;
|
|
252
|
+
params: string;
|
|
253
|
+
}, "target">>) | (Partial<{
|
|
254
|
+
dependencies: boolean;
|
|
255
|
+
}> & Partial<{
|
|
256
|
+
target: string;
|
|
257
|
+
params: string;
|
|
258
|
+
}> & Required<Pick<{
|
|
259
|
+
target: string;
|
|
260
|
+
params: string;
|
|
261
|
+
}, "target">>)) & (string | (Partial<{
|
|
262
|
+
projects: string | string[];
|
|
263
|
+
}> & Required<Pick<{
|
|
264
|
+
projects: string | string[];
|
|
265
|
+
}, "projects">> & Partial<{
|
|
266
|
+
target: string;
|
|
267
|
+
params: string;
|
|
268
|
+
}> & Required<Pick<{
|
|
269
|
+
target: string;
|
|
270
|
+
params: string;
|
|
271
|
+
}, "target">>) | (Partial<{
|
|
272
|
+
dependencies: boolean;
|
|
273
|
+
}> & Partial<{
|
|
274
|
+
target: string;
|
|
275
|
+
params: string;
|
|
276
|
+
}> & Required<Pick<{
|
|
277
|
+
target: string;
|
|
278
|
+
params: string;
|
|
279
|
+
}, "target">>) | undefined))[];
|
|
280
|
+
hooks: string[];
|
|
281
|
+
}>>;
|
|
282
|
+
bindings: Record<string, string>;
|
|
283
|
+
}> & Required<Pick<{
|
|
284
|
+
$schema: string;
|
|
285
|
+
check: boolean;
|
|
286
|
+
dryRun: boolean;
|
|
287
|
+
stages: Record<string, Partial<{
|
|
288
|
+
dependsOn: ((string | (Partial<{
|
|
289
|
+
projects: string | string[];
|
|
290
|
+
}> & Required<Pick<{
|
|
291
|
+
projects: string | string[];
|
|
292
|
+
}, "projects">> & Partial<{
|
|
293
|
+
target: string;
|
|
294
|
+
params: string;
|
|
295
|
+
}> & Required<Pick<{
|
|
296
|
+
target: string;
|
|
297
|
+
params: string;
|
|
298
|
+
}, "target">>) | (Partial<{
|
|
299
|
+
dependencies: boolean;
|
|
300
|
+
}> & Partial<{
|
|
301
|
+
target: string;
|
|
302
|
+
params: string;
|
|
303
|
+
}> & Required<Pick<{
|
|
304
|
+
target: string;
|
|
305
|
+
params: string;
|
|
306
|
+
}, "target">>)) & (string | (Partial<{
|
|
307
|
+
projects: string | string[];
|
|
308
|
+
}> & Required<Pick<{
|
|
309
|
+
projects: string | string[];
|
|
310
|
+
}, "projects">> & Partial<{
|
|
311
|
+
target: string;
|
|
312
|
+
params: string;
|
|
313
|
+
}> & Required<Pick<{
|
|
314
|
+
target: string;
|
|
315
|
+
params: string;
|
|
316
|
+
}, "target">>) | (Partial<{
|
|
317
|
+
dependencies: boolean;
|
|
318
|
+
}> & Partial<{
|
|
319
|
+
target: string;
|
|
320
|
+
params: string;
|
|
321
|
+
}> & Required<Pick<{
|
|
322
|
+
target: string;
|
|
323
|
+
params: string;
|
|
324
|
+
}, "target">>) | undefined))[];
|
|
325
|
+
hooks: string[];
|
|
326
|
+
}>>;
|
|
327
|
+
bindings: Record<string, string>;
|
|
328
|
+
}, "stages" | "bindings">>) | Partial<{
|
|
329
|
+
$schema: string;
|
|
330
|
+
check: boolean;
|
|
331
|
+
dryRun: boolean;
|
|
332
|
+
configFile: string;
|
|
333
|
+
cwd: string;
|
|
334
|
+
}>>;
|
|
335
|
+
export default _default;
|
|
336
|
+
export type LifecycleOptionsOrConfig = SchemaType<typeof lifecycleOptionsOrConfigSchema>;
|
|
337
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { arraySchema, booleanSchema, mergeSchema, objectSchema, stringSchema } from 'juniper';
|
|
2
|
+
import { dependsOnSchema } from '#schemas';
|
|
3
|
+
import { ajv } from '../schemas/lib/ajv.js';
|
|
4
|
+
const checkAndDryRunSchema = objectSchema({
|
|
5
|
+
properties: {
|
|
6
|
+
$schema: stringSchema({
|
|
7
|
+
description: '',
|
|
8
|
+
format: 'uri'
|
|
9
|
+
}).example('https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/src/lifecycle/schema.json'),
|
|
10
|
+
check: booleanSchema({
|
|
11
|
+
description: 'Fails if references are not already updated, will not overwrite. Defaults to true during CI, false otherwise.'
|
|
12
|
+
}),
|
|
13
|
+
dryRun: booleanSchema({
|
|
14
|
+
description: 'Load files and content, but do not write anything.'
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const lifecycleOptionsSchema = checkAndDryRunSchema.title('lifecycle').description('Inject Nx targets as high level workflows').properties({
|
|
19
|
+
stages: objectSchema({
|
|
20
|
+
description: 'Lifecycle stages by name',
|
|
21
|
+
properties: {},
|
|
22
|
+
additionalProperties: objectSchema({
|
|
23
|
+
properties: {
|
|
24
|
+
dependsOn: dependsOnSchema,
|
|
25
|
+
hooks: arraySchema(stringSchema())
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
bindings: objectSchema({
|
|
30
|
+
description: 'Bind targets to hooks',
|
|
31
|
+
properties: {},
|
|
32
|
+
additionalProperties: stringSchema({
|
|
33
|
+
description: 'Name of hook in `stage:hook` format'
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
}).required([
|
|
37
|
+
'stages',
|
|
38
|
+
'bindings'
|
|
39
|
+
]).additionalProperties(false);
|
|
40
|
+
export const isLifecycleOptions = ajv.compile(lifecycleOptionsSchema.toJSON());
|
|
41
|
+
const lifecycleOptionsOrConfigSchema = mergeSchema().oneOf([
|
|
42
|
+
lifecycleOptionsSchema,
|
|
43
|
+
checkAndDryRunSchema.properties({
|
|
44
|
+
configFile: stringSchema(),
|
|
45
|
+
cwd: stringSchema()
|
|
46
|
+
}).additionalProperties(false)
|
|
47
|
+
]);
|
|
48
|
+
export default lifecycleOptionsOrConfigSchema.metadata({
|
|
49
|
+
version: 1,
|
|
50
|
+
outputCapture: 'direct-nodejs',
|
|
51
|
+
cli: 'nx'
|
|
52
|
+
}).toJSON();
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=schema.js.map
|
package/dist/schemas/empty.js
CHANGED
package/dist/schemas/index.js
CHANGED
package/dist/schemas/lib/ajv.js
CHANGED
|
@@ -2,6 +2,10 @@ import AjvDefault from 'ajv/dist/2020.js';
|
|
|
2
2
|
import { defaultImport } from 'default-import';
|
|
3
3
|
const Ajv = defaultImport(AjvDefault);
|
|
4
4
|
export const ajv = new Ajv({
|
|
5
|
-
strict: true
|
|
5
|
+
strict: true,
|
|
6
|
+
formats: {
|
|
7
|
+
uri: true
|
|
8
|
+
}
|
|
6
9
|
});
|
|
7
|
-
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=ajv.js.map
|
package/dist/schemas/nx-json.js
CHANGED
|
@@ -10,4 +10,5 @@ const projectJsonSchema = objectSchema({
|
|
|
10
10
|
});
|
|
11
11
|
export const isProjectJson = ajv.compile(projectJsonSchema.toJSON());
|
|
12
12
|
export const isProjectJsonIdentifier = identifier().named('projectJson');
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=project-json.js.map
|
package/dist/schemas/target.js
CHANGED
package/executors.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx-lifecycle",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Keep high level nx lifecycle targets in sync",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"lifecycle",
|
|
19
19
|
"build",
|
|
20
20
|
"test",
|
|
21
|
-
"
|
|
22
|
-
"lint"
|
|
21
|
+
"cli"
|
|
23
22
|
],
|
|
24
23
|
"sideEffects": false,
|
|
25
24
|
"executors": "./executors.json",
|
|
@@ -34,39 +33,48 @@
|
|
|
34
33
|
"default": "./dist/schemas/index.js"
|
|
35
34
|
}
|
|
36
35
|
},
|
|
36
|
+
"bin": {
|
|
37
|
+
"lifecycle": "./bin.mjs"
|
|
38
|
+
},
|
|
37
39
|
"dependencies": {
|
|
38
40
|
"ajv": "^8.17.1",
|
|
39
|
-
"ci-info": "^4.
|
|
41
|
+
"ci-info": "^4.1.0",
|
|
40
42
|
"fast-equals": "^5.0.1",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"haywire": "^0.1.
|
|
45
|
-
"
|
|
46
|
-
"
|
|
43
|
+
"yargs": "^17.7.2",
|
|
44
|
+
"entry-script": "^3.0.7",
|
|
45
|
+
"format-file": "^0.1.3",
|
|
46
|
+
"haywire": "^0.1.6",
|
|
47
|
+
"haywire-launcher": "^0.1.9",
|
|
48
|
+
"juniper": "^1.2.3",
|
|
49
|
+
"default-import": "^2.0.5",
|
|
50
|
+
"nx-plugin-handler": "^0.1.0",
|
|
51
|
+
"parse-cwd": "^1.1.0",
|
|
52
|
+
"common-proxy": "^0.1.0"
|
|
47
53
|
},
|
|
48
54
|
"optionalDependencies": {
|
|
49
|
-
"@nx/devkit": "^20.0
|
|
55
|
+
"@nx/devkit": "^20.3.0"
|
|
50
56
|
},
|
|
51
57
|
"devDependencies": {
|
|
52
58
|
"@biomejs/biome": "^1.9.4",
|
|
59
|
+
"@swc/cli": "^0.5.2",
|
|
60
|
+
"@swc/core": "^1.10.4",
|
|
53
61
|
"@types/chai": "^5.0.1",
|
|
54
62
|
"@types/chai-as-promised": "^8.0.1",
|
|
55
|
-
"@types/mocha": "^10.0.
|
|
56
|
-
"@types/node": "^22.
|
|
63
|
+
"@types/mocha": "^10.0.10",
|
|
64
|
+
"@types/node": "^22.10.2",
|
|
57
65
|
"@types/sinon": "^17.0.3",
|
|
58
|
-
"
|
|
66
|
+
"@types/yargs": "^17.0.33",
|
|
67
|
+
"c8": "^10.1.3",
|
|
59
68
|
"chai": "^5.1.2",
|
|
60
|
-
"chai-as-promised": "^8.0.
|
|
61
|
-
"mocha": "^
|
|
69
|
+
"chai-as-promised": "^8.0.1",
|
|
70
|
+
"mocha": "^11.0.1",
|
|
62
71
|
"sinon": "^19.0.2",
|
|
63
|
-
"typescript": "^5.
|
|
72
|
+
"typescript": "^5.7.2",
|
|
64
73
|
"@leyman/eslint-config": "^0.0.4",
|
|
65
|
-
"load-populate-files": "^0.0
|
|
66
|
-
"
|
|
67
|
-
"nx-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"sinon-typed-stub": "^0.0.7"
|
|
74
|
+
"load-populate-files": "^0.1.0",
|
|
75
|
+
"pnpm-dedicated-lockfile": "^0.0.1",
|
|
76
|
+
"nx-update-ts-references": "^0.1.0",
|
|
77
|
+
"mocha-chain": "^0.0.9",
|
|
78
|
+
"sinon-typed-stub": "^0.0.8"
|
|
71
79
|
}
|
|
72
80
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { LifecycleOptions } from './schema.js';
|
|
2
|
-
import type { SimpleExecutorContext } from './types.js';
|
|
3
|
-
export interface NormalizedOptions {
|
|
4
|
-
check: boolean;
|
|
5
|
-
dryRun: boolean;
|
|
6
|
-
nxJsonPath: string;
|
|
7
|
-
packageJsonPaths: {
|
|
8
|
-
name: string;
|
|
9
|
-
path: string;
|
|
10
|
-
}[];
|
|
11
|
-
stages: NonNullable<LifecycleOptions['stages']>;
|
|
12
|
-
bindings: NonNullable<LifecycleOptions['bindings']>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Standardizes the options passed to this executor,
|
|
16
|
-
* based on input, reasonable defaults, and project state.
|
|
17
|
-
*/
|
|
18
|
-
export declare class Normalizer {
|
|
19
|
-
#private;
|
|
20
|
-
constructor(isCI: boolean);
|
|
21
|
-
normalizeOptions(options: LifecycleOptions, context: SimpleExecutorContext): NormalizedOptions;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=normalizer.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Path from 'node:path';
|
|
2
|
-
export class Normalizer {
|
|
3
|
-
#isCI;
|
|
4
|
-
constructor(isCI){
|
|
5
|
-
this.#isCI = isCI;
|
|
6
|
-
}
|
|
7
|
-
normalizeOptions(options, context) {
|
|
8
|
-
return {
|
|
9
|
-
check: options.check ?? this.#isCI,
|
|
10
|
-
dryRun: options.dryRun ?? false,
|
|
11
|
-
nxJsonPath: Path.join(context.root, 'nx.json'),
|
|
12
|
-
packageJsonPaths: Object.values(context.projectsConfigurations.projects).map((projectConfig)=>({
|
|
13
|
-
name: projectConfig.name,
|
|
14
|
-
path: Path.join(context.root, projectConfig.root, 'project.json')
|
|
15
|
-
})),
|
|
16
|
-
stages: options.stages ?? {},
|
|
17
|
-
bindings: options.bindings ?? {}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=normalizer.js.map
|