chore: update node_modules with new binary files and dependencies

- Add new binary files for nodemon, onnxruntime-web, and xenova/transformers
- Update various JavaScript and TypeScript files in node_modules
- Remove unused files and dependencies
- Add new test fixtures and documentation files
This commit is contained in:
你的名字
2025-07-18 08:41:48 +08:00
parent db8c0adc79
commit 4c2f5c69a1
4655 changed files with 811329 additions and 35112 deletions

7
node_modules/onnxruntime-node/dist/backend.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import { Backend, InferenceSession, SessionHandler } from 'onnxruntime-common';
declare class OnnxruntimeBackend implements Backend {
init(): Promise<void>;
createSessionHandler(pathOrBuffer: string | Uint8Array, options?: InferenceSession.SessionOptions): Promise<SessionHandler>;
}
export declare const onnxruntimeBackend: OnnxruntimeBackend;
export {};

75
node_modules/onnxruntime-node/dist/backend.js generated vendored Normal file
View File

@@ -0,0 +1,75 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _OnnxruntimeSessionHandler_inferenceSession;
Object.defineProperty(exports, "__esModule", { value: true });
exports.onnxruntimeBackend = void 0;
const binding_1 = require("./binding");
class OnnxruntimeSessionHandler {
constructor(pathOrBuffer, options) {
_OnnxruntimeSessionHandler_inferenceSession.set(this, void 0);
__classPrivateFieldSet(this, _OnnxruntimeSessionHandler_inferenceSession, new binding_1.binding.InferenceSession(), "f");
if (typeof pathOrBuffer === 'string') {
__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options);
}
else {
__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer.buffer, pathOrBuffer.byteOffset, pathOrBuffer.byteLength, options);
}
this.inputNames = __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").inputNames;
this.outputNames = __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").outputNames;
}
async dispose() {
return Promise.resolve();
}
startProfiling() {
// TODO: implement profiling
}
endProfiling() {
// TODO: implement profiling
}
async run(feeds, fetches, options) {
return new Promise((resolve, reject) => {
process.nextTick(() => {
try {
resolve(__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").run(feeds, fetches, options));
}
catch (e) {
// reject if any error is thrown
reject(e);
}
});
});
}
}
_OnnxruntimeSessionHandler_inferenceSession = new WeakMap();
class OnnxruntimeBackend {
async init() {
return Promise.resolve();
}
async createSessionHandler(pathOrBuffer, options) {
return new Promise((resolve, reject) => {
process.nextTick(() => {
try {
resolve(new OnnxruntimeSessionHandler(pathOrBuffer, options || {}));
}
catch (e) {
// reject if any error is thrown
reject(e);
}
});
});
}
}
exports.onnxruntimeBackend = new OnnxruntimeBackend();
//# sourceMappingURL=backend.js.map

1
node_modules/onnxruntime-node/dist/backend.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../lib/backend.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;;;;;;;;;;;;;AAIlC,uCAA2C;AAE3C,MAAM,yBAAyB;IAG7B,YAAY,YAA+B,EAAE,OAAwC;QAFrF,8DAA4C;QAG1C,uBAAA,IAAI,+CAAqB,IAAI,iBAAO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AC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;gBACpB,IAAI;oBACF,OAAO,CAAC,IAAI,yBAAyB,CAAC,YAAY,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;iBACrE;gBAAC,OAAO,CAAC,EAAE;oBACV,gCAAgC;oBAChC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACX;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}

31
node_modules/onnxruntime-node/dist/binding.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import { InferenceSession, OnnxValue } from 'onnxruntime-common';
type SessionOptions = InferenceSession.SessionOptions;
type FeedsType = {
[name: string]: OnnxValue;
};
type FetchesType = {
[name: string]: OnnxValue | null;
};
type ReturnType = {
[name: string]: OnnxValue;
};
type RunOptions = InferenceSession.RunOptions;
/**
* Binding exports a simple synchronized inference session object wrap.
*/
export declare namespace Binding {
interface InferenceSession {
loadModel(modelPath: string, options: SessionOptions): void;
loadModel(buffer: ArrayBuffer, byteOffset: number, byteLength: number, options: SessionOptions): void;
readonly inputNames: string[];
readonly outputNames: string[];
run(feeds: FeedsType, fetches: FetchesType, options: RunOptions): ReturnType;
}
interface InferenceSessionConstructor {
new (): InferenceSession;
}
}
export declare const binding: {
InferenceSession: Binding.InferenceSessionConstructor;
};
export {};

10
node_modules/onnxruntime-node/dist/binding.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.binding = void 0;
// export native binding
exports.binding =
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
require(`../bin/napi-v3/${process.platform}/${process.arch}/onnxruntime_binding.node`);
//# sourceMappingURL=binding.js.map

1
node_modules/onnxruntime-node/dist/binding.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../lib/binding.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;AAoClC,wBAAwB;AACX,QAAA,OAAO;AAChB,qGAAqG;AACrG,OAAO,CAAC,kBAAkB,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,2BAA2B,CAE9B,CAAC"}

1
node_modules/onnxruntime-node/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from 'onnxruntime-common';

23
node_modules/onnxruntime-node/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("onnxruntime-common"), exports);
const onnxruntime_common_1 = require("onnxruntime-common");
const backend_1 = require("./backend");
(0, onnxruntime_common_1.registerBackend)('cpu', backend_1.onnxruntimeBackend, 100);
//# sourceMappingURL=index.js.map

1
node_modules/onnxruntime-node/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;;;;;;;;;;;;;;AAElC,qDAAmC;AACnC,2DAAmD;AACnD,uCAA6C;AAE7C,IAAA,oCAAe,EAAC,KAAK,EAAE,4BAAkB,EAAE,GAAG,CAAC,CAAC"}