nx-lifecycle 1.0.0 → 1.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.
Files changed (48) hide show
  1. package/README.md +42 -4
  2. package/WHY-NX-LIFECYCLE.md +1 -1
  3. package/dist/bin.d.ts +1 -605
  4. package/dist/bin.js +1 -15
  5. package/dist/cli.d.ts +1 -5
  6. package/dist/cli.js +9 -22
  7. package/dist/commands/explain-command.d.ts +12 -0
  8. package/dist/commands/explain-command.js +57 -0
  9. package/dist/commands/lib/types.d.ts +0 -3
  10. package/dist/commands/lifecycle-command.d.ts +1 -11
  11. package/dist/commands/lifecycle-command.js +13 -22
  12. package/dist/executors/lifecycle/index.d.ts +1 -4
  13. package/dist/executors/lifecycle/index.js +1 -4
  14. package/dist/executors/lifecycle/lifecycle.d.ts +8 -9
  15. package/dist/executors/lifecycle/lifecycle.js +13 -20
  16. package/dist/lifecycle/explain.d.ts +68 -0
  17. package/dist/lifecycle/explain.js +160 -0
  18. package/dist/lifecycle/lifecycle-internal.d.ts +4 -12
  19. package/dist/lifecycle/lifecycle-internal.js +92 -109
  20. package/dist/lifecycle/normalizer.d.ts +13 -7
  21. package/dist/lifecycle/normalizer.js +29 -36
  22. package/dist/lifecycle/processor.d.ts +1 -3
  23. package/dist/lifecycle/processor.js +0 -2
  24. package/dist/plugin/index.d.ts +1 -277
  25. package/dist/plugin/index.js +1 -3
  26. package/dist/plugin/lifecycle-plugin.d.ts +18 -15
  27. package/dist/plugin/lifecycle-plugin.js +76 -89
  28. package/dist/plugin/schema.d.ts +2 -279
  29. package/dist/plugin/schema.js +0 -2
  30. package/dist/schemas/nx-json.d.ts +2 -153
  31. package/dist/schemas/nx-json.js +0 -2
  32. package/dist/schemas/project-json.d.ts +2 -153
  33. package/dist/schemas/project-json.js +0 -2
  34. package/package.json +16 -13
  35. package/dist/commands/index.d.ts +0 -755
  36. package/dist/commands/index.js +0 -14
  37. package/dist/commands/lib/dependencies.d.ts +0 -10
  38. package/dist/commands/lib/dependencies.js +0 -12
  39. package/dist/executors/lifecycle/container.d.ts +0 -603
  40. package/dist/executors/lifecycle/container.js +0 -8
  41. package/dist/lifecycle/dependencies.d.ts +0 -16
  42. package/dist/lifecycle/dependencies.js +0 -14
  43. package/dist/lifecycle/index.d.ts +0 -756
  44. package/dist/lifecycle/index.js +0 -25
  45. package/dist/plugin/container.d.ts +0 -855
  46. package/dist/plugin/container.js +0 -13
  47. package/dist/plugin/dependencies.d.ts +0 -860
  48. package/dist/plugin/dependencies.js +0 -9
@@ -1,4 +1,5 @@
1
1
  import type { SchemaType } from 'juniper';
2
+ import type { JuniperValidator } from 'juniper-validator';
2
3
  declare const nxJsonSchema: import("juniper").ObjectSchema<{
3
4
  targetDefaults: import("juniper").ObjectSchema<{}, never, import("juniper").ObjectSchema<{
4
5
  executor: import("juniper").StringSchema<string, false>;
@@ -76,158 +77,6 @@ declare const nxJsonSchema: import("juniper").ObjectSchema<{
76
77
  }, never, boolean, import("juniper").EmptyIndex, unknown, false>, import("juniper").EmptyIndex, unknown, false>;
77
78
  }, never, true, import("juniper").EmptyIndex, unknown, false>;
78
79
  export type NxJson = SchemaType<typeof nxJsonSchema>;
79
- export declare const assertNxJson: (x: unknown) => asserts x is Record<string, unknown> & Partial<{
80
- targetDefaults: Record<string, Partial<{
81
- executor: string;
82
- dependsOn: (string | (Partial<{
83
- dependencies: boolean;
84
- projects: never;
85
- }> & Partial<{
86
- target: string;
87
- params: string;
88
- }> & Required<Pick<{
89
- target: string;
90
- params: string;
91
- }, "target">>) | (string & Partial<{
92
- dependencies: boolean;
93
- projects: never;
94
- }> & Partial<{
95
- target: string;
96
- params: string;
97
- }> & Required<Pick<{
98
- target: string;
99
- params: string;
100
- }, "target">>) | (Partial<{
101
- dependencies: boolean;
102
- projects: never;
103
- }> & Partial<{
104
- target: string;
105
- params: string;
106
- }> & Required<Pick<{
107
- target: string;
108
- params: string;
109
- }, "target">> & string) | (Partial<{
110
- dependencies: never;
111
- projects: string | string[];
112
- }> & Required<Pick<{
113
- dependencies: never;
114
- projects: string | string[];
115
- }, "projects">> & Partial<{
116
- target: string;
117
- params: string;
118
- }> & Required<Pick<{
119
- target: string;
120
- params: string;
121
- }, "target">>) | (string & Partial<{
122
- dependencies: never;
123
- projects: string | string[];
124
- }> & Required<Pick<{
125
- dependencies: never;
126
- projects: string | string[];
127
- }, "projects">> & Partial<{
128
- target: string;
129
- params: string;
130
- }> & Required<Pick<{
131
- target: string;
132
- params: string;
133
- }, "target">>) | (Partial<{
134
- dependencies: never;
135
- projects: string | string[];
136
- }> & Required<Pick<{
137
- dependencies: never;
138
- projects: string | string[];
139
- }, "projects">> & Partial<{
140
- target: string;
141
- params: string;
142
- }> & Required<Pick<{
143
- target: string;
144
- params: string;
145
- }, "target">> & string))[];
146
- configurations: (Partial<{
147
- __lifecycle: import("juniper").EmptyObject;
148
- }> & Required<Pick<{
149
- __lifecycle: import("juniper").EmptyObject;
150
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
151
- __lifecycle: never;
152
- }>);
153
- }>>;
154
- }>;
155
- export type AssertNxJson = typeof assertNxJson;
156
- export declare const assertNxJsonIdentifier: import("haywire").HaywireId<(x: unknown) => asserts x is Record<string, unknown> & Partial<{
157
- targetDefaults: Record<string, Partial<{
158
- executor: string;
159
- dependsOn: (string | (Partial<{
160
- dependencies: boolean;
161
- projects: never;
162
- }> & Partial<{
163
- target: string;
164
- params: string;
165
- }> & Required<Pick<{
166
- target: string;
167
- params: string;
168
- }, "target">>) | (string & Partial<{
169
- dependencies: boolean;
170
- projects: never;
171
- }> & Partial<{
172
- target: string;
173
- params: string;
174
- }> & Required<Pick<{
175
- target: string;
176
- params: string;
177
- }, "target">>) | (Partial<{
178
- dependencies: boolean;
179
- projects: never;
180
- }> & Partial<{
181
- target: string;
182
- params: string;
183
- }> & Required<Pick<{
184
- target: string;
185
- params: string;
186
- }, "target">> & string) | (Partial<{
187
- dependencies: never;
188
- projects: string | string[];
189
- }> & Required<Pick<{
190
- dependencies: never;
191
- projects: string | string[];
192
- }, "projects">> & Partial<{
193
- target: string;
194
- params: string;
195
- }> & Required<Pick<{
196
- target: string;
197
- params: string;
198
- }, "target">>) | (string & Partial<{
199
- dependencies: never;
200
- projects: string | string[];
201
- }> & Required<Pick<{
202
- dependencies: never;
203
- projects: string | string[];
204
- }, "projects">> & Partial<{
205
- target: string;
206
- params: string;
207
- }> & Required<Pick<{
208
- target: string;
209
- params: string;
210
- }, "target">>) | (Partial<{
211
- dependencies: never;
212
- projects: string | string[];
213
- }> & Required<Pick<{
214
- dependencies: never;
215
- projects: string | string[];
216
- }, "projects">> & Partial<{
217
- target: string;
218
- params: string;
219
- }> & Required<Pick<{
220
- target: string;
221
- params: string;
222
- }, "target">> & string))[];
223
- configurations: (Partial<{
224
- __lifecycle: import("juniper").EmptyObject;
225
- }> & Required<Pick<{
226
- __lifecycle: import("juniper").EmptyObject;
227
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
228
- __lifecycle: never;
229
- }>);
230
- }>>;
231
- }>, null, "nxJson", false, false, false, false, false>;
80
+ export declare const assertNxJson: JuniperValidator<NxJson>['assert'];
232
81
  export {};
233
82
  //# sourceMappingURL=nx-json.d.ts.map
@@ -1,4 +1,3 @@
1
- import { identifier } from 'haywire';
2
1
  import { objectSchema } from 'juniper';
3
2
  import { makeValidator } from 'juniper-validator';
4
3
  import { allTargetsSchema } from './target.js';
@@ -9,6 +8,5 @@ const nxJsonSchema = objectSchema({
9
8
  additionalProperties: true
10
9
  });
11
10
  export const assertNxJson = makeValidator(nxJsonSchema).assert;
12
- export const assertNxJsonIdentifier = identifier().named('nxJson');
13
11
 
14
12
  //# sourceMappingURL=nx-json.js.map
@@ -1,4 +1,5 @@
1
1
  import type { SchemaType } from 'juniper';
2
+ import type { JuniperValidator } from 'juniper-validator';
2
3
  declare const projectJsonSchema: import("juniper").ObjectSchema<{
3
4
  targets: import("juniper").ObjectSchema<{}, never, import("juniper").ObjectSchema<{
4
5
  executor: import("juniper").StringSchema<string, false>;
@@ -76,158 +77,6 @@ declare const projectJsonSchema: import("juniper").ObjectSchema<{
76
77
  }, never, boolean, import("juniper").EmptyIndex, unknown, false>, import("juniper").EmptyIndex, unknown, false>;
77
78
  }, never, true, import("juniper").EmptyIndex, unknown, false>;
78
79
  export type ProjectJson = SchemaType<typeof projectJsonSchema>;
79
- export declare const assertProjectJson: (x: unknown) => asserts x is Record<string, unknown> & Partial<{
80
- targets: Record<string, Partial<{
81
- executor: string;
82
- dependsOn: (string | (Partial<{
83
- dependencies: boolean;
84
- projects: never;
85
- }> & Partial<{
86
- target: string;
87
- params: string;
88
- }> & Required<Pick<{
89
- target: string;
90
- params: string;
91
- }, "target">>) | (string & Partial<{
92
- dependencies: boolean;
93
- projects: never;
94
- }> & Partial<{
95
- target: string;
96
- params: string;
97
- }> & Required<Pick<{
98
- target: string;
99
- params: string;
100
- }, "target">>) | (Partial<{
101
- dependencies: boolean;
102
- projects: never;
103
- }> & Partial<{
104
- target: string;
105
- params: string;
106
- }> & Required<Pick<{
107
- target: string;
108
- params: string;
109
- }, "target">> & string) | (Partial<{
110
- dependencies: never;
111
- projects: string | string[];
112
- }> & Required<Pick<{
113
- dependencies: never;
114
- projects: string | string[];
115
- }, "projects">> & Partial<{
116
- target: string;
117
- params: string;
118
- }> & Required<Pick<{
119
- target: string;
120
- params: string;
121
- }, "target">>) | (string & Partial<{
122
- dependencies: never;
123
- projects: string | string[];
124
- }> & Required<Pick<{
125
- dependencies: never;
126
- projects: string | string[];
127
- }, "projects">> & Partial<{
128
- target: string;
129
- params: string;
130
- }> & Required<Pick<{
131
- target: string;
132
- params: string;
133
- }, "target">>) | (Partial<{
134
- dependencies: never;
135
- projects: string | string[];
136
- }> & Required<Pick<{
137
- dependencies: never;
138
- projects: string | string[];
139
- }, "projects">> & Partial<{
140
- target: string;
141
- params: string;
142
- }> & Required<Pick<{
143
- target: string;
144
- params: string;
145
- }, "target">> & string))[];
146
- configurations: (Partial<{
147
- __lifecycle: import("juniper").EmptyObject;
148
- }> & Required<Pick<{
149
- __lifecycle: import("juniper").EmptyObject;
150
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
151
- __lifecycle: never;
152
- }>);
153
- }>>;
154
- }>;
155
- export type AssertProjectJson = typeof assertProjectJson;
156
- export declare const assertProjectJsonIdentifier: import("haywire").HaywireId<(x: unknown) => asserts x is Record<string, unknown> & Partial<{
157
- targets: Record<string, Partial<{
158
- executor: string;
159
- dependsOn: (string | (Partial<{
160
- dependencies: boolean;
161
- projects: never;
162
- }> & Partial<{
163
- target: string;
164
- params: string;
165
- }> & Required<Pick<{
166
- target: string;
167
- params: string;
168
- }, "target">>) | (string & Partial<{
169
- dependencies: boolean;
170
- projects: never;
171
- }> & Partial<{
172
- target: string;
173
- params: string;
174
- }> & Required<Pick<{
175
- target: string;
176
- params: string;
177
- }, "target">>) | (Partial<{
178
- dependencies: boolean;
179
- projects: never;
180
- }> & Partial<{
181
- target: string;
182
- params: string;
183
- }> & Required<Pick<{
184
- target: string;
185
- params: string;
186
- }, "target">> & string) | (Partial<{
187
- dependencies: never;
188
- projects: string | string[];
189
- }> & Required<Pick<{
190
- dependencies: never;
191
- projects: string | string[];
192
- }, "projects">> & Partial<{
193
- target: string;
194
- params: string;
195
- }> & Required<Pick<{
196
- target: string;
197
- params: string;
198
- }, "target">>) | (string & Partial<{
199
- dependencies: never;
200
- projects: string | string[];
201
- }> & Required<Pick<{
202
- dependencies: never;
203
- projects: string | string[];
204
- }, "projects">> & Partial<{
205
- target: string;
206
- params: string;
207
- }> & Required<Pick<{
208
- target: string;
209
- params: string;
210
- }, "target">>) | (Partial<{
211
- dependencies: never;
212
- projects: string | string[];
213
- }> & Required<Pick<{
214
- dependencies: never;
215
- projects: string | string[];
216
- }, "projects">> & Partial<{
217
- target: string;
218
- params: string;
219
- }> & Required<Pick<{
220
- target: string;
221
- params: string;
222
- }, "target">> & string))[];
223
- configurations: (Partial<{
224
- __lifecycle: import("juniper").EmptyObject;
225
- }> & Required<Pick<{
226
- __lifecycle: import("juniper").EmptyObject;
227
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
228
- __lifecycle: never;
229
- }>);
230
- }>>;
231
- }>, null, "projectJson", false, false, false, false, false>;
80
+ export declare const assertProjectJson: JuniperValidator<ProjectJson>['assert'];
232
81
  export {};
233
82
  //# sourceMappingURL=project-json.d.ts.map
@@ -1,4 +1,3 @@
1
- import { identifier } from 'haywire';
2
1
  import { objectSchema } from 'juniper';
3
2
  import { makeValidator } from 'juniper-validator';
4
3
  import { allTargetsSchema } from './target.js';
@@ -9,6 +8,5 @@ const projectJsonSchema = objectSchema({
9
8
  additionalProperties: true
10
9
  });
11
10
  export const assertProjectJson = makeValidator(projectJsonSchema).assert;
12
- export const assertProjectJsonIdentifier = identifier().named('projectJson');
13
11
 
14
12
  //# sourceMappingURL=project-json.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nx-lifecycle",
3
- "version": "1.0.0",
4
- "description": "Keep high level nx lifecycle targets in sync",
3
+ "version": "1.1.0",
4
+ "description": "Nx plugin that derives every dependsOn from declared lifecycle stages (build, test, …) and the targets bound to them.",
5
5
  "engines": {
6
6
  "node": ">=24"
7
7
  },
@@ -10,7 +10,8 @@
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "JacobLey/leyman"
13
+ "url": "git+https://github.com/JacobLey/leyman.git",
14
+ "directory": "apps/nx-lifecycle"
14
15
  },
15
16
  "homepage": "https://github.com/JacobLey/leyman/tree/main/apps/nx-lifecycle#readme",
16
17
  "bugs": {
@@ -18,7 +19,12 @@
18
19
  },
19
20
  "keywords": [
20
21
  "nx",
22
+ "nx-plugin",
23
+ "monorepo",
21
24
  "lifecycle",
25
+ "dependsOn",
26
+ "task-pipeline",
27
+ "targets",
22
28
  "build",
23
29
  "test",
24
30
  "cli"
@@ -44,15 +50,13 @@
44
50
  "dependencies": {
45
51
  "@nx/devkit": "^23.2.1",
46
52
  "ci-info": "^4.4.0",
47
- "entry-script": "^4.0.0",
53
+ "entry-script": "^4.0.1",
48
54
  "fast-equals": "^6.0.4",
49
- "format-file": "^1.0.0",
50
- "haywire": "^1.0.0",
51
- "haywire-launcher": "^1.0.0",
52
- "juniper": "^2.0.0",
53
- "juniper-validator": "^0.1.0",
55
+ "format-file": "^1.0.1",
56
+ "juniper": "^2.1.0",
57
+ "juniper-validator": "^0.2.0",
54
58
  "nx": "^23.2.1",
55
- "parse-cwd": "^2.0.0",
59
+ "parse-cwd": "^2.0.1",
56
60
  "yargs": "^18.2.0"
57
61
  },
58
62
  "devDependencies": {
@@ -69,11 +73,10 @@
69
73
  "c8": "^12.0.0",
70
74
  "eslint": "^9.39.5",
71
75
  "expect-type": "^1.4.0",
72
- "load-populate-files": "^1.0.0",
76
+ "load-populate-files": "^1.0.1",
73
77
  "mocha": "^12.0.2",
74
- "mocha-chain": "^1.0.0",
78
+ "mocha-chain": "^1.0.1",
75
79
  "sinon": "^22.1.0",
76
- "sinon-typed-stub": "^1.0.0",
77
80
  "typescript": "npm:@typescript/typescript6@^6.0.2"
78
81
  }
79
82
  }