@storm-software/workspace-tools 1.263.2 → 1.264.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 (42) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +12 -30
  3. package/dist/{chunk-OAQP7HGX.js → chunk-PD4CDI7L.js} +295 -41
  4. package/dist/{chunk-NZBJ5BJT.mjs → chunk-VYHRGNJQ.mjs} +301 -47
  5. package/dist/executors.d.mts +0 -1
  6. package/dist/executors.d.ts +0 -1
  7. package/dist/executors.js +5 -10
  8. package/dist/executors.mjs +5 -10
  9. package/dist/generators.js +3 -3
  10. package/dist/generators.mjs +3 -3
  11. package/dist/index.d.mts +0 -1
  12. package/dist/index.d.ts +0 -1
  13. package/dist/index.js +8 -13
  14. package/dist/index.mjs +8 -13
  15. package/dist/src/executors/esbuild/executor.js +2 -3
  16. package/dist/src/executors/esbuild/executor.mjs +1 -2
  17. package/executors.json +0 -5
  18. package/package.json +3 -6
  19. package/dist/chunk-55IQXVOQ.js +0 -308
  20. package/dist/chunk-7W5P2GIE.mjs +0 -308
  21. package/dist/chunk-IFSORSAN.js +0 -304
  22. package/dist/chunk-TLRZHFVN.mjs +0 -304
  23. package/dist/executor-BDvqiAmr.d.ts +0 -144
  24. package/dist/executor-KAQdKP88.d.mts +0 -144
  25. package/dist/src/executors/tsdown/executor.d.mts +0 -4
  26. package/dist/src/executors/tsdown/executor.d.ts +0 -4
  27. package/dist/src/executors/tsdown/executor.js +0 -15
  28. package/dist/src/executors/tsdown/executor.mjs +0 -15
  29. package/dist/src/executors/tsdown/schema.d.ts +0 -135
  30. package/dist/src/executors/tsdown/schema.json +0 -174
  31. package/dist/src/executors/tsdown/schema.md +0 -126
  32. package/dist/src/executors/tsdown/untyped.d.mts +0 -5
  33. package/dist/src/executors/tsdown/untyped.d.ts +0 -5
  34. package/dist/src/executors/tsdown/untyped.js +0 -19
  35. package/dist/src/executors/tsdown/untyped.mjs +0 -19
  36. package/dist/src/plugins/typescript/tsdown.d.mts +0 -7
  37. package/dist/src/plugins/typescript/tsdown.d.ts +0 -7
  38. package/dist/src/plugins/typescript/tsdown.js +0 -159
  39. package/dist/src/plugins/typescript/tsdown.mjs +0 -159
  40. package/docs/api/executors/tsdown/schema.md +0 -126
  41. /package/dist/{chunk-3J53KHVV.js → chunk-7VDOGZYO.js} +0 -0
  42. /package/dist/{chunk-V7YZ3666.mjs → chunk-BLX5SLPC.mjs} +0 -0
@@ -1,135 +0,0 @@
1
-
2
- // Generated by @storm-software/untyped
3
- // Do not edit this file directly
4
-
5
- export interface TSDownExecutorSchema {
6
- /**
7
- * Output Path
8
- *
9
- * The output path for the build
10
- *
11
- * @default "dist/{projectRoot}"
12
- *
13
- * @format path
14
- */
15
- outputPath?: string,
16
-
17
- /**
18
- * Entry File(s)
19
- *
20
- * The entry file or files to build
21
- *
22
- * @default ["{sourceRoot}/index.ts"]
23
- *
24
- * @format path
25
- */
26
- entry?: Array<string>,
27
-
28
- /**
29
- * TSConfig Path
30
- *
31
- * The path to the tsconfig file
32
- *
33
- * @default "{projectRoot}/tsconfig.json"
34
- *
35
- * @format path
36
- */
37
- tsconfig?: string,
38
-
39
- /**
40
- * Bundle
41
- *
42
- * Bundle the output
43
- *
44
- */
45
- bundle?: boolean,
46
-
47
- /**
48
- * Minify
49
- *
50
- * Minify the output
51
- *
52
- */
53
- minify?: boolean,
54
-
55
- /**
56
- * Debug
57
- *
58
- * Debug the output
59
- *
60
- */
61
- debug?: boolean,
62
-
63
- /**
64
- * Sourcemap
65
- *
66
- * Generate a sourcemap
67
- *
68
- */
69
- sourcemap?: boolean,
70
-
71
- /**
72
- * Silent
73
- *
74
- * Should the build run silently - only report errors back to the user
75
- *
76
- * @default false
77
- */
78
- silent?: boolean,
79
-
80
- /**
81
- * Target
82
- *
83
- * The target to build
84
- *
85
- * @default "esnext"
86
- *
87
- * @enum es3,es5,es6,es2015,es2016,es2017,es2018,es2019,es2020,es2021,es2022,es2023,es2024,esnext,node12,node14,node16,node18,node20,node22,browser,chrome58,chrome59,chrome60
88
- */
89
- target?: string,
90
-
91
- /**
92
- * Format
93
- *
94
- * The format to build
95
- *
96
- * @default ["cjs","esm"]
97
- */
98
- format?: Array<string>,
99
-
100
- /**
101
- * Platform
102
- *
103
- * The platform to build
104
- *
105
- * @default "neutral"
106
- *
107
- * @enum neutral,node,browser
108
- */
109
- platform?: string,
110
-
111
- /**
112
- * External
113
- *
114
- * The external dependencies
115
- *
116
- */
117
- external?: Array<any>,
118
-
119
- /**
120
- * Define
121
- *
122
- * The define values
123
- *
124
- */
125
- define?: Record<string, string>,
126
-
127
- /**
128
- * Environment Variables
129
- *
130
- * The environment variable values
131
- *
132
- */
133
- env?: Record<string, string>,
134
- }
135
-
@@ -1,174 +0,0 @@
1
- {
2
- "id": "#",
3
- "title": "TSDown Executor",
4
- "description": "A type definition for a tsdown executor schema",
5
- "properties": {
6
- "outputPath": {
7
- "title": "Output Path",
8
- "type": "string",
9
- "format": "path",
10
- "description": "The output path for the build",
11
- "id": "#outputPath",
12
- "default": "dist/{projectRoot}"
13
- },
14
- "entry": {
15
- "title": "Entry File(s)",
16
- "format": "path",
17
- "type": "array",
18
- "description": "The entry file or files to build",
19
- "items": {
20
- "type": "string"
21
- },
22
- "id": "#entry",
23
- "default": [
24
- "{sourceRoot}/index.ts"
25
- ]
26
- },
27
- "tsconfig": {
28
- "title": "TSConfig Path",
29
- "type": "string",
30
- "format": "path",
31
- "description": "The path to the tsconfig file",
32
- "id": "#tsconfig",
33
- "default": "{projectRoot}/tsconfig.json"
34
- },
35
- "bundle": {
36
- "title": "Bundle",
37
- "type": "boolean",
38
- "description": "Bundle the output",
39
- "id": "#bundle"
40
- },
41
- "minify": {
42
- "title": "Minify",
43
- "type": "boolean",
44
- "description": "Minify the output",
45
- "id": "#minify"
46
- },
47
- "debug": {
48
- "title": "Debug",
49
- "type": "boolean",
50
- "description": "Debug the output",
51
- "id": "#debug"
52
- },
53
- "sourcemap": {
54
- "title": "Sourcemap",
55
- "type": "boolean",
56
- "description": "Generate a sourcemap",
57
- "id": "#sourcemap"
58
- },
59
- "silent": {
60
- "title": "Silent",
61
- "type": "boolean",
62
- "description": "Should the build run silently - only report errors back to the user",
63
- "id": "#silent",
64
- "default": false
65
- },
66
- "target": {
67
- "title": "Target",
68
- "type": "string",
69
- "description": "The target to build",
70
- "enum": [
71
- "es3",
72
- "es5",
73
- "es6",
74
- "es2015",
75
- "es2016",
76
- "es2017",
77
- "es2018",
78
- "es2019",
79
- "es2020",
80
- "es2021",
81
- "es2022",
82
- "es2023",
83
- "es2024",
84
- "esnext",
85
- "node12",
86
- "node14",
87
- "node16",
88
- "node18",
89
- "node20",
90
- "node22",
91
- "browser",
92
- "chrome58",
93
- "chrome59",
94
- "chrome60"
95
- ],
96
- "id": "#target",
97
- "default": "esnext"
98
- },
99
- "format": {
100
- "title": "Format",
101
- "type": "array",
102
- "description": "The format to build",
103
- "items": {
104
- "type": "string",
105
- "enum": [
106
- "cjs",
107
- "esm",
108
- "iife"
109
- ]
110
- },
111
- "id": "#format",
112
- "default": [
113
- "cjs",
114
- "esm"
115
- ]
116
- },
117
- "platform": {
118
- "title": "Platform",
119
- "type": "string",
120
- "description": "The platform to build",
121
- "enum": [
122
- "neutral",
123
- "node",
124
- "browser"
125
- ],
126
- "id": "#platform",
127
- "default": "neutral"
128
- },
129
- "external": {
130
- "title": "External",
131
- "type": "array",
132
- "description": "The external dependencies",
133
- "id": "#external",
134
- "default": [],
135
- "items": {
136
- "type": "any"
137
- }
138
- },
139
- "define": {
140
- "title": "Define",
141
- "type": "object",
142
- "tsType": "Record<string, string>",
143
- "description": "The define values",
144
- "id": "#define",
145
- "default": {}
146
- },
147
- "env": {
148
- "title": "Environment Variables",
149
- "type": "object",
150
- "tsType": "Record<string, string>",
151
- "description": "The environment variable values",
152
- "id": "#env",
153
- "default": {}
154
- }
155
- },
156
- "type": "object",
157
- "default": {
158
- "outputPath": "dist/{projectRoot}",
159
- "entry": [
160
- "{sourceRoot}/index.ts"
161
- ],
162
- "tsconfig": "{projectRoot}/tsconfig.json",
163
- "silent": false,
164
- "target": "esnext",
165
- "format": [
166
- "cjs",
167
- "esm"
168
- ],
169
- "platform": "neutral",
170
- "external": [],
171
- "define": {},
172
- "env": {}
173
- }
174
- }
@@ -1,126 +0,0 @@
1
-
2
- <!-- Generated by @storm-software/untyped -->
3
- <!-- Do not edit this file directly -->
4
-
5
- # TSDown Executor
6
-
7
- ## `outputPath`
8
- - **Type**: `string`
9
- - **Default**: `"dist/{projectRoot}"`
10
-
11
- > Output Path
12
-
13
-
14
- The output path for the build
15
-
16
-
17
- ## `entry`
18
- - **Type**: `array`
19
- - **Default**: `["{sourceRoot}/index.ts"]`
20
-
21
- > Entry File(s)
22
-
23
-
24
- The entry file or files to build
25
-
26
-
27
- ## `tsconfig`
28
- - **Type**: `string`
29
- - **Default**: `"{projectRoot}/tsconfig.json"`
30
-
31
- > TSConfig Path
32
-
33
-
34
- The path to the tsconfig file
35
-
36
-
37
- ## `bundle`
38
- - **Type**: `boolean`
39
-
40
- > Bundle
41
-
42
-
43
- Bundle the output
44
-
45
-
46
- ## `minify`
47
- - **Type**: `boolean`
48
-
49
- > Minify
50
-
51
-
52
- Minify the output
53
-
54
-
55
- ## `debug`
56
- - **Type**: `boolean`
57
-
58
- > Debug
59
-
60
-
61
- Debug the output
62
-
63
-
64
- ## `sourcemap`
65
- - **Type**: `boolean`
66
-
67
- > Sourcemap
68
-
69
-
70
- Generate a sourcemap
71
-
72
-
73
- ## `silent`
74
- - **Type**: `boolean`
75
- - **Default**: `false`
76
-
77
- > Silent
78
-
79
-
80
- Should the build run silently - only report errors back to the user
81
-
82
-
83
- ## `target`
84
- - **Type**: `string`
85
- - **Default**: `"esnext"`
86
-
87
- > Target
88
-
89
-
90
- The target to build
91
-
92
-
93
- ## `format`
94
- - **Type**: `array`
95
- - **Default**: `["cjs","esm"]`
96
-
97
- > Format
98
-
99
-
100
- The format to build
101
-
102
-
103
- ## `platform`
104
- - **Type**: `string`
105
- - **Default**: `"neutral"`
106
-
107
- > Platform
108
-
109
-
110
- The platform to build
111
-
112
-
113
- ## `external`
114
- - **Type**: `array`
115
- - **Default**: `[]`
116
-
117
- > External
118
-
119
-
120
- The external dependencies
121
-
122
-
123
- ## `define`
124
-
125
- ## `env`
126
-
@@ -1,5 +0,0 @@
1
- import * as untyped from 'untyped';
2
-
3
- declare const _default: untyped.SchemaDefinition;
4
-
5
- export { _default as default };
@@ -1,5 +0,0 @@
1
- import * as untyped from 'untyped';
2
-
3
- declare const _default: untyped.SchemaDefinition;
4
-
5
- export { _default as default };
@@ -1,19 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkIWCQL3AQjs = require('../../../chunk-IWCQL3AQ.js');
4
- require('../../../chunk-I734UVDT.js');
5
- require('../../../chunk-3GQAWCBQ.js');
6
-
7
- // src/executors/tsdown/untyped.ts
8
- var _untyped = require('untyped');
9
- var untyped_default = _untyped.defineUntypedSchema.call(void 0, {
10
- ..._chunkIWCQL3AQjs.typescript_build_executor_untyped_default,
11
- $schema: {
12
- id: "TSDownExecutorSchema",
13
- title: "TSDown Executor",
14
- description: "A type definition for a tsdown executor schema"
15
- }
16
- });
17
-
18
-
19
- exports.default = untyped_default;
@@ -1,19 +0,0 @@
1
- import {
2
- typescript_build_executor_untyped_default
3
- } from "../../../chunk-5CZXBNEE.mjs";
4
- import "../../../chunk-DGC5L3Z7.mjs";
5
- import "../../../chunk-2BPV2XV2.mjs";
6
-
7
- // src/executors/tsdown/untyped.ts
8
- import { defineUntypedSchema } from "untyped";
9
- var untyped_default = defineUntypedSchema({
10
- ...typescript_build_executor_untyped_default,
11
- $schema: {
12
- id: "TSDownExecutorSchema",
13
- title: "TSDown Executor",
14
- description: "A type definition for a tsdown executor schema"
15
- }
16
- });
17
- export {
18
- untyped_default as default
19
- };
@@ -1,7 +0,0 @@
1
- import { CreateNodesV2 } from '@nx/devkit';
2
-
3
- declare const name = "storm-software/typescript/tsdown";
4
- type TsDownPluginOptions = object;
5
- declare const createNodesV2: CreateNodesV2<TsDownPluginOptions>;
6
-
7
- export { type TsDownPluginOptions, createNodesV2, name };
@@ -1,7 +0,0 @@
1
- import { CreateNodesV2 } from '@nx/devkit';
2
-
3
- declare const name = "storm-software/typescript/tsdown";
4
- type TsDownPluginOptions = object;
5
- declare const createNodesV2: CreateNodesV2<TsDownPluginOptions>;
6
-
7
- export { type TsDownPluginOptions, createNodesV2, name };
@@ -1,159 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _chunk7YRW5HNXjs = require('../../../chunk-7YRW5HNX.js');
4
-
5
-
6
- var _chunk3GQAWCBQjs = require('../../../chunk-3GQAWCBQ.js');
7
-
8
- // src/plugins/typescript/tsdown.ts
9
- var _devkit = require('@nx/devkit');
10
- var _fs = require('fs');
11
- var _path = require('path');
12
- var _nxjsonjs = require('nx/src/config/nx-json.js');
13
- var _packagejson = require('nx/src/utils/package-json');
14
- var name = "storm-software/typescript/tsdown";
15
- var createNodesV2 = [
16
- "**/tsdown.config.ts",
17
- async (configFiles, options, context) => {
18
- return await _devkit.createNodesFromFiles.call(void 0, (configFile, options2, context2) => {
19
- try {
20
- console.log(`Processing tsdown.config.ts file: ${configFile}`);
21
- const projectRoot = createProjectRoot(configFile, context2.workspaceRoot);
22
- if (!projectRoot) {
23
- console.error(`tsdown.config.ts file must be location in the project root directory: ${configFile}`);
24
- return {};
25
- }
26
- const packageJson = _devkit.readJsonFile.call(void 0, _path.join.call(void 0, projectRoot, "package.json"));
27
- if (!packageJson) {
28
- console.error(`No package.json found in project root: ${projectRoot}`);
29
- return {};
30
- }
31
- if (!_optionalChain([packageJson, 'access', _ => _.devDependencies, 'optionalAccess', _2 => _2.tsdown]) && !_optionalChain([packageJson, 'access', _3 => _3.dependencies, 'optionalAccess', _4 => _4.tsdown])) {
32
- console.warn(`No "tsdown" dependency or devDependency found in package.json: ${configFile}
33
- Please add it to your dependencies by running "pnpm add tsdown -D --filter="${packageJson.name}"`);
34
- }
35
- const project = createProjectFromPackageJsonNextToProjectJson(_path.join.call(void 0, projectRoot, "project.json"), packageJson);
36
- const nxJson = _nxjsonjs.readNxJson.call(void 0, context2.workspaceRoot);
37
- const targets = _packagejson.readTargetsFromPackageJson.call(void 0, packageJson, nxJson);
38
- let relativeRoot = projectRoot.replaceAll("\\", "/").replace(context2.workspaceRoot.replaceAll("\\", "/"), "");
39
- if (relativeRoot.startsWith("/")) {
40
- relativeRoot = relativeRoot.slice(1);
41
- }
42
- let relativeConfig = configFile.replaceAll(relativeRoot, "");
43
- while (relativeConfig.startsWith(".")) {
44
- relativeConfig = relativeConfig.slice(1);
45
- }
46
- while (relativeConfig.startsWith("/")) {
47
- relativeConfig = relativeConfig.slice(1);
48
- }
49
- targets["build-base"] ??= {
50
- cache: true,
51
- inputs: [
52
- `{workspaceRoot}/${configFile}`,
53
- "typescript",
54
- "^production"
55
- ],
56
- outputs: [
57
- "{projectRoot}/dist"
58
- ],
59
- executor: "nx:run-commands",
60
- dependsOn: [
61
- "build-untyped",
62
- "^build"
63
- ],
64
- options: {
65
- command: `tsdown --config="${relativeConfig}"`,
66
- cwd: relativeRoot
67
- }
68
- };
69
- targets.build ??= {
70
- cache: true,
71
- inputs: [
72
- "{workspaceRoot}/LICENSE",
73
- "{projectRoot}/dist",
74
- "{projectRoot}/*.md",
75
- "{projectRoot}/package.json"
76
- ],
77
- outputs: [
78
- "{workspaceRoot}/dist/{projectRoot}"
79
- ],
80
- executor: "nx:run-commands",
81
- dependsOn: [
82
- "build-base",
83
- "build-untyped",
84
- "^build"
85
- ],
86
- options: {
87
- commands: [
88
- `pnpm copyfiles LICENSE dist/${relativeRoot}`,
89
- `pnpm copyfiles --up=2 ./${relativeRoot}/*.md ./${relativeRoot}/package.json dist/${relativeRoot}`,
90
- `pnpm copyfiles --up=3 "./${relativeRoot}/dist/**/*" dist/${relativeRoot}/dist`
91
- ]
92
- }
93
- };
94
- targets.clean = {
95
- executor: "nx:run-commands",
96
- inputs: [
97
- `{workspaceRoot}/${configFile}`,
98
- "typescript",
99
- "^production"
100
- ],
101
- options: {
102
- commands: [
103
- `pnpm exec rimraf dist/${relativeRoot}`,
104
- `pnpm exec rimraf ${relativeRoot}/dist`
105
- ]
106
- }
107
- };
108
- _chunk7YRW5HNXjs.setDefaultProjectTags.call(void 0, project, name);
109
- const result = _optionalChain([project, 'optionalAccess', _5 => _5.name]) ? {
110
- projects: {
111
- [project.name]: {
112
- ...project,
113
- root: relativeRoot,
114
- targets
115
- }
116
- }
117
- } : {};
118
- console.log(`Writing Results for ${_nullishCoalesce(_optionalChain([project, 'optionalAccess', _6 => _6.name]), () => ( "missing name"))}`);
119
- console.log(result);
120
- return result;
121
- } catch (e) {
122
- console.error(e);
123
- return {};
124
- }
125
- }, configFiles, options, context);
126
- }
127
- ];
128
- function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, packageJson) {
129
- const { nx, name: name2 } = packageJson;
130
- const root = _path.dirname.call(void 0, projectJsonPath);
131
- const projectJson = _devkit.readJsonFile.call(void 0, projectJsonPath);
132
- return {
133
- targets: {},
134
- tags: [],
135
- name: name2,
136
- ...nx,
137
- ...projectJson,
138
- root
139
- };
140
- }
141
- _chunk3GQAWCBQjs.__name.call(void 0, createProjectFromPackageJsonNextToProjectJson, "createProjectFromPackageJsonNextToProjectJson");
142
- function createProjectRoot(configPath, workspaceRoot) {
143
- try {
144
- const root = _path.dirname.call(void 0, configPath);
145
- const projectRoot = _path.join.call(void 0, workspaceRoot, root);
146
- if (!_fs.existsSync.call(void 0, _path.join.call(void 0, projectRoot, "package.json")) && !_fs.existsSync.call(void 0, _path.join.call(void 0, projectRoot, "project.json"))) {
147
- return null;
148
- }
149
- return projectRoot;
150
- } catch (e) {
151
- console.error(e);
152
- return null;
153
- }
154
- }
155
- _chunk3GQAWCBQjs.__name.call(void 0, createProjectRoot, "createProjectRoot");
156
-
157
-
158
-
159
- exports.createNodesV2 = createNodesV2; exports.name = name;