@coveo/headless 3.28.4-pre.290ee6820e → 3.28.4-pre.2fd8f6feda
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 +2 -3
- package/dist/cjs/ssr-commerce/node.cjs.stats.json +1 -1
- package/dist/cjs/ssr-commerce-next/headless.cjs +2 -3
- package/dist/cjs/ssr-commerce-next/node.cjs.stats.json +1 -1
- package/dist/cjs/ssr-next/headless.cjs +1 -1
- package/dist/definitions/ssr/commerce/controllers/context/headless-context.ssr.d.ts +10 -86
- package/dist/definitions/ssr/commerce/types/fetch-static-state.d.ts +0 -4
- package/dist/definitions/ssr/common/types/build.d.ts +0 -3
- package/dist/definitions/ssr/common/types/engine.d.ts +0 -3
- package/dist/definitions/ssr-commerce-next.index.d.ts +3 -3
- package/dist/definitions/ssr-next/commerce/factories/build-factory.d.ts +4 -6
- package/dist/definitions/ssr-next/commerce/factories/recommendation-static-state-factory.d.ts +1 -2
- package/dist/definitions/ssr-next/commerce/factories/static-state-factory.d.ts +1 -2
- package/dist/definitions/ssr-next/commerce/types/build.d.ts +7 -33
- package/dist/definitions/ssr-next/commerce/types/controller-definitions.d.ts +2 -38
- package/dist/definitions/ssr-next/commerce/types/engine.d.ts +7 -22
- package/dist/definitions/ssr-next/commerce/types/fetch-static-state.d.ts +3 -3
- package/dist/definitions/ssr-next/common/types/fetch-static-state.d.ts +3 -1
- package/dist/esm/ssr/commerce/controllers/context/headless-context.ssr.js +7 -3
- package/dist/esm/ssr/commerce/types/kind.js +0 -1
- package/dist/esm/ssr-next/commerce/engine/commerce-engine.ssr.js +4 -15
- package/dist/esm/ssr-next/commerce/factories/build-factory.js +3 -2
- package/dist/esm/ssr-next/commerce/factories/hydrated-state-factory.js +4 -4
- package/dist/esm/ssr-next/commerce/factories/recommendation-hydrated-state-factory.js +1 -3
- package/dist/esm/ssr-next/commerce/factories/recommendation-static-state-factory.js +0 -2
- package/dist/esm/ssr-next/commerce/factories/static-state-factory.js +3 -3
- 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
- package/dist/definitions/ssr-next/commerce/types/utilities.d.ts +0 -6
- package/dist/definitions/ssr-next/commerce/utils/controller-wiring.d.ts +0 -3
- package/dist/definitions/ssr-next/commerce/utils/engine-wiring.d.ts +0 -5
- package/dist/definitions/ssr-next/commerce/validation/controller-validation.d.ts +0 -1
- package/dist/definitions/test/mock-controller-definitions.d.ts +0 -54
- package/dist/esm/ssr-next/commerce/types/utilities.js +0 -1
- package/dist/esm/ssr-next/commerce/utils/controller-wiring.js +0 -3
- package/dist/esm/ssr-next/commerce/utils/engine-wiring.js +0 -4
- package/dist/esm/ssr-next/commerce/validation/controller-validation.js +0 -7
- package/dist/esm/test/mock-controller-definitions.js +0 -66
|
@@ -1306,7 +1306,7 @@ var import_toolkit2 = require("@reduxjs/toolkit");
|
|
|
1306
1306
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1307
1307
|
|
|
1308
1308
|
// src/utils/version.ts
|
|
1309
|
-
var VERSION = "3.28.4-pre.
|
|
1309
|
+
var VERSION = "3.28.4-pre.2fd8f6feda";
|
|
1310
1310
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1311
1311
|
|
|
1312
1312
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -1,88 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
interface
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated This property will be removed in the next major release.
|
|
7
|
-
* Use `initialState.language` instead for consistency with other controllers.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* // Current (deprecated):
|
|
12
|
-
* { language: 'fr'}
|
|
13
|
-
*
|
|
14
|
-
* // Future
|
|
15
|
-
* { initialState: { language: 'fr'} }
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
language: never;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated This property will be removed in the next major release.
|
|
21
|
-
* Use `initialState.country` instead for consistency with other controllers.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* // Current (deprecated):
|
|
26
|
-
* { country: 'CA'}
|
|
27
|
-
*
|
|
28
|
-
* // Future
|
|
29
|
-
* { initialState: { country: 'CA'} }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
country: never;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated This property will be removed in the next major release.
|
|
35
|
-
* Use `initialState.currency` instead for consistency with other controllers.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* // Current (deprecated):
|
|
40
|
-
* { currency: 'CAD'}
|
|
41
|
-
*
|
|
42
|
-
* // Future
|
|
43
|
-
* { initialState: { currency: 'CAD'} }
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
currency: never;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated This property will be removed in the next major release.
|
|
49
|
-
* Use `initialState.view` instead for consistency with other controllers.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* // Current (deprecated):
|
|
54
|
-
* { view: '{}'}
|
|
55
|
-
*
|
|
56
|
-
* // Future
|
|
57
|
-
* { initialState: { view: '{}'} }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
view: never;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated This property will be removed in the next major release.
|
|
63
|
-
* Use `initialState.location` instead for consistency with other controllers.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* // Current (deprecated):
|
|
68
|
-
* { location: '...'}
|
|
69
|
-
*
|
|
70
|
-
* // Future
|
|
71
|
-
* { initialState: { location: '...'} }
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
location?: never;
|
|
75
|
-
}
|
|
76
|
-
interface ContextDefinitionProps {
|
|
77
|
-
/**
|
|
78
|
-
* The initial state for the context controller.
|
|
79
|
-
* This is the recommended way to pass context options.
|
|
80
|
-
*/
|
|
81
|
-
initialState: ContextOptions;
|
|
82
|
-
}
|
|
83
|
-
type ContextDefinitionOptions = DeprecatedContextOption | ContextDefinitionProps;
|
|
84
|
-
export type { Context, BaseContextProps as ContextProps, ContextState, View, UserLocation, ContextOptions, };
|
|
85
|
-
export interface ContextDefinition extends UniversalControllerDefinitionWithProps<Context, ContextDefinitionOptions> {
|
|
86
|
-
buildWithProps: (engine: SSRCommerceEngine, props: ContextDefinitionOptions) => Context & ControllerWithKind;
|
|
1
|
+
import { type Context, type ContextOptions, type ContextProps, type ContextState, type UserLocation, type View } from '../../../../controllers/commerce/context/headless-context.js';
|
|
2
|
+
import type { UniversalControllerDefinitionWithProps } from '../../types/controller-definitions.js';
|
|
3
|
+
export type { Context, ContextProps, ContextState, View, UserLocation, ContextOptions, };
|
|
4
|
+
export interface ContextDefinition extends UniversalControllerDefinitionWithProps<Context, ContextOptions> {
|
|
87
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Defines a `Context` controller instance.
|
|
8
|
+
* @group Definers
|
|
9
|
+
*
|
|
10
|
+
* @returns The `Context` controller definition.
|
|
11
|
+
*/
|
|
88
12
|
export declare function defineContext(): ContextDefinition;
|
|
@@ -5,10 +5,6 @@ import type { SolutionType } from './controller-constants.js';
|
|
|
5
5
|
import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, OptionsTuple } from './controller-definitions.js';
|
|
6
6
|
import type { EngineStaticState } from './engine.js';
|
|
7
7
|
import type { FromBuildResult } from './from-build-result.js';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated This interface will be remove on the next major version.
|
|
10
|
-
* Use BuildConfig interface instead
|
|
11
|
-
*/
|
|
12
8
|
export type FetchStaticStateOptions = {};
|
|
13
9
|
export type FetchStaticState<TControllers extends ControllersMap, TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = {
|
|
14
10
|
/**
|
|
@@ -3,9 +3,6 @@ import type { ControllersMap, ControllersPropsMap } from './controllers.js';
|
|
|
3
3
|
import type { EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './engine.js';
|
|
4
4
|
import type { OptionsExtender, OptionsTuple } from './utilities.js';
|
|
5
5
|
interface BuildOptions<TEngineOptions> {
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated This option will be removed in the next major version.
|
|
8
|
-
*/
|
|
9
6
|
extend?: OptionsExtender<TEngineOptions>;
|
|
10
7
|
}
|
|
11
8
|
export type Build<TEngine extends CoreEngine | CoreEngineNext, TEngineOptions, TControllersMap extends ControllersMap, TControllersProps extends ControllersPropsMap> = (...params: OptionsTuple<BuildOptions<TEngineOptions> & EngineDefinitionControllersPropsOption<TControllersProps>>) => Promise<EngineDefinitionBuildResult<TEngine, TControllersMap>>;
|
|
@@ -38,9 +38,6 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
|
|
|
38
38
|
*/
|
|
39
39
|
build: Build<TEngine, TEngineOptions, InferControllersMapFromDefinition<TControllers>, InferControllerPropsMapFromDefinitions<TControllers>>;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated Use SearchEngineDefinitionBuildResult or CommerceEngineDefinitionBuildResult instead
|
|
43
|
-
*/
|
|
44
41
|
export interface EngineDefinitionBuildResult<TEngine extends CoreEngine | CoreEngineNext, TControllers extends ControllersMap> {
|
|
45
42
|
engine: TEngine;
|
|
46
43
|
controllers: TControllers;
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
*/
|
|
69
69
|
export type { Relay } from '@coveo/relay';
|
|
70
70
|
export type { Middleware, Unsubscribe } from '@reduxjs/toolkit';
|
|
71
|
+
export type { CommerceEngineOptions } from './app/commerce-engine/commerce-engine.js';
|
|
71
72
|
export type { CommerceEngineConfiguration } from './app/commerce-engine/commerce-engine-configuration.js';
|
|
72
73
|
export { getSampleCommerceEngineConfiguration } from './app/commerce-engine/commerce-engine-configuration.js';
|
|
73
74
|
export type { CoreEngineNext, ExternalEngineOptions } from './app/engine.js';
|
|
@@ -118,11 +119,10 @@ export type { RedirectionTrigger, RedirectionTriggerDefinition, RedirectionTrigg
|
|
|
118
119
|
export { defineRedirectionTrigger } from './ssr-next/commerce/controllers/triggers/headless-redirection-trigger.ssr.js';
|
|
119
120
|
export { defineCommerceEngine } from './ssr-next/commerce/engine/commerce-engine.ssr.js';
|
|
120
121
|
export type { CommerceEngineDefinitionOptions, SSRCommerceEngine as CommerceEngine, } from './ssr-next/commerce/factories/build-factory.js';
|
|
121
|
-
export type { BuildConfig, SSRCommerceEngineOptions, } from './ssr-next/commerce/types/build.js';
|
|
122
122
|
export { SolutionType } from './ssr-next/commerce/types/controller-constants.js';
|
|
123
|
-
export type {
|
|
123
|
+
export type { ControllerDefinition, ControllerDefinitionsMap, ControllerWithKind, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption, HydratedState, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, OptionsTuple, } from './ssr-next/commerce/types/controller-definitions.js';
|
|
124
124
|
export type { InferControllerFromDefinition, InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllersMapFromDefinition, InferHydratedState, InferStaticState, } from './ssr-next/commerce/types/controller-inference.js';
|
|
125
|
-
export type { CommerceEngineDefinition, EngineStaticState, FetchStaticState, HydrateStaticState, HydrateStaticStateOptions, } from './ssr-next/commerce/types/engine.js';
|
|
125
|
+
export type { CommerceEngineDefinition, EngineStaticState, FetchStaticState, FetchStaticStateOptions, HydrateStaticState, HydrateStaticStateOptions, } from './ssr-next/commerce/types/engine.js';
|
|
126
126
|
export { Kind } from './ssr-next/commerce/types/kind.js';
|
|
127
127
|
export type { CommerceAppState, CommerceProductListingParametersState, CommerceSearchParametersState, } from './state/commerce-app-state.js';
|
|
128
128
|
export * from './features/commerce/configuration/configuration-actions-loader.js';
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { Action } from '@reduxjs/toolkit';
|
|
2
|
-
import { type CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js';
|
|
2
|
+
import { type CommerceEngine, type CommerceEngineOptions } from '../../../app/commerce-engine/commerce-engine.js';
|
|
3
3
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
4
|
-
import type { SSRCommerceEngineOptions } from '../types/build.js';
|
|
5
4
|
import { SolutionType } from '../types/controller-constants.js';
|
|
6
|
-
import type { ControllerDefinitionsMap
|
|
7
|
-
import type { InferControllersMapFromDefinition } from '../types/controller-inference.js';
|
|
5
|
+
import type { ControllerDefinitionsMap } from '../types/controller-definitions.js';
|
|
8
6
|
import type { BuildParameters, CommerceControllerDefinitionsMap, EngineDefinitionOptions } from '../types/engine.js';
|
|
9
7
|
/**
|
|
10
8
|
* The SSR commerce engine.
|
|
@@ -17,8 +15,8 @@ export interface SSRCommerceEngine extends CommerceEngine {
|
|
|
17
15
|
*/
|
|
18
16
|
waitForRequestCompletedAction(): Promise<Action>[];
|
|
19
17
|
}
|
|
20
|
-
export type CommerceEngineDefinitionOptions<TControllers extends ControllerDefinitionsMap<Controller> = ControllerDefinitionsMap<Controller>> = EngineDefinitionOptions<
|
|
18
|
+
export type CommerceEngineDefinitionOptions<TControllers extends ControllerDefinitionsMap<Controller> = ControllerDefinitionsMap<Controller>> = EngineDefinitionOptions<CommerceEngineOptions, TControllers>;
|
|
21
19
|
export declare const buildFactory: <TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>) => <T extends SolutionType>(solutionType: T) => (...[buildOptions]: BuildParameters<TControllerDefinitions>) => Promise<{
|
|
22
20
|
engine: SSRCommerceEngine;
|
|
23
|
-
controllers: InferControllersMapFromDefinition<TControllerDefinitions, T
|
|
21
|
+
controllers: import("../types/controller-inference.js").InferControllersMapFromDefinition<TControllerDefinitions, T>;
|
|
24
22
|
}>;
|
package/dist/definitions/ssr-next/commerce/factories/recommendation-static-state-factory.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AugmentedControllerDefinition } from '../types/controller-definitions.js';
|
|
2
1
|
import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/engine.js';
|
|
3
2
|
import { type CommerceEngineDefinitionOptions } from './build-factory.js';
|
|
4
|
-
export declare function fetchRecommendationStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions:
|
|
3
|
+
export declare function fetchRecommendationStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>): FetchStaticStateFunction<TControllerDefinitions>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SolutionType } from '../types/controller-constants.js';
|
|
2
|
-
import type { AugmentedControllerDefinition } from '../types/controller-definitions.js';
|
|
3
2
|
import type { CommerceControllerDefinitionsMap, FetchStaticStateFunction } from '../types/engine.js';
|
|
4
3
|
import { type CommerceEngineDefinitionOptions } from './build-factory.js';
|
|
5
|
-
export declare function fetchStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions:
|
|
4
|
+
export declare function fetchStaticStateFactory<TControllerDefinitions extends CommerceControllerDefinitionsMap>(controllerDefinitions: TControllerDefinitions | undefined, options: CommerceEngineDefinitionOptions<TControllerDefinitions>): (solutionType: SolutionType) => FetchStaticStateFunction<TControllerDefinitions>;
|
|
@@ -1,40 +1,14 @@
|
|
|
1
|
-
import type { CurrencyCodeISO4217 } from '@coveo/relay-event-types';
|
|
2
|
-
import type { CommerceEngineOptions } from '../../../app/commerce-engine/commerce-engine.js';
|
|
3
1
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
4
2
|
import type { ControllersMap, ControllersPropsMap } from '../../common/types/controllers.js';
|
|
5
|
-
import type { OptionsTuple } from '../../common/types/utilities.js';
|
|
6
|
-
import type {
|
|
7
|
-
import type { UserLocation } from '../controllers/context/headless-context.ssr.js';
|
|
8
|
-
import type { ParameterManagerState, Parameters } from '../controllers/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
3
|
+
import type { OptionsExtender, OptionsTuple } from '../../common/types/utilities.js';
|
|
4
|
+
import type { SSRCommerceEngine } from '../factories/build-factory.js';
|
|
9
5
|
import type { SolutionType } from './controller-constants.js';
|
|
10
|
-
import type {
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import type { ControllerDefinitionsMap, EngineDefinitionBuildResult, EngineDefinitionControllersPropsOption } from './controller-definitions.js';
|
|
7
|
+
interface BuildOptions<TEngineOptions> {
|
|
8
|
+
extend?: OptionsExtender<TEngineOptions>;
|
|
13
9
|
}
|
|
14
|
-
export interface RecommendationBuildConfig extends CommonBuildConfig {
|
|
15
|
-
recommendations?: [];
|
|
16
|
-
}
|
|
17
|
-
export interface ListingBuildConfig extends CommonBuildConfig {
|
|
18
|
-
}
|
|
19
|
-
export interface StandaloneBuildConfig extends CommonBuildConfig {
|
|
20
|
-
}
|
|
21
|
-
export interface CommonBuildConfig {
|
|
22
|
-
url: string;
|
|
23
|
-
language: string;
|
|
24
|
-
country: string;
|
|
25
|
-
currency: CurrencyCodeISO4217;
|
|
26
|
-
location?: UserLocation;
|
|
27
|
-
cart?: CartInitialState;
|
|
28
|
-
searchParams?: Omit<ParameterManagerState<Parameters>['parameters'], 'q'>;
|
|
29
|
-
}
|
|
30
|
-
export type BuildConfig<TSolutionType extends SolutionType> = TSolutionType extends SolutionType.search ? SearchBuildConfig : TSolutionType extends SolutionType.listing ? ListingBuildConfig : TSolutionType extends SolutionType.recommendation ? RecommendationBuildConfig : TSolutionType extends SolutionType.standalone ? CommonBuildConfig : never;
|
|
31
|
-
/**
|
|
32
|
-
* Commerce engine options for SSR scenarios where context is defined when fetching static state.
|
|
33
|
-
*/
|
|
34
|
-
export type SSRCommerceEngineOptions = Omit<CommerceEngineOptions, 'configuration'> & {
|
|
35
|
-
configuration: Omit<CommerceEngineOptions['configuration'], 'context'>;
|
|
36
|
-
};
|
|
37
10
|
/**
|
|
38
11
|
* @internal
|
|
39
12
|
*/
|
|
40
|
-
export type Build<TControllersMap extends ControllersMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = (...params: OptionsTuple<
|
|
13
|
+
export type Build<TEngineOptions, TControllersMap extends ControllersMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = (...params: OptionsTuple<BuildOptions<TEngineOptions> & EngineDefinitionControllersPropsOption<TControllersDefinitionsMap, TControllersProps, TSolutionType>>) => Promise<EngineDefinitionBuildResult<SSRCommerceEngine, TControllersMap>>;
|
|
14
|
+
export {};
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
2
2
|
import type { InvalidControllerDefinition } from '../../common/errors.js';
|
|
3
3
|
import type { ControllersPropsMap } from '../../common/types/controllers.js';
|
|
4
|
+
import type { EngineDefinitionBuildResult } from '../../common/types/engine.js';
|
|
4
5
|
import type { HydratedState } from '../../common/types/hydrate-static-state.js';
|
|
5
6
|
import type { InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers } from '../../common/types/inference.js';
|
|
6
7
|
import type { HasKey, HasOptionalKeys, HasRequiredKeys, OptionsTuple } from '../../common/types/utilities.js';
|
|
7
|
-
import type { CartDefinition } from '../controllers/cart/headless-cart.ssr.js';
|
|
8
|
-
import type { ContextDefinition } from '../controllers/context/headless-context.ssr.js';
|
|
9
|
-
import type { ParameterManagerDefinition } from '../controllers/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
10
8
|
import type { SSRCommerceEngine } from '../factories/build-factory.js';
|
|
11
9
|
import { type recommendationInternalOptionKey, SolutionType } from './controller-constants.js';
|
|
12
10
|
import type { ListingAndStandaloneController, ListingOnlyController, NonRecommendationController, RecommendationOnlyController, SearchAndListingController, SearchOnlyController, UniversalController } from './controller-scopes.js';
|
|
13
|
-
import type { BakedInControllers, CommerceEngineDefinitionBuildResult } from './engine.js';
|
|
14
11
|
import type { Kind } from './kind.js';
|
|
15
|
-
|
|
16
|
-
export type { CommerceEngineDefinitionBuildResult, HydratedState, OptionsTuple, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, };
|
|
12
|
+
export type { EngineDefinitionBuildResult, HydratedState, OptionsTuple, InferControllerStaticStateFromController, InferControllerStaticStateMapFromControllers, };
|
|
17
13
|
export type RecommendationControllerSettings = {
|
|
18
14
|
/**
|
|
19
15
|
* Toggle to enable or disable the recommendation controller.
|
|
@@ -57,38 +53,6 @@ export type ControllerDefinition<TController extends Controller> = SolutionTypeA
|
|
|
57
53
|
export interface ControllerDefinitionsMap<TController extends Controller> {
|
|
58
54
|
[customName: string]: ControllerDefinition<TController>;
|
|
59
55
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Map of baked-in controller definitions
|
|
62
|
-
*/
|
|
63
|
-
export type BakedInControllerDefinitions = {
|
|
64
|
-
parameterManager: ParameterManagerDefinition<{
|
|
65
|
-
listing: true;
|
|
66
|
-
search: true;
|
|
67
|
-
}>;
|
|
68
|
-
context: ContextDefinition;
|
|
69
|
-
cart: CartDefinition;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* A dynamically filtered map of baked-in controller definitions based on solution type compatibility.
|
|
73
|
-
*
|
|
74
|
-
* This type automatically includes only the baked-in controllers that are available for the specified
|
|
75
|
-
* solution type by checking each controller's `SolutionTypeAvailability` configuration. Controllers
|
|
76
|
-
* that don't support the given solution type are excluded from the resulting type.
|
|
77
|
-
*
|
|
78
|
-
* @template TSolutionType - The target solution type to filter controllers for
|
|
79
|
-
*/
|
|
80
|
-
export type FilteredBakedInControllers<TSolutionType extends SolutionType> = {
|
|
81
|
-
[K in keyof BakedInControllers as HasSolutionType<BakedInControllerDefinitions[K], TSolutionType> extends true ? K : never]: BakedInControllers[K];
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Map of controller definitions available to the commerce engine definition.
|
|
85
|
-
*
|
|
86
|
-
* This type combines user-defined controllers with the system's baked-in controllers
|
|
87
|
-
* (parameterManager, context, and cart).
|
|
88
|
-
*
|
|
89
|
-
* @template TControllerDefinitions - The controller definitions map
|
|
90
|
-
*/
|
|
91
|
-
export type AugmentedControllerDefinition<TControllerDefinitions extends ControllerDefinitionsMap<Controller>> = TControllerDefinitions & BakedInControllerDefinitions;
|
|
92
56
|
/**
|
|
93
57
|
* This type defines the required and optional controller props for the engine definition.
|
|
94
58
|
*/
|
|
@@ -1,34 +1,28 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { CommerceEngineOptions } from '../../../app/commerce-engine/commerce-engine.js';
|
|
2
3
|
import type { EngineConfiguration } from '../../../app/engine-configuration.js';
|
|
3
4
|
import type { NavigatorContextProvider } from '../../../app/navigator-context-provider.js';
|
|
4
5
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
5
|
-
import type { ControllerStaticStateMap
|
|
6
|
-
import type { Cart } from '../controllers/cart/headless-cart.ssr.js';
|
|
7
|
-
import type { Context } from '../controllers/context/headless-context.ssr.js';
|
|
8
|
-
import type { ParameterManager, Parameters as ParameterManagerParameters } from '../controllers/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
6
|
+
import type { ControllerStaticStateMap } from '../../common/types/controllers.js';
|
|
9
7
|
import type { SSRCommerceEngine } from '../factories/build-factory.js';
|
|
10
8
|
import type { Build } from './build.js';
|
|
11
9
|
import type { SolutionType } from './controller-constants.js';
|
|
12
10
|
import type { ControllerDefinitionsMap } from './controller-definitions.js';
|
|
13
11
|
import type { InferControllerPropsMapFromDefinitions, InferControllerStaticStateMapFromDefinitionsWithSolutionType, InferControllersMapFromDefinition } from './controller-inference.js';
|
|
14
|
-
import type { FetchStaticState } from './fetch-static-state.js';
|
|
12
|
+
import type { FetchStaticState, FetchStaticStateOptions } from './fetch-static-state.js';
|
|
15
13
|
import type { HydrateStaticState, HydrateStaticStateOptions } from './hydrate-static-state.js';
|
|
16
|
-
export type { HydrateStaticState, HydrateStaticStateOptions, FetchStaticState };
|
|
14
|
+
export type { HydrateStaticState, HydrateStaticStateOptions, FetchStaticState, FetchStaticStateOptions, };
|
|
17
15
|
export interface EngineStaticState<TSearchAction extends UnknownAction, TControllers extends ControllerStaticStateMap> {
|
|
18
16
|
searchActions: TSearchAction[];
|
|
19
17
|
controllers: TControllers;
|
|
20
18
|
}
|
|
21
|
-
type ReservedControllerNames = 'context' | 'parameterManager' | 'cart';
|
|
22
|
-
type ValidateControllerNames<T extends ControllerDefinitionsMap<Controller>> = {
|
|
23
|
-
[K in keyof T]: K extends ReservedControllerNames ? `ERROR: Controller name "${K & string}" is reserved and cannot be used. Reserved names are: context, parameterManager, cart. Please choose a different controller name.` : T[K];
|
|
24
|
-
};
|
|
25
19
|
export type EngineDefinitionOptions<TOptions extends {
|
|
26
20
|
configuration: EngineConfiguration;
|
|
27
21
|
}, TControllers extends ControllerDefinitionsMap<Controller>> = TOptions & {
|
|
28
22
|
/**
|
|
29
23
|
* The controllers to initialize with the commerce engine.
|
|
30
24
|
*/
|
|
31
|
-
controllers?:
|
|
25
|
+
controllers?: TControllers;
|
|
32
26
|
};
|
|
33
27
|
export interface CommerceEngineDefinition<TControllers extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> {
|
|
34
28
|
/**
|
|
@@ -56,24 +50,15 @@ export interface CommerceEngineDefinition<TControllers extends ControllerDefinit
|
|
|
56
50
|
*/
|
|
57
51
|
setAccessToken: (accessToken: string) => void;
|
|
58
52
|
}
|
|
59
|
-
export interface BakedInControllers {
|
|
60
|
-
parameterManager: ParameterManager<ParameterManagerParameters>;
|
|
61
|
-
context: Context;
|
|
62
|
-
cart: Cart;
|
|
63
|
-
}
|
|
64
|
-
export interface CommerceEngineDefinitionBuildResult<TControllers extends ControllersMap> {
|
|
65
|
-
engine: SSRCommerceEngine;
|
|
66
|
-
controllers: TControllers & BakedInControllers;
|
|
67
|
-
}
|
|
68
53
|
export type CommerceControllerDefinitionsMap = ControllerDefinitionsMap<Controller>;
|
|
69
54
|
type Definition<TControllerDefinitions extends CommerceControllerDefinitionsMap> = CommerceEngineDefinition<TControllerDefinitions, SolutionType>;
|
|
70
55
|
export type FetchStaticStateFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['fetchStaticState'];
|
|
71
56
|
export type HydrateStaticStateFunction<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Definition<TControllerDefinitions>['hydrateStaticState'];
|
|
72
|
-
export type BuildParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<Build<InferControllersMapFromDefinition<TControllerDefinitions, SolutionType>, InferControllerPropsMapFromDefinitions<TControllerDefinitions>, TControllerDefinitions, SolutionType>>;
|
|
57
|
+
export type BuildParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<Build<CommerceEngineOptions, InferControllersMapFromDefinition<TControllerDefinitions, SolutionType>, InferControllerPropsMapFromDefinitions<TControllerDefinitions>, TControllerDefinitions, SolutionType>>;
|
|
73
58
|
export type FetchStaticStateParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<FetchStaticStateFunction<TControllerDefinitions>>;
|
|
74
59
|
export type HydrateStaticStateParameters<TControllerDefinitions extends CommerceControllerDefinitionsMap> = Parameters<HydrateStaticStateFunction<TControllerDefinitions>>;
|
|
75
60
|
type Controllers<TControllerDefinitions extends CommerceControllerDefinitionsMap> = InferControllersMapFromDefinition<TControllerDefinitions, SolutionType>;
|
|
76
61
|
export type BuildResult<TControllerDefinitions extends CommerceControllerDefinitionsMap> = {
|
|
77
62
|
engine: SSRCommerceEngine;
|
|
78
|
-
controllers: Controllers<TControllerDefinitions
|
|
63
|
+
controllers: Controllers<TControllerDefinitions>;
|
|
79
64
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { UnknownAction } from '@reduxjs/toolkit';
|
|
2
2
|
import type { Controller } from '../../../controllers/controller/headless-controller.js';
|
|
3
3
|
import type { ControllerStaticStateMap, ControllersPropsMap } from '../../common/types/controllers.js';
|
|
4
|
-
import type { BuildConfig } from './build.js';
|
|
5
4
|
import type { SolutionType } from './controller-constants.js';
|
|
6
|
-
import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption,
|
|
5
|
+
import type { ControllerDefinitionsMap, EngineDefinitionControllersPropsOption, OptionsTuple } from './controller-definitions.js';
|
|
7
6
|
import type { EngineStaticState } from './engine.js';
|
|
7
|
+
export type FetchStaticStateOptions = {};
|
|
8
8
|
/**
|
|
9
9
|
* Executes only the initial search for a given configuration, then returns a resumable snapshot of engine state along with the state of the controllers.
|
|
10
10
|
*
|
|
11
11
|
* Useful for static generation and server-side rendering.
|
|
12
12
|
*/
|
|
13
|
-
export type FetchStaticState<TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = (...params: OptionsTuple<
|
|
13
|
+
export type FetchStaticState<TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap, TControllersDefinitionsMap extends ControllerDefinitionsMap<Controller>, TSolutionType extends SolutionType> = (...params: OptionsTuple<FetchStaticStateOptions & EngineDefinitionControllersPropsOption<TControllersDefinitionsMap, TControllersProps, TSolutionType>>) => Promise<EngineStaticState<TSearchAction, TControllersStaticState>>;
|
|
@@ -2,9 +2,11 @@ import type { UnknownAction } from '@reduxjs/toolkit';
|
|
|
2
2
|
import type { ControllerStaticStateMap, ControllersPropsMap } from './controllers.js';
|
|
3
3
|
import type { EngineDefinitionControllersPropsOption, EngineStaticState } from './engine.js';
|
|
4
4
|
import type { OptionsTuple } from './utilities.js';
|
|
5
|
+
type FetchStaticStateOptions = {};
|
|
5
6
|
/**
|
|
6
7
|
* Executes only the initial search for a given configuration, then returns a resumable snapshot of engine state along with the state of the controllers.
|
|
7
8
|
*
|
|
8
9
|
* Useful for static generation and server-side rendering.
|
|
9
10
|
*/
|
|
10
|
-
export type FetchStaticState<TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap> = (...params: OptionsTuple<EngineDefinitionControllersPropsOption<TControllersProps>>) => Promise<EngineStaticState<TSearchAction, TControllersStaticState>>;
|
|
11
|
+
export type FetchStaticState<TSearchAction extends UnknownAction, TControllersStaticState extends ControllerStaticStateMap, TControllersProps extends ControllersPropsMap> = (...params: OptionsTuple<FetchStaticStateOptions & EngineDefinitionControllersPropsOption<TControllersProps>>) => Promise<EngineStaticState<TSearchAction, TControllersStaticState>>;
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { buildContext, } from '../../../../controllers/commerce/context/headless-context.js';
|
|
2
2
|
import { MissingControllerProps } from '../../../common/errors.js';
|
|
3
3
|
import { createControllerWithKind, Kind } from '../../types/kind.js';
|
|
4
|
+
/**
|
|
5
|
+
* Defines a `Context` controller instance.
|
|
6
|
+
* @group Definers
|
|
7
|
+
*
|
|
8
|
+
* @returns The `Context` controller definition.
|
|
9
|
+
*/
|
|
4
10
|
export function defineContext() {
|
|
5
11
|
return {
|
|
6
12
|
listing: true,
|
|
@@ -11,9 +17,7 @@ export function defineContext() {
|
|
|
11
17
|
if (props === undefined) {
|
|
12
18
|
throw new MissingControllerProps(Kind.Context);
|
|
13
19
|
}
|
|
14
|
-
|
|
15
|
-
const contextOptions = 'initialState' in props ? props.initialState : props;
|
|
16
|
-
const controller = buildContext(engine, { options: contextOptions });
|
|
20
|
+
const controller = buildContext(engine, { options: props });
|
|
17
21
|
return createControllerWithKind(controller, Kind.Context);
|
|
18
22
|
},
|
|
19
23
|
};
|
|
@@ -5,7 +5,6 @@ export var Kind;
|
|
|
5
5
|
Kind["ParameterManager"] = "PARAMETER_MANAGER";
|
|
6
6
|
Kind["Recommendations"] = "RECOMMENDATIONS";
|
|
7
7
|
})(Kind || (Kind = {}));
|
|
8
|
-
// TODO: KIT-4742: There is no point for this now that the wiring is happening in headless
|
|
9
8
|
export function createControllerWithKind(controller, kind) {
|
|
10
9
|
const copy = Object.defineProperties({}, Object.getOwnPropertyDescriptors(controller));
|
|
11
10
|
Object.defineProperty(copy, '_kind', {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility functions to be used for Commerce Server Side Rendering.
|
|
3
3
|
*/
|
|
4
|
-
import { defineCart } from '../controllers/cart/headless-cart.ssr.js';
|
|
5
|
-
import { defineContext } from '../controllers/context/headless-context.ssr.js';
|
|
6
|
-
import { defineParameterManager } from '../controllers/parameter-manager/headless-core-parameter-manager.ssr.js';
|
|
7
4
|
import { hydratedStaticStateFactory } from '../factories/hydrated-state-factory.js';
|
|
8
5
|
import { hydratedRecommendationStaticStateFactory } from '../factories/recommendation-hydrated-state-factory.js';
|
|
9
6
|
import { fetchRecommendationStaticStateFactory } from '../factories/recommendation-static-state-factory.js';
|
|
10
7
|
import { fetchStaticStateFactory } from '../factories/static-state-factory.js';
|
|
11
8
|
import { SolutionType } from '../types/controller-constants.js';
|
|
12
|
-
import { validateControllerNames } from '../validation/controller-validation.js';
|
|
13
9
|
/**
|
|
14
10
|
* Initializes a Commerce engine definition in SSR with given controllers definitions and commerce engine config.
|
|
15
11
|
* @param options - The commerce engine definition
|
|
@@ -39,17 +35,10 @@ export function defineCommerceEngine(options) {
|
|
|
39
35
|
const setAccessToken = (accessToken) => {
|
|
40
36
|
engineOptions.configuration.accessToken = accessToken;
|
|
41
37
|
};
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
context: defineContext(),
|
|
47
|
-
cart: defineCart(),
|
|
48
|
-
};
|
|
49
|
-
const fetchStaticState = fetchStaticStateFactory(augmentedControllerDefinition, getOptions());
|
|
50
|
-
const hydrateStaticState = hydratedStaticStateFactory(augmentedControllerDefinition, getOptions());
|
|
51
|
-
const fetchRecommendationStaticState = fetchRecommendationStaticStateFactory(augmentedControllerDefinition, getOptions());
|
|
52
|
-
const hydrateRecommendationStaticState = hydratedRecommendationStaticStateFactory(augmentedControllerDefinition, getOptions());
|
|
38
|
+
const fetchStaticState = fetchStaticStateFactory(controllerDefinitions, getOptions());
|
|
39
|
+
const hydrateStaticState = hydratedStaticStateFactory(controllerDefinitions, getOptions());
|
|
40
|
+
const fetchRecommendationStaticState = fetchRecommendationStaticStateFactory(controllerDefinitions, getOptions());
|
|
41
|
+
const hydrateRecommendationStaticState = hydratedRecommendationStaticStateFactory(controllerDefinitions, getOptions());
|
|
53
42
|
const commonMethods = {
|
|
54
43
|
setNavigatorContextProvider,
|
|
55
44
|
getAccessToken,
|
|
@@ -4,7 +4,6 @@ import { stateKey } from '../../../app/state-key.js';
|
|
|
4
4
|
import { createWaitForActionMiddleware, createWaitForActionMiddlewareForRecommendation, } from '../../../utils/utils.js';
|
|
5
5
|
import { buildControllerDefinitions } from '../controller-utils.js';
|
|
6
6
|
import { SolutionType } from '../types/controller-constants.js';
|
|
7
|
-
import { assembleEngineConfiguration } from '../utils/engine-wiring.js';
|
|
8
7
|
function isListingFetchCompletedAction(action) {
|
|
9
8
|
return /^commerce\/productListing\/fetch\/(fulfilled|rejected)$/.test(action.type);
|
|
10
9
|
}
|
|
@@ -73,7 +72,9 @@ export const buildFactory = (controllerDefinitions, options) => (solutionType) =
|
|
|
73
72
|
? buildOptions.controllers
|
|
74
73
|
: {};
|
|
75
74
|
const enabledRecommendationControllers = fetchActiveRecommendationControllers(controllerProps, solutionType);
|
|
76
|
-
const engine = buildSSRCommerceEngine(solutionType,
|
|
75
|
+
const engine = buildSSRCommerceEngine(solutionType, buildOptions && 'extend' in buildOptions && buildOptions?.extend
|
|
76
|
+
? await buildOptions.extend(options)
|
|
77
|
+
: options, enabledRecommendationControllers);
|
|
77
78
|
const controllers = buildControllerDefinitions({
|
|
78
79
|
definitionsMap: (controllerDefinitions ?? {}),
|
|
79
80
|
engine,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { buildFactory, } from './build-factory.js';
|
|
2
2
|
export function hydratedStaticStateFactory(controllerDefinitions, options) {
|
|
3
3
|
return (solutionType) => async (...params) => {
|
|
4
|
-
const solutionTypeBuild = await buildFactory(controllerDefinitions,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
...params);
|
|
4
|
+
const solutionTypeBuild = await buildFactory(controllerDefinitions, {
|
|
5
|
+
...options,
|
|
6
|
+
})(solutionType);
|
|
7
|
+
const { engine, controllers } = await solutionTypeBuild(...params);
|
|
8
8
|
params[0].searchActions.forEach((action) => {
|
|
9
9
|
engine.dispatch(action);
|
|
10
10
|
});
|
|
@@ -3,9 +3,7 @@ import { buildFactory, } from './build-factory.js';
|
|
|
3
3
|
export function hydratedRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
4
4
|
return async (...params) => {
|
|
5
5
|
const solutionTypeBuild = await buildFactory(controllerDefinitions, options)(SolutionType.recommendation);
|
|
6
|
-
const { engine, controllers } = (await solutionTypeBuild(
|
|
7
|
-
// @ts-expect-error: TODO: KIT-4742: the wiring will fix also the type inconsistencies
|
|
8
|
-
...params));
|
|
6
|
+
const { engine, controllers } = (await solutionTypeBuild(...params));
|
|
9
7
|
params[0].searchActions.forEach((action) => {
|
|
10
8
|
engine.dispatch(action);
|
|
11
9
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { filterObject } from '../../../utils/utils.js';
|
|
2
2
|
import { createStaticState } from '../controller-utils.js';
|
|
3
3
|
import { SolutionType } from '../types/controller-constants.js';
|
|
4
|
-
import { wireControllerParams } from '../utils/controller-wiring.js';
|
|
5
4
|
import { filterRecommendationControllers } from '../utils/recommendation-filter.js';
|
|
6
5
|
import { buildFactory, } from './build-factory.js';
|
|
7
6
|
export function fetchRecommendationStaticStateFactory(controllerDefinitions, options) {
|
|
@@ -15,7 +14,6 @@ export function fetchRecommendationStaticStateFactory(controllerDefinitions, opt
|
|
|
15
14
|
return async (...params) => {
|
|
16
15
|
const [props] = params;
|
|
17
16
|
const allowedRecommendationKeys = getAllowedRecommendationKeys(props);
|
|
18
|
-
wireControllerParams(SolutionType.recommendation, controllerDefinitions, params);
|
|
19
17
|
const solutionTypeBuild = await buildFactory(controllerDefinitions, options)(SolutionType.recommendation);
|
|
20
18
|
const { engine, controllers } = (await solutionTypeBuild(...params));
|
|
21
19
|
filterRecommendationControllers(controllers, controllerDefinitions ?? {}).refresh(allowedRecommendationKeys);
|
|
@@ -3,12 +3,12 @@ import { buildSearch } from '../../../controllers/commerce/search/headless-searc
|
|
|
3
3
|
import { augmentPreprocessRequestWithForwardedFor } from '../../common/augment-preprocess-request.js';
|
|
4
4
|
import { createStaticState } from '../controller-utils.js';
|
|
5
5
|
import { SolutionType } from '../types/controller-constants.js';
|
|
6
|
-
import { wireControllerParams } from '../utils/controller-wiring.js';
|
|
7
6
|
import { buildFactory, } from './build-factory.js';
|
|
8
7
|
export function fetchStaticStateFactory(controllerDefinitions, options) {
|
|
9
8
|
return (solutionType) => async (...params) => {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const solutionTypeBuild = await buildFactory(controllerDefinitions, {
|
|
10
|
+
...options,
|
|
11
|
+
})(solutionType);
|
|
12
12
|
const { engine, controllers } = await solutionTypeBuild(...params);
|
|
13
13
|
options.configuration.preprocessRequest =
|
|
14
14
|
augmentPreprocessRequestWithForwardedFor({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "3.28.4-pre.
|
|
1
|
+
export const VERSION = "3.28.4-pre.2fd8f6feda" || 'Test version';
|
|
2
2
|
export const COVEO_FRAMEWORK = ['@coveo/atomic', '@coveo/quantic'];
|