@vue-storefront/next 7.0.0 → 7.0.1-feature.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.cjs +12 -23
- package/dist/client.d.cts +1 -2
- package/dist/client.d.mts +1 -2
- package/dist/client.mjs +4 -11
- package/dist/{env-BFUtR_CT.mjs → env-9UiGUnbx.mjs} +17 -24
- package/dist/{env-BxyAENtV.cjs → env-BK6gqfbp.cjs} +32 -40
- package/dist/index.cjs +17 -24
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +9 -17
- package/package.json +5 -5
- /package/dist/{index-BXYjHxeC.d.mts → index-BPhD221E.d.mts} +0 -0
- /package/dist/{index-D1weTw7N.d.cts → index-w0GzdXwC.d.cts} +0 -0
package/dist/client.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
//#region
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -8,16 +8,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
21
17
|
}
|
|
22
18
|
return to;
|
|
23
19
|
};
|
|
@@ -25,16 +21,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
21
|
value: mod,
|
|
26
22
|
enumerable: true
|
|
27
23
|
}) : target, mod));
|
|
28
|
-
|
|
29
24
|
//#endregion
|
|
30
|
-
const require_env = require(
|
|
25
|
+
const require_env = require("./env-BK6gqfbp.cjs");
|
|
31
26
|
let _alokai_instrumentation_next_component = require("@alokai/instrumentation-next-component");
|
|
32
27
|
let next_script = require("next/script");
|
|
33
28
|
next_script = __toESM(next_script);
|
|
34
29
|
let react = require("react");
|
|
35
30
|
react = __toESM(react);
|
|
36
31
|
let zustand = require("zustand");
|
|
37
|
-
|
|
38
32
|
//#region src/env/get-public-env.ts
|
|
39
33
|
/**
|
|
40
34
|
* Extracts all NEXT_PUBLIC_* environment variables from process.env
|
|
@@ -47,7 +41,6 @@ function getPublicEnv() {
|
|
|
47
41
|
for (const key in process.env) if (key.startsWith("NEXT_PUBLIC_")) publicEnv[key] = process.env[key];
|
|
48
42
|
return publicEnv;
|
|
49
43
|
}
|
|
50
|
-
|
|
51
44
|
//#endregion
|
|
52
45
|
//#region src/state.tsx
|
|
53
46
|
const createSfState = (initialData) => {
|
|
@@ -127,9 +120,8 @@ function createSfStateProvider() {
|
|
|
127
120
|
useSfLocaleState
|
|
128
121
|
};
|
|
129
122
|
}
|
|
130
|
-
|
|
131
123
|
//#endregion
|
|
132
|
-
//#region \0@oxc-project+runtime@0.
|
|
124
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectWithoutPropertiesLoose.js
|
|
133
125
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
134
126
|
if (null == r) return {};
|
|
135
127
|
var t = {};
|
|
@@ -139,9 +131,8 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
139
131
|
}
|
|
140
132
|
return t;
|
|
141
133
|
}
|
|
142
|
-
|
|
143
134
|
//#endregion
|
|
144
|
-
//#region \0@oxc-project+runtime@0.
|
|
135
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectWithoutProperties.js
|
|
145
136
|
function _objectWithoutProperties(e, t) {
|
|
146
137
|
if (null == e) return {};
|
|
147
138
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
@@ -151,7 +142,6 @@ function _objectWithoutProperties(e, t) {
|
|
|
151
142
|
}
|
|
152
143
|
return i;
|
|
153
144
|
}
|
|
154
|
-
|
|
155
145
|
//#endregion
|
|
156
146
|
//#region src/alokai-provider.tsx
|
|
157
147
|
const _excluded = ["SfStateProvider"];
|
|
@@ -215,9 +205,8 @@ function createAlokaiContext() {
|
|
|
215
205
|
useSdk
|
|
216
206
|
}, rest);
|
|
217
207
|
}
|
|
218
|
-
|
|
219
208
|
//#endregion
|
|
220
209
|
exports.__toESM = __toESM;
|
|
221
210
|
exports.createAlokaiContext = createAlokaiContext;
|
|
222
211
|
exports.createSfStateProvider = createSfStateProvider;
|
|
223
|
-
exports.env = require_env.env;
|
|
212
|
+
exports.env = require_env.env;
|
package/dist/client.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { c as SfContract, d as createSfStateProvider, l as SfState, r as CreateSdkContextReturn, s as Maybe, t as env, u as SfStateProps } from "./index-
|
|
1
|
+
import { c as SfContract, d as createSfStateProvider, l as SfState, r as CreateSdkContextReturn, s as Maybe, t as env, u as SfStateProps } from "./index-w0GzdXwC.cjs";
|
|
2
2
|
import { SDKApi } from "@alokai/connect/sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/alokai-provider.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Creates a new Alokai context which is a combination of SDK and state contexts.
|
|
8
7
|
* This function is dedicated for the client-side usage.
|
package/dist/client.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { c as SfContract, d as createSfStateProvider, l as SfState, r as CreateSdkContextReturn, s as Maybe, t as env, u as SfStateProps } from "./index-
|
|
1
|
+
import { c as SfContract, d as createSfStateProvider, l as SfState, r as CreateSdkContextReturn, s as Maybe, t as env, u as SfStateProps } from "./index-BPhD221E.mjs";
|
|
2
2
|
import { SDKApi } from "@alokai/connect/sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/alokai-provider.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Creates a new Alokai context which is a combination of SDK and state contexts.
|
|
8
7
|
* This function is dedicated for the client-side usage.
|
package/dist/client.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { n as _objectSpread2, r as PUBLIC_ENV_KEY, t as env } from "./env-BFUtR_CT.mjs";
|
|
2
|
+
import { n as _objectSpread2, r as PUBLIC_ENV_KEY, t as env } from "./env-9UiGUnbx.mjs";
|
|
4
3
|
import { AlokaiInstrumentation } from "@alokai/instrumentation-next-component";
|
|
5
4
|
import Script from "next/script";
|
|
6
5
|
import React, { createContext, useContext, useRef } from "react";
|
|
7
6
|
import { createStore, useStore } from "zustand";
|
|
8
|
-
|
|
9
7
|
//#region src/env/get-public-env.ts
|
|
10
8
|
/**
|
|
11
9
|
* Extracts all NEXT_PUBLIC_* environment variables from process.env
|
|
@@ -18,7 +16,6 @@ function getPublicEnv() {
|
|
|
18
16
|
for (const key in process.env) if (key.startsWith("NEXT_PUBLIC_")) publicEnv[key] = process.env[key];
|
|
19
17
|
return publicEnv;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
//#endregion
|
|
23
20
|
//#region src/state.tsx
|
|
24
21
|
const createSfState = (initialData) => {
|
|
@@ -98,9 +95,8 @@ function createSfStateProvider() {
|
|
|
98
95
|
useSfLocaleState
|
|
99
96
|
};
|
|
100
97
|
}
|
|
101
|
-
|
|
102
98
|
//#endregion
|
|
103
|
-
//#region \0@oxc-project+runtime@0.
|
|
99
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectWithoutPropertiesLoose.js
|
|
104
100
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
105
101
|
if (null == r) return {};
|
|
106
102
|
var t = {};
|
|
@@ -110,9 +106,8 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
110
106
|
}
|
|
111
107
|
return t;
|
|
112
108
|
}
|
|
113
|
-
|
|
114
109
|
//#endregion
|
|
115
|
-
//#region \0@oxc-project+runtime@0.
|
|
110
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectWithoutProperties.js
|
|
116
111
|
function _objectWithoutProperties(e, t) {
|
|
117
112
|
if (null == e) return {};
|
|
118
113
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
@@ -122,7 +117,6 @@ function _objectWithoutProperties(e, t) {
|
|
|
122
117
|
}
|
|
123
118
|
return i;
|
|
124
119
|
}
|
|
125
|
-
|
|
126
120
|
//#endregion
|
|
127
121
|
//#region src/alokai-provider.tsx
|
|
128
122
|
const _excluded = ["SfStateProvider"];
|
|
@@ -186,6 +180,5 @@ function createAlokaiContext() {
|
|
|
186
180
|
useSdk
|
|
187
181
|
}, rest);
|
|
188
182
|
}
|
|
189
|
-
|
|
190
183
|
//#endregion
|
|
191
|
-
export { createAlokaiContext, createSfStateProvider, env };
|
|
184
|
+
export { createAlokaiContext, createSfStateProvider, env };
|
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
* The key used to store public environment variables in the browser window object
|
|
4
4
|
*/
|
|
5
5
|
const PUBLIC_ENV_KEY = "__ALOKAI_ENV__";
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
|
-
//#region \0@oxc-project+runtime@0.
|
|
7
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/typeof.js
|
|
9
8
|
function _typeof(o) {
|
|
10
9
|
"@babel/helpers - typeof";
|
|
11
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o
|
|
12
|
-
return typeof o
|
|
13
|
-
} : function(o
|
|
14
|
-
return o
|
|
10
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
11
|
+
return typeof o;
|
|
12
|
+
} : function(o) {
|
|
13
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
15
14
|
}, _typeof(o);
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
|
-
//#region \0@oxc-project+runtime@0.
|
|
17
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPrimitive.js
|
|
20
18
|
function toPrimitive(t, r) {
|
|
21
19
|
if ("object" != _typeof(t) || !t) return t;
|
|
22
20
|
var e = t[Symbol.toPrimitive];
|
|
@@ -27,16 +25,14 @@ function toPrimitive(t, r) {
|
|
|
27
25
|
}
|
|
28
26
|
return ("string" === r ? String : Number)(t);
|
|
29
27
|
}
|
|
30
|
-
|
|
31
28
|
//#endregion
|
|
32
|
-
//#region \0@oxc-project+runtime@0.
|
|
29
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPropertyKey.js
|
|
33
30
|
function toPropertyKey(t) {
|
|
34
31
|
var i = toPrimitive(t, "string");
|
|
35
32
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
//#endregion
|
|
39
|
-
//#region \0@oxc-project+runtime@0.
|
|
35
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/defineProperty.js
|
|
40
36
|
function _defineProperty(e, r, t) {
|
|
41
37
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
42
38
|
value: t,
|
|
@@ -45,15 +41,14 @@ function _defineProperty(e, r, t) {
|
|
|
45
41
|
writable: !0
|
|
46
42
|
}) : e[r] = t, e;
|
|
47
43
|
}
|
|
48
|
-
|
|
49
44
|
//#endregion
|
|
50
|
-
//#region \0@oxc-project+runtime@0.
|
|
45
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectSpread2.js
|
|
51
46
|
function ownKeys(e, r) {
|
|
52
47
|
var t = Object.keys(e);
|
|
53
48
|
if (Object.getOwnPropertySymbols) {
|
|
54
49
|
var o = Object.getOwnPropertySymbols(e);
|
|
55
|
-
r && (o = o.filter(function(r
|
|
56
|
-
return Object.getOwnPropertyDescriptor(e, r
|
|
50
|
+
r && (o = o.filter(function(r) {
|
|
51
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
57
52
|
})), t.push.apply(t, o);
|
|
58
53
|
}
|
|
59
54
|
return t;
|
|
@@ -61,15 +56,14 @@ function ownKeys(e, r) {
|
|
|
61
56
|
function _objectSpread2(e) {
|
|
62
57
|
for (var r = 1; r < arguments.length; r++) {
|
|
63
58
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
64
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r
|
|
65
|
-
_defineProperty(e, r
|
|
66
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r
|
|
67
|
-
Object.defineProperty(e, r
|
|
59
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
60
|
+
_defineProperty(e, r, t[r]);
|
|
61
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
62
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
68
63
|
});
|
|
69
64
|
}
|
|
70
65
|
return e;
|
|
71
66
|
}
|
|
72
|
-
|
|
73
67
|
//#endregion
|
|
74
68
|
//#region src/env/env.ts
|
|
75
69
|
/**
|
|
@@ -90,8 +84,7 @@ function _objectSpread2(e) {
|
|
|
90
84
|
function env(key) {
|
|
91
85
|
var _window$PUBLIC_ENV_KE;
|
|
92
86
|
if (typeof window === "undefined") return process.env[key];
|
|
93
|
-
return (_window$PUBLIC_ENV_KE = window[
|
|
87
|
+
return (_window$PUBLIC_ENV_KE = window["__ALOKAI_ENV__"]) === null || _window$PUBLIC_ENV_KE === void 0 ? void 0 : _window$PUBLIC_ENV_KE[key];
|
|
94
88
|
}
|
|
95
|
-
|
|
96
89
|
//#endregion
|
|
97
|
-
export { _objectSpread2 as n, PUBLIC_ENV_KEY as r, env as t };
|
|
90
|
+
export { _objectSpread2 as n, PUBLIC_ENV_KEY as r, env as t };
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/env/constants.ts
|
|
3
2
|
/**
|
|
4
3
|
* The key used to store public environment variables in the browser window object
|
|
5
4
|
*/
|
|
6
5
|
const PUBLIC_ENV_KEY = "__ALOKAI_ENV__";
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
|
-
//#region \0@oxc-project+runtime@0.
|
|
7
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/typeof.js
|
|
10
8
|
function _typeof(o) {
|
|
11
9
|
"@babel/helpers - typeof";
|
|
12
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o
|
|
13
|
-
return typeof o
|
|
14
|
-
} : function(o
|
|
15
|
-
return o
|
|
10
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
11
|
+
return typeof o;
|
|
12
|
+
} : function(o) {
|
|
13
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
16
14
|
}, _typeof(o);
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
//#endregion
|
|
20
|
-
//#region \0@oxc-project+runtime@0.
|
|
17
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPrimitive.js
|
|
21
18
|
function toPrimitive(t, r) {
|
|
22
19
|
if ("object" != _typeof(t) || !t) return t;
|
|
23
20
|
var e = t[Symbol.toPrimitive];
|
|
@@ -28,16 +25,14 @@ function toPrimitive(t, r) {
|
|
|
28
25
|
}
|
|
29
26
|
return ("string" === r ? String : Number)(t);
|
|
30
27
|
}
|
|
31
|
-
|
|
32
28
|
//#endregion
|
|
33
|
-
//#region \0@oxc-project+runtime@0.
|
|
29
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/toPropertyKey.js
|
|
34
30
|
function toPropertyKey(t) {
|
|
35
31
|
var i = toPrimitive(t, "string");
|
|
36
32
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
37
33
|
}
|
|
38
|
-
|
|
39
34
|
//#endregion
|
|
40
|
-
//#region \0@oxc-project+runtime@0.
|
|
35
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/defineProperty.js
|
|
41
36
|
function _defineProperty(e, r, t) {
|
|
42
37
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43
38
|
value: t,
|
|
@@ -46,15 +41,14 @@ function _defineProperty(e, r, t) {
|
|
|
46
41
|
writable: !0
|
|
47
42
|
}) : e[r] = t, e;
|
|
48
43
|
}
|
|
49
|
-
|
|
50
44
|
//#endregion
|
|
51
|
-
//#region \0@oxc-project+runtime@0.
|
|
45
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/objectSpread2.js
|
|
52
46
|
function ownKeys(e, r) {
|
|
53
47
|
var t = Object.keys(e);
|
|
54
48
|
if (Object.getOwnPropertySymbols) {
|
|
55
49
|
var o = Object.getOwnPropertySymbols(e);
|
|
56
|
-
r && (o = o.filter(function(r
|
|
57
|
-
return Object.getOwnPropertyDescriptor(e, r
|
|
50
|
+
r && (o = o.filter(function(r) {
|
|
51
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
58
52
|
})), t.push.apply(t, o);
|
|
59
53
|
}
|
|
60
54
|
return t;
|
|
@@ -62,15 +56,14 @@ function ownKeys(e, r) {
|
|
|
62
56
|
function _objectSpread2(e) {
|
|
63
57
|
for (var r = 1; r < arguments.length; r++) {
|
|
64
58
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
65
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function(r
|
|
66
|
-
_defineProperty(e, r
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r
|
|
68
|
-
Object.defineProperty(e, r
|
|
59
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
60
|
+
_defineProperty(e, r, t[r]);
|
|
61
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
62
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
69
63
|
});
|
|
70
64
|
}
|
|
71
65
|
return e;
|
|
72
66
|
}
|
|
73
|
-
|
|
74
67
|
//#endregion
|
|
75
68
|
//#region src/env/env.ts
|
|
76
69
|
/**
|
|
@@ -91,25 +84,24 @@ function _objectSpread2(e) {
|
|
|
91
84
|
function env(key) {
|
|
92
85
|
var _window$PUBLIC_ENV_KE;
|
|
93
86
|
if (typeof window === "undefined") return process.env[key];
|
|
94
|
-
return (_window$PUBLIC_ENV_KE = window[
|
|
87
|
+
return (_window$PUBLIC_ENV_KE = window["__ALOKAI_ENV__"]) === null || _window$PUBLIC_ENV_KE === void 0 ? void 0 : _window$PUBLIC_ENV_KE[key];
|
|
95
88
|
}
|
|
96
|
-
|
|
97
89
|
//#endregion
|
|
98
|
-
Object.defineProperty(exports,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
Object.defineProperty(exports, "PUBLIC_ENV_KEY", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function() {
|
|
93
|
+
return PUBLIC_ENV_KEY;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "_objectSpread2", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function() {
|
|
99
|
+
return _objectSpread2;
|
|
100
|
+
}
|
|
103
101
|
});
|
|
104
|
-
Object.defineProperty(exports,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
Object.defineProperty(exports, "env", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function() {
|
|
105
|
+
return env;
|
|
106
|
+
}
|
|
109
107
|
});
|
|
110
|
-
Object.defineProperty(exports, 'env', {
|
|
111
|
-
enumerable: true,
|
|
112
|
-
get: function () {
|
|
113
|
-
return env;
|
|
114
|
-
}
|
|
115
|
-
});
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_env = require("./env-BK6gqfbp.cjs");
|
|
3
|
+
require("./client.cjs");
|
|
3
4
|
let _alokai_connect_logger = require("@alokai/connect/logger");
|
|
4
5
|
let _alokai_connect_sdk = require("@alokai/connect/sdk");
|
|
5
|
-
|
|
6
6
|
//#region src/logger/injectMetadata.ts
|
|
7
7
|
function injectMetadata(logger, externalData) {
|
|
8
8
|
return new Proxy(logger, { get(target, prop) {
|
|
@@ -14,13 +14,11 @@ function injectMetadata(logger, externalData) {
|
|
|
14
14
|
return targetProp;
|
|
15
15
|
} });
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
//#endregion
|
|
19
18
|
//#region src/logger/index.ts
|
|
20
19
|
const createLogger = (options) => {
|
|
21
20
|
return injectMetadata(_alokai_connect_logger.LoggerFactory.create(_alokai_connect_logger.LoggerType.ConsolaGcp, options), { alokai: { context: "storefront" } });
|
|
22
21
|
};
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
23
|
//#region src/middleware.ts
|
|
26
24
|
/**
|
|
@@ -48,7 +46,6 @@ function createAlokaiMiddleware(middleware) {
|
|
|
48
46
|
return middleware(request);
|
|
49
47
|
};
|
|
50
48
|
}
|
|
51
|
-
|
|
52
49
|
//#endregion
|
|
53
50
|
//#region src/sdk/helpers/defaultConfigs.ts
|
|
54
51
|
const defaultMethodsRequestConfig = {
|
|
@@ -66,14 +63,13 @@ const defaultMethodsRequestConfig = {
|
|
|
66
63
|
searchProducts: { method: "GET" }
|
|
67
64
|
} }
|
|
68
65
|
};
|
|
69
|
-
|
|
70
66
|
//#endregion
|
|
71
|
-
//#region \0@oxc-project+runtime@0.
|
|
67
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/asyncToGenerator.js
|
|
72
68
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
73
69
|
try {
|
|
74
70
|
var i = n[a](c), u = i.value;
|
|
75
|
-
} catch (n
|
|
76
|
-
e(n
|
|
71
|
+
} catch (n) {
|
|
72
|
+
e(n);
|
|
77
73
|
return;
|
|
78
74
|
}
|
|
79
75
|
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
@@ -83,17 +79,16 @@ function _asyncToGenerator(n) {
|
|
|
83
79
|
var t = this, e = arguments;
|
|
84
80
|
return new Promise(function(r, o) {
|
|
85
81
|
var a = n.apply(t, e);
|
|
86
|
-
function _next(n
|
|
87
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n
|
|
82
|
+
function _next(n) {
|
|
83
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
88
84
|
}
|
|
89
|
-
function _throw(n
|
|
90
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n
|
|
85
|
+
function _throw(n) {
|
|
86
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
91
87
|
}
|
|
92
88
|
_next(void 0);
|
|
93
89
|
});
|
|
94
90
|
};
|
|
95
91
|
}
|
|
96
|
-
|
|
97
92
|
//#endregion
|
|
98
93
|
//#region src/sdk/helpers/resolveDynamicContext.ts
|
|
99
94
|
const BLACKLISTED_HEADERS = new Set(["host"]);
|
|
@@ -126,7 +121,6 @@ function resolveDynamicContext(context) {
|
|
|
126
121
|
})();
|
|
127
122
|
} });
|
|
128
123
|
}
|
|
129
|
-
|
|
130
124
|
//#endregion
|
|
131
125
|
//#region src/sdk/index.tsx
|
|
132
126
|
/**
|
|
@@ -239,20 +233,19 @@ function defineSdkModule(moduleDefinition) {
|
|
|
239
233
|
return moduleDefinition;
|
|
240
234
|
}
|
|
241
235
|
function buildModules(modules) {
|
|
242
|
-
return (context) => Object.fromEntries(Object.entries(modules).map(([key, module
|
|
236
|
+
return (context) => Object.fromEntries(Object.entries(modules).map(([key, module]) => [key, module(context)]));
|
|
243
237
|
}
|
|
244
|
-
|
|
245
238
|
//#endregion
|
|
246
239
|
exports.createAlokaiMiddleware = createAlokaiMiddleware;
|
|
247
240
|
exports.createLogger = createLogger;
|
|
248
241
|
exports.createSdk = createSdk;
|
|
249
|
-
Object.defineProperty(exports,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
242
|
+
Object.defineProperty(exports, "defineGetConfigSwitcherHeader", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function() {
|
|
245
|
+
return _alokai_connect_sdk.defineGetConfigSwitcherHeader;
|
|
246
|
+
}
|
|
254
247
|
});
|
|
255
248
|
exports.defineSdkConfig = defineSdkConfig;
|
|
256
249
|
exports.defineSdkModule = defineSdkModule;
|
|
257
250
|
exports.env = require_env.env;
|
|
258
|
-
exports.resolveSdkOptions = resolveSdkOptions;
|
|
251
|
+
exports.resolveSdkOptions = resolveSdkOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateSdkReturn, i as CreateSdkOptions, n as Config, o as InjectedContext, t as env } from "./index-
|
|
1
|
+
import { a as CreateSdkReturn, i as CreateSdkOptions, n as Config, o as InjectedContext, t as env } from "./index-w0GzdXwC.cjs";
|
|
2
2
|
import { buildModule, defineGetConfigSwitcherHeader } from "@alokai/connect/sdk";
|
|
3
3
|
import * as _alokai_connect_logger0 from "@alokai/connect/logger";
|
|
4
4
|
import { NextRequest, NextResponse } from "next/server";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateSdkReturn, i as CreateSdkOptions, n as Config, o as InjectedContext, t as env } from "./index-
|
|
1
|
+
import { a as CreateSdkReturn, i as CreateSdkOptions, n as Config, o as InjectedContext, t as env } from "./index-BPhD221E.mjs";
|
|
2
2
|
import * as _alokai_connect_logger0 from "@alokai/connect/logger";
|
|
3
3
|
import { buildModule, defineGetConfigSwitcherHeader } from "@alokai/connect/sdk";
|
|
4
4
|
import { NextRequest, NextResponse } from "next/server";
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { n as _objectSpread2, t as env } from "./env-
|
|
1
|
+
import { n as _objectSpread2, t as env } from "./env-9UiGUnbx.mjs";
|
|
2
2
|
import { LoggerFactory, LoggerType } from "@alokai/connect/logger";
|
|
3
3
|
import { buildModule, defineGetConfigSwitcherHeader, initSDK, middlewareModule } from "@alokai/connect/sdk";
|
|
4
|
-
|
|
5
4
|
//#region src/logger/injectMetadata.ts
|
|
6
5
|
function injectMetadata(logger, externalData) {
|
|
7
6
|
return new Proxy(logger, { get(target, prop) {
|
|
@@ -13,13 +12,11 @@ function injectMetadata(logger, externalData) {
|
|
|
13
12
|
return targetProp;
|
|
14
13
|
} });
|
|
15
14
|
}
|
|
16
|
-
|
|
17
15
|
//#endregion
|
|
18
16
|
//#region src/logger/index.ts
|
|
19
17
|
const createLogger = (options) => {
|
|
20
18
|
return injectMetadata(LoggerFactory.create(LoggerType.ConsolaGcp, options), { alokai: { context: "storefront" } });
|
|
21
19
|
};
|
|
22
|
-
|
|
23
20
|
//#endregion
|
|
24
21
|
//#region src/middleware.ts
|
|
25
22
|
/**
|
|
@@ -47,7 +44,6 @@ function createAlokaiMiddleware(middleware) {
|
|
|
47
44
|
return middleware(request);
|
|
48
45
|
};
|
|
49
46
|
}
|
|
50
|
-
|
|
51
47
|
//#endregion
|
|
52
48
|
//#region src/sdk/helpers/defaultConfigs.ts
|
|
53
49
|
const defaultMethodsRequestConfig = {
|
|
@@ -65,14 +61,13 @@ const defaultMethodsRequestConfig = {
|
|
|
65
61
|
searchProducts: { method: "GET" }
|
|
66
62
|
} }
|
|
67
63
|
};
|
|
68
|
-
|
|
69
64
|
//#endregion
|
|
70
|
-
//#region \0@oxc-project+runtime@0.
|
|
65
|
+
//#region \0@oxc-project+runtime@0.115.0/helpers/asyncToGenerator.js
|
|
71
66
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
72
67
|
try {
|
|
73
68
|
var i = n[a](c), u = i.value;
|
|
74
|
-
} catch (n
|
|
75
|
-
e(n
|
|
69
|
+
} catch (n) {
|
|
70
|
+
e(n);
|
|
76
71
|
return;
|
|
77
72
|
}
|
|
78
73
|
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
@@ -82,17 +77,16 @@ function _asyncToGenerator(n) {
|
|
|
82
77
|
var t = this, e = arguments;
|
|
83
78
|
return new Promise(function(r, o) {
|
|
84
79
|
var a = n.apply(t, e);
|
|
85
|
-
function _next(n
|
|
86
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n
|
|
80
|
+
function _next(n) {
|
|
81
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
87
82
|
}
|
|
88
|
-
function _throw(n
|
|
89
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n
|
|
83
|
+
function _throw(n) {
|
|
84
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
90
85
|
}
|
|
91
86
|
_next(void 0);
|
|
92
87
|
});
|
|
93
88
|
};
|
|
94
89
|
}
|
|
95
|
-
|
|
96
90
|
//#endregion
|
|
97
91
|
//#region src/sdk/helpers/resolveDynamicContext.ts
|
|
98
92
|
const BLACKLISTED_HEADERS = new Set(["host"]);
|
|
@@ -125,7 +119,6 @@ function resolveDynamicContext(context) {
|
|
|
125
119
|
})();
|
|
126
120
|
} });
|
|
127
121
|
}
|
|
128
|
-
|
|
129
122
|
//#endregion
|
|
130
123
|
//#region src/sdk/index.tsx
|
|
131
124
|
/**
|
|
@@ -240,6 +233,5 @@ function defineSdkModule(moduleDefinition) {
|
|
|
240
233
|
function buildModules(modules) {
|
|
241
234
|
return (context) => Object.fromEntries(Object.entries(modules).map(([key, module]) => [key, module(context)]));
|
|
242
235
|
}
|
|
243
|
-
|
|
244
236
|
//#endregion
|
|
245
|
-
export { createAlokaiMiddleware, createLogger, createSdk, defineGetConfigSwitcherHeader, defineSdkConfig, defineSdkModule, env, resolveSdkOptions };
|
|
237
|
+
export { createAlokaiMiddleware, createLogger, createSdk, defineGetConfigSwitcherHeader, defineSdkConfig, defineSdkModule, env, resolveSdkOptions };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vue-storefront/next",
|
|
3
3
|
"description": "Alokai dedicated features for Next.js",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "7.0.0",
|
|
5
|
+
"version": "7.0.1-feature.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./dist/index.d.mts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"zustand": "^4.5.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@alokai/connect": "^2.0.0",
|
|
34
|
+
"@alokai/connect": "^2.3.0-feature.0",
|
|
35
35
|
"@shared/typescript-config": "1.0.0",
|
|
36
36
|
"@types/react": "^19",
|
|
37
37
|
"@types/react-dom": "^19",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"react": "19.2.3",
|
|
42
42
|
"react-dom": "19.2.3",
|
|
43
43
|
"start-server-and-test": "^2.0.11",
|
|
44
|
-
"tsdown": "0.
|
|
44
|
+
"tsdown": "0.21.4",
|
|
45
45
|
"unplugin-lightningcss": "0.4.4",
|
|
46
|
-
"vitest": "
|
|
46
|
+
"vitest": "4.0.18"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@alokai/connect": "^2.0.0",
|
|
49
|
+
"@alokai/connect": "^2.3.0-feature.0",
|
|
50
50
|
"next": "^16.0.0",
|
|
51
51
|
"react": "^19.0.0"
|
|
52
52
|
},
|
|
File without changes
|
|
File without changes
|