@storm-software/workspace-tools 1.21.18 → 1.22.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.21.18",
3
+ "version": "1.22.0",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
package/src/base/index.js CHANGED
@@ -11816,7 +11816,7 @@ var getDefaultConfig = (config = {}) => {
11816
11816
  };
11817
11817
  var getWorkspaceRoot = () => {
11818
11818
  const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
11819
- process.env.STORM_REPO_ROOT ??= root?.dir;
11819
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
11820
11820
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
11821
11821
  return root?.dir;
11822
11822
  };
@@ -12007,7 +12007,7 @@ var chalk = __toESM(require_source());
12007
12007
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
12008
12008
  var getWorkspaceRoot2 = () => {
12009
12009
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
12010
- process.env.STORM_REPO_ROOT ??= root?.dir;
12010
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
12011
12011
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
12012
12012
  return root?.dir;
12013
12013
  };
@@ -114956,7 +114956,7 @@ var getDefaultConfig = (config = {}) => {
114956
114956
  };
114957
114957
  var getWorkspaceRoot = () => {
114958
114958
  const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
114959
- process.env.STORM_REPO_ROOT ??= root?.dir;
114959
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
114960
114960
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
114961
114961
  return root?.dir;
114962
114962
  };
@@ -115147,7 +115147,7 @@ var chalk = __toESM(require_source());
115147
115147
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
115148
115148
  var getWorkspaceRoot2 = () => {
115149
115149
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
115150
- process.env.STORM_REPO_ROOT ??= root?.dir;
115150
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
115151
115151
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
115152
115152
  return root?.dir;
115153
115153
  };
@@ -20,17 +20,17 @@ export type TsupExecutorSchema = Omit<
20
20
  | "platform"
21
21
  > & {
22
22
  entry: string;
23
- options: Options;
24
- clean: boolean;
25
- debug: boolean;
23
+ options?: Options;
24
+ clean?: boolean;
25
+ debug?: boolean;
26
26
  banner?: string;
27
- verbose: boolean;
27
+ verbose?: boolean;
28
28
  define?: Record<string, string>;
29
29
  env?: Record<string, string>;
30
30
  apiReport?: boolean;
31
31
  docModel?: boolean;
32
32
  tsdocMetadata?: boolean;
33
33
  includeSrc?: boolean;
34
- platform: Platform;
35
- plugins: any[];
34
+ platform?: Platform;
35
+ plugins?: any[];
36
36
  };
@@ -108720,7 +108720,7 @@ var getDefaultConfig = (config = {}) => {
108720
108720
  };
108721
108721
  var getWorkspaceRoot = () => {
108722
108722
  const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
108723
- process.env.STORM_REPO_ROOT ??= root?.dir;
108723
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
108724
108724
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
108725
108725
  return root?.dir;
108726
108726
  };
@@ -108911,7 +108911,7 @@ var chalk = __toESM(require_source());
108911
108911
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
108912
108912
  var getWorkspaceRoot2 = () => {
108913
108913
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
108914
- process.env.STORM_REPO_ROOT ??= root?.dir;
108914
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
108915
108915
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
108916
108916
  return root?.dir;
108917
108917
  };
@@ -108720,7 +108720,7 @@ var getDefaultConfig = (config = {}) => {
108720
108720
  };
108721
108721
  var getWorkspaceRoot = () => {
108722
108722
  const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
108723
- process.env.STORM_REPO_ROOT ??= root?.dir;
108723
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
108724
108724
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
108725
108725
  return root?.dir;
108726
108726
  };
@@ -108911,7 +108911,7 @@ var chalk = __toESM(require_source());
108911
108911
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
108912
108912
  var getWorkspaceRoot2 = () => {
108913
108913
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
108914
- process.env.STORM_REPO_ROOT ??= root?.dir;
108914
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
108915
108915
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
108916
108916
  return root?.dir;
108917
108917
  };
@@ -30020,7 +30020,7 @@ var getDefaultConfig = (config = {}) => {
30020
30020
  };
30021
30021
  var getWorkspaceRoot = () => {
30022
30022
  const root = (0, import_find_workspace_root.findWorkspaceRoot)(process.cwd());
30023
- process.env.STORM_REPO_ROOT ??= root?.dir;
30023
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
30024
30024
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
30025
30025
  return root?.dir;
30026
30026
  };
@@ -31226,7 +31226,7 @@ var chalk = __toESM(require_source());
31226
31226
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
31227
31227
  var getWorkspaceRoot2 = () => {
31228
31228
  const root = (0, import_find_workspace_root2.findWorkspaceRoot)(process.cwd());
31229
- process.env.STORM_REPO_ROOT ??= root?.dir;
31229
+ process.env.STORM_WORKSPACE_ROOT ??= root?.dir;
31230
31230
  process.env.NX_WORKSPACE_ROOT_PATH ??= root?.dir;
31231
31231
  return root?.dir;
31232
31232
  };
@@ -0,0 +1,58 @@
1
+ <!-- START header -->
2
+ <!-- END header -->
3
+
4
+ # <%= name %>
5
+
6
+ <%= description %>
7
+
8
+ <!-- START doctoc -->
9
+ <!-- END doctoc -->
10
+
11
+ ## Installing
12
+
13
+ Using [pnpm](http://pnpm.io):
14
+
15
+ ```bash
16
+ pnpm add -D <%= namespace %>/<%= name %>
17
+ ```
18
+
19
+ <details>
20
+ <summary>Using npm</summary>
21
+
22
+ ```bash
23
+ npm install -D <%= namespace %>/<%= name %>
24
+ ```
25
+
26
+ </details>
27
+
28
+ <details>
29
+ <summary>Using yarn</summary>
30
+
31
+ ```bash
32
+ yarn add -D <%= namespace %>/<%= name %>
33
+ ```
34
+
35
+ </details>
36
+
37
+ ## Reduced Package Size
38
+
39
+ This project uses [tsup](https://tsup.egoist.dev/) to package the source code due to its ability to remove unused code and ship smaller javascript files thanks to code splitting. This helps to greatly reduce the size of the package and to make it easier to use in other projects.
40
+
41
+ ## Development
42
+
43
+ This project is built using [Nx](https://nx.dev). As a result, many of the usual commands are available to assist in development.
44
+
45
+ ### Building
46
+
47
+ Run `nx build <%= name %>` to build the library.
48
+
49
+ ### Running unit tests
50
+
51
+ Run `nx test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
52
+
53
+ ### Linting
54
+
55
+ Run `nx lint <%= name %>` to run [ESLint](https://eslint.org/) on the package.
56
+
57
+ <!-- START footer -->
58
+ <!-- END footer -->
@@ -0,0 +1,3 @@
1
+ import { getJestConfig } from "@storm-software/testing-tools";
2
+
3
+ export default getJestConfig("<%= directory %>", true, "<%= name %>");
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The <%= name %> library used by Storm Software for building TypeScript applications.
3
+ *
4
+ * @remarks
5
+ * <%= description %>
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+
10
+ const variable = "<%= name %>";
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
+ "types": ["jest", "node"]
6
+ },
7
+ "include": [
8
+ "jest.config.ts",
9
+ "src/**/*.test.ts",
10
+ "src/**/*.spec.ts",
11
+ "src/**/*.d.ts"
12
+ ]
13
+ }
@@ -0,0 +1,6 @@
1
+ import { TypeScriptLibraryGeneratorSchema } from "../../base/typescript-library-generator";
2
+
3
+ export type NeutralLibraryGeneratorSchema = Omit<
4
+ TypeScriptLibraryGeneratorSchema,
5
+ "platform"
6
+ >;
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "neutral-library",
4
+ "title": "Add Neutral Library",
5
+ "description": "Create a new Neutral TypeScript library package in the Storm workspaces",
6
+ "type": "object",
7
+ "properties": {
8
+ "name": {
9
+ "type": "string",
10
+ "description": "A name for the library.",
11
+ "$default": {
12
+ "$source": "argv",
13
+ "index": 0
14
+ },
15
+ "x-prompt": "What name would you like to use for the library?",
16
+ "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "The library used by Storm Software for building TypeScript applications.",
21
+ "$default": {
22
+ "$source": "argv",
23
+ "index": 2
24
+ },
25
+ "x-prompt": "Provide description to use as a summary of the library?"
26
+ },
27
+ "directory": {
28
+ "type": "string",
29
+ "description": "A directory where the lib is placed.",
30
+ "x-priority": "important"
31
+ },
32
+ "projectNameAndRootFormat": {
33
+ "description": "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`).",
34
+ "type": "string",
35
+ "enum": ["as-provided", "derived"]
36
+ },
37
+ "tags": {
38
+ "type": "string",
39
+ "description": "Add tags to the library (used for linting)."
40
+ },
41
+ "strict": {
42
+ "type": "boolean",
43
+ "description": "Whether to enable tsconfig strict mode or not.",
44
+ "default": true
45
+ },
46
+ "publishable": {
47
+ "type": "boolean",
48
+ "default": false,
49
+ "description": "Generate a publishable library.",
50
+ "x-priority": "important"
51
+ },
52
+ "importPath": {
53
+ "type": "string",
54
+ "description": "The library name used to import it, like @storm-software/my-awesome-lib. Required for publishable library.",
55
+ "x-priority": "important"
56
+ },
57
+ "buildable": {
58
+ "type": "boolean",
59
+ "default": true,
60
+ "description": "Generate a buildable library.",
61
+ "x-deprecated": "Use the `bundler` option for greater control (swc, tsc, rollup, vite, esbuild, none)."
62
+ },
63
+ "setParserOptionsProject": {
64
+ "type": "boolean",
65
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
66
+ "default": false
67
+ },
68
+ "rootProject": {
69
+ "type": "boolean",
70
+ "default": false,
71
+ "description": "Is the current project the root project in the workspace."
72
+ }
73
+ },
74
+ "required": [
75
+ "name",
76
+ "directory",
77
+ "projectNameAndRootFormat",
78
+ "publishable",
79
+ "importPath",
80
+ "buildable"
81
+ ]
82
+ }
@@ -13,14 +13,14 @@
13
13
  Using [pnpm](http://pnpm.io):
14
14
 
15
15
  ```bash
16
- pnpm add -D @<%= namespace %>/<%= name %>
16
+ pnpm add -D <%= namespace %>/<%= name %>
17
17
  ```
18
18
 
19
19
  <details>
20
20
  <summary>Using npm</summary>
21
21
 
22
22
  ```bash
23
- npm install -D @<%= namespace %>/<%= name %>
23
+ npm install -D <%= namespace %>/<%= name %>
24
24
  ```
25
25
 
26
26
  </details>
@@ -29,7 +29,7 @@ npm install -D @<%= namespace %>/<%= name %>
29
29
  <summary>Using yarn</summary>
30
30
 
31
31
  ```bash
32
- yarn add -D @<%= namespace %>/<%= name %>
32
+ yarn add -D <%= namespace %>/<%= name %>
33
33
  ```
34
34
 
35
35
  </details>