@vue-storefront/next 2.0.1 → 2.1.0

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/client.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SDKApi } from '@vue-storefront/sdk';
2
- import { b as CreateSdkContextReturn } from './types-B1fiGk0-.mjs';
2
+ import { b as CreateSdkContextReturn } from './types-BpDM9bMc.mjs';
3
3
  import 'react';
4
4
 
5
5
  /**
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { SDKApi } from '@vue-storefront/sdk';
2
- import { b as CreateSdkContextReturn } from './types-B1fiGk0-.js';
2
+ import { b as CreateSdkContextReturn } from './types-BpDM9bMc.js';
3
3
  import 'react';
4
4
 
5
5
  /**
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Config, a as CreateSdkReturn } from './types-B1fiGk0-.mjs';
1
+ import { C as Config, a as CreateSdkReturn } from './types-BpDM9bMc.mjs';
2
2
  import '@vue-storefront/sdk';
3
3
  import 'react';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Config, a as CreateSdkReturn } from './types-B1fiGk0-.js';
1
+ import { C as Config, a as CreateSdkReturn } from './types-BpDM9bMc.js';
2
2
  import '@vue-storefront/sdk';
3
3
  import 'react';
4
4
 
package/dist/index.js CHANGED
@@ -136,7 +136,11 @@ function createSdk(options, configDefinition) {
136
136
  buildModule: import_sdk.buildModule,
137
137
  middlewareModule: import_sdk.middlewareModule,
138
138
  getRequestHeaders,
139
- middlewareUrl
139
+ middlewareUrl,
140
+ config: {
141
+ middlewareUrl,
142
+ defaults: contextConfig
143
+ }
140
144
  });
141
145
  return (0, import_sdk.initSDK)(resolvedConfig);
142
146
  }
package/dist/index.mjs CHANGED
@@ -99,7 +99,11 @@ function createSdk(options, configDefinition) {
99
99
  buildModule,
100
100
  middlewareModule,
101
101
  getRequestHeaders,
102
- middlewareUrl
102
+ middlewareUrl,
103
+ config: {
104
+ middlewareUrl,
105
+ defaults: contextConfig
106
+ }
103
107
  });
104
108
  return initSDK(resolvedConfig);
105
109
  }
@@ -48,6 +48,10 @@ type StaticContext = {
48
48
  middlewareModule: typeof middlewareModule;
49
49
  middlewareUrl: string;
50
50
  defaults: typeof contextConfig;
51
+ config: {
52
+ middlewareUrl: string;
53
+ defaults: typeof contextConfig;
54
+ };
51
55
  };
52
56
  type InjectedContext = DynamicContext & StaticContext;
53
57
  type Config<TConfig> = (context: InjectedContext) => TConfig;
@@ -48,6 +48,10 @@ type StaticContext = {
48
48
  middlewareModule: typeof middlewareModule;
49
49
  middlewareUrl: string;
50
50
  defaults: typeof contextConfig;
51
+ config: {
52
+ middlewareUrl: string;
53
+ defaults: typeof contextConfig;
54
+ };
51
55
  };
52
56
  type InjectedContext = DynamicContext & StaticContext;
53
57
  type Config<TConfig> = (context: InjectedContext) => TConfig;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@vue-storefront/next",
3
3
  "description": "Vue Storefront dedicated features for Next.js",
4
4
  "license": "MIT",
5
- "version": "2.0.1",
5
+ "version": "2.1.0",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.mjs",
@@ -38,12 +38,12 @@
38
38
  "lint": "eslint . --ext .ts",
39
39
  "test:app-router": "start-server-and-test dev:middleware localhost:4000/test_integration/getSuccess dev:app-router localhost:3000 \"yarn test:e2e\"",
40
40
  "test:pages-router": "start-server-and-test dev:middleware localhost:4000/test_integration/getSuccess dev:pages-router localhost:3000 \"yarn test:e2e\"",
41
- "test": "yarn test:app-router && yarn test:pages-router",
41
+ "test:e2e:run": "yarn test:app-router && yarn test:pages-router",
42
42
  "test:e2e": "cd ../shared/ && yarn test:e2e",
43
43
  "test:unit": "vitest run"
44
44
  },
45
45
  "dependencies": {
46
- "@vue-storefront/sdk": "^3.0.0"
46
+ "@vue-storefront/sdk": "^3.1.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/react": "^18.2.31",