@bleedingdev/modern-js-runtime-utils 3.2.0-ultramodern.0
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/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/cjs/browser/deferreds.js +161 -0
- package/dist/cjs/browser/index.js +65 -0
- package/dist/cjs/browser/nestedRoutes.js +141 -0
- package/dist/cjs/merge.js +60 -0
- package/dist/cjs/node/fileReader.js +94 -0
- package/dist/cjs/node/index.js +99 -0
- package/dist/cjs/node/loaderContext/createLoaderCtx.js +51 -0
- package/dist/cjs/node/loaderContext/createRequestCtx.js +50 -0
- package/dist/cjs/node/loaderContext/index.js +41 -0
- package/dist/cjs/node/nestedRoutes.js +58 -0
- package/dist/cjs/node/sanitize.js +103 -0
- package/dist/cjs/node/serialize.js +49 -0
- package/dist/cjs/node/storer/container.js +72 -0
- package/dist/cjs/node/storer/index.js +44 -0
- package/dist/cjs/node/storer/storage.js +87 -0
- package/dist/cjs/parsed.js +46 -0
- package/dist/cjs/router.js +91 -0
- package/dist/cjs/rsc.js +58 -0
- package/dist/cjs/server/index.js +58 -0
- package/dist/cjs/server/nestedRoutes.js +49 -0
- package/dist/cjs/time.js +61 -0
- package/dist/cjs/universal/async_storage.js +58 -0
- package/dist/cjs/universal/async_storage.server.js +69 -0
- package/dist/cjs/universal/cache.js +381 -0
- package/dist/cjs/universal/request.js +86 -0
- package/dist/cjs/url.js +39 -0
- package/dist/esm/browser/deferreds.mjs +118 -0
- package/dist/esm/browser/index.mjs +2 -0
- package/dist/esm/browser/nestedRoutes.mjs +104 -0
- package/dist/esm/merge.mjs +26 -0
- package/dist/esm/node/fileReader.mjs +47 -0
- package/dist/esm/node/index.mjs +5 -0
- package/dist/esm/node/loaderContext/createLoaderCtx.mjs +14 -0
- package/dist/esm/node/loaderContext/createRequestCtx.mjs +16 -0
- package/dist/esm/node/loaderContext/index.mjs +4 -0
- package/dist/esm/node/nestedRoutes.mjs +1 -0
- package/dist/esm/node/sanitize.mjs +66 -0
- package/dist/esm/node/serialize.mjs +5 -0
- package/dist/esm/node/storer/container.mjs +38 -0
- package/dist/esm/node/storer/index.mjs +7 -0
- package/dist/esm/node/storer/storage.mjs +53 -0
- package/dist/esm/parsed.mjs +12 -0
- package/dist/esm/router.mjs +18 -0
- package/dist/esm/rsc.mjs +1 -0
- package/dist/esm/server/index.mjs +1 -0
- package/dist/esm/server/nestedRoutes.mjs +15 -0
- package/dist/esm/time.mjs +27 -0
- package/dist/esm/universal/async_storage.mjs +7 -0
- package/dist/esm/universal/async_storage.server.mjs +32 -0
- package/dist/esm/universal/cache.mjs +326 -0
- package/dist/esm/universal/request.mjs +40 -0
- package/dist/esm/url.mjs +5 -0
- package/dist/esm-node/browser/deferreds.mjs +119 -0
- package/dist/esm-node/browser/index.mjs +3 -0
- package/dist/esm-node/browser/nestedRoutes.mjs +105 -0
- package/dist/esm-node/merge.mjs +27 -0
- package/dist/esm-node/node/fileReader.mjs +48 -0
- package/dist/esm-node/node/index.mjs +6 -0
- package/dist/esm-node/node/loaderContext/createLoaderCtx.mjs +15 -0
- package/dist/esm-node/node/loaderContext/createRequestCtx.mjs +17 -0
- package/dist/esm-node/node/loaderContext/index.mjs +5 -0
- package/dist/esm-node/node/nestedRoutes.mjs +2 -0
- package/dist/esm-node/node/sanitize.mjs +67 -0
- package/dist/esm-node/node/serialize.mjs +6 -0
- package/dist/esm-node/node/storer/container.mjs +39 -0
- package/dist/esm-node/node/storer/index.mjs +8 -0
- package/dist/esm-node/node/storer/storage.mjs +54 -0
- package/dist/esm-node/parsed.mjs +13 -0
- package/dist/esm-node/router.mjs +19 -0
- package/dist/esm-node/rsc.mjs +2 -0
- package/dist/esm-node/server/index.mjs +2 -0
- package/dist/esm-node/server/nestedRoutes.mjs +16 -0
- package/dist/esm-node/time.mjs +28 -0
- package/dist/esm-node/universal/async_storage.mjs +25 -0
- package/dist/esm-node/universal/async_storage.server.mjs +33 -0
- package/dist/esm-node/universal/cache.mjs +327 -0
- package/dist/esm-node/universal/request.mjs +41 -0
- package/dist/esm-node/url.mjs +6 -0
- package/dist/types/browser/deferreds.d.ts +31 -0
- package/dist/types/browser/index.d.ts +2 -0
- package/dist/types/browser/nestedRoutes.d.ts +12 -0
- package/dist/types/merge.d.ts +6 -0
- package/dist/types/node/fileReader.d.ts +19 -0
- package/dist/types/node/index.d.ts +8 -0
- package/dist/types/node/loaderContext/createLoaderCtx.d.ts +7 -0
- package/dist/types/node/loaderContext/createRequestCtx.d.ts +16 -0
- package/dist/types/node/loaderContext/index.d.ts +4 -0
- package/dist/types/node/nestedRoutes.d.ts +1 -0
- package/dist/types/node/sanitize.d.ts +11 -0
- package/dist/types/node/serialize.d.ts +1 -0
- package/dist/types/node/storer/container.d.ts +27 -0
- package/dist/types/node/storer/index.d.ts +3 -0
- package/dist/types/node/storer/storage.d.ts +26 -0
- package/dist/types/parsed.d.ts +1 -0
- package/dist/types/router.d.ts +6 -0
- package/dist/types/rsc.d.ts +1 -0
- package/dist/types/server/index.d.ts +1 -0
- package/dist/types/server/nestedRoutes.d.ts +2 -0
- package/dist/types/time.d.ts +1 -0
- package/dist/types/universal/async_storage.d.ts +2 -0
- package/dist/types/universal/async_storage.server.d.ts +29 -0
- package/dist/types/universal/cache.d.ts +68 -0
- package/dist/types/universal/request.d.ts +17 -0
- package/dist/types/url.d.ts +11 -0
- package/package.json +197 -0
- package/rslib.config.mts +28 -0
- package/rstest.config.mts +26 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
class LoaderContext {
|
|
3
|
+
getDefaultValue() {
|
|
4
|
+
if (!this.defaultValue) throw new Error("Can't get defaultValue before initialed");
|
|
5
|
+
return this.defaultValue;
|
|
6
|
+
}
|
|
7
|
+
constructor(defaultValue){
|
|
8
|
+
this.defaultValue = defaultValue;
|
|
9
|
+
this.symbol = Symbol('loaderContext');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function createLoaderContext(defaultValue) {
|
|
13
|
+
return new LoaderContext(defaultValue);
|
|
14
|
+
}
|
|
15
|
+
export { LoaderContext, createLoaderContext };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
function createRequestContext(context) {
|
|
3
|
+
const _context = context || new Map();
|
|
4
|
+
function get(key) {
|
|
5
|
+
if ('string' == typeof key) return _context.get(key);
|
|
6
|
+
return _context.get(key.symbol) || key.getDefaultValue();
|
|
7
|
+
}
|
|
8
|
+
function set(key, value) {
|
|
9
|
+
if ('string' == typeof key) _context.set(key, value);
|
|
10
|
+
else _context.set(key.symbol, value);
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
set,
|
|
14
|
+
get
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export { createRequestContext };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const DEFAULT_UNSAFE_SSR_HEADERS = [
|
|
3
|
+
'authorization',
|
|
4
|
+
'proxy-authorization',
|
|
5
|
+
'cookie',
|
|
6
|
+
'set-cookie',
|
|
7
|
+
'x-api-key',
|
|
8
|
+
'x-auth-token',
|
|
9
|
+
'x-csrf-token',
|
|
10
|
+
'x-xsrf-token',
|
|
11
|
+
'x-forwarded-client-cert',
|
|
12
|
+
'cf-access-jwt-assertion'
|
|
13
|
+
];
|
|
14
|
+
const isPlainObject = (value)=>{
|
|
15
|
+
if (null === value || 'object' != typeof value) return false;
|
|
16
|
+
const proto = Object.getPrototypeOf(value);
|
|
17
|
+
return null === proto || proto === Object.prototype;
|
|
18
|
+
};
|
|
19
|
+
const isHeaderContainerKey = (key)=>{
|
|
20
|
+
const normalized = key.toLowerCase();
|
|
21
|
+
return 'headers' === normalized || normalized.endsWith('headers');
|
|
22
|
+
};
|
|
23
|
+
const normalizeHeaderName = (header)=>header.trim().toLowerCase();
|
|
24
|
+
const createUnsafeHeaderSet = (unsafeHeaders = [])=>{
|
|
25
|
+
const headers = new Set(DEFAULT_UNSAFE_SSR_HEADERS);
|
|
26
|
+
for (const header of unsafeHeaders){
|
|
27
|
+
const normalized = normalizeHeaderName(header);
|
|
28
|
+
if (normalized) headers.add(normalized);
|
|
29
|
+
}
|
|
30
|
+
return headers;
|
|
31
|
+
};
|
|
32
|
+
const sanitizeSSRPayload = (payload, options = {})=>{
|
|
33
|
+
const removed = [];
|
|
34
|
+
const visited = new WeakMap();
|
|
35
|
+
const unsafeHeaderSet = createUnsafeHeaderSet(options.unsafeHeaders);
|
|
36
|
+
const walk = (value, path, insideHeaderContainer)=>{
|
|
37
|
+
if (Array.isArray(value)) {
|
|
38
|
+
const cached = visited.get(value);
|
|
39
|
+
if (cached) return cached;
|
|
40
|
+
const next = [];
|
|
41
|
+
visited.set(value, next);
|
|
42
|
+
value.forEach((item, index)=>{
|
|
43
|
+
next.push(walk(item, `${path}[${index}]`, insideHeaderContainer));
|
|
44
|
+
});
|
|
45
|
+
return next;
|
|
46
|
+
}
|
|
47
|
+
if (!isPlainObject(value)) return value;
|
|
48
|
+
const cached = visited.get(value);
|
|
49
|
+
if (cached) return cached;
|
|
50
|
+
const next = {};
|
|
51
|
+
visited.set(value, next);
|
|
52
|
+
for (const [key, currentValue] of Object.entries(value)){
|
|
53
|
+
const nextPath = path ? `${path}.${key}` : key;
|
|
54
|
+
if (insideHeaderContainer && unsafeHeaderSet.has(normalizeHeaderName(key))) {
|
|
55
|
+
removed.push(nextPath);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
next[key] = walk(currentValue, nextPath, isHeaderContainerKey(key));
|
|
59
|
+
}
|
|
60
|
+
return next;
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
payload: walk(payload, '', options.treatRootAsHeaders ?? false),
|
|
64
|
+
removed
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export { DEFAULT_UNSAFE_SSR_HEADERS, sanitizeSSRPayload };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { LRUCache } from "lru-cache";
|
|
3
|
+
class MemoryContainer {
|
|
4
|
+
async get(key) {
|
|
5
|
+
return this.cache.get(key);
|
|
6
|
+
}
|
|
7
|
+
async set(key, value) {
|
|
8
|
+
this.cache.set(key, value);
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
async has(key) {
|
|
12
|
+
return this.cache.has(key);
|
|
13
|
+
}
|
|
14
|
+
async delete(key) {
|
|
15
|
+
const exist = await this.has(key);
|
|
16
|
+
if (exist) this.cache.delete(key);
|
|
17
|
+
return exist;
|
|
18
|
+
}
|
|
19
|
+
forEach(callbackFn) {
|
|
20
|
+
this.cache.forEach((value, key)=>{
|
|
21
|
+
callbackFn(value, key, this);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
constructor({ max, maxAge } = {}){
|
|
25
|
+
this.cache = new LRUCache({
|
|
26
|
+
maxSize: (max || 256) * MemoryContainer.MB,
|
|
27
|
+
ttl: maxAge || MemoryContainer.hour,
|
|
28
|
+
sizeCalculation: (value, key)=>JSON.stringify(value).length
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
MemoryContainer.BYTE = 1;
|
|
33
|
+
MemoryContainer.KB = 1024 * MemoryContainer.BYTE;
|
|
34
|
+
MemoryContainer.MB = 1024 * MemoryContainer.KB;
|
|
35
|
+
MemoryContainer.ms = 1;
|
|
36
|
+
MemoryContainer.second = 1000 * MemoryContainer.ms;
|
|
37
|
+
MemoryContainer.minute = 60 * MemoryContainer.second;
|
|
38
|
+
MemoryContainer.hour = 60 * MemoryContainer.minute;
|
|
39
|
+
export { MemoryContainer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { MemoryContainer } from "./container.mjs";
|
|
3
|
+
import { Storage } from "./storage.mjs";
|
|
4
|
+
const memoryContainer = new MemoryContainer();
|
|
5
|
+
function createMemoryStorage(namespace) {
|
|
6
|
+
return new Storage(namespace, memoryContainer);
|
|
7
|
+
}
|
|
8
|
+
export { Storage, createMemoryStorage };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
class Storage {
|
|
3
|
+
async keys() {
|
|
4
|
+
const _keys = [];
|
|
5
|
+
this.forEach?.((_, k)=>{
|
|
6
|
+
_keys.push(k);
|
|
7
|
+
});
|
|
8
|
+
return _keys;
|
|
9
|
+
}
|
|
10
|
+
async values() {
|
|
11
|
+
const _values = [];
|
|
12
|
+
this.forEach?.((v)=>{
|
|
13
|
+
_values.push(v);
|
|
14
|
+
});
|
|
15
|
+
return _values;
|
|
16
|
+
}
|
|
17
|
+
get(key) {
|
|
18
|
+
const uniqueKey = this.computedUniqueKey(key);
|
|
19
|
+
return this.container.get(uniqueKey);
|
|
20
|
+
}
|
|
21
|
+
async set(key, value) {
|
|
22
|
+
const uniqueKey = this.computedUniqueKey(key);
|
|
23
|
+
await this.container.set(uniqueKey, value);
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
has(key) {
|
|
27
|
+
const uniqueKey = this.computedUniqueKey(key);
|
|
28
|
+
return this.container.has(uniqueKey);
|
|
29
|
+
}
|
|
30
|
+
delete(key) {
|
|
31
|
+
const uniqueKey = this.computedUniqueKey(key);
|
|
32
|
+
return this.container.delete(uniqueKey);
|
|
33
|
+
}
|
|
34
|
+
async clear() {
|
|
35
|
+
const keys = await this.keys?.();
|
|
36
|
+
await Promise.all(keys?.map(async (key)=>this.container.delete(key)) || []);
|
|
37
|
+
}
|
|
38
|
+
forEach(fallbackFn) {
|
|
39
|
+
this.container.forEach?.((v, k)=>{
|
|
40
|
+
if (this.checkIsOwnkey(k)) fallbackFn(v, k, this);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
computedUniqueKey(k) {
|
|
44
|
+
return `${this.namespace}:${k}`;
|
|
45
|
+
}
|
|
46
|
+
checkIsOwnkey(k) {
|
|
47
|
+
return k.startsWith(this.namespace);
|
|
48
|
+
}
|
|
49
|
+
constructor(namespace, container){
|
|
50
|
+
this.namespace = namespace;
|
|
51
|
+
this.container = container;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export { Storage };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const parsedJSONFromElement = (id)=>{
|
|
3
|
+
const elements = document.querySelectorAll(`#${id}`);
|
|
4
|
+
if (0 === elements.length) return;
|
|
5
|
+
const element = elements[elements.length - 1];
|
|
6
|
+
if (element) try {
|
|
7
|
+
const parsed = JSON.parse(element?.textContent || '');
|
|
8
|
+
return parsed;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.error(`parse ${id} error`, e);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export { parsedJSONFromElement };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
export * from "react-router";
|
|
3
|
+
const DEFERRED_SYMBOL = Symbol('deferred');
|
|
4
|
+
const json = (data, init)=>{
|
|
5
|
+
const responseInit = init ? 'number' == typeof init ? {
|
|
6
|
+
status: init
|
|
7
|
+
} : init : void 0;
|
|
8
|
+
return new Response(JSON.stringify(data), responseInit);
|
|
9
|
+
};
|
|
10
|
+
const defer = (data, init)=>{
|
|
11
|
+
if (void 0 === init) return data;
|
|
12
|
+
{
|
|
13
|
+
const responseInit = init ? 'number' == typeof init ? {
|
|
14
|
+
status: init
|
|
15
|
+
} : init : void 0;
|
|
16
|
+
return new Response(JSON.stringify(data), responseInit);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export { DEFERRED_SYMBOL, defer, json };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
function sortByUrlPath(entries) {
|
|
3
|
+
entries.sort(function(a, b) {
|
|
4
|
+
const length1 = a.urlPath.length;
|
|
5
|
+
const length2 = b.urlPath.length;
|
|
6
|
+
if (length1 < length2) return 1;
|
|
7
|
+
if (length1 > length2) return -1;
|
|
8
|
+
return 0;
|
|
9
|
+
});
|
|
10
|
+
return entries;
|
|
11
|
+
}
|
|
12
|
+
const matchEntry = (pathname, entries)=>{
|
|
13
|
+
sortByUrlPath(entries);
|
|
14
|
+
return entries.find((entry)=>pathname.startsWith(entry.urlPath));
|
|
15
|
+
};
|
|
16
|
+
export { matchEntry };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
function processHrtime(previousTimestamp) {
|
|
3
|
+
const now = new Date().getTime();
|
|
4
|
+
const clocktime = 1e-3 * now;
|
|
5
|
+
let seconds = Math.floor(clocktime);
|
|
6
|
+
let nanoseconds = Math.floor(clocktime % 1 * 1e9);
|
|
7
|
+
if (previousTimestamp) {
|
|
8
|
+
seconds -= previousTimestamp[0];
|
|
9
|
+
nanoseconds -= previousTimestamp[1];
|
|
10
|
+
if (nanoseconds < 0) {
|
|
11
|
+
seconds--;
|
|
12
|
+
nanoseconds += 1e9;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return [
|
|
16
|
+
seconds,
|
|
17
|
+
nanoseconds
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
const getLatency = (hrtime)=>{
|
|
21
|
+
const [s, ns] = processHrtime(hrtime);
|
|
22
|
+
return 1e3 * s + ns / 1e6;
|
|
23
|
+
};
|
|
24
|
+
const time = ()=>{
|
|
25
|
+
const hrtime = processHrtime();
|
|
26
|
+
return ()=>getLatency(hrtime);
|
|
27
|
+
};
|
|
28
|
+
export { time };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const isBrowser = "u" > typeof window && void 0 !== window.document;
|
|
3
|
+
const IS_WEB_FALLBACK = "u" > typeof IS_WEB ? IS_WEB : isBrowser;
|
|
4
|
+
const getAsyncLocalStorage = async ()=>{
|
|
5
|
+
if (isBrowser) {
|
|
6
|
+
console.error('You should not get async storage in browser');
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
if (!IS_WEB_FALLBACK) try {
|
|
10
|
+
const serverStorage = await import("./async_storage.server.mjs");
|
|
11
|
+
return serverStorage.getAsyncLocalStorage();
|
|
12
|
+
} catch (extensionError) {
|
|
13
|
+
try {
|
|
14
|
+
const serverStorage = await import("./async_storage.server");
|
|
15
|
+
return serverStorage.getAsyncLocalStorage();
|
|
16
|
+
} catch (fallbackError) {
|
|
17
|
+
console.error('Failed to load server async storage', {
|
|
18
|
+
extensionError: extensionError instanceof Error ? extensionError.message : extensionError,
|
|
19
|
+
fallbackError: fallbackError instanceof Error ? fallbackError.message : fallbackError
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
export { getAsyncLocalStorage };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import * as __rspack_external_async_hooks from "async_hooks";
|
|
3
|
+
const createStorage = ()=>{
|
|
4
|
+
let storage;
|
|
5
|
+
if (void 0 !== __rspack_external_async_hooks.AsyncLocalStorage) storage = new __rspack_external_async_hooks.AsyncLocalStorage();
|
|
6
|
+
const run = (context, cb)=>{
|
|
7
|
+
if (!storage) throw new Error(`Unable to use async_hook, please confirm the node version >= 12.17
|
|
8
|
+
`);
|
|
9
|
+
return new Promise((resolve, reject)=>{
|
|
10
|
+
storage.run(context, ()=>{
|
|
11
|
+
try {
|
|
12
|
+
return resolve(cb());
|
|
13
|
+
} catch (error) {
|
|
14
|
+
return reject(error);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const useContext = ()=>{
|
|
20
|
+
if (!storage) throw new Error(`Unable to use async_hook, please confirm the node version >= 12.17
|
|
21
|
+
`);
|
|
22
|
+
const context = storage?.getStore();
|
|
23
|
+
if (!context) throw new Error("Can't call useContext out of scope, make sure @modern-js/runtime-utils is a single version in node_modules");
|
|
24
|
+
return context;
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
run,
|
|
28
|
+
useContext
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const async_storage_server_storage = createStorage();
|
|
32
|
+
const getAsyncLocalStorage = async ()=>async_storage_server_storage;
|
|
33
|
+
export { async_storage_server_storage as storage, getAsyncLocalStorage };
|