unplugin-typegpu 0.11.3 → 0.11.4
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/{babel-BtEAIwcz.d.ts → babel-CXwXwwOE.d.ts} +1 -1
- package/{babel-Dh30Kt6S.cjs → babel-D-TCImIi.cjs} +1 -1
- package/{babel-CAEdZVus.js → babel-dNT1_5hS.js} +1 -1
- package/babel.cjs +2 -2
- package/babel.d.ts +2 -2
- package/babel.js +2 -2
- package/{bun-BEJk_QgR.d.ts → bun-C6usJAus.d.ts} +1 -1
- package/{bun--yeG3v60.js → bun-DY6XE5xi.js} +2 -2
- package/{bun-5HFBYRLX.cjs → bun-o6QmlVaS.cjs} +2 -2
- package/bun.cjs +3 -3
- package/bun.d.ts +2 -2
- package/bun.js +3 -3
- package/{common-DAlNUXzt.js → common-B8nnr-Iq.js} +1 -1
- package/{common-DLS92R6o.d.ts → common-BLW8Fy4P.d.ts} +1 -1
- package/{common-DsNLIpl2.cjs → common-DPfAcXic.cjs} +2 -2
- package/esbuild.cjs +6 -6
- package/esbuild.d.cts +1 -1
- package/esbuild.d.ts +5 -5
- package/esbuild.js +6 -6
- package/{factory-DpKZsJoL.cjs → factory-B0CnGO9P.cjs} +108 -20
- package/{factory-BhxFJhLe.js → factory-CnVNvO57.js} +107 -19
- package/farm.cjs +6 -6
- package/farm.d.cts +1 -1
- package/farm.d.ts +5 -5
- package/farm.js +6 -6
- package/{index-pvEoqPl0.d.ts → index-rnHwqPEN.d.ts} +1 -1
- package/index.cjs +6 -6
- package/index.d.cts +1 -1
- package/index.d.ts +5 -5
- package/index.js +6 -6
- package/package.json +3 -3
- package/{rolldown-browser-2X8xghF4.cjs → rolldown-browser-BzaTpeZq.cjs} +1 -1
- package/{rolldown-browser-CLu5Nu_x.d.ts → rolldown-browser-C8OHaYCP.d.ts} +6 -3
- package/{rolldown-browser-D2u-yWpA.js → rolldown-browser-D0pxy7TZ.js} +1 -1
- package/{rolldown-browser-BeO_gjfe.d.cts → rolldown-browser-XXZriqjg.d.cts} +5 -2
- package/rolldown-browser.cjs +3 -3
- package/rolldown-browser.d.cts +1 -1
- package/rolldown-browser.d.ts +2 -2
- package/rolldown-browser.js +3 -3
- package/rolldown.cjs +6 -6
- package/rolldown.d.cts +1 -1
- package/rolldown.d.ts +5 -5
- package/rolldown.js +6 -6
- package/rollup.cjs +6 -6
- package/rollup.d.cts +1 -1
- package/rollup.d.ts +5 -5
- package/rollup.js +6 -6
- package/rspack.cjs +6 -6
- package/rspack.d.cts +1 -1
- package/rspack.d.ts +5 -5
- package/rspack.js +6 -6
- package/{src-Ctdak0KH.cjs → src-BljgtpqS.cjs} +2 -2
- package/{src-CrU_oTgc.js → src-DZP2_1Gn.js} +1 -1
- package/vite.cjs +6 -6
- package/vite.d.cts +1 -1
- package/vite.d.ts +5 -5
- package/vite.js +6 -6
- package/webpack.cjs +6 -6
- package/webpack.d.cts +1 -1
- package/webpack.d.ts +5 -5
- package/webpack.js +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as initPluginState, i as getBlockScope, r as functionVisitor, t as defaultOptions } from "./common-
|
|
1
|
+
import { a as initPluginState, i as getBlockScope, r as functionVisitor, t as defaultOptions } from "./common-B8nnr-Iq.js";
|
|
2
2
|
import defu from "defu";
|
|
3
3
|
import { transpileFn } from "tinyest-for-wgsl";
|
|
4
4
|
import { FORMAT_VERSION } from "tinyest";
|
package/babel.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
const require_babel = require('./babel-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
const require_babel = require('./babel-D-TCImIi.cjs');
|
|
4
4
|
|
|
5
5
|
exports.default = require_babel.TypeGPUPlugin;
|
package/babel.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-CXwXwwOE.js";
|
|
3
3
|
export { TypeGPUPlugin as default };
|
package/babel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as earlyPruneRegex, t as defaultOptions } from "./common-
|
|
2
|
-
import { t as unpluginFactory } from "./factory-
|
|
1
|
+
import { n as earlyPruneRegex, t as defaultOptions } from "./common-B8nnr-Iq.js";
|
|
2
|
+
import { t as unpluginFactory } from "./factory-CnVNvO57.js";
|
|
3
3
|
import defu from "defu";
|
|
4
4
|
|
|
5
5
|
//#region src/bun.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
2
|
-
const require_factory = require('./factory-
|
|
1
|
+
const require_common = require('./common-DPfAcXic.cjs');
|
|
2
|
+
const require_factory = require('./factory-B0CnGO9P.cjs');
|
|
3
3
|
let defu = require("defu");
|
|
4
4
|
defu = require_common.__toESM(defu);
|
|
5
5
|
|
package/bun.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./factory-
|
|
4
|
-
const require_bun = require('./bun-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./factory-B0CnGO9P.cjs');
|
|
4
|
+
const require_bun = require('./bun-o6QmlVaS.cjs');
|
|
5
5
|
|
|
6
6
|
exports.default = require_bun.bun_default;
|
package/bun.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as _default } from "./bun-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import { t as _default } from "./bun-C6usJAus.js";
|
|
3
3
|
export { _default as default };
|
package/bun.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./factory-
|
|
3
|
-
import { t as bun_default } from "./bun
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./factory-CnVNvO57.js";
|
|
3
|
+
import { t as bun_default } from "./bun-DY6XE5xi.js";
|
|
4
4
|
|
|
5
5
|
export { bun_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { transpileFn } from "tinyest-for-wgsl";
|
|
2
2
|
import * as t from "@babel/types";
|
|
3
|
-
import
|
|
3
|
+
import MagicString from "magic-string";
|
|
4
4
|
import { NodePath } from "@babel/traverse";
|
|
5
5
|
import { FilterPattern } from "unplugin";
|
|
6
6
|
|
|
@@ -25,8 +25,8 @@ let tinyest_for_wgsl = require("tinyest-for-wgsl");
|
|
|
25
25
|
tinyest_for_wgsl = __toESM(tinyest_for_wgsl);
|
|
26
26
|
let __babel_types = require("@babel/types");
|
|
27
27
|
__babel_types = __toESM(__babel_types);
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
let magic_string = require("magic-string");
|
|
29
|
+
magic_string = __toESM(magic_string);
|
|
30
30
|
|
|
31
31
|
//#region src/core/common.ts
|
|
32
32
|
function initPluginState(state, methods) {
|
package/esbuild.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/esbuild.ts
|
|
10
10
|
var esbuild_default = require_src.esbuildPlugin;
|
package/esbuild.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./common-BaikgpzR.cjs";
|
|
2
2
|
import "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import "./rolldown-browser-
|
|
4
|
+
import "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { t as esbuildPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export = esbuildPlugin;
|
package/esbuild.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { t as esbuildPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { t as esbuildPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { esbuildPlugin as default };
|
package/esbuild.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { t as esbuildPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { t as esbuildPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/esbuild.ts
|
|
9
9
|
var esbuild_default = esbuildPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
1
|
+
const require_common = require('./common-DPfAcXic.cjs');
|
|
2
2
|
let defu = require("defu");
|
|
3
3
|
defu = require_common.__toESM(defu);
|
|
4
4
|
let tinyest_for_wgsl = require("tinyest-for-wgsl");
|
|
@@ -7,8 +7,8 @@ let tinyest = require("tinyest");
|
|
|
7
7
|
tinyest = require_common.__toESM(tinyest);
|
|
8
8
|
let __babel_types = require("@babel/types");
|
|
9
9
|
__babel_types = require_common.__toESM(__babel_types);
|
|
10
|
-
let
|
|
11
|
-
|
|
10
|
+
let magic_string = require("magic-string");
|
|
11
|
+
magic_string = require_common.__toESM(magic_string);
|
|
12
12
|
let ast_kit = require("ast-kit");
|
|
13
13
|
ast_kit = require_common.__toESM(ast_kit);
|
|
14
14
|
let __babel_traverse = require("@babel/traverse");
|
|
@@ -16,6 +16,72 @@ __babel_traverse = require_common.__toESM(__babel_traverse);
|
|
|
16
16
|
let __babel_parser = require("@babel/parser");
|
|
17
17
|
__babel_parser = require_common.__toESM(__babel_parser);
|
|
18
18
|
|
|
19
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/typeof.js
|
|
20
|
+
function _typeof(o) {
|
|
21
|
+
"@babel/helpers - typeof";
|
|
22
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
23
|
+
return typeof o$1;
|
|
24
|
+
} : function(o$1) {
|
|
25
|
+
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
26
|
+
}, _typeof(o);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPrimitive.js
|
|
31
|
+
function toPrimitive(t, r) {
|
|
32
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
33
|
+
var e = t[Symbol.toPrimitive];
|
|
34
|
+
if (void 0 !== e) {
|
|
35
|
+
var i = e.call(t, r || "default");
|
|
36
|
+
if ("object" != _typeof(i)) return i;
|
|
37
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
38
|
+
}
|
|
39
|
+
return ("string" === r ? String : Number)(t);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPropertyKey.js
|
|
44
|
+
function toPropertyKey(t) {
|
|
45
|
+
var i = toPrimitive(t, "string");
|
|
46
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/defineProperty.js
|
|
51
|
+
function _defineProperty(e, r, t) {
|
|
52
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
53
|
+
value: t,
|
|
54
|
+
enumerable: !0,
|
|
55
|
+
configurable: !0,
|
|
56
|
+
writable: !0
|
|
57
|
+
}) : e[r] = t, e;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/objectSpread2.js
|
|
62
|
+
function ownKeys(e, r) {
|
|
63
|
+
var t = Object.keys(e);
|
|
64
|
+
if (Object.getOwnPropertySymbols) {
|
|
65
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
66
|
+
r && (o = o.filter(function(r$1) {
|
|
67
|
+
return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
|
|
68
|
+
})), t.push.apply(t, o);
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
}
|
|
72
|
+
function _objectSpread2(e) {
|
|
73
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
74
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
75
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
|
|
76
|
+
_defineProperty(e, r$1, t[r$1]);
|
|
77
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
|
|
78
|
+
Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return e;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
19
85
|
//#region src/core/factory.ts
|
|
20
86
|
let traverse = __babel_traverse.default;
|
|
21
87
|
if (typeof traverse.default === "function") traverse = traverse.default;
|
|
@@ -32,7 +98,7 @@ function assignMetadata(path, name, ast) {
|
|
|
32
98
|
externals: () => ({${ast.externalNames.map((e) => e === "this" ? "\"this\": this" : e).join(", ")}}),
|
|
33
99
|
}`;
|
|
34
100
|
const visibility = __babel_types.isFunctionDeclaration(path.node) ? require_common.getBlockScope(path) : void 0;
|
|
35
|
-
const fnCode = this.
|
|
101
|
+
const fnCode = this.slice(path.node);
|
|
36
102
|
let nodeToOverride = path.node;
|
|
37
103
|
let code = fnWrapperTemplate(fnCode, metadata);
|
|
38
104
|
let insertPos = (_path$node$start = path.node.start) !== null && _path$node$start !== void 0 ? _path$node$start : 0;
|
|
@@ -47,29 +113,42 @@ function assignMetadata(path, name, ast) {
|
|
|
47
113
|
}
|
|
48
114
|
if (insertPos < ((_path$node$start2 = path.node.start) !== null && _path$node$start2 !== void 0 ? _path$node$start2 : 0)) {
|
|
49
115
|
var _nodeToOverride$leadi, _nodeToOverride$leadi2;
|
|
50
|
-
for (const comment of (_nodeToOverride$leadi = (_nodeToOverride$leadi2 = nodeToOverride.leadingComments) === null || _nodeToOverride$leadi2 === void 0 ? void 0 : _nodeToOverride$leadi2.toReversed()) !== null && _nodeToOverride$leadi !== void 0 ? _nodeToOverride$leadi : []) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.magicString.removeNode(comment);
|
|
116
|
+
for (const comment of (_nodeToOverride$leadi = (_nodeToOverride$leadi2 = nodeToOverride.leadingComments) === null || _nodeToOverride$leadi2 === void 0 ? void 0 : _nodeToOverride$leadi2.toReversed()) !== null && _nodeToOverride$leadi !== void 0 ? _nodeToOverride$leadi : []) if (comment) {
|
|
117
|
+
code = `${this.slice(comment)}\n${code}`;
|
|
118
|
+
this.remove(comment);
|
|
54
119
|
}
|
|
55
|
-
this.
|
|
120
|
+
this.remove(nodeToOverride);
|
|
56
121
|
this.magicString.prependLeft(insertPos, code);
|
|
57
|
-
} else this.
|
|
122
|
+
} else this.overwrite(nodeToOverride, code);
|
|
58
123
|
}
|
|
59
124
|
function wrapInAutoName(path, name) {
|
|
60
125
|
var _path$node$start3, _path$node$end;
|
|
61
126
|
this.magicString.appendLeft((_path$node$start3 = path.node.start) !== null && _path$node$start3 !== void 0 ? _path$node$start3 : 0, "(/*#__PURE__*/(globalThis.__TYPEGPU_AUTONAME__ ?? (a => a))(").prependRight((_path$node$end = path.node.end) !== null && _path$node$end !== void 0 ? _path$node$end : 0, `, "${name}"))`);
|
|
62
127
|
}
|
|
63
128
|
function replaceWithAssignmentOverload(path, runtimeFn) {
|
|
64
|
-
const lhs = this.
|
|
65
|
-
const rhs = this.
|
|
66
|
-
this.
|
|
129
|
+
const lhs = this.slice(path.node.left);
|
|
130
|
+
const rhs = this.slice(path.node.right);
|
|
131
|
+
this.overwrite(path.node, `${lhs} = ${runtimeFn}(${lhs}, ${rhs})`);
|
|
67
132
|
}
|
|
68
133
|
function replaceWithBinaryOverload(path, runtimeFn) {
|
|
69
|
-
const lhs = this.
|
|
70
|
-
const rhs = this.
|
|
71
|
-
this.
|
|
134
|
+
const lhs = this.slice(path.node.left);
|
|
135
|
+
const rhs = this.slice(path.node.right);
|
|
136
|
+
this.overwrite(path.node, `${runtimeFn}(${lhs}, ${rhs})`);
|
|
72
137
|
}
|
|
138
|
+
const NodeUtils = {
|
|
139
|
+
slice(node) {
|
|
140
|
+
var _node$start, _node$end;
|
|
141
|
+
return this.magicString.slice((_node$start = node.start) !== null && _node$start !== void 0 ? _node$start : 0, (_node$end = node.end) !== null && _node$end !== void 0 ? _node$end : 0);
|
|
142
|
+
},
|
|
143
|
+
remove(node) {
|
|
144
|
+
var _node$start2, _node$end2;
|
|
145
|
+
this.magicString.remove((_node$start2 = node.start) !== null && _node$start2 !== void 0 ? _node$start2 : 0, (_node$end2 = node.end) !== null && _node$end2 !== void 0 ? _node$end2 : 0);
|
|
146
|
+
},
|
|
147
|
+
overwrite(node, content) {
|
|
148
|
+
var _node$start3, _node$end3;
|
|
149
|
+
this.magicString.overwrite((_node$start3 = node.start) !== null && _node$start3 !== void 0 ? _node$start3 : 0, (_node$end3 = node.end) !== null && _node$end3 !== void 0 ? _node$end3 : 0, content);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
73
152
|
const unpluginFactory = ((rawOptions, _meta) => {
|
|
74
153
|
const options = (0, defu.default)(rawOptions, require_common.defaultOptions);
|
|
75
154
|
return {
|
|
@@ -91,12 +170,12 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
91
170
|
console.warn(`[unplugin-typegpu] Failed to parse ${id}. Cause: ${typeof cause === "object" && cause && "message" in cause ? cause.message : cause}`);
|
|
92
171
|
return;
|
|
93
172
|
}
|
|
94
|
-
const magicString = new
|
|
95
|
-
const state = {
|
|
173
|
+
const magicString = new magic_string.default(code);
|
|
174
|
+
const state = _objectSpread2({
|
|
96
175
|
filename: id,
|
|
97
176
|
magicString,
|
|
98
177
|
opts: options
|
|
99
|
-
};
|
|
178
|
+
}, NodeUtils);
|
|
100
179
|
require_common.initPluginState(state, {
|
|
101
180
|
warn: (message) => this.warn(message),
|
|
102
181
|
assignMetadata,
|
|
@@ -105,7 +184,16 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
105
184
|
replaceWithBinaryOverload
|
|
106
185
|
});
|
|
107
186
|
traverse(ast, require_common.functionVisitor, void 0, state);
|
|
108
|
-
|
|
187
|
+
if (magicString.hasChanged()) return {
|
|
188
|
+
code: magicString.toString(),
|
|
189
|
+
get map() {
|
|
190
|
+
return magicString.generateMap({
|
|
191
|
+
source: id,
|
|
192
|
+
includeContent: true,
|
|
193
|
+
hires: "boundary"
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
};
|
|
109
197
|
}
|
|
110
198
|
}
|
|
111
199
|
};
|
|
@@ -1,13 +1,79 @@
|
|
|
1
|
-
import { a as initPluginState, i as getBlockScope, n as earlyPruneRegex, r as functionVisitor, t as defaultOptions } from "./common-
|
|
1
|
+
import { a as initPluginState, i as getBlockScope, n as earlyPruneRegex, r as functionVisitor, t as defaultOptions } from "./common-B8nnr-Iq.js";
|
|
2
2
|
import defu from "defu";
|
|
3
3
|
import { transpileFn } from "tinyest-for-wgsl";
|
|
4
4
|
import { FORMAT_VERSION } from "tinyest";
|
|
5
5
|
import * as t from "@babel/types";
|
|
6
|
-
import
|
|
6
|
+
import MagicString from "magic-string";
|
|
7
7
|
import { getBabelParserOptions, getLang } from "ast-kit";
|
|
8
8
|
import _traverse from "@babel/traverse";
|
|
9
9
|
import * as parser from "@babel/parser";
|
|
10
10
|
|
|
11
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/typeof.js
|
|
12
|
+
function _typeof(o) {
|
|
13
|
+
"@babel/helpers - typeof";
|
|
14
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
15
|
+
return typeof o$1;
|
|
16
|
+
} : function(o$1) {
|
|
17
|
+
return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
|
|
18
|
+
}, _typeof(o);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPrimitive.js
|
|
23
|
+
function toPrimitive(t$1, r) {
|
|
24
|
+
if ("object" != _typeof(t$1) || !t$1) return t$1;
|
|
25
|
+
var e = t$1[Symbol.toPrimitive];
|
|
26
|
+
if (void 0 !== e) {
|
|
27
|
+
var i = e.call(t$1, r || "default");
|
|
28
|
+
if ("object" != _typeof(i)) return i;
|
|
29
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
30
|
+
}
|
|
31
|
+
return ("string" === r ? String : Number)(t$1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/toPropertyKey.js
|
|
36
|
+
function toPropertyKey(t$1) {
|
|
37
|
+
var i = toPrimitive(t$1, "string");
|
|
38
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/defineProperty.js
|
|
43
|
+
function _defineProperty(e, r, t$1) {
|
|
44
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
45
|
+
value: t$1,
|
|
46
|
+
enumerable: !0,
|
|
47
|
+
configurable: !0,
|
|
48
|
+
writable: !0
|
|
49
|
+
}) : e[r] = t$1, e;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/objectSpread2.js
|
|
54
|
+
function ownKeys(e, r) {
|
|
55
|
+
var t$1 = Object.keys(e);
|
|
56
|
+
if (Object.getOwnPropertySymbols) {
|
|
57
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
58
|
+
r && (o = o.filter(function(r$1) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
|
|
60
|
+
})), t$1.push.apply(t$1, o);
|
|
61
|
+
}
|
|
62
|
+
return t$1;
|
|
63
|
+
}
|
|
64
|
+
function _objectSpread2(e) {
|
|
65
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
66
|
+
var t$1 = null != arguments[r] ? arguments[r] : {};
|
|
67
|
+
r % 2 ? ownKeys(Object(t$1), !0).forEach(function(r$1) {
|
|
68
|
+
_defineProperty(e, r$1, t$1[r$1]);
|
|
69
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t$1)) : ownKeys(Object(t$1)).forEach(function(r$1) {
|
|
70
|
+
Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t$1, r$1));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return e;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
11
77
|
//#region src/core/factory.ts
|
|
12
78
|
let traverse = _traverse;
|
|
13
79
|
if (typeof traverse.default === "function") traverse = traverse.default;
|
|
@@ -24,7 +90,7 @@ function assignMetadata(path, name, ast) {
|
|
|
24
90
|
externals: () => ({${ast.externalNames.map((e) => e === "this" ? "\"this\": this" : e).join(", ")}}),
|
|
25
91
|
}`;
|
|
26
92
|
const visibility = t.isFunctionDeclaration(path.node) ? getBlockScope(path) : void 0;
|
|
27
|
-
const fnCode = this.
|
|
93
|
+
const fnCode = this.slice(path.node);
|
|
28
94
|
let nodeToOverride = path.node;
|
|
29
95
|
let code = fnWrapperTemplate(fnCode, metadata);
|
|
30
96
|
let insertPos = (_path$node$start = path.node.start) !== null && _path$node$start !== void 0 ? _path$node$start : 0;
|
|
@@ -39,29 +105,42 @@ function assignMetadata(path, name, ast) {
|
|
|
39
105
|
}
|
|
40
106
|
if (insertPos < ((_path$node$start2 = path.node.start) !== null && _path$node$start2 !== void 0 ? _path$node$start2 : 0)) {
|
|
41
107
|
var _nodeToOverride$leadi, _nodeToOverride$leadi2;
|
|
42
|
-
for (const comment of (_nodeToOverride$leadi = (_nodeToOverride$leadi2 = nodeToOverride.leadingComments) === null || _nodeToOverride$leadi2 === void 0 ? void 0 : _nodeToOverride$leadi2.toReversed()) !== null && _nodeToOverride$leadi !== void 0 ? _nodeToOverride$leadi : []) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this.magicString.removeNode(comment);
|
|
108
|
+
for (const comment of (_nodeToOverride$leadi = (_nodeToOverride$leadi2 = nodeToOverride.leadingComments) === null || _nodeToOverride$leadi2 === void 0 ? void 0 : _nodeToOverride$leadi2.toReversed()) !== null && _nodeToOverride$leadi !== void 0 ? _nodeToOverride$leadi : []) if (comment) {
|
|
109
|
+
code = `${this.slice(comment)}\n${code}`;
|
|
110
|
+
this.remove(comment);
|
|
46
111
|
}
|
|
47
|
-
this.
|
|
112
|
+
this.remove(nodeToOverride);
|
|
48
113
|
this.magicString.prependLeft(insertPos, code);
|
|
49
|
-
} else this.
|
|
114
|
+
} else this.overwrite(nodeToOverride, code);
|
|
50
115
|
}
|
|
51
116
|
function wrapInAutoName(path, name) {
|
|
52
117
|
var _path$node$start3, _path$node$end;
|
|
53
118
|
this.magicString.appendLeft((_path$node$start3 = path.node.start) !== null && _path$node$start3 !== void 0 ? _path$node$start3 : 0, "(/*#__PURE__*/(globalThis.__TYPEGPU_AUTONAME__ ?? (a => a))(").prependRight((_path$node$end = path.node.end) !== null && _path$node$end !== void 0 ? _path$node$end : 0, `, "${name}"))`);
|
|
54
119
|
}
|
|
55
120
|
function replaceWithAssignmentOverload(path, runtimeFn) {
|
|
56
|
-
const lhs = this.
|
|
57
|
-
const rhs = this.
|
|
58
|
-
this.
|
|
121
|
+
const lhs = this.slice(path.node.left);
|
|
122
|
+
const rhs = this.slice(path.node.right);
|
|
123
|
+
this.overwrite(path.node, `${lhs} = ${runtimeFn}(${lhs}, ${rhs})`);
|
|
59
124
|
}
|
|
60
125
|
function replaceWithBinaryOverload(path, runtimeFn) {
|
|
61
|
-
const lhs = this.
|
|
62
|
-
const rhs = this.
|
|
63
|
-
this.
|
|
126
|
+
const lhs = this.slice(path.node.left);
|
|
127
|
+
const rhs = this.slice(path.node.right);
|
|
128
|
+
this.overwrite(path.node, `${runtimeFn}(${lhs}, ${rhs})`);
|
|
64
129
|
}
|
|
130
|
+
const NodeUtils = {
|
|
131
|
+
slice(node) {
|
|
132
|
+
var _node$start, _node$end;
|
|
133
|
+
return this.magicString.slice((_node$start = node.start) !== null && _node$start !== void 0 ? _node$start : 0, (_node$end = node.end) !== null && _node$end !== void 0 ? _node$end : 0);
|
|
134
|
+
},
|
|
135
|
+
remove(node) {
|
|
136
|
+
var _node$start2, _node$end2;
|
|
137
|
+
this.magicString.remove((_node$start2 = node.start) !== null && _node$start2 !== void 0 ? _node$start2 : 0, (_node$end2 = node.end) !== null && _node$end2 !== void 0 ? _node$end2 : 0);
|
|
138
|
+
},
|
|
139
|
+
overwrite(node, content) {
|
|
140
|
+
var _node$start3, _node$end3;
|
|
141
|
+
this.magicString.overwrite((_node$start3 = node.start) !== null && _node$start3 !== void 0 ? _node$start3 : 0, (_node$end3 = node.end) !== null && _node$end3 !== void 0 ? _node$end3 : 0, content);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
65
144
|
const unpluginFactory = ((rawOptions, _meta) => {
|
|
66
145
|
const options = defu(rawOptions, defaultOptions);
|
|
67
146
|
return {
|
|
@@ -83,12 +162,12 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
83
162
|
console.warn(`[unplugin-typegpu] Failed to parse ${id}. Cause: ${typeof cause === "object" && cause && "message" in cause ? cause.message : cause}`);
|
|
84
163
|
return;
|
|
85
164
|
}
|
|
86
|
-
const magicString = new
|
|
87
|
-
const state = {
|
|
165
|
+
const magicString = new MagicString(code);
|
|
166
|
+
const state = _objectSpread2({
|
|
88
167
|
filename: id,
|
|
89
168
|
magicString,
|
|
90
169
|
opts: options
|
|
91
|
-
};
|
|
170
|
+
}, NodeUtils);
|
|
92
171
|
initPluginState(state, {
|
|
93
172
|
warn: (message) => this.warn(message),
|
|
94
173
|
assignMetadata,
|
|
@@ -97,7 +176,16 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
97
176
|
replaceWithBinaryOverload
|
|
98
177
|
});
|
|
99
178
|
traverse(ast, functionVisitor, void 0, state);
|
|
100
|
-
|
|
179
|
+
if (magicString.hasChanged()) return {
|
|
180
|
+
code: magicString.toString(),
|
|
181
|
+
get map() {
|
|
182
|
+
return magicString.generateMap({
|
|
183
|
+
source: id,
|
|
184
|
+
includeContent: true,
|
|
185
|
+
hires: "boundary"
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
101
189
|
}
|
|
102
190
|
}
|
|
103
191
|
};
|
package/farm.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/farm.ts
|
|
10
10
|
var farm_default = require_src.farmPlugin;
|
package/farm.d.cts
CHANGED
package/farm.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { n as farmPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { n as farmPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { farmPlugin as default };
|
package/farm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { n as farmPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { n as farmPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/farm.ts
|
|
9
9
|
var farm_default = farmPlugin;
|
package/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
const require_babel = require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
const require_bun = require('./bun-
|
|
6
|
-
const require_rolldown_browser = require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
const require_babel = require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
const require_bun = require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
const require_rolldown_browser = require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
exports.babelPlugin = require_babel.TypeGPUPlugin;
|
|
10
10
|
exports.bunPlugin = require_bun.bun_default;
|
package/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Options } from "./common-BaikgpzR.cjs";
|
|
2
2
|
import { t as TypeGPUPlugin } from "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import { t as _default } from "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import { t as _default$1 } from "./rolldown-browser-
|
|
4
|
+
import { t as _default$1 } from "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { a as rspackPlugin, c as vitePlugin, i as rollupPlugin, l as webpackPlugin, n as farmPlugin, o as typegpu, r as rolldownPlugin, s as unloaderPlugin, t as esbuildPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export { Options, TypeGPUPlugin as babelPlugin, _default as bunPlugin, typegpu as default, esbuildPlugin, farmPlugin, _default$1 as rolldownBrowserPlugin, rolldownPlugin, rollupPlugin, rspackPlugin, unloaderPlugin, vitePlugin, webpackPlugin };
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Options } from "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
3
|
-
import { t as _default } from "./bun-
|
|
4
|
-
import { t as _default$1 } from "./rolldown-browser-
|
|
5
|
-
import { a as rspackPlugin, c as vitePlugin, i as rollupPlugin, l as webpackPlugin, n as farmPlugin, o as typegpu, r as rolldownPlugin, s as unloaderPlugin, t as esbuildPlugin } from "./index-
|
|
1
|
+
import { t as Options } from "./common-BLW8Fy4P.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-CXwXwwOE.js";
|
|
3
|
+
import { t as _default } from "./bun-C6usJAus.js";
|
|
4
|
+
import { t as _default$1 } from "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { a as rspackPlugin, c as vitePlugin, i as rollupPlugin, l as webpackPlugin, n as farmPlugin, o as typegpu, r as rolldownPlugin, s as unloaderPlugin, t as esbuildPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { Options, TypeGPUPlugin as babelPlugin, _default as bunPlugin, typegpu as default, esbuildPlugin, farmPlugin, _default$1 as rolldownBrowserPlugin, rolldownPlugin, rollupPlugin, rspackPlugin, unloaderPlugin, vitePlugin, webpackPlugin };
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import { t as bun_default } from "./bun
|
|
5
|
-
import { t as rolldown_browser_default } from "./rolldown-browser-
|
|
6
|
-
import { a as rspackPlugin, c as vitePlugin, i as rollupPlugin, l as webpackPlugin, n as farmPlugin, o as src_default, r as rolldownPlugin, s as unloaderPlugin, t as esbuildPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import { t as bun_default } from "./bun-DY6XE5xi.js";
|
|
5
|
+
import { t as rolldown_browser_default } from "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { a as rspackPlugin, c as vitePlugin, i as rollupPlugin, l as webpackPlugin, n as farmPlugin, o as src_default, r as rolldownPlugin, s as unloaderPlugin, t as esbuildPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
export { TypeGPUPlugin as babelPlugin, bun_default as bunPlugin, src_default as default, esbuildPlugin, farmPlugin, rolldown_browser_default as rolldownBrowserPlugin, rolldownPlugin, rollupPlugin, rspackPlugin, unloaderPlugin, vitePlugin, webpackPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-typegpu",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Build plugins for TypeGPU, enabling seamless JavaScript -> WGSL transpilation and improved debugging.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel-plugin",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"@babel/types": "^7.29.0",
|
|
146
146
|
"ast-kit": "^2.2.0",
|
|
147
147
|
"defu": "^6.1.4",
|
|
148
|
-
"magic-string
|
|
148
|
+
"magic-string": "^0.30.21",
|
|
149
149
|
"pathe": "^2.0.3",
|
|
150
150
|
"picomatch": "^4.0.4",
|
|
151
151
|
"tinyest": "~0.3.1",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"unplugin": "^3.0.0"
|
|
154
154
|
},
|
|
155
155
|
"peerDependencies": {
|
|
156
|
-
"typegpu": "^0.11.
|
|
156
|
+
"typegpu": "^0.11.5"
|
|
157
157
|
},
|
|
158
158
|
"main": "./index.js",
|
|
159
159
|
"types": "./index.d.ts",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_factory = require('./factory-
|
|
1
|
+
const require_factory = require('./factory-B0CnGO9P.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/rolldown-browser.ts
|
|
4
4
|
var rolldown_browser_default = (options) => require_factory.unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Options } from "./common-
|
|
2
|
-
import * as
|
|
1
|
+
import { t as Options } from "./common-BLW8Fy4P.js";
|
|
2
|
+
import * as magic_string0 from "magic-string";
|
|
3
3
|
import * as unplugin8 from "unplugin";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown-browser.d.ts
|
|
@@ -30,7 +30,10 @@ declare const _default: (options?: Options) => {
|
|
|
30
30
|
};
|
|
31
31
|
code?: never;
|
|
32
32
|
};
|
|
33
|
-
handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string):
|
|
33
|
+
handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string): {
|
|
34
|
+
code: string;
|
|
35
|
+
readonly map: magic_string0.SourceMap;
|
|
36
|
+
} | undefined;
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./factory-
|
|
1
|
+
import { t as unpluginFactory } from "./factory-CnVNvO57.js";
|
|
2
2
|
|
|
3
3
|
//#region src/rolldown-browser.ts
|
|
4
4
|
var rolldown_browser_default = (options) => unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Options } from "./common-BaikgpzR.cjs";
|
|
2
2
|
import * as unplugin8 from "unplugin";
|
|
3
|
-
import * as
|
|
3
|
+
import * as magic_string0 from "magic-string";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown-browser.d.ts
|
|
6
6
|
declare const _default: (options?: Options) => {
|
|
@@ -30,7 +30,10 @@ declare const _default: (options?: Options) => {
|
|
|
30
30
|
};
|
|
31
31
|
code?: never;
|
|
32
32
|
};
|
|
33
|
-
handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string):
|
|
33
|
+
handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string): {
|
|
34
|
+
code: string;
|
|
35
|
+
readonly map: magic_string0.SourceMap;
|
|
36
|
+
} | undefined;
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
//#endregion
|
package/rolldown-browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./factory-
|
|
4
|
-
const require_rolldown_browser = require('./rolldown-browser-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./factory-B0CnGO9P.cjs');
|
|
4
|
+
const require_rolldown_browser = require('./rolldown-browser-BzaTpeZq.cjs');
|
|
5
5
|
|
|
6
6
|
exports.default = require_rolldown_browser.rolldown_browser_default;
|
package/rolldown-browser.d.cts
CHANGED
package/rolldown-browser.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as _default } from "./rolldown-browser-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import { t as _default } from "./rolldown-browser-C8OHaYCP.js";
|
|
3
3
|
export { _default as default };
|
package/rolldown-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./factory-
|
|
3
|
-
import { t as rolldown_browser_default } from "./rolldown-browser-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./factory-CnVNvO57.js";
|
|
3
|
+
import { t as rolldown_browser_default } from "./rolldown-browser-D0pxy7TZ.js";
|
|
4
4
|
|
|
5
5
|
export { rolldown_browser_default as default };
|
package/rolldown.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/rolldown.ts
|
|
10
10
|
var rolldown_default = require_src.rolldownPlugin;
|
package/rolldown.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./common-BaikgpzR.cjs";
|
|
2
2
|
import "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import "./rolldown-browser-
|
|
4
|
+
import "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { r as rolldownPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export = rolldownPlugin;
|
package/rolldown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { r as rolldownPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { r as rolldownPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { rolldownPlugin as default };
|
package/rolldown.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { r as rolldownPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { r as rolldownPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/rolldown.ts
|
|
9
9
|
var rolldown_default = rolldownPlugin;
|
package/rollup.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/rollup.ts
|
|
10
10
|
var rollup_default = require_src.rollupPlugin;
|
package/rollup.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./common-BaikgpzR.cjs";
|
|
2
2
|
import "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import "./rolldown-browser-
|
|
4
|
+
import "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { i as rollupPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export = rollupPlugin;
|
package/rollup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { i as rollupPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { i as rollupPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { rollupPlugin as default };
|
package/rollup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { i as rollupPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { i as rollupPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/rollup.ts
|
|
9
9
|
var rollup_default = rollupPlugin;
|
package/rspack.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/rspack.ts
|
|
10
10
|
var rspack_default = require_src.rspackPlugin;
|
package/rspack.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./common-BaikgpzR.cjs";
|
|
2
2
|
import "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import "./rolldown-browser-
|
|
4
|
+
import "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { a as rspackPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export = rspackPlugin;
|
package/rspack.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { a as rspackPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { a as rspackPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { rspackPlugin as default };
|
package/rspack.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { a as rspackPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { a as rspackPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/rspack.ts
|
|
9
9
|
var rspack_default = rspackPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
2
|
-
const require_factory = require('./factory-
|
|
1
|
+
const require_common = require('./common-DPfAcXic.cjs');
|
|
2
|
+
const require_factory = require('./factory-B0CnGO9P.cjs');
|
|
3
3
|
let unplugin = require("unplugin");
|
|
4
4
|
unplugin = require_common.__toESM(unplugin);
|
|
5
5
|
|
package/vite.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/vite.ts
|
|
10
10
|
var vite_default = require_src.vitePlugin;
|
package/vite.d.cts
CHANGED
package/vite.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { c as vitePlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { c as vitePlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { vitePlugin as default };
|
package/vite.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { c as vitePlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { c as vitePlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/vite.ts
|
|
9
9
|
var vite_default = vitePlugin;
|
package/webpack.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./factory-
|
|
5
|
-
require('./bun-
|
|
6
|
-
require('./rolldown-browser-
|
|
7
|
-
const require_src = require('./src-
|
|
2
|
+
require('./common-DPfAcXic.cjs');
|
|
3
|
+
require('./babel-D-TCImIi.cjs');
|
|
4
|
+
require('./factory-B0CnGO9P.cjs');
|
|
5
|
+
require('./bun-o6QmlVaS.cjs');
|
|
6
|
+
require('./rolldown-browser-BzaTpeZq.cjs');
|
|
7
|
+
const require_src = require('./src-BljgtpqS.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/webpack.ts
|
|
10
10
|
var webpack_default = require_src.webpackPlugin;
|
package/webpack.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./common-BaikgpzR.cjs";
|
|
2
2
|
import "./babel-mqeTZT8y.cjs";
|
|
3
3
|
import "./bun-Df2nJEmj.cjs";
|
|
4
|
-
import "./rolldown-browser-
|
|
4
|
+
import "./rolldown-browser-XXZriqjg.cjs";
|
|
5
5
|
import { l as webpackPlugin } from "./index-Dq70sYN7.cjs";
|
|
6
6
|
export = webpackPlugin;
|
package/webpack.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import "./rolldown-browser-
|
|
5
|
-
import { l as webpackPlugin } from "./index-
|
|
1
|
+
import "./common-BLW8Fy4P.js";
|
|
2
|
+
import "./babel-CXwXwwOE.js";
|
|
3
|
+
import "./bun-C6usJAus.js";
|
|
4
|
+
import "./rolldown-browser-C8OHaYCP.js";
|
|
5
|
+
import { l as webpackPlugin } from "./index-rnHwqPEN.js";
|
|
6
6
|
export { webpackPlugin as default };
|
package/webpack.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./factory-
|
|
4
|
-
import "./bun
|
|
5
|
-
import "./rolldown-browser-
|
|
6
|
-
import { l as webpackPlugin } from "./src-
|
|
1
|
+
import "./common-B8nnr-Iq.js";
|
|
2
|
+
import "./babel-dNT1_5hS.js";
|
|
3
|
+
import "./factory-CnVNvO57.js";
|
|
4
|
+
import "./bun-DY6XE5xi.js";
|
|
5
|
+
import "./rolldown-browser-D0pxy7TZ.js";
|
|
6
|
+
import { l as webpackPlugin } from "./src-DZP2_1Gn.js";
|
|
7
7
|
|
|
8
8
|
//#region src/webpack.ts
|
|
9
9
|
var webpack_default = webpackPlugin;
|