@fantasticfour/dotenvx-next 0.1.3

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.
Files changed (42) hide show
  1. package/dist/chunk-y_GBKt04.mjs +5 -0
  2. package/dist/index.cjs +3 -0
  3. package/dist/index.d.cts +2 -0
  4. package/dist/index.d.mts +2 -0
  5. package/dist/index.mjs +2 -0
  6. package/dist/init.cjs +16 -0
  7. package/dist/init.cjs.map +1 -0
  8. package/dist/init.d.cts +5 -0
  9. package/dist/init.d.cts.map +1 -0
  10. package/dist/init.d.mts +5 -0
  11. package/dist/init.d.mts.map +1 -0
  12. package/dist/init.mjs +18 -0
  13. package/dist/init.mjs.map +1 -0
  14. package/dist/next-env-compat.cjs +11866 -0
  15. package/dist/next-env-compat.cjs.map +1 -0
  16. package/dist/next-env-compat.d.cts +1 -0
  17. package/dist/plugin.cjs +98 -0
  18. package/dist/plugin.cjs.map +1 -0
  19. package/dist/plugin.d.cts +26 -0
  20. package/dist/plugin.d.cts.map +1 -0
  21. package/dist/plugin.d.mts +26 -0
  22. package/dist/plugin.d.mts.map +1 -0
  23. package/dist/plugin.mjs +96 -0
  24. package/dist/plugin.mjs.map +1 -0
  25. package/dist/turbopack-inject-BgCxanwa.cjs +139 -0
  26. package/dist/turbopack-inject-BgCxanwa.cjs.map +1 -0
  27. package/dist/turbopack-inject.cjs +5 -0
  28. package/dist/turbopack-inject.d.cts +23 -0
  29. package/dist/turbopack-inject.d.cts.map +1 -0
  30. package/dist/turbopack-inject.d.mts +23 -0
  31. package/dist/turbopack-inject.d.mts.map +1 -0
  32. package/dist/turbopack-inject.mjs +92 -0
  33. package/dist/turbopack-inject.mjs.map +1 -0
  34. package/dist/webpack-plugin.cjs +52 -0
  35. package/dist/webpack-plugin.cjs.map +1 -0
  36. package/dist/webpack-plugin.d.cts +27 -0
  37. package/dist/webpack-plugin.d.cts.map +1 -0
  38. package/dist/webpack-plugin.d.mts +27 -0
  39. package/dist/webpack-plugin.d.mts.map +1 -0
  40. package/dist/webpack-plugin.mjs +52 -0
  41. package/dist/webpack-plugin.mjs.map +1 -0
  42. package/package.json +68 -0
@@ -0,0 +1,5 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
+ //#endregion
5
+ export { __require as t };
package/dist/index.cjs ADDED
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_plugin = require("./plugin.cjs");
3
+ exports.withDotenvx = require_plugin.withDotenvx;
@@ -0,0 +1,2 @@
1
+ import { DotenvxNextOptions, withDotenvx } from "./plugin.cjs";
2
+ export { type DotenvxNextOptions, withDotenvx };
@@ -0,0 +1,2 @@
1
+ import { DotenvxNextOptions, withDotenvx } from "./plugin.mjs";
2
+ export { type DotenvxNextOptions, withDotenvx };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { withDotenvx } from "./plugin.mjs";
2
+ export { withDotenvx };
package/dist/init.cjs ADDED
@@ -0,0 +1,16 @@
1
+ //#region src/init.ts
2
+ if (typeof process !== "undefined" && !globalThis.__dotenvxNextInit) {
3
+ globalThis.__dotenvxNextInit = true;
4
+ const vercelEnv = process.env.VERCEL_ENV;
5
+ if (vercelEnv === "production" || vercelEnv === "preview") {
6
+ const files = JSON.parse("__DOTENVX_FILES__");
7
+ require("@dotenvx/dotenvx").config({
8
+ path: files,
9
+ overload: true,
10
+ quiet: true
11
+ });
12
+ }
13
+ }
14
+ //#endregion
15
+
16
+ //# sourceMappingURL=init.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.cjs","names":[],"sources":["../src/init.ts"],"sourcesContent":["/**\n * Runtime init bundle — injected into webpack/turbopack runtime before any user code runs.\n * This is a self-contained CJS-compatible snippet that runs in the webpack runtime context.\n *\n * The string '__DOTENVX_FILES__' is replaced by DotenvxWebpackPlugin via string substitution\n * with a JSON-encoded array of env file paths before this source is prepended to the runtime.\n *\n * Guard against double-init (worker processes, HMR) via a globalThis flag.\n */\n\n// Augment global type to include our guard flag\n// export {} makes this a module so `declare global` is valid\nexport {};\ndeclare global {\n var __dotenvxNextInit: boolean | undefined;\n}\n\nif (typeof process !== 'undefined' && !globalThis.__dotenvxNextInit) {\n globalThis.__dotenvxNextInit = true;\n\n const vercelEnv = process.env.VERCEL_ENV;\n\n if (vercelEnv === 'production' || vercelEnv === 'preview') {\n // '__DOTENVX_FILES__' is replaced at injection time with the actual JSON-encoded file list\n const files = JSON.parse('__DOTENVX_FILES__') as string[];\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n (require('@dotenvx/dotenvx') as typeof import('@dotenvx/dotenvx')).config({\n path: files,\n overload: true,\n quiet: true,\n });\n }\n}\n"],"mappings":";AAiBA,IAAI,OAAO,YAAY,eAAe,CAAC,WAAW,mBAAmB;AACnE,YAAW,oBAAoB;CAE/B,MAAM,YAAY,QAAQ,IAAI;AAE9B,KAAI,cAAc,gBAAgB,cAAc,WAAW;EAEzD,MAAM,QAAQ,KAAK,MAAM,oBAAoB;AAG5C,UAAQ,mBAAmB,CAAuC,OAAO;GACxE,MAAM;GACN,UAAU;GACV,OAAO;GACR,CAAC"}
@@ -0,0 +1,5 @@
1
+ //#region src/init.d.ts
2
+ declare global {
3
+ var __dotenvxNextInit: boolean | undefined;
4
+ } //# sourceMappingURL=init.d.ts.map
5
+ //# sourceMappingURL=init.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.cts","names":[],"sources":["../src/init.ts"],"mappings":";QAaQ,MAAA;EAAA,IACF,iBAAA;AAAA"}
@@ -0,0 +1,5 @@
1
+ //#region src/init.d.ts
2
+ declare global {
3
+ var __dotenvxNextInit: boolean | undefined;
4
+ } //# sourceMappingURL=init.d.ts.map
5
+ //# sourceMappingURL=init.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.mts","names":[],"sources":["../src/init.ts"],"mappings":";QAaQ,MAAA;EAAA,IACF,iBAAA;AAAA"}
package/dist/init.mjs ADDED
@@ -0,0 +1,18 @@
1
+ import { t as __require } from "./chunk-y_GBKt04.mjs";
2
+ //#region src/init.ts
3
+ if (typeof process !== "undefined" && !globalThis.__dotenvxNextInit) {
4
+ globalThis.__dotenvxNextInit = true;
5
+ const vercelEnv = process.env.VERCEL_ENV;
6
+ if (vercelEnv === "production" || vercelEnv === "preview") {
7
+ const files = JSON.parse("__DOTENVX_FILES__");
8
+ __require("@dotenvx/dotenvx").config({
9
+ path: files,
10
+ overload: true,
11
+ quiet: true
12
+ });
13
+ }
14
+ }
15
+ //#endregion
16
+ export {};
17
+
18
+ //# sourceMappingURL=init.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.mjs","names":[],"sources":["../src/init.ts"],"sourcesContent":["/**\n * Runtime init bundle — injected into webpack/turbopack runtime before any user code runs.\n * This is a self-contained CJS-compatible snippet that runs in the webpack runtime context.\n *\n * The string '__DOTENVX_FILES__' is replaced by DotenvxWebpackPlugin via string substitution\n * with a JSON-encoded array of env file paths before this source is prepended to the runtime.\n *\n * Guard against double-init (worker processes, HMR) via a globalThis flag.\n */\n\n// Augment global type to include our guard flag\n// export {} makes this a module so `declare global` is valid\nexport {};\ndeclare global {\n var __dotenvxNextInit: boolean | undefined;\n}\n\nif (typeof process !== 'undefined' && !globalThis.__dotenvxNextInit) {\n globalThis.__dotenvxNextInit = true;\n\n const vercelEnv = process.env.VERCEL_ENV;\n\n if (vercelEnv === 'production' || vercelEnv === 'preview') {\n // '__DOTENVX_FILES__' is replaced at injection time with the actual JSON-encoded file list\n const files = JSON.parse('__DOTENVX_FILES__') as string[];\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n (require('@dotenvx/dotenvx') as typeof import('@dotenvx/dotenvx')).config({\n path: files,\n overload: true,\n quiet: true,\n });\n }\n}\n"],"mappings":";;AAiBA,IAAI,OAAO,YAAY,eAAe,CAAC,WAAW,mBAAmB;AACnE,YAAW,oBAAoB;CAE/B,MAAM,YAAY,QAAQ,IAAI;AAE9B,KAAI,cAAc,gBAAgB,cAAc,WAAW;EAEzD,MAAM,QAAQ,KAAK,MAAM,oBAAoB;AAG7C,YAAS,mBAAmB,CAAuC,OAAO;GACxE,MAAM;GACN,UAAU;GACV,OAAO;GACR,CAAC"}