@storm-software/projen 0.9.65 → 0.9.66
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 +12 -0
- package/README.md +1 -1
- package/dist/{chunk-XINAL634.js → chunk-6JFFTGUX.js} +198 -133
- package/dist/{chunk-VDVL2MW5.mjs → chunk-RTGFCQZM.mjs} +177 -112
- package/dist/generators.js +2 -2
- package/dist/generators.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Projen
|
|
4
4
|
|
|
5
|
+
## [0.9.66](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.66) (2025-04-29)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **esbuild:** Remove unused modules from package
|
|
10
|
+
([e3dc467c8](https://github.com/storm-software/storm-ops/commit/e3dc467c8))
|
|
11
|
+
|
|
12
|
+
### Miscellaneous
|
|
13
|
+
|
|
14
|
+
- **monorepo:** Regenerate README markdown files
|
|
15
|
+
([c12ea4b7b](https://github.com/storm-software/storm-ops/commit/c12ea4b7b))
|
|
16
|
+
|
|
5
17
|
## [0.9.65](https://github.com/storm-software/storm-ops/releases/tag/projen%400.9.65) (2025-04-29)
|
|
6
18
|
|
|
7
19
|
### Miscellaneous
|
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 -->
|
|
@@ -281,7 +281,7 @@ var COLOR_KEYS = [
|
|
|
281
281
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
282
282
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
283
283
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
284
|
-
var _path = require('path'); var
|
|
284
|
+
var _path = require('path'); var path4 = _interopRequireWildcard(_path);
|
|
285
285
|
|
|
286
286
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
287
287
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
@@ -1664,7 +1664,11 @@ _chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
|
1664
1664
|
|
|
1665
1665
|
// ../esbuild/src/build.ts
|
|
1666
1666
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1667
|
+
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
1668
|
+
var _globby = require('globby');
|
|
1667
1669
|
|
|
1670
|
+
// ../esbuild/src/assets.ts
|
|
1671
|
+
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1668
1672
|
|
|
1669
1673
|
// ../build-tools/src/index.ts
|
|
1670
1674
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
@@ -1919,16 +1923,17 @@ _chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
|
1919
1923
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1920
1924
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
1921
1925
|
|
|
1922
|
-
// ../esbuild/src/
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1926
|
+
// ../esbuild/src/assets.ts
|
|
1927
|
+
async function copyBuildAssets(context) {
|
|
1928
|
+
if (_optionalChain([context, 'access', _106 => _106.result, 'optionalAccess', _107 => _107.errors, 'access', _108 => _108.length]) === 0) {
|
|
1929
|
+
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
1930
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
1931
|
+
await copyAssets(context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
1932
|
+
stopwatch();
|
|
1933
|
+
}
|
|
1934
|
+
return context;
|
|
1935
|
+
}
|
|
1936
|
+
_chunkXIADWDXKjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1932
1937
|
|
|
1933
1938
|
// ../esbuild/src/clean.ts
|
|
1934
1939
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
@@ -1941,6 +1946,14 @@ async function cleanDirectories(directory) {
|
|
|
1941
1946
|
}
|
|
1942
1947
|
_chunkXIADWDXKjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
1943
1948
|
|
|
1949
|
+
// ../esbuild/src/context.ts
|
|
1950
|
+
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
1956
|
+
|
|
1944
1957
|
// ../esbuild/src/config.ts
|
|
1945
1958
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1946
1959
|
var DEFAULT_BUILD_OPTIONS = {
|
|
@@ -1987,98 +2000,52 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
1987
2000
|
}
|
|
1988
2001
|
};
|
|
1989
2002
|
|
|
1990
|
-
// ../esbuild/src/plugins/
|
|
2003
|
+
// ../esbuild/src/plugins/resolve-paths.ts
|
|
1991
2004
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
1992
2005
|
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
"
|
|
2015
|
-
// these are indirectly used by build
|
|
2016
|
-
"buffer"
|
|
2017
|
-
];
|
|
2018
|
-
var missingIgnore = [
|
|
2019
|
-
".prisma",
|
|
2020
|
-
"@prisma/client",
|
|
2021
|
-
"ts-toolbelt"
|
|
2022
|
-
];
|
|
2023
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, (bundle) => ({
|
|
2024
|
-
name: "storm:deps-check",
|
|
2006
|
+
function resolvePathsConfig(options, cwd) {
|
|
2007
|
+
if (_optionalChain([options, 'optionalAccess', _109 => _109.compilerOptions, 'optionalAccess', _110 => _110.paths])) {
|
|
2008
|
+
const paths = Object.entries(options.compilerOptions.paths);
|
|
2009
|
+
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2010
|
+
return [
|
|
2011
|
+
key,
|
|
2012
|
+
paths2.map((v) => path4.default.resolve(cwd, v))
|
|
2013
|
+
];
|
|
2014
|
+
});
|
|
2015
|
+
return Object.fromEntries(resolvedPaths);
|
|
2016
|
+
}
|
|
2017
|
+
if (options.extends) {
|
|
2018
|
+
const extendsPath = path4.default.resolve(cwd, options.extends);
|
|
2019
|
+
const extendsDir = path4.default.dirname(extendsPath);
|
|
2020
|
+
const extendsConfig = _chunkXIADWDXKjs.__require.call(void 0, extendsPath);
|
|
2021
|
+
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2022
|
+
}
|
|
2023
|
+
return [];
|
|
2024
|
+
}
|
|
2025
|
+
_chunkXIADWDXKjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
2026
|
+
var resolvePathsPlugin = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, (context) => ({
|
|
2027
|
+
name: "storm:resolve-paths",
|
|
2025
2028
|
setup(build3) {
|
|
2026
|
-
const
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2030
|
-
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
2031
|
-
const dependencies = [
|
|
2032
|
-
...regDependencies,
|
|
2033
|
-
...bundle ? devDependencies : []
|
|
2034
|
-
];
|
|
2035
|
-
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2036
|
-
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2029
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? _chunkXIADWDXKjs.__require.call(void 0, _chunkIND7PM3Ljs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig)) : _chunkXIADWDXKjs.__require.call(void 0, _chunkIND7PM3Ljs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
2030
|
+
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot);
|
|
2031
|
+
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2037
2032
|
build3.onResolve({
|
|
2038
|
-
filter:
|
|
2033
|
+
filter: packagesRegex
|
|
2039
2034
|
}, (args) => {
|
|
2040
|
-
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
}
|
|
2045
|
-
const [pkg] = args.path.split("/");
|
|
2046
|
-
collectedDependencies.add(pkg);
|
|
2047
|
-
}
|
|
2035
|
+
if (_optionalChain([build3, 'access', _111 => _111.initialOptions, 'access', _112 => _112.external, 'optionalAccess', _113 => _113.includes, 'call', _114 => _114(args.path)])) {
|
|
2036
|
+
return {
|
|
2037
|
+
path: args.path,
|
|
2038
|
+
external: true
|
|
2039
|
+
};
|
|
2048
2040
|
}
|
|
2049
2041
|
return {
|
|
2050
|
-
|
|
2042
|
+
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2051
2043
|
};
|
|
2052
2044
|
});
|
|
2053
|
-
build3.onEnd(() => {
|
|
2054
|
-
const unusedDependencies = [
|
|
2055
|
-
...dependencies
|
|
2056
|
-
].filter((dep) => {
|
|
2057
|
-
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
2058
|
-
});
|
|
2059
|
-
const missingDependencies = [
|
|
2060
|
-
...collectedDependencies
|
|
2061
|
-
].filter((dep) => {
|
|
2062
|
-
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
2063
|
-
});
|
|
2064
|
-
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2065
|
-
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2066
|
-
});
|
|
2067
|
-
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2068
|
-
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2069
|
-
});
|
|
2070
|
-
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2071
|
-
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2072
|
-
if (filteredMissingDeps.length > 0) {
|
|
2073
|
-
throw new Error(`Missing dependencies detected - please install them:
|
|
2074
|
-
${JSON.stringify(filteredMissingDeps)}
|
|
2075
|
-
`);
|
|
2076
|
-
}
|
|
2077
|
-
});
|
|
2078
2045
|
}
|
|
2079
|
-
}), "
|
|
2046
|
+
}), "resolvePathsPlugin");
|
|
2080
2047
|
|
|
2081
|
-
// ../esbuild/src/
|
|
2048
|
+
// ../esbuild/src/context.ts
|
|
2082
2049
|
async function resolveContext(userOptions) {
|
|
2083
2050
|
const projectRoot = userOptions.projectRoot;
|
|
2084
2051
|
const workspaceRoot3 = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
@@ -2101,7 +2068,7 @@ async function resolveContext(userOptions) {
|
|
|
2101
2068
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2102
2069
|
const projectName = projectJson.name || userOptions.name;
|
|
2103
2070
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2104
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2071
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _115 => _115.projects, 'optionalAccess', _116 => _116[projectName]])) {
|
|
2105
2072
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2106
2073
|
}
|
|
2107
2074
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -2132,7 +2099,7 @@ async function resolveContext(userOptions) {
|
|
|
2132
2099
|
}
|
|
2133
2100
|
};
|
|
2134
2101
|
stopwatch();
|
|
2135
|
-
|
|
2102
|
+
const context = {
|
|
2136
2103
|
options: resolvedOptions,
|
|
2137
2104
|
clean: userOptions.clean !== false,
|
|
2138
2105
|
workspaceConfig,
|
|
@@ -2143,8 +2110,19 @@ async function resolveContext(userOptions) {
|
|
|
2143
2110
|
outputPath: resolvedOptions.outputPath || _chunkIND7PM3Ljs.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2144
2111
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2145
2112
|
};
|
|
2113
|
+
context.options.esbuildPlugins = [
|
|
2114
|
+
resolvePathsPlugin(context),
|
|
2115
|
+
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
2116
|
+
];
|
|
2117
|
+
return context;
|
|
2146
2118
|
}
|
|
2147
2119
|
_chunkXIADWDXKjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2120
|
+
|
|
2121
|
+
// ../esbuild/src/package-json.ts
|
|
2122
|
+
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
|
|
2148
2126
|
async function generatePackageJson(context) {
|
|
2149
2127
|
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkIND7PM3Ljs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
2150
2128
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
@@ -2243,6 +2221,101 @@ async function generatePackageJson(context) {
|
|
|
2243
2221
|
return context;
|
|
2244
2222
|
}
|
|
2245
2223
|
_chunkXIADWDXKjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2224
|
+
|
|
2225
|
+
// ../esbuild/src/plugins/deps-check.ts
|
|
2226
|
+
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
var unusedIgnore = [
|
|
2230
|
+
// these are our dev dependencies
|
|
2231
|
+
/@types\/.*?/,
|
|
2232
|
+
/@typescript-eslint.*?/,
|
|
2233
|
+
/eslint.*?/,
|
|
2234
|
+
"esbuild",
|
|
2235
|
+
"husky",
|
|
2236
|
+
"is-ci",
|
|
2237
|
+
"lint-staged",
|
|
2238
|
+
"prettier",
|
|
2239
|
+
"typescript",
|
|
2240
|
+
"ts-node",
|
|
2241
|
+
"ts-jest",
|
|
2242
|
+
"@swc/core",
|
|
2243
|
+
"@swc/jest",
|
|
2244
|
+
"jest",
|
|
2245
|
+
// these are missing 3rd party deps
|
|
2246
|
+
"spdx-exceptions",
|
|
2247
|
+
"spdx-license-ids",
|
|
2248
|
+
// type-only, so it is not detected
|
|
2249
|
+
"ts-toolbelt",
|
|
2250
|
+
// these are indirectly used by build
|
|
2251
|
+
"buffer"
|
|
2252
|
+
];
|
|
2253
|
+
var missingIgnore = [
|
|
2254
|
+
".prisma",
|
|
2255
|
+
"@prisma/client",
|
|
2256
|
+
"ts-toolbelt"
|
|
2257
|
+
];
|
|
2258
|
+
var depsCheckPlugin = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, (bundle) => ({
|
|
2259
|
+
name: "storm:deps-check",
|
|
2260
|
+
setup(build3) {
|
|
2261
|
+
const pkgJsonPath = path4.default.join(process.cwd(), "package.json");
|
|
2262
|
+
const pkgContents = _chunkXIADWDXKjs.__require.call(void 0, pkgJsonPath);
|
|
2263
|
+
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
2264
|
+
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
2265
|
+
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
2266
|
+
const dependencies = [
|
|
2267
|
+
...regDependencies,
|
|
2268
|
+
...bundle ? devDependencies : []
|
|
2269
|
+
];
|
|
2270
|
+
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2271
|
+
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2272
|
+
build3.onResolve({
|
|
2273
|
+
filter: onlyPackages
|
|
2274
|
+
}, (args) => {
|
|
2275
|
+
if (args.importer.includes(process.cwd())) {
|
|
2276
|
+
if (args.path[0] === "@") {
|
|
2277
|
+
const [org, pkg] = args.path.split("/");
|
|
2278
|
+
collectedDependencies.add(`${org}/${pkg}`);
|
|
2279
|
+
} else {
|
|
2280
|
+
const [pkg] = args.path.split("/");
|
|
2281
|
+
collectedDependencies.add(pkg);
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
return {
|
|
2285
|
+
external: true
|
|
2286
|
+
};
|
|
2287
|
+
});
|
|
2288
|
+
build3.onEnd(() => {
|
|
2289
|
+
const unusedDependencies = [
|
|
2290
|
+
...dependencies
|
|
2291
|
+
].filter((dep) => {
|
|
2292
|
+
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
2293
|
+
});
|
|
2294
|
+
const missingDependencies = [
|
|
2295
|
+
...collectedDependencies
|
|
2296
|
+
].filter((dep) => {
|
|
2297
|
+
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
2298
|
+
});
|
|
2299
|
+
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2300
|
+
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2301
|
+
});
|
|
2302
|
+
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2303
|
+
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2304
|
+
});
|
|
2305
|
+
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2306
|
+
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2307
|
+
if (filteredMissingDeps.length > 0) {
|
|
2308
|
+
throw new Error(`Missing dependencies detected - please install them:
|
|
2309
|
+
${JSON.stringify(filteredMissingDeps)}
|
|
2310
|
+
`);
|
|
2311
|
+
}
|
|
2312
|
+
});
|
|
2313
|
+
}
|
|
2314
|
+
}), "depsCheckPlugin");
|
|
2315
|
+
|
|
2316
|
+
// ../esbuild/src/tsup.ts
|
|
2317
|
+
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
2318
|
+
var _tsup = require('tsup');
|
|
2246
2319
|
async function executeTsup(context) {
|
|
2247
2320
|
writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2248
2321
|
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
@@ -2255,23 +2328,15 @@ async function executeTsup(context) {
|
|
|
2255
2328
|
return context;
|
|
2256
2329
|
}
|
|
2257
2330
|
_chunkXIADWDXKjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2261
|
-
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2262
|
-
await copyAssets(context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
2263
|
-
stopwatch();
|
|
2264
|
-
}
|
|
2265
|
-
return context;
|
|
2266
|
-
}
|
|
2267
|
-
_chunkXIADWDXKjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2331
|
+
|
|
2332
|
+
// ../esbuild/src/build.ts
|
|
2268
2333
|
async function reportResults(context) {
|
|
2269
|
-
if (_optionalChain([context, 'access',
|
|
2334
|
+
if (_optionalChain([context, 'access', _117 => _117.result, 'optionalAccess', _118 => _118.errors, 'access', _119 => _119.length]) === 0) {
|
|
2270
2335
|
if (context.result.warnings.length > 0) {
|
|
2271
2336
|
writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
|
|
2272
2337
|
}
|
|
2273
2338
|
writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
|
|
2274
|
-
} else if (_optionalChain([context, 'access',
|
|
2339
|
+
} else if (_optionalChain([context, 'access', _120 => _120.result, 'optionalAccess', _121 => _121.errors]) && _optionalChain([context, 'access', _122 => _122.result, 'optionalAccess', _123 => _123.errors, 'access', _124 => _124.length]) > 0) {
|
|
2275
2340
|
writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
|
|
2276
2341
|
throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
|
|
2277
2342
|
}
|
|
@@ -2349,14 +2414,14 @@ _chunkXIADWDXKjs.__name.call(void 0, build2, "build");
|
|
|
2349
2414
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
2350
2415
|
async function esbuildExecutorFn(options, context, config) {
|
|
2351
2416
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
2352
|
-
if (!_optionalChain([context, 'access',
|
|
2417
|
+
if (!_optionalChain([context, 'access', _125 => _125.projectsConfigurations, 'optionalAccess', _126 => _126.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _127 => _127.projectsConfigurations, 'access', _128 => _128.projects, 'access', _129 => _129[context.projectName], 'optionalAccess', _130 => _130.root])) {
|
|
2353
2418
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
2354
2419
|
}
|
|
2355
2420
|
await build2({
|
|
2356
2421
|
...options,
|
|
2357
|
-
projectRoot: _optionalChain([context, 'access',
|
|
2422
|
+
projectRoot: _optionalChain([context, 'access', _131 => _131.projectsConfigurations, 'access', _132 => _132.projects, 'optionalAccess', _133 => _133[context.projectName], 'access', _134 => _134.root]),
|
|
2358
2423
|
name: context.projectName,
|
|
2359
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
2424
|
+
sourceRoot: _optionalChain([context, 'access', _135 => _135.projectsConfigurations, 'access', _136 => _136.projects, 'optionalAccess', _137 => _137[context.projectName], 'optionalAccess', _138 => _138.sourceRoot]),
|
|
2360
2425
|
format: options.format,
|
|
2361
2426
|
platform: options.format
|
|
2362
2427
|
});
|
|
@@ -2402,7 +2467,7 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
2402
2467
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
2403
2468
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
2404
2469
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
2405
|
-
if (!_optionalChain([context, 'optionalAccess',
|
|
2470
|
+
if (!_optionalChain([context, 'optionalAccess', _139 => _139.projectName]) || !_optionalChain([context, 'access', _140 => _140.projectsConfigurations, 'optionalAccess', _141 => _141.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2406
2471
|
throw new Error("The Size-Limit process failed because the context is not valid. Please run this command from a workspace.");
|
|
2407
2472
|
}
|
|
2408
2473
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
@@ -2411,7 +2476,7 @@ async function sizeLimitExecutorFn(options, context, config) {
|
|
|
2411
2476
|
_esbuild3.default,
|
|
2412
2477
|
_esbuildwhy2.default
|
|
2413
2478
|
], {
|
|
2414
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access',
|
|
2479
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'access', _144 => _144[context.projectName], 'optionalAccess', _145 => _145.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0, _nullishCoalesce(_optionalChain([context, 'access', _146 => _146.projectsConfigurations, 'access', _147 => _147.projects, 'access', _148 => _148[context.projectName], 'optionalAccess', _149 => _149.root]), () => ( "./")), "src")))
|
|
2415
2480
|
}).then((result) => {
|
|
2416
2481
|
writeInfo(`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`, config);
|
|
2417
2482
|
});
|
|
@@ -2472,7 +2537,7 @@ _chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
|
2472
2537
|
var _jiti = require('jiti');
|
|
2473
2538
|
async function unbuildExecutorFn(options, context, config) {
|
|
2474
2539
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
2475
|
-
if (!_optionalChain([context, 'access',
|
|
2540
|
+
if (!_optionalChain([context, 'access', _150 => _150.projectsConfigurations, 'optionalAccess', _151 => _151.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2476
2541
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
2477
2542
|
}
|
|
2478
2543
|
if (!context.projectsConfigurations.projects[context.projectName].root) {
|
|
@@ -2561,7 +2626,7 @@ var withRunGenerator = /* @__PURE__ */ _chunkXIADWDXKjs.__name.call(void 0, (nam
|
|
|
2561
2626
|
- workspaceRoot: ${workspaceRoot3}`, config);
|
|
2562
2627
|
config = await getConfig(workspaceRoot3);
|
|
2563
2628
|
}
|
|
2564
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2629
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _152 => _152.hooks, 'optionalAccess', _153 => _153.applyDefaultOptions])) {
|
|
2565
2630
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
2566
2631
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
2567
2632
|
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
@@ -2572,22 +2637,22 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
2572
2637
|
workspaceRoot: tree.root,
|
|
2573
2638
|
config
|
|
2574
2639
|
}, applyWorkspaceBaseTokens);
|
|
2575
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2640
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _154 => _154.hooks, 'optionalAccess', _155 => _155.preProcess])) {
|
|
2576
2641
|
writeDebug("Running the preProcess hook...", config);
|
|
2577
2642
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
2578
2643
|
writeDebug("Completed the preProcess hook", config);
|
|
2579
2644
|
}
|
|
2580
2645
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
2581
2646
|
if (result) {
|
|
2582
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
2647
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _156 => _156.error, 'optionalAccess', _157 => _157.message]) && typeof _optionalChain([result, 'optionalAccess', _158 => _158.error, 'optionalAccess', _159 => _159.message]) === "string" && _optionalChain([result, 'optionalAccess', _160 => _160.error, 'optionalAccess', _161 => _161.name]) && typeof _optionalChain([result, 'optionalAccess', _162 => _162.error, 'optionalAccess', _163 => _163.name]) === "string") {
|
|
2583
2648
|
throw new Error(`The ${name} generator failed to run`, {
|
|
2584
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2649
|
+
cause: _optionalChain([result, 'optionalAccess', _164 => _164.error])
|
|
2585
2650
|
});
|
|
2586
2651
|
} else if (result.success && result.data) {
|
|
2587
2652
|
return result;
|
|
2588
2653
|
}
|
|
2589
2654
|
}
|
|
2590
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
2655
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _165 => _165.hooks, 'optionalAccess', _166 => _166.postProcess])) {
|
|
2591
2656
|
writeDebug("Running the postProcess hook...", config);
|
|
2592
2657
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
2593
2658
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -2756,15 +2821,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2756
2821
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
2757
2822
|
let repository = {
|
|
2758
2823
|
type: "github",
|
|
2759
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
2824
|
+
url: _optionalChain([config, 'optionalAccess', _167 => _167.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _168 => _168.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _169 => _169.namespace]) || _optionalChain([config, 'optionalAccess', _170 => _170.name]) || "repository"}.git`
|
|
2760
2825
|
};
|
|
2761
2826
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2762
2827
|
if (tree.exists("package.json")) {
|
|
2763
2828
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2764
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2829
|
+
if (_optionalChain([packageJson, 'optionalAccess', _171 => _171.repository])) {
|
|
2765
2830
|
repository = packageJson.repository;
|
|
2766
2831
|
}
|
|
2767
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2832
|
+
if (_optionalChain([packageJson, 'optionalAccess', _172 => _172.description])) {
|
|
2768
2833
|
description = packageJson.description;
|
|
2769
2834
|
}
|
|
2770
2835
|
}
|
|
@@ -2819,9 +2884,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2819
2884
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
2820
2885
|
...json,
|
|
2821
2886
|
pnpm: {
|
|
2822
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2887
|
+
..._optionalChain([json, 'optionalAccess', _173 => _173.pnpm]),
|
|
2823
2888
|
overrides: {
|
|
2824
|
-
..._optionalChain([json, 'optionalAccess',
|
|
2889
|
+
..._optionalChain([json, 'optionalAccess', _174 => _174.pnpm, 'optionalAccess', _175 => _175.overrides]),
|
|
2825
2890
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
2826
2891
|
}
|
|
2827
2892
|
}
|
|
@@ -2835,10 +2900,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
2835
2900
|
]);
|
|
2836
2901
|
if (tree.exists("package.json")) {
|
|
2837
2902
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2838
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2903
|
+
if (_optionalChain([packageJson, 'optionalAccess', _176 => _176.repository])) {
|
|
2839
2904
|
repository = packageJson.repository;
|
|
2840
2905
|
}
|
|
2841
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
2906
|
+
if (_optionalChain([packageJson, 'optionalAccess', _177 => _177.description])) {
|
|
2842
2907
|
description = packageJson.description;
|
|
2843
2908
|
}
|
|
2844
2909
|
}
|
|
@@ -2886,24 +2951,24 @@ _chunkXIADWDXKjs.__name.call(void 0, getOutputPath, "getOutputPath");
|
|
|
2886
2951
|
function createProjectTsConfigJson(tree, options) {
|
|
2887
2952
|
const tsconfig = {
|
|
2888
2953
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
2889
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2954
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _178 => _178.tsconfigOptions]), () => ( {})),
|
|
2890
2955
|
compilerOptions: {
|
|
2891
2956
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
2892
2957
|
outDir: _chunkIND7PM3Ljs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
2893
2958
|
noEmit: true,
|
|
2894
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2959
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _179 => _179.tsconfigOptions, 'optionalAccess', _180 => _180.compilerOptions]), () => ( {}))
|
|
2895
2960
|
},
|
|
2896
2961
|
files: [
|
|
2897
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2962
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _181 => _181.tsconfigOptions, 'optionalAccess', _182 => _182.files]), () => ( []))
|
|
2898
2963
|
],
|
|
2899
2964
|
include: [
|
|
2900
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2965
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _183 => _183.tsconfigOptions, 'optionalAccess', _184 => _184.include]), () => ( [])),
|
|
2901
2966
|
"src/**/*.ts",
|
|
2902
2967
|
"src/**/*.js",
|
|
2903
2968
|
"bin/**/*"
|
|
2904
2969
|
],
|
|
2905
2970
|
exclude: [
|
|
2906
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2971
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _185 => _185.tsconfigOptions, 'optionalAccess', _186 => _186.exclude]), () => ( [])),
|
|
2907
2972
|
"jest.config.ts",
|
|
2908
2973
|
"src/**/*.spec.ts",
|
|
2909
2974
|
"src/**/*.test.ts"
|
|
@@ -2914,8 +2979,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2914
2979
|
_chunkXIADWDXKjs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2915
2980
|
async function normalizeOptions(tree, options, config) {
|
|
2916
2981
|
let importPath = options.importPath;
|
|
2917
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
2918
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
2982
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _187 => _187.namespace])) {
|
|
2983
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _188 => _188.namespace])}/${options.name}`;
|
|
2919
2984
|
}
|
|
2920
2985
|
if (options.publishable) {
|
|
2921
2986
|
if (!importPath) {
|
|
@@ -3048,7 +3113,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3048
3113
|
name: "StormWorkspaceConfiguration"
|
|
3049
3114
|
});
|
|
3050
3115
|
writeTrace(jsonSchema, config);
|
|
3051
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
3116
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _189 => _189.workspaceRoot]), () => ( findWorkspaceRoot())), _optionalChain([options, 'access', _190 => _190.outputFile, 'optionalAccess', _191 => _191.startsWith, 'call', _192 => _192("./")]) ? "" : "./");
|
|
3052
3117
|
writeTrace(`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
3053
3118
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
3054
3119
|
spaces: 2
|
|
@@ -3334,7 +3399,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3334
3399
|
};
|
|
3335
3400
|
return json;
|
|
3336
3401
|
});
|
|
3337
|
-
_devkit.generateFiles.call(void 0, tree,
|
|
3402
|
+
_devkit.generateFiles.call(void 0, tree, path4.join(__dirname, "files"), projectRoot, {
|
|
3338
3403
|
...options,
|
|
3339
3404
|
pnpmVersion,
|
|
3340
3405
|
nodeVersion
|
|
@@ -1665,7 +1665,11 @@ init_esm_shims();
|
|
|
1665
1665
|
|
|
1666
1666
|
// ../esbuild/src/build.ts
|
|
1667
1667
|
init_esm_shims();
|
|
1668
|
-
import
|
|
1668
|
+
import * as esbuild from "esbuild";
|
|
1669
|
+
import { globbySync } from "globby";
|
|
1670
|
+
|
|
1671
|
+
// ../esbuild/src/assets.ts
|
|
1672
|
+
init_esm_shims();
|
|
1669
1673
|
|
|
1670
1674
|
// ../build-tools/src/index.ts
|
|
1671
1675
|
init_esm_shims();
|
|
@@ -1920,16 +1924,17 @@ import { readFile as readFile4 } from "node:fs/promises";
|
|
|
1920
1924
|
init_esm_shims();
|
|
1921
1925
|
import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
|
|
1922
1926
|
|
|
1923
|
-
// ../esbuild/src/
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1927
|
+
// ../esbuild/src/assets.ts
|
|
1928
|
+
async function copyBuildAssets(context) {
|
|
1929
|
+
if (context.result?.errors.length === 0) {
|
|
1930
|
+
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
1931
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
1932
|
+
await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
1933
|
+
stopwatch();
|
|
1934
|
+
}
|
|
1935
|
+
return context;
|
|
1936
|
+
}
|
|
1937
|
+
__name(copyBuildAssets, "copyBuildAssets");
|
|
1933
1938
|
|
|
1934
1939
|
// ../esbuild/src/clean.ts
|
|
1935
1940
|
init_esm_shims();
|
|
@@ -1942,6 +1947,14 @@ async function cleanDirectories(directory) {
|
|
|
1942
1947
|
}
|
|
1943
1948
|
__name(cleanDirectories, "cleanDirectories");
|
|
1944
1949
|
|
|
1950
|
+
// ../esbuild/src/context.ts
|
|
1951
|
+
init_esm_shims();
|
|
1952
|
+
import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "@nx/devkit";
|
|
1953
|
+
import defu4 from "defu";
|
|
1954
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
1955
|
+
import hf from "node:fs/promises";
|
|
1956
|
+
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
1957
|
+
|
|
1945
1958
|
// ../esbuild/src/config.ts
|
|
1946
1959
|
init_esm_shims();
|
|
1947
1960
|
var DEFAULT_BUILD_OPTIONS = {
|
|
@@ -1988,98 +2001,52 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
1988
2001
|
}
|
|
1989
2002
|
};
|
|
1990
2003
|
|
|
1991
|
-
// ../esbuild/src/plugins/
|
|
2004
|
+
// ../esbuild/src/plugins/resolve-paths.ts
|
|
1992
2005
|
init_esm_shims();
|
|
1993
|
-
import { builtinModules as builtinModules2 } from "node:module";
|
|
1994
2006
|
import path2 from "node:path";
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
"buffer"
|
|
2018
|
-
];
|
|
2019
|
-
var missingIgnore = [
|
|
2020
|
-
".prisma",
|
|
2021
|
-
"@prisma/client",
|
|
2022
|
-
"ts-toolbelt"
|
|
2023
|
-
];
|
|
2024
|
-
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
2025
|
-
name: "storm:deps-check",
|
|
2007
|
+
function resolvePathsConfig(options, cwd) {
|
|
2008
|
+
if (options?.compilerOptions?.paths) {
|
|
2009
|
+
const paths = Object.entries(options.compilerOptions.paths);
|
|
2010
|
+
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2011
|
+
return [
|
|
2012
|
+
key,
|
|
2013
|
+
paths2.map((v) => path2.resolve(cwd, v))
|
|
2014
|
+
];
|
|
2015
|
+
});
|
|
2016
|
+
return Object.fromEntries(resolvedPaths);
|
|
2017
|
+
}
|
|
2018
|
+
if (options.extends) {
|
|
2019
|
+
const extendsPath = path2.resolve(cwd, options.extends);
|
|
2020
|
+
const extendsDir = path2.dirname(extendsPath);
|
|
2021
|
+
const extendsConfig = __require(extendsPath);
|
|
2022
|
+
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2023
|
+
}
|
|
2024
|
+
return [];
|
|
2025
|
+
}
|
|
2026
|
+
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
2027
|
+
var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
|
|
2028
|
+
name: "storm:resolve-paths",
|
|
2026
2029
|
setup(build3) {
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
const
|
|
2030
|
-
const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
|
|
2031
|
-
const peerDependencies = Object.keys(pkgContents["peerDependencies"] ?? {});
|
|
2032
|
-
const dependencies = [
|
|
2033
|
-
...regDependencies,
|
|
2034
|
-
...bundle ? devDependencies : []
|
|
2035
|
-
];
|
|
2036
|
-
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2037
|
-
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2030
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig)) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
2031
|
+
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot);
|
|
2032
|
+
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2038
2033
|
build3.onResolve({
|
|
2039
|
-
filter:
|
|
2034
|
+
filter: packagesRegex
|
|
2040
2035
|
}, (args) => {
|
|
2041
|
-
if (
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
}
|
|
2046
|
-
const [pkg] = args.path.split("/");
|
|
2047
|
-
collectedDependencies.add(pkg);
|
|
2048
|
-
}
|
|
2036
|
+
if (build3.initialOptions.external?.includes(args.path)) {
|
|
2037
|
+
return {
|
|
2038
|
+
path: args.path,
|
|
2039
|
+
external: true
|
|
2040
|
+
};
|
|
2049
2041
|
}
|
|
2050
2042
|
return {
|
|
2051
|
-
|
|
2043
|
+
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2052
2044
|
};
|
|
2053
2045
|
});
|
|
2054
|
-
build3.onEnd(() => {
|
|
2055
|
-
const unusedDependencies = [
|
|
2056
|
-
...dependencies
|
|
2057
|
-
].filter((dep) => {
|
|
2058
|
-
return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
|
|
2059
|
-
});
|
|
2060
|
-
const missingDependencies = [
|
|
2061
|
-
...collectedDependencies
|
|
2062
|
-
].filter((dep) => {
|
|
2063
|
-
return !dependencies.includes(dep) && !builtinModules2.includes(dep);
|
|
2064
|
-
});
|
|
2065
|
-
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2066
|
-
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2067
|
-
});
|
|
2068
|
-
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2069
|
-
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2070
|
-
});
|
|
2071
|
-
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2072
|
-
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2073
|
-
if (filteredMissingDeps.length > 0) {
|
|
2074
|
-
throw new Error(`Missing dependencies detected - please install them:
|
|
2075
|
-
${JSON.stringify(filteredMissingDeps)}
|
|
2076
|
-
`);
|
|
2077
|
-
}
|
|
2078
|
-
});
|
|
2079
2046
|
}
|
|
2080
|
-
}), "
|
|
2047
|
+
}), "resolvePathsPlugin");
|
|
2081
2048
|
|
|
2082
|
-
// ../esbuild/src/
|
|
2049
|
+
// ../esbuild/src/context.ts
|
|
2083
2050
|
async function resolveContext(userOptions) {
|
|
2084
2051
|
const projectRoot = userOptions.projectRoot;
|
|
2085
2052
|
const workspaceRoot3 = findWorkspaceRoot2(projectRoot);
|
|
@@ -2133,7 +2100,7 @@ async function resolveContext(userOptions) {
|
|
|
2133
2100
|
}
|
|
2134
2101
|
};
|
|
2135
2102
|
stopwatch();
|
|
2136
|
-
|
|
2103
|
+
const context = {
|
|
2137
2104
|
options: resolvedOptions,
|
|
2138
2105
|
clean: userOptions.clean !== false,
|
|
2139
2106
|
workspaceConfig,
|
|
@@ -2144,17 +2111,28 @@ async function resolveContext(userOptions) {
|
|
|
2144
2111
|
outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2145
2112
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2146
2113
|
};
|
|
2114
|
+
context.options.esbuildPlugins = [
|
|
2115
|
+
resolvePathsPlugin(context),
|
|
2116
|
+
...context.options.esbuildPlugins ?? []
|
|
2117
|
+
];
|
|
2118
|
+
return context;
|
|
2147
2119
|
}
|
|
2148
2120
|
__name(resolveContext, "resolveContext");
|
|
2121
|
+
|
|
2122
|
+
// ../esbuild/src/package-json.ts
|
|
2123
|
+
init_esm_shims();
|
|
2124
|
+
import { writeJsonFile } from "@nx/devkit";
|
|
2125
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
2126
|
+
import hf2 from "node:fs/promises";
|
|
2149
2127
|
async function generatePackageJson(context) {
|
|
2150
|
-
if (context.options.generatePackageJson !== false &&
|
|
2128
|
+
if (context.options.generatePackageJson !== false && existsSync6(joinPaths(context.options.projectRoot, "package.json"))) {
|
|
2151
2129
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2152
2130
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2153
2131
|
const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
|
|
2154
|
-
if (!
|
|
2132
|
+
if (!existsSync6(packageJsonPath)) {
|
|
2155
2133
|
throw new Error("Cannot find package.json configuration");
|
|
2156
2134
|
}
|
|
2157
|
-
const packageJsonFile = await
|
|
2135
|
+
const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
2158
2136
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2159
2137
|
if (!packageJson) {
|
|
2160
2138
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -2244,6 +2222,101 @@ async function generatePackageJson(context) {
|
|
|
2244
2222
|
return context;
|
|
2245
2223
|
}
|
|
2246
2224
|
__name(generatePackageJson, "generatePackageJson");
|
|
2225
|
+
|
|
2226
|
+
// ../esbuild/src/plugins/deps-check.ts
|
|
2227
|
+
init_esm_shims();
|
|
2228
|
+
import { builtinModules as builtinModules2 } from "node:module";
|
|
2229
|
+
import path3 from "node:path";
|
|
2230
|
+
var unusedIgnore = [
|
|
2231
|
+
// these are our dev dependencies
|
|
2232
|
+
/@types\/.*?/,
|
|
2233
|
+
/@typescript-eslint.*?/,
|
|
2234
|
+
/eslint.*?/,
|
|
2235
|
+
"esbuild",
|
|
2236
|
+
"husky",
|
|
2237
|
+
"is-ci",
|
|
2238
|
+
"lint-staged",
|
|
2239
|
+
"prettier",
|
|
2240
|
+
"typescript",
|
|
2241
|
+
"ts-node",
|
|
2242
|
+
"ts-jest",
|
|
2243
|
+
"@swc/core",
|
|
2244
|
+
"@swc/jest",
|
|
2245
|
+
"jest",
|
|
2246
|
+
// these are missing 3rd party deps
|
|
2247
|
+
"spdx-exceptions",
|
|
2248
|
+
"spdx-license-ids",
|
|
2249
|
+
// type-only, so it is not detected
|
|
2250
|
+
"ts-toolbelt",
|
|
2251
|
+
// these are indirectly used by build
|
|
2252
|
+
"buffer"
|
|
2253
|
+
];
|
|
2254
|
+
var missingIgnore = [
|
|
2255
|
+
".prisma",
|
|
2256
|
+
"@prisma/client",
|
|
2257
|
+
"ts-toolbelt"
|
|
2258
|
+
];
|
|
2259
|
+
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
2260
|
+
name: "storm:deps-check",
|
|
2261
|
+
setup(build3) {
|
|
2262
|
+
const pkgJsonPath = path3.join(process.cwd(), "package.json");
|
|
2263
|
+
const pkgContents = __require(pkgJsonPath);
|
|
2264
|
+
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
2265
|
+
const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
|
|
2266
|
+
const peerDependencies = Object.keys(pkgContents["peerDependencies"] ?? {});
|
|
2267
|
+
const dependencies = [
|
|
2268
|
+
...regDependencies,
|
|
2269
|
+
...bundle ? devDependencies : []
|
|
2270
|
+
];
|
|
2271
|
+
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2272
|
+
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2273
|
+
build3.onResolve({
|
|
2274
|
+
filter: onlyPackages
|
|
2275
|
+
}, (args) => {
|
|
2276
|
+
if (args.importer.includes(process.cwd())) {
|
|
2277
|
+
if (args.path[0] === "@") {
|
|
2278
|
+
const [org, pkg] = args.path.split("/");
|
|
2279
|
+
collectedDependencies.add(`${org}/${pkg}`);
|
|
2280
|
+
} else {
|
|
2281
|
+
const [pkg] = args.path.split("/");
|
|
2282
|
+
collectedDependencies.add(pkg);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
return {
|
|
2286
|
+
external: true
|
|
2287
|
+
};
|
|
2288
|
+
});
|
|
2289
|
+
build3.onEnd(() => {
|
|
2290
|
+
const unusedDependencies = [
|
|
2291
|
+
...dependencies
|
|
2292
|
+
].filter((dep) => {
|
|
2293
|
+
return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
|
|
2294
|
+
});
|
|
2295
|
+
const missingDependencies = [
|
|
2296
|
+
...collectedDependencies
|
|
2297
|
+
].filter((dep) => {
|
|
2298
|
+
return !dependencies.includes(dep) && !builtinModules2.includes(dep);
|
|
2299
|
+
});
|
|
2300
|
+
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2301
|
+
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2302
|
+
});
|
|
2303
|
+
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2304
|
+
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2305
|
+
});
|
|
2306
|
+
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2307
|
+
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2308
|
+
if (filteredMissingDeps.length > 0) {
|
|
2309
|
+
throw new Error(`Missing dependencies detected - please install them:
|
|
2310
|
+
${JSON.stringify(filteredMissingDeps)}
|
|
2311
|
+
`);
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
}), "depsCheckPlugin");
|
|
2316
|
+
|
|
2317
|
+
// ../esbuild/src/tsup.ts
|
|
2318
|
+
init_esm_shims();
|
|
2319
|
+
import { build as tsup } from "tsup";
|
|
2247
2320
|
async function executeTsup(context) {
|
|
2248
2321
|
writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2249
2322
|
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
@@ -2256,16 +2329,8 @@ async function executeTsup(context) {
|
|
|
2256
2329
|
return context;
|
|
2257
2330
|
}
|
|
2258
2331
|
__name(executeTsup, "executeTsup");
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2262
|
-
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2263
|
-
await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
2264
|
-
stopwatch();
|
|
2265
|
-
}
|
|
2266
|
-
return context;
|
|
2267
|
-
}
|
|
2268
|
-
__name(copyBuildAssets, "copyBuildAssets");
|
|
2332
|
+
|
|
2333
|
+
// ../esbuild/src/build.ts
|
|
2269
2334
|
async function reportResults(context) {
|
|
2270
2335
|
if (context.result?.errors.length === 0) {
|
|
2271
2336
|
if (context.result.warnings.length > 0) {
|
|
@@ -2387,7 +2452,7 @@ import { readFile as readFile6 } from "node:fs/promises";
|
|
|
2387
2452
|
|
|
2388
2453
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
2389
2454
|
init_esm_shims();
|
|
2390
|
-
import { existsSync as
|
|
2455
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
2391
2456
|
import { readFile as readFile5, writeFile as writeFile2 } from "node:fs/promises";
|
|
2392
2457
|
import { format } from "prettier";
|
|
2393
2458
|
import readYamlFile from "read-yaml-file";
|
|
@@ -3187,7 +3252,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
3187
3252
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3188
3253
|
init_esm_shims();
|
|
3189
3254
|
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments4, updateJson as updateJson2 } from "@nx/devkit";
|
|
3190
|
-
import * as
|
|
3255
|
+
import * as path4 from "node:path";
|
|
3191
3256
|
async function presetGeneratorFn(tree, options) {
|
|
3192
3257
|
const projectRoot = ".";
|
|
3193
3258
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
@@ -3335,7 +3400,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3335
3400
|
};
|
|
3336
3401
|
return json;
|
|
3337
3402
|
});
|
|
3338
|
-
generateFiles4(tree,
|
|
3403
|
+
generateFiles4(tree, path4.join(__dirname, "files"), projectRoot, {
|
|
3339
3404
|
...options,
|
|
3340
3405
|
pnpmVersion,
|
|
3341
3406
|
nodeVersion
|
|
@@ -4074,7 +4139,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
|
|
|
4074
4139
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4075
4140
|
init_esm_shims();
|
|
4076
4141
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
|
|
4077
|
-
import { existsSync as
|
|
4142
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
4078
4143
|
import { join as join4 } from "node:path";
|
|
4079
4144
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|
|
4080
4145
|
import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
|
|
@@ -4089,13 +4154,13 @@ var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
|
|
|
4089
4154
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4090
4155
|
init_esm_shims();
|
|
4091
4156
|
import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
|
|
4092
|
-
import { existsSync as
|
|
4157
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
4093
4158
|
|
|
4094
4159
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4095
4160
|
init_esm_shims();
|
|
4096
4161
|
import { readJsonFile as readJsonFile3 } from "@nx/devkit";
|
|
4097
4162
|
import defu6 from "defu";
|
|
4098
|
-
import { existsSync as
|
|
4163
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
4099
4164
|
import { dirname, join as join5 } from "node:path";
|
|
4100
4165
|
|
|
4101
4166
|
// ../workspace-tools/src/utils/typia-transform.ts
|
package/dist/generators.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-ZB4VUWHK.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6JFFTGUXjs = require('./chunk-6JFFTGUX.js');
|
|
5
5
|
require('./chunk-IND7PM3L.js');
|
|
6
6
|
require('./chunk-XIADWDXK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.initGeneratorFn =
|
|
9
|
+
exports.initGeneratorFn = _chunk6JFFTGUXjs.initGeneratorFn;
|
package/dist/generators.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkO64Q2V3Cjs = require('./chunk-O64Q2V3C.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk6JFFTGUXjs = require('./chunk-6JFFTGUX.js');
|
|
8
8
|
require('./chunk-IND7PM3L.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ var _chunkXIADWDXKjs = require('./chunk-XIADWDXK.js');
|
|
|
16
16
|
// index.ts
|
|
17
17
|
var index_exports = {};
|
|
18
18
|
_chunkXIADWDXKjs.__export.call(void 0, index_exports, {
|
|
19
|
-
initGeneratorFn: () =>
|
|
19
|
+
initGeneratorFn: () => _chunk6JFFTGUXjs.initGeneratorFn
|
|
20
20
|
});
|
|
21
21
|
_chunkXIADWDXKjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
_chunkXIADWDXKjs.__reExport.call(void 0, index_exports, _chunkXIADWDXKjs.__toESM.call(void 0, _chunkO64Q2V3Cjs.require_components.call(void 0, )));
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.initGeneratorFn =
|
|
25
|
+
exports.initGeneratorFn = _chunk6JFFTGUXjs.initGeneratorFn;
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6JFFTGUXjs = require('../../../chunk-6JFFTGUX.js');
|
|
5
5
|
require('../../../chunk-IND7PM3L.js');
|
|
6
6
|
require('../../../chunk-XIADWDXK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunk6JFFTGUXjs.generator_default; exports.initGeneratorFn = _chunk6JFFTGUXjs.initGeneratorFn;
|