code-inspector-plugin 0.4.0 → 0.4.1-beta.2
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/index.js +1 -1
- package/dist/index.mjs +61 -64
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,V=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var E=(e,t,n)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))k.call(t,n)&&E(e,n,t[n]);if(h)for(var n of h(t))T.call(t,n)&&E(e,n,t[n]);return e},f=(e,t)=>V(e,j(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("vite-code-inspector-plugin"),C=require("chalk"),v=require("fs"),_=require("path");function
|
|
1
|
+
"use strict";var $=Object.defineProperty,V=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var E=(e,t,n)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))k.call(t,n)&&E(e,n,t[n]);if(h)for(var n of h(t))T.call(t,n)&&E(e,n,t[n]);return e},f=(e,t)=>V(e,j(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("vite-code-inspector-plugin"),C=require("webpack-code-inspector-plugin"),x=require("chalk"),v=require("fs"),_=require("path");function S(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){if(this instanceof o){var s=[null];s.push.apply(s,arguments);var r=Function.bind.apply(t,s);return new r}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),n}var a={},K={get exports(){return a},set exports(e){a=e}};const R={},A=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"})),b=S(A),Y="dotenv",L="16.3.1",F="Loads environment variables from .env file",M="lib/main.js",B="lib/main.d.ts",q={".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},U={"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},W={type:"git",url:"git://github.com/motdotla/dotenv.git"},G="https://github.com/motdotla/dotenv?sponsor=1",J=["dotenv","env",".env","environment","variables","config","settings"],Q="README.md",z="BSD-2-Clause",H={"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},X={node:">=12"},Z={fs:!1},ee={name:Y,version:L,description:F,main:M,types:B,exports:q,scripts:U,repository:W,funding:G,keywords:J,readmeFilename:Q,license:z,devDependencies:H,engines:X,browser:Z},w=v,m=_,te=b,ne=b,re=ee,y=re.version,oe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function se(e){const t={};let n=e.toString();n=n.replace(/\r\n?/mg,"\n");let o;for(;(o=oe.exec(n))!=null;){const s=o[1];let r=o[2]||"";r=r.trim();const c=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),t[s]=r}return t}function ce(e){const t=O(e),n=i.configDotenv({path:t});if(!n.parsed)throw new Error("MISSING_DATA: Cannot parse ".concat(t," for an unknown reason"));const o=D(e).split(","),s=o.length;let r;for(let c=0;c<s;c++)try{const l=o[c].trim(),u=le(n,l);r=i.decrypt(u.ciphertext,u.key);break}catch(l){if(c+1>=s)throw l}return i.parse(r)}function ie(e){console.log("[dotenv@".concat(y,"][INFO] ").concat(e))}function ae(e){console.log("[dotenv@".concat(y,"][WARN] ").concat(e))}function g(e){console.log("[dotenv@".concat(y,"][DEBUG] ").concat(e))}function D(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function le(e,t){let n;try{n=new URL(t)}catch(l){throw l.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):l}const o=n.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");const s=n.searchParams.get("environment");if(!s)throw new Error("INVALID_DOTENV_KEY: Missing environment part");const r="DOTENV_VAULT_".concat(s.toUpperCase()),c=e.parsed[r];if(!c)throw new Error("NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ".concat(r," in your .env.vault file."));return{ciphertext:c,key:o}}function O(e){let t=m.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:"".concat(t,".vault")}function ue(e){return e[0]==="~"?m.join(te.homedir(),e.slice(1)):e}function de(e){ie("Loading env from encrypted .env.vault");const t=i._parseVault(e);let n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),i.populate(n,t,e),{parsed:t}}function pe(e){let t=m.resolve(process.cwd(),".env"),n="utf8";const o=!!(e&&e.debug);e&&(e.path!=null&&(t=ue(e.path)),e.encoding!=null&&(n=e.encoding));try{const s=i.parse(w.readFileSync(t,{encoding:n}));let r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),i.populate(r,s,e),{parsed:s}}catch(s){return o&&g("Failed to load ".concat(t," ").concat(s.message)),{error:s}}}function fe(e){const t=O(e);return D(e).length===0?i.configDotenv(e):w.existsSync(t)?i._configVault(e):(ae("You set DOTENV_KEY but you are missing a .env.vault file at ".concat(t,". Did you forget to build it?")),i.configDotenv(e))}function ve(e,t){const n=Buffer.from(t.slice(-64),"hex");let o=Buffer.from(e,"base64");const s=o.slice(0,12),r=o.slice(-16);o=o.slice(12,-16);try{const c=ne.createDecipheriv("aes-256-gcm",n,s);return c.setAuthTag(r),"".concat(c.update(o)).concat(c.final())}catch(c){const l=c instanceof RangeError,u=c.message==="Invalid key length",N=c.message==="Unsupported state or unable to authenticate data";if(l||u){const d="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(d)}else if(N){const d="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(d)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function ge(e,t,n={}){const o=!!(n&&n.debug),s=!!(n&&n.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(const r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(s===!0&&(e[r]=t[r]),o&&g(s===!0?'"'.concat(r,'" is already defined and WAS overwritten'):'"'.concat(r,'" is already defined and was NOT overwritten'))):e[r]=t[r]}const i={configDotenv:pe,_configVault:de,_parseVault:ce,config:fe,decrypt:ve,parse:se,populate:ge};a.configDotenv=i.configDotenv;a._configVault=i._configVault;a._parseVault=i._parseVault;a.config=i.config;a.decrypt=i.decrypt;a.parse=i.parse;a.populate=i.populate;K.exports=i;function I(e){if(!(e!=null&&e.bundler)){console.log(x.red("Please specify the bundler in the options of code-inspector-plugin."));return}let t=!1;if(e.needEnvInspector)if(t=!0,process.env.CODE_INSPECTOR==="true")t=!1;else{const o=_.resolve(process.cwd(),".env.local");if(v.existsSync(o)){const s=v.readFileSync(o,"utf-8"),r=a.parse(s||"");(r==null?void 0:r.CODE_INSPECTOR)==="true"&&(t=!1)}}return e.bundler==="webpack"||e.bundler==="rspack"?new C(f(p({},e),{close:t})):P.ViteCodeInspectorPlugin(f(p({},e),{close:t}))}const me=I;exports.CodeInspectorPlugin=I;exports.codeInspectorPlugin=me;
|
package/dist/index.mjs
CHANGED
|
@@ -11,10 +11,11 @@ var E = (e, t, n) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return e;
|
|
12
12
|
}, f = (e, t) => $(e, V(t));
|
|
13
13
|
import { ViteCodeInspectorPlugin as T } from "vite-code-inspector-plugin";
|
|
14
|
-
import P from "
|
|
14
|
+
import P from "webpack-code-inspector-plugin";
|
|
15
|
+
import x from "chalk";
|
|
15
16
|
import v from "fs";
|
|
16
17
|
import _ from "path";
|
|
17
|
-
function
|
|
18
|
+
function C(e) {
|
|
18
19
|
if (e.__esModule)
|
|
19
20
|
return e;
|
|
20
21
|
var t = e.default;
|
|
@@ -41,7 +42,7 @@ function x(e) {
|
|
|
41
42
|
});
|
|
42
43
|
}), n;
|
|
43
44
|
}
|
|
44
|
-
var a = {},
|
|
45
|
+
var a = {}, K = {
|
|
45
46
|
get exports() {
|
|
46
47
|
return a;
|
|
47
48
|
},
|
|
@@ -49,10 +50,10 @@ var a = {}, C = {
|
|
|
49
50
|
a = e;
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
const
|
|
53
|
+
const R = {}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
53
54
|
__proto__: null,
|
|
54
|
-
default:
|
|
55
|
-
}, Symbol.toStringTag, { value: "Module" })), b = /* @__PURE__ */
|
|
55
|
+
default: R
|
|
56
|
+
}, Symbol.toStringTag, { value: "Module" })), b = /* @__PURE__ */ C(A), S = "dotenv", Y = "16.3.1", L = "Loads environment variables from .env file", F = "lib/main.js", B = "lib/main.d.ts", M = {
|
|
56
57
|
".": {
|
|
57
58
|
types: "./lib/main.d.ts",
|
|
58
59
|
require: "./lib/main.js",
|
|
@@ -65,7 +66,7 @@ const K = {}, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
65
66
|
"./lib/cli-options": "./lib/cli-options.js",
|
|
66
67
|
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
67
68
|
"./package.json": "./package.json"
|
|
68
|
-
},
|
|
69
|
+
}, U = {
|
|
69
70
|
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
70
71
|
lint: "standard",
|
|
71
72
|
"lint-readme": "standard-markdown",
|
|
@@ -73,10 +74,10 @@ const K = {}, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
73
74
|
test: "tap tests/*.js --100 -Rspec",
|
|
74
75
|
prerelease: "npm test",
|
|
75
76
|
release: "standard-version"
|
|
76
|
-
},
|
|
77
|
+
}, W = {
|
|
77
78
|
type: "git",
|
|
78
79
|
url: "git://github.com/motdotla/dotenv.git"
|
|
79
|
-
}, q = "https://github.com/motdotla/dotenv?sponsor=1",
|
|
80
|
+
}, q = "https://github.com/motdotla/dotenv?sponsor=1", G = [
|
|
80
81
|
"dotenv",
|
|
81
82
|
"env",
|
|
82
83
|
".env",
|
|
@@ -84,7 +85,7 @@ const K = {}, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
84
85
|
"variables",
|
|
85
86
|
"config",
|
|
86
87
|
"settings"
|
|
87
|
-
],
|
|
88
|
+
], J = "README.md", Q = "BSD-2-Clause", z = {
|
|
88
89
|
"@definitelytyped/dtslint": "^0.0.133",
|
|
89
90
|
"@types/node": "^18.11.3",
|
|
90
91
|
decache: "^4.6.1",
|
|
@@ -95,33 +96,33 @@ const K = {}, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
95
96
|
tap: "^16.3.0",
|
|
96
97
|
tar: "^6.1.11",
|
|
97
98
|
typescript: "^4.8.4"
|
|
98
|
-
}, z = {
|
|
99
|
-
node: ">=12"
|
|
100
99
|
}, H = {
|
|
101
|
-
|
|
100
|
+
node: ">=12"
|
|
102
101
|
}, X = {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
fs: !1
|
|
103
|
+
}, Z = {
|
|
104
|
+
name: S,
|
|
105
|
+
version: Y,
|
|
106
|
+
description: L,
|
|
107
|
+
main: F,
|
|
108
|
+
types: B,
|
|
109
|
+
exports: M,
|
|
110
|
+
scripts: U,
|
|
111
|
+
repository: W,
|
|
111
112
|
funding: q,
|
|
112
|
-
keywords:
|
|
113
|
-
readmeFilename:
|
|
114
|
-
license:
|
|
115
|
-
devDependencies:
|
|
116
|
-
engines:
|
|
117
|
-
browser:
|
|
118
|
-
}, w = v, m = _,
|
|
119
|
-
function
|
|
113
|
+
keywords: G,
|
|
114
|
+
readmeFilename: J,
|
|
115
|
+
license: Q,
|
|
116
|
+
devDependencies: z,
|
|
117
|
+
engines: H,
|
|
118
|
+
browser: X
|
|
119
|
+
}, w = v, m = _, ee = b, te = b, ne = Z, y = ne.version, re = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
120
|
+
function oe(e) {
|
|
120
121
|
const t = {};
|
|
121
122
|
let n = e.toString();
|
|
122
123
|
n = n.replace(/\r\n?/mg, "\n");
|
|
123
124
|
let o;
|
|
124
|
-
for (; (o =
|
|
125
|
+
for (; (o = re.exec(n)) != null; ) {
|
|
125
126
|
const s = o[1];
|
|
126
127
|
let r = o[2] || "";
|
|
127
128
|
r = r.trim();
|
|
@@ -130,7 +131,7 @@ function re(e) {
|
|
|
130
131
|
}
|
|
131
132
|
return t;
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
+
function se(e) {
|
|
134
135
|
const t = O(e), n = i.configDotenv({ path: t });
|
|
135
136
|
if (!n.parsed)
|
|
136
137
|
throw new Error("MISSING_DATA: Cannot parse ".concat(t, " for an unknown reason"));
|
|
@@ -138,7 +139,7 @@ function oe(e) {
|
|
|
138
139
|
let r;
|
|
139
140
|
for (let c = 0; c < s; c++)
|
|
140
141
|
try {
|
|
141
|
-
const l = o[c].trim(), u =
|
|
142
|
+
const l = o[c].trim(), u = ae(n, l);
|
|
142
143
|
r = i.decrypt(u.ciphertext, u.key);
|
|
143
144
|
break;
|
|
144
145
|
} catch (l) {
|
|
@@ -147,10 +148,10 @@ function oe(e) {
|
|
|
147
148
|
}
|
|
148
149
|
return i.parse(r);
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function ce(e) {
|
|
151
152
|
console.log("[dotenv@".concat(y, "][INFO] ").concat(e));
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
+
function ie(e) {
|
|
154
155
|
console.log("[dotenv@".concat(y, "][WARN] ").concat(e));
|
|
155
156
|
}
|
|
156
157
|
function g(e) {
|
|
@@ -159,7 +160,7 @@ function g(e) {
|
|
|
159
160
|
function D(e) {
|
|
160
161
|
return e && e.DOTENV_KEY && e.DOTENV_KEY.length > 0 ? e.DOTENV_KEY : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 ? process.env.DOTENV_KEY : "";
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
+
function ae(e, t) {
|
|
163
164
|
let n;
|
|
164
165
|
try {
|
|
165
166
|
n = new URL(t);
|
|
@@ -181,19 +182,19 @@ function O(e) {
|
|
|
181
182
|
let t = m.resolve(process.cwd(), ".env");
|
|
182
183
|
return e && e.path && e.path.length > 0 && (t = e.path), t.endsWith(".vault") ? t : "".concat(t, ".vault");
|
|
183
184
|
}
|
|
184
|
-
function ae(e) {
|
|
185
|
-
return e[0] === "~" ? m.join(Z.homedir(), e.slice(1)) : e;
|
|
186
|
-
}
|
|
187
185
|
function le(e) {
|
|
188
|
-
|
|
186
|
+
return e[0] === "~" ? m.join(ee.homedir(), e.slice(1)) : e;
|
|
187
|
+
}
|
|
188
|
+
function ue(e) {
|
|
189
|
+
ce("Loading env from encrypted .env.vault");
|
|
189
190
|
const t = i._parseVault(e);
|
|
190
191
|
let n = process.env;
|
|
191
192
|
return e && e.processEnv != null && (n = e.processEnv), i.populate(n, t, e), { parsed: t };
|
|
192
193
|
}
|
|
193
|
-
function
|
|
194
|
+
function de(e) {
|
|
194
195
|
let t = m.resolve(process.cwd(), ".env"), n = "utf8";
|
|
195
196
|
const o = !!(e && e.debug);
|
|
196
|
-
e && (e.path != null && (t =
|
|
197
|
+
e && (e.path != null && (t = le(e.path)), e.encoding != null && (n = e.encoding));
|
|
197
198
|
try {
|
|
198
199
|
const s = i.parse(w.readFileSync(t, { encoding: n }));
|
|
199
200
|
let r = process.env;
|
|
@@ -202,17 +203,17 @@ function ue(e) {
|
|
|
202
203
|
return o && g("Failed to load ".concat(t, " ").concat(s.message)), { error: s };
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
+
function pe(e) {
|
|
206
207
|
const t = O(e);
|
|
207
|
-
return D(e).length === 0 ? i.configDotenv(e) : w.existsSync(t) ? i._configVault(e) : (
|
|
208
|
+
return D(e).length === 0 ? i.configDotenv(e) : w.existsSync(t) ? i._configVault(e) : (ie("You set DOTENV_KEY but you are missing a .env.vault file at ".concat(t, ". Did you forget to build it?")), i.configDotenv(e));
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
+
function fe(e, t) {
|
|
210
211
|
const n = Buffer.from(t.slice(-64), "hex");
|
|
211
212
|
let o = Buffer.from(e, "base64");
|
|
212
213
|
const s = o.slice(0, 12), r = o.slice(-16);
|
|
213
214
|
o = o.slice(12, -16);
|
|
214
215
|
try {
|
|
215
|
-
const c =
|
|
216
|
+
const c = te.createDecipheriv("aes-256-gcm", n, s);
|
|
216
217
|
return c.setAuthTag(r), "".concat(c.update(o)).concat(c.final());
|
|
217
218
|
} catch (c) {
|
|
218
219
|
const l = c instanceof RangeError, u = c.message === "Invalid key length", N = c.message === "Unsupported state or unable to authenticate data";
|
|
@@ -226,7 +227,7 @@ function pe(e, t) {
|
|
|
226
227
|
throw console.error("Error: ", c.code), console.error("Error: ", c.message), c;
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
+
function ve(e, t, n = {}) {
|
|
230
231
|
const o = !!(n && n.debug), s = !!(n && n.override);
|
|
231
232
|
if (typeof t != "object")
|
|
232
233
|
throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
@@ -234,13 +235,13 @@ function fe(e, t, n = {}) {
|
|
|
234
235
|
Object.prototype.hasOwnProperty.call(e, r) ? (s === !0 && (e[r] = t[r]), o && g(s === !0 ? '"'.concat(r, '" is already defined and WAS overwritten') : '"'.concat(r, '" is already defined and was NOT overwritten'))) : e[r] = t[r];
|
|
235
236
|
}
|
|
236
237
|
const i = {
|
|
237
|
-
configDotenv:
|
|
238
|
-
_configVault:
|
|
239
|
-
_parseVault:
|
|
240
|
-
config:
|
|
241
|
-
decrypt:
|
|
242
|
-
parse:
|
|
243
|
-
populate:
|
|
238
|
+
configDotenv: de,
|
|
239
|
+
_configVault: ue,
|
|
240
|
+
_parseVault: se,
|
|
241
|
+
config: pe,
|
|
242
|
+
decrypt: fe,
|
|
243
|
+
parse: oe,
|
|
244
|
+
populate: ve
|
|
244
245
|
};
|
|
245
246
|
a.configDotenv = i.configDotenv;
|
|
246
247
|
a._configVault = i._configVault;
|
|
@@ -249,11 +250,11 @@ a.config = i.config;
|
|
|
249
250
|
a.decrypt = i.decrypt;
|
|
250
251
|
a.parse = i.parse;
|
|
251
252
|
a.populate = i.populate;
|
|
252
|
-
|
|
253
|
-
function
|
|
253
|
+
K.exports = i;
|
|
254
|
+
function ge(e) {
|
|
254
255
|
if (!(e != null && e.bundler)) {
|
|
255
256
|
console.log(
|
|
256
|
-
|
|
257
|
+
x.red(
|
|
257
258
|
"Please specify the bundler in the options of code-inspector-plugin."
|
|
258
259
|
)
|
|
259
260
|
);
|
|
@@ -270,14 +271,10 @@ function ve(e) {
|
|
|
270
271
|
(r == null ? void 0 : r.CODE_INSPECTOR) === "true" && (t = !1);
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
-
const n = require("webpack-code-inspector-plugin");
|
|
275
|
-
return new n(f(p({}, e), { close: t }));
|
|
276
|
-
} else
|
|
277
|
-
return T(f(p({}, e), { close: t }));
|
|
274
|
+
return e.bundler === "webpack" || e.bundler === "rspack" ? new P(f(p({}, e), { close: t })) : T(f(p({}, e), { close: t }));
|
|
278
275
|
}
|
|
279
|
-
const
|
|
276
|
+
const we = ge;
|
|
280
277
|
export {
|
|
281
|
-
|
|
282
|
-
|
|
278
|
+
ge as CodeInspectorPlugin,
|
|
279
|
+
we as codeInspectorPlugin
|
|
283
280
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-inspector-plugin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1-beta.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"typings": "./types/index.d.ts",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"chalk": "4.1.1",
|
|
42
|
-
"code-inspector-core": "0.4.
|
|
43
|
-
"
|
|
44
|
-
"
|
|
42
|
+
"code-inspector-core": "0.4.1-beta.2",
|
|
43
|
+
"vite-code-inspector-plugin": "0.4.1-beta.2",
|
|
44
|
+
"webpack-code-inspector-plugin": "0.4.1-beta.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^16.0.1",
|