onnxruntime-node 1.20.0-dev.20241022-2d00351d7b → 1.20.1
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/bin/napi-v3/darwin/arm64/{libonnxruntime.1.20.0.dylib → libonnxruntime.1.20.1.dylib} +0 -0
- package/bin/napi-v3/darwin/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/darwin/x64/{libonnxruntime.1.20.0.dylib → libonnxruntime.1.20.1.dylib} +0 -0
- package/bin/napi-v3/darwin/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/arm64/libonnxruntime.so.1 +0 -0
- package/bin/napi-v3/linux/arm64/{libonnxruntime.so.1.20.0 → libonnxruntime.so.1.20.1} +0 -0
- package/bin/napi-v3/linux/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/linux/x64/libonnxruntime.so.1 +0 -0
- package/bin/napi-v3/linux/x64/{libonnxruntime.so.1.20.0 → libonnxruntime.so.1.20.1} +0 -0
- package/bin/napi-v3/linux/x64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/arm64/onnxruntime_binding.node +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime.dll +0 -0
- package/bin/napi-v3/win32/x64/onnxruntime_binding.node +0 -0
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/lib/version.ts +1 -1
- package/package.json +2 -2
- package/script/build.js +67 -90
- package/script/prepack.js +32 -49
- package/__commit.txt +0 -1
package/bin/napi-v3/darwin/arm64/{libonnxruntime.1.20.0.dylib → libonnxruntime.1.20.1.dylib}
RENAMED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/version.js
CHANGED
|
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.version = void 0;
|
|
6
6
|
// This file is generated by /js/scripts/update-version.ts
|
|
7
7
|
// Do not modify file content manually.
|
|
8
|
-
exports.version = '1.20.
|
|
8
|
+
exports.version = '1.20.1';
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../lib/version.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;AAElC,0DAA0D;AAC1D,uCAAuC;AAE1B,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../lib/version.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;AAElC,0DAA0D;AAC1D,uCAAuC;AAE1B,QAAA,OAAO,GAAG,QAAQ,CAAC"}
|
package/lib/version.ts
CHANGED
package/package.json
CHANGED
package/script/build.js
CHANGED
|
@@ -1,68 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
|
-
var __createBinding =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
});
|
|
24
|
-
var __setModuleDefault =
|
|
25
|
-
(this && this.__setModuleDefault) ||
|
|
26
|
-
(Object.create
|
|
27
|
-
? function (o, v) {
|
|
28
|
-
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
29
|
-
}
|
|
30
|
-
: function (o, v) {
|
|
31
|
-
o['default'] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar =
|
|
34
|
-
(this && this.__importStar) ||
|
|
35
|
-
function (mod) {
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
36
21
|
if (mod && mod.__esModule) return mod;
|
|
37
22
|
var result = {};
|
|
38
|
-
if (mod != null)
|
|
39
|
-
for (var k in mod)
|
|
40
|
-
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
41
24
|
__setModuleDefault(result, mod);
|
|
42
25
|
return result;
|
|
43
|
-
|
|
44
|
-
var __importDefault =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const os = __importStar(require('os'));
|
|
54
|
-
const path = __importStar(require('path'));
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
const child_process_1 = require("child_process");
|
|
32
|
+
const fs = __importStar(require("fs-extra"));
|
|
33
|
+
const minimist_1 = __importDefault(require("minimist"));
|
|
34
|
+
const os = __importStar(require("os"));
|
|
35
|
+
const path = __importStar(require("path"));
|
|
55
36
|
// command line flags
|
|
56
37
|
const buildArgs = (0, minimist_1.default)(process.argv.slice(2));
|
|
57
38
|
// --config=Debug|Release|RelWithDebInfo
|
|
58
39
|
const CONFIG = buildArgs.config || (os.platform() === 'win32' ? 'RelWithDebInfo' : 'Release');
|
|
59
40
|
if (CONFIG !== 'Debug' && CONFIG !== 'Release' && CONFIG !== 'RelWithDebInfo') {
|
|
60
|
-
|
|
41
|
+
throw new Error(`unrecognized config: ${CONFIG}`);
|
|
61
42
|
}
|
|
62
43
|
// --arch=x64|ia32|arm64|arm
|
|
63
44
|
const ARCH = buildArgs.arch || os.arch();
|
|
64
45
|
if (ARCH !== 'x64' && ARCH !== 'ia32' && ARCH !== 'arm64' && ARCH !== 'arm') {
|
|
65
|
-
|
|
46
|
+
throw new Error(`unrecognized architecture: ${ARCH}`);
|
|
66
47
|
}
|
|
67
48
|
// --onnxruntime-build-dir=
|
|
68
49
|
const ONNXRUNTIME_BUILD_DIR = buildArgs['onnxruntime-build-dir'];
|
|
@@ -86,76 +67,72 @@ const BIN_FOLDER = path.join(ROOT_FOLDER, 'bin');
|
|
|
86
67
|
const BUILD_FOLDER = path.join(ROOT_FOLDER, 'build');
|
|
87
68
|
// if rebuild, clean up the dist folders
|
|
88
69
|
if (REBUILD) {
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
fs.removeSync(BIN_FOLDER);
|
|
71
|
+
fs.removeSync(BUILD_FOLDER);
|
|
91
72
|
}
|
|
92
73
|
const args = [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
74
|
+
'cmake-js',
|
|
75
|
+
REBUILD ? 'reconfigure' : 'configure',
|
|
76
|
+
`--arch=${ARCH}`,
|
|
77
|
+
'--CDnapi_build_version=6',
|
|
78
|
+
`--CDCMAKE_BUILD_TYPE=${CONFIG}`,
|
|
98
79
|
];
|
|
99
80
|
if (ONNXRUNTIME_BUILD_DIR && typeof ONNXRUNTIME_BUILD_DIR === 'string') {
|
|
100
|
-
|
|
81
|
+
args.push(`--CDONNXRUNTIME_BUILD_DIR=${ONNXRUNTIME_BUILD_DIR}`);
|
|
101
82
|
}
|
|
102
83
|
if (ONNXRUNTIME_GENERATOR && typeof ONNXRUNTIME_GENERATOR === 'string') {
|
|
103
|
-
|
|
84
|
+
args.push(`--CDONNXRUNTIME_GENERATOR=${ONNXRUNTIME_GENERATOR}`);
|
|
104
85
|
}
|
|
105
86
|
if (USE_DML) {
|
|
106
|
-
|
|
87
|
+
args.push('--CDUSE_DML=ON');
|
|
107
88
|
}
|
|
108
89
|
if (USE_CUDA) {
|
|
109
|
-
|
|
90
|
+
args.push('--CDUSE_CUDA=ON');
|
|
110
91
|
}
|
|
111
92
|
if (USE_TENSORRT) {
|
|
112
|
-
|
|
93
|
+
args.push('--CDUSE_TENSORRT=ON');
|
|
113
94
|
}
|
|
114
95
|
if (USE_COREML) {
|
|
115
|
-
|
|
96
|
+
args.push('--CDUSE_COREML=ON');
|
|
116
97
|
}
|
|
117
98
|
if (USE_QNN) {
|
|
118
|
-
|
|
99
|
+
args.push('--CDUSE_QNN=ON');
|
|
119
100
|
}
|
|
120
101
|
// set CMAKE_OSX_ARCHITECTURES for macOS build
|
|
121
102
|
if (os.platform() === 'darwin') {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
103
|
+
if (ARCH === 'x64') {
|
|
104
|
+
args.push('--CDCMAKE_OSX_ARCHITECTURES=x86_64');
|
|
105
|
+
}
|
|
106
|
+
else if (ARCH === 'arm64') {
|
|
107
|
+
args.push('--CDCMAKE_OSX_ARCHITECTURES=arm64');
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
throw new Error(`architecture not supported for macOS build: ${ARCH}`);
|
|
111
|
+
}
|
|
129
112
|
}
|
|
130
113
|
// In Windows, "npx cmake-js configure" uses a powershell script to detect the Visual Studio installation.
|
|
131
114
|
// The script uses the environment variable LIB. If an invalid path is specified in LIB, the script will fail.
|
|
132
115
|
// So we override the LIB environment variable to remove invalid paths.
|
|
133
|
-
const envOverride =
|
|
134
|
-
os.platform() === 'win32' && process.env.LIB
|
|
116
|
+
const envOverride = os.platform() === 'win32' && process.env.LIB
|
|
135
117
|
? { ...process.env, LIB: process.env.LIB.split(';').filter(fs.existsSync).join(';') }
|
|
136
118
|
: process.env;
|
|
137
119
|
// launch cmake-js configure
|
|
138
|
-
const procCmakejs = (0, child_process_1.spawnSync)('npx', args, {
|
|
139
|
-
shell: true,
|
|
140
|
-
stdio: 'inherit',
|
|
141
|
-
cwd: ROOT_FOLDER,
|
|
142
|
-
env: envOverride,
|
|
143
|
-
});
|
|
120
|
+
const procCmakejs = (0, child_process_1.spawnSync)('npx', args, { shell: true, stdio: 'inherit', cwd: ROOT_FOLDER, env: envOverride });
|
|
144
121
|
if (procCmakejs.status !== 0) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
122
|
+
if (procCmakejs.error) {
|
|
123
|
+
console.error(procCmakejs.error);
|
|
124
|
+
}
|
|
125
|
+
process.exit(procCmakejs.status === null ? undefined : procCmakejs.status);
|
|
149
126
|
}
|
|
150
127
|
// launch cmake to build
|
|
151
128
|
const procCmake = (0, child_process_1.spawnSync)('cmake', ['--build', '.', '--config', CONFIG], {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
129
|
+
shell: true,
|
|
130
|
+
stdio: 'inherit',
|
|
131
|
+
cwd: BUILD_FOLDER,
|
|
155
132
|
});
|
|
156
133
|
if (procCmake.status !== 0) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
134
|
+
if (procCmake.error) {
|
|
135
|
+
console.error(procCmake.error);
|
|
136
|
+
}
|
|
137
|
+
process.exit(procCmake.status === null ? undefined : procCmake.status);
|
|
161
138
|
}
|
package/script/prepack.js
CHANGED
|
@@ -1,59 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
|
-
var __createBinding =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
});
|
|
24
|
-
var __setModuleDefault =
|
|
25
|
-
(this && this.__setModuleDefault) ||
|
|
26
|
-
(Object.create
|
|
27
|
-
? function (o, v) {
|
|
28
|
-
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
29
|
-
}
|
|
30
|
-
: function (o, v) {
|
|
31
|
-
o['default'] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar =
|
|
34
|
-
(this && this.__importStar) ||
|
|
35
|
-
function (mod) {
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
36
21
|
if (mod && mod.__esModule) return mod;
|
|
37
22
|
var result = {};
|
|
38
|
-
if (mod != null)
|
|
39
|
-
for (var k in mod)
|
|
40
|
-
if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
41
24
|
__setModuleDefault(result, mod);
|
|
42
25
|
return result;
|
|
43
|
-
|
|
44
|
-
Object.defineProperty(exports,
|
|
45
|
-
const fs = __importStar(require(
|
|
46
|
-
const path = __importStar(require(
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
const fs = __importStar(require("fs-extra"));
|
|
29
|
+
const path = __importStar(require("path"));
|
|
47
30
|
function updatePackageJson() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
31
|
+
const commonPackageJsonPath = path.join(__dirname, '..', '..', 'common', 'package.json');
|
|
32
|
+
const selfPackageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
33
|
+
console.log(`=== start to update package.json: ${selfPackageJsonPath}`);
|
|
34
|
+
const packageCommon = fs.readJSONSync(commonPackageJsonPath);
|
|
35
|
+
const packageSelf = fs.readJSONSync(selfPackageJsonPath);
|
|
36
|
+
const version = packageCommon.version;
|
|
37
|
+
packageSelf.dependencies['onnxruntime-common'] = `${version}`;
|
|
38
|
+
fs.writeJSONSync(selfPackageJsonPath, packageSelf, { spaces: 2 });
|
|
39
|
+
console.log('=== finished updating package.json.');
|
|
57
40
|
}
|
|
58
41
|
// update version of dependency "onnxruntime-common" before packing
|
|
59
42
|
updatePackageJson();
|
package/__commit.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2d00351d7b4975a4d03f6a437772b6976726a252
|