nx-lifecycle 1.0.0 → 1.1.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.
Files changed (60) hide show
  1. package/README.md +42 -4
  2. package/WHY-NX-LIFECYCLE.md +1 -1
  3. package/dist/bin.d.ts +0 -603
  4. package/dist/bin.js +3 -13
  5. package/dist/cli.d.ts +8 -6
  6. package/dist/cli.js +17 -20
  7. package/dist/commands/explain-command.d.ts +13 -0
  8. package/dist/commands/explain-command.js +60 -0
  9. package/dist/commands/lib/types.d.ts +14 -4
  10. package/dist/commands/lib/types.js +2 -1
  11. package/dist/commands/lifecycle-command.d.ts +2 -11
  12. package/dist/commands/lifecycle-command.js +16 -22
  13. package/dist/container.d.ts +3 -0
  14. package/dist/container.js +8 -0
  15. package/dist/executors/lifecycle/index.d.ts +1 -4
  16. package/dist/executors/lifecycle/index.js +1 -4
  17. package/dist/executors/lifecycle/lifecycle.d.ts +8 -9
  18. package/dist/executors/lifecycle/lifecycle.js +13 -20
  19. package/dist/lifecycle/explain.d.ts +68 -0
  20. package/dist/lifecycle/explain.js +157 -0
  21. package/dist/lifecycle/lifecycle-internal.d.ts +4 -12
  22. package/dist/lifecycle/lifecycle-internal.js +92 -109
  23. package/dist/lifecycle/normalizer.d.ts +13 -7
  24. package/dist/lifecycle/normalizer.js +29 -36
  25. package/dist/lifecycle/processor.d.ts +1 -3
  26. package/dist/lifecycle/processor.js +22 -14
  27. package/dist/lifecycle/schema.d.ts +244 -714
  28. package/dist/lifecycle/schema.js +3 -2
  29. package/dist/plugin/index.d.ts +1 -277
  30. package/dist/plugin/index.js +1 -3
  31. package/dist/plugin/lifecycle-plugin.d.ts +18 -15
  32. package/dist/plugin/lifecycle-plugin.js +90 -106
  33. package/dist/plugin/schema.d.ts +33 -343
  34. package/dist/plugin/schema.js +0 -2
  35. package/dist/schemas/configurations.d.ts +5 -6
  36. package/dist/schemas/depend-on.d.ts +38 -74
  37. package/dist/schemas/depend-on.js +5 -4
  38. package/dist/schemas/nx-json.d.ts +38 -223
  39. package/dist/schemas/nx-json.js +0 -2
  40. package/dist/schemas/project-json.d.ts +38 -223
  41. package/dist/schemas/project-json.js +0 -2
  42. package/dist/schemas/target.d.ts +72 -140
  43. package/out/nx-executor/schema.json +2 -2
  44. package/out/schema.json +1 -1
  45. package/package.json +29 -14
  46. package/.npmignore +0 -20
  47. package/dist/commands/index.d.ts +0 -755
  48. package/dist/commands/index.js +0 -14
  49. package/dist/commands/lib/dependencies.d.ts +0 -10
  50. package/dist/commands/lib/dependencies.js +0 -12
  51. package/dist/executors/lifecycle/container.d.ts +0 -603
  52. package/dist/executors/lifecycle/container.js +0 -8
  53. package/dist/lifecycle/dependencies.d.ts +0 -16
  54. package/dist/lifecycle/dependencies.js +0 -14
  55. package/dist/lifecycle/index.d.ts +0 -756
  56. package/dist/lifecycle/index.js +0 -25
  57. package/dist/plugin/container.d.ts +0 -855
  58. package/dist/plugin/container.js +0 -13
  59. package/dist/plugin/dependencies.d.ts +0 -860
  60. package/dist/plugin/dependencies.js +0 -9
@@ -1,152 +1,84 @@
1
1
  import type { SchemaType } from 'juniper';
2
2
  declare const targetSchema: import("juniper").ObjectSchema<{
3
3
  executor: import("juniper").StringSchema<string, false>;
4
- dependsOn: import("juniper").ArraySchema<string | (Partial<{
5
- dependencies: boolean;
6
- projects: never;
7
- }> & Partial<{
8
- target: string;
9
- params: string;
10
- }> & Required<Pick<{
11
- target: string;
12
- params: string;
13
- }, "target">>) | (string & Partial<{
14
- dependencies: boolean;
15
- projects: never;
16
- }> & Partial<{
17
- target: string;
18
- params: string;
19
- }> & Required<Pick<{
20
- target: string;
21
- params: string;
22
- }, "target">>) | (Partial<{
23
- dependencies: boolean;
24
- projects: never;
25
- }> & Partial<{
26
- target: string;
27
- params: string;
28
- }> & Required<Pick<{
29
- target: string;
30
- params: string;
31
- }, "target">> & string) | (Partial<{
32
- dependencies: never;
33
- projects: string | string[];
34
- }> & Required<Pick<{
35
- dependencies: never;
36
- projects: string | string[];
37
- }, "projects">> & Partial<{
38
- target: string;
39
- params: string;
40
- }> & Required<Pick<{
41
- target: string;
42
- params: string;
43
- }, "target">>) | (string & Partial<{
44
- dependencies: never;
45
- projects: string | string[];
46
- }> & Required<Pick<{
47
- dependencies: never;
48
- projects: string | string[];
49
- }, "projects">> & Partial<{
50
- target: string;
51
- params: string;
52
- }> & Required<Pick<{
53
- target: string;
54
- params: string;
55
- }, "target">>) | (Partial<{
56
- dependencies: never;
57
- projects: string | string[];
58
- }> & Required<Pick<{
59
- dependencies: never;
60
- projects: string | string[];
61
- }, "projects">> & Partial<{
62
- target: string;
63
- params: string;
64
- }> & Required<Pick<{
65
- target: string;
66
- params: string;
67
- }, "target">> & string), [], never, unknown, false>;
68
- configurations: import("juniper").ObjectSchema<{}, never, boolean, import("juniper").EmptyIndex, (Partial<{
69
- __lifecycle: import("juniper").EmptyObject;
70
- }> & Required<Pick<{
4
+ dependsOn: import("juniper").ArraySchema<string | {
5
+ target: string;
6
+ params?: string;
7
+ dependencies?: boolean;
8
+ projects?: never;
9
+ } | {
10
+ target: string;
11
+ params?: string;
12
+ dependencies?: never;
13
+ projects: (string | string[] | undefined) & (string | string[]);
14
+ } | (string & {
15
+ target: string;
16
+ params?: string;
17
+ dependencies?: boolean;
18
+ projects?: never;
19
+ }) | (string & {
20
+ target: string;
21
+ params?: string;
22
+ dependencies?: never;
23
+ projects: (string | string[] | undefined) & (string | string[]);
24
+ }) | ({
25
+ target: string;
26
+ params?: string;
27
+ dependencies?: boolean;
28
+ projects?: never;
29
+ } & string) | ({
30
+ target: string;
31
+ params?: string;
32
+ dependencies?: never;
33
+ projects: (string | string[] | undefined) & (string | string[]);
34
+ } & string), [], never, unknown, false>;
35
+ configurations: import("juniper").ObjectSchema<{}, never, boolean, import("juniper").EmptyIndex, {
36
+ [x: string]: unknown;
37
+ __lifecycle?: never;
38
+ } | {
71
39
  __lifecycle: import("juniper").EmptyObject;
72
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
73
- __lifecycle: never;
74
- }>), boolean>;
40
+ }, boolean>;
75
41
  }, never, boolean, import("juniper").EmptyIndex, unknown, false>;
76
42
  export type Target = SchemaType<typeof targetSchema>;
77
43
  export declare const allTargetsSchema: import("juniper").ObjectSchema<{}, never, import("juniper").ObjectSchema<{
78
44
  executor: import("juniper").StringSchema<string, false>;
79
- dependsOn: import("juniper").ArraySchema<string | (Partial<{
80
- dependencies: boolean;
81
- projects: never;
82
- }> & Partial<{
83
- target: string;
84
- params: string;
85
- }> & Required<Pick<{
86
- target: string;
87
- params: string;
88
- }, "target">>) | (string & Partial<{
89
- dependencies: boolean;
90
- projects: never;
91
- }> & Partial<{
92
- target: string;
93
- params: string;
94
- }> & Required<Pick<{
95
- target: string;
96
- params: string;
97
- }, "target">>) | (Partial<{
98
- dependencies: boolean;
99
- projects: never;
100
- }> & Partial<{
101
- target: string;
102
- params: string;
103
- }> & Required<Pick<{
104
- target: string;
105
- params: string;
106
- }, "target">> & string) | (Partial<{
107
- dependencies: never;
108
- projects: string | string[];
109
- }> & Required<Pick<{
110
- dependencies: never;
111
- projects: string | string[];
112
- }, "projects">> & Partial<{
113
- target: string;
114
- params: string;
115
- }> & Required<Pick<{
116
- target: string;
117
- params: string;
118
- }, "target">>) | (string & Partial<{
119
- dependencies: never;
120
- projects: string | string[];
121
- }> & Required<Pick<{
122
- dependencies: never;
123
- projects: string | string[];
124
- }, "projects">> & Partial<{
125
- target: string;
126
- params: string;
127
- }> & Required<Pick<{
128
- target: string;
129
- params: string;
130
- }, "target">>) | (Partial<{
131
- dependencies: never;
132
- projects: string | string[];
133
- }> & Required<Pick<{
134
- dependencies: never;
135
- projects: string | string[];
136
- }, "projects">> & Partial<{
137
- target: string;
138
- params: string;
139
- }> & Required<Pick<{
140
- target: string;
141
- params: string;
142
- }, "target">> & string), [], never, unknown, false>;
143
- configurations: import("juniper").ObjectSchema<{}, never, boolean, import("juniper").EmptyIndex, (Partial<{
144
- __lifecycle: import("juniper").EmptyObject;
145
- }> & Required<Pick<{
45
+ dependsOn: import("juniper").ArraySchema<string | {
46
+ target: string;
47
+ params?: string;
48
+ dependencies?: boolean;
49
+ projects?: never;
50
+ } | {
51
+ target: string;
52
+ params?: string;
53
+ dependencies?: never;
54
+ projects: (string | string[] | undefined) & (string | string[]);
55
+ } | (string & {
56
+ target: string;
57
+ params?: string;
58
+ dependencies?: boolean;
59
+ projects?: never;
60
+ }) | (string & {
61
+ target: string;
62
+ params?: string;
63
+ dependencies?: never;
64
+ projects: (string | string[] | undefined) & (string | string[]);
65
+ }) | ({
66
+ target: string;
67
+ params?: string;
68
+ dependencies?: boolean;
69
+ projects?: never;
70
+ } & string) | ({
71
+ target: string;
72
+ params?: string;
73
+ dependencies?: never;
74
+ projects: (string | string[] | undefined) & (string | string[]);
75
+ } & string), [], never, unknown, false>;
76
+ configurations: import("juniper").ObjectSchema<{}, never, boolean, import("juniper").EmptyIndex, {
77
+ [x: string]: unknown;
78
+ __lifecycle?: never;
79
+ } | {
146
80
  __lifecycle: import("juniper").EmptyObject;
147
- }, "__lifecycle">>) | (Record<string, unknown> & Partial<{
148
- __lifecycle: never;
149
- }>), boolean>;
81
+ }, boolean>;
150
82
  }, never, boolean, import("juniper").EmptyIndex, unknown, false>, import("juniper").EmptyIndex, unknown, false>;
151
83
  export type AllTargets = SchemaType<typeof allTargetsSchema>;
152
84
  export {};
@@ -13,7 +13,7 @@
13
13
  "type": "string",
14
14
  "description": "Path or URL to the JSON schema for this file",
15
15
  "examples": [
16
- "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/src/lifecycle/schema.json"
16
+ "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/out/schema.json"
17
17
  ],
18
18
  "format": "uri-reference"
19
19
  },
@@ -124,7 +124,7 @@
124
124
  "type": "string",
125
125
  "description": "Path or URL to the JSON schema for this file",
126
126
  "examples": [
127
- "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/src/lifecycle/schema.json"
127
+ "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/out/schema.json"
128
128
  ],
129
129
  "format": "uri-reference"
130
130
  },
package/out/schema.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "type": "string",
9
9
  "description": "Path or URL to the JSON schema for this file",
10
10
  "examples": [
11
- "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/src/lifecycle/schema.json"
11
+ "https://raw.githubusercontent.com/JacobLey/leyman/refs/heads/main/apps/nx-lifecycle/out/schema.json"
12
12
  ],
13
13
  "format": "uri-reference"
14
14
  },
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.1",
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"
@@ -31,6 +37,16 @@
31
37
  "default": "./package.json"
32
38
  }
33
39
  },
40
+ "files": [
41
+ "dist",
42
+ "!dist/**/*.map",
43
+ "!dist/tsconfig.tsbuildinfo",
44
+ "!dist/file-content.*",
45
+ "bin.mjs",
46
+ "executors.json",
47
+ "out",
48
+ "WHY-NX-LIFECYCLE.md"
49
+ ],
34
50
  "imports": {
35
51
  "#schemas": {
36
52
  "types": "./src/schemas/index.ts",
@@ -44,15 +60,15 @@
44
60
  "dependencies": {
45
61
  "@nx/devkit": "^23.2.1",
46
62
  "ci-info": "^4.4.0",
47
- "entry-script": "^4.0.0",
63
+ "entry-script": "^4.1.0",
48
64
  "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",
65
+ "format-file": "^1.0.1",
66
+ "haywire": "^1.1.1",
67
+ "haywire-launcher": "^1.0.1",
68
+ "juniper": "^2.2.0",
69
+ "juniper-validator": "^0.2.1",
54
70
  "nx": "^23.2.1",
55
- "parse-cwd": "^2.0.0",
71
+ "parse-cwd": "^2.0.2",
56
72
  "yargs": "^18.2.0"
57
73
  },
58
74
  "devDependencies": {
@@ -67,13 +83,12 @@
67
83
  "@types/yargs": "^17.0.35",
68
84
  "@typescript/native": "npm:typescript@^7.0.2",
69
85
  "c8": "^12.0.0",
70
- "eslint": "^9.39.5",
86
+ "eslint": "^10.12.0",
71
87
  "expect-type": "^1.4.0",
72
- "load-populate-files": "^1.0.0",
88
+ "load-populate-files": "^1.0.2",
73
89
  "mocha": "^12.0.2",
74
- "mocha-chain": "^1.0.0",
90
+ "mocha-chain": "^1.0.1",
75
91
  "sinon": "^22.1.0",
76
- "sinon-typed-stub": "^1.0.0",
77
92
  "typescript": "npm:@typescript/typescript6@^6.0.2"
78
93
  }
79
94
  }
package/.npmignore DELETED
@@ -1,20 +0,0 @@
1
- CHANGELOG.md
2
- project.json
3
- tsconfig.json
4
-
5
- coverage/**
6
- eslint.config.js
7
-
8
- dist/tsconfig.tsbuildinfo
9
- dist/**/*.map
10
- dist-test/**
11
- test/**
12
-
13
- src/**
14
- !src/executors/lifecycle/schema.json
15
-
16
- dist/file-content.js
17
- dist/file-content.d.ts
18
-
19
- dist/executors/lifecycle/schema.js
20
- dist/executors/lifecycle/schema.d.ts