@faststore/core 2.1.87 → 2.1.91
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/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +129 -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 +44 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/177.js +120 -0
- package/.next/server/chunks/183.js +94 -0
- package/.next/server/chunks/184.js +61 -0
- package/.next/server/chunks/186.js +113 -0
- package/.next/server/chunks/289.js +239 -0
- package/.next/server/chunks/312.js +697 -0
- package/.next/server/chunks/350.js +143 -0
- package/.next/server/chunks/483.js +650 -0
- package/.next/server/chunks/487.js +9142 -0
- package/.next/server/chunks/53.js +61 -0
- package/.next/server/chunks/530.js +626 -0
- package/.next/server/chunks/574.js +126 -0
- package/.next/server/chunks/576.js +94 -0
- package/.next/server/chunks/650.js +9142 -0
- package/.next/server/chunks/676.js +32 -0
- package/.next/server/chunks/693.js +58 -0
- package/.next/server/chunks/71.js +1254 -0
- package/.next/server/chunks/74.js +4065 -0
- package/.next/server/chunks/753.js +509 -0
- package/.next/server/chunks/779.js +58 -0
- package/.next/server/chunks/825.js +4039 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/859.js +959 -0
- package/.next/server/chunks/907.js +1911 -0
- package/.next/server/chunks/933.js +517 -0
- package/.next/server/chunks/98.js +144 -0
- package/.next/server/chunks/988.js +211 -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 +386 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/500.js +388 -0
- package/.next/server/pages/500.js.nft.json +1 -0
- package/.next/server/pages/[...slug].js +1006 -0
- package/.next/server/pages/[...slug].js.nft.json +1 -0
- package/.next/server/pages/[slug]/p.js +2269 -0
- package/.next/server/pages/[slug]/p.js.nft.json +1 -0
- package/.next/server/pages/_app.js +280 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +374 -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 +363 -0
- package/.next/server/pages/account.js.nft.json +1 -0
- package/.next/server/pages/api/graphql.js +365 -0
- package/.next/server/pages/api/graphql.js.nft.json +1 -0
- package/.next/server/pages/api/health/live.js +31 -0
- package/.next/server/pages/api/health/live.js.nft.json +1 -0
- package/.next/server/pages/api/health/ready.js +31 -0
- package/.next/server/pages/api/health/ready.js.nft.json +1 -0
- package/.next/server/pages/api/preview.js +148 -0
- package/.next/server/pages/api/preview.js.nft.json +1 -0
- package/.next/server/pages/checkout.js +363 -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/404.json +1 -0
- package/.next/server/pages/en-US/500.html +81 -0
- package/.next/server/pages/en-US/500.json +1 -0
- package/.next/server/pages/en-US/account.html +81 -0
- package/.next/server/pages/en-US/account.json +1 -0
- package/.next/server/pages/en-US/checkout.html +81 -0
- package/.next/server/pages/en-US/checkout.json +1 -0
- package/.next/server/pages/en-US/login.html +81 -0
- package/.next/server/pages/en-US/login.json +1 -0
- package/.next/server/pages/en-US/s.html +81 -0
- package/.next/server/pages/en-US/s.json +1 -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 +439 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/login.js +368 -0
- package/.next/server/pages/login.js.nft.json +1 -0
- package/.next/server/pages/s.js +466 -0
- package/.next/server/pages/s.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +18 -0
- package/.next/server/webpack-api-runtime.js +229 -0
- package/.next/server/webpack-runtime.js +229 -0
- package/.next/static/PBbhTOsdD9dUNSyZhQVMh/_buildManifest.js +1 -0
- package/.next/static/PBbhTOsdD9dUNSyZhQVMh/_ssgManifest.js +1 -0
- package/.next/static/chunks/148.3bb7e05cc5d1c1c4.js +1 -0
- package/.next/static/chunks/238-e5e4b2094f0e1df8.js +1 -0
- package/.next/static/chunks/243-df6d1b248f7b4d3c.js +1 -0
- package/.next/static/chunks/530.848b014622932b93.js +1 -0
- package/.next/static/chunks/548-ab84e9e8b49413ab.js +1 -0
- package/.next/static/chunks/574.d13dd0afe15cd635.js +1 -0
- package/.next/static/chunks/603-d1c069aa8a349c86.js +1 -0
- package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
- package/.next/static/chunks/709.7bc5a25ce30abda6.js +1 -0
- package/.next/static/chunks/738-67a288ca3569cdbb.js +1 -0
- package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
- package/.next/static/chunks/98.1632997dfd4d3a52.js +1 -0
- package/.next/static/chunks/988.d10040040cdfebbb.js +1 -0
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
- package/.next/static/chunks/main-fd466221927468fd.js +1 -0
- package/.next/static/chunks/pages/404-af78f7cd1d3c1f60.js +1 -0
- package/.next/static/chunks/pages/500-f6346ca5f9dc4fef.js +1 -0
- package/.next/static/chunks/pages/[...slug]-ca533c74c22cb787.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-7bb760bb3fcfc0bb.js +1 -0
- package/.next/static/chunks/pages/_app-6d0e6ab9a4dd8106.js +1 -0
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
- package/.next/static/chunks/pages/account-05bd79fb78365e88.js +1 -0
- package/.next/static/chunks/pages/checkout-c973786e68f25a39.js +1 -0
- package/.next/static/chunks/pages/index-d521ce4f4e2b89a6.js +1 -0
- package/.next/static/chunks/pages/login-8deb9243376b6aa1.js +1 -0
- package/.next/static/chunks/pages/s-0e516ab36bb49c99.js +1 -0
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
- package/.next/static/chunks/webpack-352e624909554726.js +1 -0
- package/.next/static/css/20e4a3a45cdd65f4.css +1 -0
- package/.next/static/css/4b7138899cd07c63.css +1 -0
- package/.next/static/css/527e334fa69cf40a.css +1 -0
- package/.next/static/css/6e1a7434f061d0ef.css +1 -0
- package/.next/static/css/9e76fef1c9ca89af.css +1 -0
- package/.next/static/css/a2eefb25a4608343.css +1 -0
- package/.next/static/css/cb7d1fcea42fab9c.css +1 -0
- package/.next/static/css/df588bb98c0b0ca6.css +1 -0
- package/.next/static/css/e3b039e8f5daf95f.css +1 -0
- package/.next/static/css/f0e2d1b8832e935d.css +1 -0
- package/.next/trace +80 -0
- package/package.json +3 -3
- 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/pages/[...slug].tsx +4 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 574;
|
|
3
|
+
exports.ids = [574];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 33574:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
// ESM COMPAT FLAG
|
|
10
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11
|
+
|
|
12
|
+
// EXPORTS
|
|
13
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
+
"default": () => (/* binding */ search)
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// EXTERNAL MODULE: ./faststore.config.js
|
|
18
|
+
var faststore_config = __webpack_require__(97183);
|
|
19
|
+
var faststore_config_default = /*#__PURE__*/__webpack_require__.n(faststore_config);
|
|
20
|
+
;// CONCATENATED MODULE: ./src/utils/getCookie.ts
|
|
21
|
+
function getCookie(name) {
|
|
22
|
+
const cookieString = decodeURIComponent(document.cookie);
|
|
23
|
+
const cookies = cookieString.split(';');
|
|
24
|
+
|
|
25
|
+
for (const cookie of cookies) {
|
|
26
|
+
const [cookieName, cookieValue] = cookie.trim().split('=');
|
|
27
|
+
|
|
28
|
+
if (cookieName === name) {
|
|
29
|
+
return cookieValue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return undefined; // Cookie not found
|
|
34
|
+
}
|
|
35
|
+
;// CONCATENATED MODULE: ./src/sdk/analytics/platform/vtex/search.ts
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* More info at: https://www.notion.so/vtexhandbook/Event-API-Documentation-48eee26730cf4d7f80f8fd7262231f84
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const THIRTY_MINUTES_S = 30 * 60;
|
|
48
|
+
const ONE_YEAR_S = 365 * 24 * 3600;
|
|
49
|
+
|
|
50
|
+
const randomUUID = () => typeof crypto.randomUUID === 'function' ? crypto.randomUUID() : (Math.random() * 1e6).toFixed(0);
|
|
51
|
+
|
|
52
|
+
const createCookie = (key, expiresSecond) => {
|
|
53
|
+
// Setting the domain attribute specifies which host can receive it; we need it to make the cookies available on the `secure` subdomain.
|
|
54
|
+
// Although https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie mentioned leading dot (.) is not needed and ignored. I couldn't set the cookies without it.
|
|
55
|
+
const urlDomain = `.${new URL((faststore_config_default()).storeUrl).hostname}`;
|
|
56
|
+
return () => {
|
|
57
|
+
const isExpired = getCookie(key) === undefined;
|
|
58
|
+
|
|
59
|
+
if (isExpired) {
|
|
60
|
+
const value = randomUUID();
|
|
61
|
+
document.cookie = `${key}=${value}; max-age=${expiresSecond}; domain=${urlDomain}; path=/;`; // Setting the `path=/` makes the cookie accessible on any path of the domain/subdomain
|
|
62
|
+
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return getCookie(key);
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const user = {
|
|
71
|
+
anonymous: createCookie('vtex-faststore-anonymous', ONE_YEAR_S),
|
|
72
|
+
session: createCookie('vtex-faststore-session', THIRTY_MINUTES_S)
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const sendEvent = options => fetch(`https://sp.vtex.com/event-api/v1/${(faststore_config_default()).api.storeId}/event`, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
body: JSON.stringify(_objectSpread(_objectSpread({}, options), {}, {
|
|
78
|
+
userAgent: navigator.userAgent,
|
|
79
|
+
anonymous: user.anonymous(),
|
|
80
|
+
session: user.session()
|
|
81
|
+
})),
|
|
82
|
+
headers: {
|
|
83
|
+
'content-type': 'application/json'
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const isFullTextSearch = url => typeof url.searchParams.get('q') === 'string' && /^\/s(\/)?$/g.test(url.pathname);
|
|
88
|
+
|
|
89
|
+
const handleEvent = event => {
|
|
90
|
+
if (event.name !== 'search_select_item') {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const url = new URL(event.params.url);
|
|
95
|
+
|
|
96
|
+
if (!isFullTextSearch(url)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
for (const item of event.params.items ?? []) {
|
|
101
|
+
const productId = item.item_id ?? item.item_variant;
|
|
102
|
+
const position = item.index;
|
|
103
|
+
|
|
104
|
+
if (productId && position) {
|
|
105
|
+
sendEvent({
|
|
106
|
+
type: 'search.click',
|
|
107
|
+
productId,
|
|
108
|
+
position,
|
|
109
|
+
url: url.href,
|
|
110
|
+
text: url.searchParams.get('q') ?? '<empty>'
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
setInterval(() => sendEvent({
|
|
117
|
+
type: 'session.ping'
|
|
118
|
+
}), 60 * 1e3
|
|
119
|
+
/* One minute */
|
|
120
|
+
);
|
|
121
|
+
/* harmony default export */ const search = (handleEvent);
|
|
122
|
+
|
|
123
|
+
/***/ })
|
|
124
|
+
|
|
125
|
+
};
|
|
126
|
+
;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
exports.id = 576;
|
|
2
|
+
exports.ids = [576];
|
|
3
|
+
exports.modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 45576:
|
|
6
|
+
/***/ ((module) => {
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
seo: {
|
|
10
|
+
title: 'FastStore Starter',
|
|
11
|
+
description: 'Fast Demo Store',
|
|
12
|
+
titleTemplate: '%s | FastStore',
|
|
13
|
+
author: 'Store Framework'
|
|
14
|
+
},
|
|
15
|
+
// Theming
|
|
16
|
+
theme: 'custom-theme',
|
|
17
|
+
// Ecommerce Platform
|
|
18
|
+
platform: 'vtex',
|
|
19
|
+
// Platform specific configs for API
|
|
20
|
+
api: {
|
|
21
|
+
storeId: 'storeframework',
|
|
22
|
+
workspace: 'master',
|
|
23
|
+
environment: 'vtexcommercestable',
|
|
24
|
+
hideUnavailableItems: false,
|
|
25
|
+
incrementAddress: true
|
|
26
|
+
},
|
|
27
|
+
// Default session
|
|
28
|
+
session: {
|
|
29
|
+
currency: {
|
|
30
|
+
code: 'USD',
|
|
31
|
+
symbol: '$'
|
|
32
|
+
},
|
|
33
|
+
locale: 'en-US',
|
|
34
|
+
channel: '{"salesChannel":"1","regionId":""}',
|
|
35
|
+
country: 'USA',
|
|
36
|
+
deliveryMode: null,
|
|
37
|
+
addressType: null,
|
|
38
|
+
postalCode: null,
|
|
39
|
+
geoCoordinates: null,
|
|
40
|
+
person: null
|
|
41
|
+
},
|
|
42
|
+
// Default cart
|
|
43
|
+
cart: {
|
|
44
|
+
id: '',
|
|
45
|
+
items: [],
|
|
46
|
+
messages: [],
|
|
47
|
+
shouldSplitItem: true
|
|
48
|
+
},
|
|
49
|
+
// Production URLs
|
|
50
|
+
storeUrl: 'https://vtexfaststore.com',
|
|
51
|
+
secureSubdomain: 'https://secure.vtexfaststore.com',
|
|
52
|
+
checkoutUrl: 'https://secure.vtexfaststore.com/checkout',
|
|
53
|
+
loginUrl: 'https://secure.vtexfaststore.com/api/io/login',
|
|
54
|
+
accountUrl: 'https://secure.vtexfaststore.com/api/io/account',
|
|
55
|
+
// Preview redirects
|
|
56
|
+
previewRedirects: {
|
|
57
|
+
home: '/',
|
|
58
|
+
plp: '/office',
|
|
59
|
+
search: '/s?q=headphone',
|
|
60
|
+
pdp: '/apple-magic-mouse/p'
|
|
61
|
+
},
|
|
62
|
+
// Lighthouse CI
|
|
63
|
+
lighthouse: {
|
|
64
|
+
server: process.env.BASE_SITE_URL || 'http://localhost:3000',
|
|
65
|
+
pages: {
|
|
66
|
+
home: '/',
|
|
67
|
+
pdp: '/apple-magic-mouse/p',
|
|
68
|
+
collection: '/office'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
// E2E CI
|
|
72
|
+
cypress: {
|
|
73
|
+
pages: {
|
|
74
|
+
home: '/',
|
|
75
|
+
pdp: '/apple-magic-mouse/p',
|
|
76
|
+
collection: '/office',
|
|
77
|
+
collection_2: '/technology',
|
|
78
|
+
collection_filtered: '/office/?category-1=office&marca=acer&facets=category-1%2Cmarca',
|
|
79
|
+
search: '/s?q=orange'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
analytics: {
|
|
83
|
+
// https://developers.google.com/tag-platform/tag-manager/web#standard_web_page_installation,
|
|
84
|
+
gtmContainerId: 'GTM-PGHZ95N'
|
|
85
|
+
},
|
|
86
|
+
experimental: {
|
|
87
|
+
enableCypressExtension: false
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/***/ })
|
|
92
|
+
|
|
93
|
+
};
|
|
94
|
+
;
|