@uniformdev/next-app-router 20.71.2-alpha.10 → 20.71.2-alpha.14
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/cache.js +12 -0
- package/dist/cache.mjs +12 -0
- package/dist/index.esm.js +12 -0
- package/dist/index.js +12 -0
- package/dist/index.mjs +12 -0
- package/dist/middleware.js +1 -0
- package/dist/middleware.mjs +1 -0
- package/package.json +8 -8
package/dist/cache.js
CHANGED
|
@@ -1495,6 +1495,17 @@ var RouteClient = class extends ApiClient {
|
|
|
1495
1495
|
);
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1499
|
+
var _a, _b;
|
|
1500
|
+
const dataSourceVariant = (
|
|
1501
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
1502
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
1503
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
|
1504
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
1505
|
+
)
|
|
1506
|
+
);
|
|
1507
|
+
return dataSourceVariant;
|
|
1508
|
+
};
|
|
1498
1509
|
|
|
1499
1510
|
// src/data/client.ts
|
|
1500
1511
|
var import_functions = require("@vercel/functions");
|
|
@@ -2007,6 +2018,7 @@ var DefaultDataClient = class {
|
|
|
2007
2018
|
const originalRoute = {
|
|
2008
2019
|
path: options.pageState.routePath,
|
|
2009
2020
|
state: options.pageState.compositionState,
|
|
2021
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
2010
2022
|
withComponentIDs: true,
|
|
2011
2023
|
releaseId: options.pageState.releaseId,
|
|
2012
2024
|
locale: options.pageState.locale,
|
package/dist/cache.mjs
CHANGED
|
@@ -1482,6 +1482,17 @@ var RouteClient = class extends ApiClient {
|
|
|
1482
1482
|
);
|
|
1483
1483
|
}
|
|
1484
1484
|
};
|
|
1485
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1486
|
+
var _a, _b;
|
|
1487
|
+
const dataSourceVariant = (
|
|
1488
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
1489
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
1490
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
|
1491
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
1492
|
+
)
|
|
1493
|
+
);
|
|
1494
|
+
return dataSourceVariant;
|
|
1495
|
+
};
|
|
1485
1496
|
|
|
1486
1497
|
// src/data/client.ts
|
|
1487
1498
|
import { getCache, waitUntil } from "@vercel/functions";
|
|
@@ -1994,6 +2005,7 @@ var DefaultDataClient = class {
|
|
|
1994
2005
|
const originalRoute = {
|
|
1995
2006
|
path: options.pageState.routePath,
|
|
1996
2007
|
state: options.pageState.compositionState,
|
|
2008
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
1997
2009
|
withComponentIDs: true,
|
|
1998
2010
|
releaseId: options.pageState.releaseId,
|
|
1999
2011
|
locale: options.pageState.locale,
|
package/dist/index.esm.js
CHANGED
|
@@ -2045,6 +2045,17 @@ var RouteClient = class extends ApiClient {
|
|
|
2045
2045
|
);
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2049
|
+
var _a, _b;
|
|
2050
|
+
const dataSourceVariant = (
|
|
2051
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2052
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2053
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
|
2054
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2055
|
+
)
|
|
2056
|
+
);
|
|
2057
|
+
return dataSourceVariant;
|
|
2058
|
+
};
|
|
2048
2059
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2049
2060
|
if (!slot) return [];
|
|
2050
2061
|
return slot.map((v, i) => {
|
|
@@ -3923,6 +3934,7 @@ var DefaultDataClient = class {
|
|
|
3923
3934
|
const originalRoute = {
|
|
3924
3935
|
path: options.pageState.routePath,
|
|
3925
3936
|
state: options.pageState.compositionState,
|
|
3937
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3926
3938
|
withComponentIDs: true,
|
|
3927
3939
|
releaseId: options.pageState.releaseId,
|
|
3928
3940
|
locale: options.pageState.locale,
|
package/dist/index.js
CHANGED
|
@@ -2072,6 +2072,17 @@ var RouteClient = class extends ApiClient {
|
|
|
2072
2072
|
);
|
|
2073
2073
|
}
|
|
2074
2074
|
};
|
|
2075
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2076
|
+
var _a, _b;
|
|
2077
|
+
const dataSourceVariant = (
|
|
2078
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2079
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2080
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
|
2081
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2082
|
+
)
|
|
2083
|
+
);
|
|
2084
|
+
return dataSourceVariant;
|
|
2085
|
+
};
|
|
2075
2086
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2076
2087
|
if (!slot) return [];
|
|
2077
2088
|
return slot.map((v, i) => {
|
|
@@ -3944,6 +3955,7 @@ var DefaultDataClient = class {
|
|
|
3944
3955
|
const originalRoute = {
|
|
3945
3956
|
path: options.pageState.routePath,
|
|
3946
3957
|
state: options.pageState.compositionState,
|
|
3958
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3947
3959
|
withComponentIDs: true,
|
|
3948
3960
|
releaseId: options.pageState.releaseId,
|
|
3949
3961
|
locale: options.pageState.locale,
|
package/dist/index.mjs
CHANGED
|
@@ -2045,6 +2045,17 @@ var RouteClient = class extends ApiClient {
|
|
|
2045
2045
|
);
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
|
+
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
2049
|
+
var _a, _b;
|
|
2050
|
+
const dataSourceVariant = (
|
|
2051
|
+
// support explicit 'undefined' as a way to opt out of data resources variant
|
|
2052
|
+
"dataSourceVariant" in params ? params.dataSourceVariant : (
|
|
2053
|
+
// in case of DRAFT state we still want to fetch unpublished data
|
|
2054
|
+
((_b = (_a = params == null ? void 0 : params.state) != null ? _a : defaultPreviewState) != null ? _b : CANVAS_PUBLISHED_STATE) !== CANVAS_PUBLISHED_STATE ? "unpublished" : void 0
|
|
2055
|
+
)
|
|
2056
|
+
);
|
|
2057
|
+
return dataSourceVariant;
|
|
2058
|
+
};
|
|
2048
2059
|
function mapSlotToPersonalizedVariations(slot) {
|
|
2049
2060
|
if (!slot) return [];
|
|
2050
2061
|
return slot.map((v, i) => {
|
|
@@ -3923,6 +3934,7 @@ var DefaultDataClient = class {
|
|
|
3923
3934
|
const originalRoute = {
|
|
3924
3935
|
path: options.pageState.routePath,
|
|
3925
3936
|
state: options.pageState.compositionState,
|
|
3937
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3926
3938
|
withComponentIDs: true,
|
|
3927
3939
|
releaseId: options.pageState.releaseId,
|
|
3928
3940
|
locale: options.pageState.locale,
|
package/dist/middleware.js
CHANGED
|
@@ -3024,6 +3024,7 @@ var DefaultDataClient = class {
|
|
|
3024
3024
|
const originalRoute = {
|
|
3025
3025
|
path: options.pageState.routePath,
|
|
3026
3026
|
state: options.pageState.compositionState,
|
|
3027
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3027
3028
|
withComponentIDs: true,
|
|
3028
3029
|
releaseId: options.pageState.releaseId,
|
|
3029
3030
|
locale: options.pageState.locale,
|
package/dist/middleware.mjs
CHANGED
|
@@ -3011,6 +3011,7 @@ var DefaultDataClient = class {
|
|
|
3011
3011
|
const originalRoute = {
|
|
3012
3012
|
path: options.pageState.routePath,
|
|
3013
3013
|
state: options.pageState.compositionState,
|
|
3014
|
+
dataSourceVariant: getDataSourceVariantFromRouteGetParams({}, options.pageState.compositionState),
|
|
3014
3015
|
withComponentIDs: true,
|
|
3015
3016
|
releaseId: options.pageState.releaseId,
|
|
3016
3017
|
locale: options.pageState.locale,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/next-app-router",
|
|
3
|
-
"version": "20.71.2-alpha.
|
|
3
|
+
"version": "20.71.2-alpha.14+e527b409ae",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"vitest": "4.1.9"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@uniformdev/canvas-react": "20.71.2-alpha.
|
|
102
|
-
"@uniformdev/next-app-router-client": "20.71.2-alpha.
|
|
103
|
-
"@uniformdev/next-app-router-shared": "20.71.2-alpha.
|
|
104
|
-
"@uniformdev/redirect": "20.71.2-alpha.
|
|
105
|
-
"@uniformdev/richtext": "20.71.2-alpha.
|
|
106
|
-
"@uniformdev/webhooks": "20.71.2-alpha.
|
|
101
|
+
"@uniformdev/canvas-react": "20.71.2-alpha.14+e527b409ae",
|
|
102
|
+
"@uniformdev/next-app-router-client": "20.71.2-alpha.14+e527b409ae",
|
|
103
|
+
"@uniformdev/next-app-router-shared": "20.71.2-alpha.14+e527b409ae",
|
|
104
|
+
"@uniformdev/redirect": "20.71.2-alpha.14+e527b409ae",
|
|
105
|
+
"@uniformdev/richtext": "20.71.2-alpha.14+e527b409ae",
|
|
106
|
+
"@uniformdev/webhooks": "20.71.2-alpha.14+e527b409ae",
|
|
107
107
|
"@vercel/functions": "^3.7.2",
|
|
108
108
|
"encoding": "^0.1.13",
|
|
109
109
|
"server-only": "^0.0.1",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"publishConfig": {
|
|
121
121
|
"access": "public"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "e527b409ae4d2b190d4f9195e6787f5c8b89fc85"
|
|
124
124
|
}
|