@faststore/core 2.0.76-alpha.0 → 2.0.79-alpha.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/.husky/pre-commit +1 -1
- package/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +103 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/config.json +7 -0
- package/.next/cache/eslint/.cache_1gneedd +1 -0
- package/.next/cache/next-server.js.nft.json +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/export-marker.json +1 -0
- package/.next/images-manifest.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +49 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/104.js +196 -0
- package/.next/server/chunks/143.js +106 -0
- package/.next/server/chunks/154.js +201 -0
- package/.next/server/chunks/183.js +72 -0
- package/.next/server/chunks/247.js +61 -0
- package/.next/server/chunks/264.js +67 -0
- package/.next/server/chunks/280.js +417 -0
- package/.next/server/chunks/287.js +79 -0
- package/.next/server/chunks/307.js +109 -0
- package/.next/server/chunks/312.js +714 -0
- package/.next/server/chunks/317.js +126 -0
- package/.next/server/chunks/350.js +120 -0
- package/.next/server/chunks/371.js +1467 -0
- package/.next/server/chunks/377.js +82 -0
- package/.next/server/chunks/394.js +3801 -0
- package/.next/server/chunks/439.js +175 -0
- package/.next/server/chunks/444.js +464 -0
- package/.next/server/chunks/465.js +91 -0
- package/.next/server/chunks/576.js +72 -0
- package/.next/server/chunks/650.js +216 -0
- package/.next/server/chunks/664.js +124 -0
- package/.next/server/chunks/676.js +32 -0
- package/.next/server/chunks/732.js +51 -0
- package/.next/server/chunks/746.js +237 -0
- package/.next/server/chunks/849.js +664 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/859.js +959 -0
- package/.next/server/chunks/872.js +378 -0
- package/.next/server/chunks/881.js +320 -0
- package/.next/server/chunks/898.js +240 -0
- package/.next/server/chunks/914.js +96 -0
- package/.next/server/chunks/953.js +674 -0
- package/.next/server/chunks/98.js +266 -0
- package/.next/server/chunks/992.js +562 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/500.js.nft.json +1 -0
- package/.next/server/pages/[...slug].js +609 -0
- package/.next/server/pages/[...slug].js.nft.json +1 -0
- package/.next/server/pages/[slug]/p.js +2560 -0
- package/.next/server/pages/[slug]/p.js.nft.json +1 -0
- package/.next/server/pages/_app.js +2058 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +304 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +164 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/account.js.nft.json +1 -0
- package/.next/server/pages/api/graphql.js +259 -0
- package/.next/server/pages/api/graphql.js.nft.json +1 -0
- package/.next/server/pages/api/preview.js +118 -0
- package/.next/server/pages/api/preview.js.nft.json +1 -0
- package/.next/server/pages/checkout.js.nft.json +1 -0
- package/.next/server/pages/en-US/404.html +81 -0
- package/.next/server/pages/en-US/500.html +81 -0
- package/.next/server/pages/en-US/account.html +81 -0
- package/.next/server/pages/en-US/checkout.html +81 -0
- package/.next/server/pages/en-US/login.html +81 -0
- package/.next/server/pages/en-US/s.html +81 -0
- package/.next/server/pages/en-US.html +81 -0
- package/.next/server/pages/en-US.json +1 -0
- package/.next/server/pages/index.js +407 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/login.js.nft.json +1 -0
- package/.next/server/pages/s.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +16 -0
- package/.next/server/webpack-api-runtime.js +229 -0
- package/.next/server/webpack-runtime.js +229 -0
- package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
- package/.next/static/chunks/153-a20e3f2da180607e.js +1 -0
- package/.next/static/chunks/260-994385416f68673d.js +1 -0
- package/.next/static/chunks/307.10facde65af3066a.js +1 -0
- package/.next/static/chunks/337-4b719ca7a86d8d8c.js +1 -0
- package/.next/static/chunks/351-a4e28d64f48c5269.js +1 -0
- package/.next/static/chunks/588.591fb3bf1a136c66.js +1 -0
- package/.next/static/chunks/650.807852d1c36bfe44.js +1 -0
- package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
- package/.next/static/chunks/686.36adeba271636edd.js +1 -0
- package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
- package/.next/static/chunks/817-728f854c2948afc0.js +1 -0
- package/.next/static/chunks/909.ea3532bde0943808.js +1 -0
- package/.next/static/chunks/953.7a6f29b1fc85a9d9.js +1 -0
- package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
- package/.next/static/chunks/main-9746772201fe3ac1.js +1 -0
- package/.next/static/chunks/pages/404-ba608a2a9f0c420a.js +1 -0
- package/.next/static/chunks/pages/500-910883c20541d9ce.js +1 -0
- package/.next/static/chunks/pages/[...slug]-9443b18a60d89746.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-cb8ef12f6449cf26.js +1 -0
- package/.next/static/chunks/pages/_app-9cc7312632f19e94.js +1 -0
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
- package/.next/static/chunks/pages/account-f19102933e6fd84c.js +1 -0
- package/.next/static/chunks/pages/checkout-f8cb7cb22225ef9d.js +1 -0
- package/.next/static/chunks/pages/index-6717326cc207d674.js +1 -0
- package/.next/static/chunks/pages/login-0b9ea80d9fa0f91b.js +1 -0
- package/.next/static/chunks/pages/s-86fe1e3303388123.js +1 -0
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
- package/.next/static/chunks/webpack-05ab596ed7d0c840.js +1 -0
- package/.next/static/css/14ebc84fc6d6c80c.css +1 -0
- package/.next/static/css/430b8cafbf7c23c1.css +1 -0
- package/.next/static/css/43d61b402f41569b.css +1 -0
- package/.next/static/css/4d7e7f156483493d.css +1 -0
- package/.next/static/css/6507cb48401e73a4.css +1 -0
- package/.next/static/css/9dd1d1084d254c66.css +1 -0
- package/.next/static/css/b2f16bd4b93e0aca.css +1 -0
- package/.next/static/css/bd743407c8049677.css +1 -0
- package/.next/static/css/e63697a078fd522e.css +1 -0
- package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
- package/.next/static/u0qG5OTkkoWzNxl1FnZ39/_buildManifest.js +1 -0
- package/.next/static/u0qG5OTkkoWzNxl1FnZ39/_ssgManifest.js +1 -0
- package/.next/trace +64 -0
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +11 -0
- package/package.json +5 -5
- package/public/~partytown/debug/partytown-atomics.js +556 -0
- package/public/~partytown/debug/partytown-media.js +374 -0
- package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
- package/public/~partytown/debug/partytown-sw.js +59 -0
- package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
- package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
- package/public/~partytown/debug/partytown.js +72 -0
- package/public/~partytown/partytown-atomics.js +2 -0
- package/public/~partytown/partytown-media.js +2 -0
- package/public/~partytown/partytown-sw.js +2 -0
- package/public/~partytown/partytown.js +2 -0
- package/src/components/cart/CartSidebar/CartSidebar.tsx +2 -5
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
var exports = {};
|
|
4
|
+
exports.id = 702;
|
|
5
|
+
exports.ids = [702];
|
|
6
|
+
exports.modules = {
|
|
7
|
+
|
|
8
|
+
/***/ 5363:
|
|
9
|
+
/***/ ((module) => {
|
|
10
|
+
|
|
11
|
+
module.exports = require("@faststore/api");
|
|
12
|
+
|
|
13
|
+
/***/ }),
|
|
14
|
+
|
|
15
|
+
/***/ 7343:
|
|
16
|
+
/***/ ((module) => {
|
|
17
|
+
|
|
18
|
+
module.exports = require("graphql");
|
|
19
|
+
|
|
20
|
+
/***/ }),
|
|
21
|
+
|
|
22
|
+
/***/ 9664:
|
|
23
|
+
/***/ ((module) => {
|
|
24
|
+
|
|
25
|
+
module.exports = import("@envelop/core");;
|
|
26
|
+
|
|
27
|
+
/***/ }),
|
|
28
|
+
|
|
29
|
+
/***/ 7886:
|
|
30
|
+
/***/ ((module) => {
|
|
31
|
+
|
|
32
|
+
module.exports = import("@envelop/graphql-jit");;
|
|
33
|
+
|
|
34
|
+
/***/ }),
|
|
35
|
+
|
|
36
|
+
/***/ 4656:
|
|
37
|
+
/***/ ((module) => {
|
|
38
|
+
|
|
39
|
+
module.exports = import("@envelop/parser-cache");;
|
|
40
|
+
|
|
41
|
+
/***/ }),
|
|
42
|
+
|
|
43
|
+
/***/ 6093:
|
|
44
|
+
/***/ ((module) => {
|
|
45
|
+
|
|
46
|
+
module.exports = import("@envelop/validation-cache");;
|
|
47
|
+
|
|
48
|
+
/***/ }),
|
|
49
|
+
|
|
50
|
+
/***/ 295:
|
|
51
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
52
|
+
|
|
53
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
56
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
57
|
+
/* harmony export */ });
|
|
58
|
+
/* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5363);
|
|
59
|
+
/* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_faststore_api__WEBPACK_IMPORTED_MODULE_0__);
|
|
60
|
+
/* harmony import */ var _server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(350);
|
|
61
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_server__WEBPACK_IMPORTED_MODULE_1__]);
|
|
62
|
+
_server__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
const parseRequest = request => {
|
|
67
|
+
const {
|
|
68
|
+
operationName,
|
|
69
|
+
variables,
|
|
70
|
+
query
|
|
71
|
+
} = request.method === 'POST' ? request.body : {
|
|
72
|
+
operationName: request.query.operationName,
|
|
73
|
+
variables: JSON.parse(typeof request.query.variables === 'string' ? request.query.variables : ''),
|
|
74
|
+
query: undefined
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
operationName,
|
|
78
|
+
variables,
|
|
79
|
+
// Do not allow queries in production, only for devMode so we can use graphql tools
|
|
80
|
+
// like introspection etc. In production, we only accept known queries for better
|
|
81
|
+
// security
|
|
82
|
+
query: false ? 0 : undefined
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const handler = async (request, response) => {
|
|
87
|
+
if (request.method !== 'POST' && request.method !== 'GET') {
|
|
88
|
+
response.status(405);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const {
|
|
93
|
+
operationName,
|
|
94
|
+
variables,
|
|
95
|
+
query
|
|
96
|
+
} = parseRequest(request);
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
const {
|
|
100
|
+
data,
|
|
101
|
+
errors,
|
|
102
|
+
extensions
|
|
103
|
+
} = await (0,_server__WEBPACK_IMPORTED_MODULE_1__/* .execute */ .h)({
|
|
104
|
+
operationName,
|
|
105
|
+
variables,
|
|
106
|
+
query
|
|
107
|
+
}, {
|
|
108
|
+
headers: request.headers
|
|
109
|
+
});
|
|
110
|
+
const hasErrors = Array.isArray(errors);
|
|
111
|
+
|
|
112
|
+
if (hasErrors) {
|
|
113
|
+
const error = errors.find(_faststore_api__WEBPACK_IMPORTED_MODULE_0__.isFastStoreError);
|
|
114
|
+
response.status(error?.extensions.status ?? 500);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const cacheControl = !hasErrors && extensions.cacheControl ? (0,_faststore_api__WEBPACK_IMPORTED_MODULE_0__.stringifyCacheControl)(extensions.cacheControl) : 'no-cache, no-store';
|
|
118
|
+
response.setHeader('cache-control', cacheControl);
|
|
119
|
+
response.setHeader('content-type', 'application/json');
|
|
120
|
+
response.send(JSON.stringify({
|
|
121
|
+
data,
|
|
122
|
+
errors
|
|
123
|
+
}));
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.error(err);
|
|
126
|
+
response.status(500);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (handler);
|
|
131
|
+
__webpack_async_result__();
|
|
132
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
133
|
+
|
|
134
|
+
/***/ }),
|
|
135
|
+
|
|
136
|
+
/***/ 350:
|
|
137
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
138
|
+
|
|
139
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
140
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
141
|
+
/* harmony export */ "h": () => (/* binding */ execute)
|
|
142
|
+
/* harmony export */ });
|
|
143
|
+
/* unused harmony export apiSchema */
|
|
144
|
+
/* harmony import */ var _envelop_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9664);
|
|
145
|
+
/* harmony import */ var _envelop_graphql_jit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7886);
|
|
146
|
+
/* harmony import */ var _envelop_parser_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4656);
|
|
147
|
+
/* harmony import */ var _envelop_validation_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6093);
|
|
148
|
+
/* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5363);
|
|
149
|
+
/* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_faststore_api__WEBPACK_IMPORTED_MODULE_4__);
|
|
150
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7343);
|
|
151
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(graphql__WEBPACK_IMPORTED_MODULE_5__);
|
|
152
|
+
/* harmony import */ var _generated_graphql_persisted_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9609);
|
|
153
|
+
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5576);
|
|
154
|
+
/* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_7__);
|
|
155
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_envelop_core__WEBPACK_IMPORTED_MODULE_0__, _envelop_graphql_jit__WEBPACK_IMPORTED_MODULE_1__, _envelop_parser_cache__WEBPACK_IMPORTED_MODULE_2__, _envelop_validation_cache__WEBPACK_IMPORTED_MODULE_3__]);
|
|
156
|
+
([_envelop_core__WEBPACK_IMPORTED_MODULE_0__, _envelop_graphql_jit__WEBPACK_IMPORTED_MODULE_1__, _envelop_parser_cache__WEBPACK_IMPORTED_MODULE_2__, _envelop_validation_cache__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
157
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
const persistedQueries = new Map(Object.entries(_generated_graphql_persisted_json__WEBPACK_IMPORTED_MODULE_6__));
|
|
167
|
+
const apiOptions = {
|
|
168
|
+
platform: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().platform),
|
|
169
|
+
account: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().api.storeId),
|
|
170
|
+
environment: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().api.environment),
|
|
171
|
+
hideUnavailableItems: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().api.hideUnavailableItems),
|
|
172
|
+
channel: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().session.channel),
|
|
173
|
+
locale: (_faststore_config__WEBPACK_IMPORTED_MODULE_7___default().session.locale),
|
|
174
|
+
flags: {
|
|
175
|
+
enableOrderFormSync: true
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const apiSchema = (0,_faststore_api__WEBPACK_IMPORTED_MODULE_4__.getSchema)(apiOptions);
|
|
179
|
+
const apiContextFactory = (0,_faststore_api__WEBPACK_IMPORTED_MODULE_4__.getContextFactory)(apiOptions);
|
|
180
|
+
|
|
181
|
+
const formatError = err => {
|
|
182
|
+
if (err instanceof graphql__WEBPACK_IMPORTED_MODULE_5__.GraphQLError && (0,_faststore_api__WEBPACK_IMPORTED_MODULE_4__.isFastStoreError)(err.originalError)) {
|
|
183
|
+
return err;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
console.error(err);
|
|
187
|
+
return new graphql__WEBPACK_IMPORTED_MODULE_5__.GraphQLError('Sorry, something went wrong.');
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const getEnvelop = async () => (0,_envelop_core__WEBPACK_IMPORTED_MODULE_0__.envelop)({
|
|
191
|
+
plugins: [(0,_envelop_core__WEBPACK_IMPORTED_MODULE_0__.useAsyncSchema)(apiSchema), (0,_envelop_core__WEBPACK_IMPORTED_MODULE_0__.useExtendContext)(apiContextFactory), (0,_envelop_core__WEBPACK_IMPORTED_MODULE_0__.useMaskedErrors)({
|
|
192
|
+
formatError
|
|
193
|
+
}), (0,_envelop_graphql_jit__WEBPACK_IMPORTED_MODULE_1__.useGraphQlJit)(), (0,_envelop_validation_cache__WEBPACK_IMPORTED_MODULE_3__.useValidationCache)(), (0,_envelop_parser_cache__WEBPACK_IMPORTED_MODULE_2__.useParserCache)()]
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
const envelopPromise = getEnvelop();
|
|
197
|
+
const execute = async (options, envelopContext = {
|
|
198
|
+
headers: {}
|
|
199
|
+
}) => {
|
|
200
|
+
const {
|
|
201
|
+
operationName,
|
|
202
|
+
variables,
|
|
203
|
+
query: maybeQuery
|
|
204
|
+
} = options;
|
|
205
|
+
const query = maybeQuery ?? persistedQueries.get(operationName);
|
|
206
|
+
|
|
207
|
+
if (query == null) {
|
|
208
|
+
throw new Error(`No query found for operationName: ${operationName}`);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const enveloped = await envelopPromise;
|
|
212
|
+
const {
|
|
213
|
+
parse,
|
|
214
|
+
contextFactory,
|
|
215
|
+
execute: run,
|
|
216
|
+
schema
|
|
217
|
+
} = enveloped(envelopContext);
|
|
218
|
+
const contextValue = await contextFactory(envelopContext);
|
|
219
|
+
const {
|
|
220
|
+
data,
|
|
221
|
+
errors
|
|
222
|
+
} = await run({
|
|
223
|
+
schema,
|
|
224
|
+
document: parse(query),
|
|
225
|
+
variableValues: variables,
|
|
226
|
+
contextValue,
|
|
227
|
+
operationName
|
|
228
|
+
});
|
|
229
|
+
return {
|
|
230
|
+
data,
|
|
231
|
+
errors,
|
|
232
|
+
extensions: {
|
|
233
|
+
cacheControl: contextValue.cacheControl
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
__webpack_async_result__();
|
|
238
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
239
|
+
|
|
240
|
+
/***/ }),
|
|
241
|
+
|
|
242
|
+
/***/ 9609:
|
|
243
|
+
/***/ ((module) => {
|
|
244
|
+
|
|
245
|
+
module.exports = JSON.parse('{"ProductGalleryQuery":"query ProductGalleryQuery($first: Int!, $after: String!, $sort: StoreSort!, $term: String!, $selectedFacets: [IStoreSelectedFacet!]!) {\\n search(\\n first: $first\\n after: $after\\n sort: $sort\\n term: $term\\n selectedFacets: $selectedFacets\\n ) {\\n products {\\n pageInfo {\\n totalCount\\n }\\n }\\n facets {\\n ... on StoreFacetRange {\\n key\\n label\\n min {\\n selected\\n absolute\\n }\\n max {\\n selected\\n absolute\\n }\\n __typename\\n }\\n ... on StoreFacetBoolean {\\n key\\n label\\n values {\\n label\\n value\\n selected\\n quantity\\n }\\n __typename\\n }\\n }\\n }\\n}\\n","ServerCollectionPageQuery":"query ServerCollectionPageQuery($slug: String!) {\\n collection(slug: $slug) {\\n seo {\\n title\\n description\\n }\\n breadcrumbList {\\n itemListElement {\\n item\\n name\\n position\\n }\\n }\\n meta {\\n selectedFacets {\\n key\\n value\\n }\\n }\\n }\\n}\\n","ServerProductPageQuery":"query ServerProductPageQuery($slug: String!) {\\n product(locator: [{key: \\"slug\\", value: $slug}]) {\\n id: productID\\n seo {\\n title\\n description\\n canonical\\n }\\n brand {\\n name\\n }\\n sku\\n gtin\\n name\\n description\\n releaseDate\\n breadcrumbList {\\n itemListElement {\\n item\\n name\\n position\\n }\\n }\\n image {\\n url\\n alternateName\\n }\\n offers {\\n lowPrice\\n highPrice\\n priceCurrency\\n offers {\\n availability\\n price\\n priceValidUntil\\n priceCurrency\\n itemCondition\\n seller {\\n identifier\\n }\\n listPrice\\n }\\n }\\n isVariantOf {\\n productGroupID\\n name\\n skuVariants {\\n activeVariations\\n slugsMap(dominantVariantName: \\"Color\\")\\n availableVariations(dominantVariantName: \\"Color\\")\\n }\\n }\\n additionalProperty {\\n propertyID\\n name\\n value\\n valueReference\\n }\\n }\\n}\\n","ValidateCartMutation":"mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\\n validateCart(cart: $cart, session: $session) {\\n order {\\n orderNumber\\n acceptedOffer {\\n seller {\\n identifier\\n }\\n quantity\\n price\\n listPrice\\n itemOffered {\\n sku\\n name\\n image {\\n url\\n alternateName\\n }\\n brand {\\n name\\n }\\n isVariantOf {\\n productGroupID\\n name\\n skuVariants {\\n activeVariations\\n slugsMap(dominantVariantName: \\"Color\\")\\n availableVariations(dominantVariantName: \\"Color\\")\\n }\\n }\\n gtin\\n additionalProperty {\\n propertyID\\n name\\n value\\n valueReference\\n }\\n }\\n }\\n }\\n messages {\\n text\\n status\\n }\\n }\\n}\\n","SubscribeToNewsletter":"mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\\n subscribeToNewsletter(data: $data) {\\n id\\n }\\n}\\n","BrowserProductQuery":"query BrowserProductQuery($locator: [IStoreSelectedFacet!]!) {\\n product(locator: $locator) {\\n id: productID\\n sku\\n name\\n gtin\\n description\\n isVariantOf {\\n name\\n productGroupID\\n skuVariants {\\n activeVariations\\n slugsMap(dominantVariantName: \\"Color\\")\\n availableVariations(dominantVariantName: \\"Color\\")\\n }\\n }\\n image {\\n url\\n alternateName\\n }\\n brand {\\n name\\n }\\n offers {\\n lowPrice\\n offers {\\n availability\\n price\\n listPrice\\n seller {\\n identifier\\n }\\n }\\n }\\n breadcrumbList {\\n itemListElement {\\n item\\n name\\n position\\n }\\n }\\n additionalProperty {\\n propertyID\\n name\\n value\\n valueReference\\n }\\n }\\n}\\n","ProductsQuery":"query ProductsQuery($first: Int!, $after: String, $sort: StoreSort!, $term: String!, $selectedFacets: [IStoreSelectedFacet!]!) {\\n search(\\n first: $first\\n after: $after\\n sort: $sort\\n term: $term\\n selectedFacets: $selectedFacets\\n ) {\\n products {\\n pageInfo {\\n totalCount\\n }\\n edges {\\n node {\\n id: productID\\n slug\\n sku\\n brand {\\n brandName: name\\n name\\n }\\n name\\n gtin\\n isVariantOf {\\n productGroupID\\n name\\n }\\n image {\\n url\\n alternateName\\n }\\n offers {\\n lowPrice\\n offers {\\n availability\\n price\\n listPrice\\n quantity\\n seller {\\n identifier\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n","SearchSuggestionsQuery":"query SearchSuggestionsQuery($term: String!, $selectedFacets: [IStoreSelectedFacet!]) {\\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\\n suggestions {\\n terms {\\n value\\n }\\n products {\\n id: productID\\n slug\\n sku\\n brand {\\n brandName: name\\n name\\n }\\n name\\n gtin\\n isVariantOf {\\n productGroupID\\n name\\n }\\n image {\\n url\\n alternateName\\n }\\n offers {\\n lowPrice\\n offers {\\n availability\\n price\\n listPrice\\n quantity\\n seller {\\n identifier\\n }\\n }\\n }\\n }\\n }\\n }\\n}\\n","TopSearchSuggestionsQuery":"query TopSearchSuggestionsQuery($term: String!, $selectedFacets: [IStoreSelectedFacet!]) {\\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\\n suggestions {\\n terms {\\n value\\n }\\n }\\n }\\n}\\n","ValidateSession":"mutation ValidateSession($session: IStoreSession!, $search: String!) {\\n validateSession(session: $session, search: $search) {\\n locale\\n channel\\n country\\n postalCode\\n currency {\\n code\\n symbol\\n }\\n person {\\n id\\n email\\n givenName\\n familyName\\n }\\n }\\n}\\n","ShippingSimulationQuery":"query ShippingSimulationQuery($postalCode: String!, $country: String!, $items: [IShippingItem!]!) {\\n shipping(items: $items, postalCode: $postalCode, country: $country) {\\n logisticsInfo {\\n slas {\\n carrier\\n price\\n shippingEstimate\\n localizedEstimates\\n }\\n }\\n address {\\n city\\n neighborhood\\n }\\n }\\n}\\n"}');
|
|
246
|
+
|
|
247
|
+
/***/ })
|
|
248
|
+
|
|
249
|
+
};
|
|
250
|
+
;
|
|
251
|
+
|
|
252
|
+
// load runtime
|
|
253
|
+
var __webpack_require__ = require("../../webpack-api-runtime.js");
|
|
254
|
+
__webpack_require__.C(exports);
|
|
255
|
+
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
256
|
+
var __webpack_exports__ = __webpack_require__.X(0, [576], () => (__webpack_exec__(295)));
|
|
257
|
+
module.exports = __webpack_exports__;
|
|
258
|
+
|
|
259
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"files":["../../webpack-api-runtime.js","../../chunks/576.js","../../../package.json","../../../../node_modules/@faststore/api/package.json","../../../../node_modules/@faststore/api/dist/index.js","../../../../node_modules/@faststore/api/dist/api.cjs.production.min.js","../../../../node_modules/@faststore/api/dist/api.cjs.development.js","../../../../node_modules/@graphql-tools/schema/package.json","../../../../node_modules/@graphql-tools/schema/cjs/index.js","../../../../node_modules/@graphql-tools/schema/cjs/package.json","../../../../node_modules/@graphql-tools/schema/cjs/assertResolversPresent.js","../../../../node_modules/@graphql-tools/schema/cjs/chainResolvers.js","../../../../node_modules/@graphql-tools/schema/cjs/addResolversToSchema.js","../../../../node_modules/@graphql-tools/schema/cjs/checkForResolveTypeResolver.js","../../../../node_modules/@graphql-tools/schema/cjs/extendResolversFromInterfaces.js","../../../../node_modules/@graphql-tools/schema/cjs/makeExecutableSchema.js","../../../../node_modules/@graphql-tools/schema/cjs/types.js","../../../../node_modules/@graphql-tools/schema/cjs/merge-schemas.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/package.json","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/index.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/package.json","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/loaders.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/helpers.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/get-directives.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/get-fields-with-directives.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/get-implementing-types.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/print-schema-with-directives.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/validate-documents.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/parse-graphql-json.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/parse-graphql-sdl.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/build-operation-for-field.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/types.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/filterSchema.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/heal.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/getResolversFromSchema.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/forEachField.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/forEachDefaultValue.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/mapSchema.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/addTypes.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/rewire.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/prune.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/mergeDeep.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/Interfaces.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/stub.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/selectionSets.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/getResponseKeyFromInfo.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/fields.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/renameType.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/transformInputValue.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/mapAsyncIterator.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/updateArgument.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/implementsAbstractType.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/errors.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/observableToAsyncIterable.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/visitResult.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/getArgumentValues.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/valueMatchesCriteria.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/isAsyncIterable.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/isDocumentNode.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/astFromValueUntyped.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/executor.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/withCancel.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/AggregateError.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/rootTypes.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/comments.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/collectFields.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/inspect.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/memoize.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/fixSchemaAst.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/getOperationASTFromRequest.js","../../../../node_modules/@graphql-tools/merge/package.json","../../../../node_modules/@graphql-tools/merge/cjs/index.js","../../../../node_modules/@graphql-tools/merge/cjs/package.json","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/astFromType.js","../../../../node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils/cjs/getObjectTypeFromTypeMap.js","../../../../node_modules/@graphql-tools/merge/cjs/merge-resolvers.js","../../../../node_modules/@graphql-tools/merge/cjs/extensions.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/index.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/arguments.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/directives.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/enum-values.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/enum.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/fields.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/input-type.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/interface.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/merge-named-type-array.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/merge-nodes.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/merge-typedefs.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/scalar.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/type.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/union.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/utils.js","../../../../node_modules/@graphql-tools/merge/cjs/typedefs-mergers/schema-def.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/package.json","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/index.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/package.json","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/loaders.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/helpers.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/get-directives.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/get-fields-with-directives.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/get-implementing-types.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/print-schema-with-directives.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/validate-documents.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/parse-graphql-json.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/parse-graphql-sdl.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/build-operation-for-field.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/types.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/filterSchema.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/heal.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/getResolversFromSchema.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/forEachField.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/forEachDefaultValue.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/mapSchema.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/addTypes.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/rewire.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/prune.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/mergeDeep.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/Interfaces.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/stub.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/selectionSets.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/getResponseKeyFromInfo.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/fields.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/renameType.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/transformInputValue.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/mapAsyncIterator.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/updateArgument.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/implementsAbstractType.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/errors.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/observableToAsyncIterable.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/visitResult.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/getArgumentValues.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/valueMatchesCriteria.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/isAsyncIterable.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/isDocumentNode.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/astFromValueUntyped.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/executor.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/withCancel.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/AggregateError.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/rootTypes.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/comments.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/collectFields.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/inspect.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/memoize.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/fixSchemaAst.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/getOperationASTFromRequest.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/astFromType.js","../../../../node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils/cjs/getObjectTypeFromTypeMap.js","../../../../@generated/graphql/persisted.json","../../../../package.json"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
var exports = {};
|
|
4
|
+
exports.id = 157;
|
|
5
|
+
exports.ids = [157];
|
|
6
|
+
exports.modules = {
|
|
7
|
+
|
|
8
|
+
/***/ 4774:
|
|
9
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10
|
+
|
|
11
|
+
// ESM COMPAT FLAG
|
|
12
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13
|
+
|
|
14
|
+
// EXPORTS
|
|
15
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
16
|
+
"default": () => (/* binding */ preview)
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
;// CONCATENATED MODULE: external "@vtex/client-cms"
|
|
20
|
+
const client_cms_namespaceObject = require("@vtex/client-cms");
|
|
21
|
+
var client_cms_default = /*#__PURE__*/__webpack_require__.n(client_cms_namespaceObject);
|
|
22
|
+
// EXTERNAL MODULE: ./faststore.config.js
|
|
23
|
+
var faststore_config = __webpack_require__(5576);
|
|
24
|
+
var faststore_config_default = /*#__PURE__*/__webpack_require__.n(faststore_config);
|
|
25
|
+
;// CONCATENATED MODULE: ./src/server/cms.ts
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const clientCMS = new (client_cms_default())({
|
|
29
|
+
workspace: (faststore_config_default()).api.workspace,
|
|
30
|
+
tenant: (faststore_config_default()).api.storeId
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const isLocator = x => typeof x.contentType === 'string' && (typeof x.releaseId === 'string' || typeof x.documentId === 'string');
|
|
34
|
+
|
|
35
|
+
const getPage = async options => {
|
|
36
|
+
const result = await (isLocator(options) ? clientCMS.getCMSPage(options).then(page => ({
|
|
37
|
+
data: [page]
|
|
38
|
+
})) : clientCMS.getCMSPagesByContentType(options.contentType, options.filters));
|
|
39
|
+
const pages = result.data;
|
|
40
|
+
|
|
41
|
+
if (!pages[0]) {
|
|
42
|
+
throw new Error(`Missing content on the CMS for content type ${options.contentType}. Add content before proceeding. Context: ${JSON.stringify(options, null, 2)}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (pages.length !== 1) {
|
|
46
|
+
throw new Error(`Multiple content defined on the CMS for content type ${options.contentType}. Remove duplicated content before proceeding. Context: ${JSON.stringify(options, null, 2)}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return pages[0];
|
|
50
|
+
};
|
|
51
|
+
;// CONCATENATED MODULE: ./src/pages/api/preview.ts
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class StatusError extends Error {
|
|
55
|
+
constructor(message, status) {
|
|
56
|
+
super(message);
|
|
57
|
+
this.status = status;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const pickParam = (req, parameter) => {
|
|
63
|
+
const maybeParam = req.query[parameter];
|
|
64
|
+
|
|
65
|
+
if (typeof maybeParam !== 'string') {
|
|
66
|
+
throw new StatusError(`Parameter ${parameter} missing from querystring`, 400);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return maybeParam;
|
|
70
|
+
}; // TODO: Improve security by disabling CMS preview in production
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
const handler = async (req, res) => {
|
|
74
|
+
try {
|
|
75
|
+
const locator = {
|
|
76
|
+
contentType: pickParam(req, 'contentType'),
|
|
77
|
+
documentId: pickParam(req, 'documentId'),
|
|
78
|
+
versionId: pickParam(req, 'versionId')
|
|
79
|
+
}; // Fetch CMS to check if the provided `locator` exists
|
|
80
|
+
|
|
81
|
+
const page = await clientCMS.getCMSPage(locator); // If the content doesn't exist prevent preview mode from being enabled
|
|
82
|
+
|
|
83
|
+
if (!page) {
|
|
84
|
+
throw new StatusError(`Content NotFound for ${JSON.stringify(locator, null, 2)}`, 404);
|
|
85
|
+
} // Enable Preview Mode by setting the cookies
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
res.setPreviewData(locator, {
|
|
89
|
+
maxAge: 3600
|
|
90
|
+
}); // Redirect to the path from the fetched locator
|
|
91
|
+
// TODO: apply redirect based on the content
|
|
92
|
+
|
|
93
|
+
res.redirect('/');
|
|
94
|
+
} catch (error) {
|
|
95
|
+
if (error instanceof StatusError) {
|
|
96
|
+
res.status(error.status).end(error.message);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/* harmony default export */ const preview = (handler);
|
|
105
|
+
|
|
106
|
+
/***/ })
|
|
107
|
+
|
|
108
|
+
};
|
|
109
|
+
;
|
|
110
|
+
|
|
111
|
+
// load runtime
|
|
112
|
+
var __webpack_require__ = require("../../webpack-api-runtime.js");
|
|
113
|
+
__webpack_require__.C(exports);
|
|
114
|
+
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
115
|
+
var __webpack_exports__ = __webpack_require__.X(0, [576], () => (__webpack_exec__(4774)));
|
|
116
|
+
module.exports = __webpack_exports__;
|
|
117
|
+
|
|
118
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"files":["../../webpack-api-runtime.js","../../chunks/576.js","../../../package.json","../../../../package.json"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"files":["../webpack-runtime.js","../chunks/183.js","../../package.json","../../../package.json"]}
|