@storm-software/pulumi-tools 0.7.67 → 0.7.69
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 +19 -0
- package/README.md +1 -1
- package/dist/{chunk-2OCDPHEM.mjs → chunk-2OV7DBOM.mjs} +1 -1
- package/dist/{chunk-K3UVSIFL.js → chunk-2S7K2YWW.js} +2 -2
- package/dist/{chunk-NPC4ERNS.mjs → chunk-5NSLLHDJ.mjs} +1 -1
- package/dist/{chunk-7N3FOHDZ.mjs → chunk-625N6KG6.mjs} +1 -1
- package/dist/{chunk-XTXFUYKH.js → chunk-776G4NJY.js} +3 -3
- package/dist/{chunk-MJTFVBSO.mjs → chunk-ARCRGA64.mjs} +1 -1
- package/dist/{chunk-7TEIJ6SC.js → chunk-DA2A7QKP.js} +2 -2
- package/dist/{chunk-DIVSJH6P.mjs → chunk-FEBGVIEL.mjs} +1 -1
- package/dist/{chunk-GCLLADEP.js → chunk-FOQYM54M.js} +219 -161
- package/dist/{chunk-RQTBVYGG.js → chunk-LD5DWD7Q.js} +5 -5
- package/dist/{chunk-GCFK6PSW.js → chunk-PIHBU3AE.js} +2 -2
- package/dist/{chunk-GNJ5ZPI4.mjs → chunk-PLSJAYWB.mjs} +202 -144
- package/dist/{chunk-XG46K4QM.js → chunk-PNDI2UTF.js} +2 -2
- package/dist/{chunk-WC6MV6Q4.mjs → chunk-WCILKMSA.mjs} +1 -1
- package/dist/{chunk-EUF7KKYS.mjs → chunk-WYPP7NRO.mjs} +1 -1
- package/dist/{chunk-Z6MHAZ4B.js → chunk-YRW4EOWU.js} +2 -2
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +7 -7
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/executors/config/executor.js +4 -4
- package/dist/src/executors/config/executor.mjs +3 -3
- package/dist/src/executors/import/executor.js +4 -4
- package/dist/src/executors/import/executor.mjs +3 -3
- package/dist/src/executors/preview/executor.js +4 -4
- package/dist/src/executors/preview/executor.mjs +3 -3
- package/dist/src/executors/refresh/executor.js +4 -4
- package/dist/src/executors/refresh/executor.mjs +3 -3
- package/dist/src/executors/up/executor.js +4 -4
- package/dist/src/executors/up/executor.mjs +3 -3
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +2 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var _chunkDBLK3NPEjs = require('./chunk-DBLK3NPE.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkFOQYM54Mjs = require('./chunk-FOQYM54M.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ var _devkit = require('@nx/devkit');
|
|
|
15
15
|
var _fs = require('fs');
|
|
16
16
|
var _path = require('path');
|
|
17
17
|
async function initGeneratorFn(tree, options, config) {
|
|
18
|
-
const task =
|
|
18
|
+
const task = _chunkFOQYM54Mjs.initGenerator.call(void 0, tree, options);
|
|
19
19
|
_devkit.addProjectConfiguration.call(void 0, tree, options.name || "deployment", {
|
|
20
20
|
root: options.directory || "./deployment",
|
|
21
21
|
projectType: "application",
|
|
@@ -49,11 +49,11 @@ async function initGeneratorFn(tree, options, config) {
|
|
|
49
49
|
return task;
|
|
50
50
|
}
|
|
51
51
|
_chunk3GQAWCBQjs.__name.call(void 0, initGeneratorFn, "initGeneratorFn");
|
|
52
|
-
var generator_default =
|
|
52
|
+
var generator_default = _chunkFOQYM54Mjs.withRunGenerator.call(void 0, "Initialize Storm Pulumi workspace", initGeneratorFn);
|
|
53
53
|
function generateNewPulumiProject(tree, options, config) {
|
|
54
54
|
return () => {
|
|
55
55
|
const template = _chunkDBLK3NPEjs.getCloudTemplateName.call(void 0, options.provider);
|
|
56
|
-
|
|
56
|
+
_chunkFOQYM54Mjs.run.call(void 0, config, [
|
|
57
57
|
`pulumi new ${template}`,
|
|
58
58
|
`--name=${options.name || "deployment"}`,
|
|
59
59
|
`--dir=${options.directory || "./deployment"}`,
|
|
@@ -73,7 +73,7 @@ function loginToPulumi(tree, options, config) {
|
|
|
73
73
|
if (options.login.startsWith("file://")) {
|
|
74
74
|
options.login = `file://${tree.root}/${options.directory || "./deployment"}/${options.login.replace("file://", "")}`;
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
_chunkFOQYM54Mjs.run.call(void 0, config, [
|
|
77
77
|
"pulumi login",
|
|
78
78
|
options.login
|
|
79
79
|
].filter(Boolean).join(" "), _path.join.call(void 0, config.workspaceRoot, options.directory || "./deployment"), "inherit", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk776G4NJYjs = require('./chunk-776G4NJY.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/up/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk776G4NJYjs.withPulumiExecutor.call(void 0, "up", (options) => [
|
|
7
7
|
"--suppress-progress",
|
|
8
8
|
options.stack && `--stack=${options.stack}`,
|
|
9
9
|
options.skipPreview && "--skip-preview",
|
|
@@ -277,65 +277,65 @@ __name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
|
277
277
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
278
278
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
279
279
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
280
|
-
var correctPaths = /* @__PURE__ */ __name(function(
|
|
281
|
-
if (!
|
|
280
|
+
var correctPaths = /* @__PURE__ */ __name(function(path5) {
|
|
281
|
+
if (!path5 || path5.length === 0) {
|
|
282
282
|
return ".";
|
|
283
283
|
}
|
|
284
|
-
|
|
285
|
-
const isUNCPath =
|
|
286
|
-
const isPathAbsolute = isAbsolute(
|
|
287
|
-
const trailingSeparator =
|
|
288
|
-
|
|
289
|
-
if (
|
|
284
|
+
path5 = normalizeWindowsPath(path5);
|
|
285
|
+
const isUNCPath = path5.match(_UNC_REGEX);
|
|
286
|
+
const isPathAbsolute = isAbsolute(path5);
|
|
287
|
+
const trailingSeparator = path5[path5.length - 1] === "/";
|
|
288
|
+
path5 = normalizeString(path5, !isPathAbsolute);
|
|
289
|
+
if (path5.length === 0) {
|
|
290
290
|
if (isPathAbsolute) {
|
|
291
291
|
return "/";
|
|
292
292
|
}
|
|
293
293
|
return trailingSeparator ? "./" : ".";
|
|
294
294
|
}
|
|
295
295
|
if (trailingSeparator) {
|
|
296
|
-
|
|
296
|
+
path5 += "/";
|
|
297
297
|
}
|
|
298
|
-
if (_DRIVE_LETTER_RE.test(
|
|
299
|
-
|
|
298
|
+
if (_DRIVE_LETTER_RE.test(path5)) {
|
|
299
|
+
path5 += "/";
|
|
300
300
|
}
|
|
301
301
|
if (isUNCPath) {
|
|
302
302
|
if (!isPathAbsolute) {
|
|
303
|
-
return `//./${
|
|
303
|
+
return `//./${path5}`;
|
|
304
304
|
}
|
|
305
|
-
return `//${
|
|
305
|
+
return `//${path5}`;
|
|
306
306
|
}
|
|
307
|
-
return isPathAbsolute && !isAbsolute(
|
|
307
|
+
return isPathAbsolute && !isAbsolute(path5) ? `/${path5}` : path5;
|
|
308
308
|
}, "correctPaths");
|
|
309
309
|
var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
310
|
-
let
|
|
310
|
+
let path5 = "";
|
|
311
311
|
for (const seg of segments) {
|
|
312
312
|
if (!seg) {
|
|
313
313
|
continue;
|
|
314
314
|
}
|
|
315
|
-
if (
|
|
316
|
-
const pathTrailing =
|
|
315
|
+
if (path5.length > 0) {
|
|
316
|
+
const pathTrailing = path5[path5.length - 1] === "/";
|
|
317
317
|
const segLeading = seg[0] === "/";
|
|
318
318
|
const both = pathTrailing && segLeading;
|
|
319
319
|
if (both) {
|
|
320
|
-
|
|
320
|
+
path5 += seg.slice(1);
|
|
321
321
|
} else {
|
|
322
|
-
|
|
322
|
+
path5 += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
323
323
|
}
|
|
324
324
|
} else {
|
|
325
|
-
|
|
325
|
+
path5 += seg;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
return correctPaths(
|
|
328
|
+
return correctPaths(path5);
|
|
329
329
|
}, "joinPaths");
|
|
330
|
-
function normalizeString(
|
|
330
|
+
function normalizeString(path5, allowAboveRoot) {
|
|
331
331
|
let res = "";
|
|
332
332
|
let lastSegmentLength = 0;
|
|
333
333
|
let lastSlash = -1;
|
|
334
334
|
let dots = 0;
|
|
335
335
|
let char = null;
|
|
336
|
-
for (let index = 0; index <=
|
|
337
|
-
if (index <
|
|
338
|
-
char =
|
|
336
|
+
for (let index = 0; index <= path5.length; ++index) {
|
|
337
|
+
if (index < path5.length) {
|
|
338
|
+
char = path5[index];
|
|
339
339
|
} else if (char === "/") {
|
|
340
340
|
break;
|
|
341
341
|
} else {
|
|
@@ -371,9 +371,9 @@ function normalizeString(path4, allowAboveRoot) {
|
|
|
371
371
|
}
|
|
372
372
|
} else {
|
|
373
373
|
if (res.length > 0) {
|
|
374
|
-
res += `/${
|
|
374
|
+
res += `/${path5.slice(lastSlash + 1, index)}`;
|
|
375
375
|
} else {
|
|
376
|
-
res =
|
|
376
|
+
res = path5.slice(lastSlash + 1, index);
|
|
377
377
|
}
|
|
378
378
|
lastSegmentLength = index - lastSlash - 1;
|
|
379
379
|
}
|
|
@@ -1831,7 +1831,8 @@ import { logger } from "@nx/devkit";
|
|
|
1831
1831
|
var LARGE_BUFFER2 = 1024 * 1e6;
|
|
1832
1832
|
|
|
1833
1833
|
// ../esbuild/src/build.ts
|
|
1834
|
-
import
|
|
1834
|
+
import * as esbuild from "esbuild";
|
|
1835
|
+
import { globbySync } from "globby";
|
|
1835
1836
|
|
|
1836
1837
|
// ../build-tools/src/config.ts
|
|
1837
1838
|
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
@@ -2052,16 +2053,17 @@ import { readFile as readFile4 } from "node:fs/promises";
|
|
|
2052
2053
|
// ../build-tools/src/utilities/task-graph.ts
|
|
2053
2054
|
import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
|
|
2054
2055
|
|
|
2055
|
-
// ../esbuild/src/
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2056
|
+
// ../esbuild/src/assets.ts
|
|
2057
|
+
async function copyBuildAssets(context) {
|
|
2058
|
+
if (context.result?.errors.length === 0) {
|
|
2059
|
+
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2060
|
+
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2061
|
+
await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
2062
|
+
stopwatch();
|
|
2063
|
+
}
|
|
2064
|
+
return context;
|
|
2065
|
+
}
|
|
2066
|
+
__name(copyBuildAssets, "copyBuildAssets");
|
|
2065
2067
|
|
|
2066
2068
|
// ../esbuild/src/clean.ts
|
|
2067
2069
|
import { rm } from "node:fs/promises";
|
|
@@ -2073,6 +2075,13 @@ async function cleanDirectories(directory) {
|
|
|
2073
2075
|
}
|
|
2074
2076
|
__name(cleanDirectories, "cleanDirectories");
|
|
2075
2077
|
|
|
2078
|
+
// ../esbuild/src/context.ts
|
|
2079
|
+
import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "@nx/devkit";
|
|
2080
|
+
import defu4 from "defu";
|
|
2081
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
2082
|
+
import hf from "node:fs/promises";
|
|
2083
|
+
import { findWorkspaceRoot as findWorkspaceRoot2 } from "nx/src/utils/find-workspace-root";
|
|
2084
|
+
|
|
2076
2085
|
// ../esbuild/src/config.ts
|
|
2077
2086
|
var DEFAULT_BUILD_OPTIONS = {
|
|
2078
2087
|
assets: [],
|
|
@@ -2086,6 +2095,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2086
2095
|
keepNames: true,
|
|
2087
2096
|
metafile: false,
|
|
2088
2097
|
treeshake: true,
|
|
2098
|
+
splitting: true,
|
|
2089
2099
|
shims: false,
|
|
2090
2100
|
watch: false,
|
|
2091
2101
|
bundle: true,
|
|
@@ -2117,97 +2127,51 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
2117
2127
|
}
|
|
2118
2128
|
};
|
|
2119
2129
|
|
|
2120
|
-
// ../esbuild/src/plugins/
|
|
2121
|
-
import { builtinModules as builtinModules2 } from "node:module";
|
|
2130
|
+
// ../esbuild/src/plugins/resolve-paths.ts
|
|
2122
2131
|
import path2 from "node:path";
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
"buffer"
|
|
2146
|
-
];
|
|
2147
|
-
var missingIgnore = [
|
|
2148
|
-
".prisma",
|
|
2149
|
-
"@prisma/client",
|
|
2150
|
-
"ts-toolbelt"
|
|
2151
|
-
];
|
|
2152
|
-
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
2153
|
-
name: "storm:deps-check",
|
|
2132
|
+
function resolvePathsConfig(options, cwd) {
|
|
2133
|
+
if (options?.compilerOptions?.paths) {
|
|
2134
|
+
const paths = Object.entries(options.compilerOptions.paths);
|
|
2135
|
+
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
2136
|
+
return [
|
|
2137
|
+
key,
|
|
2138
|
+
paths2.map((v) => path2.resolve(cwd, v))
|
|
2139
|
+
];
|
|
2140
|
+
});
|
|
2141
|
+
return Object.fromEntries(resolvedPaths);
|
|
2142
|
+
}
|
|
2143
|
+
if (options.extends) {
|
|
2144
|
+
const extendsPath = path2.resolve(cwd, options.extends);
|
|
2145
|
+
const extendsDir = path2.dirname(extendsPath);
|
|
2146
|
+
const extendsConfig = __require(extendsPath);
|
|
2147
|
+
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
2148
|
+
}
|
|
2149
|
+
return [];
|
|
2150
|
+
}
|
|
2151
|
+
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
2152
|
+
var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
|
|
2153
|
+
name: "storm:resolve-paths",
|
|
2154
2154
|
setup(build3) {
|
|
2155
|
-
const
|
|
2156
|
-
const
|
|
2157
|
-
const
|
|
2158
|
-
const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
|
|
2159
|
-
const peerDependencies = Object.keys(pkgContents["peerDependencies"] ?? {});
|
|
2160
|
-
const dependencies = [
|
|
2161
|
-
...regDependencies,
|
|
2162
|
-
...bundle ? devDependencies : []
|
|
2163
|
-
];
|
|
2164
|
-
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2165
|
-
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2155
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig)) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
2156
|
+
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot);
|
|
2157
|
+
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
2166
2158
|
build3.onResolve({
|
|
2167
|
-
filter:
|
|
2159
|
+
filter: packagesRegex
|
|
2168
2160
|
}, (args) => {
|
|
2169
|
-
if (
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
}
|
|
2174
|
-
const [pkg] = args.path.split("/");
|
|
2175
|
-
collectedDependencies.add(pkg);
|
|
2176
|
-
}
|
|
2161
|
+
if (build3.initialOptions.external?.includes(args.path)) {
|
|
2162
|
+
return {
|
|
2163
|
+
path: args.path,
|
|
2164
|
+
external: true
|
|
2165
|
+
};
|
|
2177
2166
|
}
|
|
2178
2167
|
return {
|
|
2179
|
-
|
|
2168
|
+
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
2180
2169
|
};
|
|
2181
2170
|
});
|
|
2182
|
-
build3.onEnd(() => {
|
|
2183
|
-
const unusedDependencies = [
|
|
2184
|
-
...dependencies
|
|
2185
|
-
].filter((dep) => {
|
|
2186
|
-
return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
|
|
2187
|
-
});
|
|
2188
|
-
const missingDependencies = [
|
|
2189
|
-
...collectedDependencies
|
|
2190
|
-
].filter((dep) => {
|
|
2191
|
-
return !dependencies.includes(dep) && !builtinModules2.includes(dep);
|
|
2192
|
-
});
|
|
2193
|
-
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2194
|
-
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2195
|
-
});
|
|
2196
|
-
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2197
|
-
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2198
|
-
});
|
|
2199
|
-
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2200
|
-
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2201
|
-
if (filteredMissingDeps.length > 0) {
|
|
2202
|
-
throw new Error(`Missing dependencies detected - please install them:
|
|
2203
|
-
${JSON.stringify(filteredMissingDeps)}
|
|
2204
|
-
`);
|
|
2205
|
-
}
|
|
2206
|
-
});
|
|
2207
2171
|
}
|
|
2208
|
-
}), "
|
|
2172
|
+
}), "resolvePathsPlugin");
|
|
2209
2173
|
|
|
2210
|
-
// ../esbuild/src/
|
|
2174
|
+
// ../esbuild/src/context.ts
|
|
2211
2175
|
async function resolveContext(userOptions) {
|
|
2212
2176
|
const projectRoot = userOptions.projectRoot;
|
|
2213
2177
|
const workspaceRoot3 = findWorkspaceRoot2(projectRoot);
|
|
@@ -2234,24 +2198,23 @@ async function resolveContext(userOptions) {
|
|
|
2234
2198
|
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.");
|
|
2235
2199
|
}
|
|
2236
2200
|
const options = defu4(userOptions, DEFAULT_BUILD_OPTIONS);
|
|
2201
|
+
options.name ??= projectName;
|
|
2237
2202
|
const packageJsonPath = joinPaths(workspaceRoot3.dir, options.projectRoot, "package.json");
|
|
2238
2203
|
if (!existsSync5(packageJsonPath)) {
|
|
2239
2204
|
throw new Error("Cannot find package.json configuration");
|
|
2240
2205
|
}
|
|
2241
2206
|
const env = getEnv("esbuild", options);
|
|
2207
|
+
const define = defu4(options.define ?? {}, env ?? {});
|
|
2242
2208
|
const resolvedOptions = {
|
|
2243
|
-
name: projectName,
|
|
2244
2209
|
...options,
|
|
2245
2210
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2246
2211
|
metafile: userOptions.mode === "development",
|
|
2247
2212
|
clean: false,
|
|
2248
|
-
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
2249
2213
|
env,
|
|
2250
2214
|
define: {
|
|
2251
2215
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
2252
|
-
...
|
|
2253
|
-
|
|
2254
|
-
const value = JSON.stringify(env[key]);
|
|
2216
|
+
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
2217
|
+
const value = JSON.stringify(define[key]);
|
|
2255
2218
|
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
2256
2219
|
return {
|
|
2257
2220
|
...res,
|
|
@@ -2262,7 +2225,7 @@ async function resolveContext(userOptions) {
|
|
|
2262
2225
|
}
|
|
2263
2226
|
};
|
|
2264
2227
|
stopwatch();
|
|
2265
|
-
|
|
2228
|
+
const context = {
|
|
2266
2229
|
options: resolvedOptions,
|
|
2267
2230
|
clean: userOptions.clean !== false,
|
|
2268
2231
|
workspaceConfig,
|
|
@@ -2273,17 +2236,27 @@ async function resolveContext(userOptions) {
|
|
|
2273
2236
|
outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2274
2237
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2275
2238
|
};
|
|
2239
|
+
context.options.esbuildPlugins = [
|
|
2240
|
+
resolvePathsPlugin(context),
|
|
2241
|
+
...context.options.esbuildPlugins ?? []
|
|
2242
|
+
];
|
|
2243
|
+
return context;
|
|
2276
2244
|
}
|
|
2277
2245
|
__name(resolveContext, "resolveContext");
|
|
2246
|
+
|
|
2247
|
+
// ../esbuild/src/package-json.ts
|
|
2248
|
+
import { writeJsonFile } from "@nx/devkit";
|
|
2249
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
2250
|
+
import hf2 from "node:fs/promises";
|
|
2278
2251
|
async function generatePackageJson(context) {
|
|
2279
|
-
if (context.options.generatePackageJson !== false &&
|
|
2252
|
+
if (context.options.generatePackageJson !== false && existsSync6(joinPaths(context.options.projectRoot, "package.json"))) {
|
|
2280
2253
|
writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2281
2254
|
const stopwatch = getStopwatch("Write package.json file");
|
|
2282
2255
|
const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
|
|
2283
|
-
if (!
|
|
2256
|
+
if (!existsSync6(packageJsonPath)) {
|
|
2284
2257
|
throw new Error("Cannot find package.json configuration");
|
|
2285
2258
|
}
|
|
2286
|
-
const packageJsonFile = await
|
|
2259
|
+
const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
2287
2260
|
let packageJson = JSON.parse(packageJsonFile);
|
|
2288
2261
|
if (!packageJson) {
|
|
2289
2262
|
throw new Error("Cannot find package.json configuration file");
|
|
@@ -2373,6 +2346,99 @@ async function generatePackageJson(context) {
|
|
|
2373
2346
|
return context;
|
|
2374
2347
|
}
|
|
2375
2348
|
__name(generatePackageJson, "generatePackageJson");
|
|
2349
|
+
|
|
2350
|
+
// ../esbuild/src/plugins/deps-check.ts
|
|
2351
|
+
import { builtinModules as builtinModules2 } from "node:module";
|
|
2352
|
+
import path3 from "node:path";
|
|
2353
|
+
var unusedIgnore = [
|
|
2354
|
+
// these are our dev dependencies
|
|
2355
|
+
/@types\/.*?/,
|
|
2356
|
+
/@typescript-eslint.*?/,
|
|
2357
|
+
/eslint.*?/,
|
|
2358
|
+
"esbuild",
|
|
2359
|
+
"husky",
|
|
2360
|
+
"is-ci",
|
|
2361
|
+
"lint-staged",
|
|
2362
|
+
"prettier",
|
|
2363
|
+
"typescript",
|
|
2364
|
+
"ts-node",
|
|
2365
|
+
"ts-jest",
|
|
2366
|
+
"@swc/core",
|
|
2367
|
+
"@swc/jest",
|
|
2368
|
+
"jest",
|
|
2369
|
+
// these are missing 3rd party deps
|
|
2370
|
+
"spdx-exceptions",
|
|
2371
|
+
"spdx-license-ids",
|
|
2372
|
+
// type-only, so it is not detected
|
|
2373
|
+
"ts-toolbelt",
|
|
2374
|
+
// these are indirectly used by build
|
|
2375
|
+
"buffer"
|
|
2376
|
+
];
|
|
2377
|
+
var missingIgnore = [
|
|
2378
|
+
".prisma",
|
|
2379
|
+
"@prisma/client",
|
|
2380
|
+
"ts-toolbelt"
|
|
2381
|
+
];
|
|
2382
|
+
var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
|
|
2383
|
+
name: "storm:deps-check",
|
|
2384
|
+
setup(build3) {
|
|
2385
|
+
const pkgJsonPath = path3.join(process.cwd(), "package.json");
|
|
2386
|
+
const pkgContents = __require(pkgJsonPath);
|
|
2387
|
+
const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
|
|
2388
|
+
const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
|
|
2389
|
+
const peerDependencies = Object.keys(pkgContents["peerDependencies"] ?? {});
|
|
2390
|
+
const dependencies = [
|
|
2391
|
+
...regDependencies,
|
|
2392
|
+
...bundle ? devDependencies : []
|
|
2393
|
+
];
|
|
2394
|
+
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
2395
|
+
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
2396
|
+
build3.onResolve({
|
|
2397
|
+
filter: onlyPackages
|
|
2398
|
+
}, (args) => {
|
|
2399
|
+
if (args.importer.includes(process.cwd())) {
|
|
2400
|
+
if (args.path[0] === "@") {
|
|
2401
|
+
const [org, pkg] = args.path.split("/");
|
|
2402
|
+
collectedDependencies.add(`${org}/${pkg}`);
|
|
2403
|
+
} else {
|
|
2404
|
+
const [pkg] = args.path.split("/");
|
|
2405
|
+
collectedDependencies.add(pkg);
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
return {
|
|
2409
|
+
external: true
|
|
2410
|
+
};
|
|
2411
|
+
});
|
|
2412
|
+
build3.onEnd(() => {
|
|
2413
|
+
const unusedDependencies = [
|
|
2414
|
+
...dependencies
|
|
2415
|
+
].filter((dep) => {
|
|
2416
|
+
return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
|
|
2417
|
+
});
|
|
2418
|
+
const missingDependencies = [
|
|
2419
|
+
...collectedDependencies
|
|
2420
|
+
].filter((dep) => {
|
|
2421
|
+
return !dependencies.includes(dep) && !builtinModules2.includes(dep);
|
|
2422
|
+
});
|
|
2423
|
+
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
2424
|
+
return !unusedIgnore.some((pattern) => dep.match(pattern));
|
|
2425
|
+
});
|
|
2426
|
+
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
2427
|
+
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
2428
|
+
});
|
|
2429
|
+
writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
2430
|
+
writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
2431
|
+
if (filteredMissingDeps.length > 0) {
|
|
2432
|
+
throw new Error(`Missing dependencies detected - please install them:
|
|
2433
|
+
${JSON.stringify(filteredMissingDeps)}
|
|
2434
|
+
`);
|
|
2435
|
+
}
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
}), "depsCheckPlugin");
|
|
2439
|
+
|
|
2440
|
+
// ../esbuild/src/tsup.ts
|
|
2441
|
+
import { build as tsup } from "tsup";
|
|
2376
2442
|
async function executeTsup(context) {
|
|
2377
2443
|
writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2378
2444
|
const stopwatch = getStopwatch(`${context.options.name} build`);
|
|
@@ -2385,16 +2451,8 @@ async function executeTsup(context) {
|
|
|
2385
2451
|
return context;
|
|
2386
2452
|
}
|
|
2387
2453
|
__name(executeTsup, "executeTsup");
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2391
|
-
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
2392
|
-
await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
2393
|
-
stopwatch();
|
|
2394
|
-
}
|
|
2395
|
-
return context;
|
|
2396
|
-
}
|
|
2397
|
-
__name(copyBuildAssets, "copyBuildAssets");
|
|
2454
|
+
|
|
2455
|
+
// ../esbuild/src/build.ts
|
|
2398
2456
|
async function reportResults(context) {
|
|
2399
2457
|
if (context.result?.errors.length === 0) {
|
|
2400
2458
|
if (context.result.warnings.length > 0) {
|
|
@@ -2514,7 +2572,7 @@ import { execSync as execSync4 } from "node:child_process";
|
|
|
2514
2572
|
import { readFile as readFile6 } from "node:fs/promises";
|
|
2515
2573
|
|
|
2516
2574
|
// ../workspace-tools/src/utils/pnpm-deps-update.ts
|
|
2517
|
-
import { existsSync as
|
|
2575
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
2518
2576
|
import { readFile as readFile5, writeFile as writeFile2 } from "node:fs/promises";
|
|
2519
2577
|
import { format } from "prettier";
|
|
2520
2578
|
import readYamlFile from "read-yaml-file";
|
|
@@ -3213,7 +3271,7 @@ var generator_default4 = withRunGenerator("TypeScript Library Creator (NodeJs Pl
|
|
|
3213
3271
|
|
|
3214
3272
|
// ../workspace-tools/src/generators/preset/generator.ts
|
|
3215
3273
|
import { addDependenciesToPackageJson as addDependenciesToPackageJson3, addProjectConfiguration as addProjectConfiguration2, formatFiles as formatFiles7, generateFiles as generateFiles4, joinPathFragments as joinPathFragments4, updateJson as updateJson2 } from "@nx/devkit";
|
|
3216
|
-
import * as
|
|
3274
|
+
import * as path4 from "node:path";
|
|
3217
3275
|
async function presetGeneratorFn(tree, options) {
|
|
3218
3276
|
const projectRoot = ".";
|
|
3219
3277
|
options.description ??= `\u26A1The ${options.namespace ? options.namespace : options.name} monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.`;
|
|
@@ -3361,7 +3419,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
3361
3419
|
};
|
|
3362
3420
|
return json;
|
|
3363
3421
|
});
|
|
3364
|
-
generateFiles4(tree,
|
|
3422
|
+
generateFiles4(tree, path4.join(__dirname, "files"), projectRoot, {
|
|
3365
3423
|
...options,
|
|
3366
3424
|
pnpmVersion,
|
|
3367
3425
|
nodeVersion
|
|
@@ -4069,7 +4127,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
|
|
|
4069
4127
|
|
|
4070
4128
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
4071
4129
|
import { output as output2, readJsonFile, workspaceRoot as workspaceRoot2 } from "@nx/devkit";
|
|
4072
|
-
import { existsSync as
|
|
4130
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
4073
4131
|
import { join as join4 } from "node:path";
|
|
4074
4132
|
import { getNpmLockfileDependencies, getNpmLockfileNodes } from "nx/src/plugins/js/lock-file/npm-parser";
|
|
4075
4133
|
import { getPnpmLockfileDependencies, getPnpmLockfileNodes } from "nx/src/plugins/js/lock-file/pnpm-parser";
|
|
@@ -4083,12 +4141,12 @@ var PNPM_LOCK_PATH = join4(workspaceRoot2, PNPM_LOCK_FILE);
|
|
|
4083
4141
|
|
|
4084
4142
|
// ../workspace-tools/src/utils/package-helpers.ts
|
|
4085
4143
|
import { joinPathFragments as joinPathFragments6, readJsonFile as readJsonFile2 } from "@nx/devkit";
|
|
4086
|
-
import { existsSync as
|
|
4144
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
4087
4145
|
|
|
4088
4146
|
// ../workspace-tools/src/utils/plugin-helpers.ts
|
|
4089
4147
|
import { readJsonFile as readJsonFile3 } from "@nx/devkit";
|
|
4090
4148
|
import defu6 from "defu";
|
|
4091
|
-
import { existsSync as
|
|
4149
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
4092
4150
|
import { dirname, join as join5 } from "node:path";
|
|
4093
4151
|
|
|
4094
4152
|
// ../workspace-tools/src/utils/typia-transform.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk776G4NJYjs = require('./chunk-776G4NJY.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/import/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk776G4NJYjs.withPulumiExecutor.call(void 0, "import", (options) => [
|
|
7
7
|
options.target,
|
|
8
8
|
options.name,
|
|
9
9
|
options.id,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk776G4NJYjs = require('./chunk-776G4NJY.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/preview/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk776G4NJYjs.withPulumiExecutor.call(void 0, "preview", (options) => [
|
|
7
7
|
options.stack && `--stack=${options.stack}`,
|
|
8
8
|
options.expectNoChanges && "--expect-no-changes"
|
|
9
9
|
]);
|
package/dist/executors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";require('./chunk-XO62WWX4.js');
|
|
2
|
-
require('./chunk-
|
|
3
|
-
require('./chunk-
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
2
|
+
require('./chunk-PNDI2UTF.js');
|
|
3
|
+
require('./chunk-YRW4EOWU.js');
|
|
4
|
+
require('./chunk-DA2A7QKP.js');
|
|
5
|
+
require('./chunk-PIHBU3AE.js');
|
|
6
|
+
require('./chunk-2S7K2YWW.js');
|
|
7
|
+
require('./chunk-776G4NJY.js');
|
|
8
|
+
require('./chunk-FOQYM54M.js');
|
|
9
9
|
require('./chunk-3GQAWCBQ.js');
|