chore: update frontend build for v1.1.82 [skip ci]

This commit is contained in:
github-actions[bot]
2025-08-06 02:27:53 +00:00
parent 2fd90c5620
commit f3787d775e
19300 changed files with 2 additions and 2351566 deletions

View File

@@ -1,5 +0,0 @@
import { LoaderContext } from '@rspack/core';
declare function load(this: LoaderContext, source: string, map: any): Promise<void>;
export { load as default };

View File

@@ -1,5 +0,0 @@
import { LoaderContext } from '@rspack/core';
declare function load(this: LoaderContext, source: string, map: any): Promise<void>;
export { load as default };

View File

@@ -1,128 +0,0 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/rspack/loaders/load.ts
var load_exports = {};
__export(load_exports, {
default: () => load
});
module.exports = __toCommonJS(load_exports);
// src/utils.ts
var import_path = require("path");
function normalizeAbsolutePath(path) {
if ((0, import_path.isAbsolute)(path))
return (0, import_path.normalize)(path);
else
return path;
}
// src/rspack/context.ts
var import_buffer = require("buffer");
var import_path2 = require("path");
var import_acorn = require("acorn");
function createBuildContext(compiler, compilation, loaderContext) {
return {
getNativeBuildContext() {
return {
framework: "rspack",
compiler,
compilation,
loaderContext
};
},
addWatchFile(file) {
compilation.fileDependencies.add((0, import_path2.resolve)(process.cwd(), file));
},
getWatchFiles() {
return Array.from(compilation.fileDependencies);
},
parse(code, opts = {}) {
return import_acorn.Parser.parse(code, {
sourceType: "module",
ecmaVersion: "latest",
locations: true,
...opts
});
},
emitFile(emittedFile) {
const outFileName = emittedFile.fileName || emittedFile.name;
if (emittedFile.source && outFileName) {
const { sources } = compilation.compiler.webpack;
compilation.emitAsset(
outFileName,
new sources.RawSource(
typeof emittedFile.source === "string" ? emittedFile.source : import_buffer.Buffer.from(emittedFile.source)
)
);
}
}
};
}
function createContext(loader) {
return {
error: (error) => loader.emitError(normalizeMessage(error)),
warn: (message) => loader.emitWarning(normalizeMessage(message))
};
}
function normalizeMessage(error) {
const err = new Error(typeof error === "string" ? error : error.message);
if (typeof error === "object") {
err.stack = error.stack;
err.cause = error.meta;
}
return err;
}
// src/rspack/utils.ts
var import_path3 = require("path");
function decodeVirtualModuleId(encoded, _plugin) {
return decodeURIComponent((0, import_path3.basename)(encoded));
}
function isVirtualModuleId(encoded, plugin) {
return (0, import_path3.dirname)(encoded) === plugin.__virtualModulePrefix;
}
// src/rspack/loaders/load.ts
async function load(source, map) {
var _a;
const callback = this.async();
const { unpluginName } = this.query;
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
let id = this.resource;
if (!(plugin == null ? void 0 : plugin.load) || !id)
return callback(null, source, map);
if (isVirtualModuleId(id, plugin))
id = decodeVirtualModuleId(id, plugin);
const context = createContext(this);
const res = await plugin.load.call(
Object.assign(
{},
this._compilation && createBuildContext(this._compiler, this._compilation, this),
context
),
normalizeAbsolutePath(id)
);
if (res == null)
callback(null, source, map);
else if (typeof res !== "string")
callback(null, res.code, res.map ?? map);
else
callback(null, res, map);
}

View File

@@ -1,105 +0,0 @@
// src/utils.ts
import { isAbsolute, normalize } from "path";
function normalizeAbsolutePath(path) {
if (isAbsolute(path))
return normalize(path);
else
return path;
}
// src/rspack/context.ts
import { Buffer } from "buffer";
import { resolve } from "path";
import { Parser } from "acorn";
function createBuildContext(compiler, compilation, loaderContext) {
return {
getNativeBuildContext() {
return {
framework: "rspack",
compiler,
compilation,
loaderContext
};
},
addWatchFile(file) {
compilation.fileDependencies.add(resolve(process.cwd(), file));
},
getWatchFiles() {
return Array.from(compilation.fileDependencies);
},
parse(code, opts = {}) {
return Parser.parse(code, {
sourceType: "module",
ecmaVersion: "latest",
locations: true,
...opts
});
},
emitFile(emittedFile) {
const outFileName = emittedFile.fileName || emittedFile.name;
if (emittedFile.source && outFileName) {
const { sources } = compilation.compiler.webpack;
compilation.emitAsset(
outFileName,
new sources.RawSource(
typeof emittedFile.source === "string" ? emittedFile.source : Buffer.from(emittedFile.source)
)
);
}
}
};
}
function createContext(loader) {
return {
error: (error) => loader.emitError(normalizeMessage(error)),
warn: (message) => loader.emitWarning(normalizeMessage(message))
};
}
function normalizeMessage(error) {
const err = new Error(typeof error === "string" ? error : error.message);
if (typeof error === "object") {
err.stack = error.stack;
err.cause = error.meta;
}
return err;
}
// src/rspack/utils.ts
import { basename, dirname, resolve as resolve2 } from "path";
function decodeVirtualModuleId(encoded, _plugin) {
return decodeURIComponent(basename(encoded));
}
function isVirtualModuleId(encoded, plugin) {
return dirname(encoded) === plugin.__virtualModulePrefix;
}
// src/rspack/loaders/load.ts
async function load(source, map) {
var _a;
const callback = this.async();
const { unpluginName } = this.query;
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
let id = this.resource;
if (!(plugin == null ? void 0 : plugin.load) || !id)
return callback(null, source, map);
if (isVirtualModuleId(id, plugin))
id = decodeVirtualModuleId(id, plugin);
const context = createContext(this);
const res = await plugin.load.call(
Object.assign(
{},
this._compilation && createBuildContext(this._compiler, this._compilation, this),
context
),
normalizeAbsolutePath(id)
);
if (res == null)
callback(null, source, map);
else if (typeof res !== "string")
callback(null, res.code, res.map ?? map);
else
callback(null, res, map);
}
export {
load as default
};

View File

@@ -1,5 +0,0 @@
import { LoaderContext } from '@rspack/core';
declare function transform(this: LoaderContext, source: string, map: any): Promise<void>;
export { transform as default };

View File

@@ -1,5 +0,0 @@
import { LoaderContext } from '@rspack/core';
declare function transform(this: LoaderContext, source: string, map: any): Promise<void>;
export { transform as default };

View File

@@ -1,114 +0,0 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/rspack/loaders/transform.ts
var transform_exports = {};
__export(transform_exports, {
default: () => transform
});
module.exports = __toCommonJS(transform_exports);
// src/rspack/context.ts
var import_buffer = require("buffer");
var import_path = require("path");
var import_acorn = require("acorn");
function createBuildContext(compiler, compilation, loaderContext) {
return {
getNativeBuildContext() {
return {
framework: "rspack",
compiler,
compilation,
loaderContext
};
},
addWatchFile(file) {
compilation.fileDependencies.add((0, import_path.resolve)(process.cwd(), file));
},
getWatchFiles() {
return Array.from(compilation.fileDependencies);
},
parse(code, opts = {}) {
return import_acorn.Parser.parse(code, {
sourceType: "module",
ecmaVersion: "latest",
locations: true,
...opts
});
},
emitFile(emittedFile) {
const outFileName = emittedFile.fileName || emittedFile.name;
if (emittedFile.source && outFileName) {
const { sources } = compilation.compiler.webpack;
compilation.emitAsset(
outFileName,
new sources.RawSource(
typeof emittedFile.source === "string" ? emittedFile.source : import_buffer.Buffer.from(emittedFile.source)
)
);
}
}
};
}
function createContext(loader) {
return {
error: (error) => loader.emitError(normalizeMessage(error)),
warn: (message) => loader.emitWarning(normalizeMessage(message))
};
}
function normalizeMessage(error) {
const err = new Error(typeof error === "string" ? error : error.message);
if (typeof error === "object") {
err.stack = error.stack;
err.cause = error.meta;
}
return err;
}
// src/rspack/loaders/transform.ts
async function transform(source, map) {
var _a;
const callback = this.async();
let unpluginName;
if (typeof this.query === "string") {
const query = new URLSearchParams(this.query);
unpluginName = query.get("unpluginName");
} else {
unpluginName = this.query.unpluginName;
}
const id = this.resource;
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
if (!(plugin == null ? void 0 : plugin.transform))
return callback(null, source, map);
const context = createContext(this);
const res = await plugin.transform.call(
Object.assign(
{},
this._compilation && createBuildContext(this._compiler, this._compilation, this),
context
),
source,
id
);
if (res == null)
callback(null, source, map);
else if (typeof res !== "string")
callback(null, res.code, map == null ? map : res.map || map);
else callback(null, res, map);
}

View File

@@ -1,91 +0,0 @@
// src/rspack/context.ts
import { Buffer } from "buffer";
import { resolve } from "path";
import { Parser } from "acorn";
function createBuildContext(compiler, compilation, loaderContext) {
return {
getNativeBuildContext() {
return {
framework: "rspack",
compiler,
compilation,
loaderContext
};
},
addWatchFile(file) {
compilation.fileDependencies.add(resolve(process.cwd(), file));
},
getWatchFiles() {
return Array.from(compilation.fileDependencies);
},
parse(code, opts = {}) {
return Parser.parse(code, {
sourceType: "module",
ecmaVersion: "latest",
locations: true,
...opts
});
},
emitFile(emittedFile) {
const outFileName = emittedFile.fileName || emittedFile.name;
if (emittedFile.source && outFileName) {
const { sources } = compilation.compiler.webpack;
compilation.emitAsset(
outFileName,
new sources.RawSource(
typeof emittedFile.source === "string" ? emittedFile.source : Buffer.from(emittedFile.source)
)
);
}
}
};
}
function createContext(loader) {
return {
error: (error) => loader.emitError(normalizeMessage(error)),
warn: (message) => loader.emitWarning(normalizeMessage(message))
};
}
function normalizeMessage(error) {
const err = new Error(typeof error === "string" ? error : error.message);
if (typeof error === "object") {
err.stack = error.stack;
err.cause = error.meta;
}
return err;
}
// src/rspack/loaders/transform.ts
async function transform(source, map) {
var _a;
const callback = this.async();
let unpluginName;
if (typeof this.query === "string") {
const query = new URLSearchParams(this.query);
unpluginName = query.get("unpluginName");
} else {
unpluginName = this.query.unpluginName;
}
const id = this.resource;
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
if (!(plugin == null ? void 0 : plugin.transform))
return callback(null, source, map);
const context = createContext(this);
const res = await plugin.transform.call(
Object.assign(
{},
this._compilation && createBuildContext(this._compiler, this._compilation, this),
context
),
source,
id
);
if (res == null)
callback(null, source, map);
else if (typeof res !== "string")
callback(null, res.code, map == null ? map : res.map || map);
else callback(null, res, map);
}
export {
transform as default
};