@stryke/env 0.20.96 → 0.20.98
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 +22 -0
- package/dist/_virtual/_rolldown/runtime.cjs +14 -0
- package/dist/_virtual/_rolldown/runtime.mjs +18 -0
- package/dist/ci-checks.cjs +11 -0
- package/dist/ci-checks.mjs +7 -1
- package/dist/ci-checks.mjs.map +1 -1
- package/dist/ci-checks.test.cjs +13 -0
- package/dist/ci-checks.test.d.cts +1 -0
- package/dist/ci-checks.test.d.mts +1 -0
- package/dist/ci-checks.test.mjs +14 -0
- package/dist/ci-checks.test.mjs.map +1 -0
- package/dist/environment-checks.cjs +28 -0
- package/dist/environment-checks.mjs +23 -1
- package/dist/environment-checks.mjs.map +1 -1
- package/dist/environment-checks.test.cjs +13 -0
- package/dist/environment-checks.test.d.cts +1 -0
- package/dist/environment-checks.test.d.mts +1 -0
- package/dist/environment-checks.test.mjs +14 -0
- package/dist/environment-checks.test.mjs.map +1 -0
- package/dist/get-env-paths.cjs +8 -1
- package/dist/get-env-paths.mjs +3 -1
- package/dist/get-env-paths.mjs.map +1 -1
- package/dist/get-env-paths.test.cjs +13 -0
- package/dist/get-env-paths.test.d.cts +1 -0
- package/dist/get-env-paths.test.d.mts +1 -0
- package/dist/get-env-paths.test.mjs +14 -0
- package/dist/get-env-paths.test.mjs.map +1 -0
- package/dist/index.cjs +53 -0
- package/dist/index.mjs +49 -1
- package/dist/index.mjs.map +1 -0
- package/dist/index.test.cjs +13 -0
- package/dist/index.test.d.cts +1 -0
- package/dist/index.test.d.mts +1 -0
- package/dist/index.test.mjs +14 -0
- package/dist/index.test.mjs.map +1 -0
- package/dist/load-env.cjs +14 -1
- package/dist/load-env.mjs +9 -1
- package/dist/load-env.mjs.map +1 -1
- package/dist/load-env.test.cjs +13 -0
- package/dist/load-env.test.d.cts +1 -0
- package/dist/load-env.test.d.mts +1 -0
- package/dist/load-env.test.mjs +14 -0
- package/dist/load-env.test.mjs.map +1 -0
- package/dist/providers.cjs +12 -1
- package/dist/providers.mjs +7 -1
- package/dist/providers.mjs.map +1 -1
- package/dist/providers.test.cjs +13 -0
- package/dist/providers.test.d.cts +1 -0
- package/dist/providers.test.d.mts +1 -0
- package/dist/providers.test.mjs +14 -0
- package/dist/providers.test.mjs.map +1 -0
- package/dist/runtime-checks.cjs +21 -1
- package/dist/runtime-checks.mjs +16 -1
- package/dist/runtime-checks.mjs.map +1 -1
- package/dist/runtime-checks.test.cjs +13 -0
- package/dist/runtime-checks.test.d.cts +1 -0
- package/dist/runtime-checks.test.d.mts +1 -0
- package/dist/runtime-checks.test.mjs +14 -0
- package/dist/runtime-checks.test.mjs.map +1 -0
- package/dist/types.cjs +9 -1
- package/dist/types.mjs +4 -1
- package/dist/types.mjs.map +1 -1
- package/dist/types.test.cjs +13 -0
- package/dist/types.test.d.cts +1 -0
- package/dist/types.test.d.mts +1 -0
- package/dist/types.test.mjs +14 -0
- package/dist/types.test.mjs.map +1 -0
- package/package.json +39 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_index = require('./index.cjs');
|
|
3
|
+
let vitest = require("vitest");
|
|
4
|
+
|
|
5
|
+
//#region src/index.test.ts
|
|
6
|
+
(0, vitest.describe)("index.ts exports", () => {
|
|
7
|
+
(0, vitest.it)("loads module exports", () => {
|
|
8
|
+
(0, vitest.expect)(require_index.src_exports).toBeDefined();
|
|
9
|
+
(0, vitest.expect)(typeof require_index.src_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { src_exports } from "./index.mjs";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
//#region src/index.test.ts
|
|
5
|
+
describe("index.ts exports", () => {
|
|
6
|
+
it("loads module exports", () => {
|
|
7
|
+
expect(src_exports).toBeDefined();
|
|
8
|
+
expect(typeof src_exports).toBe("object");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { };
|
|
14
|
+
//# sourceMappingURL=index.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.mjs","names":["moduleExports"],"sources":["../src/index.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./index.ts\";\n\ndescribe(\"index.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,0BAA0B;AACjC,IAAG,8BAA8B;AAC/B,SAAOA,YAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,YAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
|
package/dist/load-env.cjs
CHANGED
|
@@ -10,6 +10,13 @@ let defu = require("defu");
|
|
|
10
10
|
defu = require_runtime.__toESM(defu, 1);
|
|
11
11
|
|
|
12
12
|
//#region src/load-env.ts
|
|
13
|
+
var load_env_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
14
|
+
getEnvFilesForMode: () => getEnvFilesForMode,
|
|
15
|
+
loadClientEnv: () => loadClientEnv,
|
|
16
|
+
loadEnv: () => loadEnv,
|
|
17
|
+
loadEnvFile: () => loadEnvFile,
|
|
18
|
+
loadServerEnv: () => loadServerEnv
|
|
19
|
+
});
|
|
13
20
|
function getEnvFilesForMode(envDir, mode = "production") {
|
|
14
21
|
return [
|
|
15
22
|
".env",
|
|
@@ -122,4 +129,10 @@ exports.getEnvFilesForMode = getEnvFilesForMode;
|
|
|
122
129
|
exports.loadClientEnv = loadClientEnv;
|
|
123
130
|
exports.loadEnv = loadEnv;
|
|
124
131
|
exports.loadEnvFile = loadEnvFile;
|
|
125
|
-
exports.loadServerEnv = loadServerEnv;
|
|
132
|
+
exports.loadServerEnv = loadServerEnv;
|
|
133
|
+
Object.defineProperty(exports, 'load_env_exports', {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () {
|
|
136
|
+
return load_env_exports;
|
|
137
|
+
}
|
|
138
|
+
});
|
package/dist/load-env.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
1
2
|
import { ENV_PREFIXES } from "./types.mjs";
|
|
2
3
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
3
4
|
import { parse } from "@dotenvx/dotenvx";
|
|
@@ -7,6 +8,13 @@ import { readFile } from "@stryke/fs/read-file";
|
|
|
7
8
|
import defu from "defu";
|
|
8
9
|
|
|
9
10
|
//#region src/load-env.ts
|
|
11
|
+
var load_env_exports = /* @__PURE__ */ __exportAll({
|
|
12
|
+
getEnvFilesForMode: () => getEnvFilesForMode,
|
|
13
|
+
loadClientEnv: () => loadClientEnv,
|
|
14
|
+
loadEnv: () => loadEnv,
|
|
15
|
+
loadEnvFile: () => loadEnvFile,
|
|
16
|
+
loadServerEnv: () => loadServerEnv
|
|
17
|
+
});
|
|
10
18
|
function getEnvFilesForMode(envDir, mode = "production") {
|
|
11
19
|
return [
|
|
12
20
|
".env",
|
|
@@ -115,5 +123,5 @@ async function loadServerEnv(envDir, mode) {
|
|
|
115
123
|
}
|
|
116
124
|
|
|
117
125
|
//#endregion
|
|
118
|
-
export { getEnvFilesForMode, loadClientEnv, loadEnv, loadEnvFile, loadServerEnv };
|
|
126
|
+
export { getEnvFilesForMode, loadClientEnv, loadEnv, loadEnvFile, loadServerEnv, load_env_exports };
|
|
119
127
|
//# sourceMappingURL=load-env.mjs.map
|
package/dist/load-env.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-env.mjs","names":[],"sources":["../src/load-env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DotenvPopulateInput } from \"@dotenvx/dotenvx\";\nimport { parse } from \"@dotenvx/dotenvx\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { DotenvParseOutput } from \"./types\";\nimport { ENV_PREFIXES } from \"./types\";\n\nexport function getEnvFilesForMode(\n envDir: string,\n mode = \"production\"\n): string[] {\n return [\n /** default file */ \".env\",\n /** local file */ \".env.local\",\n /** mode file */ `.env.${mode}`,\n /** mode local file */ `.env.${mode}.local`,\n /** local mode file */ `.env.local.${mode}`\n ].map(file => joinPaths(envDir, file));\n}\n\n/**\n * Load environment variables from a .env file.\n *\n * @param envFile - The path to the .env file.\n * @returns The environment variables.\n */\nexport async function loadEnvFile(\n envFile: string,\n envDir: string | string[] = []\n): Promise<DotenvParseOutput> {\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n return (\n await Promise.all(\n (envDir.length > 0\n ? envDirs.map(envDir => joinPaths(envDir, envFile))\n : [envFile]\n ).map(async envFilePath => {\n if (!existsSync(envFilePath)) {\n return undefined;\n }\n\n return readFile(envFilePath);\n })\n )\n ).reduce((ret, envFileContent) => {\n if (!envFileContent) {\n return ret;\n }\n\n const result = parse(envFileContent, {\n processEnv: { ...process.env } as DotenvPopulateInput,\n privateKey:\n process.env.DOTENV_PRIVATE_KEY || process.env.STORM_PRIVATE_KEY\n });\n\n return defu(result, ret);\n }, {});\n}\n\n/**\n * Load environment variables from .env files.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadEnv(\n envDir: string | string[],\n mode?: string,\n prefix?: string | string[]\n): Promise<DotenvParseOutput> {\n if (mode === \"local\") {\n throw new Error(\n '\"local\" cannot be used as a mode name because it conflicts with ' +\n \"the .local postfix for .env files.\"\n );\n }\n\n const prefixes = toArray(prefix).reduce((ret, pre) => {\n if (!pre) {\n return ret;\n }\n\n if (!ret.includes(pre.endsWith(\"_\") ? pre : `${pre}_`)) {\n ret.push(pre.endsWith(\"_\") ? pre : `${pre}_`);\n }\n if (!ret.includes(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`)) {\n ret.push(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`);\n }\n return ret;\n }, [] as string[]);\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n const env: DotenvParseOutput = {};\n const envFiles = envDirs.reduce((ret, envFilePath) => {\n ret.push(\n ...getEnvFilesForMode(envFilePath, mode).filter(\n envFile => !ret.includes(envFile)\n )\n );\n\n return ret;\n }, [] as string[]);\n\n let envParsed = (\n await Promise.all(\n envFiles.map(async filePath => {\n return loadEnvFile(filePath);\n })\n )\n ).reduce((ret, result) => {\n return defu(result, ret);\n }, {});\n\n // test NODE_ENV override before expand as otherwise process.env.NODE_ENV would override this\n if (envParsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {\n process.env.VITE_USER_NODE_ENV = JSON.stringify(envParsed.NODE_ENV);\n }\n // support BROWSER and BROWSER_ARGS env variables\n if (envParsed.BROWSER && process.env.BROWSER === undefined) {\n process.env.BROWSER = JSON.stringify(envParsed.BROWSER);\n }\n if (envParsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {\n process.env.BROWSER_ARGS = JSON.stringify(envParsed.BROWSER_ARGS);\n }\n\n // let environment variables use each other. make a copy of `process.env` so that we do not mutate the global `process.env`.\n envParsed = defu({ ...process.env }, envParsed);\n if (prefixes.length === 0) {\n return envParsed;\n }\n\n // only keys that start with prefix are exposed to client\n for (const [key, value] of Object.entries(envParsed)) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = String(value);\n }\n }\n\n // check if there are actual env variables starting with VITE_*\n // these are typically provided inline and should be prioritized\n for (const key in process.env) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = process.env[key];\n }\n }\n\n return env;\n}\n\n/**\n * Load environment variables from .env files for a client-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadClientEnv(\n envDir: string | string[],\n mode?: string,\n prefix: string | string[] = ENV_PREFIXES\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode, prefix);\n}\n\n/**\n * Load environment variables from .env files for a server-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @returns The environment variables.\n */\nexport async function loadServerEnv(\n envDir: string | string[],\n mode: string\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"load-env.mjs","names":[],"sources":["../src/load-env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DotenvPopulateInput } from \"@dotenvx/dotenvx\";\nimport { parse } from \"@dotenvx/dotenvx\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { DotenvParseOutput } from \"./types\";\nimport { ENV_PREFIXES } from \"./types\";\n\nexport function getEnvFilesForMode(\n envDir: string,\n mode = \"production\"\n): string[] {\n return [\n /** default file */ \".env\",\n /** local file */ \".env.local\",\n /** mode file */ `.env.${mode}`,\n /** mode local file */ `.env.${mode}.local`,\n /** local mode file */ `.env.local.${mode}`\n ].map(file => joinPaths(envDir, file));\n}\n\n/**\n * Load environment variables from a .env file.\n *\n * @param envFile - The path to the .env file.\n * @returns The environment variables.\n */\nexport async function loadEnvFile(\n envFile: string,\n envDir: string | string[] = []\n): Promise<DotenvParseOutput> {\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n return (\n await Promise.all(\n (envDir.length > 0\n ? envDirs.map(envDir => joinPaths(envDir, envFile))\n : [envFile]\n ).map(async envFilePath => {\n if (!existsSync(envFilePath)) {\n return undefined;\n }\n\n return readFile(envFilePath);\n })\n )\n ).reduce((ret, envFileContent) => {\n if (!envFileContent) {\n return ret;\n }\n\n const result = parse(envFileContent, {\n processEnv: { ...process.env } as DotenvPopulateInput,\n privateKey:\n process.env.DOTENV_PRIVATE_KEY || process.env.STORM_PRIVATE_KEY\n });\n\n return defu(result, ret);\n }, {});\n}\n\n/**\n * Load environment variables from .env files.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadEnv(\n envDir: string | string[],\n mode?: string,\n prefix?: string | string[]\n): Promise<DotenvParseOutput> {\n if (mode === \"local\") {\n throw new Error(\n '\"local\" cannot be used as a mode name because it conflicts with ' +\n \"the .local postfix for .env files.\"\n );\n }\n\n const prefixes = toArray(prefix).reduce((ret, pre) => {\n if (!pre) {\n return ret;\n }\n\n if (!ret.includes(pre.endsWith(\"_\") ? pre : `${pre}_`)) {\n ret.push(pre.endsWith(\"_\") ? pre : `${pre}_`);\n }\n if (!ret.includes(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`)) {\n ret.push(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`);\n }\n return ret;\n }, [] as string[]);\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n const env: DotenvParseOutput = {};\n const envFiles = envDirs.reduce((ret, envFilePath) => {\n ret.push(\n ...getEnvFilesForMode(envFilePath, mode).filter(\n envFile => !ret.includes(envFile)\n )\n );\n\n return ret;\n }, [] as string[]);\n\n let envParsed = (\n await Promise.all(\n envFiles.map(async filePath => {\n return loadEnvFile(filePath);\n })\n )\n ).reduce((ret, result) => {\n return defu(result, ret);\n }, {});\n\n // test NODE_ENV override before expand as otherwise process.env.NODE_ENV would override this\n if (envParsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {\n process.env.VITE_USER_NODE_ENV = JSON.stringify(envParsed.NODE_ENV);\n }\n // support BROWSER and BROWSER_ARGS env variables\n if (envParsed.BROWSER && process.env.BROWSER === undefined) {\n process.env.BROWSER = JSON.stringify(envParsed.BROWSER);\n }\n if (envParsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {\n process.env.BROWSER_ARGS = JSON.stringify(envParsed.BROWSER_ARGS);\n }\n\n // let environment variables use each other. make a copy of `process.env` so that we do not mutate the global `process.env`.\n envParsed = defu({ ...process.env }, envParsed);\n if (prefixes.length === 0) {\n return envParsed;\n }\n\n // only keys that start with prefix are exposed to client\n for (const [key, value] of Object.entries(envParsed)) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = String(value);\n }\n }\n\n // check if there are actual env variables starting with VITE_*\n // these are typically provided inline and should be prioritized\n for (const key in process.env) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = process.env[key];\n }\n }\n\n return env;\n}\n\n/**\n * Load environment variables from .env files for a client-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadClientEnv(\n envDir: string | string[],\n mode?: string,\n prefix: string | string[] = ENV_PREFIXES\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode, prefix);\n}\n\n/**\n * Load environment variables from .env files for a server-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @returns The environment variables.\n */\nexport async function loadServerEnv(\n envDir: string | string[],\n mode: string\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAgB,mBACd,QACA,OAAO,cACG;AACV,QAAO;EACe;EACF;EACD,QAAQ;EACF,QAAQ,KAAK;EACb,cAAc;EACtC,CAAC,KAAI,SAAQ,UAAU,QAAQ,KAAK,CAAC;;;;;;;;AASxC,eAAsB,YACpB,SACA,SAA4B,EAAE,EACF;CAC5B,MAAM,UAAU,MAAM,QAAQ,OAAO,GAAG,SAAS,CAAC,OAAO;AAEzD,SACE,MAAM,QAAQ,KACX,OAAO,SAAS,IACb,QAAQ,KAAI,WAAU,UAAU,QAAQ,QAAQ,CAAC,GACjD,CAAC,QAAQ,EACX,IAAI,OAAM,gBAAe;AACzB,MAAI,CAAC,WAAW,YAAY,CAC1B;AAGF,SAAO,SAAS,YAAY;GAC5B,CACH,EACD,QAAQ,KAAK,mBAAmB;AAChC,MAAI,CAAC,eACH,QAAO;AAST,SAAO,KANQ,MAAM,gBAAgB;GACnC,YAAY,EAAE,GAAG,QAAQ,KAAK;GAC9B,YACE,QAAQ,IAAI,sBAAsB,QAAQ,IAAI;GACjD,CAEiB,EAAE,IAAI;IACvB,EAAE,CAAC;;;;;;;;;;;;;;;;;AAkBR,eAAsB,QACpB,QACA,MACA,QAC4B;AAC5B,KAAI,SAAS,QACX,OAAM,IAAI,MACR,uGAED;CAGH,MAAM,WAAW,QAAQ,OAAO,CAAC,QAAQ,KAAK,QAAQ;AACpD,MAAI,CAAC,IACH,QAAO;AAGT,MAAI,CAAC,IAAI,SAAS,IAAI,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,CACpD,KAAI,KAAK,IAAI,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG;AAE/C,MAAI,CAAC,IAAI,SAAS,GAAG,IAAI,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAChE,KAAI,KAAK,GAAG,IAAI,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;AAE3D,SAAO;IACN,EAAE,CAAa;CAClB,MAAM,UAAU,MAAM,QAAQ,OAAO,GAAG,SAAS,CAAC,OAAO;CAEzD,MAAM,MAAyB,EAAE;CACjC,MAAM,WAAW,QAAQ,QAAQ,KAAK,gBAAgB;AACpD,MAAI,KACF,GAAG,mBAAmB,aAAa,KAAK,CAAC,QACvC,YAAW,CAAC,IAAI,SAAS,QAAQ,CAClC,CACF;AAED,SAAO;IACN,EAAE,CAAa;CAElB,IAAI,aACF,MAAM,QAAQ,IACZ,SAAS,IAAI,OAAM,aAAY;AAC7B,SAAO,YAAY,SAAS;GAC5B,CACH,EACD,QAAQ,KAAK,WAAW;AACxB,SAAO,KAAK,QAAQ,IAAI;IACvB,EAAE,CAAC;AAGN,KAAI,UAAU,YAAY,QAAQ,IAAI,uBAAuB,OAC3D,SAAQ,IAAI,qBAAqB,KAAK,UAAU,UAAU,SAAS;AAGrE,KAAI,UAAU,WAAW,QAAQ,IAAI,YAAY,OAC/C,SAAQ,IAAI,UAAU,KAAK,UAAU,UAAU,QAAQ;AAEzD,KAAI,UAAU,gBAAgB,QAAQ,IAAI,iBAAiB,OACzD,SAAQ,IAAI,eAAe,KAAK,UAAU,UAAU,aAAa;AAInE,aAAY,KAAK,EAAE,GAAG,QAAQ,KAAK,EAAE,UAAU;AAC/C,KAAI,SAAS,WAAW,EACtB,QAAO;AAIT,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,CAClD,KAAI,SAAS,MAAK,WAAU,IAAI,WAAW,OAAO,CAAC,CACjD,KAAI,OAAO,OAAO,MAAM;AAM5B,MAAK,MAAM,OAAO,QAAQ,IACxB,KAAI,SAAS,MAAK,WAAU,IAAI,WAAW,OAAO,CAAC,CACjD,KAAI,OAAO,QAAQ,IAAI;AAI3B,QAAO;;;;;;;;;;;;;;;;;AAkBT,eAAsB,cACpB,QACA,MACA,SAA4B,cACA;AAC5B,QAAO,QAAQ,QAAQ,MAAM,OAAO;;;;;;;;;;;;;;;;AAiBtC,eAAsB,cACpB,QACA,MAC4B;AAC5B,QAAO,QAAQ,QAAQ,KAAK"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_load_env = require('./load-env.cjs');
|
|
3
|
+
let vitest = require("vitest");
|
|
4
|
+
|
|
5
|
+
//#region src/load-env.test.ts
|
|
6
|
+
(0, vitest.describe)("load-env.ts exports", () => {
|
|
7
|
+
(0, vitest.it)("loads module exports", () => {
|
|
8
|
+
(0, vitest.expect)(require_load_env.load_env_exports).toBeDefined();
|
|
9
|
+
(0, vitest.expect)(typeof require_load_env.load_env_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { load_env_exports } from "./load-env.mjs";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
//#region src/load-env.test.ts
|
|
5
|
+
describe("load-env.ts exports", () => {
|
|
6
|
+
it("loads module exports", () => {
|
|
7
|
+
expect(load_env_exports).toBeDefined();
|
|
8
|
+
expect(typeof load_env_exports).toBe("object");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { };
|
|
14
|
+
//# sourceMappingURL=load-env.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-env.test.mjs","names":["moduleExports"],"sources":["../src/load-env.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./load-env.ts\";\n\ndescribe(\"load-env.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,6BAA6B;AACpC,IAAG,8BAA8B;AAC/B,SAAOA,iBAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,iBAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
|
package/dist/providers.cjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
|
|
3
4
|
//#region src/providers.ts
|
|
5
|
+
var providers_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
6
|
+
provider: () => provider,
|
|
7
|
+
providerInfo: () => providerInfo
|
|
8
|
+
});
|
|
4
9
|
const providers = [
|
|
5
10
|
["APPVEYOR"],
|
|
6
11
|
[
|
|
@@ -110,4 +115,10 @@ const provider = providerInfo.name;
|
|
|
110
115
|
|
|
111
116
|
//#endregion
|
|
112
117
|
exports.provider = provider;
|
|
113
|
-
exports.providerInfo = providerInfo;
|
|
118
|
+
exports.providerInfo = providerInfo;
|
|
119
|
+
Object.defineProperty(exports, 'providers_exports', {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () {
|
|
122
|
+
return providers_exports;
|
|
123
|
+
}
|
|
124
|
+
});
|
package/dist/providers.mjs
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/providers.ts
|
|
4
|
+
var providers_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
provider: () => provider,
|
|
6
|
+
providerInfo: () => providerInfo
|
|
7
|
+
});
|
|
2
8
|
const providers = [
|
|
3
9
|
["APPVEYOR"],
|
|
4
10
|
[
|
|
@@ -107,5 +113,5 @@ const providerInfo = detectProvider();
|
|
|
107
113
|
const provider = providerInfo.name;
|
|
108
114
|
|
|
109
115
|
//#endregion
|
|
110
|
-
export { provider, providerInfo };
|
|
116
|
+
export { provider, providerInfo, providers_exports };
|
|
111
117
|
//# sourceMappingURL=providers.mjs.map
|
package/dist/providers.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.mjs","names":[],"sources":["../src/providers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// Reference: https://github.com/watson/ci-info/blob/v3.2.0/vendors.json\n\nexport type ProviderName =\n | \"\"\n | \"appveyor\"\n | \"aws_amplify\"\n | \"azure_pipelines\"\n | \"azure_static\"\n | \"appcircle\"\n | \"bamboo\"\n | \"bitbucket\"\n | \"bitrise\"\n | \"buddy\"\n | \"buildkite\"\n | \"circle\"\n | \"cirrus\"\n | \"cloudflare_pages\"\n | \"codebuild\"\n | \"codefresh\"\n | \"drone\"\n | \"drone\"\n | \"dsari\"\n | \"github_actions\"\n | \"gitlab\"\n | \"gocd\"\n | \"layerci\"\n | \"hudson\"\n | \"jenkins\"\n | \"magnum\"\n | \"netlify\"\n | \"nevercode\"\n | \"render\"\n | \"sail\"\n | \"semaphore\"\n | \"screwdriver\"\n | \"shippable\"\n | \"solano\"\n | \"strider\"\n | \"teamcity\"\n | \"travis\"\n | \"vercel\"\n | \"appcenter\"\n | \"codesandbox\"\n | \"stackblitz\"\n | \"stormkit\"\n | \"cleavr\"\n | \"zeabur\"\n | \"codesphere\"\n | \"railway\"\n | \"deno-deploy\"\n | \"firebase_app_hosting\";\n\ntype InternalProvider = [\n providerName: Uppercase<ProviderName>,\n envName?: string,\n meta?: Record<string, any>\n];\n\nconst providers: InternalProvider[] = [\n [\"APPVEYOR\"],\n [\"AWS_AMPLIFY\", \"AWS_APP_ID\", { ci: true }],\n [\"AZURE_PIPELINES\", \"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\"],\n [\"AZURE_STATIC\", \"INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN\"],\n [\"APPCIRCLE\", \"AC_APPCIRCLE\"],\n [\"BAMBOO\", \"bamboo_planKey\"],\n [\"BITBUCKET\", \"BITBUCKET_COMMIT\"],\n [\"BITRISE\", \"BITRISE_IO\"],\n [\"BUDDY\", \"BUDDY_WORKSPACE_ID\"],\n [\"BUILDKITE\"],\n [\"CIRCLE\", \"CIRCLECI\"],\n [\"CIRRUS\", \"CIRRUS_CI\"],\n [\"CLOUDFLARE_PAGES\", \"CF_PAGES\", { ci: true }],\n [\"CODEBUILD\", \"CODEBUILD_BUILD_ARN\"],\n [\"CODEFRESH\", \"CF_BUILD_ID\"],\n [\"DRONE\"],\n [\"DRONE\", \"DRONE_BUILD_EVENT\"],\n [\"DSARI\"],\n [\"GITHUB_ACTIONS\"],\n [\"GITLAB\", \"GITLAB_CI\"],\n [\"GITLAB\", \"CI_MERGE_REQUEST_ID\"],\n [\"GOCD\", \"GO_PIPELINE_LABEL\"],\n [\"LAYERCI\"],\n [\"HUDSON\", \"HUDSON_URL\"],\n [\"JENKINS\", \"JENKINS_URL\"],\n [\"MAGNUM\"],\n [\"NETLIFY\"],\n [\"NETLIFY\", \"NETLIFY_LOCAL\", { ci: false }],\n [\"NEVERCODE\"],\n [\"RENDER\"],\n [\"SAIL\", \"SAILCI\"],\n [\"SEMAPHORE\"],\n [\"SCREWDRIVER\"],\n [\"SHIPPABLE\"],\n [\"SOLANO\", \"TDDIUM\"],\n [\"STRIDER\"],\n [\"TEAMCITY\", \"TEAMCITY_VERSION\"],\n [\"TRAVIS\"],\n [\"VERCEL\", \"NOW_BUILDER\"],\n [\"VERCEL\", \"VERCEL\", { ci: false }],\n [\"VERCEL\", \"VERCEL_ENV\", { ci: false }],\n [\"APPCENTER\", \"APPCENTER_BUILD_ID\"],\n [\"CODESANDBOX\", \"CODESANDBOX_SSE\", { ci: false }],\n [\"STACKBLITZ\"],\n [\"STORMKIT\"],\n [\"CLEAVR\"],\n [\"ZEABUR\"],\n [\"CODESPHERE\", \"CODESPHERE_APP_ID\", { ci: true }],\n [\"RAILWAY\", \"RAILWAY_PROJECT_ID\"],\n [\"RAILWAY\", \"RAILWAY_SERVICE_ID\"],\n [\"DENO-DEPLOY\", \"DENO_DEPLOYMENT_ID\"],\n [\"FIREBASE_APP_HOSTING\", \"FIREBASE_APP_HOSTING\", { ci: true }]\n];\n\nexport interface ProviderInfo {\n name: ProviderName;\n ci?: boolean;\n [meta: string]: any;\n}\n\nfunction detectProvider(): ProviderInfo {\n // Based on env\n if (process?.env) {\n for (const provider of providers) {\n const envName = provider[1] || provider[0];\n if (process?.env[envName]) {\n return {\n name: provider[0].toLowerCase(),\n ...(provider[2] as any)\n };\n }\n }\n }\n\n // Stackblitz / Webcontainer\n if (process?.env?.SHELL === \"/bin/jsh\" && process?.versions?.webcontainer) {\n return {\n name: \"stackblitz\",\n ci: false\n };\n }\n\n return {\n name: \"\",\n ci: false\n };\n}\n\n/** Current provider info */\nexport const providerInfo = detectProvider();\nexport const provider: ProviderName = providerInfo.name;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"providers.mjs","names":[],"sources":["../src/providers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// Reference: https://github.com/watson/ci-info/blob/v3.2.0/vendors.json\n\nexport type ProviderName =\n | \"\"\n | \"appveyor\"\n | \"aws_amplify\"\n | \"azure_pipelines\"\n | \"azure_static\"\n | \"appcircle\"\n | \"bamboo\"\n | \"bitbucket\"\n | \"bitrise\"\n | \"buddy\"\n | \"buildkite\"\n | \"circle\"\n | \"cirrus\"\n | \"cloudflare_pages\"\n | \"codebuild\"\n | \"codefresh\"\n | \"drone\"\n | \"drone\"\n | \"dsari\"\n | \"github_actions\"\n | \"gitlab\"\n | \"gocd\"\n | \"layerci\"\n | \"hudson\"\n | \"jenkins\"\n | \"magnum\"\n | \"netlify\"\n | \"nevercode\"\n | \"render\"\n | \"sail\"\n | \"semaphore\"\n | \"screwdriver\"\n | \"shippable\"\n | \"solano\"\n | \"strider\"\n | \"teamcity\"\n | \"travis\"\n | \"vercel\"\n | \"appcenter\"\n | \"codesandbox\"\n | \"stackblitz\"\n | \"stormkit\"\n | \"cleavr\"\n | \"zeabur\"\n | \"codesphere\"\n | \"railway\"\n | \"deno-deploy\"\n | \"firebase_app_hosting\";\n\ntype InternalProvider = [\n providerName: Uppercase<ProviderName>,\n envName?: string,\n meta?: Record<string, any>\n];\n\nconst providers: InternalProvider[] = [\n [\"APPVEYOR\"],\n [\"AWS_AMPLIFY\", \"AWS_APP_ID\", { ci: true }],\n [\"AZURE_PIPELINES\", \"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\"],\n [\"AZURE_STATIC\", \"INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN\"],\n [\"APPCIRCLE\", \"AC_APPCIRCLE\"],\n [\"BAMBOO\", \"bamboo_planKey\"],\n [\"BITBUCKET\", \"BITBUCKET_COMMIT\"],\n [\"BITRISE\", \"BITRISE_IO\"],\n [\"BUDDY\", \"BUDDY_WORKSPACE_ID\"],\n [\"BUILDKITE\"],\n [\"CIRCLE\", \"CIRCLECI\"],\n [\"CIRRUS\", \"CIRRUS_CI\"],\n [\"CLOUDFLARE_PAGES\", \"CF_PAGES\", { ci: true }],\n [\"CODEBUILD\", \"CODEBUILD_BUILD_ARN\"],\n [\"CODEFRESH\", \"CF_BUILD_ID\"],\n [\"DRONE\"],\n [\"DRONE\", \"DRONE_BUILD_EVENT\"],\n [\"DSARI\"],\n [\"GITHUB_ACTIONS\"],\n [\"GITLAB\", \"GITLAB_CI\"],\n [\"GITLAB\", \"CI_MERGE_REQUEST_ID\"],\n [\"GOCD\", \"GO_PIPELINE_LABEL\"],\n [\"LAYERCI\"],\n [\"HUDSON\", \"HUDSON_URL\"],\n [\"JENKINS\", \"JENKINS_URL\"],\n [\"MAGNUM\"],\n [\"NETLIFY\"],\n [\"NETLIFY\", \"NETLIFY_LOCAL\", { ci: false }],\n [\"NEVERCODE\"],\n [\"RENDER\"],\n [\"SAIL\", \"SAILCI\"],\n [\"SEMAPHORE\"],\n [\"SCREWDRIVER\"],\n [\"SHIPPABLE\"],\n [\"SOLANO\", \"TDDIUM\"],\n [\"STRIDER\"],\n [\"TEAMCITY\", \"TEAMCITY_VERSION\"],\n [\"TRAVIS\"],\n [\"VERCEL\", \"NOW_BUILDER\"],\n [\"VERCEL\", \"VERCEL\", { ci: false }],\n [\"VERCEL\", \"VERCEL_ENV\", { ci: false }],\n [\"APPCENTER\", \"APPCENTER_BUILD_ID\"],\n [\"CODESANDBOX\", \"CODESANDBOX_SSE\", { ci: false }],\n [\"STACKBLITZ\"],\n [\"STORMKIT\"],\n [\"CLEAVR\"],\n [\"ZEABUR\"],\n [\"CODESPHERE\", \"CODESPHERE_APP_ID\", { ci: true }],\n [\"RAILWAY\", \"RAILWAY_PROJECT_ID\"],\n [\"RAILWAY\", \"RAILWAY_SERVICE_ID\"],\n [\"DENO-DEPLOY\", \"DENO_DEPLOYMENT_ID\"],\n [\"FIREBASE_APP_HOSTING\", \"FIREBASE_APP_HOSTING\", { ci: true }]\n];\n\nexport interface ProviderInfo {\n name: ProviderName;\n ci?: boolean;\n [meta: string]: any;\n}\n\nfunction detectProvider(): ProviderInfo {\n // Based on env\n if (process?.env) {\n for (const provider of providers) {\n const envName = provider[1] || provider[0];\n if (process?.env[envName]) {\n return {\n name: provider[0].toLowerCase(),\n ...(provider[2] as any)\n };\n }\n }\n }\n\n // Stackblitz / Webcontainer\n if (process?.env?.SHELL === \"/bin/jsh\" && process?.versions?.webcontainer) {\n return {\n name: \"stackblitz\",\n ci: false\n };\n }\n\n return {\n name: \"\",\n ci: false\n };\n}\n\n/** Current provider info */\nexport const providerInfo = detectProvider();\nexport const provider: ProviderName = providerInfo.name;\n"],"mappings":";;;;;;;AA4EA,MAAM,YAAgC;CACpC,CAAC,WAAW;CACZ;EAAC;EAAe;EAAc,EAAE,IAAI,MAAM;EAAC;CAC3C,CAAC,mBAAmB,qCAAqC;CACzD,CAAC,gBAAgB,wCAAwC;CACzD,CAAC,aAAa,eAAe;CAC7B,CAAC,UAAU,iBAAiB;CAC5B,CAAC,aAAa,mBAAmB;CACjC,CAAC,WAAW,aAAa;CACzB,CAAC,SAAS,qBAAqB;CAC/B,CAAC,YAAY;CACb,CAAC,UAAU,WAAW;CACtB,CAAC,UAAU,YAAY;CACvB;EAAC;EAAoB;EAAY,EAAE,IAAI,MAAM;EAAC;CAC9C,CAAC,aAAa,sBAAsB;CACpC,CAAC,aAAa,cAAc;CAC5B,CAAC,QAAQ;CACT,CAAC,SAAS,oBAAoB;CAC9B,CAAC,QAAQ;CACT,CAAC,iBAAiB;CAClB,CAAC,UAAU,YAAY;CACvB,CAAC,UAAU,sBAAsB;CACjC,CAAC,QAAQ,oBAAoB;CAC7B,CAAC,UAAU;CACX,CAAC,UAAU,aAAa;CACxB,CAAC,WAAW,cAAc;CAC1B,CAAC,SAAS;CACV,CAAC,UAAU;CACX;EAAC;EAAW;EAAiB,EAAE,IAAI,OAAO;EAAC;CAC3C,CAAC,YAAY;CACb,CAAC,SAAS;CACV,CAAC,QAAQ,SAAS;CAClB,CAAC,YAAY;CACb,CAAC,cAAc;CACf,CAAC,YAAY;CACb,CAAC,UAAU,SAAS;CACpB,CAAC,UAAU;CACX,CAAC,YAAY,mBAAmB;CAChC,CAAC,SAAS;CACV,CAAC,UAAU,cAAc;CACzB;EAAC;EAAU;EAAU,EAAE,IAAI,OAAO;EAAC;CACnC;EAAC;EAAU;EAAc,EAAE,IAAI,OAAO;EAAC;CACvC,CAAC,aAAa,qBAAqB;CACnC;EAAC;EAAe;EAAmB,EAAE,IAAI,OAAO;EAAC;CACjD,CAAC,aAAa;CACd,CAAC,WAAW;CACZ,CAAC,SAAS;CACV,CAAC,SAAS;CACV;EAAC;EAAc;EAAqB,EAAE,IAAI,MAAM;EAAC;CACjD,CAAC,WAAW,qBAAqB;CACjC,CAAC,WAAW,qBAAqB;CACjC,CAAC,eAAe,qBAAqB;CACrC;EAAC;EAAwB;EAAwB,EAAE,IAAI,MAAM;EAAC;CAC/D;AAQD,SAAS,iBAA+B;AAEtC,KAAI,SAAS,IACX,MAAK,MAAM,YAAY,WAAW;EAChC,MAAM,UAAU,SAAS,MAAM,SAAS;AACxC,MAAI,SAAS,IAAI,SACf,QAAO;GACL,MAAM,SAAS,GAAG,aAAa;GAC/B,GAAI,SAAS;GACd;;AAMP,KAAI,SAAS,KAAK,UAAU,cAAc,SAAS,UAAU,aAC3D,QAAO;EACL,MAAM;EACN,IAAI;EACL;AAGH,QAAO;EACL,MAAM;EACN,IAAI;EACL;;;AAIH,MAAa,eAAe,gBAAgB;AAC5C,MAAa,WAAyB,aAAa"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_providers = require('./providers.cjs');
|
|
3
|
+
let vitest = require("vitest");
|
|
4
|
+
|
|
5
|
+
//#region src/providers.test.ts
|
|
6
|
+
(0, vitest.describe)("providers.ts exports", () => {
|
|
7
|
+
(0, vitest.it)("loads module exports", () => {
|
|
8
|
+
(0, vitest.expect)(require_providers.providers_exports).toBeDefined();
|
|
9
|
+
(0, vitest.expect)(typeof require_providers.providers_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { providers_exports } from "./providers.mjs";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
//#region src/providers.test.ts
|
|
5
|
+
describe("providers.ts exports", () => {
|
|
6
|
+
it("loads module exports", () => {
|
|
7
|
+
expect(providers_exports).toBeDefined();
|
|
8
|
+
expect(typeof providers_exports).toBe("object");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { };
|
|
14
|
+
//# sourceMappingURL=providers.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.test.mjs","names":["moduleExports"],"sources":["../src/providers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./providers.ts\";\n\ndescribe(\"providers.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,8BAA8B;AACrC,IAAG,8BAA8B;AAC/B,SAAOA,kBAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,kBAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
|
package/dist/runtime-checks.cjs
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
|
|
3
4
|
//#region src/runtime-checks.ts
|
|
5
|
+
var runtime_checks_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
6
|
+
isBun: () => isBun,
|
|
7
|
+
isDeno: () => isDeno,
|
|
8
|
+
isEdgeLight: () => isEdgeLight,
|
|
9
|
+
isFastly: () => isFastly,
|
|
10
|
+
isNetlify: () => isNetlify,
|
|
11
|
+
isNode: () => isNode,
|
|
12
|
+
isRuntimeClient: () => isRuntimeClient,
|
|
13
|
+
isRuntimeServer: () => isRuntimeServer,
|
|
14
|
+
isWorkerd: () => isWorkerd,
|
|
15
|
+
runtime: () => runtime,
|
|
16
|
+
runtimeInfo: () => runtimeInfo
|
|
17
|
+
});
|
|
4
18
|
/**
|
|
5
19
|
* Indicates if running in Node.js or a Node.js compatible runtime.
|
|
6
20
|
*
|
|
@@ -69,4 +83,10 @@ exports.isRuntimeClient = isRuntimeClient;
|
|
|
69
83
|
exports.isRuntimeServer = isRuntimeServer;
|
|
70
84
|
exports.isWorkerd = isWorkerd;
|
|
71
85
|
exports.runtime = runtime;
|
|
72
|
-
exports.runtimeInfo = runtimeInfo;
|
|
86
|
+
exports.runtimeInfo = runtimeInfo;
|
|
87
|
+
Object.defineProperty(exports, 'runtime_checks_exports', {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return runtime_checks_exports;
|
|
91
|
+
}
|
|
92
|
+
});
|
package/dist/runtime-checks.mjs
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/runtime-checks.ts
|
|
4
|
+
var runtime_checks_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
isBun: () => isBun,
|
|
6
|
+
isDeno: () => isDeno,
|
|
7
|
+
isEdgeLight: () => isEdgeLight,
|
|
8
|
+
isFastly: () => isFastly,
|
|
9
|
+
isNetlify: () => isNetlify,
|
|
10
|
+
isNode: () => isNode,
|
|
11
|
+
isRuntimeClient: () => isRuntimeClient,
|
|
12
|
+
isRuntimeServer: () => isRuntimeServer,
|
|
13
|
+
isWorkerd: () => isWorkerd,
|
|
14
|
+
runtime: () => runtime,
|
|
15
|
+
runtimeInfo: () => runtimeInfo
|
|
16
|
+
});
|
|
2
17
|
/**
|
|
3
18
|
* Indicates if running in Node.js or a Node.js compatible runtime.
|
|
4
19
|
*
|
|
@@ -57,5 +72,5 @@ const runtimeInfo = detectRuntime();
|
|
|
57
72
|
const runtime = runtimeInfo?.name || "";
|
|
58
73
|
|
|
59
74
|
//#endregion
|
|
60
|
-
export { isBun, isDeno, isEdgeLight, isFastly, isNetlify, isNode, isRuntimeClient, isRuntimeServer, isWorkerd, runtime, runtimeInfo };
|
|
75
|
+
export { isBun, isDeno, isEdgeLight, isFastly, isNetlify, isNode, isRuntimeClient, isRuntimeServer, isWorkerd, runtime, runtimeInfo, runtime_checks_exports };
|
|
61
76
|
//# sourceMappingURL=runtime-checks.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-checks.mjs","names":[],"sources":["../src/runtime-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// https://runtime-keys.proposal.wintercg.org/\nexport type RuntimeName =\n | \"workerd\"\n | \"deno\"\n | \"netlify\"\n | \"node\"\n | \"bun\"\n | \"edge-light\"\n | \"fastly\"\n | \"\";\n\nexport interface RuntimeInfo {\n name: RuntimeName;\n}\n\n/**\n * Indicates if running in Node.js or a Node.js compatible runtime.\n *\n * **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.\n *\n * Use `runtime === \"node\"` if you need strict check for Node.js runtime.\n */\nexport const isNode = process?.release?.name === \"node\";\n\n/**\n * Indicates if running in Bun runtime.\n */\nexport const isBun = Boolean(Bun) || Boolean(process?.versions?.bun);\n\n/**\n * Indicates if running in Deno runtime.\n */\nexport const isDeno = Boolean(Deno);\n\n/**\n * Indicates if running in Fastly runtime.\n */\nexport const isFastly = Boolean(fastly);\n\n/**\n * Indicates if running in Netlify runtime.\n */\nexport const isNetlify = Boolean(Netlify);\n\n/**\n *\n * Indicates if running in EdgeLight (Vercel Edge) runtime.\n */\nexport const isEdgeLight = Boolean(EdgeRuntime);\n// https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent\n\n/**\n * Indicates if running in Cloudflare Workers runtime.\n */\nexport const isWorkerd = navigator?.userAgent === \"Cloudflare-Workers\";\n\n/**\n * Indicates if the code is running on the server-side\n */\nexport const isRuntimeServer =\n isNode ||\n isBun ||\n isDeno ||\n isFastly ||\n isNetlify ||\n isEdgeLight ||\n isWorkerd;\n\n/**\n * Indicates if the code is running in the browser (and not on the server).\n */\nexport const isRuntimeClient = !isRuntimeServer;\n\nconst runtimeChecks: [boolean, RuntimeName][] = [\n [isNetlify, \"netlify\"],\n [isEdgeLight, \"edge-light\"],\n [isWorkerd, \"workerd\"],\n [isFastly, \"fastly\"],\n [isDeno, \"deno\"],\n [isBun, \"bun\"],\n [isNode, \"node\"]\n];\n\nfunction detectRuntime(): RuntimeInfo | undefined {\n const detectedRuntime = runtimeChecks.find(check => check[0]);\n\n if (detectedRuntime) {\n const name = detectedRuntime[1];\n\n return { name };\n }\n\n return undefined;\n}\n\nexport const runtimeInfo = detectRuntime();\n\nexport const runtime: RuntimeName = runtimeInfo?.name || \"\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-checks.mjs","names":[],"sources":["../src/runtime-checks.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// https://runtime-keys.proposal.wintercg.org/\nexport type RuntimeName =\n | \"workerd\"\n | \"deno\"\n | \"netlify\"\n | \"node\"\n | \"bun\"\n | \"edge-light\"\n | \"fastly\"\n | \"\";\n\nexport interface RuntimeInfo {\n name: RuntimeName;\n}\n\n/**\n * Indicates if running in Node.js or a Node.js compatible runtime.\n *\n * **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime.\n *\n * Use `runtime === \"node\"` if you need strict check for Node.js runtime.\n */\nexport const isNode = process?.release?.name === \"node\";\n\n/**\n * Indicates if running in Bun runtime.\n */\nexport const isBun = Boolean(Bun) || Boolean(process?.versions?.bun);\n\n/**\n * Indicates if running in Deno runtime.\n */\nexport const isDeno = Boolean(Deno);\n\n/**\n * Indicates if running in Fastly runtime.\n */\nexport const isFastly = Boolean(fastly);\n\n/**\n * Indicates if running in Netlify runtime.\n */\nexport const isNetlify = Boolean(Netlify);\n\n/**\n *\n * Indicates if running in EdgeLight (Vercel Edge) runtime.\n */\nexport const isEdgeLight = Boolean(EdgeRuntime);\n// https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent\n\n/**\n * Indicates if running in Cloudflare Workers runtime.\n */\nexport const isWorkerd = navigator?.userAgent === \"Cloudflare-Workers\";\n\n/**\n * Indicates if the code is running on the server-side\n */\nexport const isRuntimeServer =\n isNode ||\n isBun ||\n isDeno ||\n isFastly ||\n isNetlify ||\n isEdgeLight ||\n isWorkerd;\n\n/**\n * Indicates if the code is running in the browser (and not on the server).\n */\nexport const isRuntimeClient = !isRuntimeServer;\n\nconst runtimeChecks: [boolean, RuntimeName][] = [\n [isNetlify, \"netlify\"],\n [isEdgeLight, \"edge-light\"],\n [isWorkerd, \"workerd\"],\n [isFastly, \"fastly\"],\n [isDeno, \"deno\"],\n [isBun, \"bun\"],\n [isNode, \"node\"]\n];\n\nfunction detectRuntime(): RuntimeInfo | undefined {\n const detectedRuntime = runtimeChecks.find(check => check[0]);\n\n if (detectedRuntime) {\n const name = detectedRuntime[1];\n\n return { name };\n }\n\n return undefined;\n}\n\nexport const runtimeInfo = detectRuntime();\n\nexport const runtime: RuntimeName = runtimeInfo?.name || \"\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,SAAS,SAAS,SAAS,SAAS;;;;AAKjD,MAAa,QAAQ,QAAQ,IAAI,IAAI,QAAQ,SAAS,UAAU,IAAI;;;;AAKpE,MAAa,SAAS,QAAQ,KAAK;;;;AAKnC,MAAa,WAAW,QAAQ,OAAO;;;;AAKvC,MAAa,YAAY,QAAQ,QAAQ;;;;;AAMzC,MAAa,cAAc,QAAQ,YAAY;;;;AAM/C,MAAa,YAAY,WAAW,cAAc;;;;AAKlD,MAAa,kBACX,UACA,SACA,UACA,YACA,aACA,eACA;;;;AAKF,MAAa,kBAAkB,CAAC;AAEhC,MAAM,gBAA0C;CAC9C,CAAC,WAAW,UAAU;CACtB,CAAC,aAAa,aAAa;CAC3B,CAAC,WAAW,UAAU;CACtB,CAAC,UAAU,SAAS;CACpB,CAAC,QAAQ,OAAO;CAChB,CAAC,OAAO,MAAM;CACd,CAAC,QAAQ,OAAO;CACjB;AAED,SAAS,gBAAyC;CAChD,MAAM,kBAAkB,cAAc,MAAK,UAAS,MAAM,GAAG;AAE7D,KAAI,gBAGF,QAAO,EAAE,MAFI,gBAAgB,IAEd;;AAMnB,MAAa,cAAc,eAAe;AAE1C,MAAa,UAAuB,aAAa,QAAQ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_runtime_checks = require('./runtime-checks.cjs');
|
|
3
|
+
let vitest = require("vitest");
|
|
4
|
+
|
|
5
|
+
//#region src/runtime-checks.test.ts
|
|
6
|
+
(0, vitest.describe)("runtime-checks.ts exports", () => {
|
|
7
|
+
(0, vitest.it)("loads module exports", () => {
|
|
8
|
+
(0, vitest.expect)(require_runtime_checks.runtime_checks_exports).toBeDefined();
|
|
9
|
+
(0, vitest.expect)(typeof require_runtime_checks.runtime_checks_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { runtime_checks_exports } from "./runtime-checks.mjs";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
//#region src/runtime-checks.test.ts
|
|
5
|
+
describe("runtime-checks.ts exports", () => {
|
|
6
|
+
it("loads module exports", () => {
|
|
7
|
+
expect(runtime_checks_exports).toBeDefined();
|
|
8
|
+
expect(typeof runtime_checks_exports).toBe("object");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { };
|
|
14
|
+
//# sourceMappingURL=runtime-checks.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-checks.test.mjs","names":["moduleExports"],"sources":["../src/runtime-checks.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./runtime-checks.ts\";\n\ndescribe(\"runtime-checks.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,mCAAmC;AAC1C,IAAG,8BAA8B;AAC/B,SAAOA,uBAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,uBAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
|
|
3
4
|
//#region src/types.ts
|
|
5
|
+
var types_exports = /* @__PURE__ */ require_runtime.__exportAll({ ENV_PREFIXES: () => ENV_PREFIXES });
|
|
4
6
|
const ENV_PREFIXES = [
|
|
5
7
|
"VITE_",
|
|
6
8
|
"ONE_",
|
|
@@ -11,4 +13,10 @@ const ENV_PREFIXES = [
|
|
|
11
13
|
];
|
|
12
14
|
|
|
13
15
|
//#endregion
|
|
14
|
-
exports.ENV_PREFIXES = ENV_PREFIXES;
|
|
16
|
+
exports.ENV_PREFIXES = ENV_PREFIXES;
|
|
17
|
+
Object.defineProperty(exports, 'types_exports', {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return types_exports;
|
|
21
|
+
}
|
|
22
|
+
});
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/types.ts
|
|
4
|
+
var types_exports = /* @__PURE__ */ __exportAll({ ENV_PREFIXES: () => ENV_PREFIXES });
|
|
2
5
|
const ENV_PREFIXES = [
|
|
3
6
|
"VITE_",
|
|
4
7
|
"ONE_",
|
|
@@ -9,5 +12,5 @@ const ENV_PREFIXES = [
|
|
|
9
12
|
];
|
|
10
13
|
|
|
11
14
|
//#endregion
|
|
12
|
-
export { ENV_PREFIXES };
|
|
15
|
+
export { ENV_PREFIXES, types_exports };
|
|
13
16
|
//# sourceMappingURL=types.mjs.map
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ENV_PREFIXES = [\n \"VITE_\",\n \"ONE_\",\n \"STORM_\",\n \"STORM_STACK_\",\n \"NEXT_\",\n \"VERCEL_\"\n];\n\nexport interface DotenvParseOutput {\n [name: string]: string | undefined;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ENV_PREFIXES = [\n \"VITE_\",\n \"ONE_\",\n \"STORM_\",\n \"STORM_STACK_\",\n \"NEXT_\",\n \"VERCEL_\"\n];\n\nexport interface DotenvParseOutput {\n [name: string]: string | undefined;\n}\n"],"mappings":";;;;AAkBA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_types = require('./types.cjs');
|
|
3
|
+
let vitest = require("vitest");
|
|
4
|
+
|
|
5
|
+
//#region src/types.test.ts
|
|
6
|
+
(0, vitest.describe)("types.ts exports", () => {
|
|
7
|
+
(0, vitest.it)("loads module exports", () => {
|
|
8
|
+
(0, vitest.expect)(require_types.types_exports).toBeDefined();
|
|
9
|
+
(0, vitest.expect)(typeof require_types.types_exports).toBe("object");
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { types_exports } from "./types.mjs";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
|
|
4
|
+
//#region src/types.test.ts
|
|
5
|
+
describe("types.ts exports", () => {
|
|
6
|
+
it("loads module exports", () => {
|
|
7
|
+
expect(types_exports).toBeDefined();
|
|
8
|
+
expect(typeof types_exports).toBe("object");
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { };
|
|
14
|
+
//# sourceMappingURL=types.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.test.mjs","names":["moduleExports"],"sources":["../src/types.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport * as moduleExports from \"./types.ts\";\n\ndescribe(\"types.ts exports\", () => {\n it(\"loads module exports\", () => {\n expect(moduleExports).toBeDefined();\n expect(typeof moduleExports).toBe(\"object\");\n });\n});\n"],"mappings":";;;;AAGA,SAAS,0BAA0B;AACjC,IAAG,8BAA8B;AAC/B,SAAOA,cAAc,CAAC,aAAa;AACnC,SAAO,OAAOA,cAAc,CAAC,KAAK,SAAS;GAC3C;EACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/env",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.98",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing utility functions to handle environment specific processes",
|
|
6
6
|
"repository": {
|
|
@@ -15,41 +15,73 @@
|
|
|
15
15
|
"import": "./dist/ci-checks.mjs",
|
|
16
16
|
"require": "./dist/ci-checks.cjs"
|
|
17
17
|
},
|
|
18
|
+
"./ci-checks.test": {
|
|
19
|
+
"import": "./dist/ci-checks.test.mjs",
|
|
20
|
+
"require": "./dist/ci-checks.test.cjs"
|
|
21
|
+
},
|
|
18
22
|
"./environment-checks": {
|
|
19
23
|
"import": "./dist/environment-checks.mjs",
|
|
20
24
|
"require": "./dist/environment-checks.cjs"
|
|
21
25
|
},
|
|
26
|
+
"./environment-checks.test": {
|
|
27
|
+
"import": "./dist/environment-checks.test.mjs",
|
|
28
|
+
"require": "./dist/environment-checks.test.cjs"
|
|
29
|
+
},
|
|
22
30
|
"./get-env-paths": {
|
|
23
31
|
"import": "./dist/get-env-paths.mjs",
|
|
24
32
|
"require": "./dist/get-env-paths.cjs"
|
|
25
33
|
},
|
|
34
|
+
"./get-env-paths.test": {
|
|
35
|
+
"import": "./dist/get-env-paths.test.mjs",
|
|
36
|
+
"require": "./dist/get-env-paths.test.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./index.test": {
|
|
39
|
+
"import": "./dist/index.test.mjs",
|
|
40
|
+
"require": "./dist/index.test.cjs"
|
|
41
|
+
},
|
|
26
42
|
"./load-env": {
|
|
27
43
|
"import": "./dist/load-env.mjs",
|
|
28
44
|
"require": "./dist/load-env.cjs"
|
|
29
45
|
},
|
|
46
|
+
"./load-env.test": {
|
|
47
|
+
"import": "./dist/load-env.test.mjs",
|
|
48
|
+
"require": "./dist/load-env.test.cjs"
|
|
49
|
+
},
|
|
30
50
|
"./providers": {
|
|
31
51
|
"import": "./dist/providers.mjs",
|
|
32
52
|
"require": "./dist/providers.cjs"
|
|
33
53
|
},
|
|
54
|
+
"./providers.test": {
|
|
55
|
+
"import": "./dist/providers.test.mjs",
|
|
56
|
+
"require": "./dist/providers.test.cjs"
|
|
57
|
+
},
|
|
34
58
|
"./runtime-checks": {
|
|
35
59
|
"import": "./dist/runtime-checks.mjs",
|
|
36
60
|
"require": "./dist/runtime-checks.cjs"
|
|
37
61
|
},
|
|
62
|
+
"./runtime-checks.test": {
|
|
63
|
+
"import": "./dist/runtime-checks.test.mjs",
|
|
64
|
+
"require": "./dist/runtime-checks.test.cjs"
|
|
65
|
+
},
|
|
38
66
|
"./types": { "import": "./dist/types.mjs", "require": "./dist/types.cjs" },
|
|
39
|
-
"
|
|
67
|
+
"./types.test": {
|
|
68
|
+
"import": "./dist/types.test.mjs",
|
|
69
|
+
"require": "./dist/types.test.cjs"
|
|
70
|
+
},
|
|
71
|
+
"./package.json": "./package.json"
|
|
40
72
|
},
|
|
41
73
|
"main": "./dist/index.cjs",
|
|
42
74
|
"module": "./dist/index.mjs",
|
|
43
75
|
"types": "./dist/index.d.cts",
|
|
44
76
|
"dependencies": {
|
|
45
77
|
"@dotenvx/dotenvx": "1.35.0",
|
|
46
|
-
"@stryke/convert": "^0.7.
|
|
47
|
-
"@stryke/fs": "^0.33.
|
|
48
|
-
"@stryke/path": "^0.29.
|
|
49
|
-
"@stryke/string-format": "^0.17.
|
|
78
|
+
"@stryke/convert": "^0.7.12",
|
|
79
|
+
"@stryke/fs": "^0.33.81",
|
|
80
|
+
"@stryke/path": "^0.29.8",
|
|
81
|
+
"@stryke/string-format": "^0.17.23",
|
|
50
82
|
"defu": "^6.1.7"
|
|
51
83
|
},
|
|
52
84
|
"devDependencies": { "@types/node": "^24.12.4", "tsdown": "^0.21.10" },
|
|
53
85
|
"publishConfig": { "access": "public" },
|
|
54
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "166741e285a7112dfc6dd34206b43578dc4d19ec"
|
|
55
87
|
}
|