@code-inspector/turbopack 1.4.5 → 1.4.7
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 +31 -26
- package/package.json +3 -3
- package/types/index.d.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var p=Object.defineProperty,f=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var i=(e,t,o)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))v.call(t,o)&&i(e,o,t[o]);if(l)for(var o of l(t))b.call(t,o)&&i(e,o,t[o]);return e},s=(e,t)=>f(e,j(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@code-inspector/core"),y=require("path"),g=require("url");function c(e){if(typeof e.importMetaResolve=="function"){const t=e.importMetaResolve("@code-inspector/webpack");return g.fileURLToPath(t)}return typeof e.requireResolve=="function"?e.requireResolve("@code-inspector/webpack"):null}function k(e){if(e.close||!u.isDev(e.dev,process.env.NODE_ENV==="development"))return{};const t={port:0,entry:"",output:e.output},o=c({requireResolve:typeof require=="undefined"?null:require.resolve,importMetaResolve:void 0}),n=y.resolve(o,".."),a=["*.jsx","*.tsx","layout.js","layout.ts","page.js","page.ts","loading.js","loading.ts","not-found.js","not-found.ts","error.js","error.ts","global-error.js","global-error.ts","template.js","template.ts","default.js","default.ts"],d="**/{".concat(a.join(","),"}");return{[u.isNextGET16()?"**/*.{jsx,tsx,js,ts,mjs,mts}":d]:{loaders:[{loader:"".concat(n,"/loader.js"),options:s(r({},e),{record:t})},{loader:"".concat(n,"/inject-loader.js"),options:s(r({},e),{record:t})}]}}}exports.TurbopackCodeInspectorPlugin=k;exports.resolveWebpackEntry=c;
|
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var a = Object.defineProperty, p = Object.defineProperties;
|
|
2
|
+
var d = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var n = Object.getOwnPropertySymbols;
|
|
4
|
+
var f = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var i = (e, t, o) => t in e ? a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, r = (e, t) => {
|
|
6
6
|
for (var o in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var o of
|
|
10
|
-
|
|
7
|
+
f.call(t, o) && i(e, o, t[o]);
|
|
8
|
+
if (n)
|
|
9
|
+
for (var o of n(t))
|
|
10
|
+
j.call(t, o) && i(e, o, t[o]);
|
|
11
11
|
return e;
|
|
12
|
-
}, s = (e, t) =>
|
|
13
|
-
import { isDev as v, isNextGET16 as
|
|
14
|
-
import
|
|
15
|
-
import { fileURLToPath as
|
|
16
|
-
function
|
|
12
|
+
}, s = (e, t) => p(e, d(t));
|
|
13
|
+
import { isDev as v, isNextGET16 as m } from "@code-inspector/core";
|
|
14
|
+
import b from "path";
|
|
15
|
+
import { fileURLToPath as y } from "url";
|
|
16
|
+
function g(e) {
|
|
17
|
+
if (typeof e.importMetaResolve == "function") {
|
|
18
|
+
const t = e.importMetaResolve(
|
|
19
|
+
"@code-inspector/webpack"
|
|
20
|
+
);
|
|
21
|
+
return y(t);
|
|
22
|
+
}
|
|
23
|
+
return typeof e.requireResolve == "function" ? e.requireResolve("@code-inspector/webpack") : null;
|
|
24
|
+
}
|
|
25
|
+
function D(e) {
|
|
17
26
|
if (e.close || !v(e.dev, process.env.NODE_ENV === "development"))
|
|
18
27
|
return {};
|
|
19
28
|
const t = {
|
|
20
29
|
port: 0,
|
|
21
30
|
entry: "",
|
|
22
31
|
output: e.output
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"@code-inspector/webpack"
|
|
28
|
-
);
|
|
29
|
-
o = b(u);
|
|
30
|
-
}
|
|
31
|
-
const l = y.resolve(o, ".."), a = [
|
|
32
|
+
}, o = g({
|
|
33
|
+
requireResolve: typeof require == "undefined" ? null : require.resolve,
|
|
34
|
+
importMetaResolve: import.meta.resolve
|
|
35
|
+
}), l = b.resolve(o, ".."), u = [
|
|
32
36
|
"*.jsx",
|
|
33
37
|
"*.tsx",
|
|
34
38
|
"layout.js",
|
|
@@ -47,9 +51,9 @@ function q(e) {
|
|
|
47
51
|
"template.ts",
|
|
48
52
|
"default.js",
|
|
49
53
|
"default.ts"
|
|
50
|
-
],
|
|
54
|
+
], c = "**/{".concat(u.join(","), "}");
|
|
51
55
|
return {
|
|
52
|
-
[
|
|
56
|
+
[m() ? "**/*.{jsx,tsx,js,ts,mjs,mts}" : c]: {
|
|
53
57
|
loaders: [
|
|
54
58
|
{
|
|
55
59
|
loader: "".concat(l, "/loader.js"),
|
|
@@ -68,5 +72,6 @@ function q(e) {
|
|
|
68
72
|
};
|
|
69
73
|
}
|
|
70
74
|
export {
|
|
71
|
-
|
|
75
|
+
D as TurbopackCodeInspectorPlugin,
|
|
76
|
+
g as resolveWebpackEntry
|
|
72
77
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-inspector/turbopack",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"typings": "./types/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"url": "https://github.com/zh-lx/code-inspector/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@code-inspector/core": "1.4.
|
|
41
|
-
"@code-inspector/webpack": "1.4.
|
|
40
|
+
"@code-inspector/core": "1.4.7",
|
|
41
|
+
"@code-inspector/webpack": "1.4.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^16.0.1",
|
package/types/index.d.ts
CHANGED
|
@@ -3,5 +3,9 @@ interface Options extends CodeOptions {
|
|
|
3
3
|
close?: boolean;
|
|
4
4
|
output: string;
|
|
5
5
|
}
|
|
6
|
+
export declare function resolveWebpackEntry(params: {
|
|
7
|
+
requireResolve?: (id: string) => string;
|
|
8
|
+
importMetaResolve?: (id: string) => string | Promise<string>;
|
|
9
|
+
}): string;
|
|
6
10
|
export declare function TurbopackCodeInspectorPlugin(options: Options): Record<string, any>;
|
|
7
11
|
export {};
|