@storm-software/build-tools 0.138.4 → 0.138.6
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/README.md +1 -1
- package/dist/{chunk-NQMCGFF4.mjs → chunk-7WOTDB5Q.mjs} +26 -15
- package/dist/{chunk-ELVC2LRB.mjs → chunk-DB7ZNRK7.mjs} +1 -1
- package/dist/{chunk-ZAPXFKYH.js → chunk-EGSEQ3GU.js} +8 -8
- package/dist/{chunk-GB3YOGNY.js → chunk-F6IJ6ZDH.js} +26 -15
- package/dist/{chunk-FHPOA3EV.mjs → chunk-FW5U7EWZ.mjs} +1 -1
- package/dist/{chunk-JE2JDOPY.mjs → chunk-IXLEVTYJ.mjs} +1 -1
- package/dist/{chunk-NUZNCYWN.js → chunk-MEOUZRHF.js} +2 -2
- package/dist/{chunk-XUMVVPIR.js → chunk-MGLY7SRH.js} +5 -5
- package/dist/{chunk-XI75QFWK.js → chunk-MWCW3ZXD.js} +8 -8
- package/dist/{chunk-D5GFMWKZ.mjs → chunk-O32NMIXL.mjs} +1 -1
- package/dist/{chunk-RUYHATAR.js → chunk-RJYSEK26.js} +8 -8
- package/dist/{chunk-NOHS4IZC.mjs → chunk-WVVOMB45.mjs} +1 -1
- package/dist/{chunk-BMUAGPU5.js → chunk-XI3IAFGC.js} +53 -47
- package/dist/{chunk-BTS6RV2K.mjs → chunk-YZFCFBMW.mjs} +16 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -18
- package/dist/index.mjs +29 -29
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +6 -6
- package/dist/plugins/index.mjs +8 -8
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/{types-CoHX-Wvh.d.ts → types-ChXrBJOT.d.mts} +3 -0
- package/dist/{types-CoHX-Wvh.d.mts → types-ChXrBJOT.d.ts} +3 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -3
- package/dist/utilities/copy-assets.mjs +2 -2
- package/dist/utilities/generate-package-json.d.mts +1 -1
- package/dist/utilities/generate-package-json.d.ts +1 -1
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.d.mts +1 -1
- package/dist/utilities/get-entry-points.d.ts +1 -1
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/get-env.d.mts +1 -1
- package/dist/utilities/get-env.d.ts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +12 -12
- package/dist/utilities/index.mjs +14 -14
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +2 -2
- package/package.json +1 -1
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
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -134,14 +134,17 @@ import { existsSync } from "node:fs";
|
|
|
134
134
|
import { join } from "node:path";
|
|
135
135
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
136
136
|
var depth = 0;
|
|
137
|
-
function findFolderUp(startPath, endFileNames) {
|
|
137
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
138
138
|
const _startPath = startPath ?? process.cwd();
|
|
139
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
140
|
+
return _startPath;
|
|
141
|
+
}
|
|
139
142
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
140
143
|
return _startPath;
|
|
141
144
|
}
|
|
142
145
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
143
146
|
const parent = join(_startPath, "..");
|
|
144
|
-
return findFolderUp(parent, endFileNames);
|
|
147
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
145
148
|
}
|
|
146
149
|
return void 0;
|
|
147
150
|
}
|
|
@@ -149,17 +152,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
149
152
|
|
|
150
153
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
151
154
|
var rootFiles = [
|
|
152
|
-
"storm.json",
|
|
153
|
-
"storm.json",
|
|
154
|
-
"storm.yaml",
|
|
155
|
-
"storm.yml",
|
|
156
|
-
"storm.js",
|
|
157
|
-
"storm.ts",
|
|
158
|
-
".storm.json",
|
|
159
|
-
".storm.yaml",
|
|
160
|
-
".storm.yml",
|
|
161
|
-
".storm.js",
|
|
162
|
-
".storm.ts",
|
|
155
|
+
"storm-workspace.json",
|
|
156
|
+
"storm-workspace.json",
|
|
157
|
+
"storm-workspace.yaml",
|
|
158
|
+
"storm-workspace.yml",
|
|
159
|
+
"storm-workspace.js",
|
|
160
|
+
"storm-workspace.ts",
|
|
161
|
+
".storm-workspace.json",
|
|
162
|
+
".storm-workspace.yaml",
|
|
163
|
+
".storm-workspace.yml",
|
|
164
|
+
".storm-workspace.js",
|
|
165
|
+
".storm-workspace.ts",
|
|
163
166
|
"lerna.json",
|
|
164
167
|
"nx.json",
|
|
165
168
|
"turbo.json",
|
|
@@ -183,11 +186,18 @@ var rootFiles = [
|
|
|
183
186
|
"pnpm-lock.yml",
|
|
184
187
|
"bun.lockb"
|
|
185
188
|
];
|
|
189
|
+
var rootDirectories = [
|
|
190
|
+
".storm-workspace",
|
|
191
|
+
".nx",
|
|
192
|
+
".github",
|
|
193
|
+
".vscode",
|
|
194
|
+
".verdaccio"
|
|
195
|
+
];
|
|
186
196
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
187
197
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
188
198
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
189
199
|
}
|
|
190
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
200
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
191
201
|
}
|
|
192
202
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
193
203
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -329,7 +339,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
329
339
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
330
340
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
331
341
|
var StormConfigSchema = z.object({
|
|
332
|
-
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
342
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
333
343
|
extends: ExtendsSchema.optional(),
|
|
334
344
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
335
345
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -371,6 +381,7 @@ var StormConfigSchema = z.object({
|
|
|
371
381
|
"trace",
|
|
372
382
|
"all"
|
|
373
383
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
384
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
374
385
|
registry: RegistryConfigSchema,
|
|
375
386
|
configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
376
387
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkF6IJ6ZDHjs = require('./chunk-F6IJ6ZDH.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -37,8 +37,8 @@ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (con
|
|
|
37
37
|
output: "src/"
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
40
|
+
_chunkF6IJ6ZDHjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
41
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkF6IJ6ZDHjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
42
42
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
43
43
|
projectDir: projectRoot,
|
|
44
44
|
rootDir: config.workspaceRoot,
|
|
@@ -47,12 +47,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
47
47
|
});
|
|
48
48
|
await assetHandler.processAllAssetsOnce();
|
|
49
49
|
if (includeSrc === true) {
|
|
50
|
-
|
|
50
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkF6IJ6ZDHjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
51
51
|
const files = await _glob.glob.call(void 0, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
_chunkF6IJ6ZDHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
53
|
+
_chunkF6IJ6ZDHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
54
|
+
_chunkF6IJ6ZDHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
55
|
+
_chunkF6IJ6ZDHjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
56
56
|
]);
|
|
57
57
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
58
58
|
|
|
@@ -134,14 +134,17 @@ var _fs = require('fs');
|
|
|
134
134
|
var _path = require('path');
|
|
135
135
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
136
136
|
var depth = 0;
|
|
137
|
-
function findFolderUp(startPath, endFileNames) {
|
|
137
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
138
138
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
139
|
+
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
140
|
+
return _startPath;
|
|
141
|
+
}
|
|
139
142
|
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
140
143
|
return _startPath;
|
|
141
144
|
}
|
|
142
145
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
143
146
|
const parent = _path.join.call(void 0, _startPath, "..");
|
|
144
|
-
return findFolderUp(parent, endFileNames);
|
|
147
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
145
148
|
}
|
|
146
149
|
return void 0;
|
|
147
150
|
}
|
|
@@ -149,17 +152,17 @@ _chunkSHUYVCIDjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
|
149
152
|
|
|
150
153
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
151
154
|
var rootFiles = [
|
|
152
|
-
"storm.json",
|
|
153
|
-
"storm.json",
|
|
154
|
-
"storm.yaml",
|
|
155
|
-
"storm.yml",
|
|
156
|
-
"storm.js",
|
|
157
|
-
"storm.ts",
|
|
158
|
-
".storm.json",
|
|
159
|
-
".storm.yaml",
|
|
160
|
-
".storm.yml",
|
|
161
|
-
".storm.js",
|
|
162
|
-
".storm.ts",
|
|
155
|
+
"storm-workspace.json",
|
|
156
|
+
"storm-workspace.json",
|
|
157
|
+
"storm-workspace.yaml",
|
|
158
|
+
"storm-workspace.yml",
|
|
159
|
+
"storm-workspace.js",
|
|
160
|
+
"storm-workspace.ts",
|
|
161
|
+
".storm-workspace.json",
|
|
162
|
+
".storm-workspace.yaml",
|
|
163
|
+
".storm-workspace.yml",
|
|
164
|
+
".storm-workspace.js",
|
|
165
|
+
".storm-workspace.ts",
|
|
163
166
|
"lerna.json",
|
|
164
167
|
"nx.json",
|
|
165
168
|
"turbo.json",
|
|
@@ -183,11 +186,18 @@ var rootFiles = [
|
|
|
183
186
|
"pnpm-lock.yml",
|
|
184
187
|
"bun.lockb"
|
|
185
188
|
];
|
|
189
|
+
var rootDirectories = [
|
|
190
|
+
".storm-workspace",
|
|
191
|
+
".nx",
|
|
192
|
+
".github",
|
|
193
|
+
".vscode",
|
|
194
|
+
".verdaccio"
|
|
195
|
+
];
|
|
186
196
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
187
197
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
188
198
|
return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
189
199
|
}
|
|
190
|
-
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
200
|
+
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
191
201
|
}
|
|
192
202
|
_chunkSHUYVCIDjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
193
203
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -329,7 +339,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
329
339
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
330
340
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
331
341
|
var StormConfigSchema = _zod2.default.object({
|
|
332
|
-
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
342
|
+
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
333
343
|
extends: ExtendsSchema.optional(),
|
|
334
344
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
335
345
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -371,6 +381,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
371
381
|
"trace",
|
|
372
382
|
"all"
|
|
373
383
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
384
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
374
385
|
registry: RegistryConfigSchema,
|
|
375
386
|
configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
376
387
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF6IJ6ZDHjs = require('./chunk-F6IJ6ZDH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -30,7 +30,7 @@ function analyze() {
|
|
|
30
30
|
renderChunk(source, chunk) {
|
|
31
31
|
const sourceBytes = formatBytes(source.length);
|
|
32
32
|
const fileName = chunk.fileName;
|
|
33
|
-
|
|
33
|
+
_chunkF6IJ6ZDHjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkF6IJ6ZDHjs = require('./chunk-F6IJ6ZDH.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -11,7 +11,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
11
11
|
// src/utilities/get-entry-points.ts
|
|
12
12
|
var _glob = require('glob');
|
|
13
13
|
var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
14
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
14
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkF6IJ6ZDHjs.findWorkspaceRoot.call(void 0, );
|
|
15
15
|
const entryPoints = [];
|
|
16
16
|
if (entry) {
|
|
17
17
|
if (Array.isArray(entry)) {
|
|
@@ -23,7 +23,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
if (emitOnAll) {
|
|
26
|
-
entryPoints.push(
|
|
26
|
+
entryPoints.push(_chunkF6IJ6ZDHjs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
27
27
|
}
|
|
28
28
|
const results = [];
|
|
29
29
|
for (const entryPoint in entryPoints) {
|
|
@@ -32,9 +32,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
32
32
|
withFileTypes: true
|
|
33
33
|
});
|
|
34
34
|
results.push(...files.reduce((ret, filePath) => {
|
|
35
|
-
const result =
|
|
35
|
+
const result = _chunkF6IJ6ZDHjs.correctPaths.call(void 0, _chunkF6IJ6ZDHjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkF6IJ6ZDHjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkF6IJ6ZDHjs.correctPaths.call(void 0, projectRoot), ""));
|
|
36
36
|
if (result) {
|
|
37
|
-
|
|
37
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkF6IJ6ZDHjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
38
38
|
if (!results.includes(result)) {
|
|
39
39
|
results.push(result);
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF6IJ6ZDHjs = require('./chunk-F6IJ6ZDH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -25,8 +25,8 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
25
25
|
return {
|
|
26
26
|
name: `storm:ts-resolve`,
|
|
27
27
|
async resolveId(source, importer) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
|
|
29
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
|
|
30
30
|
if (!importer) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
39
|
if (ignore && ignore(source, importer)) {
|
|
40
|
-
|
|
40
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
if (resolveOnly) {
|
|
@@ -46,12 +46,12 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
46
46
|
return v.test(source);
|
|
47
47
|
});
|
|
48
48
|
if (!shouldResolve) {
|
|
49
|
-
|
|
49
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
if (_path2.default.isAbsolute(source)) {
|
|
54
|
-
|
|
54
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
|
|
@@ -83,10 +83,10 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
if (id) {
|
|
86
|
-
|
|
86
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
|
|
87
87
|
return id;
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
_chunkF6IJ6ZDHjs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
|
|
90
90
|
return false;
|
|
91
91
|
}
|
|
92
92
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkF6IJ6ZDHjs = require('./chunk-F6IJ6ZDH.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -19,7 +19,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
19
19
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
20
20
|
const projectNode = project.node;
|
|
21
21
|
if (projectNode.data.root) {
|
|
22
|
-
const projectPackageJsonPath =
|
|
22
|
+
const projectPackageJsonPath = _chunkF6IJ6ZDHjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
23
23
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
24
24
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
25
25
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -30,7 +30,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
if (localPackages.length > 0) {
|
|
33
|
-
|
|
33
|
+
_chunkF6IJ6ZDHjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
34
34
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
35
35
|
if (!ret[localPackage.name]) {
|
|
36
36
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -52,13 +52,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
52
52
|
return ret;
|
|
53
53
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
54
54
|
} else {
|
|
55
|
-
|
|
55
|
+
_chunkF6IJ6ZDHjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
56
56
|
}
|
|
57
57
|
return packageJson;
|
|
58
58
|
}, "addPackageDependencies");
|
|
59
59
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
60
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
61
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
60
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkF6IJ6ZDHjs.findWorkspaceRoot.call(void 0, );
|
|
61
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkF6IJ6ZDHjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
62
62
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
63
63
|
packageJson.type ??= "module";
|
|
64
64
|
packageJson.sideEffects ??= false;
|
|
@@ -67,7 +67,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
67
67
|
if (distSrc.startsWith("/")) {
|
|
68
68
|
distSrc = distSrc.substring(1);
|
|
69
69
|
}
|
|
70
|
-
packageJson.source ??= `${
|
|
70
|
+
packageJson.source ??= `${_chunkF6IJ6ZDHjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
71
71
|
}
|
|
72
72
|
packageJson.files ??= [
|
|
73
73
|
"dist/**/*"
|
|
@@ -98,7 +98,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
98
98
|
];
|
|
99
99
|
}
|
|
100
100
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
101
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
101
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkF6IJ6ZDHjs.joinPaths.call(void 0, "packages", projectName);
|
|
102
102
|
return packageJson;
|
|
103
103
|
}, "addWorkspacePackageJsonFields");
|
|
104
104
|
var addPackageJsonExport = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|