@storm-software/workspace-tools 1.15.3 → 1.16.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.
- package/CHANGELOG.md +14 -0
- package/README.md +130 -3
- package/index.js +13 -17
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +13 -17
- package/src/executors/tsup/get-config.js +13 -17
- package/src/executors/tsup/schema.json +156 -158
- package/src/generators/node-library/schema.json +1 -1
- package/src/generators/preset/files/docs/readme-templates/README.footer.md.template +2 -0
- package/src/generators/preset/schema.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.16.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.15.3...workspace-tools-v1.16.0) (2023-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **git-tools:** Added executors and generators sections to the readme-gen CLI ([99aacba](https://github.com/storm-software/storm-ops/commit/99aacba62747cef1347bc87a0fff35fb2ffb0bde))
|
|
7
|
+
|
|
8
|
+
## [1.15.3](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.15.2...workspace-tools-v1.15.3) (2023-11-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **workspace-tools:** Update paths passed to api-extractor in tsup patch ([f3b6ce9](https://github.com/storm-software/storm-ops/commit/f3b6ce91e71ccc104895b4bcc0edf50a52e2b8ba))
|
|
14
|
+
|
|
1
15
|
## [1.15.2](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.15.1...workspace-tools-v1.15.2) (2023-11-29)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<!-- markdownlint-disable -->
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/
|
|
6
|
+
<div align="center"><img src="https://pub-761b436209f44a4d886487c917806c08.r2.dev/storm-banner.gif" width="100%" altText="Storm Software" /></div>
|
|
7
|
+
<br />
|
|
7
8
|
|
|
8
9
|
<div align="center">
|
|
9
10
|
<a href="https://stormsoftware.org" target="_blank">Website</a> | <a href="https://stormsoftware.org/contact" target="_blank">Contact</a> | <a href="https://github.com/storm-software/stormstack" target="_blank">Repository</a> | <a href="https://stormstack.github.io/stormstack/" target="_blank">Documentation</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=bug&template=bug-report.yml&title=Bug Report%3A+">Report a Bug</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=enhancement&template=feature-request.yml&title=Feature Request%3A+">Request a Feature</a> | <a href="https://github.com/storm-software/stormstack/issues/new?assignees=&labels=documentation&template=documentation.yml&title=Documentation Request%3A+">Request Documentation</a> | <a href="https://github.com/storm-software/stormstack/discussions">Ask a Question</a>
|
|
@@ -15,10 +16,10 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
15
16
|
|
|
16
17
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
|
|
17
18
|
|
|
18
|
-
[](https://prettier.io/)
|
|
19
20
|
[](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://docusaurus.io/) 
|
|
20
21
|
|
|
21
|
-
<h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️
|
|
22
|
+
<h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
<!-- markdownlint-restore -->
|
|
@@ -35,6 +36,130 @@ A package containing tools for managing a Storm workspace. It includes various [
|
|
|
35
36
|
|
|
36
37
|
This library was generated with [Nx](https://nx.dev).
|
|
37
38
|
|
|
39
|
+
## Executors
|
|
40
|
+
|
|
41
|
+
The following executors are available in this package to invoke common tasks for the workspace's projects:
|
|
42
|
+
|
|
43
|
+
## Tsup Build executor
|
|
44
|
+
|
|
45
|
+
Run a build on the project using tsup configuration
|
|
46
|
+
|
|
47
|
+
### Example
|
|
48
|
+
|
|
49
|
+
This executor can be used by executing the following in a command line utility:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
nx run my-project:tsup
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Please note:** _The tsup executor should be included in the desired projects's `project.json` file._
|
|
56
|
+
|
|
57
|
+
### Options
|
|
58
|
+
|
|
59
|
+
The following executor options are available:
|
|
60
|
+
|
|
61
|
+
| Option | Type | Description | Default || --------- | ------ | ------------- | --------- || entry | `string` | The path to the entry file, relative to project. | "{sourceRoot}/index.ts" |
|
|
62
|
+
,| outputPath | `string` | The output path of the generated files. | "dist/{projectRoot}" |
|
|
63
|
+
,| tsConfig | `string` | The path to tsconfig file. | "tsconfig.json" |
|
|
64
|
+
,| additionalEntryPoints | `string[]` | List of additional entry points. | `` |
|
|
65
|
+
,| external | `string[]` | Mark one or more module as external. Can use * wildcards, such as '*.png'. | |
|
|
66
|
+
,| bundle | `boolean` | Whether to bundle the main entry point and additional entry points. Set to false to keep individual output files. | `true` |
|
|
67
|
+
,| watch | `boolean` | Enable re-building when files change. | |
|
|
68
|
+
,| assets | `array` | List of static assets. |`` |
|
|
69
|
+
,| clean | `boolean` | Remove previous output before build. | `true` |
|
|
70
|
+
,| includeSrc | `boolean` | Should the source files be added to the distribution folder in an `src` directory. | `true` |
|
|
71
|
+
,| debug | `boolean` | Should output be unminified with source mappings. | |
|
|
72
|
+
,| platform | "browser" \| "neutral" \| "node" \| "worker" | Platform target for outputs. | "neutral" |
|
|
73
|
+
,| banner | `string` | A short heading added to the top of each typescript file added in the output folder's src directory. | "This code was developed by Storm Software (https://stormsoftware.org) and is licensed under the Apache License 2.0." |
|
|
74
|
+
,| verbose | `boolean` | Should write extra log outputs with details from the executor. | |
|
|
75
|
+
,| define | `object` | Define global constants that can be used in the source code. The value will be converted into a stringified JSON. | |
|
|
76
|
+
,| env | `object` | Define environment variables that can be used in the source code. The value will be converted into a stringified JSON. | |
|
|
77
|
+
,| apiReport | `boolean` | Should API Extractor generate an API Report file. | `true` |
|
|
78
|
+
,| docModel | `boolean` | Should API Extractor generate an Doc Model markdown file. | `true` |
|
|
79
|
+
,| tsdocMetadata | `boolean` | Should API Extractor generate an TSDoc Metadata file. | `true` |
|
|
80
|
+
,| options | `object` | Additional options to pass to tsup. See https://paka.dev/npm/tsup@7.2.0/api#d35d54aca71eb26e. | |
|
|
81
|
+
,| plugins | `object[]` | List of ESBuild plugins to use during processing | `` |
|
|
82
|
+
,| required |`string` | | |
|
|
83
|
+
,| definitions |`string` | | |
|
|
84
|
+
|
|
85
|
+
## Generators
|
|
86
|
+
|
|
87
|
+
The following generators are available with this package to assist in workspace management:
|
|
88
|
+
|
|
89
|
+
## Init Storm Workspace Plugin
|
|
90
|
+
|
|
91
|
+
Init Storm Workspace Plugin.
|
|
92
|
+
|
|
93
|
+
### Options
|
|
94
|
+
|
|
95
|
+
The following executor options are available:
|
|
96
|
+
|
|
97
|
+
| Option | Type | Description | Default || --------- | ------ | ------------- | --------- || skipFormat | `boolean` | Skip formatting files. | |
|
|
98
|
+
|
|
99
|
+
## Storm Workspace preset
|
|
100
|
+
|
|
101
|
+
Storm workspace preset generator
|
|
102
|
+
|
|
103
|
+
### Examples
|
|
104
|
+
|
|
105
|
+
This generator can be used by executing the following examples in a command line utility:
|
|
106
|
+
|
|
107
|
+
#### Generate a storm workspace with the name: example-repo, namespace: storm-software, organization: storm-software, and repositoryUrl: 'https://github.com/storm-software/example-repo'.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
nx g @storm-software/workspace-tools:preset --name 'example-repo'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Generate a storm workspace with the name: example-repo, namespace: example, and repositoryUrl: 'https://github.com/storm-software/example-repo'.
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example'
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Generate a storm workspace with the name: example-repo, namespace: example, organization: example-org, description: 'An example workspace', and repositoryUrl: 'https://github.com/example-org/example-repo'.
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
nx g @storm-software/workspace-tools:preset --name 'example-repo' --namespace 'example' --organization 'example-org' --description 'An example workspace'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Options
|
|
126
|
+
|
|
127
|
+
The following executor options are available:
|
|
128
|
+
|
|
129
|
+
| Option | Type | Description | Default || --------- | ------ | ------------- | --------- || name\* | `string` | The name of the workspace root. | |
|
|
130
|
+
,| organization\* | `string` | The organization that owns the workspace. | "storm-software" |
|
|
131
|
+
,| namespace | `string` | The npm scope used for the workspace. Defaults to the organization name. | |
|
|
132
|
+
,| includeApps\* | `boolean` | Should a separate `apps` folder be created for this workspace (if Yes: `apps` and `libs` folders will be added, if No: `packages` folders will be added)? | |
|
|
133
|
+
,| description | `string` | The description of the workspace to use in the package.json and README.md files. | |
|
|
134
|
+
,| repositoryUrl | `string` | The URL of the workspace in GitHub. Defaults to the https://github.com/<organization>/<name> | |
|
|
135
|
+
,| nxCloud | `boolean` | Should distributed caching with Nx Cloud be enabled for the workspace? | |
|
|
136
|
+
,| mode\* | "light" \| "dark" | Which client mode should be used for the Nx Task Runner? | "dark" |
|
|
137
|
+
,| packageManager | "npm" \| "yarn" \| "pnpm" | What package manager is used for the workspace? | "pnpm" |
|
|
138
|
+
|
|
139
|
+
**Please note:** _Option names followed by _ above are required, and must be provided to run the executor.\*
|
|
140
|
+
|
|
141
|
+
## node-library
|
|
142
|
+
|
|
143
|
+
Generate a new node library project in the Storm workspace
|
|
144
|
+
|
|
145
|
+
### Options
|
|
146
|
+
|
|
147
|
+
The following executor options are available:
|
|
148
|
+
|
|
149
|
+
| Option | Type | Description | Default || --------- | ------ | ------------- | --------- || name\* | `string` | A name for the library. | |
|
|
150
|
+
,| description | `string` | The library used by Storm Software for building TypeScript applications. | |
|
|
151
|
+
,| directory\* | `string` | A directory where the lib is placed. | |
|
|
152
|
+
,| projectNameAndRootFormat\* | "as-provided" \| "derived" | Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`). | |
|
|
153
|
+
,| tags | `string` | Add tags to the library (used for linting). | |
|
|
154
|
+
,| strict | `boolean` | Whether to enable tsconfig strict mode or not. | `true` |
|
|
155
|
+
,| publishable\* | `boolean` | Generate a publishable library. | |
|
|
156
|
+
,| importPath\* | `string` | The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library. | |
|
|
157
|
+
,| buildable\* | `boolean` | Generate a buildable library. | `true` |
|
|
158
|
+
,| setParserOptionsProject | `boolean` | Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons. | |
|
|
159
|
+
,| rootProject | `boolean` | Is the current project the root project in the workspace. | |
|
|
160
|
+
|
|
161
|
+
**Please note:** _Option names followed by _ above are required, and must be provided to run the executor.\*
|
|
162
|
+
|
|
38
163
|
## Building
|
|
39
164
|
|
|
40
165
|
Run `nx build workspace-tools` to build the library.
|
|
@@ -127,6 +252,8 @@ This project follows the [all-contributors](https://github.com/all-contributors/
|
|
|
127
252
|
<div align="center">
|
|
128
253
|
<img src="https://pub-e71cff0f90204755bc910518d63cacf8.r2.dev/logo-opengraph.gif" width="100%"/>
|
|
129
254
|
</div>
|
|
255
|
+
<br />
|
|
256
|
+
|
|
130
257
|
<div align="center">
|
|
131
258
|
<a href="https://www.patsullivan.org" target="_blank">Website</a> | <a href="https://www.patsullivan.org/contact" target="_blank">Contact</a> | <a href="https://linkedin.com/in/patrick-sullivan-865526b0" target="_blank">LinkedIn</a> | <a href="https://medium.com/@pat.joseph.sullivan" target="_blank">Medium</a> | <a href="https://github.com/sullivanpj" target="_blank">GitHub</a> | <a href="https://keybase.io/sullivanp" target="_blank">OpenPGP Key</a>
|
|
132
259
|
</div>
|
package/index.js
CHANGED
|
@@ -40019,9 +40019,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
40019
40019
|
}
|
|
40020
40020
|
});
|
|
40021
40021
|
|
|
40022
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40022
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
40023
40023
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
40024
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40024
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
40025
40025
|
"use strict";
|
|
40026
40026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40027
40027
|
var version = "8.0.0";
|
|
@@ -40481,9 +40481,9 @@ var require_resolve_from = __commonJS({
|
|
|
40481
40481
|
}
|
|
40482
40482
|
});
|
|
40483
40483
|
|
|
40484
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40484
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
40485
40485
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
40486
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40486
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
40487
40487
|
"use strict";
|
|
40488
40488
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40489
40489
|
function _interopRequireDefault(obj) {
|
|
@@ -40761,9 +40761,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
40761
40761
|
}
|
|
40762
40762
|
});
|
|
40763
40763
|
|
|
40764
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40764
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
40765
40765
|
var require_chunk_UIX4URMV = __commonJS({
|
|
40766
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40766
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
40767
40767
|
"use strict";
|
|
40768
40768
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40769
40769
|
function _interopRequireWildcard(obj) {
|
|
@@ -41697,9 +41697,9 @@ var require_dist2 = __commonJS({
|
|
|
41697
41697
|
}
|
|
41698
41698
|
});
|
|
41699
41699
|
|
|
41700
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41700
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
41701
41701
|
var require_chunk_7G76EW2R = __commonJS({
|
|
41702
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41702
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
41703
41703
|
"use strict";
|
|
41704
41704
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41705
41705
|
function _interopRequireDefault(obj) {
|
|
@@ -95505,9 +95505,9 @@ var require_chokidar = __commonJS({
|
|
|
95505
95505
|
}
|
|
95506
95506
|
});
|
|
95507
95507
|
|
|
95508
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95508
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/index.js
|
|
95509
95509
|
var require_dist5 = __commonJS({
|
|
95510
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
95510
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=nygxtewmelpqvs6bmpobio73ru_@microsoft+api-extractor@7.38.3_@swc+core@1._qikbl2tzs42funnjom5kiniywy/node_modules/tsup/dist/index.js"(exports) {
|
|
95511
95511
|
"use strict";
|
|
95512
95512
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95513
95513
|
function _interopRequireDefault(obj) {
|
|
@@ -97874,12 +97874,9 @@ var require_dist5 = __commonJS({
|
|
|
97874
97874
|
projectFolder = projectFolder.slice(0, -1);
|
|
97875
97875
|
}
|
|
97876
97876
|
!options.silent && logger2.info("dts", `\u26A1 Preparing to run API Extractor (DTS generate): ${projectFolder}`);
|
|
97877
|
-
const relativeProjectFolder = _path2.default.
|
|
97878
|
-
_path2.default.
|
|
97879
|
-
|
|
97880
|
-
options.workspaceRoot
|
|
97881
|
-
),
|
|
97882
|
-
".."
|
|
97877
|
+
const relativeProjectFolder = _path2.default.relative(
|
|
97878
|
+
_path2.default.join(options.workspaceRoot, projectFolder.replaceAll("/", "\\")),
|
|
97879
|
+
options.workspaceRoot
|
|
97883
97880
|
);
|
|
97884
97881
|
const apiReferenceProjectDir = _path2.default.join(
|
|
97885
97882
|
relativeProjectFolder,
|
|
@@ -97897,7 +97894,6 @@ var require_dist5 = __commonJS({
|
|
|
97897
97894
|
reportFileName: "api-report.md",
|
|
97898
97895
|
reportFolder: `<projectFolder>/${apiReferenceProjectDir}`,
|
|
97899
97896
|
reportTempFolder: `<projectFolder>/${_path2.default.join(
|
|
97900
|
-
"<projectFolder>",
|
|
97901
97897
|
relativeProjectFolder,
|
|
97902
97898
|
"tmp",
|
|
97903
97899
|
"api-reports"
|