@vercel/flags-core 1.10.1-7d24d3a-20261019072343 → 1.10.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 +10 -2
- package/dist/{chunk-G66DIMET.js → chunk-7A7RG7ST.js} +25 -4
- package/dist/chunk-7A7RG7ST.js.map +1 -0
- package/dist/{chunk-6VX73DME.js → chunk-LGS6CVED.js} +25 -4
- package/dist/chunk-LGS6CVED.js.map +1 -0
- package/dist/{chunk-7K42K6UD.cjs → chunk-POAWPAE3.cjs} +25 -4
- package/dist/chunk-POAWPAE3.cjs.map +1 -0
- package/dist/{chunk-J6QECCZB.cjs → chunk-WVS63L4A.cjs} +25 -4
- package/dist/chunk-WVS63L4A.cjs.map +1 -0
- package/dist/index.default.cjs +2 -2
- package/dist/index.default.d.cts +2 -0
- package/dist/index.default.d.ts +2 -0
- package/dist/index.default.js +1 -1
- package/dist/index.next-js.cjs +2 -2
- package/dist/index.next-js.d.cts +2 -0
- package/dist/index.next-js.d.ts +2 -0
- package/dist/index.next-js.js +1 -1
- package/dist/openfeature.default.cjs +2 -2
- package/dist/openfeature.default.js +1 -1
- package/dist/openfeature.next-js.cjs +2 -2
- package/dist/openfeature.next-js.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6VX73DME.js.map +0 -1
- package/dist/chunk-7K42K6UD.cjs.map +0 -1
- package/dist/chunk-G66DIMET.js.map +0 -1
- package/dist/chunk-J6QECCZB.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
# @vercel/flags-core
|
|
2
2
|
|
|
3
|
-
## 1.10.
|
|
3
|
+
## 1.10.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#567](https://github.com/vercel/flags/pull/567) [`5f738f0`](https://github.com/vercel/flags/commit/5f738f08f182838d0efb13fd3efb89751d48cb0a) Thanks [@vincent-derks](https://github.com/vincent-derks)! - Improve guidance for authorization errors.
|
|
8
|
+
|
|
9
|
+
- [#573](https://github.com/vercel/flags/pull/573) [`e2a1a39`](https://github.com/vercel/flags/commit/e2a1a394e3de4b271c8305bae6cbcf053814ab70) Thanks [@luismeyer](https://github.com/luismeyer)! - Read embedded flag definitions when the client is created, using the SDK key or `VERCEL_PROJECT_ID` in OIDC mode.
|
|
10
|
+
|
|
11
|
+
## 1.10.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#552](https://github.com/vercel/flags/pull/552) [`f02cc66`](https://github.com/vercel/flags/commit/f02cc661a8364aa54994d8ce324bf74dd628d6af) Thanks [@luismeyer](https://github.com/luismeyer)! - Report the flags config `revision` on `FLAG_EVALUATION` usage events, so evaluations can be broken down by the config revision that was served. Evaluations of different revisions are no longer merged into the same aggregated event.
|
|
8
16
|
|
|
9
17
|
## 1.10.0
|
|
10
18
|
|
|
@@ -559,7 +559,7 @@ function bulkEvaluate(flags, shared) {
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
// package.json
|
|
562
|
-
var version = "1.10.
|
|
562
|
+
var version = "1.10.2";
|
|
563
563
|
|
|
564
564
|
// src/lib/report-value.ts
|
|
565
565
|
function internalReportValue(key, value, data) {
|
|
@@ -1087,7 +1087,7 @@ function unauthorizedMessage(sourceProjectId) {
|
|
|
1087
1087
|
if (!sourceProjectId) {
|
|
1088
1088
|
return "unauthorized (401)";
|
|
1089
1089
|
}
|
|
1090
|
-
return `unauthorized (401): this deployment is not allowed to read the flags of project "${sourceProjectId}". Check that the project is connected
|
|
1090
|
+
return `unauthorized (401): this deployment is not allowed to read the flags of project "${sourceProjectId}". Check that the project is connected. See https://vercel.com/docs/flags/vercel-flags/project-connections`;
|
|
1091
1091
|
}
|
|
1092
1092
|
async function getOidcToken() {
|
|
1093
1093
|
try {
|
|
@@ -1142,13 +1142,24 @@ var Authentication = class {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
return await getOidcToken();
|
|
1144
1144
|
}
|
|
1145
|
-
|
|
1145
|
+
getStaticBundledDefinitionsLookup() {
|
|
1146
1146
|
if (this.sdkKey) {
|
|
1147
1147
|
return { type: "sdk-key", sdkKey: this.sdkKey };
|
|
1148
1148
|
}
|
|
1149
1149
|
if (this.sourceProjectId) {
|
|
1150
1150
|
return { type: "project-id", projectId: this.sourceProjectId };
|
|
1151
1151
|
}
|
|
1152
|
+
const projectId = process.env.VERCEL_PROJECT_ID;
|
|
1153
|
+
if (projectId) {
|
|
1154
|
+
return { type: "project-id", projectId };
|
|
1155
|
+
}
|
|
1156
|
+
return void 0;
|
|
1157
|
+
}
|
|
1158
|
+
async resolveBundledDefinitionsLookup() {
|
|
1159
|
+
const lookup = this.getStaticBundledDefinitionsLookup();
|
|
1160
|
+
if (lookup) {
|
|
1161
|
+
return lookup;
|
|
1162
|
+
}
|
|
1152
1163
|
const oidcToken = await this.resolveToken();
|
|
1153
1164
|
return {
|
|
1154
1165
|
type: "project-id",
|
|
@@ -1658,6 +1669,13 @@ var BundledSource = class {
|
|
|
1658
1669
|
}
|
|
1659
1670
|
return void 0;
|
|
1660
1671
|
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Starts reading bundled definitions without waiting for the result.
|
|
1674
|
+
*/
|
|
1675
|
+
preload() {
|
|
1676
|
+
this.getResult().catch(() => {
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1661
1679
|
getResult() {
|
|
1662
1680
|
if (!this.promise) {
|
|
1663
1681
|
this.promise = this.options.readBundledDefinitions(this.options.auth);
|
|
@@ -2853,6 +2871,9 @@ var Controller = class {
|
|
|
2853
2871
|
auth: this.options.auth,
|
|
2854
2872
|
readBundledDefinitions
|
|
2855
2873
|
});
|
|
2874
|
+
if (!this.options.datafile && this.options.auth.getStaticBundledDefinitionsLookup()) {
|
|
2875
|
+
this.bundledSource.preload();
|
|
2876
|
+
}
|
|
2856
2877
|
this.wireSourceEvents();
|
|
2857
2878
|
if (this.options.datafile) {
|
|
2858
2879
|
this.cache.seed(tagData({ ...this.options.datafile }, "provided"));
|
|
@@ -3754,4 +3775,4 @@ export {
|
|
|
3754
3775
|
resetDefaultFlagsClient,
|
|
3755
3776
|
createClient
|
|
3756
3777
|
};
|
|
3757
|
-
//# sourceMappingURL=chunk-
|
|
3778
|
+
//# sourceMappingURL=chunk-7A7RG7ST.js.map
|