@pack/hydrogen 1.0.2 → 1.0.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-request.d.ts","sourceRoot":"","sources":["../src/handle-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GACrD,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"handle-request.d.ts","sourceRoot":"","sources":["../src/handle-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5C,wBAAsB,aAAa,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GACrD,OAAO,CAAC,QAAQ,CAAC,CASnB"}
|
package/dist/handle-request.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { packlytics } from "@pack/packlytics";
|
|
2
2
|
export async function handleRequest(pack, request, handleRequest) {
|
|
3
|
-
const
|
|
4
|
-
handleRequest(request)
|
|
5
|
-
|
|
6
|
-
storeFrontId: pack.getPackSessionData().storeId,
|
|
7
|
-
sessionSecret: pack.session.secret,
|
|
8
|
-
}),
|
|
9
|
-
]);
|
|
3
|
+
const response = await packlytics(pack, request, () => {
|
|
4
|
+
return handleRequest(request);
|
|
5
|
+
});
|
|
10
6
|
response.headers.append("powered-by", "Shopify, Hydrogen + Pack Digital");
|
|
11
7
|
response.headers.append("Set-Cookie", await pack.session.commit());
|
|
12
8
|
return response;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pack/hydrogen",
|
|
3
3
|
"description": "Pack Hydrogen",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"engines": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@pack/client": "^1.0.1",
|
|
26
|
-
"@pack/packlytics": "^1.0.
|
|
26
|
+
"@pack/packlytics": "^1.0.1",
|
|
27
27
|
"@shopify/hydrogen": "^2023.10.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|