veryfront 0.1.553 → 0.1.554
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/esm/deno.js
CHANGED
|
@@ -7,7 +7,7 @@ export declare function getHttpBundleCacheDir(): string;
|
|
|
7
7
|
* Ensure cached ESM modules can resolve bare specifiers (e.g. `import 'react'`)
|
|
8
8
|
* when running on Node.js.
|
|
9
9
|
*
|
|
10
|
-
* Cached .mjs files live under getCacheBaseDir()
|
|
10
|
+
* Cached .mjs files live under getCacheBaseDir(). Node.js
|
|
11
11
|
* resolves bare specifiers by walking up from the importing file looking for
|
|
12
12
|
* node_modules/. Because the cache directory has no node_modules ancestor,
|
|
13
13
|
* packages like `react` cannot be found.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import { join } from "../platform/compat/path/index.js";
|
|
3
|
-
import { cwd,
|
|
3
|
+
import { cwd, getHostEnv } from "../platform/compat/process.js";
|
|
4
4
|
import { isNode } from "../platform/compat/runtime.js";
|
|
5
5
|
const cacheStorage = new AsyncLocalStorage();
|
|
6
6
|
let nodeModulesLinked = false;
|
|
@@ -11,9 +11,9 @@ export function getCacheDirFromContext() {
|
|
|
11
11
|
return cacheStorage.getStore();
|
|
12
12
|
}
|
|
13
13
|
function getDefaultCacheBaseDir() {
|
|
14
|
-
const home =
|
|
15
|
-
const isProduction =
|
|
16
|
-
|
|
14
|
+
const home = getHostEnv("HOME");
|
|
15
|
+
const isProduction = getHostEnv("NODE_ENV") === "production" ||
|
|
16
|
+
getHostEnv("VERYFRONT_MODE") === "production";
|
|
17
17
|
if (home && isProduction) {
|
|
18
18
|
return join(home, ".cache", "veryfront");
|
|
19
19
|
}
|
|
@@ -21,7 +21,7 @@ function getDefaultCacheBaseDir() {
|
|
|
21
21
|
}
|
|
22
22
|
export function getCacheBaseDir() {
|
|
23
23
|
return (getCacheDirFromContext() ??
|
|
24
|
-
|
|
24
|
+
getHostEnv("VERYFRONT_CACHE_DIR") ?? getHostEnv("VF_CACHE_DIR") ??
|
|
25
25
|
getDefaultCacheBaseDir());
|
|
26
26
|
}
|
|
27
27
|
export function getMdxEsmCacheDir() {
|
|
@@ -34,7 +34,7 @@ export function getHttpBundleCacheDir() {
|
|
|
34
34
|
* Ensure cached ESM modules can resolve bare specifiers (e.g. `import 'react'`)
|
|
35
35
|
* when running on Node.js.
|
|
36
36
|
*
|
|
37
|
-
* Cached .mjs files live under getCacheBaseDir()
|
|
37
|
+
* Cached .mjs files live under getCacheBaseDir(). Node.js
|
|
38
38
|
* resolves bare specifiers by walking up from the importing file looking for
|
|
39
39
|
* node_modules/. Because the cache directory has no node_modules ancestor,
|
|
40
40
|
* packages like `react` cannot be found.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.554";
|
|
2
2
|
//# sourceMappingURL=version-constant.d.ts.map
|