@yao-pkg/pkg 6.9.0 → 6.10.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/lib-es5/sea.js +1 -2
- package/package.json +2 -2
- package/prelude/bootstrap.js +2 -11
package/lib-es5/sea.js
CHANGED
|
@@ -213,8 +213,7 @@ async function bake(nodePath, target, blobPath) {
|
|
|
213
213
|
const outPath = (0, path_1.resolve)(process.cwd(), target.output);
|
|
214
214
|
log_1.log.info(`Creating executable for ${target.nodeRange}-${target.platform}-${target.arch}....`);
|
|
215
215
|
if (!(await exists((0, path_1.dirname)(outPath)))) {
|
|
216
|
-
|
|
217
|
-
return;
|
|
216
|
+
await (0, promises_1.mkdir)((0, path_1.dirname)(outPath), { recursive: true });
|
|
218
217
|
}
|
|
219
218
|
// check if executable_path exists
|
|
220
219
|
if (await exists(outPath)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yao-pkg/pkg",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.1",
|
|
4
4
|
"description": "Package your Node.js project into an executable",
|
|
5
5
|
"main": "lib-es5/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@babel/generator": "^7.23.0",
|
|
26
26
|
"@babel/parser": "^7.23.0",
|
|
27
27
|
"@babel/types": "^7.23.0",
|
|
28
|
-
"@yao-pkg/pkg-fetch": "3.5.
|
|
28
|
+
"@yao-pkg/pkg-fetch": "3.5.30",
|
|
29
29
|
"into-stream": "^6.0.0",
|
|
30
30
|
"minimist": "^1.2.6",
|
|
31
31
|
"multistream": "^4.1.0",
|
package/prelude/bootstrap.js
CHANGED
|
@@ -185,9 +185,7 @@ function copyFolderRecursiveSync(source, target) {
|
|
|
185
185
|
const targetFolder = path.join(target, path.basename(source));
|
|
186
186
|
|
|
187
187
|
// Check if target folder needs to be created or integrated
|
|
188
|
-
|
|
189
|
-
fs.mkdirSync(targetFolder);
|
|
190
|
-
}
|
|
188
|
+
fs.mkdirSync(targetFolder, { recursive: true });
|
|
191
189
|
|
|
192
190
|
// Copy
|
|
193
191
|
if (fs.lstatSync(source).isDirectory()) {
|
|
@@ -249,13 +247,6 @@ function copyFolderRecursiveSync(source, target) {
|
|
|
249
247
|
}
|
|
250
248
|
}
|
|
251
249
|
|
|
252
|
-
function createDirRecursively(dir) {
|
|
253
|
-
if (!fs.existsSync(dir)) {
|
|
254
|
-
createDirRecursively(path.join(dir, '..'));
|
|
255
|
-
fs.mkdirSync(dir);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
250
|
/*
|
|
260
251
|
|
|
261
252
|
// TODO move to some test
|
|
@@ -2218,7 +2209,7 @@ function payloadFileSync(pointer) {
|
|
|
2218
2209
|
// Example: /home/john/.cache/pkg/<hash>
|
|
2219
2210
|
const tmpFolder = path.join(homedir(), '.cache/pkg', hash);
|
|
2220
2211
|
|
|
2221
|
-
|
|
2212
|
+
fs.mkdirSync(tmpFolder, { recursive: true });
|
|
2222
2213
|
|
|
2223
2214
|
// Example: moduleFolder = /snapshot/appname/node_modules/sharp/build/Release
|
|
2224
2215
|
const parts = moduleFolder.split(path.sep);
|