@coveo/headless 3.31.0-pre.76f135a68c → 3.31.1-pre.117e2d3e7f
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/cjs/case-assist/headless.cjs +1 -1
- package/dist/cjs/commerce/headless.cjs +1 -1
- package/dist/cjs/headless.cjs +1 -1
- package/dist/cjs/insight/headless.cjs +1 -1
- package/dist/cjs/recommendation/headless.cjs +1 -1
- package/dist/cjs/ssr/headless.cjs +1 -1
- package/dist/cjs/ssr-commerce/headless.cjs +1 -1
- package/dist/cjs/ssr-commerce-next/headless.cjs +20 -23
- package/dist/cjs/ssr-commerce-next/node.cjs.stats.json +1 -1
- package/dist/cjs/ssr-next/headless.cjs +13 -14
- package/dist/cjs/ssr-next/node.cjs.stats.json +1 -1
- package/dist/definitions/ssr/commerce/types/engine.d.ts +2 -0
- package/dist/definitions/ssr/common/types/engine.d.ts +2 -0
- package/dist/definitions/ssr/common/types/utilities.d.ts +3 -0
- package/dist/definitions/ssr-commerce-next.index.d.ts +1 -1
- package/dist/definitions/ssr-next/commerce/engine/commerce-engine.ssr.d.ts +1 -1
- package/dist/definitions/ssr-next/commerce/factories/build-factory.d.ts +1 -1
- package/dist/definitions/ssr-next/commerce/factories/hydrated-state-factory.d.ts +1 -1
- package/dist/definitions/ssr-next/commerce/factories/recommendation-static-state-factory.d.ts +4 -7
- package/dist/definitions/ssr-next/commerce/factories/static-state-factory.d.ts +1 -2
- package/dist/definitions/ssr-next/commerce/types/build.d.ts +2 -2
- package/dist/definitions/ssr-next/commerce/types/controller-definitions.d.ts +2 -2
- package/dist/definitions/ssr-next/commerce/types/engine.d.ts +2 -2
- package/dist/definitions/ssr-next/commerce/types/fetch-static-state.d.ts +2 -2
- package/dist/definitions/ssr-next/commerce/types/hydrate-static-state.d.ts +2 -2
- package/dist/definitions/ssr-next/common/augment-preprocess-request.d.ts +2 -2
- package/dist/definitions/ssr-next/common/types/utilities.d.ts +0 -5
- package/dist/definitions/ssr-next/search/types/build.d.ts +3 -4
- package/dist/definitions/ssr-next/search/types/fetch-static-state.d.ts +1 -2
- package/dist/definitions/ssr-next/search/types/hydrate-static-state.d.ts +1 -2
- package/dist/definitions/test/mock-navigator-context.d.ts +2 -0
- package/dist/esm/ssr-next/commerce/engine/commerce-engine.ssr.js +1 -1
- package/dist/esm/ssr-next/commerce/factories/build-factory.js +4 -4
- package/dist/esm/ssr-next/commerce/factories/hydrated-state-factory.js +2 -2
- package/dist/esm/ssr-next/commerce/factories/recommendation-hydrated-state-factory.js +2 -2
- package/dist/esm/ssr-next/commerce/factories/recommendation-static-state-factory.js +4 -5
- package/dist/esm/ssr-next/commerce/factories/static-state-factory.js +3 -3
- package/dist/esm/ssr-next/commerce/utils/engine-wiring.js +6 -6
- package/dist/esm/ssr-next/common/augment-preprocess-request.js +1 -1
- package/dist/esm/ssr-next/search/engine/search-engine.ssr.js +11 -12
- package/dist/esm/test/mock-navigator-context.js +9 -0
- package/dist/esm/utils/version.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/package.json +1 -1
|
@@ -816,7 +816,7 @@ var import_bueno5 = require("@coveo/bueno");
|
|
|
816
816
|
var import_toolkit7 = require("@reduxjs/toolkit");
|
|
817
817
|
|
|
818
818
|
// src/utils/version.ts
|
|
819
|
-
var VERSION = "3.31.
|
|
819
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
820
820
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
821
821
|
|
|
822
822
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -1165,7 +1165,7 @@ var import_bueno6 = require("@coveo/bueno");
|
|
|
1165
1165
|
var import_toolkit4 = require("@reduxjs/toolkit");
|
|
1166
1166
|
|
|
1167
1167
|
// src/utils/version.ts
|
|
1168
|
-
var VERSION = "3.31.
|
|
1168
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
1169
1169
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1170
1170
|
|
|
1171
1171
|
// src/features/configuration/configuration-actions.ts
|
package/dist/cjs/headless.cjs
CHANGED
|
@@ -1395,7 +1395,7 @@ function isBrowser2() {
|
|
|
1395
1395
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1396
1396
|
|
|
1397
1397
|
// src/utils/version.ts
|
|
1398
|
-
var VERSION = "3.31.
|
|
1398
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
1399
1399
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1400
1400
|
|
|
1401
1401
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -1301,7 +1301,7 @@ function isBrowser2() {
|
|
|
1301
1301
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1302
1302
|
|
|
1303
1303
|
// src/utils/version.ts
|
|
1304
|
-
var VERSION = "3.31.
|
|
1304
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
1305
1305
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1306
1306
|
|
|
1307
1307
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -897,7 +897,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
897
897
|
};
|
|
898
898
|
|
|
899
899
|
// src/utils/version.ts
|
|
900
|
-
var VERSION = "3.31.
|
|
900
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
901
901
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
902
902
|
|
|
903
903
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -1327,7 +1327,7 @@ function isBrowser2() {
|
|
|
1327
1327
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1328
1328
|
|
|
1329
1329
|
// src/utils/version.ts
|
|
1330
|
-
var VERSION = "3.31.
|
|
1330
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
1331
1331
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1332
1332
|
|
|
1333
1333
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -468,7 +468,7 @@ var import_bueno8 = require("@coveo/bueno");
|
|
|
468
468
|
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
469
469
|
|
|
470
470
|
// src/utils/version.ts
|
|
471
|
-
var VERSION = "3.31.
|
|
471
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
472
472
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
473
473
|
|
|
474
474
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -467,7 +467,7 @@ var import_bueno8 = require("@coveo/bueno");
|
|
|
467
467
|
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
468
468
|
|
|
469
469
|
// src/utils/version.ts
|
|
470
|
-
var VERSION = "3.31.
|
|
470
|
+
var VERSION = "3.31.1-pre.117e2d3e7f";
|
|
471
471
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
472
472
|
|
|
473
473
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -18335,7 +18335,7 @@ function augmentPreprocessRequestWithForwardedFor(options) {
|
|
|
18335
18335
|
return async (request, clientOrigin, metadata) => {
|
|
18336
18336
|
if (!isBrowser()) {
|
|
18337
18337
|
const headers = new Headers(request.headers);
|
|
18338
|
-
const forwardedFor = options.
|
|
18338
|
+
const forwardedFor = options.navigatorContext.forwardedFor;
|
|
18339
18339
|
if (forwardedFor) {
|
|
18340
18340
|
headers.set("x-forwarded-for", forwardedFor);
|
|
18341
18341
|
} else {
|
|
@@ -18354,25 +18354,25 @@ function augmentPreprocessRequestWithForwardedFor(options) {
|
|
|
18354
18354
|
}
|
|
18355
18355
|
|
|
18356
18356
|
// src/ssr-next/commerce/utils/engine-wiring.ts
|
|
18357
|
-
var
|
|
18358
|
-
if (!buildConfig.
|
|
18357
|
+
var ensurenavigatorContext = (buildConfig, loggerOptions) => {
|
|
18358
|
+
if (!buildConfig.navigatorContext) {
|
|
18359
18359
|
const logger = buildLogger(loggerOptions);
|
|
18360
18360
|
logger.error(
|
|
18361
|
-
"No
|
|
18361
|
+
"No navigatorContext was provided. This may impact analytics accuracy, personalization, and session tracking. Refer to the Coveo documentation on server-side navigation context for implementation guidance."
|
|
18362
18362
|
);
|
|
18363
18363
|
}
|
|
18364
18364
|
};
|
|
18365
18365
|
function augmentCommerceEngineOptions(engineOptions, buildConfig) {
|
|
18366
18366
|
const { cart, context } = buildConfig;
|
|
18367
|
-
|
|
18367
|
+
ensurenavigatorContext(buildConfig, engineOptions.loggerOptions);
|
|
18368
18368
|
return {
|
|
18369
18369
|
...engineOptions,
|
|
18370
|
-
navigatorContextProvider: buildConfig.
|
|
18370
|
+
navigatorContextProvider: () => buildConfig.navigatorContext,
|
|
18371
18371
|
configuration: {
|
|
18372
18372
|
...engineOptions.configuration,
|
|
18373
18373
|
preprocessRequest: augmentPreprocessRequestWithForwardedFor({
|
|
18374
18374
|
preprocessRequest: engineOptions.configuration.preprocessRequest,
|
|
18375
|
-
|
|
18375
|
+
navigatorContext: buildConfig.navigatorContext,
|
|
18376
18376
|
loggerOptions: engineOptions.loggerOptions
|
|
18377
18377
|
}),
|
|
18378
18378
|
context: {
|
|
@@ -18455,7 +18455,7 @@ function buildSSRCommerceEngine(solutionType, options, recommendationCount) {
|
|
|
18455
18455
|
}
|
|
18456
18456
|
};
|
|
18457
18457
|
}
|
|
18458
|
-
var buildFactory = (controllerDefinitions, options) => (solutionType) => async (
|
|
18458
|
+
var buildFactory = (controllerDefinitions, options) => (solutionType) => async (buildOptions) => {
|
|
18459
18459
|
const controllerProps = wireControllerParams(
|
|
18460
18460
|
solutionType,
|
|
18461
18461
|
controllerDefinitions,
|
|
@@ -18490,12 +18490,12 @@ var buildFactory = (controllerDefinitions, options) => (solutionType) => async (
|
|
|
18490
18490
|
|
|
18491
18491
|
// src/ssr-next/commerce/factories/hydrated-state-factory.ts
|
|
18492
18492
|
function hydratedStaticStateFactory(controllerDefinitions, options) {
|
|
18493
|
-
return (solutionType) => async (
|
|
18493
|
+
return (solutionType) => async (params) => {
|
|
18494
18494
|
const solutionTypeBuild = await buildFactory(
|
|
18495
18495
|
controllerDefinitions,
|
|
18496
18496
|
options
|
|
18497
18497
|
)(solutionType);
|
|
18498
|
-
const { engine, controllers } = await solutionTypeBuild(
|
|
18498
|
+
const { engine, controllers } = await solutionTypeBuild(params);
|
|
18499
18499
|
await engine.waitForRequestCompletedAction();
|
|
18500
18500
|
return { engine, controllers };
|
|
18501
18501
|
};
|
|
@@ -18503,12 +18503,12 @@ function hydratedStaticStateFactory(controllerDefinitions, options) {
|
|
|
18503
18503
|
|
|
18504
18504
|
// src/ssr-next/commerce/factories/recommendation-hydrated-state-factory.ts
|
|
18505
18505
|
function hydratedRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
18506
|
-
return async (
|
|
18506
|
+
return async (params) => {
|
|
18507
18507
|
const solutionTypeBuild = await buildFactory(
|
|
18508
18508
|
controllerDefinitions,
|
|
18509
18509
|
options
|
|
18510
18510
|
)("recommendation" /* recommendation */);
|
|
18511
|
-
const { engine, controllers } = await solutionTypeBuild(
|
|
18511
|
+
const { engine, controllers } = await solutionTypeBuild(params);
|
|
18512
18512
|
await engine.waitForRequestCompletedAction();
|
|
18513
18513
|
return { engine, controllers };
|
|
18514
18514
|
};
|
|
@@ -18516,14 +18516,13 @@ function hydratedRecommendationStaticStateFactory(controllerDefinitions, options
|
|
|
18516
18516
|
|
|
18517
18517
|
// src/ssr-next/commerce/factories/recommendation-static-state-factory.ts
|
|
18518
18518
|
function fetchRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
18519
|
-
return async (
|
|
18520
|
-
const
|
|
18521
|
-
const allowedRecommendationKeys = props?.recommendations;
|
|
18519
|
+
return async (params) => {
|
|
18520
|
+
const allowedRecommendationKeys = params.recommendations;
|
|
18522
18521
|
const solutionTypeBuild = await buildFactory(
|
|
18523
18522
|
controllerDefinitions,
|
|
18524
18523
|
options
|
|
18525
18524
|
)("recommendation" /* recommendation */);
|
|
18526
|
-
const { engine, controllers } = await solutionTypeBuild(
|
|
18525
|
+
const { engine, controllers } = await solutionTypeBuild(params);
|
|
18527
18526
|
filterRecommendationControllers(
|
|
18528
18527
|
controllers,
|
|
18529
18528
|
controllerDefinitions ?? {}
|
|
@@ -18536,8 +18535,7 @@ function fetchRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
|
18536
18535
|
controllers
|
|
18537
18536
|
});
|
|
18538
18537
|
return {
|
|
18539
|
-
...params
|
|
18540
|
-
// TODO: KIT-4754: remove index access after no longer relying on OptionTuple type
|
|
18538
|
+
...params,
|
|
18541
18539
|
...staticState
|
|
18542
18540
|
};
|
|
18543
18541
|
};
|
|
@@ -18545,12 +18543,12 @@ function fetchRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
|
18545
18543
|
|
|
18546
18544
|
// src/ssr-next/commerce/factories/static-state-factory.ts
|
|
18547
18545
|
function fetchStaticStateFactory(controllerDefinitions, options) {
|
|
18548
|
-
return (solutionType) => async (
|
|
18546
|
+
return (solutionType) => async (params) => {
|
|
18549
18547
|
const solutionTypeBuild = await buildFactory(
|
|
18550
18548
|
controllerDefinitions,
|
|
18551
18549
|
options
|
|
18552
18550
|
)(solutionType);
|
|
18553
|
-
const { engine, controllers } = await solutionTypeBuild(
|
|
18551
|
+
const { engine, controllers } = await solutionTypeBuild(params);
|
|
18554
18552
|
switch (solutionType) {
|
|
18555
18553
|
case "listing" /* listing */:
|
|
18556
18554
|
buildProductListing(engine).executeFirstRequest();
|
|
@@ -18567,8 +18565,7 @@ function fetchStaticStateFactory(controllerDefinitions, options) {
|
|
|
18567
18565
|
controllers
|
|
18568
18566
|
});
|
|
18569
18567
|
return {
|
|
18570
|
-
...params
|
|
18571
|
-
// TODO: KIT-4754: remove index access after no longer relying on OptionTuple type
|
|
18568
|
+
...params,
|
|
18572
18569
|
...staticState
|
|
18573
18570
|
};
|
|
18574
18571
|
};
|