@resourcexjs/cli 2.17.0 → 2.17.2
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/index.js +11 -9
- package/dist/index.js.map +3 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -780,8 +780,8 @@ import { promisify as promisify2 } from "util";
|
|
|
780
780
|
import { gunzip } from "zlib";
|
|
781
781
|
import { readdir as readdir2, readFile as readFile2, stat as stat2 } from "fs/promises";
|
|
782
782
|
import { join as join2, relative as relative2 } from "path";
|
|
783
|
-
import { dirname } from "path";
|
|
784
|
-
import { fileURLToPath } from "url";
|
|
783
|
+
import { dirname, join as join3 } from "path";
|
|
784
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
785
785
|
import { createHash } from "crypto";
|
|
786
786
|
function __exportSetter2(name, newValue) {
|
|
787
787
|
this[name] = __returnValue2.bind(null, newValue);
|
|
@@ -4526,8 +4526,10 @@ class NpmSourceLoader {
|
|
|
4526
4526
|
return { source, files: rxs.files };
|
|
4527
4527
|
}
|
|
4528
4528
|
resolvePackageDir(packageName) {
|
|
4529
|
+
const entry = globalThis.Bun?.main ?? process.argv[1] ?? join3(process.cwd(), "noop.js");
|
|
4530
|
+
const parent = pathToFileURL(entry).href;
|
|
4529
4531
|
try {
|
|
4530
|
-
const url2 = import.meta.resolve(`${packageName}/package.json
|
|
4532
|
+
const url2 = import.meta.resolve(`${packageName}/package.json`, parent);
|
|
4531
4533
|
return dirname(fileURLToPath(url2));
|
|
4532
4534
|
} catch {
|
|
4533
4535
|
throw new ResourceXError(`Cannot resolve npm package: ${packageName}`);
|
|
@@ -14541,7 +14543,7 @@ import { mkdir as mkdir2, readdir as readdir22, readFile, rm, stat as stat22, un
|
|
|
14541
14543
|
import { join as join22 } from "path";
|
|
14542
14544
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
14543
14545
|
import { homedir } from "os";
|
|
14544
|
-
import { dirname as dirname2, join as
|
|
14546
|
+
import { dirname as dirname2, join as join32 } from "path";
|
|
14545
14547
|
|
|
14546
14548
|
class FileSystemRXAStore {
|
|
14547
14549
|
basePath;
|
|
@@ -14767,8 +14769,8 @@ class NodeProvider {
|
|
|
14767
14769
|
createStores(config2) {
|
|
14768
14770
|
const basePath = config2.path ?? DEFAULT_BASE_PATH;
|
|
14769
14771
|
return {
|
|
14770
|
-
rxaStore: new FileSystemRXAStore(
|
|
14771
|
-
rxmStore: new FileSystemRXMStore(
|
|
14772
|
+
rxaStore: new FileSystemRXAStore(join32(basePath, "blobs")),
|
|
14773
|
+
rxmStore: new FileSystemRXMStore(join32(basePath, "manifests"))
|
|
14772
14774
|
};
|
|
14773
14775
|
}
|
|
14774
14776
|
createSourceLoader(_config) {
|
|
@@ -14780,7 +14782,7 @@ class NodeProvider {
|
|
|
14780
14782
|
return { registry: envRegistry };
|
|
14781
14783
|
}
|
|
14782
14784
|
const basePath = config2.path ?? DEFAULT_BASE_PATH;
|
|
14783
|
-
const configPath =
|
|
14785
|
+
const configPath = join32(basePath, "config.json");
|
|
14784
14786
|
try {
|
|
14785
14787
|
if (existsSync(configPath)) {
|
|
14786
14788
|
const raw = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
@@ -14797,7 +14799,7 @@ class NodeProvider {
|
|
|
14797
14799
|
}
|
|
14798
14800
|
configPath(config2) {
|
|
14799
14801
|
const basePath = config2.path ?? DEFAULT_BASE_PATH;
|
|
14800
|
-
return
|
|
14802
|
+
return join32(basePath, "config.json");
|
|
14801
14803
|
}
|
|
14802
14804
|
readConfig(config2) {
|
|
14803
14805
|
const configPath = this.configPath(config2);
|
|
@@ -17536,4 +17538,4 @@ var main = defineCommand({
|
|
|
17536
17538
|
});
|
|
17537
17539
|
runMain(main);
|
|
17538
17540
|
|
|
17539
|
-
//# debugId=
|
|
17541
|
+
//# debugId=D37BF1EEFFFDA7D564756E2164756E21
|