flags 3.1.1 → 3.1.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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/dist/{chunk-OQHOV3IB.js → chunk-7EGZDBDN.js} +2 -2
- package/dist/{chunk-OQHOV3IB.js.map → chunk-7EGZDBDN.js.map} +1 -1
- package/dist/{chunk-D2GBVCQQ.cjs → chunk-IGXYQW6R.cjs} +2 -2
- package/dist/{chunk-D2GBVCQQ.cjs.map → chunk-IGXYQW6R.cjs.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/next.cjs +16 -14
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +3 -1
- package/dist/next.js.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/sveltekit.cjs +8 -8
- package/dist/sveltekit.d.cts +1 -1
- package/dist/sveltekit.d.ts +1 -1
- package/dist/sveltekit.js +1 -1
- package/dist/{types-swW0-Ony.d.cts → types-CGpl9epN.d.cts} +1 -0
- package/dist/{types-swW0-Ony.d.ts → types-CGpl9epN.d.ts} +1 -0
- package/package.json +3 -3
package/dist/sveltekit.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var _chunkAVMIIWOFcjs = require('./chunk-AVMIIWOF.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkIGXYQW6Rcjs = require('./chunk-IGXYQW6R.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkMEG7RDX7cjs = require('./chunk-MEG7RDX7.cjs');
|
|
@@ -25,7 +25,7 @@ function sealHeaders(headers) {
|
|
|
25
25
|
const cached = headersMap.get(headers);
|
|
26
26
|
if (cached !== void 0)
|
|
27
27
|
return cached;
|
|
28
|
-
const sealed =
|
|
28
|
+
const sealed = _chunkIGXYQW6Rcjs.HeadersAdapter.seal(headers);
|
|
29
29
|
headersMap.set(headers, sealed);
|
|
30
30
|
return sealed;
|
|
31
31
|
}
|
|
@@ -33,7 +33,7 @@ function sealCookies(headers) {
|
|
|
33
33
|
const cached = cookiesMap.get(headers);
|
|
34
34
|
if (cached !== void 0)
|
|
35
35
|
return cached;
|
|
36
|
-
const sealed =
|
|
36
|
+
const sealed = _chunkIGXYQW6Rcjs.RequestCookiesAdapter.seal(new (0, _cookies.RequestCookies)(headers));
|
|
37
37
|
cookiesMap.set(headers, sealed);
|
|
38
38
|
return sealed;
|
|
39
39
|
}
|
|
@@ -72,11 +72,11 @@ function flag(definition) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
const overridesCookie = store.event.cookies.get("vercel-flag-overrides");
|
|
75
|
-
const overrides = overridesCookie ? await
|
|
75
|
+
const overrides = overridesCookie ? await _chunkIGXYQW6Rcjs.decrypt.call(void 0, overridesCookie, store.secret) : void 0;
|
|
76
76
|
if (overrides && hasOwnProperty(overrides, definition.key)) {
|
|
77
77
|
const value2 = overrides[definition.key];
|
|
78
78
|
if (typeof value2 !== "undefined") {
|
|
79
|
-
|
|
79
|
+
_chunkIGXYQW6Rcjs.reportValue.call(void 0, definition.key, value2);
|
|
80
80
|
store.usedFlags[definition.key] = Promise.resolve(value2);
|
|
81
81
|
return value2;
|
|
82
82
|
}
|
|
@@ -91,7 +91,7 @@ function flag(definition) {
|
|
|
91
91
|
);
|
|
92
92
|
store.usedFlags[definition.key] = valuePromise;
|
|
93
93
|
const value = await valuePromise;
|
|
94
|
-
|
|
94
|
+
_chunkIGXYQW6Rcjs.reportValue.call(void 0, definition.key, value);
|
|
95
95
|
return value;
|
|
96
96
|
};
|
|
97
97
|
flagImpl.key = definition.key;
|
|
@@ -141,7 +141,7 @@ function createHandle({
|
|
|
141
141
|
const store = flagStorage.getStore();
|
|
142
142
|
if (!store || Object.keys(store.usedFlags).length === 0)
|
|
143
143
|
return html;
|
|
144
|
-
const encryptedFlagValues = await
|
|
144
|
+
const encryptedFlagValues = await _chunkIGXYQW6Rcjs.encrypt.call(void 0,
|
|
145
145
|
await resolveObjectPromises(store.usedFlags),
|
|
146
146
|
secret
|
|
147
147
|
);
|
|
@@ -155,7 +155,7 @@ function createHandle({
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
async function handleWellKnownFlagsRoute(event, secret, flags) {
|
|
158
|
-
const access = await
|
|
158
|
+
const access = await _chunkIGXYQW6Rcjs.verifyAccess.call(void 0,
|
|
159
159
|
event.request.headers.get("Authorization"),
|
|
160
160
|
secret
|
|
161
161
|
);
|
package/dist/sveltekit.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Handle } from '@sveltejs/kit';
|
|
2
|
-
import { f as FlagDeclaration,
|
|
2
|
+
import { f as FlagDeclaration, G as GenerousOption, J as JsonValue, a as ApiData } from './types-CGpl9epN.cjs';
|
|
3
3
|
import 'http';
|
|
4
4
|
import '@edge-runtime/cookies';
|
|
5
5
|
|
package/dist/sveltekit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Handle } from '@sveltejs/kit';
|
|
2
|
-
import { f as FlagDeclaration,
|
|
2
|
+
import { f as FlagDeclaration, G as GenerousOption, J as JsonValue, a as ApiData } from './types-CGpl9epN.js';
|
|
3
3
|
import 'http';
|
|
4
4
|
import '@edge-runtime/cookies';
|
|
5
5
|
|
package/dist/sveltekit.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flags",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Flags SDK by Vercel - The feature flags toolkit for Next.js and SvelteKit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"feature flags",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"typescript": "5.6.3",
|
|
84
84
|
"vite": "5.1.1",
|
|
85
85
|
"vitest": "1.4.0",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
86
|
+
"tsconfig": "0.0.0",
|
|
87
|
+
"eslint-config-custom": "0.0.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@opentelemetry/api": "^1.7.0",
|