shopify-nuxt 0.0.4 → 0.0.5
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -45,7 +45,7 @@ const module$1 = defineNuxtModule({
|
|
|
45
45
|
nuxt.options.app.head.meta = [
|
|
46
46
|
{
|
|
47
47
|
name: "content-security-policy",
|
|
48
|
-
content: "frame-ancestors 'self' *.myshopify.com *.shopify.com"
|
|
48
|
+
content: "frame-ancestors 'self' *.myshopify.com *.shopify.com *.trycloudflare.com"
|
|
49
49
|
},
|
|
50
50
|
...nuxt.options.app.head.meta || []
|
|
51
51
|
];
|
|
@@ -27,7 +27,7 @@ export default defineEventHandler(async (event) => {
|
|
|
27
27
|
try {
|
|
28
28
|
await api.webhooks.register({ session });
|
|
29
29
|
} catch (e) {
|
|
30
|
-
console.
|
|
30
|
+
console.debug("[shopify-nuxt] Failed to register webhooks:", e);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
const shop = session.shop;
|
|
@@ -35,7 +35,7 @@ export default defineEventHandler(async (event) => {
|
|
|
35
35
|
const redirectUrl = `${config.appUrl}?shop=${shop}&host=${host}`;
|
|
36
36
|
return sendRedirect(event, redirectUrl, 302);
|
|
37
37
|
} catch (error) {
|
|
38
|
-
console.
|
|
38
|
+
console.debug("[shopify-nuxt] Auth callback error:", error.message);
|
|
39
39
|
throw createError({
|
|
40
40
|
statusCode: 500,
|
|
41
41
|
statusMessage: "Authentication failed",
|
|
@@ -142,7 +142,7 @@ async function performTokenExchange(api, config, sessionStorage, shop, sessionTo
|
|
|
142
142
|
});
|
|
143
143
|
onlineSession = result.session;
|
|
144
144
|
} catch (error) {
|
|
145
|
-
console.
|
|
145
|
+
console.debug("[shopify-nuxt] Token exchange failed:", {
|
|
146
146
|
shop,
|
|
147
147
|
requestedTokenType: config.useOnlineTokens ? OnlineAccessToken : OfflineAccessToken,
|
|
148
148
|
scopes: api.config.scopes?.toString(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shopify-nuxt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Shopify app integration for Nuxt - authentication, webhooks, billing, and App Bridge",
|
|
5
5
|
"repository": "kiriminaja/shopify-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/types.d.mts",
|
|
12
|
-
"import": "./dist/module.mjs"
|
|
12
|
+
"import": "./dist/module.mjs",
|
|
13
|
+
"require": "./dist/module.mjs"
|
|
13
14
|
},
|
|
14
15
|
"./test-helpers": {
|
|
15
16
|
"types": "./dist/runtime/server/test-helpers/index.d.ts",
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
"main": "./dist/module.mjs",
|
|
21
|
+
"types": "./dist/types.d.mts",
|
|
20
22
|
"typesVersions": {
|
|
21
23
|
"*": {
|
|
22
24
|
".": [
|