@ricsam/r5d-worker 0.0.16 → 0.0.17
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/dist/cjs/main.cjs +9 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/main.mjs +9 -1
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/dist/cjs/main.cjs
CHANGED
|
@@ -114,8 +114,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
114
114
|
}
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
+
function resolveEntrypointPath(entrypoint) {
|
|
118
|
+
const resolved = import_node_path.default.resolve(entrypoint);
|
|
119
|
+
try {
|
|
120
|
+
return import_node_fs.default.realpathSync.native(resolved);
|
|
121
|
+
} catch {
|
|
122
|
+
return resolved;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
117
125
|
function getWorkerVersion() {
|
|
118
|
-
const entrypoint = process.argv[1] ?
|
|
126
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
119
127
|
let current = entrypoint ? import_node_path.default.dirname(entrypoint) : process.cwd();
|
|
120
128
|
for (let index = 0; index < 12; index += 1) {
|
|
121
129
|
const packageVersion = readInstalledPackageVersion(import_node_path.default.join(current, "package.json"));
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/main.mjs
CHANGED
|
@@ -74,8 +74,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
74
74
|
}
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
+
function resolveEntrypointPath(entrypoint) {
|
|
78
|
+
const resolved = path.resolve(entrypoint);
|
|
79
|
+
try {
|
|
80
|
+
return fs.realpathSync.native(resolved);
|
|
81
|
+
} catch {
|
|
82
|
+
return resolved;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
77
85
|
function getWorkerVersion() {
|
|
78
|
-
const entrypoint = process.argv[1] ?
|
|
86
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
79
87
|
let current = entrypoint ? path.dirname(entrypoint) : process.cwd();
|
|
80
88
|
for (let index = 0; index < 12; index += 1) {
|
|
81
89
|
const packageVersion = readInstalledPackageVersion(path.join(current, "package.json"));
|
package/dist/mjs/package.json
CHANGED