@storm-software/workspace-tools 1.272.1 → 1.273.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 (167) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +2 -1
  3. package/dist/chunk-2CZBN33P.js +685 -0
  4. package/dist/{chunk-LBAVVYKU.js → chunk-2F5TLK3C.js} +21 -19
  5. package/dist/{chunk-AHLKRK7D.mjs → chunk-33FZTHTK.mjs} +2 -2
  6. package/dist/{chunk-7RVW57VK.js → chunk-3G3HNZ22.js} +2 -2
  7. package/dist/{chunk-DCPKZRRY.js → chunk-3QD2U6SS.js} +30 -28
  8. package/dist/{chunk-EKWR7TBP.mjs → chunk-5MOK3MSQ.mjs} +1 -1
  9. package/dist/{chunk-MZSZKV4N.mjs → chunk-5XTW4576.mjs} +1 -1
  10. package/dist/{chunk-MMBLGUC3.mjs → chunk-5XYM22SB.mjs} +5 -3
  11. package/dist/{chunk-YXBFVZ3K.js → chunk-7Q2NOIDR.js} +2 -2
  12. package/dist/{chunk-4QYM3VS4.mjs → chunk-A6H2SCIM.mjs} +41 -3
  13. package/dist/{chunk-4K5FV2MH.mjs → chunk-AAQQSGPY.mjs} +1 -1
  14. package/dist/{chunk-EXYV2BKT.mjs → chunk-AW3I76E2.mjs} +1 -1
  15. package/dist/{chunk-WE4HK4RN.js → chunk-BNERGX6I.js} +1 -655
  16. package/dist/{chunk-KQBEYBS7.js → chunk-BNV64O5L.js} +2 -2
  17. package/dist/{chunk-T7BALDKJ.js → chunk-C22PXFKF.js} +5 -5
  18. package/dist/{chunk-RZVF4LHT.js → chunk-CUMWQELT.js} +41 -3
  19. package/dist/{chunk-6QZSAZZ3.mjs → chunk-DJYOYWNY.mjs} +2 -2
  20. package/dist/{chunk-Q2HYWACQ.mjs → chunk-DMJKKHEC.mjs} +2 -2
  21. package/dist/{chunk-SPXJBMLY.js → chunk-DYDIVZRW.js} +5 -5
  22. package/dist/{chunk-BWGJVRAS.js → chunk-EDMNYJEB.js} +7 -9
  23. package/dist/{chunk-SITFTWPY.mjs → chunk-EHAI3NXN.mjs} +1 -1
  24. package/dist/{chunk-AMW7VHFM.mjs → chunk-EQ3664ZD.mjs} +2 -2
  25. package/dist/{chunk-FYXWAGK3.js → chunk-F6X43VUX.js} +1 -4
  26. package/dist/{chunk-UYSJG2E5.mjs → chunk-FCRAGTW6.mjs} +4 -2
  27. package/dist/{chunk-7HWV6U3E.mjs → chunk-HLMSVHZY.mjs} +2 -2
  28. package/dist/{chunk-X5VIC7HP.js → chunk-KF6AKLGE.js} +2 -2
  29. package/dist/{chunk-MJMN2T4N.mjs → chunk-KHT5W6AJ.mjs} +0 -3
  30. package/dist/{chunk-I2GT7ECM.mjs → chunk-M6IYTP2T.mjs} +1 -1
  31. package/dist/{chunk-7CA3TDXD.js → chunk-M75P2EGZ.js} +2 -2
  32. package/dist/{chunk-5HUW3BTP.mjs → chunk-MLF7ZQBW.mjs} +4 -2
  33. package/dist/{chunk-H5NKKUPV.js → chunk-MNQIKYEB.js} +5 -5
  34. package/dist/{chunk-EYXDS7SG.js → chunk-MSCI7LQ2.js} +4 -4
  35. package/dist/chunk-N63KWRTH.mjs +685 -0
  36. package/dist/{chunk-WGDJV4SH.js → chunk-ON5324R7.js} +2 -2
  37. package/dist/{chunk-RJRBED5Q.js → chunk-QWRE2UFS.js} +17 -15
  38. package/dist/{chunk-U65XVJ4Y.mjs → chunk-R2WP5YDO.mjs} +7 -9
  39. package/dist/{chunk-S5Z4QGF3.js → chunk-S2JDNKK6.js} +9 -9
  40. package/dist/{chunk-I5MSPQMO.js → chunk-SMRFUKN7.js} +5 -5
  41. package/dist/{chunk-54FVHKCU.js → chunk-TSP73RLP.js} +2 -2
  42. package/dist/{chunk-GNOIETZR.js → chunk-TVH6TDED.js} +5 -5
  43. package/dist/{chunk-AJ3C2EDW.js → chunk-VUSG5IWM.js} +22 -20
  44. package/dist/{chunk-PCVYQGOH.mjs → chunk-W2RLHQ24.mjs} +1 -1
  45. package/dist/{chunk-2M22JVJQ.mjs → chunk-WLB7XVWW.mjs} +9 -663
  46. package/dist/{chunk-MF6VZSIO.mjs → chunk-XOKT6TQL.mjs} +2 -2
  47. package/dist/{chunk-KP4RPOBI.mjs → chunk-Y5UH66KY.mjs} +2 -2
  48. package/dist/{chunk-IZN2IVJ4.js → chunk-Y7JE33K2.js} +2 -2
  49. package/dist/{chunk-J6OXY3KI.mjs → chunk-YTHGOOKO.mjs} +5 -3
  50. package/dist/{chunk-EZPQKO5C.mjs → chunk-ZASRR3NW.mjs} +1 -1
  51. package/dist/{executor-B3lwM9GM.d.mts → executor-0ivVjqma.d.mts} +8 -0
  52. package/dist/{executor-B3lwM9GM.d.ts → executor-0ivVjqma.d.ts} +8 -0
  53. package/dist/executors.d.mts +1 -1
  54. package/dist/executors.d.ts +1 -1
  55. package/dist/executors.js +17 -16
  56. package/dist/executors.mjs +16 -15
  57. package/dist/generators.js +13 -12
  58. package/dist/generators.mjs +14 -13
  59. package/dist/index.d.mts +2 -2
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.js +29 -39
  62. package/dist/index.mjs +38 -48
  63. package/dist/src/base/base-executor.js +4 -3
  64. package/dist/src/base/base-executor.mjs +3 -2
  65. package/dist/src/base/base-generator.js +4 -3
  66. package/dist/src/base/base-generator.mjs +3 -2
  67. package/dist/src/base/index.js +7 -6
  68. package/dist/src/base/index.mjs +6 -5
  69. package/dist/src/executors/cargo-build/executor.js +5 -4
  70. package/dist/src/executors/cargo-build/executor.mjs +4 -3
  71. package/dist/src/executors/cargo-check/executor.js +5 -4
  72. package/dist/src/executors/cargo-check/executor.mjs +4 -3
  73. package/dist/src/executors/cargo-clippy/executor.js +5 -4
  74. package/dist/src/executors/cargo-clippy/executor.mjs +4 -3
  75. package/dist/src/executors/cargo-doc/executor.js +5 -4
  76. package/dist/src/executors/cargo-doc/executor.mjs +4 -3
  77. package/dist/src/executors/cargo-format/executor.js +5 -4
  78. package/dist/src/executors/cargo-format/executor.mjs +4 -3
  79. package/dist/src/executors/cargo-publish/executor.js +6 -3
  80. package/dist/src/executors/cargo-publish/executor.mjs +5 -2
  81. package/dist/src/executors/clean-package/executor.js +6 -5
  82. package/dist/src/executors/clean-package/executor.mjs +3 -2
  83. package/dist/src/executors/esbuild/executor.js +5 -4
  84. package/dist/src/executors/esbuild/executor.mjs +4 -3
  85. package/dist/src/executors/npm-publish/executor.d.mts +1 -1
  86. package/dist/src/executors/npm-publish/executor.d.ts +1 -1
  87. package/dist/src/executors/npm-publish/executor.js +3 -3
  88. package/dist/src/executors/npm-publish/executor.mjs +2 -2
  89. package/dist/src/executors/npm-publish/schema.d.ts +8 -0
  90. package/dist/src/executors/npm-publish/schema.json +6 -0
  91. package/dist/src/executors/npm-publish/untyped.js +7 -0
  92. package/dist/src/executors/npm-publish/untyped.mjs +7 -0
  93. package/dist/src/executors/size-limit/executor.js +5 -4
  94. package/dist/src/executors/size-limit/executor.mjs +4 -3
  95. package/dist/src/executors/typia/executor.js +5 -4
  96. package/dist/src/executors/typia/executor.mjs +4 -3
  97. package/dist/src/executors/unbuild/executor.js +5 -4
  98. package/dist/src/executors/unbuild/executor.mjs +4 -3
  99. package/dist/src/generators/browser-library/generator.js +7 -6
  100. package/dist/src/generators/browser-library/generator.mjs +6 -5
  101. package/dist/src/generators/config-schema/generator.js +5 -4
  102. package/dist/src/generators/config-schema/generator.mjs +4 -3
  103. package/dist/src/generators/neutral-library/generator.js +7 -6
  104. package/dist/src/generators/neutral-library/generator.mjs +6 -5
  105. package/dist/src/generators/node-library/generator.js +7 -6
  106. package/dist/src/generators/node-library/generator.mjs +6 -5
  107. package/dist/src/generators/preset/generator.js +5 -4
  108. package/dist/src/generators/preset/generator.mjs +4 -3
  109. package/dist/src/generators/release-version/generator.js +5 -4
  110. package/dist/src/generators/release-version/generator.mjs +4 -3
  111. package/dist/src/utils/cargo.d.mts +1 -1
  112. package/dist/src/utils/cargo.d.ts +1 -1
  113. package/dist/src/utils/index.d.mts +1 -1
  114. package/dist/src/utils/index.d.ts +1 -1
  115. package/dist/src/utils/index.js +8 -18
  116. package/dist/src/utils/index.mjs +15 -25
  117. package/dist/src/utils/package-helpers.d.mts +1 -1
  118. package/dist/src/utils/package-helpers.d.ts +1 -1
  119. package/dist/src/utils/package-helpers.js +6 -3
  120. package/dist/src/utils/package-helpers.mjs +5 -2
  121. package/dist/src/utils/pnpm-deps-update.js +2 -2
  122. package/dist/src/utils/pnpm-deps-update.mjs +1 -1
  123. package/dist/{src/utils/toml.d.ts → toml-C0imOcwz.d.mts} +1 -8
  124. package/dist/{src/utils/toml.d.mts → toml-C0imOcwz.d.ts} +1 -8
  125. package/docs/api/executors/npm-publish/schema.md +9 -0
  126. package/package.json +4 -4
  127. package/dist/src/base/base-executor.schema.d.ts +0 -17
  128. package/dist/src/base/base-executor.schema.json +0 -19
  129. package/dist/src/base/base-executor.schema.md +0 -16
  130. package/dist/src/base/base-generator.schema.d.ts +0 -14
  131. package/dist/src/base/base-generator.schema.json +0 -15
  132. package/dist/src/base/base-generator.schema.md +0 -15
  133. package/dist/src/base/cargo-base-executor.schema.d.ts +0 -89
  134. package/dist/src/base/cargo-base-executor.schema.json +0 -88
  135. package/dist/src/base/cargo-base-executor.schema.md +0 -90
  136. package/dist/src/base/typescript-build-executor.schema.d.ts +0 -135
  137. package/dist/src/base/typescript-build-executor.schema.json +0 -178
  138. package/dist/src/base/typescript-build-executor.schema.md +0 -126
  139. package/dist/src/base/typescript-library-generator.schema.d.ts +0 -122
  140. package/dist/src/base/typescript-library-generator.schema.json +0 -119
  141. package/dist/src/base/typescript-library-generator.schema.md +0 -129
  142. package/dist/src/executors/cargo-build/schema.md +0 -89
  143. package/dist/src/executors/cargo-check/schema.md +0 -90
  144. package/dist/src/executors/cargo-clippy/schema.md +0 -99
  145. package/dist/src/executors/cargo-doc/schema.md +0 -130
  146. package/dist/src/executors/cargo-format/schema.md +0 -90
  147. package/dist/src/executors/cargo-publish/schema.md +0 -117
  148. package/dist/src/executors/clean-package/schema.md +0 -65
  149. package/dist/src/executors/esbuild/schema.md +0 -126
  150. package/dist/src/executors/npm-publish/schema.md +0 -64
  151. package/dist/src/executors/size-limit/schema.md +0 -25
  152. package/dist/src/executors/typia/schema.md +0 -46
  153. package/dist/src/executors/unbuild/schema.md +0 -222
  154. package/dist/src/generators/browser-library/schema.md +0 -129
  155. package/dist/src/generators/config-schema/schema.md +0 -25
  156. package/dist/src/generators/init/schema.md +0 -15
  157. package/dist/src/generators/neutral-library/schema.md +0 -129
  158. package/dist/src/generators/node-library/schema.md +0 -129
  159. package/dist/src/generators/preset/schema.md +0 -110
  160. package/dist/src/generators/release-version/schema.md +0 -160
  161. package/dist/src/plugins/typescript/untyped-schema.ts +0 -192
  162. package/dist/src/utils/toml.js +0 -15
  163. package/dist/src/utils/toml.mjs +0 -15
  164. package/dist/{chunk-3EDSGFA5.mjs → chunk-3PTWOMU2.mjs} +3 -3
  165. package/dist/{chunk-XCVH63OO.mjs → chunk-6YZ3OUJB.mjs} +0 -0
  166. package/dist/{chunk-DO2X7OZO.js → chunk-JGP4YWZY.js} +0 -0
  167. package/dist/{chunk-J4DYXH46.js → chunk-U3YH5M4L.js} +2 -2
@@ -1,129 +0,0 @@
1
-
2
- <!-- Generated by @storm-software/untyped -->
3
- <!-- Do not edit this file directly -->
4
-
5
- # Neutral Library Generator
6
-
7
- ## `directory`
8
- - **Type**: `string`
9
-
10
- > Directory
11
-
12
-
13
- The directory to create the library in
14
-
15
-
16
- ## `name`
17
- - **Type**: `string`
18
-
19
- > Name
20
-
21
-
22
- The name of the library
23
-
24
-
25
- ## `description`
26
- - **Type**: `string`
27
-
28
- > Description
29
-
30
-
31
- The description of the library
32
-
33
-
34
- ## `buildExecutor`
35
- - **Type**: `string`
36
- - **Default**: `"@storm-software/workspace-tools:unbuild"`
37
-
38
- > Build Executor
39
-
40
-
41
- The executor to use for building the library
42
-
43
-
44
- ## `platform`
45
- - **Type**: `string`
46
- - **Default**: `"neutral"`
47
-
48
- > Platform
49
-
50
-
51
- The platform to target with the library
52
-
53
-
54
- ## `importPath`
55
- - **Type**: `string`
56
-
57
- > Import Path
58
-
59
-
60
- The import path for the library
61
-
62
-
63
- ## `tags`
64
- - **Type**: `string`
65
-
66
- > Tags
67
-
68
-
69
- The tags for the library
70
-
71
-
72
- ## `unitTestRunner`
73
- - **Type**: `string`
74
-
75
- > Unit Test Runner
76
-
77
-
78
- The unit test runner to use
79
-
80
-
81
- ## `testEnvironment`
82
- - **Type**: `string`
83
-
84
- > Test Environment
85
-
86
-
87
- The test environment to use
88
-
89
-
90
- ## `pascalCaseFiles`
91
- - **Type**: `boolean`
92
- - **Default**: `false`
93
-
94
- > Pascal Case Files
95
-
96
-
97
- Use PascalCase for file names
98
-
99
-
100
- ## `strict`
101
- - **Type**: `boolean`
102
- - **Default**: `true`
103
-
104
- > Strict
105
-
106
-
107
- Enable strict mode
108
-
109
-
110
- ## `publishable`
111
- - **Type**: `boolean`
112
- - **Default**: `false`
113
-
114
- > Publishable
115
-
116
-
117
- Make the library publishable
118
-
119
-
120
- ## `buildable`
121
- - **Type**: `boolean`
122
- - **Default**: `true`
123
-
124
- > Buildable
125
-
126
-
127
- Make the library buildable
128
-
129
-
@@ -1,129 +0,0 @@
1
-
2
- <!-- Generated by @storm-software/untyped -->
3
- <!-- Do not edit this file directly -->
4
-
5
- # Node Library Generator
6
-
7
- ## `directory`
8
- - **Type**: `string`
9
-
10
- > Directory
11
-
12
-
13
- The directory to create the library in
14
-
15
-
16
- ## `name`
17
- - **Type**: `string`
18
-
19
- > Name
20
-
21
-
22
- The name of the library
23
-
24
-
25
- ## `description`
26
- - **Type**: `string`
27
-
28
- > Description
29
-
30
-
31
- The description of the library
32
-
33
-
34
- ## `buildExecutor`
35
- - **Type**: `string`
36
- - **Default**: `"@storm-software/workspace-tools:unbuild"`
37
-
38
- > Build Executor
39
-
40
-
41
- The executor to use for building the library
42
-
43
-
44
- ## `platform`
45
- - **Type**: `string`
46
- - **Default**: `"node"`
47
-
48
- > Platform
49
-
50
-
51
- The platform to target with the library
52
-
53
-
54
- ## `importPath`
55
- - **Type**: `string`
56
-
57
- > Import Path
58
-
59
-
60
- The import path for the library
61
-
62
-
63
- ## `tags`
64
- - **Type**: `string`
65
-
66
- > Tags
67
-
68
-
69
- The tags for the library
70
-
71
-
72
- ## `unitTestRunner`
73
- - **Type**: `string`
74
-
75
- > Unit Test Runner
76
-
77
-
78
- The unit test runner to use
79
-
80
-
81
- ## `testEnvironment`
82
- - **Type**: `string`
83
-
84
- > Test Environment
85
-
86
-
87
- The test environment to use
88
-
89
-
90
- ## `pascalCaseFiles`
91
- - **Type**: `boolean`
92
- - **Default**: `false`
93
-
94
- > Pascal Case Files
95
-
96
-
97
- Use PascalCase for file names
98
-
99
-
100
- ## `strict`
101
- - **Type**: `boolean`
102
- - **Default**: `true`
103
-
104
- > Strict
105
-
106
-
107
- Enable strict mode
108
-
109
-
110
- ## `publishable`
111
- - **Type**: `boolean`
112
- - **Default**: `false`
113
-
114
- > Publishable
115
-
116
-
117
- Make the library publishable
118
-
119
-
120
- ## `buildable`
121
- - **Type**: `boolean`
122
- - **Default**: `true`
123
-
124
- > Buildable
125
-
126
-
127
- Make the library buildable
128
-
129
-
@@ -1,110 +0,0 @@
1
-
2
- <!-- Generated by @storm-software/untyped -->
3
- <!-- Do not edit this file directly -->
4
-
5
- # Preset Generator
6
-
7
- ## `directory`
8
- - **Type**: `string`
9
-
10
- > Directory
11
-
12
-
13
- The directory to create the library in
14
-
15
-
16
- ## `name`
17
- - **Type**: `string`
18
-
19
- > Name
20
-
21
-
22
- The name of the workspace
23
-
24
-
25
- ## `organization`
26
- - **Type**: `string`
27
- - **Default**: `"storm-software"`
28
-
29
- > Organization
30
-
31
-
32
- The organization of the workspace
33
-
34
-
35
- ## `includeApps`
36
- - **Type**: `boolean`
37
- - **Default**: `true`
38
-
39
- > Include Apps
40
-
41
-
42
- Include apps in the workspace
43
-
44
-
45
- ## `includeRust`
46
- - **Type**: `boolean`
47
- - **Default**: `false`
48
-
49
- > Include Rust
50
-
51
-
52
- Include Rust support in the workspace
53
-
54
-
55
- ## `namespace`
56
- - **Type**: `string`
57
- - **Default**: `"storm-software"`
58
-
59
- > Namespace
60
-
61
-
62
- The namespace of the workspace
63
-
64
-
65
- ## `description`
66
- - **Type**: `string`
67
-
68
- > Description
69
-
70
-
71
- The description of the workspace
72
-
73
-
74
- ## `repositoryUrl`
75
- - **Type**: `string`
76
-
77
- > Repository URL
78
-
79
-
80
- The URL of the repository
81
-
82
-
83
- ## `nxCloud`
84
- - **Type**: `string`
85
-
86
- > Nx Cloud
87
-
88
-
89
- Nx Cloud configuration
90
-
91
-
92
- ## `mode`
93
- - **Type**: `string`
94
-
95
- > Mode
96
-
97
-
98
- The mode of the Nx client
99
-
100
-
101
- ## `packageManager`
102
- - **Type**: `string`
103
- - **Default**: `"pnpm"`
104
-
105
- > Package Manager
106
-
107
-
108
- The package manager to use
109
-
110
-
@@ -1,160 +0,0 @@
1
-
2
- <!-- Generated by @storm-software/untyped -->
3
- <!-- Do not edit this file directly -->
4
-
5
- # Release Version Generator
6
-
7
- ## `projects`
8
- - **Type**: `array`
9
-
10
- > Projects
11
-
12
-
13
- The projects to release
14
-
15
-
16
- ## `releaseGroup`
17
-
18
- ## `projectGraph`
19
-
20
- ## `specifier`
21
- - **Type**: `string`
22
-
23
- > Specifier
24
-
25
-
26
- The specifier
27
-
28
-
29
- ## `specifierSource`
30
- - **Type**: `string`
31
-
32
- > Specifier Source
33
-
34
-
35
- The specifier source
36
-
37
-
38
- ## `preid`
39
- - **Type**: `string`
40
-
41
- > Preid
42
-
43
-
44
- The preid
45
-
46
-
47
- ## `packageRoot`
48
- - **Type**: `string`
49
-
50
- > Package Root
51
-
52
-
53
- The package root
54
-
55
-
56
- ## `currentVersionResolver`
57
- - **Type**: `string`
58
- - **Default**: `"git-tag"`
59
-
60
- > Current Version Resolver
61
-
62
-
63
- The current version resolver
64
-
65
-
66
- ## `currentVersionResolverMetadata`
67
-
68
- ## `fallbackCurrentVersionResolver`
69
- - **Type**: `string`
70
- - **Default**: `"disk"`
71
-
72
- > Fallback Current Version Resolver
73
-
74
-
75
- The fallback current version resolver
76
-
77
-
78
- ## `firstRelease`
79
- - **Type**: `boolean`
80
-
81
- > First Release
82
-
83
-
84
- Release the first version
85
-
86
-
87
- ## `versionPrefix`
88
- - **Type**: `string`
89
-
90
- > Version Prefix
91
-
92
-
93
- The version prefix
94
-
95
-
96
- ## `skipLockFileUpdate`
97
- - **Type**: `boolean`
98
-
99
- > Skip Lock File Update
100
-
101
-
102
- Skip lock file update
103
-
104
-
105
- ## `installArgs`
106
- - **Type**: `string`
107
-
108
- > Install Args
109
-
110
-
111
- The install arguments
112
-
113
-
114
- ## `installIgnoreScripts`
115
- - **Type**: `boolean`
116
-
117
- > Install Ignore Scripts
118
-
119
-
120
- Ignore scripts
121
-
122
-
123
- ## `conventionalCommitsConfig`
124
-
125
- ## `deleteVersionPlans`
126
- - **Type**: `boolean`
127
-
128
- > Delete Version Plans
129
-
130
-
131
- Delete version plans
132
-
133
-
134
- ## `updateDependents`
135
- - **Type**: `string`
136
-
137
- > Update Dependents
138
-
139
-
140
- Update dependents
141
-
142
-
143
- ## `logUnchangedProjects`
144
- - **Type**: `boolean`
145
-
146
- > Log Unchanged Projects
147
-
148
-
149
- Log unchanged projects
150
-
151
-
152
- ## `preserveLocalDependencyProtocols`
153
- - **Type**: `boolean`
154
-
155
- > Preserve Local Dependency Protocols
156
-
157
-
158
- Preserve local dependency protocols
159
-
160
-
@@ -1,192 +0,0 @@
1
- import {
2
- createNodesFromFiles,
3
- CreateNodesResultV2,
4
- CreateNodesV2,
5
- readJsonFile
6
- } from "@nx/devkit";
7
- import { existsSync } from "node:fs";
8
- import { dirname, join } from "node:path";
9
- import { readNxJson } from "nx/src/config/nx-json.js";
10
- import type { ProjectConfiguration } from "nx/src/config/workspace-json-project-json";
11
- import {
12
- readTargetsFromPackageJson,
13
- type PackageJson
14
- } from "nx/src/utils/package-json";
15
- import { addProjectTag, ProjectTagConstants } from "../../utils/project-tags";
16
-
17
- export const name = "storm-software/typescript/untyped";
18
-
19
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
20
- export type UntypedPluginOptions = {};
21
-
22
- export const createNodesV2: CreateNodesV2<UntypedPluginOptions> = [
23
- "**/*untyped.ts",
24
- async (configFiles, options, context): Promise<CreateNodesResultV2> => {
25
- return await createNodesFromFiles(
26
- (configFile, options, context) => {
27
- try {
28
- console.log(`Processing untyped schema file: ${configFile}`);
29
-
30
- const projectRoot = createProjectRoot(
31
- configFile,
32
- context.workspaceRoot
33
- );
34
- if (!projectRoot) {
35
- console.error(
36
- "No project.json found in parent directories of Untyped schema file: ",
37
- configFile
38
- );
39
-
40
- return {};
41
- }
42
-
43
- const packageJson = readJsonFile(join(projectRoot, "package.json"));
44
- if (!packageJson) {
45
- console.error(
46
- `No package.json found in project root: ${projectRoot}`
47
- );
48
- return {};
49
- }
50
-
51
- if (
52
- !packageJson.devDependencies?.untyped &&
53
- !packageJson.dependencies?.untyped
54
- ) {
55
- console.warn(
56
- `No "untyped" dependency or devDependency found in package.json: ${configFile}
57
- Please add it to your dependencies by running "pnpm add untyped -D --filter="${packageJson.name}"`
58
- );
59
- }
60
-
61
- const project = createProjectFromPackageJsonNextToProjectJson(
62
- join(projectRoot, "project.json"),
63
- packageJson
64
- );
65
-
66
- const nxJson = readNxJson(context.workspaceRoot);
67
- const targets: ProjectConfiguration["targets"] =
68
- readTargetsFromPackageJson(
69
- packageJson as PackageJson,
70
- nxJson,
71
- project.root,
72
- context.workspaceRoot
73
- );
74
-
75
- let relativeRoot = projectRoot
76
- .replaceAll("\\", "/")
77
- .replace(context.workspaceRoot.replaceAll("\\", "/"), "");
78
- if (relativeRoot.startsWith("/")) {
79
- relativeRoot = relativeRoot.slice(1);
80
- }
81
-
82
- let relativeConfig = configFile.replaceAll(relativeRoot, "");
83
- while (relativeConfig.startsWith(".")) {
84
- relativeConfig = relativeConfig.slice(1);
85
- }
86
- while (relativeConfig.startsWith("/")) {
87
- relativeConfig = relativeConfig.slice(1);
88
- }
89
-
90
- targets["build-untyped"] ??= {
91
- cache: true,
92
- executor: "nx:run-commands",
93
- dependsOn: ["clean", "^build"],
94
- inputs: [
95
- "{projectRoot}/src/**/untyped.ts",
96
- "{projectRoot}/src/**/*.untyped.ts"
97
- ],
98
- outputs: [
99
- "{projectRoot}/src/**/schema.d.ts",
100
- "{projectRoot}/src/**/*.schema.d.ts",
101
- "{projectRoot}/src/**/schema.md",
102
- "{projectRoot}/src/**/*.schema.md",
103
- "{projectRoot}/src/**/schema.json",
104
- "{projectRoot}/src/**/*.schema.json"
105
- ],
106
- options: {
107
- commands: [
108
- `storm-untyped generate --entry=\\"${projectRoot}/**/{untyped.ts,*.untyped.ts}\\" `
109
- ]
110
- }
111
- };
112
-
113
- addProjectTag(project, ProjectTagConstants.Plugin.TAG_ID, name);
114
-
115
- const result = project?.name
116
- ? {
117
- projects: {
118
- [project.name]: {
119
- ...project,
120
- root: relativeRoot,
121
- targets
122
- }
123
- }
124
- }
125
- : {};
126
- console.log(
127
- `[storm-software/typescript/untyped]: Inferred Nx configuration for ${project?.name ?? "missing name"}`
128
- );
129
-
130
- return result;
131
- } catch (e) {
132
- console.error(e);
133
- return {};
134
- }
135
- },
136
- configFiles,
137
- options,
138
- context
139
- );
140
- }
141
- ];
142
-
143
- function createProjectFromPackageJsonNextToProjectJson(
144
- projectJsonPath: string,
145
- packageJson: PackageJson
146
- ): ProjectConfiguration {
147
- const { nx, name } = packageJson;
148
- const root = dirname(projectJsonPath);
149
- const projectJson = readJsonFile(projectJsonPath);
150
-
151
- return {
152
- targets: {},
153
- tags: [],
154
- name,
155
- ...nx,
156
- ...projectJson,
157
- root
158
- } as ProjectConfiguration;
159
- }
160
-
161
- function createProjectRoot(
162
- configPath: string,
163
- workspaceRoot: string
164
- ): string | null {
165
- try {
166
- let root = dirname(configPath);
167
- while (
168
- root &&
169
- root !== "/" &&
170
- root !== workspaceRoot &&
171
- !existsSync(join(root, "project.json"))
172
- ) {
173
- root = join(root, "..");
174
- }
175
- if (!existsSync(join(root, "project.json"))) {
176
- return null;
177
- }
178
-
179
- const projectRoot = join(workspaceRoot, root);
180
- if (
181
- !existsSync(join(projectRoot, "package.json")) &&
182
- !existsSync(join(projectRoot, "project.json"))
183
- ) {
184
- return null;
185
- }
186
-
187
- return projectRoot;
188
- } catch (e) {
189
- console.error(e);
190
- return null;
191
- }
192
- }
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
- var _chunkBWGJVRASjs = require('../../chunk-BWGJVRAS.js');
8
- require('../../chunk-3RG5ZIWI.js');
9
-
10
-
11
-
12
-
13
-
14
-
15
- exports.modifyCargoNestedTable = _chunkBWGJVRASjs.modifyCargoNestedTable; exports.modifyCargoTable = _chunkBWGJVRASjs.modifyCargoTable; exports.parseCargoToml = _chunkBWGJVRASjs.parseCargoToml; exports.parseCargoTomlWithTree = _chunkBWGJVRASjs.parseCargoTomlWithTree; exports.stringifyCargoToml = _chunkBWGJVRASjs.stringifyCargoToml;