@ricsam/r5dctl 0.0.15 → 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/cli.cjs +9 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/cli.mjs +9 -1
- package/dist/mjs/package.json +1 -1
- package/package.json +2 -2
package/dist/cjs/cli.cjs
CHANGED
|
@@ -205,8 +205,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
205
205
|
}
|
|
206
206
|
return null;
|
|
207
207
|
}
|
|
208
|
+
function resolveEntrypointPath(entrypoint) {
|
|
209
|
+
const resolved = import_node_path.default.resolve(entrypoint);
|
|
210
|
+
try {
|
|
211
|
+
return import_node_fs.default.realpathSync.native(resolved);
|
|
212
|
+
} catch {
|
|
213
|
+
return resolved;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
208
216
|
function getR5dctlVersion() {
|
|
209
|
-
const entrypoint = process.argv[1] ?
|
|
217
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
210
218
|
let current = entrypoint ? import_node_path.default.dirname(entrypoint) : process.cwd();
|
|
211
219
|
for (let index = 0; index < 12; index += 1) {
|
|
212
220
|
const packageVersion = readInstalledPackageVersion(import_node_path.default.join(current, "package.json"));
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/cli.mjs
CHANGED
|
@@ -165,8 +165,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
165
165
|
}
|
|
166
166
|
return null;
|
|
167
167
|
}
|
|
168
|
+
function resolveEntrypointPath(entrypoint) {
|
|
169
|
+
const resolved = path.resolve(entrypoint);
|
|
170
|
+
try {
|
|
171
|
+
return fs.realpathSync.native(resolved);
|
|
172
|
+
} catch {
|
|
173
|
+
return resolved;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
168
176
|
function getR5dctlVersion() {
|
|
169
|
-
const entrypoint = process.argv[1] ?
|
|
177
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
170
178
|
let current = entrypoint ? path.dirname(entrypoint) : process.cwd();
|
|
171
179
|
for (let index = 0; index < 12; index += 1) {
|
|
172
180
|
const packageVersion = readInstalledPackageVersion(path.join(current, "package.json"));
|
package/dist/mjs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5dctl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/cli.cjs",
|
|
6
6
|
"module": "./dist/mjs/cli.mjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"r5dctl": "dist/cjs/main.cjs"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ricsam/r5d-api": "^0.0.
|
|
29
|
+
"@ricsam/r5d-api": "^0.0.17"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|