@storm-software/pulumi-tools 0.7.6 → 0.7.7
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 +6 -0
- package/README.md +1 -1
- package/dist/{chunk-N3H4DK4E.js → chunk-4MNRVJBF.js} +2 -2
- package/dist/{chunk-QY3JQOCP.mjs → chunk-5KRAE47F.mjs} +1 -1
- package/dist/{chunk-XXWYXYXW.js → chunk-66GYR4FX.js} +3 -3
- package/dist/{chunk-IAZVTGHA.js → chunk-6ZI7MLK7.js} +2 -2
- package/dist/{chunk-I7VABIBI.js → chunk-7ALOOHZY.js} +2 -2
- package/dist/{chunk-JTC66DXK.mjs → chunk-7YUTXFKP.mjs} +43 -26
- package/dist/{chunk-YXVSSAJ7.js → chunk-AVFBZGZZ.js} +5 -5
- package/dist/{chunk-ARPHB535.mjs → chunk-BWD4IQMU.mjs} +1 -1
- package/dist/{chunk-O6PGI6V3.mjs → chunk-BZMBVFY5.mjs} +1 -1
- package/dist/{chunk-P6YUXTRU.mjs → chunk-FMLVQLV6.mjs} +1 -1
- package/dist/{chunk-6DP5HHF5.js → chunk-J2DCPJAQ.js} +2 -2
- package/dist/{chunk-32GFYKQ3.js → chunk-KBNEAYZB.js} +2 -2
- package/dist/{chunk-B5MURCIC.mjs → chunk-QBDI6KP3.mjs} +1 -1
- package/dist/{chunk-PZVSIXQ3.mjs → chunk-WDVWSYTG.mjs} +1 -1
- package/dist/{chunk-CXWKMDJU.mjs → chunk-WNK5UV25.mjs} +1 -1
- package/dist/{chunk-FN7UDXGG.js → chunk-XU5K2TI2.js} +43 -26
- package/dist/executors.d.mts +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.js +7 -7
- package/dist/executors.mjs +7 -7
- package/dist/{generators-tDFGjZKk.d.mts → generators-9HIDBCUE.d.mts} +1 -1
- package/dist/{generators-CDh2w5jS.d.ts → generators-BqtVID0f.d.ts} +1 -1
- package/dist/generators.d.mts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/src/base/base-executor.d.mts +1 -1
- package/dist/src/base/base-executor.d.ts +1 -1
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/index.d.mts +1 -1
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/base/index.js +3 -3
- package/dist/src/base/index.mjs +2 -2
- package/dist/src/executors/config/executor.d.mts +1 -1
- package/dist/src/executors/config/executor.d.ts +1 -1
- package/dist/src/executors/config/executor.js +4 -4
- package/dist/src/executors/config/executor.mjs +3 -3
- package/dist/src/executors/import/executor.d.mts +1 -1
- package/dist/src/executors/import/executor.d.ts +1 -1
- package/dist/src/executors/import/executor.js +4 -4
- package/dist/src/executors/import/executor.mjs +3 -3
- package/dist/src/executors/preview/executor.d.mts +1 -1
- package/dist/src/executors/preview/executor.d.ts +1 -1
- package/dist/src/executors/preview/executor.js +4 -4
- package/dist/src/executors/preview/executor.mjs +3 -3
- package/dist/src/executors/refresh/executor.d.mts +1 -1
- package/dist/src/executors/refresh/executor.d.ts +1 -1
- package/dist/src/executors/refresh/executor.js +4 -4
- package/dist/src/executors/refresh/executor.mjs +3 -3
- package/dist/src/executors/up/executor.d.mts +1 -1
- package/dist/src/executors/up/executor.d.ts +1 -1
- package/dist/src/executors/up/executor.js +4 -4
- package/dist/src/executors/up/executor.mjs +3 -3
- package/dist/src/generators/init/generator.d.mts +2 -2
- package/dist/src/generators/init/generator.d.ts +2 -2
- package/dist/src/generators/init/generator.js +3 -3
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/{types-CMF_wowV.d.mts → types-HiZpltUX.d.mts} +3 -0
- package/dist/{types-CMF_wowV.d.ts → types-HiZpltUX.d.ts} +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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 -->
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk66GYR4FXjs = require('./chunk-66GYR4FX.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/up/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk66GYR4FXjs.withPulumiExecutor.call(void 0, "up", (options) => [
|
|
7
7
|
"--suppress-progress",
|
|
8
8
|
options.stack && `--stack=${options.stack}`,
|
|
9
9
|
options.skipPreview && "--skip-preview",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXU5K2TI2js = require('./chunk-XU5K2TI2.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -10,7 +10,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
10
10
|
var _path = require('path');
|
|
11
11
|
var _shelljs = require('shelljs');
|
|
12
12
|
var withPulumiExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (command, argsMapper, executorOptions = {}) => async (_options, context) => {
|
|
13
|
-
return
|
|
13
|
+
return _chunkXU5K2TI2js.withRunExecutor.call(void 0, `Pulumi \`${command}\` Command Executor`, async (options, context2, config) => {
|
|
14
14
|
if (!_shelljs.which.call(void 0, "pulumi")) {
|
|
15
15
|
throw new Error("Pulumi is not installed. Please install it before running this executor.");
|
|
16
16
|
}
|
|
@@ -18,7 +18,7 @@ var withPulumiExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (c
|
|
|
18
18
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
19
19
|
}
|
|
20
20
|
const { sourceRoot } = context2.projectsConfigurations.projects[context2.projectName];
|
|
21
|
-
|
|
21
|
+
_chunkXU5K2TI2js.run.call(void 0, config, [
|
|
22
22
|
"pulumi",
|
|
23
23
|
command,
|
|
24
24
|
...argsMapper(options)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk66GYR4FXjs = require('./chunk-66GYR4FX.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/config/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk66GYR4FXjs.withPulumiExecutor.call(void 0, "config", (options) => [
|
|
7
7
|
options.action,
|
|
8
8
|
options.showSecrets && `--show-secrets`,
|
|
9
9
|
options.secret && `--secret`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk66GYR4FXjs = require('./chunk-66GYR4FX.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/import/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk66GYR4FXjs.withPulumiExecutor.call(void 0, "import", (options) => [
|
|
7
7
|
options.target,
|
|
8
8
|
options.name,
|
|
9
9
|
options.id,
|
|
@@ -155,7 +155,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
155
155
|
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)")
|
|
156
156
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
157
157
|
var StormConfigSchema = z.object({
|
|
158
|
-
$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"),
|
|
158
|
+
$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"),
|
|
159
159
|
extends: ExtendsSchema.optional(),
|
|
160
160
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
161
161
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -197,6 +197,7 @@ var StormConfigSchema = z.object({
|
|
|
197
197
|
"trace",
|
|
198
198
|
"all"
|
|
199
199
|
]).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`)."),
|
|
200
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
200
201
|
registry: RegistryConfigSchema,
|
|
201
202
|
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."),
|
|
202
203
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -359,14 +360,17 @@ import { existsSync } from "node:fs";
|
|
|
359
360
|
import { join } from "node:path";
|
|
360
361
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
361
362
|
var depth = 0;
|
|
362
|
-
function findFolderUp(startPath, endFileNames) {
|
|
363
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
363
364
|
const _startPath = startPath ?? process.cwd();
|
|
365
|
+
if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
|
|
366
|
+
return _startPath;
|
|
367
|
+
}
|
|
364
368
|
if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
|
|
365
369
|
return _startPath;
|
|
366
370
|
}
|
|
367
371
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
368
372
|
const parent = join(_startPath, "..");
|
|
369
|
-
return findFolderUp(parent, endFileNames);
|
|
373
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
370
374
|
}
|
|
371
375
|
return void 0;
|
|
372
376
|
}
|
|
@@ -374,17 +378,17 @@ __name(findFolderUp, "findFolderUp");
|
|
|
374
378
|
|
|
375
379
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
376
380
|
var rootFiles = [
|
|
377
|
-
"storm.json",
|
|
378
|
-
"storm.json",
|
|
379
|
-
"storm.yaml",
|
|
380
|
-
"storm.yml",
|
|
381
|
-
"storm.js",
|
|
382
|
-
"storm.ts",
|
|
383
|
-
".storm.json",
|
|
384
|
-
".storm.yaml",
|
|
385
|
-
".storm.yml",
|
|
386
|
-
".storm.js",
|
|
387
|
-
".storm.ts",
|
|
381
|
+
"storm-workspace.json",
|
|
382
|
+
"storm-workspace.json",
|
|
383
|
+
"storm-workspace.yaml",
|
|
384
|
+
"storm-workspace.yml",
|
|
385
|
+
"storm-workspace.js",
|
|
386
|
+
"storm-workspace.ts",
|
|
387
|
+
".storm-workspace.json",
|
|
388
|
+
".storm-workspace.yaml",
|
|
389
|
+
".storm-workspace.yml",
|
|
390
|
+
".storm-workspace.js",
|
|
391
|
+
".storm-workspace.ts",
|
|
388
392
|
"lerna.json",
|
|
389
393
|
"nx.json",
|
|
390
394
|
"turbo.json",
|
|
@@ -408,11 +412,18 @@ var rootFiles = [
|
|
|
408
412
|
"pnpm-lock.yml",
|
|
409
413
|
"bun.lockb"
|
|
410
414
|
];
|
|
415
|
+
var rootDirectories = [
|
|
416
|
+
".storm-workspace",
|
|
417
|
+
".nx",
|
|
418
|
+
".github",
|
|
419
|
+
".vscode",
|
|
420
|
+
".verdaccio"
|
|
421
|
+
];
|
|
411
422
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
412
423
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
413
424
|
return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
|
|
414
425
|
}
|
|
415
|
-
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
|
|
426
|
+
return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
416
427
|
}
|
|
417
428
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
418
429
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -806,10 +817,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
806
817
|
}, "getConfigFileByName");
|
|
807
818
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
808
819
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
809
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
820
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
810
821
|
let config = result.config;
|
|
811
822
|
const configFile = result.configFile;
|
|
812
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
823
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
813
824
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
814
825
|
logLevel: "all"
|
|
815
826
|
});
|
|
@@ -818,9 +829,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
818
829
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
819
830
|
for (const result2 of results) {
|
|
820
831
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
832
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
833
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
834
|
+
logLevel: "all"
|
|
835
|
+
});
|
|
836
|
+
}
|
|
824
837
|
config = defu(result2.config ?? {}, config ?? {});
|
|
825
838
|
}
|
|
826
839
|
}
|
|
@@ -896,7 +909,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
896
909
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
897
910
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
898
911
|
},
|
|
899
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
912
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
913
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
900
914
|
};
|
|
901
915
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
902
916
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1131,6 +1145,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
1131
1145
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1132
1146
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1133
1147
|
}
|
|
1148
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1149
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1150
|
+
}
|
|
1134
1151
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1135
1152
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1136
1153
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1248,7 +1265,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
1248
1265
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1249
1266
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1250
1267
|
if (!configFile && !skipLogs) {
|
|
1251
|
-
writeWarning("No Storm
|
|
1268
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1252
1269
|
logLevel: "all"
|
|
1253
1270
|
});
|
|
1254
1271
|
}
|
|
@@ -1286,8 +1303,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1286
1303
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot3, skipLogs = false) => {
|
|
1287
1304
|
const config = await createStormConfig(void 0, void 0, workspaceRoot3, skipLogs);
|
|
1288
1305
|
setConfigEnv(config);
|
|
1289
|
-
if (!skipLogs) {
|
|
1290
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1306
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1307
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1291
1308
|
${formatLogMessage(config)}`, config);
|
|
1292
1309
|
}
|
|
1293
1310
|
return config;
|
|
@@ -3843,8 +3860,8 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
3843
3860
|
import { formatFiles as formatFiles4, writeJson as writeJson2 } from "@nx/devkit";
|
|
3844
3861
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
3845
3862
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3846
|
-
writeInfo("\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
3847
|
-
writeTrace(`Determining the Storm Configuration JSON Schema...`, config);
|
|
3863
|
+
writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
3864
|
+
writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
3848
3865
|
const jsonSchema = zodToJsonSchema(StormConfigSchema, {
|
|
3849
3866
|
name: "StormWorkspaceConfiguration"
|
|
3850
3867
|
});
|
|
@@ -5,7 +5,7 @@ var _chunkDBLK3NPEjs = require('./chunk-DBLK3NPE.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkXU5K2TI2js = require('./chunk-XU5K2TI2.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 = _chunkXU5K2TI2js.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 = _chunkXU5K2TI2js.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
|
+
_chunkXU5K2TI2js.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
|
+
_chunkXU5K2TI2js.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 _chunk66GYR4FXjs = require('./chunk-66GYR4FX.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/preview/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk66GYR4FXjs.withPulumiExecutor.call(void 0, "preview", (options) => [
|
|
7
7
|
options.stack && `--stack=${options.stack}`,
|
|
8
8
|
options.expectNoChanges && "--expect-no-changes"
|
|
9
9
|
]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk66GYR4FXjs = require('./chunk-66GYR4FX.js');
|
|
4
4
|
|
|
5
5
|
// src/executors/refresh/executor.ts
|
|
6
|
-
var executor_default =
|
|
6
|
+
var executor_default = _chunk66GYR4FXjs.withPulumiExecutor.call(void 0, "refresh", (options) => [
|
|
7
7
|
"--suppress-progress",
|
|
8
8
|
options.stack && `--stack=${options.stack}`,
|
|
9
9
|
options.skipPreview && "--skip-preview",
|
|
@@ -154,7 +154,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
154
154
|
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)")
|
|
155
155
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
156
156
|
var StormConfigSchema = _zod2.default.object({
|
|
157
|
-
$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"),
|
|
157
|
+
$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"),
|
|
158
158
|
extends: ExtendsSchema.optional(),
|
|
159
159
|
name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
160
160
|
namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -196,6 +196,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
196
196
|
"trace",
|
|
197
197
|
"all"
|
|
198
198
|
]).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`)."),
|
|
199
|
+
skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
199
200
|
registry: RegistryConfigSchema,
|
|
200
201
|
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."),
|
|
201
202
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -358,14 +359,17 @@ var isAbsolute = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(p
|
|
|
358
359
|
|
|
359
360
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
360
361
|
var depth = 0;
|
|
361
|
-
function findFolderUp(startPath, endFileNames) {
|
|
362
|
+
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
362
363
|
const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
|
|
364
|
+
if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
|
|
365
|
+
return _startPath;
|
|
366
|
+
}
|
|
363
367
|
if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
|
|
364
368
|
return _startPath;
|
|
365
369
|
}
|
|
366
370
|
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
367
371
|
const parent = _path.join.call(void 0, _startPath, "..");
|
|
368
|
-
return findFolderUp(parent, endFileNames);
|
|
372
|
+
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
369
373
|
}
|
|
370
374
|
return void 0;
|
|
371
375
|
}
|
|
@@ -373,17 +377,17 @@ _chunk3GQAWCBQjs.__name.call(void 0, findFolderUp, "findFolderUp");
|
|
|
373
377
|
|
|
374
378
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
375
379
|
var rootFiles = [
|
|
376
|
-
"storm.json",
|
|
377
|
-
"storm.json",
|
|
378
|
-
"storm.yaml",
|
|
379
|
-
"storm.yml",
|
|
380
|
-
"storm.js",
|
|
381
|
-
"storm.ts",
|
|
382
|
-
".storm.json",
|
|
383
|
-
".storm.yaml",
|
|
384
|
-
".storm.yml",
|
|
385
|
-
".storm.js",
|
|
386
|
-
".storm.ts",
|
|
380
|
+
"storm-workspace.json",
|
|
381
|
+
"storm-workspace.json",
|
|
382
|
+
"storm-workspace.yaml",
|
|
383
|
+
"storm-workspace.yml",
|
|
384
|
+
"storm-workspace.js",
|
|
385
|
+
"storm-workspace.ts",
|
|
386
|
+
".storm-workspace.json",
|
|
387
|
+
".storm-workspace.yaml",
|
|
388
|
+
".storm-workspace.yml",
|
|
389
|
+
".storm-workspace.js",
|
|
390
|
+
".storm-workspace.ts",
|
|
387
391
|
"lerna.json",
|
|
388
392
|
"nx.json",
|
|
389
393
|
"turbo.json",
|
|
@@ -407,11 +411,18 @@ var rootFiles = [
|
|
|
407
411
|
"pnpm-lock.yml",
|
|
408
412
|
"bun.lockb"
|
|
409
413
|
];
|
|
414
|
+
var rootDirectories = [
|
|
415
|
+
".storm-workspace",
|
|
416
|
+
".nx",
|
|
417
|
+
".github",
|
|
418
|
+
".vscode",
|
|
419
|
+
".verdaccio"
|
|
420
|
+
];
|
|
410
421
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
411
422
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
412
423
|
return correctPaths(_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
|
|
413
424
|
}
|
|
414
|
-
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
|
|
425
|
+
return correctPaths(findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
|
|
415
426
|
}
|
|
416
427
|
_chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
417
428
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
@@ -805,10 +816,10 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
805
816
|
}, "getConfigFileByName");
|
|
806
817
|
var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
807
818
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
808
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
819
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
809
820
|
let config = result.config;
|
|
810
821
|
const configFile = result.configFile;
|
|
811
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
822
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
812
823
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
813
824
|
logLevel: "all"
|
|
814
825
|
});
|
|
@@ -817,9 +828,11 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
817
828
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
818
829
|
for (const result2 of results) {
|
|
819
830
|
if (_optionalChain([result2, 'optionalAccess', _33 => _33.config]) && _optionalChain([result2, 'optionalAccess', _34 => _34.configFile]) && Object.keys(result2.config).length > 0) {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
831
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
832
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
833
|
+
logLevel: "all"
|
|
834
|
+
});
|
|
835
|
+
}
|
|
823
836
|
config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
|
|
824
837
|
}
|
|
825
838
|
}
|
|
@@ -895,7 +908,8 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
895
908
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
896
909
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
897
910
|
},
|
|
898
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
911
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
912
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
899
913
|
};
|
|
900
914
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
901
915
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -1130,6 +1144,9 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
1130
1144
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
1131
1145
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1132
1146
|
}
|
|
1147
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1148
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
1149
|
+
}
|
|
1133
1150
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
1134
1151
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
1135
1152
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -1247,7 +1264,7 @@ var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asy
|
|
|
1247
1264
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1248
1265
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1249
1266
|
if (!configFile && !skipLogs) {
|
|
1250
|
-
writeWarning("No Storm
|
|
1267
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
1251
1268
|
logLevel: "all"
|
|
1252
1269
|
});
|
|
1253
1270
|
}
|
|
@@ -1285,8 +1302,8 @@ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
1285
1302
|
var loadStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot3, skipLogs = false) => {
|
|
1286
1303
|
const config = await createStormConfig(void 0, void 0, workspaceRoot3, skipLogs);
|
|
1287
1304
|
setConfigEnv(config);
|
|
1288
|
-
if (!skipLogs) {
|
|
1289
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1305
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1306
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1290
1307
|
${formatLogMessage(config)}`, config);
|
|
1291
1308
|
}
|
|
1292
1309
|
return config;
|
|
@@ -3842,8 +3859,8 @@ var generator_default = withRunGenerator("TypeScript Library Creator (Browser Pl
|
|
|
3842
3859
|
|
|
3843
3860
|
var _zodtojsonschema = require('zod-to-json-schema');
|
|
3844
3861
|
async function configSchemaGeneratorFn(tree, options, config) {
|
|
3845
|
-
writeInfo("\u{1F4E6} Running Storm Configuration JSON Schema generator", config);
|
|
3846
|
-
writeTrace(`Determining the Storm Configuration JSON Schema...`, config);
|
|
3862
|
+
writeInfo("\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator", config);
|
|
3863
|
+
writeTrace(`Determining the Storm Workspace Configuration JSON Schema...`, config);
|
|
3847
3864
|
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, StormConfigSchema, {
|
|
3848
3865
|
name: "StormWorkspaceConfiguration"
|
|
3849
3866
|
});
|
package/dist/executors.d.mts
CHANGED
|
@@ -5,6 +5,6 @@ export { R as RefreshExecutorSchema } from './schema.d-BTpgEb0Q.mjs';
|
|
|
5
5
|
export { U as UpExecutorSchema } from './schema.d-BCkJFwHO.mjs';
|
|
6
6
|
import './src/base/base-executor.mjs';
|
|
7
7
|
import '@nx/devkit';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-HiZpltUX.mjs';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@storm-software/workspace-tools';
|
package/dist/executors.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export { R as RefreshExecutorSchema } from './schema.d-DhkOAnzb.js';
|
|
|
5
5
|
export { U as UpExecutorSchema } from './schema.d-Dri9rCeV.js';
|
|
6
6
|
import './src/base/base-executor.js';
|
|
7
7
|
import '@nx/devkit';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-HiZpltUX.js';
|
|
9
9
|
import 'zod';
|
|
10
10
|
import '@storm-software/workspace-tools';
|
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-7ALOOHZY.js');
|
|
3
|
+
require('./chunk-J2DCPJAQ.js');
|
|
4
|
+
require('./chunk-KBNEAYZB.js');
|
|
5
|
+
require('./chunk-4MNRVJBF.js');
|
|
6
|
+
require('./chunk-6ZI7MLK7.js');
|
|
7
|
+
require('./chunk-66GYR4FX.js');
|
|
8
|
+
require('./chunk-XU5K2TI2.js');
|
|
9
9
|
require('./chunk-3GQAWCBQ.js');
|
package/dist/executors.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./chunk-UV4HQO3Y.mjs";
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-5KRAE47F.mjs";
|
|
3
|
+
import "./chunk-FMLVQLV6.mjs";
|
|
4
|
+
import "./chunk-BWD4IQMU.mjs";
|
|
5
|
+
import "./chunk-WNK5UV25.mjs";
|
|
6
|
+
import "./chunk-QBDI6KP3.mjs";
|
|
7
|
+
import "./chunk-WDVWSYTG.mjs";
|
|
8
|
+
import "./chunk-7YUTXFKP.mjs";
|
|
9
9
|
import "./chunk-XUV4U54K.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _storm_software_workspace_tools from '@storm-software/workspace-tools';
|
|
2
2
|
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
3
|
-
import { S as StormConfig } from './types-
|
|
3
|
+
import { S as StormConfig } from './types-HiZpltUX.mjs';
|
|
4
4
|
|
|
5
5
|
// Generated by @storm-software/untyped
|
|
6
6
|
// Do not edit this file directly
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _storm_software_workspace_tools from '@storm-software/workspace-tools';
|
|
2
2
|
import { Tree, GeneratorCallback } from '@nx/devkit';
|
|
3
|
-
import { S as StormConfig } from './types-
|
|
3
|
+
import { S as StormConfig } from './types-HiZpltUX.js';
|
|
4
4
|
|
|
5
5
|
// Generated by @storm-software/untyped
|
|
6
6
|
// Do not edit this file directly
|