@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.
- package/dist/chunk-y_GBKt04.mjs +5 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -0
- package/dist/init.cjs +16 -0
- package/dist/init.cjs.map +1 -0
- package/dist/init.d.cts +5 -0
- package/dist/init.d.cts.map +1 -0
- package/dist/init.d.mts +5 -0
- package/dist/init.d.mts.map +1 -0
- package/dist/init.mjs +18 -0
- package/dist/init.mjs.map +1 -0
- package/dist/next-env-compat.cjs +11866 -0
- package/dist/next-env-compat.cjs.map +1 -0
- package/dist/next-env-compat.d.cts +1 -0
- package/dist/plugin.cjs +98 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +26 -0
- package/dist/plugin.d.cts.map +1 -0
- package/dist/plugin.d.mts +26 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +96 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/turbopack-inject-BgCxanwa.cjs +139 -0
- package/dist/turbopack-inject-BgCxanwa.cjs.map +1 -0
- package/dist/turbopack-inject.cjs +5 -0
- package/dist/turbopack-inject.d.cts +23 -0
- package/dist/turbopack-inject.d.cts.map +1 -0
- package/dist/turbopack-inject.d.mts +23 -0
- package/dist/turbopack-inject.d.mts.map +1 -0
- package/dist/turbopack-inject.mjs +92 -0
- package/dist/turbopack-inject.mjs.map +1 -0
- package/dist/webpack-plugin.cjs +52 -0
- package/dist/webpack-plugin.cjs.map +1 -0
- package/dist/webpack-plugin.d.cts +27 -0
- package/dist/webpack-plugin.d.cts.map +1 -0
- package/dist/webpack-plugin.d.mts +27 -0
- package/dist/webpack-plugin.d.mts.map +1 -0
- package/dist/webpack-plugin.mjs +52 -0
- package/dist/webpack-plugin.mjs.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/webpack-plugin.ts
|
|
3
|
+
const PLUGIN_NAME = "DotenvxNextWebpackPlugin";
|
|
4
|
+
const SERVER_RUNTIME_ASSETS = [
|
|
5
|
+
"webpack-runtime.js",
|
|
6
|
+
"../webpack-runtime.js",
|
|
7
|
+
"webpack-api-runtime.js",
|
|
8
|
+
"../webpack-api-runtime.js"
|
|
9
|
+
];
|
|
10
|
+
const EDGE_RUNTIME_ASSETS = [
|
|
11
|
+
"edge-runtime-webpack.js",
|
|
12
|
+
"webpack-runtime.js",
|
|
13
|
+
"../webpack-runtime.js"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Replace the __DOTENVX_FILES__ placeholder in the init bundle with the actual
|
|
17
|
+
* file list. The placeholder is a string literal in the source that gets swapped
|
|
18
|
+
* with a JSON-encoded array string, so JSON.parse() in the init code yields string[].
|
|
19
|
+
*/
|
|
20
|
+
function substituteFiles(initSource, files) {
|
|
21
|
+
return initSource.replace(/'__DOTENVX_FILES__'/g, JSON.stringify(JSON.stringify(files)));
|
|
22
|
+
}
|
|
23
|
+
var DotenvxWebpackPlugin = class {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
}
|
|
27
|
+
apply(compiler) {
|
|
28
|
+
const { files, initSource } = this.options;
|
|
29
|
+
const wrappedInit = `(function(exports,module){${substituteFiles(initSource, files)}})({},{exports:{}});`;
|
|
30
|
+
const webpack = require("webpack");
|
|
31
|
+
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
|
|
32
|
+
compilation.hooks.processAssets.tap({
|
|
33
|
+
name: PLUGIN_NAME,
|
|
34
|
+
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
|
|
35
|
+
}, () => {
|
|
36
|
+
const target = compiler.options.target;
|
|
37
|
+
const runtimeNames = (Array.isArray(target) ? target.some((t) => typeof t === "string" && t.includes("webworker")) : typeof target === "string" && target.includes("webworker")) ? EDGE_RUNTIME_ASSETS : SERVER_RUNTIME_ASSETS;
|
|
38
|
+
for (const assetName of runtimeNames) {
|
|
39
|
+
if (!compilation.getAsset(assetName)) continue;
|
|
40
|
+
compilation.updateAsset(assetName, (origSource) => {
|
|
41
|
+
const updatedSourceStr = [wrappedInit, origSource.source().toString()].join("\n");
|
|
42
|
+
return new webpack.sources.RawSource(updatedSourceStr);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
exports.DotenvxWebpackPlugin = DotenvxWebpackPlugin;
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=webpack-plugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack-plugin.cjs","names":[],"sources":["../src/webpack-plugin.ts"],"sourcesContent":["/**\n * DotenvxWebpackPlugin — injects the dotenvx init bundle into webpack runtime files.\n *\n * We prepend the self-contained init bundle as raw JS so it runs before any\n * module code (before Prisma Pool, etc. can evaluate at import time).\n *\n * The __DOTENVX_FILES__ placeholder in the init source is replaced via direct\n * string substitution before injection — no DefinePlugin needed.\n */\n\n// webpack types come bundled with next — do not add webpack as a separate dep\ntype WebpackCompiler = import('webpack').Compiler;\ntype WebpackCompilation = import('webpack').Compilation;\n\nconst PLUGIN_NAME = 'DotenvxNextWebpackPlugin';\n\n// These are the webpack runtime asset names where we inject\nconst SERVER_RUNTIME_ASSETS = [\n 'webpack-runtime.js',\n '../webpack-runtime.js',\n 'webpack-api-runtime.js',\n '../webpack-api-runtime.js',\n];\n\nconst EDGE_RUNTIME_ASSETS = [\n 'edge-runtime-webpack.js',\n 'webpack-runtime.js',\n '../webpack-runtime.js',\n];\n\nexport interface DotenvxWebpackPluginOptions {\n /** Resolved list of env file paths to pass to dotenvx at runtime */\n files: string[];\n /** Pre-compiled init bundle source (CJS) to prepend into runtime */\n initSource: string;\n}\n\n/**\n * Replace the __DOTENVX_FILES__ placeholder in the init bundle with the actual\n * file list. The placeholder is a string literal in the source that gets swapped\n * with a JSON-encoded array string, so JSON.parse() in the init code yields string[].\n */\nfunction substituteFiles(initSource: string, files: string[]): string {\n // The init source contains: const filesJson: string = '__DOTENVX_FILES__';\n // We replace the placeholder string literal with the actual JSON value.\n return initSource.replace(\n /'__DOTENVX_FILES__'/g,\n JSON.stringify(JSON.stringify(files)),\n );\n}\n\nexport class DotenvxWebpackPlugin {\n private readonly options: DotenvxWebpackPluginOptions;\n\n constructor(options: DotenvxWebpackPluginOptions) {\n this.options = options;\n }\n\n apply(compiler: WebpackCompiler): void {\n const { files, initSource } = this.options;\n\n // Substitute the file list into the init bundle once, before any hooks run\n const patchedInitSource = substituteFiles(initSource, files);\n\n // Wrap in IIFE to avoid symbol collisions (CJS bundle uses exports.X = ...)\n const wrappedInit = `(function(exports,module){${patchedInitSource}})({},{exports:{}});`;\n\n // Use webpack from the compiler's context — same instance Next.js uses\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const webpack = require('webpack') as typeof import('webpack');\n\n compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation: WebpackCompilation) => {\n compilation.hooks.processAssets.tap(\n {\n name: PLUGIN_NAME,\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n () => {\n // Determine compilation target from compiler options\n const target = compiler.options.target;\n const isEdge = Array.isArray(target)\n ? target.some((t) => typeof t === 'string' && t.includes('webworker'))\n : typeof target === 'string' && target.includes('webworker');\n\n // Only inject into server-side compilations (not client bundles)\n const runtimeNames = isEdge ? EDGE_RUNTIME_ASSETS : SERVER_RUNTIME_ASSETS;\n\n for (const assetName of runtimeNames) {\n if (!compilation.getAsset(assetName)) continue;\n\n compilation.updateAsset(assetName, (origSource) => {\n const origSourceStr = origSource.source().toString();\n const updatedSourceStr = [wrappedInit, origSourceStr].join('\\n');\n return new webpack.sources.RawSource(updatedSourceStr);\n });\n }\n },\n );\n });\n }\n}\n"],"mappings":";;AAcA,MAAM,cAAc;AAGpB,MAAM,wBAAwB;CAC5B;CACA;CACA;CACA;CACD;AAED,MAAM,sBAAsB;CAC1B;CACA;CACA;CACD;;;;;;AAcD,SAAS,gBAAgB,YAAoB,OAAyB;AAGpE,QAAO,WAAW,QAChB,wBACA,KAAK,UAAU,KAAK,UAAU,MAAM,CAAC,CACtC;;AAGH,IAAa,uBAAb,MAAkC;CAGhC,YAAY,SAAsC;AAChD,OAAK,UAAU;;CAGjB,MAAM,UAAiC;EACrC,MAAM,EAAE,OAAO,eAAe,KAAK;EAMnC,MAAM,cAAc,6BAHM,gBAAgB,YAAY,MAGY,CAAC;EAInE,MAAM,UAAU,QAAQ,UAAU;AAElC,WAAS,MAAM,gBAAgB,IAAI,cAAc,gBAAoC;AACnF,eAAY,MAAM,cAAc,IAC9B;IACE,MAAM;IACN,OAAO,QAAQ,YAAY;IAC5B,QACK;IAEJ,MAAM,SAAS,SAAS,QAAQ;IAMhC,MAAM,gBALS,MAAM,QAAQ,OAAO,GAChC,OAAO,MAAM,MAAM,OAAO,MAAM,YAAY,EAAE,SAAS,YAAY,CAAC,GACpE,OAAO,WAAW,YAAY,OAAO,SAAS,YAAY,IAGhC,sBAAsB;AAEpD,SAAK,MAAM,aAAa,cAAc;AACpC,SAAI,CAAC,YAAY,SAAS,UAAU,CAAE;AAEtC,iBAAY,YAAY,YAAY,eAAe;MAEjD,MAAM,mBAAmB,CAAC,aADJ,WAAW,QAAQ,CAAC,UACU,CAAC,CAAC,KAAK,KAAK;AAChE,aAAO,IAAI,QAAQ,QAAQ,UAAU,iBAAiB;OACtD;;KAGP;IACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as _$webpack from "webpack";
|
|
2
|
+
|
|
3
|
+
//#region src/webpack-plugin.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* DotenvxWebpackPlugin — injects the dotenvx init bundle into webpack runtime files.
|
|
6
|
+
*
|
|
7
|
+
* We prepend the self-contained init bundle as raw JS so it runs before any
|
|
8
|
+
* module code (before Prisma Pool, etc. can evaluate at import time).
|
|
9
|
+
*
|
|
10
|
+
* The __DOTENVX_FILES__ placeholder in the init source is replaced via direct
|
|
11
|
+
* string substitution before injection — no DefinePlugin needed.
|
|
12
|
+
*/
|
|
13
|
+
type WebpackCompiler = _$webpack.Compiler;
|
|
14
|
+
interface DotenvxWebpackPluginOptions {
|
|
15
|
+
/** Resolved list of env file paths to pass to dotenvx at runtime */
|
|
16
|
+
files: string[];
|
|
17
|
+
/** Pre-compiled init bundle source (CJS) to prepend into runtime */
|
|
18
|
+
initSource: string;
|
|
19
|
+
}
|
|
20
|
+
declare class DotenvxWebpackPlugin {
|
|
21
|
+
private readonly options;
|
|
22
|
+
constructor(options: DotenvxWebpackPluginOptions);
|
|
23
|
+
apply(compiler: WebpackCompiler): void;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { DotenvxWebpackPlugin, DotenvxWebpackPluginOptions };
|
|
27
|
+
//# sourceMappingURL=webpack-plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack-plugin.d.cts","names":[],"sources":["../src/webpack-plugin.ts"],"mappings":";;;;;;AAWuC;;;;;AAmBvC;KAnBK,eAAA,GAAe,SAAA,CAAqB,QAAA;AAAA,UAmBxB,2BAAA;EAEf;EAAA,KAAA;EAmBW;EAjBX,UAAA;AAAA;AAAA,cAiBW,oBAAA;EAAA,iBACM,OAAA;cAEL,OAAA,EAAS,2BAAA;EAIrB,KAAA,CAAM,QAAA,EAAU,eAAA;AAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as _$webpack from "webpack";
|
|
2
|
+
|
|
3
|
+
//#region src/webpack-plugin.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* DotenvxWebpackPlugin — injects the dotenvx init bundle into webpack runtime files.
|
|
6
|
+
*
|
|
7
|
+
* We prepend the self-contained init bundle as raw JS so it runs before any
|
|
8
|
+
* module code (before Prisma Pool, etc. can evaluate at import time).
|
|
9
|
+
*
|
|
10
|
+
* The __DOTENVX_FILES__ placeholder in the init source is replaced via direct
|
|
11
|
+
* string substitution before injection — no DefinePlugin needed.
|
|
12
|
+
*/
|
|
13
|
+
type WebpackCompiler = _$webpack.Compiler;
|
|
14
|
+
interface DotenvxWebpackPluginOptions {
|
|
15
|
+
/** Resolved list of env file paths to pass to dotenvx at runtime */
|
|
16
|
+
files: string[];
|
|
17
|
+
/** Pre-compiled init bundle source (CJS) to prepend into runtime */
|
|
18
|
+
initSource: string;
|
|
19
|
+
}
|
|
20
|
+
declare class DotenvxWebpackPlugin {
|
|
21
|
+
private readonly options;
|
|
22
|
+
constructor(options: DotenvxWebpackPluginOptions);
|
|
23
|
+
apply(compiler: WebpackCompiler): void;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { DotenvxWebpackPlugin, DotenvxWebpackPluginOptions };
|
|
27
|
+
//# sourceMappingURL=webpack-plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack-plugin.d.mts","names":[],"sources":["../src/webpack-plugin.ts"],"mappings":";;;;;;AAWuC;;;;;AAmBvC;KAnBK,eAAA,GAAe,SAAA,CAAqB,QAAA;AAAA,UAmBxB,2BAAA;EAEf;EAAA,KAAA;EAmBW;EAjBX,UAAA;AAAA;AAAA,cAiBW,oBAAA;EAAA,iBACM,OAAA;cAEL,OAAA,EAAS,2BAAA;EAIrB,KAAA,CAAM,QAAA,EAAU,eAAA;AAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as __require } from "./chunk-y_GBKt04.mjs";
|
|
2
|
+
//#region src/webpack-plugin.ts
|
|
3
|
+
const PLUGIN_NAME = "DotenvxNextWebpackPlugin";
|
|
4
|
+
const SERVER_RUNTIME_ASSETS = [
|
|
5
|
+
"webpack-runtime.js",
|
|
6
|
+
"../webpack-runtime.js",
|
|
7
|
+
"webpack-api-runtime.js",
|
|
8
|
+
"../webpack-api-runtime.js"
|
|
9
|
+
];
|
|
10
|
+
const EDGE_RUNTIME_ASSETS = [
|
|
11
|
+
"edge-runtime-webpack.js",
|
|
12
|
+
"webpack-runtime.js",
|
|
13
|
+
"../webpack-runtime.js"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Replace the __DOTENVX_FILES__ placeholder in the init bundle with the actual
|
|
17
|
+
* file list. The placeholder is a string literal in the source that gets swapped
|
|
18
|
+
* with a JSON-encoded array string, so JSON.parse() in the init code yields string[].
|
|
19
|
+
*/
|
|
20
|
+
function substituteFiles(initSource, files) {
|
|
21
|
+
return initSource.replace(/'__DOTENVX_FILES__'/g, JSON.stringify(JSON.stringify(files)));
|
|
22
|
+
}
|
|
23
|
+
var DotenvxWebpackPlugin = class {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
this.options = options;
|
|
26
|
+
}
|
|
27
|
+
apply(compiler) {
|
|
28
|
+
const { files, initSource } = this.options;
|
|
29
|
+
const wrappedInit = `(function(exports,module){${substituteFiles(initSource, files)}})({},{exports:{}});`;
|
|
30
|
+
const webpack = __require("webpack");
|
|
31
|
+
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
|
|
32
|
+
compilation.hooks.processAssets.tap({
|
|
33
|
+
name: PLUGIN_NAME,
|
|
34
|
+
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
|
|
35
|
+
}, () => {
|
|
36
|
+
const target = compiler.options.target;
|
|
37
|
+
const runtimeNames = (Array.isArray(target) ? target.some((t) => typeof t === "string" && t.includes("webworker")) : typeof target === "string" && target.includes("webworker")) ? EDGE_RUNTIME_ASSETS : SERVER_RUNTIME_ASSETS;
|
|
38
|
+
for (const assetName of runtimeNames) {
|
|
39
|
+
if (!compilation.getAsset(assetName)) continue;
|
|
40
|
+
compilation.updateAsset(assetName, (origSource) => {
|
|
41
|
+
const updatedSourceStr = [wrappedInit, origSource.source().toString()].join("\n");
|
|
42
|
+
return new webpack.sources.RawSource(updatedSourceStr);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { DotenvxWebpackPlugin };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=webpack-plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack-plugin.mjs","names":[],"sources":["../src/webpack-plugin.ts"],"sourcesContent":["/**\n * DotenvxWebpackPlugin — injects the dotenvx init bundle into webpack runtime files.\n *\n * We prepend the self-contained init bundle as raw JS so it runs before any\n * module code (before Prisma Pool, etc. can evaluate at import time).\n *\n * The __DOTENVX_FILES__ placeholder in the init source is replaced via direct\n * string substitution before injection — no DefinePlugin needed.\n */\n\n// webpack types come bundled with next — do not add webpack as a separate dep\ntype WebpackCompiler = import('webpack').Compiler;\ntype WebpackCompilation = import('webpack').Compilation;\n\nconst PLUGIN_NAME = 'DotenvxNextWebpackPlugin';\n\n// These are the webpack runtime asset names where we inject\nconst SERVER_RUNTIME_ASSETS = [\n 'webpack-runtime.js',\n '../webpack-runtime.js',\n 'webpack-api-runtime.js',\n '../webpack-api-runtime.js',\n];\n\nconst EDGE_RUNTIME_ASSETS = [\n 'edge-runtime-webpack.js',\n 'webpack-runtime.js',\n '../webpack-runtime.js',\n];\n\nexport interface DotenvxWebpackPluginOptions {\n /** Resolved list of env file paths to pass to dotenvx at runtime */\n files: string[];\n /** Pre-compiled init bundle source (CJS) to prepend into runtime */\n initSource: string;\n}\n\n/**\n * Replace the __DOTENVX_FILES__ placeholder in the init bundle with the actual\n * file list. The placeholder is a string literal in the source that gets swapped\n * with a JSON-encoded array string, so JSON.parse() in the init code yields string[].\n */\nfunction substituteFiles(initSource: string, files: string[]): string {\n // The init source contains: const filesJson: string = '__DOTENVX_FILES__';\n // We replace the placeholder string literal with the actual JSON value.\n return initSource.replace(\n /'__DOTENVX_FILES__'/g,\n JSON.stringify(JSON.stringify(files)),\n );\n}\n\nexport class DotenvxWebpackPlugin {\n private readonly options: DotenvxWebpackPluginOptions;\n\n constructor(options: DotenvxWebpackPluginOptions) {\n this.options = options;\n }\n\n apply(compiler: WebpackCompiler): void {\n const { files, initSource } = this.options;\n\n // Substitute the file list into the init bundle once, before any hooks run\n const patchedInitSource = substituteFiles(initSource, files);\n\n // Wrap in IIFE to avoid symbol collisions (CJS bundle uses exports.X = ...)\n const wrappedInit = `(function(exports,module){${patchedInitSource}})({},{exports:{}});`;\n\n // Use webpack from the compiler's context — same instance Next.js uses\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const webpack = require('webpack') as typeof import('webpack');\n\n compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation: WebpackCompilation) => {\n compilation.hooks.processAssets.tap(\n {\n name: PLUGIN_NAME,\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n () => {\n // Determine compilation target from compiler options\n const target = compiler.options.target;\n const isEdge = Array.isArray(target)\n ? target.some((t) => typeof t === 'string' && t.includes('webworker'))\n : typeof target === 'string' && target.includes('webworker');\n\n // Only inject into server-side compilations (not client bundles)\n const runtimeNames = isEdge ? EDGE_RUNTIME_ASSETS : SERVER_RUNTIME_ASSETS;\n\n for (const assetName of runtimeNames) {\n if (!compilation.getAsset(assetName)) continue;\n\n compilation.updateAsset(assetName, (origSource) => {\n const origSourceStr = origSource.source().toString();\n const updatedSourceStr = [wrappedInit, origSourceStr].join('\\n');\n return new webpack.sources.RawSource(updatedSourceStr);\n });\n }\n },\n );\n });\n }\n}\n"],"mappings":";;AAcA,MAAM,cAAc;AAGpB,MAAM,wBAAwB;CAC5B;CACA;CACA;CACA;CACD;AAED,MAAM,sBAAsB;CAC1B;CACA;CACA;CACD;;;;;;AAcD,SAAS,gBAAgB,YAAoB,OAAyB;AAGpE,QAAO,WAAW,QAChB,wBACA,KAAK,UAAU,KAAK,UAAU,MAAM,CAAC,CACtC;;AAGH,IAAa,uBAAb,MAAkC;CAGhC,YAAY,SAAsC;AAChD,OAAK,UAAU;;CAGjB,MAAM,UAAiC;EACrC,MAAM,EAAE,OAAO,eAAe,KAAK;EAMnC,MAAM,cAAc,6BAHM,gBAAgB,YAAY,MAGY,CAAC;EAInE,MAAM,UAAA,UAAkB,UAAU;AAElC,WAAS,MAAM,gBAAgB,IAAI,cAAc,gBAAoC;AACnF,eAAY,MAAM,cAAc,IAC9B;IACE,MAAM;IACN,OAAO,QAAQ,YAAY;IAC5B,QACK;IAEJ,MAAM,SAAS,SAAS,QAAQ;IAMhC,MAAM,gBALS,MAAM,QAAQ,OAAO,GAChC,OAAO,MAAM,MAAM,OAAO,MAAM,YAAY,EAAE,SAAS,YAAY,CAAC,GACpE,OAAO,WAAW,YAAY,OAAO,SAAS,YAAY,IAGhC,sBAAsB;AAEpD,SAAK,MAAM,aAAa,cAAc;AACpC,SAAI,CAAC,YAAY,SAAS,UAAU,CAAE;AAEtC,iBAAY,YAAY,YAAY,eAAe;MAEjD,MAAM,mBAAmB,CAAC,aADJ,WAAW,QAAQ,CAAC,UACU,CAAC,CAAC,KAAK,KAAK;AAChE,aAAO,IAAI,QAAQ,QAAQ,UAAU,iBAAiB;OACtD;;KAGP;IACD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fantasticfour/dotenvx-next",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Next.js plugin that loads dotenvx secrets early — before any user code evaluates — by injecting an init bundle into webpack/turbopack runtime files at build time.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/vinnymac/dotenvx-next.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.cjs",
|
|
11
|
+
"module": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./next-env": {
|
|
19
|
+
"require": "./dist/next-env-compat.cjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsdown",
|
|
27
|
+
"dev": "tsdown --watch",
|
|
28
|
+
"typecheck": "tsgo --noEmit",
|
|
29
|
+
"lint": "biome lint .",
|
|
30
|
+
"format": "biome format --write .",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"changeset": "changeset",
|
|
33
|
+
"ci:version": "changeset version",
|
|
34
|
+
"ci:publish": "changeset publish",
|
|
35
|
+
"prepare": "husky"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"next": ">=14"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@dotenvx/dotenvx": "^1.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@biomejs/biome": "^2.4.13",
|
|
45
|
+
"@changesets/cli": "^2.31.0",
|
|
46
|
+
"@types/node": "^25.6.0",
|
|
47
|
+
"@typescript/native-preview": "7.0.0-dev.20260421.2",
|
|
48
|
+
"husky": "^9.1.7",
|
|
49
|
+
"lint-staged": "^16.4.0",
|
|
50
|
+
"tsdown": "^0.21.10",
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"vitest": "^4.1.5",
|
|
53
|
+
"webpack": "^5.106.2"
|
|
54
|
+
},
|
|
55
|
+
"lint-staged": {
|
|
56
|
+
"**/*": "biome format --write --no-errors-on-unmatched"
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18",
|
|
60
|
+
"pnpm": ">=10.0.0"
|
|
61
|
+
},
|
|
62
|
+
"packageManager": "pnpm@10.13.1",
|
|
63
|
+
"volta": {
|
|
64
|
+
"node": "24.15.0",
|
|
65
|
+
"pnpm": "10.13.1"
|
|
66
|
+
},
|
|
67
|
+
"license": "MIT"
|
|
68
|
+
}
|