@storm-software/cloudflare-tools 0.55.39 → 0.55.41
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 +172 -75
- package/README.md +7 -7
- package/dist/{chunk-ZBM3I5Z7.mjs → chunk-2GWCBDS7.mjs} +4 -4
- package/dist/{chunk-Y3XZCCPP.mjs → chunk-3HMZSKJD.mjs} +1 -1
- package/dist/{chunk-J22YL4DC.mjs → chunk-BV5FWJGL.mjs} +2 -2
- package/dist/{chunk-HZON5W3G.js → chunk-FK6PN2T3.js} +42 -14
- package/dist/{chunk-KLCTLDIH.js → chunk-H2ML72QF.js} +91 -47
- package/dist/{chunk-I6XBWBZN.js → chunk-HF5FM2V2.js} +3 -3
- package/dist/{chunk-B6ZQTLTY.js → chunk-IA5NNUZK.js} +1 -1
- package/dist/{chunk-FSZS6NDT.js → chunk-JF2LLENH.js} +12 -12
- package/dist/{chunk-HWRWRM5W.mjs → chunk-LEXIFHU6.mjs} +2 -2
- package/dist/{chunk-QD7ZKWKB.mjs → chunk-M4FHQYTZ.mjs} +43 -15
- package/dist/{chunk-MVGAJ7Q4.js → chunk-MCQ4YOON.js} +16 -16
- package/dist/{chunk-VAVNPHSE.mjs → chunk-MESLYSHV.mjs} +52 -8
- package/dist/{chunk-XYJVYVYX.js → chunk-NGA2REMH.js} +488 -570
- package/dist/{chunk-MBAVTLIK.mjs → chunk-PDLA5ACW.mjs} +327 -409
- package/dist/{chunk-5OCPVWBL.mjs → chunk-S3S7EN37.mjs} +5 -5
- package/dist/{chunk-PDHMNSTI.mjs → chunk-VNLZQQ5C.mjs} +2 -2
- package/dist/{chunk-KFNKJP2U.mjs → chunk-YYEF6TFG.mjs} +1 -1
- package/dist/executors.js +5 -5
- package/dist/executors.mjs +8 -8
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +5 -5
- package/dist/index.js +8 -8
- package/dist/index.mjs +10 -10
- package/dist/src/executors/cloudflare-publish/executor.js +3 -3
- package/dist/src/executors/cloudflare-publish/executor.mjs +6 -6
- package/dist/src/executors/r2-upload-publish/executor.js +5 -5
- package/dist/src/executors/r2-upload-publish/executor.mjs +6 -6
- package/dist/src/executors/serve/executor.d.mts +67 -3
- package/dist/src/executors/serve/executor.d.ts +67 -3
- package/dist/src/executors/serve/executor.js +4 -4
- package/dist/src/executors/serve/executor.mjs +5 -5
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +2 -2
- package/dist/src/generators/worker/generator.js +5 -5
- package/dist/src/generators/worker/generator.mjs +5 -5
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/r2-bucket-helpers.js +3 -3
- package/dist/src/utils/r2-bucket-helpers.mjs +3 -3
- package/dist/tsup.config.mjs +1 -1
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3HMZSKJD.mjs";
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
6
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
@@ -238,8 +238,23 @@ var LogLevelLabel = {
|
|
|
238
238
|
// ../config/src/constants.ts
|
|
239
239
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
240
240
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
241
|
+
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
241
242
|
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
242
243
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
244
|
+
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/brand-banner.png";
|
|
245
|
+
var STORM_DEFAULT_ACCOUNT_TWITTER = "StormSoftwareHQ";
|
|
246
|
+
var STORM_DEFAULT_ACCOUNT_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
247
|
+
var STORM_DEFAULT_ACCOUNT_TELEGRAM = "https://t.me/storm_software";
|
|
248
|
+
var STORM_DEFAULT_ACCOUNT_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
249
|
+
var STORM_DEFAULT_ACCOUNT_MEDIUM = "https://medium.com/storm-software";
|
|
250
|
+
var STORM_DEFAULT_ACCOUNT_GITHUB = "https://github.com/storm-software";
|
|
251
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
252
|
+
Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
253
|
+
|
|
254
|
+
Join us on [Discord](${STORM_DEFAULT_ACCOUNT_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
255
|
+
|
|
256
|
+
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_ACCOUNT_SLACK}) channel!
|
|
257
|
+
`;
|
|
243
258
|
|
|
244
259
|
// ../config/src/schema.ts
|
|
245
260
|
import z from "zod";
|
|
@@ -327,9 +342,22 @@ var ColorConfigMapSchema = z.union([
|
|
|
327
342
|
var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
328
343
|
var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
329
344
|
var WorkspaceBotConfigSchema = z.object({
|
|
330
|
-
name: z.string().trim().default("
|
|
345
|
+
name: z.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
331
346
|
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
332
347
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
348
|
+
var WorkspaceReleaseConfigSchema = z.object({
|
|
349
|
+
banner: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
|
|
350
|
+
header: z.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
|
|
351
|
+
footer: z.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
|
|
352
|
+
}).describe("The workspace's release config used during the release process");
|
|
353
|
+
var WorkspaceAccountConfigSchema = z.object({
|
|
354
|
+
twitter: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
355
|
+
discord: z.string().trim().default(STORM_DEFAULT_ACCOUNT_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
356
|
+
telegram: z.string().trim().default(STORM_DEFAULT_ACCOUNT_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
357
|
+
slack: z.string().trim().default(STORM_DEFAULT_ACCOUNT_SLACK).describe("A Slack account associated with the organization/project"),
|
|
358
|
+
medium: z.string().trim().default(STORM_DEFAULT_ACCOUNT_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
359
|
+
github: z.string().trim().default(STORM_DEFAULT_ACCOUNT_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
360
|
+
}).describe("The workspace's account config used to store various social media links");
|
|
333
361
|
var WorkspaceDirectoryConfigSchema = z.object({
|
|
334
362
|
cache: z.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
335
363
|
data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
@@ -349,15 +377,18 @@ var StormConfigSchema = z.object({
|
|
|
349
377
|
homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
350
378
|
docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
351
379
|
licensing: z.string().trim().url().default(STORM_DEFAULT_LICENSING).describe("The base licensing site for the workspace"),
|
|
380
|
+
contact: z.string().trim().url().default(STORM_DEFAULT_CONTACT).describe("The base contact site for the workspace"),
|
|
352
381
|
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
353
382
|
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
354
383
|
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
355
384
|
bot: WorkspaceBotConfigSchema,
|
|
356
|
-
|
|
385
|
+
release: WorkspaceReleaseConfigSchema,
|
|
386
|
+
account: WorkspaceAccountConfigSchema,
|
|
387
|
+
mode: z.enum([
|
|
357
388
|
"development",
|
|
358
389
|
"staging",
|
|
359
390
|
"production"
|
|
360
|
-
]).default("production").describe("The current runtime environment
|
|
391
|
+
]).default("production").describe("The current runtime environment mode for the package"),
|
|
361
392
|
workspaceRoot: z.string().trim().default("").describe("The root directory of the workspace"),
|
|
362
393
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
363
394
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
@@ -513,17 +544,14 @@ var getChalk = /* @__PURE__ */ __name(() => {
|
|
|
513
544
|
}, "getChalk");
|
|
514
545
|
|
|
515
546
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
516
|
-
import process2 from "node:process";
|
|
517
547
|
function isUnicodeSupported() {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
526
|
-
TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
548
|
+
if (process.platform !== "win32") {
|
|
549
|
+
return process.env.TERM !== "linux";
|
|
550
|
+
}
|
|
551
|
+
return Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
552
|
+
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
|
553
|
+
process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
|
|
554
|
+
process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
527
555
|
}
|
|
528
556
|
__name(isUnicodeSupported, "isUnicodeSupported");
|
|
529
557
|
|
|
@@ -611,7 +639,7 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}, _c
|
|
|
611
639
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) {
|
|
612
640
|
return (message) => {
|
|
613
641
|
console.error(`
|
|
614
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]}
|
|
642
|
+
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
615
643
|
`);
|
|
616
644
|
};
|
|
617
645
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkHF5FM2V2js = require('./chunk-HF5FM2V2.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkVTHBMY4Bjs = require('./chunk-VTHBMY4B.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkH2ML72QFjs = require('./chunk-H2ML72QF.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkFK6PN2T3js = require('./chunk-FK6PN2T3.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkJ5SB6L2Ljs = require('./chunk-J5SB6L2L.js');
|
|
@@ -36,8 +36,8 @@ async function runExecutor(options, context) {
|
|
|
36
36
|
throw new Error("The executor requires projectsConfigurations.");
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
const workspaceRoot =
|
|
40
|
-
const config = await
|
|
39
|
+
const workspaceRoot = _chunkFK6PN2T3js.findWorkspaceRoot.call(void 0, );
|
|
40
|
+
const config = await _chunkH2ML72QFjs.getConfig.call(void 0, workspaceRoot);
|
|
41
41
|
const sourceRoot = _nullishCoalesce(_optionalChain([context, 'access', _7 => _7.projectsConfigurations, 'access', _8 => _8.projects, 'access', _9 => _9[context.projectName], 'optionalAccess', _10 => _10.sourceRoot]), () => ( workspaceRoot));
|
|
42
42
|
const projectName = _nullishCoalesce(_optionalChain([context, 'access', _11 => _11.projectsConfigurations, 'access', _12 => _12.projects, 'access', _13 => _13[context.projectName], 'optionalAccess', _14 => _14.name]), () => ( context.projectName));
|
|
43
43
|
const projectDetails = _chunkVTHBMY4Bjs.getPackageInfo.call(void 0, context.projectsConfigurations.projects[context.projectName]);
|
|
@@ -62,7 +62,7 @@ async function runExecutor(options, context) {
|
|
|
62
62
|
if (!projectGraph) {
|
|
63
63
|
throw new Error("No project graph found in cache");
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_chunkFK6PN2T3js.writeInfo.call(void 0, `Publishing ${context.projectName} to the Storm Registry at ${endpoint}`);
|
|
66
66
|
const s3Client = new (0, _clients3.S3)({
|
|
67
67
|
region: "auto",
|
|
68
68
|
endpoint,
|
|
@@ -72,12 +72,12 @@ async function runExecutor(options, context) {
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
const version = _optionalChain([projectDetails, 'access', _18 => _18.content, 'optionalAccess', _19 => _19.version]);
|
|
75
|
-
|
|
75
|
+
_chunkFK6PN2T3js.writeInfo.call(void 0, `Generated component version: ${version}`);
|
|
76
76
|
const files = await _glob.glob.call(void 0, _devkit.joinPathFragments.call(void 0, sourceRoot, "**/*"), {
|
|
77
77
|
ignore: "**/{*.stories.tsx,*.stories.ts,*.spec.tsx,*.spec.ts}"
|
|
78
78
|
});
|
|
79
79
|
const projectPath = `registry/${context.projectName}`;
|
|
80
|
-
const internalDependencies = await
|
|
80
|
+
const internalDependencies = await _chunkHF5FM2V2js.getInternalDependencies.call(void 0, context.projectName, projectGraph);
|
|
81
81
|
const dependencies = internalDependencies.filter((projectNode) => !projectNode.data.tags || projectNode.data.tags.every((tag) => tag.toLowerCase() !== "component")).reduce((ret, dep) => {
|
|
82
82
|
if (!ret[dep.name]) {
|
|
83
83
|
ret[dep.name] = "latest";
|
|
@@ -85,14 +85,14 @@ async function runExecutor(options, context) {
|
|
|
85
85
|
return ret;
|
|
86
86
|
}, _nullishCoalesce(projectDetails.content.dependencies, () => ( {})));
|
|
87
87
|
const release = _nullishCoalesce(options.tag, () => ( _child_process.execSync.call(void 0, "npm config get tag").toString().trim()));
|
|
88
|
-
|
|
88
|
+
_chunkFK6PN2T3js.writeInfo.call(void 0, `Clearing out existing items in ${projectPath}`);
|
|
89
89
|
if (!isDryRun) {
|
|
90
90
|
const response = await s3Client.listObjects({
|
|
91
91
|
Bucket: options.bucketId,
|
|
92
92
|
Prefix: projectPath
|
|
93
93
|
});
|
|
94
94
|
if (_optionalChain([response, 'optionalAccess', _20 => _20.Contents]) && response.Contents.length > 0) {
|
|
95
|
-
|
|
95
|
+
_chunkFK6PN2T3js.writeDebug.call(void 0, `Deleting the following existing items from the component registry: ${response.Contents.map((item) => item.Key).join(", ")}`);
|
|
96
96
|
await Promise.all(response.Contents.map((item) => s3Client.deleteObjects({
|
|
97
97
|
Bucket: options.bucketId,
|
|
98
98
|
Delete: {
|
|
@@ -105,10 +105,10 @@ async function runExecutor(options, context) {
|
|
|
105
105
|
}
|
|
106
106
|
})));
|
|
107
107
|
} else {
|
|
108
|
-
|
|
108
|
+
_chunkFK6PN2T3js.writeDebug.call(void 0, `No existing items to delete in the component registry path ${projectPath}`);
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
|
-
|
|
111
|
+
_chunkFK6PN2T3js.writeWarning.call(void 0, "[Dry run]: skipping upload to the Cyclone Registry.");
|
|
112
112
|
}
|
|
113
113
|
const meta = {
|
|
114
114
|
name: context.projectName,
|
|
@@ -124,16 +124,16 @@ async function runExecutor(options, context) {
|
|
|
124
124
|
meta.devDependencies = projectDetails.content.devDependencies;
|
|
125
125
|
}
|
|
126
126
|
const metaJson = JSON.stringify(meta);
|
|
127
|
-
|
|
127
|
+
_chunkFK6PN2T3js.writeInfo.call(void 0, `Generating meta.json file:
|
|
128
128
|
${metaJson}`);
|
|
129
|
-
await
|
|
129
|
+
await _chunkHF5FM2V2js.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, "meta.json", version, metaJson, "application/json", isDryRun);
|
|
130
130
|
await Promise.all(files.map((file) => {
|
|
131
131
|
const fileName = file.replaceAll("\\", "/").replace(sourceRoot.replaceAll("\\", "/"), "");
|
|
132
132
|
return _promises.readFile.call(void 0, file, {
|
|
133
133
|
encoding: "utf8"
|
|
134
|
-
}).then((fileContent) =>
|
|
134
|
+
}).then((fileContent) => _chunkHF5FM2V2js.r2UploadFile.call(void 0, s3Client, options.bucketId, projectPath, fileName, version, fileContent, "text/plain", isDryRun));
|
|
135
135
|
}));
|
|
136
|
-
|
|
136
|
+
_chunkFK6PN2T3js.writeSuccess.call(void 0, `Successfully uploaded the ${projectName} component to the Cyclone Registry`, config);
|
|
137
137
|
return {
|
|
138
138
|
success: true
|
|
139
139
|
};
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
joinPaths,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M4FHQYTZ.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3HMZSKJD.mjs";
|
|
21
21
|
|
|
22
22
|
// ../config-tools/src/create-storm-config.ts
|
|
23
23
|
import defu2 from "defu";
|
|
@@ -106,12 +106,26 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
106
106
|
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
107
107
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
108
108
|
},
|
|
109
|
+
release: {
|
|
110
|
+
banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
|
|
111
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
112
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
113
|
+
},
|
|
114
|
+
account: {
|
|
115
|
+
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
116
|
+
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
117
|
+
telegram: process.env[`${prefix}ACCOUNT_TELEGRAM`] || void 0,
|
|
118
|
+
slack: process.env[`${prefix}ACCOUNT_SLACK`] || void 0,
|
|
119
|
+
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
120
|
+
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
121
|
+
},
|
|
109
122
|
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
110
123
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
111
124
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
112
125
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
113
126
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
114
127
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
128
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
115
129
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
116
130
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
117
131
|
configFile: process.env[`${prefix}CONFIG_FILE`] ? correctPaths(process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
@@ -125,7 +139,7 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
125
139
|
build: process.env[`${prefix}BUILD_DIR`] ? correctPaths(process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
126
140
|
},
|
|
127
141
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
128
|
-
|
|
142
|
+
mode: (process.env[`${prefix}MODE`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT) || void 0,
|
|
129
143
|
// ci:
|
|
130
144
|
// process.env[`${prefix}CI`] !== undefined
|
|
131
145
|
// ? Boolean(
|
|
@@ -270,6 +284,31 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
270
284
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
271
285
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
272
286
|
}
|
|
287
|
+
if (config.release) {
|
|
288
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
289
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
290
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
291
|
+
}
|
|
292
|
+
if (config.account) {
|
|
293
|
+
if (config.account.twitter) {
|
|
294
|
+
process.env[`${prefix}ACCOUNT_TWITTER`] = config.account.twitter;
|
|
295
|
+
}
|
|
296
|
+
if (config.account.discord) {
|
|
297
|
+
process.env[`${prefix}ACCOUNT_DISCORD`] = config.account.discord;
|
|
298
|
+
}
|
|
299
|
+
if (config.account.telegram) {
|
|
300
|
+
process.env[`${prefix}ACCOUNT_TELEGRAM`] = config.account.telegram;
|
|
301
|
+
}
|
|
302
|
+
if (config.account.slack) {
|
|
303
|
+
process.env[`${prefix}ACCOUNT_SLACK`] = config.account.slack;
|
|
304
|
+
}
|
|
305
|
+
if (config.account.medium) {
|
|
306
|
+
process.env[`${prefix}ACCOUNT_MEDIUM`] = config.account.medium;
|
|
307
|
+
}
|
|
308
|
+
if (config.account.github) {
|
|
309
|
+
process.env[`${prefix}ACCOUNT_GITHUB`] = config.account.github;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
273
312
|
if (config.organization) {
|
|
274
313
|
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
275
314
|
}
|
|
@@ -288,6 +327,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
288
327
|
if (config.licensing) {
|
|
289
328
|
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
290
329
|
}
|
|
330
|
+
if (config.contact) {
|
|
331
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
332
|
+
}
|
|
291
333
|
if (config.timezone) {
|
|
292
334
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
293
335
|
process.env.TZ = config.timezone;
|
|
@@ -334,10 +376,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
334
376
|
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
335
377
|
}
|
|
336
378
|
}
|
|
337
|
-
if (config.
|
|
338
|
-
process.env[`${prefix}
|
|
339
|
-
process.env.NODE_ENV = config.
|
|
340
|
-
process.env.ENVIRONMENT = config.
|
|
379
|
+
if (config.mode) {
|
|
380
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
381
|
+
process.env.NODE_ENV = config.mode;
|
|
382
|
+
process.env.ENVIRONMENT = config.mode;
|
|
341
383
|
}
|
|
342
384
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
343
385
|
for (const key of Object.keys(config.colors)) {
|
|
@@ -386,7 +428,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
386
428
|
}
|
|
387
429
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
388
430
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
389
|
-
config.extensions[key] && Object.keys(config.extensions[key])
|
|
431
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
432
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
433
|
+
}
|
|
390
434
|
}
|
|
391
435
|
}, "setConfigEnv");
|
|
392
436
|
var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|