unplugin-typegpu 0.11.2 → 0.11.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/{babel-C8UzthFd.d.cts → babel-BtEAIwcz.d.ts} +2 -1
- package/{babel-CbManzjz.js → babel-CAEdZVus.js} +2 -1
- package/{babel-B-IcpMR7.cjs → babel-Dh30Kt6S.cjs} +20 -18
- package/{babel-CmCnq-43.d.ts → babel-mqeTZT8y.d.cts} +2 -1
- package/babel.cjs +2 -2
- package/babel.d.cts +2 -2
- package/babel.d.ts +2 -2
- package/babel.js +2 -2
- package/bun--yeG3v60.js +33 -0
- package/bun-5HFBYRLX.cjs +39 -0
- package/{bun-ovScJ4Es.d.ts → bun-BEJk_QgR.d.ts} +1 -1
- package/{bun-cwXs2EDP.d.cts → bun-Df2nJEmj.d.cts} +1 -1
- package/bun.cjs +3 -2
- package/bun.d.cts +2 -2
- package/bun.d.ts +2 -2
- package/bun.js +3 -2
- package/{common-DZ2cLtbe.d.cts → common-BaikgpzR.d.cts} +1 -1
- package/{common-CElmMmuq.js → common-DAlNUXzt.js} +1 -6
- package/{common-BlvLUwEz.d.ts → common-DLS92R6o.d.ts} +1 -1
- package/{common-B8wsLJUq.cjs → common-DsNLIpl2.cjs} +0 -11
- package/esbuild.cjs +6 -4
- package/esbuild.d.cts +5 -4
- package/esbuild.d.ts +5 -4
- package/esbuild.js +6 -4
- package/{bun-CDECNeIU.js → factory-BhxFJhLe.js} +3 -30
- package/{bun-DU5xZoDJ.cjs → factory-DpKZsJoL.cjs} +6 -38
- package/farm.cjs +6 -4
- package/farm.d.cts +5 -4
- package/farm.d.ts +5 -4
- package/farm.js +6 -4
- package/index-Dq70sYN7.d.cts +15 -0
- package/index-pvEoqPl0.d.ts +15 -0
- package/index.cjs +7 -5
- package/index.d.cts +5 -4
- package/index.d.ts +5 -4
- package/index.js +6 -4
- package/package.json +1 -1
- package/rolldown-browser-2X8xghF4.cjs +12 -0
- package/{index-PPreQbn5.d.ts → rolldown-browser-BeO_gjfe.d.cts} +4 -15
- package/{index-COIv1oYx.d.cts → rolldown-browser-CLu5Nu_x.d.ts} +4 -15
- package/rolldown-browser-D2u-yWpA.js +7 -0
- package/rolldown-browser.cjs +6 -0
- package/rolldown-browser.d.cts +3 -0
- package/rolldown-browser.d.ts +3 -0
- package/rolldown-browser.js +5 -0
- package/rolldown.cjs +6 -4
- package/rolldown.d.cts +5 -4
- package/rolldown.d.ts +5 -4
- package/rolldown.js +6 -4
- package/rollup.cjs +6 -4
- package/rollup.d.cts +5 -4
- package/rollup.d.ts +5 -4
- package/rollup.js +6 -4
- package/rspack.cjs +6 -4
- package/rspack.d.cts +5 -4
- package/rspack.d.ts +5 -4
- package/rspack.js +6 -4
- package/{src-D84rmPxv.js → src-CrU_oTgc.js} +2 -6
- package/{src-CDZ6lHsg.cjs → src-Ctdak0KH.cjs} +3 -13
- package/vite.cjs +6 -4
- package/vite.d.cts +5 -4
- package/vite.d.ts +5 -4
- package/vite.js +6 -4
- package/webpack.cjs +6 -4
- package/webpack.d.cts +5 -4
- package/webpack.d.ts +5 -4
- package/webpack.js +6 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as initPluginState, i as getBlockScope,
|
|
1
|
+
import { a as initPluginState, i as getBlockScope, r as functionVisitor, t as defaultOptions } from "./common-DAlNUXzt.js";
|
|
2
2
|
import defu from "defu";
|
|
3
3
|
import { transpileFn } from "tinyest-for-wgsl";
|
|
4
4
|
import { FORMAT_VERSION } from "tinyest";
|
|
5
|
+
import * as t from "@babel/types";
|
|
5
6
|
import { resolve } from "pathe";
|
|
6
7
|
import picomatch from "picomatch";
|
|
7
8
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
1
|
+
const require_common = require('./common-DsNLIpl2.cjs');
|
|
2
2
|
let defu = require("defu");
|
|
3
3
|
defu = require_common.__toESM(defu);
|
|
4
4
|
let tinyest_for_wgsl = require("tinyest-for-wgsl");
|
|
5
5
|
tinyest_for_wgsl = require_common.__toESM(tinyest_for_wgsl);
|
|
6
6
|
let tinyest = require("tinyest");
|
|
7
7
|
tinyest = require_common.__toESM(tinyest);
|
|
8
|
+
let __babel_types = require("@babel/types");
|
|
9
|
+
__babel_types = require_common.__toESM(__babel_types);
|
|
8
10
|
let pathe = require("pathe");
|
|
9
11
|
pathe = require_common.__toESM(pathe);
|
|
10
12
|
let picomatch = require("picomatch");
|
|
@@ -69,25 +71,25 @@ function createFilterForId(filter) {
|
|
|
69
71
|
//#endregion
|
|
70
72
|
//#region src/babel.ts
|
|
71
73
|
function i(identifier) {
|
|
72
|
-
return
|
|
74
|
+
return __babel_types.identifier(identifier);
|
|
73
75
|
}
|
|
74
76
|
function assignMetadata(path, name, ast) {
|
|
75
|
-
const metadata =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
const metadata = __babel_types.objectExpression([
|
|
78
|
+
__babel_types.objectProperty(i("v"), __babel_types.numericLiteral(tinyest.FORMAT_VERSION)),
|
|
79
|
+
__babel_types.objectProperty(i("name"), __babel_types.valueToNode(name)),
|
|
80
|
+
__babel_types.objectProperty(i("ast"), __babel_types.valueToNode(ast)),
|
|
81
|
+
__babel_types.objectProperty(i("externals"), __babel_types.arrowFunctionExpression([], __babel_types.blockStatement([__babel_types.returnStatement(__babel_types.objectExpression(ast.externalNames.map((name$1) => name$1 === "this" ? __babel_types.objectProperty(i("this"), __babel_types.thisExpression()) : __babel_types.objectProperty(i(name$1), i(name$1), false, name$1 !== "this"))))])))
|
|
80
82
|
]);
|
|
81
83
|
let expression;
|
|
82
|
-
const visibility =
|
|
83
|
-
if (
|
|
84
|
+
const visibility = __babel_types.isFunctionDeclaration(path.node) ? require_common.getBlockScope(path) : void 0;
|
|
85
|
+
if (__babel_types.isFunctionDeclaration(path.node)) expression = __babel_types.functionExpression(path.node.id, path.node.params, path.node.body);
|
|
84
86
|
else expression = path.node;
|
|
85
|
-
const callExpr =
|
|
86
|
-
|
|
87
|
+
const callExpr = __babel_types.callExpression(__babel_types.arrowFunctionExpression([i("$")], __babel_types.logicalExpression("&&", __babel_types.callExpression(__babel_types.memberExpression(__babel_types.assignmentExpression("??=", __babel_types.memberExpression(i("globalThis"), i("__TYPEGPU_META__")), __babel_types.newExpression(i("WeakMap"), [])), i("set")), [__babel_types.assignmentExpression("=", __babel_types.memberExpression(i("$"), i("f")), expression), metadata]), __babel_types.memberExpression(i("$"), i("f")))), [__babel_types.objectExpression([])]);
|
|
88
|
+
__babel_types.addComment(callExpr, "leading", "#__PURE__");
|
|
87
89
|
let replacement = callExpr;
|
|
88
|
-
if (
|
|
89
|
-
const declaration =
|
|
90
|
-
|
|
90
|
+
if (__babel_types.isFunctionDeclaration(path.node) && path.node.id) {
|
|
91
|
+
const declaration = __babel_types.variableDeclaration("const", [__babel_types.variableDeclarator(path.node.id, callExpr)]);
|
|
92
|
+
__babel_types.inheritLeadingComments(declaration, path.node);
|
|
91
93
|
replacement = declaration;
|
|
92
94
|
}
|
|
93
95
|
if (visibility) {
|
|
@@ -98,15 +100,15 @@ function assignMetadata(path, name, ast) {
|
|
|
98
100
|
path.skip();
|
|
99
101
|
}
|
|
100
102
|
function wrapInAutoName(path, name) {
|
|
101
|
-
const callExpr =
|
|
102
|
-
|
|
103
|
+
const callExpr = __babel_types.callExpression(__babel_types.logicalExpression("??", __babel_types.memberExpression(i("globalThis"), i("__TYPEGPU_AUTONAME__")), __babel_types.arrowFunctionExpression([i("a")], i("a"))), [path.node, __babel_types.stringLiteral(name)]);
|
|
104
|
+
__babel_types.addComment(callExpr, "leading", "#__PURE__");
|
|
103
105
|
path.replaceWith(callExpr);
|
|
104
106
|
}
|
|
105
107
|
function replaceWithAssignmentOverload(path, runtimeFn) {
|
|
106
|
-
path.replaceWith(
|
|
108
|
+
path.replaceWith(__babel_types.assignmentExpression("=", path.node.left, __babel_types.callExpression(i(runtimeFn), [path.node.left, path.node.right])));
|
|
107
109
|
}
|
|
108
110
|
function replaceWithBinaryOverload(path, runtimeFn) {
|
|
109
|
-
path.replaceWith(
|
|
111
|
+
path.replaceWith(__babel_types.callExpression(i(runtimeFn), [path.node.left, path.node.right]));
|
|
110
112
|
}
|
|
111
113
|
function TypeGPUPlugin() {
|
|
112
114
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as PluginState
|
|
1
|
+
import { n as PluginState } from "./common-BaikgpzR.cjs";
|
|
2
2
|
import { NodePath } from "@babel/traverse";
|
|
3
|
+
import * as t from "@babel/types";
|
|
3
4
|
|
|
4
5
|
//#region src/babel.d.ts
|
|
5
6
|
declare function TypeGPUPlugin(): {
|
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-DsNLIpl2.cjs');
|
|
3
|
+
const require_babel = require('./babel-Dh30Kt6S.cjs');
|
|
4
4
|
|
|
5
5
|
exports.default = require_babel.TypeGPUPlugin;
|
package/babel.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-mqeTZT8y.cjs";
|
|
3
3
|
export = TypeGPUPlugin;
|
package/babel.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-BtEAIwcz.js";
|
|
3
3
|
export { TypeGPUPlugin as default };
|
package/babel.js
CHANGED
package/bun--yeG3v60.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as earlyPruneRegex, t as defaultOptions } from "./common-DAlNUXzt.js";
|
|
2
|
+
import { t as unpluginFactory } from "./factory-BhxFJhLe.js";
|
|
3
|
+
import defu from "defu";
|
|
4
|
+
|
|
5
|
+
//#region src/bun.ts
|
|
6
|
+
var bun_default = (rawOptions) => {
|
|
7
|
+
const options = defu(rawOptions, defaultOptions);
|
|
8
|
+
const include = options.include;
|
|
9
|
+
if (!(include instanceof RegExp)) throw new Error(`Unsupported 'include' options in Bun plugin. Please provide a single regular expression`);
|
|
10
|
+
if (options.exclude) throw new Error(`Unsupported 'exclude' option in Bun plugin`);
|
|
11
|
+
const rawPlugin = unpluginFactory(rawOptions, { framework: "bun" });
|
|
12
|
+
return {
|
|
13
|
+
name: "unplugin-typegpu",
|
|
14
|
+
setup(build) {
|
|
15
|
+
build.onLoad({ filter: include }, async (args) => {
|
|
16
|
+
var _result$code;
|
|
17
|
+
const codeIn = await Bun.file(args.path).text();
|
|
18
|
+
if (earlyPruneRegex.every((pattern) => !pattern.test(codeIn))) return {
|
|
19
|
+
contents: codeIn,
|
|
20
|
+
loader: args.loader
|
|
21
|
+
};
|
|
22
|
+
const result = rawPlugin.transform.handler.apply({}, [codeIn, args.path]);
|
|
23
|
+
return {
|
|
24
|
+
contents: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : codeIn,
|
|
25
|
+
loader: args.loader
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { bun_default as t };
|
package/bun-5HFBYRLX.cjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_common = require('./common-DsNLIpl2.cjs');
|
|
2
|
+
const require_factory = require('./factory-DpKZsJoL.cjs');
|
|
3
|
+
let defu = require("defu");
|
|
4
|
+
defu = require_common.__toESM(defu);
|
|
5
|
+
|
|
6
|
+
//#region src/bun.ts
|
|
7
|
+
var bun_default = (rawOptions) => {
|
|
8
|
+
const options = (0, defu.default)(rawOptions, require_common.defaultOptions);
|
|
9
|
+
const include = options.include;
|
|
10
|
+
if (!(include instanceof RegExp)) throw new Error(`Unsupported 'include' options in Bun plugin. Please provide a single regular expression`);
|
|
11
|
+
if (options.exclude) throw new Error(`Unsupported 'exclude' option in Bun plugin`);
|
|
12
|
+
const rawPlugin = require_factory.unpluginFactory(rawOptions, { framework: "bun" });
|
|
13
|
+
return {
|
|
14
|
+
name: "unplugin-typegpu",
|
|
15
|
+
setup(build) {
|
|
16
|
+
build.onLoad({ filter: include }, async (args) => {
|
|
17
|
+
var _result$code;
|
|
18
|
+
const codeIn = await Bun.file(args.path).text();
|
|
19
|
+
if (require_common.earlyPruneRegex.every((pattern) => !pattern.test(codeIn))) return {
|
|
20
|
+
contents: codeIn,
|
|
21
|
+
loader: args.loader
|
|
22
|
+
};
|
|
23
|
+
const result = rawPlugin.transform.handler.apply({}, [codeIn, args.path]);
|
|
24
|
+
return {
|
|
25
|
+
contents: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : codeIn,
|
|
26
|
+
loader: args.loader
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
Object.defineProperty(exports, 'bun_default', {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return bun_default;
|
|
38
|
+
}
|
|
39
|
+
});
|
package/bun.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./factory-DpKZsJoL.cjs');
|
|
4
|
+
const require_bun = require('./bun-5HFBYRLX.cjs');
|
|
4
5
|
|
|
5
6
|
exports.default = require_bun.bun_default;
|
package/bun.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as _default } from "./bun-
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import { t as _default } from "./bun-Df2nJEmj.cjs";
|
|
3
3
|
export = _default;
|
package/bun.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as _default } from "./bun-
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import { t as _default } from "./bun-BEJk_QgR.js";
|
|
3
3
|
export { _default as default };
|
package/bun.js
CHANGED
|
@@ -2,11 +2,6 @@ import { transpileFn } from "tinyest-for-wgsl";
|
|
|
2
2
|
import * as t from "@babel/types";
|
|
3
3
|
import { MagicStringAST } from "magic-string-ast";
|
|
4
4
|
|
|
5
|
-
//#region src/core/polyfill-process.ts
|
|
6
|
-
if (typeof globalThis.process === "undefined") globalThis.process = {};
|
|
7
|
-
if (typeof globalThis.process.env === "undefined") globalThis.process.env = {};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
5
|
//#region src/core/common.ts
|
|
11
6
|
function initPluginState(state, methods) {
|
|
12
7
|
var _state$opts$autoNamin;
|
|
@@ -276,4 +271,4 @@ const functionVisitor = {
|
|
|
276
271
|
};
|
|
277
272
|
|
|
278
273
|
//#endregion
|
|
279
|
-
export { initPluginState as a, getBlockScope as i, earlyPruneRegex as n,
|
|
274
|
+
export { initPluginState as a, getBlockScope as i, earlyPruneRegex as n, functionVisitor as r, defaultOptions as t };
|
|
@@ -28,11 +28,6 @@ __babel_types = __toESM(__babel_types);
|
|
|
28
28
|
let magic_string_ast = require("magic-string-ast");
|
|
29
29
|
magic_string_ast = __toESM(magic_string_ast);
|
|
30
30
|
|
|
31
|
-
//#region src/core/polyfill-process.ts
|
|
32
|
-
if (typeof globalThis.process === "undefined") globalThis.process = {};
|
|
33
|
-
if (typeof globalThis.process.env === "undefined") globalThis.process.env = {};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
31
|
//#region src/core/common.ts
|
|
37
32
|
function initPluginState(state, methods) {
|
|
38
33
|
var _state$opts$autoNamin;
|
|
@@ -337,10 +332,4 @@ Object.defineProperty(exports, 'initPluginState', {
|
|
|
337
332
|
get: function () {
|
|
338
333
|
return initPluginState;
|
|
339
334
|
}
|
|
340
|
-
});
|
|
341
|
-
Object.defineProperty(exports, 't', {
|
|
342
|
-
enumerable: true,
|
|
343
|
-
get: function () {
|
|
344
|
-
return t;
|
|
345
|
-
}
|
|
346
335
|
});
|
package/esbuild.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/esbuild.ts
|
|
8
10
|
var esbuild_default = require_src.esbuildPlugin;
|
package/esbuild.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { t as esbuildPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = esbuildPlugin;
|
package/esbuild.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { t as esbuildPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { esbuildPlugin as default };
|
package/esbuild.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { t as esbuildPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/esbuild.ts
|
|
7
9
|
var esbuild_default = esbuildPlugin;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as initPluginState, i as getBlockScope, n as earlyPruneRegex,
|
|
1
|
+
import { a as initPluginState, i as getBlockScope, n as earlyPruneRegex, r as functionVisitor, t as defaultOptions } from "./common-DAlNUXzt.js";
|
|
2
2
|
import defu from "defu";
|
|
3
3
|
import { transpileFn } from "tinyest-for-wgsl";
|
|
4
4
|
import { FORMAT_VERSION } from "tinyest";
|
|
5
|
+
import * as t from "@babel/types";
|
|
5
6
|
import { MagicStringAST, generateTransform } from "magic-string-ast";
|
|
6
7
|
import { getBabelParserOptions, getLang } from "ast-kit";
|
|
7
8
|
import _traverse from "@babel/traverse";
|
|
@@ -103,32 +104,4 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
103
104
|
});
|
|
104
105
|
|
|
105
106
|
//#endregion
|
|
106
|
-
|
|
107
|
-
var bun_default = (rawOptions) => {
|
|
108
|
-
const options = defu(rawOptions, defaultOptions);
|
|
109
|
-
const include = options.include;
|
|
110
|
-
if (!(include instanceof RegExp)) throw new Error(`Unsupported 'include' options in Bun plugin. Please provide a single regular expression`);
|
|
111
|
-
if (options.exclude) throw new Error(`Unsupported 'exclude' option in Bun plugin`);
|
|
112
|
-
const rawPlugin = unpluginFactory(rawOptions, { framework: "bun" });
|
|
113
|
-
return {
|
|
114
|
-
name: "unplugin-typegpu",
|
|
115
|
-
setup(build) {
|
|
116
|
-
build.onLoad({ filter: include }, async (args) => {
|
|
117
|
-
var _result$code;
|
|
118
|
-
const codeIn = await Bun.file(args.path).text();
|
|
119
|
-
if (earlyPruneRegex.every((pattern) => !pattern.test(codeIn))) return {
|
|
120
|
-
contents: codeIn,
|
|
121
|
-
loader: args.loader
|
|
122
|
-
};
|
|
123
|
-
const result = rawPlugin.transform.handler.apply({}, [codeIn, args.path]);
|
|
124
|
-
return {
|
|
125
|
-
contents: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : codeIn,
|
|
126
|
-
loader: args.loader
|
|
127
|
-
};
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
//#endregion
|
|
134
|
-
export { unpluginFactory as n, bun_default as t };
|
|
107
|
+
export { unpluginFactory as t };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
1
|
+
const require_common = require('./common-DsNLIpl2.cjs');
|
|
2
2
|
let defu = require("defu");
|
|
3
3
|
defu = require_common.__toESM(defu);
|
|
4
4
|
let tinyest_for_wgsl = require("tinyest-for-wgsl");
|
|
5
5
|
tinyest_for_wgsl = require_common.__toESM(tinyest_for_wgsl);
|
|
6
6
|
let tinyest = require("tinyest");
|
|
7
7
|
tinyest = require_common.__toESM(tinyest);
|
|
8
|
+
let __babel_types = require("@babel/types");
|
|
9
|
+
__babel_types = require_common.__toESM(__babel_types);
|
|
8
10
|
let magic_string_ast = require("magic-string-ast");
|
|
9
11
|
magic_string_ast = require_common.__toESM(magic_string_ast);
|
|
10
12
|
let ast_kit = require("ast-kit");
|
|
@@ -29,16 +31,16 @@ function assignMetadata(path, name, ast) {
|
|
|
29
31
|
ast: ${embedJSON(ast)},
|
|
30
32
|
externals: () => ({${ast.externalNames.map((e) => e === "this" ? "\"this\": this" : e).join(", ")}}),
|
|
31
33
|
}`;
|
|
32
|
-
const visibility =
|
|
34
|
+
const visibility = __babel_types.isFunctionDeclaration(path.node) ? require_common.getBlockScope(path) : void 0;
|
|
33
35
|
const fnCode = this.magicString.sliceNode(path.node);
|
|
34
36
|
let nodeToOverride = path.node;
|
|
35
37
|
let code = fnWrapperTemplate(fnCode, metadata);
|
|
36
38
|
let insertPos = (_path$node$start = path.node.start) !== null && _path$node$start !== void 0 ? _path$node$start : 0;
|
|
37
|
-
if (
|
|
39
|
+
if (__babel_types.isFunctionDeclaration(path.node) && path.node.id) code = `const ${path.node.id.name} = ${code};\n\n`;
|
|
38
40
|
if (visibility) {
|
|
39
41
|
var _visibility$node$body, _visibility$node$body2;
|
|
40
42
|
insertPos = (_visibility$node$body = (_visibility$node$body2 = visibility.node.body[0]) === null || _visibility$node$body2 === void 0 ? void 0 : _visibility$node$body2.start) !== null && _visibility$node$body !== void 0 ? _visibility$node$body : insertPos;
|
|
41
|
-
if (
|
|
43
|
+
if (__babel_types.isExportNamedDeclaration(path.parent)) {
|
|
42
44
|
nodeToOverride = path.parent;
|
|
43
45
|
code = `export ${code}`;
|
|
44
46
|
}
|
|
@@ -110,40 +112,6 @@ const unpluginFactory = ((rawOptions, _meta) => {
|
|
|
110
112
|
});
|
|
111
113
|
|
|
112
114
|
//#endregion
|
|
113
|
-
//#region src/bun.ts
|
|
114
|
-
var bun_default = (rawOptions) => {
|
|
115
|
-
const options = (0, defu.default)(rawOptions, require_common.defaultOptions);
|
|
116
|
-
const include = options.include;
|
|
117
|
-
if (!(include instanceof RegExp)) throw new Error(`Unsupported 'include' options in Bun plugin. Please provide a single regular expression`);
|
|
118
|
-
if (options.exclude) throw new Error(`Unsupported 'exclude' option in Bun plugin`);
|
|
119
|
-
const rawPlugin = unpluginFactory(rawOptions, { framework: "bun" });
|
|
120
|
-
return {
|
|
121
|
-
name: "unplugin-typegpu",
|
|
122
|
-
setup(build) {
|
|
123
|
-
build.onLoad({ filter: include }, async (args) => {
|
|
124
|
-
var _result$code;
|
|
125
|
-
const codeIn = await Bun.file(args.path).text();
|
|
126
|
-
if (require_common.earlyPruneRegex.every((pattern) => !pattern.test(codeIn))) return {
|
|
127
|
-
contents: codeIn,
|
|
128
|
-
loader: args.loader
|
|
129
|
-
};
|
|
130
|
-
const result = rawPlugin.transform.handler.apply({}, [codeIn, args.path]);
|
|
131
|
-
return {
|
|
132
|
-
contents: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : codeIn,
|
|
133
|
-
loader: args.loader
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
//#endregion
|
|
141
|
-
Object.defineProperty(exports, 'bun_default', {
|
|
142
|
-
enumerable: true,
|
|
143
|
-
get: function () {
|
|
144
|
-
return bun_default;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
115
|
Object.defineProperty(exports, 'unpluginFactory', {
|
|
148
116
|
enumerable: true,
|
|
149
117
|
get: function () {
|
package/farm.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/farm.ts
|
|
8
10
|
var farm_default = require_src.farmPlugin;
|
package/farm.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { n as farmPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = farmPlugin;
|
package/farm.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { n as farmPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { farmPlugin as default };
|
package/farm.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { n as farmPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/farm.ts
|
|
7
9
|
var farm_default = farmPlugin;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as Options } from "./common-BaikgpzR.cjs";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const typegpu: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
6
|
+
declare const vitePlugin: (options?: Options | undefined) => unplugin0.VitePlugin<any> | unplugin0.VitePlugin<any>[];
|
|
7
|
+
declare const rollupPlugin: (options?: Options | undefined) => unplugin0.RollupPlugin<any> | unplugin0.RollupPlugin<any>[];
|
|
8
|
+
declare const rolldownPlugin: (options?: Options | undefined) => unplugin0.RolldownPlugin<any> | unplugin0.RolldownPlugin<any>[];
|
|
9
|
+
declare const webpackPlugin: (options?: Options | undefined) => unplugin0.WebpackPluginInstance;
|
|
10
|
+
declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
|
|
11
|
+
declare const esbuildPlugin: (options?: Options | undefined) => unplugin0.EsbuildPlugin;
|
|
12
|
+
declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
|
|
13
|
+
declare const unloaderPlugin: (options?: Options | undefined) => any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as Options } from "./common-DLS92R6o.js";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const typegpu: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
6
|
+
declare const vitePlugin: (options?: Options | undefined) => unplugin0.VitePlugin<any> | unplugin0.VitePlugin<any>[];
|
|
7
|
+
declare const rollupPlugin: (options?: Options | undefined) => unplugin0.RollupPlugin<any> | unplugin0.RollupPlugin<any>[];
|
|
8
|
+
declare const rolldownPlugin: (options?: Options | undefined) => unplugin0.RolldownPlugin<any> | unplugin0.RolldownPlugin<any>[];
|
|
9
|
+
declare const webpackPlugin: (options?: Options | undefined) => unplugin0.WebpackPluginInstance;
|
|
10
|
+
declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
|
|
11
|
+
declare const esbuildPlugin: (options?: Options | undefined) => unplugin0.EsbuildPlugin;
|
|
12
|
+
declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
|
|
13
|
+
declare const unloaderPlugin: (options?: Options | undefined) => any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t };
|
package/index.cjs
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
const require_babel = require('./babel-
|
|
4
|
-
|
|
5
|
-
const
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
const require_babel = require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
const require_bun = require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
const require_rolldown_browser = require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
exports.babelPlugin = require_babel.TypeGPUPlugin;
|
|
8
10
|
exports.bunPlugin = require_bun.bun_default;
|
|
9
11
|
exports.default = require_src.src_default;
|
|
10
12
|
exports.esbuildPlugin = require_src.esbuildPlugin;
|
|
11
13
|
exports.farmPlugin = require_src.farmPlugin;
|
|
12
|
-
exports.rolldownBrowserPlugin =
|
|
14
|
+
exports.rolldownBrowserPlugin = require_rolldown_browser.rolldown_browser_default;
|
|
13
15
|
exports.rolldownPlugin = require_src.rolldownPlugin;
|
|
14
16
|
exports.rollupPlugin = require_src.rollupPlugin;
|
|
15
17
|
exports.rspackPlugin = require_src.rspackPlugin;
|
package/index.d.cts
CHANGED
|
@@ -1,5 +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 {
|
|
1
|
+
import { t as Options } from "./common-BaikgpzR.cjs";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import { t as _default } from "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import { t as _default$1 } from "./rolldown-browser-BeO_gjfe.cjs";
|
|
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";
|
|
5
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,5 +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 {
|
|
1
|
+
import { t as Options } from "./common-DLS92R6o.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-BtEAIwcz.js";
|
|
3
|
+
import { t as _default } from "./bun-BEJk_QgR.js";
|
|
4
|
+
import { t as _default$1 } from "./rolldown-browser-CLu5Nu_x.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-pvEoqPl0.js";
|
|
5
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,6 +1,8 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import { t as TypeGPUPlugin } from "./babel-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import { t as TypeGPUPlugin } from "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import { t as bun_default } from "./bun--yeG3v60.js";
|
|
5
|
+
import { t as rolldown_browser_default } from "./rolldown-browser-D2u-yWpA.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-CrU_oTgc.js";
|
|
5
7
|
|
|
6
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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_factory = require('./factory-DpKZsJoL.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/rolldown-browser.ts
|
|
4
|
+
var rolldown_browser_default = (options) => require_factory.unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, 'rolldown_browser_default', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return rolldown_browser_default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Options } from "./common-
|
|
2
|
-
import * as magic_string_ast0 from "magic-string-ast";
|
|
1
|
+
import { t as Options } from "./common-BaikgpzR.cjs";
|
|
3
2
|
import * as unplugin8 from "unplugin";
|
|
3
|
+
import * as magic_string_ast0 from "magic-string-ast";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown-browser.d.ts
|
|
6
|
-
declare const _default
|
|
6
|
+
declare const _default: (options?: Options) => {
|
|
7
7
|
name: "unplugin-typegpu";
|
|
8
8
|
enforce: "post" | "pre" | undefined;
|
|
9
9
|
transform: {
|
|
@@ -34,15 +34,4 @@ declare const _default$1: (options?: Options) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
//#endregion
|
|
37
|
-
|
|
38
|
-
declare const typegpu: unplugin8.UnpluginInstance<Options | undefined, boolean>;
|
|
39
|
-
declare const vitePlugin: (options?: Options | undefined) => unplugin8.VitePlugin<any> | unplugin8.VitePlugin<any>[];
|
|
40
|
-
declare const rollupPlugin: (options?: Options | undefined) => unplugin8.RollupPlugin<any> | unplugin8.RollupPlugin<any>[];
|
|
41
|
-
declare const rolldownPlugin: (options?: Options | undefined) => unplugin8.RolldownPlugin<any> | unplugin8.RolldownPlugin<any>[];
|
|
42
|
-
declare const webpackPlugin: (options?: Options | undefined) => unplugin8.WebpackPluginInstance;
|
|
43
|
-
declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
|
|
44
|
-
declare const esbuildPlugin: (options?: Options | undefined) => unplugin8.EsbuildPlugin;
|
|
45
|
-
declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
|
|
46
|
-
declare const unloaderPlugin: (options?: Options | undefined) => any;
|
|
47
|
-
//#endregion
|
|
48
|
-
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t, _default$1 as u };
|
|
37
|
+
export { _default as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Options } from "./common-
|
|
2
|
-
import * as unplugin8 from "unplugin";
|
|
1
|
+
import { t as Options } from "./common-DLS92R6o.js";
|
|
3
2
|
import * as magic_string_ast0 from "magic-string-ast";
|
|
3
|
+
import * as unplugin8 from "unplugin";
|
|
4
4
|
|
|
5
5
|
//#region src/rolldown-browser.d.ts
|
|
6
|
-
declare const _default
|
|
6
|
+
declare const _default: (options?: Options) => {
|
|
7
7
|
name: "unplugin-typegpu";
|
|
8
8
|
enforce: "post" | "pre" | undefined;
|
|
9
9
|
transform: {
|
|
@@ -34,15 +34,4 @@ declare const _default$1: (options?: Options) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
//#endregion
|
|
37
|
-
|
|
38
|
-
declare const typegpu: unplugin8.UnpluginInstance<Options | undefined, boolean>;
|
|
39
|
-
declare const vitePlugin: (options?: Options | undefined) => unplugin8.VitePlugin<any> | unplugin8.VitePlugin<any>[];
|
|
40
|
-
declare const rollupPlugin: (options?: Options | undefined) => unplugin8.RollupPlugin<any> | unplugin8.RollupPlugin<any>[];
|
|
41
|
-
declare const rolldownPlugin: (options?: Options | undefined) => unplugin8.RolldownPlugin<any> | unplugin8.RolldownPlugin<any>[];
|
|
42
|
-
declare const webpackPlugin: (options?: Options | undefined) => unplugin8.WebpackPluginInstance;
|
|
43
|
-
declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
|
|
44
|
-
declare const esbuildPlugin: (options?: Options | undefined) => unplugin8.EsbuildPlugin;
|
|
45
|
-
declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
|
|
46
|
-
declare const unloaderPlugin: (options?: Options | undefined) => any;
|
|
47
|
-
//#endregion
|
|
48
|
-
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t, _default$1 as u };
|
|
37
|
+
export { _default as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { t as unpluginFactory } from "./factory-BhxFJhLe.js";
|
|
2
|
+
|
|
3
|
+
//#region src/rolldown-browser.ts
|
|
4
|
+
var rolldown_browser_default = (options) => unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { rolldown_browser_default as t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./factory-DpKZsJoL.cjs');
|
|
4
|
+
const require_rolldown_browser = require('./rolldown-browser-2X8xghF4.cjs');
|
|
5
|
+
|
|
6
|
+
exports.default = require_rolldown_browser.rolldown_browser_default;
|
package/rolldown.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/rolldown.ts
|
|
8
10
|
var rolldown_default = require_src.rolldownPlugin;
|
package/rolldown.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { r as rolldownPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = rolldownPlugin;
|
package/rolldown.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { r as rolldownPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { rolldownPlugin as default };
|
package/rolldown.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { r as rolldownPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/rolldown.ts
|
|
7
9
|
var rolldown_default = rolldownPlugin;
|
package/rollup.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/rollup.ts
|
|
8
10
|
var rollup_default = require_src.rollupPlugin;
|
package/rollup.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { i as rollupPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = rollupPlugin;
|
package/rollup.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { i as rollupPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { rollupPlugin as default };
|
package/rollup.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { i as rollupPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/rollup.ts
|
|
7
9
|
var rollup_default = rollupPlugin;
|
package/rspack.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/rspack.ts
|
|
8
10
|
var rspack_default = require_src.rspackPlugin;
|
package/rspack.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { a as rspackPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = rspackPlugin;
|
package/rspack.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { a as rspackPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { rspackPlugin as default };
|
package/rspack.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { a as rspackPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/rspack.ts
|
|
7
9
|
var rspack_default = rspackPlugin;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as unpluginFactory } from "./factory-BhxFJhLe.js";
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
3
|
|
|
4
|
-
//#region src/rolldown-browser.ts
|
|
5
|
-
var rolldown_browser_default = (options) => unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
4
|
//#region src/index.ts
|
|
9
5
|
const typegpu = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
10
6
|
var src_default = typegpu;
|
|
@@ -18,4 +14,4 @@ const farmPlugin = typegpu.farm;
|
|
|
18
14
|
const unloaderPlugin = typegpu.unloader;
|
|
19
15
|
|
|
20
16
|
//#endregion
|
|
21
|
-
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, src_default as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t
|
|
17
|
+
export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, src_default as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
const require_common = require('./common-
|
|
2
|
-
const
|
|
1
|
+
const require_common = require('./common-DsNLIpl2.cjs');
|
|
2
|
+
const require_factory = require('./factory-DpKZsJoL.cjs');
|
|
3
3
|
let unplugin = require("unplugin");
|
|
4
4
|
unplugin = require_common.__toESM(unplugin);
|
|
5
5
|
|
|
6
|
-
//#region src/rolldown-browser.ts
|
|
7
|
-
var rolldown_browser_default = (options) => require_bun.unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
6
|
//#region src/index.ts
|
|
11
|
-
const typegpu = /* @__PURE__ */ (0, unplugin.createUnplugin)(
|
|
7
|
+
const typegpu = /* @__PURE__ */ (0, unplugin.createUnplugin)(require_factory.unpluginFactory);
|
|
12
8
|
var src_default = typegpu;
|
|
13
9
|
const vitePlugin = typegpu.vite;
|
|
14
10
|
const rollupPlugin = typegpu.rollup;
|
|
@@ -38,12 +34,6 @@ Object.defineProperty(exports, 'rolldownPlugin', {
|
|
|
38
34
|
return rolldownPlugin;
|
|
39
35
|
}
|
|
40
36
|
});
|
|
41
|
-
Object.defineProperty(exports, 'rolldown_browser_default', {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: function () {
|
|
44
|
-
return rolldown_browser_default;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
37
|
Object.defineProperty(exports, 'rollupPlugin', {
|
|
48
38
|
enumerable: true,
|
|
49
39
|
get: function () {
|
package/vite.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/vite.ts
|
|
8
10
|
var vite_default = require_src.vitePlugin;
|
package/vite.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { c as vitePlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = vitePlugin;
|
package/vite.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { c as vitePlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { vitePlugin as default };
|
package/vite.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { c as vitePlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/vite.ts
|
|
7
9
|
var vite_default = vitePlugin;
|
package/webpack.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('./common-
|
|
3
|
-
require('./babel-
|
|
4
|
-
require('./
|
|
5
|
-
|
|
2
|
+
require('./common-DsNLIpl2.cjs');
|
|
3
|
+
require('./babel-Dh30Kt6S.cjs');
|
|
4
|
+
require('./factory-DpKZsJoL.cjs');
|
|
5
|
+
require('./bun-5HFBYRLX.cjs');
|
|
6
|
+
require('./rolldown-browser-2X8xghF4.cjs');
|
|
7
|
+
const require_src = require('./src-Ctdak0KH.cjs');
|
|
6
8
|
|
|
7
9
|
//#region src/webpack.ts
|
|
8
10
|
var webpack_default = require_src.webpackPlugin;
|
package/webpack.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-BaikgpzR.cjs";
|
|
2
|
+
import "./babel-mqeTZT8y.cjs";
|
|
3
|
+
import "./bun-Df2nJEmj.cjs";
|
|
4
|
+
import "./rolldown-browser-BeO_gjfe.cjs";
|
|
5
|
+
import { l as webpackPlugin } from "./index-Dq70sYN7.cjs";
|
|
5
6
|
export = webpackPlugin;
|
package/webpack.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./bun-
|
|
4
|
-
import
|
|
1
|
+
import "./common-DLS92R6o.js";
|
|
2
|
+
import "./babel-BtEAIwcz.js";
|
|
3
|
+
import "./bun-BEJk_QgR.js";
|
|
4
|
+
import "./rolldown-browser-CLu5Nu_x.js";
|
|
5
|
+
import { l as webpackPlugin } from "./index-pvEoqPl0.js";
|
|
5
6
|
export { webpackPlugin as default };
|
package/webpack.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import "./common-
|
|
2
|
-
import "./babel-
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./common-DAlNUXzt.js";
|
|
2
|
+
import "./babel-CAEdZVus.js";
|
|
3
|
+
import "./factory-BhxFJhLe.js";
|
|
4
|
+
import "./bun--yeG3v60.js";
|
|
5
|
+
import "./rolldown-browser-D2u-yWpA.js";
|
|
6
|
+
import { l as webpackPlugin } from "./src-CrU_oTgc.js";
|
|
5
7
|
|
|
6
8
|
//#region src/webpack.ts
|
|
7
9
|
var webpack_default = webpackPlugin;
|