@fluixi/storage 1.0.0-alpha.108 → 1.0.0-alpha.110
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/adapters/memory.mjs +3 -22
- package/dist/browser/document-cookie.mjs +5 -77
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.mjs +11 -182
- package/dist/browser/web-storage.mjs +6 -123
- package/dist/chunk-2JNOWHU2.mjs +13 -0
- package/dist/chunk-3Q725O44.mjs +57 -0
- package/dist/chunk-45W7TSI5.mjs +103 -0
- package/dist/chunk-4VWKLSCF.mjs +8 -0
- package/dist/chunk-7OZ6CS7R.mjs +251 -0
- package/dist/chunk-CEBNMPSS.mjs +18 -0
- package/dist/chunk-DTH527GX.mjs +35 -0
- package/dist/chunk-EBF4FTSI.mjs +32 -0
- package/dist/chunk-GS2CVLL6.mjs +26 -0
- package/dist/chunk-KECKXA6R.mjs +18 -0
- package/dist/chunk-KJGIJJ5C.mjs +74 -0
- package/dist/chunk-LLUKYUEP.mjs +95 -0
- package/dist/chunk-PRDM65CP.mjs +49 -0
- package/dist/chunk-UBKKFGUN.mjs +8 -0
- package/dist/chunk-V6PEKY2O.mjs +18 -0
- package/dist/chunk-VLAJHPYA.mjs +233 -0
- package/dist/chunk-WBLB65GT.mjs +26 -0
- package/dist/chunk-XG366MJ3.mjs +45 -0
- package/dist/chunk-Y5QXBVGQ.mjs +89 -0
- package/dist/chunk-YRPNXR2Q.mjs +16 -0
- package/dist/chunk-ZIQSLESR.mjs +82 -0
- package/dist/core/async-storage.mjs +12 -557
- package/dist/core/bus.mjs +4 -27
- package/dist/core/envelope.mjs +13 -84
- package/dist/core/errors.mjs +17 -77
- package/dist/core/storage.mjs +14 -755
- package/dist/encryption/base64.mjs +4 -13
- package/dist/encryption/keys.mjs +7 -49
- package/dist/encryption/seal.mjs +7 -126
- package/dist/encryption/web-crypto.mjs +4 -55
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +50 -820
- package/dist/serialization/json.mjs +4 -57
- package/dist/serialization/serializer.mjs +3 -4
- package/dist/server/contracts.mjs +4 -11
- package/dist/server/cookie.mjs +6 -102
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.mjs +13 -127
- package/dist/server/request.mjs +3 -22
- package/dist/utils/cookie-names.mjs +6 -11
- package/dist/utils/copy.mjs +3 -14
- package/dist/utils/environment.mjs +3 -4
- package/dist/utils/keys.mjs +4 -8
- package/package.json +3 -3
|
@@ -1,60 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
this.name = new.target.name;
|
|
6
|
-
this.code = code;
|
|
7
|
-
this.key = options.key;
|
|
8
|
-
if (options.cause !== void 0) this.cause = options.cause;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
var StorageSerializationError = class extends StorageError {
|
|
12
|
-
constructor(message, options = {}) {
|
|
13
|
-
super("serialization", message, options);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// src/serialization/json.ts
|
|
18
|
-
function assertJson(value, path, seen) {
|
|
19
|
-
switch (typeof value) {
|
|
20
|
-
case "string":
|
|
21
|
-
case "boolean":
|
|
22
|
-
return;
|
|
23
|
-
case "number":
|
|
24
|
-
if (!Number.isFinite(value)) throw new StorageSerializationError(`${path} is ${value}, which JSON cannot hold.`);
|
|
25
|
-
return;
|
|
26
|
-
case "object":
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
throw new StorageSerializationError(`${path} is a ${typeof value}, which JSON cannot hold.`);
|
|
30
|
-
}
|
|
31
|
-
if (value === null) return;
|
|
32
|
-
if (seen.has(value)) throw new StorageSerializationError(`${path} refers back to itself.`);
|
|
33
|
-
seen.add(value);
|
|
34
|
-
if (Array.isArray(value)) {
|
|
35
|
-
value.forEach((item, i) => assertJson(item, `${path}[${i}]`, seen));
|
|
36
|
-
} else {
|
|
37
|
-
const proto = Object.getPrototypeOf(value);
|
|
38
|
-
if (proto !== Object.prototype && proto !== null) {
|
|
39
|
-
const name = value.constructor?.name ?? "an object with a prototype";
|
|
40
|
-
throw new StorageSerializationError(`${path} is ${name}, which does not survive JSON. Convert it to plain data first.`);
|
|
41
|
-
}
|
|
42
|
-
for (const [key, item] of Object.entries(value)) {
|
|
43
|
-
if (item === void 0) throw new StorageSerializationError(`${path}.${key} is undefined, which JSON drops. Omit the key or use null.`);
|
|
44
|
-
assertJson(item, `${path}.${key}`, seen);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
seen.delete(value);
|
|
48
|
-
}
|
|
49
|
-
var jsonSerializer = {
|
|
50
|
-
serialize(value) {
|
|
51
|
-
assertJson(value, "value", /* @__PURE__ */ new Set());
|
|
52
|
-
return JSON.stringify(value);
|
|
53
|
-
},
|
|
54
|
-
deserialize(text) {
|
|
55
|
-
return JSON.parse(text);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
jsonSerializer
|
|
3
|
+
} from "../chunk-PRDM65CP.mjs";
|
|
4
|
+
import "../chunk-LLUKYUEP.mjs";
|
|
58
5
|
export {
|
|
59
6
|
jsonSerializer
|
|
60
7
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return { getHeader: (name) => headers.get(name) };
|
|
6
|
-
}
|
|
7
|
-
function toStorageResponse(response) {
|
|
8
|
-
if ("appendHeader" in response) return response;
|
|
9
|
-
const headers = "headers" in response ? response.headers : response;
|
|
10
|
-
return { appendHeader: (name, value) => headers.append(name, value) };
|
|
11
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
toStorageRequest,
|
|
3
|
+
toStorageResponse
|
|
4
|
+
} from "../chunk-YRPNXR2Q.mjs";
|
|
12
5
|
export {
|
|
13
6
|
toStorageRequest,
|
|
14
7
|
toStorageResponse
|
package/dist/server/cookie.mjs
CHANGED
|
@@ -1,105 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
super(message);
|
|
8
|
-
this.name = new.target.name;
|
|
9
|
-
this.code = code;
|
|
10
|
-
this.key = options.key;
|
|
11
|
-
if (options.cause !== void 0) this.cause = options.cause;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var StorageUnavailableError = class extends StorageError {
|
|
15
|
-
constructor(message, options = {}) {
|
|
16
|
-
super("unavailable", message, options);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
var StorageQuotaError = class extends StorageError {
|
|
20
|
-
constructor(message, options = {}) {
|
|
21
|
-
super("quota", message, options);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// src/utils/cookie-names.ts
|
|
26
|
-
var encodeCookieName = (key) => encodeURIComponent(key).replace(/[()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
27
|
-
var decodeCookieName = (name) => {
|
|
28
|
-
try {
|
|
29
|
-
return decodeURIComponent(name);
|
|
30
|
-
} catch {
|
|
31
|
-
return name;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var cookiePairSize = (header) => new TextEncoder().encode(header.slice(0, header.indexOf(";"))).length;
|
|
35
|
-
var withEntryExpiry = (cookie, expiresAt) => expiresAt === void 0 ? cookie : { ...cookie, maxAge: void 0, expires: new Date(expiresAt) };
|
|
36
|
-
|
|
37
|
-
// src/server/contracts.ts
|
|
38
|
-
function toStorageRequest(request) {
|
|
39
|
-
if ("getHeader" in request) return request;
|
|
40
|
-
const headers = "headers" in request ? request.headers : request;
|
|
41
|
-
return { getHeader: (name) => headers.get(name) };
|
|
42
|
-
}
|
|
43
|
-
function toStorageResponse(response) {
|
|
44
|
-
if ("appendHeader" in response) return response;
|
|
45
|
-
const headers = "headers" in response ? response.headers : response;
|
|
46
|
-
return { appendHeader: (name, value) => headers.append(name, value) };
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// src/server/cookie.ts
|
|
50
|
-
function cookieStorage(options = {}) {
|
|
51
|
-
const { request, response, maxSize = 4096, ...cookie } = options;
|
|
52
|
-
const reader = request ? toStorageRequest(request) : null;
|
|
53
|
-
const writer = response ? toStorageResponse(response) : null;
|
|
54
|
-
let incoming = null;
|
|
55
|
-
const written = /* @__PURE__ */ new Map();
|
|
56
|
-
const read = () => {
|
|
57
|
-
if (!incoming) {
|
|
58
|
-
incoming = /* @__PURE__ */ new Map();
|
|
59
|
-
for (const [name, value] of Object.entries(parseCookies(reader?.getHeader("cookie")))) incoming.set(decodeCookieName(name), value);
|
|
60
|
-
}
|
|
61
|
-
return incoming;
|
|
62
|
-
};
|
|
63
|
-
const emit = (key, header) => {
|
|
64
|
-
if (!writer) throw new StorageUnavailableError("This cookie storage has no response to write to.", { key });
|
|
65
|
-
writer.appendHeader("set-cookie", header);
|
|
66
|
-
};
|
|
67
|
-
const get = (key) => written.has(key) ? written.get(key) : read().get(key) ?? null;
|
|
68
|
-
const keys = () => {
|
|
69
|
-
const all = new Set(read().keys());
|
|
70
|
-
for (const [key, value] of written) value === null ? all.delete(key) : all.add(key);
|
|
71
|
-
return [...all];
|
|
72
|
-
};
|
|
73
|
-
const remove = (key) => {
|
|
74
|
-
if (get(key) === null) return;
|
|
75
|
-
emit(key, serializeCookie(encodeCookieName(key), "", { ...cookie, maxAge: 0, expires: /* @__PURE__ */ new Date(0) }));
|
|
76
|
-
written.set(key, null);
|
|
77
|
-
};
|
|
78
|
-
return {
|
|
79
|
-
name: "cookie",
|
|
80
|
-
scope: "cookie",
|
|
81
|
-
capabilities: {
|
|
82
|
-
synchronous: true,
|
|
83
|
-
persistent: true,
|
|
84
|
-
reactive: false,
|
|
85
|
-
crossContext: true,
|
|
86
|
-
expiration: false,
|
|
87
|
-
transactions: false
|
|
88
|
-
},
|
|
89
|
-
get,
|
|
90
|
-
set(key, value, writeOptions) {
|
|
91
|
-
const header = serializeCookie(encodeCookieName(key), value, withEntryExpiry(cookie, writeOptions?.expiresAt));
|
|
92
|
-
const size = cookiePairSize(header);
|
|
93
|
-
if (size > maxSize) throw new StorageQuotaError(`Cookie ${key} is ${size} bytes, over the ${maxSize} limit.`, { key });
|
|
94
|
-
emit(key, header);
|
|
95
|
-
written.set(key, value);
|
|
96
|
-
},
|
|
97
|
-
remove,
|
|
98
|
-
has: (key) => get(key) !== null,
|
|
99
|
-
keys,
|
|
100
|
-
clear: () => keys().forEach(remove)
|
|
101
|
-
};
|
|
102
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
cookieStorage
|
|
3
|
+
} from "../chunk-KJGIJJ5C.mjs";
|
|
4
|
+
import "../chunk-YRPNXR2Q.mjs";
|
|
5
|
+
import "../chunk-KECKXA6R.mjs";
|
|
6
|
+
import "../chunk-LLUKYUEP.mjs";
|
|
103
7
|
export {
|
|
104
8
|
cookieStorage
|
|
105
9
|
};
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/storage v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/storage v1.0.0-alpha.110 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,130 +1,16 @@
|
|
|
1
|
-
/*! @fluixi/storage v1.0.0-alpha.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var StorageUnavailableError = class extends StorageError {
|
|
17
|
-
constructor(message, options = {}) {
|
|
18
|
-
super("unavailable", message, options);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
var StorageQuotaError = class extends StorageError {
|
|
22
|
-
constructor(message, options = {}) {
|
|
23
|
-
super("quota", message, options);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// src/utils/cookie-names.ts
|
|
28
|
-
var encodeCookieName = (key) => encodeURIComponent(key).replace(/[()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
29
|
-
var decodeCookieName = (name) => {
|
|
30
|
-
try {
|
|
31
|
-
return decodeURIComponent(name);
|
|
32
|
-
} catch {
|
|
33
|
-
return name;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var cookiePairSize = (header) => new TextEncoder().encode(header.slice(0, header.indexOf(";"))).length;
|
|
37
|
-
var withEntryExpiry = (cookie, expiresAt) => expiresAt === void 0 ? cookie : { ...cookie, maxAge: void 0, expires: new Date(expiresAt) };
|
|
38
|
-
|
|
39
|
-
// src/server/contracts.ts
|
|
40
|
-
function toStorageRequest(request) {
|
|
41
|
-
if ("getHeader" in request) return request;
|
|
42
|
-
const headers = "headers" in request ? request.headers : request;
|
|
43
|
-
return { getHeader: (name) => headers.get(name) };
|
|
44
|
-
}
|
|
45
|
-
function toStorageResponse(response) {
|
|
46
|
-
if ("appendHeader" in response) return response;
|
|
47
|
-
const headers = "headers" in response ? response.headers : response;
|
|
48
|
-
return { appendHeader: (name, value) => headers.append(name, value) };
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// src/server/cookie.ts
|
|
52
|
-
function cookieStorage(options = {}) {
|
|
53
|
-
const { request, response, maxSize = 4096, ...cookie } = options;
|
|
54
|
-
const reader = request ? toStorageRequest(request) : null;
|
|
55
|
-
const writer = response ? toStorageResponse(response) : null;
|
|
56
|
-
let incoming = null;
|
|
57
|
-
const written = /* @__PURE__ */ new Map();
|
|
58
|
-
const read = () => {
|
|
59
|
-
if (!incoming) {
|
|
60
|
-
incoming = /* @__PURE__ */ new Map();
|
|
61
|
-
for (const [name, value] of Object.entries(parseCookies(reader?.getHeader("cookie")))) incoming.set(decodeCookieName(name), value);
|
|
62
|
-
}
|
|
63
|
-
return incoming;
|
|
64
|
-
};
|
|
65
|
-
const emit = (key, header) => {
|
|
66
|
-
if (!writer) throw new StorageUnavailableError("This cookie storage has no response to write to.", { key });
|
|
67
|
-
writer.appendHeader("set-cookie", header);
|
|
68
|
-
};
|
|
69
|
-
const get = (key) => written.has(key) ? written.get(key) : read().get(key) ?? null;
|
|
70
|
-
const keys = () => {
|
|
71
|
-
const all = new Set(read().keys());
|
|
72
|
-
for (const [key, value] of written) value === null ? all.delete(key) : all.add(key);
|
|
73
|
-
return [...all];
|
|
74
|
-
};
|
|
75
|
-
const remove = (key) => {
|
|
76
|
-
if (get(key) === null) return;
|
|
77
|
-
emit(key, serializeCookie(encodeCookieName(key), "", { ...cookie, maxAge: 0, expires: /* @__PURE__ */ new Date(0) }));
|
|
78
|
-
written.set(key, null);
|
|
79
|
-
};
|
|
80
|
-
return {
|
|
81
|
-
name: "cookie",
|
|
82
|
-
scope: "cookie",
|
|
83
|
-
capabilities: {
|
|
84
|
-
synchronous: true,
|
|
85
|
-
persistent: true,
|
|
86
|
-
reactive: false,
|
|
87
|
-
crossContext: true,
|
|
88
|
-
expiration: false,
|
|
89
|
-
transactions: false
|
|
90
|
-
},
|
|
91
|
-
get,
|
|
92
|
-
set(key, value, writeOptions) {
|
|
93
|
-
const header = serializeCookie(encodeCookieName(key), value, withEntryExpiry(cookie, writeOptions?.expiresAt));
|
|
94
|
-
const size = cookiePairSize(header);
|
|
95
|
-
if (size > maxSize) throw new StorageQuotaError(`Cookie ${key} is ${size} bytes, over the ${maxSize} limit.`, { key });
|
|
96
|
-
emit(key, header);
|
|
97
|
-
written.set(key, value);
|
|
98
|
-
},
|
|
99
|
-
remove,
|
|
100
|
-
has: (key) => get(key) !== null,
|
|
101
|
-
keys,
|
|
102
|
-
clear: () => keys().forEach(remove)
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// src/server/request.ts
|
|
107
|
-
function requestStorage() {
|
|
108
|
-
const values = /* @__PURE__ */ new Map();
|
|
109
|
-
return {
|
|
110
|
-
name: "request",
|
|
111
|
-
scope: "request",
|
|
112
|
-
capabilities: {
|
|
113
|
-
synchronous: true,
|
|
114
|
-
persistent: false,
|
|
115
|
-
reactive: false,
|
|
116
|
-
crossContext: false,
|
|
117
|
-
expiration: false,
|
|
118
|
-
transactions: false
|
|
119
|
-
},
|
|
120
|
-
get: (key) => values.get(key) ?? null,
|
|
121
|
-
set: (key, value) => void values.set(key, value),
|
|
122
|
-
remove: (key) => void values.delete(key),
|
|
123
|
-
has: (key) => values.has(key),
|
|
124
|
-
keys: () => [...values.keys()],
|
|
125
|
-
clear: () => values.clear()
|
|
126
|
-
};
|
|
127
|
-
}
|
|
1
|
+
/*! @fluixi/storage v1.0.0-alpha.110 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
import {
|
|
3
|
+
cookieStorage
|
|
4
|
+
} from "../chunk-KJGIJJ5C.mjs";
|
|
5
|
+
import {
|
|
6
|
+
toStorageRequest,
|
|
7
|
+
toStorageResponse
|
|
8
|
+
} from "../chunk-YRPNXR2Q.mjs";
|
|
9
|
+
import {
|
|
10
|
+
requestStorage
|
|
11
|
+
} from "../chunk-GS2CVLL6.mjs";
|
|
12
|
+
import "../chunk-KECKXA6R.mjs";
|
|
13
|
+
import "../chunk-LLUKYUEP.mjs";
|
|
128
14
|
export {
|
|
129
15
|
cookieStorage,
|
|
130
16
|
requestStorage,
|
package/dist/server/request.mjs
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return {
|
|
5
|
-
name: "request",
|
|
6
|
-
scope: "request",
|
|
7
|
-
capabilities: {
|
|
8
|
-
synchronous: true,
|
|
9
|
-
persistent: false,
|
|
10
|
-
reactive: false,
|
|
11
|
-
crossContext: false,
|
|
12
|
-
expiration: false,
|
|
13
|
-
transactions: false
|
|
14
|
-
},
|
|
15
|
-
get: (key) => values.get(key) ?? null,
|
|
16
|
-
set: (key, value) => void values.set(key, value),
|
|
17
|
-
remove: (key) => void values.delete(key),
|
|
18
|
-
has: (key) => values.has(key),
|
|
19
|
-
keys: () => [...values.keys()],
|
|
20
|
-
clear: () => values.clear()
|
|
21
|
-
};
|
|
22
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
requestStorage
|
|
3
|
+
} from "../chunk-GS2CVLL6.mjs";
|
|
23
4
|
export {
|
|
24
5
|
requestStorage
|
|
25
6
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return name;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var cookiePairSize = (header) => new TextEncoder().encode(header.slice(0, header.indexOf(";"))).length;
|
|
11
|
-
var withEntryExpiry = (cookie, expiresAt) => expiresAt === void 0 ? cookie : { ...cookie, maxAge: void 0, expires: new Date(expiresAt) };
|
|
1
|
+
import {
|
|
2
|
+
cookiePairSize,
|
|
3
|
+
decodeCookieName,
|
|
4
|
+
encodeCookieName,
|
|
5
|
+
withEntryExpiry
|
|
6
|
+
} from "../chunk-KECKXA6R.mjs";
|
|
12
7
|
export {
|
|
13
8
|
cookiePairSize,
|
|
14
9
|
decodeCookieName,
|
package/dist/utils/copy.mjs
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const out = snapshot;
|
|
5
|
-
if (keys) {
|
|
6
|
-
for (const key of Object.keys(out)) if (!keys.includes(key)) delete out[key];
|
|
7
|
-
}
|
|
8
|
-
return out;
|
|
9
|
-
};
|
|
10
|
-
function copyStorage(from, to, options = {}) {
|
|
11
|
-
const restore = { overwrite: options.overwrite };
|
|
12
|
-
if (!isAsync(from) && !isAsync(to)) return to.restore(pick(from.snapshot(), options.keys), restore);
|
|
13
|
-
return (async () => to.restore(pick(await from.snapshot(), options.keys), restore))();
|
|
14
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
copyStorage
|
|
3
|
+
} from "../chunk-CEBNMPSS.mjs";
|
|
15
4
|
export {
|
|
16
5
|
copyStorage
|
|
17
6
|
};
|
package/dist/utils/keys.mjs
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
function joinNamespace(parent, child) {
|
|
6
|
-
if (!child) throw new TypeError("A namespace needs a name.");
|
|
7
|
-
return parent ? `${parent}:${child}` : child;
|
|
8
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
joinNamespace,
|
|
3
|
+
namespacePrefix
|
|
4
|
+
} from "../chunk-2JNOWHU2.mjs";
|
|
9
5
|
export {
|
|
10
6
|
joinNamespace,
|
|
11
7
|
namespacePrefix
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluixi/storage",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.110",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Ibrahima Touré",
|
|
6
6
|
"private": false,
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@fluixi/utils": "^1.0.0-alpha.
|
|
44
|
+
"@fluixi/utils": "^1.0.0-alpha.110"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@bambiste/mix-builder": "^0.4.
|
|
47
|
+
"@bambiste/mix-builder": "^0.4.3",
|
|
48
48
|
"cross-env": "^7.0.3"
|
|
49
49
|
},
|
|
50
50
|
"repository": {
|