@storm-software/workspace-tools 1.118.0 → 1.120.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 (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +43 -8
  3. package/declarations.d.ts +66 -0
  4. package/executors.json +5 -0
  5. package/index.js +11989 -5321
  6. package/meta.json +1 -1
  7. package/package.json +3 -1
  8. package/packages/config/src/schema.d.ts +2 -2
  9. package/packages/workspace-tools/index.d.ts +2 -0
  10. package/packages/workspace-tools/src/base/base-executor.d.ts +2 -4
  11. package/packages/workspace-tools/src/base/typescript-library-generator.d.ts +2 -14
  12. package/packages/workspace-tools/src/executors/clean-package/constants.d.ts +4 -0
  13. package/packages/workspace-tools/src/executors/clean-package/executor.d.ts +8 -0
  14. package/packages/workspace-tools/src/executors/clean-package/types.d.ts +8 -0
  15. package/packages/workspace-tools/src/executors/clean-package/utils.d.ts +4 -0
  16. package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +1 -3
  17. package/packages/workspace-tools/src/executors/tsup/executor.d.ts +1 -3
  18. package/packages/workspace-tools/src/executors/tsup-browser/executor.d.ts +1 -3
  19. package/packages/workspace-tools/src/executors/tsup-neutral/executor.d.ts +1 -3
  20. package/packages/workspace-tools/src/executors/tsup-node/executor.d.ts +1 -3
  21. package/packages/workspace-tools/src/executors/typia/executor.d.ts +1 -3
  22. package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +1 -3
  23. package/packages/workspace-tools/src/generators/browser-library/generator.d.ts +1 -1
  24. package/packages/workspace-tools/src/generators/neutral-library/generator.d.ts +1 -1
  25. package/packages/workspace-tools/src/generators/node-library/generator.d.ts +1 -1
  26. package/packages/workspace-tools/src/plugins/typescript/project-config.d.ts +1 -1
  27. package/packages/workspace-tools/src/utils/index.d.ts +1 -0
  28. package/packages/workspace-tools/src/utils/project-tags.d.ts +30 -0
  29. package/src/base/index.js +4 -2
  30. package/src/executors/clean-package/executor.js +80083 -0
  31. package/src/executors/clean-package/schema.d.ts +10 -0
  32. package/src/executors/clean-package/schema.json +41 -0
  33. package/src/executors/rolldown/executor.js +4 -2
  34. package/src/executors/tsup/executor.js +4 -2
  35. package/src/executors/tsup-browser/executor.js +4 -2
  36. package/src/executors/tsup-neutral/executor.js +4 -2
  37. package/src/executors/tsup-node/executor.js +4 -2
  38. package/src/executors/typia/executor.js +4 -2
  39. package/src/executors/unbuild/executor.js +4 -2
  40. package/src/generators/browser-library/generator.js +10 -3
  41. package/src/generators/config-schema/generator.js +2 -1
  42. package/src/generators/neutral-library/generator.js +2 -1
  43. package/src/generators/neutral-library/schema.d.ts +1 -1
  44. package/src/generators/node-library/generator.js +5 -2
  45. package/src/generators/preset/files/.github/workflows/dependabot-update.yml +32 -0
  46. package/src/generators/preset/generator.js +2 -1
  47. package/src/generators/release-version/generator.js +2 -1
  48. package/src/plugins/rust/index.js +90 -7
  49. package/src/plugins/typescript/index.js +100 -1
  50. package/src/utils/index.js +87 -1
  51. package/src/generators/preset/files/.github/workflows/dependabot-approve.yml +0 -24
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 1.120.0 (2024-07-19)
2
+
3
+
4
+ ### Features
5
+
6
+ - **workspace-tools:** Added tag population to the workspace plugins ([f473de63](https://github.com/storm-software/storm-ops/commit/f473de63))
7
+
8
+ ## 1.119.0 (2024-07-19)
9
+
10
+
11
+ ### Features
12
+
13
+ - **workspace-tools:** Added the `clean-package` executor ([a1763e45](https://github.com/storm-software/storm-ops/commit/a1763e45))
14
+
15
+ - **config:** Updated `workspaceRoot` with a default value ([5ee3fb09](https://github.com/storm-software/storm-ops/commit/5ee3fb09))
16
+
1
17
  ## 1.118.0 (2024-07-19)
2
18
 
3
19
 
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.116.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-1.118.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
@@ -70,23 +70,26 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
70
70
  - [Unbuild Builder](#unbuild-builder)
71
71
  - [Example](#example-8)
72
72
  - [Options](#options-6)
73
+ - [Clean Publish Executor](#clean-publish-executor)
74
+ - [Example](#example-9)
75
+ - [Options](#options-7)
73
76
  - [Generators](#generators)
74
77
  - [Init Storm Workspace Plugin](#init-storm-workspace-plugin)
75
- - [Options](#options-7)
78
+ - [Options](#options-8)
76
79
  - [Workspace Preset](#workspace-preset)
77
80
  - [Examples](#examples)
78
- - [Options](#options-8)
79
- - [Add Node Library](#add-node-library)
80
81
  - [Options](#options-9)
81
- - [Configuration Schema Creator](#configuration-schema-creator)
82
+ - [Add Node Library](#add-node-library)
82
83
  - [Options](#options-10)
83
- - [Add Neutral Library](#add-neutral-library)
84
+ - [Configuration Schema Creator](#configuration-schema-creator)
84
85
  - [Options](#options-11)
85
- - [Add browser Library](#add-browser-library)
86
+ - [Add Neutral Library](#add-neutral-library)
86
87
  - [Options](#options-12)
88
+ - [Add browser Library](#add-browser-library)
89
+ - [Options](#options-13)
87
90
  - [design-tokens](#design-tokens)
88
91
  - [Storm Release Version Generator](#storm-release-version-generator)
89
- - [Options](#options-13)
92
+ - [Options](#options-14)
90
93
  - [Building](#building)
91
94
  - [Running unit tests](#running-unit-tests)
92
95
  - [Storm Workspaces](#storm-workspaces)
@@ -427,6 +430,38 @@ The following executor options are available:
427
430
 
428
431
 
429
432
 
433
+ ## Clean Publish Executor
434
+
435
+ Remove configuration files, fields, and scripts for development before publishing package. This tool is inspired by the [clean-publish](https://github.com/shashkovdanil/clean-publish/tree/master) package
436
+
437
+ ### Example
438
+
439
+ This executor can be used by executing the following in a command line utility:
440
+
441
+ ```cmd
442
+ nx run my-project:clean-package
443
+ ```
444
+
445
+ **Please note:** _The clean-package executor should be included in the desired projects's `project.json` file.All required options must be included in the `options` property of the json._
446
+
447
+ ### Options
448
+
449
+ The following executor options are available:
450
+
451
+ | Option | Type | Description | Default |
452
+ | --------- | ------ | ------------- | --------- |
453
+ | **outputPath \*** | `string` | The output path of the generated files. | "dist/{projectRoot}" |
454
+ | packageJsonPath | `string` | The path to the package.json file, relative to the workspace root. | |
455
+ | **cleanReadMe \*** | `boolean` | Should API Extractor generate an TSDoc Metadata file. | `true` |
456
+ | **cleanComments \*** | `boolean` | Should API Extractor generate an TSDoc Metadata file. | `true` |
457
+ | ignoredFiles | `string` | List of ESBuild plugins to use during processing | |
458
+ | fields | `string` | List of ESBuild plugins to use during processing | |
459
+
460
+
461
+ **Please note:** _Option names followed by \* above are required, and must be provided to run the executor._
462
+
463
+
464
+
430
465
  <!-- markdownlint-restore -->
431
466
  <!-- prettier-ignore-end -->
432
467
 
package/declarations.d.ts CHANGED
@@ -190,3 +190,69 @@ declare function typeScriptLibraryGeneratorFn(
190
190
  schema: TypeScriptLibraryGeneratorSchema
191
191
  ): Promise<any>;
192
192
  export { typeScriptLibraryGeneratorFn };
193
+
194
+ export type ProjectTagVariant = "language" | "type" | "dist-style" | "provider";
195
+ export const ProjectTagVariant = {
196
+ LANGUAGE: "language" as ProjectTagVariant,
197
+ TYPE: "type" as ProjectTagVariant,
198
+ DIST_STYLE: "dist-style" as ProjectTagVariant,
199
+ PROVIDER: "provider" as ProjectTagVariant
200
+ };
201
+
202
+ export type ProjectTagLanguageValue = "typescript" | "rust";
203
+ export const ProjectTagLanguageValue = {
204
+ TYPESCRIPT: "typescript" as ProjectTagLanguageValue,
205
+ RUST: "rust" as ProjectTagLanguageValue
206
+ };
207
+
208
+ export type ProjectTagTypeValue = "library" | "application";
209
+ export const ProjectTagTypeValue = {
210
+ LIBRARY: "library" as ProjectTagTypeValue,
211
+ APPLICATION: "application" as ProjectTagTypeValue
212
+ };
213
+
214
+ export type ProjectTagDistStyleValue = "normal" | "clean";
215
+ export const ProjectTagDistStyleValue = {
216
+ NORMAL: "normal" as ProjectTagDistStyleValue,
217
+ CLEAN: "clean" as ProjectTagDistStyleValue
218
+ };
219
+
220
+ declare function formatProjectTag(
221
+ variant: ProjectTagVariant,
222
+ value: string
223
+ ): string;
224
+ export { formatProjectTag };
225
+
226
+ declare function hasProjectTag(
227
+ project: ProjectConfiguration,
228
+ variant: ProjectTagVariant
229
+ ): boolean;
230
+ export { hasProjectTag };
231
+
232
+ declare function getProjectTag(
233
+ project: ProjectConfiguration,
234
+ variant: ProjectTagVariant
235
+ ): string | undefined;
236
+ export { getProjectTag };
237
+
238
+ declare function isEqualProjectTag(
239
+ project: ProjectConfiguration,
240
+ variant: ProjectTagVariant,
241
+ value: string
242
+ ): boolean;
243
+ export { isEqualProjectTag };
244
+
245
+ declare function addProjectTag(
246
+ project: ProjectConfiguration,
247
+ variant: ProjectTagVariant,
248
+ value: string,
249
+ options: {
250
+ overwrite?: boolean;
251
+ } = {
252
+ overwrite: false
253
+ }
254
+ ): void;
255
+ export { addProjectTag };
256
+
257
+ declare function setDefaultProjectTags(project: ProjectConfiguration): void;
258
+ export { setDefaultProjectTags };
package/executors.json CHANGED
@@ -45,6 +45,11 @@
45
45
  "implementation": "./src/executors/unbuild/executor",
46
46
  "schema": "./src/executors/unbuild/schema.json",
47
47
  "description": "Run an unbuild build process on a selected project"
48
+ },
49
+ "clean-package": {
50
+ "implementation": "./src/executors/clean-package/executor",
51
+ "schema": "./src/executors/clean-package/schema.json",
52
+ "description": "Remove configuration files, fields, and scripts for development before publishing package"
48
53
  }
49
54
  }
50
55
  }