wesl-plugin 0.6.71 → 0.6.73
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/README.md +1 -1
- package/dist/{StaticExtension-Q8HMuFJa.mjs → StaticExtension-CDqA2teq.mjs} +1 -10
- package/dist/{WeslPlugin-CajtfXHH.mjs → WeslPlugin-B91dE_tA.mjs} +13 -31
- package/dist/{WeslPluginOptions-kd-CXSl9.d.mts → WeslPluginOptions-D81oyynl.d.mts} +1 -1
- package/dist/pluginIndex.d.mts +1 -1
- package/dist/pluginIndex.mjs +2 -4
- package/dist/plugins/astro.d.mts +1 -1
- package/dist/plugins/astro.mjs +3 -5
- package/dist/plugins/esbuild.d.mts +1 -1
- package/dist/plugins/esbuild.mjs +3 -5
- package/dist/plugins/farm.d.mts +1 -4
- package/dist/plugins/farm.mjs +3 -5
- package/dist/plugins/nuxt.d.mts +1 -1
- package/dist/plugins/nuxt.mjs +3 -5
- package/dist/plugins/rollup.d.mts +1 -1
- package/dist/plugins/rollup.mjs +3 -5
- package/dist/plugins/rspack.d.mts +1 -1
- package/dist/plugins/rspack.mjs +3 -5
- package/dist/plugins/vite.d.mts +1 -1
- package/dist/plugins/vite.mjs +3 -5
- package/dist/plugins/webpack.d.mts +1 -1
- package/dist/plugins/webpack.mjs +3 -5
- package/package.json +4 -7
- package/src/PluginApi.ts +8 -4
- package/src/plugins/farm.ts +2 -1
- /package/dist/{PluginExtension-CHxUB0-8.d.mts → PluginExtension-DTjKL6rt.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -132,4 +132,4 @@ const myExtension: PluginExtension = {
|
|
|
132
132
|
};
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
See [PluginExtension.ts](https://github.com/wgsl-tooling-wg/wesl-js/blob/main/
|
|
135
|
+
See [PluginExtension.ts](https://github.com/wgsl-tooling-wg/wesl-js/blob/main/packages/wesl-plugin/src/PluginExtension.ts) for the full API.
|
|
@@ -7,7 +7,6 @@ import fs, { realpathSync, statSync } from "node:fs";
|
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import v8 from "node:v8";
|
|
9
9
|
import { format, inspect } from "node:util";
|
|
10
|
-
|
|
11
10
|
//#region src/extensions/LinkExtension.ts
|
|
12
11
|
const linkBuildExtension = {
|
|
13
12
|
extensionName: "link",
|
|
@@ -38,7 +37,6 @@ async function emitLinkJs(baseId, api, _conditions, options) {
|
|
|
38
37
|
function serializeFields(record) {
|
|
39
38
|
return Object.entries(record).map(([k, v]) => ` ${k}: ${JSON.stringify(v, null, 2)}`).join(",\n");
|
|
40
39
|
}
|
|
41
|
-
|
|
42
40
|
//#endregion
|
|
43
41
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/errors.js
|
|
44
42
|
/**
|
|
@@ -375,7 +373,6 @@ function determineSpecificType(value) {
|
|
|
375
373
|
if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`;
|
|
376
374
|
return `type ${typeof value} (${inspected})`;
|
|
377
375
|
}
|
|
378
|
-
|
|
379
376
|
//#endregion
|
|
380
377
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/package-json-reader.js
|
|
381
378
|
/**
|
|
@@ -471,7 +468,6 @@ function getPackageScopeConfig(resolved) {
|
|
|
471
468
|
function getPackageType(url) {
|
|
472
469
|
return getPackageScopeConfig(url).type;
|
|
473
470
|
}
|
|
474
|
-
|
|
475
471
|
//#endregion
|
|
476
472
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/get-format.js
|
|
477
473
|
const { ERR_UNKNOWN_FILE_EXTENSION } = codes;
|
|
@@ -575,7 +571,6 @@ function defaultGetFormatWithoutErrors(url, context) {
|
|
|
575
571
|
if (!hasOwnProperty.call(protocolHandlers, protocol)) return null;
|
|
576
572
|
return protocolHandlers[protocol](url, context, true) || null;
|
|
577
573
|
}
|
|
578
|
-
|
|
579
574
|
//#endregion
|
|
580
575
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/utils.js
|
|
581
576
|
const { ERR_INVALID_ARG_VALUE } = codes;
|
|
@@ -604,7 +599,6 @@ function getConditionsSet(conditions) {
|
|
|
604
599
|
}
|
|
605
600
|
return getDefaultConditionsSet();
|
|
606
601
|
}
|
|
607
|
-
|
|
608
602
|
//#endregion
|
|
609
603
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/resolve.js
|
|
610
604
|
/**
|
|
@@ -1264,7 +1258,6 @@ function defaultResolve(specifier, context = {}) {
|
|
|
1264
1258
|
format: defaultGetFormatWithoutErrors(url, { parentURL })
|
|
1265
1259
|
};
|
|
1266
1260
|
}
|
|
1267
|
-
|
|
1268
1261
|
//#endregion
|
|
1269
1262
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/index.js
|
|
1270
1263
|
/**
|
|
@@ -1295,7 +1288,6 @@ function resolve(specifier, parent) {
|
|
|
1295
1288
|
throw error;
|
|
1296
1289
|
}
|
|
1297
1290
|
}
|
|
1298
|
-
|
|
1299
1291
|
//#endregion
|
|
1300
1292
|
//#region src/extensions/StaticExtension.ts
|
|
1301
1293
|
/** Build extension for ?static imports: links WESL at build time, emits WGSL string. */
|
|
@@ -1323,6 +1315,5 @@ async function emitStaticJs(baseId, api, conditions, _options) {
|
|
|
1323
1315
|
export default wgsl;
|
|
1324
1316
|
`;
|
|
1325
1317
|
}
|
|
1326
|
-
|
|
1327
1318
|
//#endregion
|
|
1328
|
-
export { resolve as n, linkBuildExtension as r, staticBuildExtension as t };
|
|
1319
|
+
export { resolve as n, linkBuildExtension as r, staticBuildExtension as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as resolve, r as linkBuildExtension, t as staticBuildExtension } from "./StaticExtension-
|
|
1
|
+
import { n as resolve, r as linkBuildExtension, t as staticBuildExtension } from "./StaticExtension-CDqA2teq.mjs";
|
|
2
2
|
import path, { posix, win32 } from "node:path";
|
|
3
|
-
import { RecordResolver, WeslParseError, discoverModules, fileToModulePath, filterMap, findUnboundIdents, npmNameVariations } from "wesl";
|
|
3
|
+
import { RecordResolver, WeslParseError, discoverModules, fileToModulePath, filterMap, findUnboundIdents, freshResolver, npmNameVariations } from "wesl";
|
|
4
4
|
import fs, { lstat, readdir, readlink, realpath } from "node:fs/promises";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import * as xi from "node:fs";
|
|
@@ -9,7 +9,6 @@ import { lstatSync, readdir as readdir$1, readdirSync, readlinkSync, realpathSyn
|
|
|
9
9
|
import { EventEmitter } from "node:events";
|
|
10
10
|
import Pe from "node:stream";
|
|
11
11
|
import { StringDecoder } from "node:string_decoder";
|
|
12
|
-
|
|
13
12
|
//#region \0rolldown/runtime.js
|
|
14
13
|
var __create = Object.create;
|
|
15
14
|
var __defProp = Object.defineProperty;
|
|
@@ -19,16 +18,12 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
19
18
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
19
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
21
20
|
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
+
key = keys[i];
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
+
get: ((k) => from[k]).bind(null, key),
|
|
25
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
+
});
|
|
32
27
|
}
|
|
33
28
|
return to;
|
|
34
29
|
};
|
|
@@ -36,7 +31,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
31
|
value: mod,
|
|
37
32
|
enumerable: true
|
|
38
33
|
}) : target, mod));
|
|
39
|
-
|
|
40
34
|
//#endregion
|
|
41
35
|
//#region ../../node_modules/.pnpm/glob@13.0.6/node_modules/glob/dist/esm/index.min.js
|
|
42
36
|
var Gt = (n, t, e) => {
|
|
@@ -3153,7 +3147,6 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
3153
3147
|
unescape: W
|
|
3154
3148
|
});
|
|
3155
3149
|
Ze.glob = Ze;
|
|
3156
|
-
|
|
3157
3150
|
//#endregion
|
|
3158
3151
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js
|
|
3159
3152
|
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -6792,7 +6785,6 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6792
6785
|
};
|
|
6793
6786
|
})();
|
|
6794
6787
|
}));
|
|
6795
|
-
|
|
6796
6788
|
//#endregion
|
|
6797
6789
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/compiler.js
|
|
6798
6790
|
var require_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -6920,21 +6912,16 @@ var require_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6920
6912
|
}
|
|
6921
6913
|
module.exports = { compile };
|
|
6922
6914
|
}));
|
|
6923
|
-
|
|
6924
6915
|
//#endregion
|
|
6925
|
-
//#region
|
|
6926
|
-
var
|
|
6916
|
+
//#region ../wesl-tooling/src/LoadWeslToml.ts
|
|
6917
|
+
var import_toml = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6927
6918
|
var parser = require_parser();
|
|
6928
6919
|
var compiler = require_compiler();
|
|
6929
6920
|
module.exports = { parse: function(input) {
|
|
6930
6921
|
var nodes = parser.parse(input.toString());
|
|
6931
6922
|
return compiler.compile(nodes);
|
|
6932
6923
|
} };
|
|
6933
|
-
}));
|
|
6934
|
-
|
|
6935
|
-
//#endregion
|
|
6936
|
-
//#region ../wesl-tooling/src/LoadWeslToml.ts
|
|
6937
|
-
var import_toml = /* @__PURE__ */ __toESM(require_toml(), 1);
|
|
6924
|
+
})))(), 1);
|
|
6938
6925
|
/** Default configuration when no wesl.toml is found */
|
|
6939
6926
|
const defaultWeslToml = {
|
|
6940
6927
|
edition: "unstable_2025",
|
|
@@ -6989,7 +6976,6 @@ async function findWeslToml(projectDir, specifiedToml) {
|
|
|
6989
6976
|
toml: parsedToml
|
|
6990
6977
|
};
|
|
6991
6978
|
}
|
|
6992
|
-
|
|
6993
6979
|
//#endregion
|
|
6994
6980
|
//#region ../wesl-tooling/src/NpmResolver.ts
|
|
6995
6981
|
/** Find longest resolvable npm subpath from WESL module path segments.
|
|
@@ -7032,7 +7018,6 @@ function* exportSubpaths(mPath) {
|
|
|
7032
7018
|
const longest = mPath.length - 1;
|
|
7033
7019
|
for (let i = longest; i >= 0; i--) yield mPath.slice(0, i).join("/");
|
|
7034
7020
|
}
|
|
7035
|
-
|
|
7036
7021
|
//#endregion
|
|
7037
7022
|
//#region ../wesl-tooling/src/ParseDependencies.ts
|
|
7038
7023
|
/**
|
|
@@ -7080,7 +7065,6 @@ function projectDirURL(projectDir) {
|
|
|
7080
7065
|
const fileUrl = pathToFileURL(projectDir).href;
|
|
7081
7066
|
return fileUrl.endsWith("/") ? fileUrl : `${fileUrl}/`;
|
|
7082
7067
|
}
|
|
7083
|
-
|
|
7084
7068
|
//#endregion
|
|
7085
7069
|
//#region src/PluginApi.ts
|
|
7086
7070
|
/** Construct the API surface available to plugin extensions. */
|
|
@@ -7101,7 +7085,7 @@ function buildApi(context, unpluginCtx) {
|
|
|
7101
7085
|
async function getScopedProject(rootModuleName, context, unpluginCtx) {
|
|
7102
7086
|
const fullSrc = await loadWesl(context, unpluginCtx);
|
|
7103
7087
|
const { toml, tomlDir: projectDir } = await getWeslToml(context, unpluginCtx);
|
|
7104
|
-
const { weslSrc, unbound } = discoverModules(fullSrc,
|
|
7088
|
+
const { weslSrc, unbound } = discoverModules(fullSrc, freshResolver(await getRegistry(context, unpluginCtx)), fileToModulePath(rootModuleName, "package", false));
|
|
7105
7089
|
return {
|
|
7106
7090
|
weslSrc,
|
|
7107
7091
|
dependencies: resolveDepsFromUnbound(toml.dependencies, unbound, projectDir)
|
|
@@ -7208,7 +7192,6 @@ async function loadFiles(files, weslRoot) {
|
|
|
7208
7192
|
function toUnixPath(p) {
|
|
7209
7193
|
return path.sep !== "/" ? p.replaceAll(path.sep, "/") : p;
|
|
7210
7194
|
}
|
|
7211
|
-
|
|
7212
7195
|
//#endregion
|
|
7213
7196
|
//#region src/WeslPlugin.ts
|
|
7214
7197
|
const builtinExtensions = [staticBuildExtension, linkBuildExtension];
|
|
@@ -7339,6 +7322,5 @@ function debugLog(msg, data) {
|
|
|
7339
7322
|
}
|
|
7340
7323
|
function noopLog() {}
|
|
7341
7324
|
const unplugin = createUnplugin(weslPlugin);
|
|
7342
|
-
|
|
7343
7325
|
//#endregion
|
|
7344
|
-
export { weslPlugin as n, unplugin as t };
|
|
7326
|
+
export { weslPlugin as n, unplugin as t };
|
package/dist/pluginIndex.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ProjectSources, n as PluginExtension, r as PluginExtensionApi, t as ExtensionEmitFn } from "./PluginExtension-
|
|
1
|
+
import { i as ProjectSources, n as PluginExtension, r as PluginExtensionApi, t as ExtensionEmitFn } from "./PluginExtension-DTjKL6rt.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/extensions/LinkExtension.d.ts
|
|
4
4
|
declare const linkBuildExtension: PluginExtension;
|
package/dist/pluginIndex.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { r as linkBuildExtension, t as staticBuildExtension } from "./StaticExtension-
|
|
1
|
+
import { r as linkBuildExtension, t as staticBuildExtension } from "./StaticExtension-CDqA2teq.mjs";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import { originalTypeName, weslStructs, wgslTypeToTs } from "wesl-reflect";
|
|
4
|
-
|
|
5
4
|
//#region src/extensions/ReflectExtension.ts
|
|
6
5
|
/** wesl-js build extension to reflect wgsl structs into js and .d.ts files. */
|
|
7
6
|
function simpleReflect(options = {}) {
|
|
@@ -27,6 +26,5 @@ async function writeTypes(structs, typesDir) {
|
|
|
27
26
|
await fs.mkdir(typesDir, { recursive: true });
|
|
28
27
|
await fs.writeFile(`${typesDir}/reflectTypes.d.ts`, tsdInterfaces.join("\n"));
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
|
-
export { linkBuildExtension, simpleReflect, staticBuildExtension };
|
|
30
|
+
export { linkBuildExtension, simpleReflect, staticBuildExtension };
|
package/dist/plugins/astro.d.mts
CHANGED
package/dist/plugins/astro.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as unplugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
3
|
-
|
|
1
|
+
import { t as unplugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
4
3
|
//#region src/plugins/astro.ts
|
|
5
4
|
var astro_default = (options) => ({
|
|
6
5
|
name: "wesl-plugin",
|
|
@@ -9,6 +8,5 @@ var astro_default = (options) => ({
|
|
|
9
8
|
astro.config.vite.plugins.push(unplugin.vite(options));
|
|
10
9
|
} }
|
|
11
10
|
});
|
|
12
|
-
|
|
13
11
|
//#endregion
|
|
14
|
-
export { astro_default as default };
|
|
12
|
+
export { astro_default as default };
|
package/dist/plugins/esbuild.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createEsbuildPlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/esbuild.ts
|
|
6
5
|
var esbuild_default = createEsbuildPlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { esbuild_default as default };
|
|
7
|
+
export { esbuild_default as default };
|
package/dist/plugins/farm.d.mts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-kd-CXSl9.mjs";
|
|
2
|
-
import * as _farmfe_core0 from "@farmfe/core";
|
|
3
|
-
|
|
4
1
|
//#region src/plugins/farm.d.ts
|
|
5
|
-
declare const _default:
|
|
2
|
+
declare const _default: any;
|
|
6
3
|
//#endregion
|
|
7
4
|
export { _default as default };
|
package/dist/plugins/farm.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createFarmPlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/farm.ts
|
|
6
5
|
var farm_default = createFarmPlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { farm_default as default };
|
|
7
|
+
export { farm_default as default };
|
package/dist/plugins/nuxt.d.mts
CHANGED
package/dist/plugins/nuxt.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import vite_default from "./vite.mjs";
|
|
4
4
|
import webpack_default from "./webpack.mjs";
|
|
5
5
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
6
6
|
import "@nuxt/schema";
|
|
7
|
-
|
|
8
7
|
//#region src/plugins/nuxt.ts
|
|
9
8
|
var nuxt_default = defineNuxtModule({
|
|
10
9
|
meta: {
|
|
@@ -17,6 +16,5 @@ var nuxt_default = defineNuxtModule({
|
|
|
17
16
|
addWebpackPlugin(() => webpack_default(options));
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
|
-
export { nuxt_default as default };
|
|
20
|
+
export { nuxt_default as default };
|
package/dist/plugins/rollup.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createRollupPlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/rollup.ts
|
|
6
5
|
var rollup_default = createRollupPlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { rollup_default as default };
|
|
7
|
+
export { rollup_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-D81oyynl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/rspack.d.ts
|
|
4
4
|
declare const _default: (options?: WeslPluginOptions | undefined) => RspackPluginInstance;
|
package/dist/plugins/rspack.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createRspackPlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/rspack.ts
|
|
6
5
|
var rspack_default = createRspackPlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { rspack_default as default };
|
|
7
|
+
export { rspack_default as default };
|
package/dist/plugins/vite.d.mts
CHANGED
package/dist/plugins/vite.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createVitePlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/vite.ts
|
|
6
5
|
var vite_default = createVitePlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { vite_default as default };
|
|
7
|
+
export { vite_default as default };
|
package/dist/plugins/webpack.mjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-
|
|
2
|
-
import "../StaticExtension-
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-B91dE_tA.mjs";
|
|
2
|
+
import "../StaticExtension-CDqA2teq.mjs";
|
|
3
3
|
import { createWebpackPlugin } from "unplugin";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/webpack.ts
|
|
6
5
|
var webpack_default = createWebpackPlugin(weslPlugin);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
export { webpack_default as default };
|
|
7
|
+
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wesl-plugin",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.73",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"unplugin": "^2.3.5",
|
|
28
|
-
"wesl": "0.7.
|
|
29
|
-
"wesl-reflect": "0.0.
|
|
28
|
+
"wesl": "0.7.25",
|
|
29
|
+
"wesl-reflect": "0.0.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@nuxt/kit": "^3.17.6",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"chalk": "^5.4.1",
|
|
36
36
|
"import-meta-resolve": "^4.1.0",
|
|
37
37
|
"nodemon": "^3.1.10",
|
|
38
|
+
"random_wgsl": "x",
|
|
38
39
|
"rollup": "^4.44.1",
|
|
39
40
|
"toml": "^3.0.0",
|
|
40
41
|
"webpack": "^5.99.9",
|
|
41
42
|
"wesl-tooling": "x"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"@farmfe/core": ">=1",
|
|
45
45
|
"@nuxt/kit": "^3",
|
|
46
46
|
"@nuxt/schema": "^3",
|
|
47
47
|
"esbuild": "*",
|
|
@@ -50,9 +50,6 @@
|
|
|
50
50
|
"webpack": "^4 || ^5"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
|
-
"@farmfe/core": {
|
|
54
|
-
"optional": true
|
|
55
|
-
},
|
|
56
53
|
"@nuxt/kit": {
|
|
57
54
|
"optional": true
|
|
58
55
|
},
|
package/src/PluginApi.ts
CHANGED
|
@@ -2,7 +2,12 @@ import fs from "node:fs/promises";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { glob } from "glob";
|
|
4
4
|
import type { UnpluginBuildContext, UnpluginContext } from "unplugin";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
discoverModules,
|
|
7
|
+
fileToModulePath,
|
|
8
|
+
freshResolver,
|
|
9
|
+
RecordResolver,
|
|
10
|
+
} from "wesl";
|
|
6
11
|
import {
|
|
7
12
|
findWeslToml,
|
|
8
13
|
parseDependencies,
|
|
@@ -41,9 +46,8 @@ async function getScopedProject(
|
|
|
41
46
|
const fullSrc = await loadWesl(context, unpluginCtx);
|
|
42
47
|
const { toml, tomlDir: projectDir } = await getWeslToml(context, unpluginCtx);
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const resolver = new RecordResolver(fullSrc);
|
|
49
|
+
const registry = await getRegistry(context, unpluginCtx);
|
|
50
|
+
const resolver = freshResolver(registry);
|
|
47
51
|
const modulePath = fileToModulePath(rootModuleName, "package", false);
|
|
48
52
|
const { weslSrc, unbound } = discoverModules(fullSrc, resolver, modulePath);
|
|
49
53
|
const dependencies = resolveDepsFromUnbound(
|
package/src/plugins/farm.ts
CHANGED
|
File without changes
|