@nocobase/utils 2.3.0-beta.3 → 3.0.0-alpha.11
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/storage-path.js +8 -1
- package/package.json +2 -2
package/lib/storage-path.js
CHANGED
|
@@ -43,12 +43,19 @@ __export(storage_path_exports, {
|
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(storage_path_exports);
|
|
45
45
|
var import_path = __toESM(require("path"));
|
|
46
|
+
function resolveDefaultStorageRoot() {
|
|
47
|
+
if (import_path.default.basename(process.cwd()) === "source") {
|
|
48
|
+
return import_path.default.resolve(process.cwd(), "..", "storage");
|
|
49
|
+
}
|
|
50
|
+
return import_path.default.resolve(process.cwd(), "storage");
|
|
51
|
+
}
|
|
52
|
+
__name(resolveDefaultStorageRoot, "resolveDefaultStorageRoot");
|
|
46
53
|
function resolveStorageRoot() {
|
|
47
54
|
const raw = process.env.STORAGE_PATH;
|
|
48
55
|
if (raw) {
|
|
49
56
|
return import_path.default.isAbsolute(raw) ? raw : import_path.default.resolve(process.cwd(), raw);
|
|
50
57
|
}
|
|
51
|
-
return
|
|
58
|
+
return resolveDefaultStorageRoot();
|
|
52
59
|
}
|
|
53
60
|
__name(resolveStorageRoot, "resolveStorageRoot");
|
|
54
61
|
function storagePathJoin(...segments) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.11",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"object-path": "^0.11.8",
|
|
22
22
|
"ses": "^1.14.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "03574f3a2d10b1ed8469dc7405aa0c4696d6d1d1"
|
|
25
25
|
}
|