@agnostack/next-shopify 1.6.0 → 1.7.0-alpha.10
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/CHANGELOG.md +141 -4
- package/dist/handlers/api.d.ts +5 -0
- package/dist/handlers/api.js +24 -7
- package/dist/handlers/api.js.map +1 -1
- package/dist/handlers/ssr.js +10 -6
- package/dist/handlers/ssr.js.map +1 -1
- package/dist/helpers/auth.js +3 -5
- package/dist/helpers/auth.js.map +1 -1
- package/dist/helpers/callback.d.ts +1 -1
- package/dist/helpers/callback.js +27 -19
- package/dist/helpers/callback.js.map +1 -1
- package/dist/helpers/graph.js +6 -4
- package/dist/helpers/graph.js.map +1 -1
- package/dist/helpers/rest.js +6 -4
- package/dist/helpers/rest.js.map +1 -1
- package/dist/helpers/uninstall.d.ts +4 -5
- package/dist/helpers/uninstall.js +32 -17
- package/dist/helpers/uninstall.js.map +1 -1
- package/dist/utils/billing.d.ts +9 -5
- package/dist/utils/billing.js +75 -27
- package/dist/utils/billing.js.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +43 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/errors.d.ts +12 -0
- package/dist/utils/errors.js +16 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/session.d.ts +14 -0
- package/dist/utils/session.js +80 -0
- package/dist/utils/session.js.map +1 -0
- package/dist/utils/shopify-api-node/beginAuth.d.ts +2 -5
- package/dist/utils/shopify-api-node/beginAuth.js +18 -10
- package/dist/utils/shopify-api-node/beginAuth.js.map +1 -1
- package/dist/utils/shopify.d.ts +3 -83
- package/dist/utils/shopify.js +39 -98
- package/dist/utils/shopify.js.map +1 -1
- package/dist/withShopify.js +24 -9
- package/dist/withShopify.js.map +1 -1
- package/package.json +4 -3
package/dist/utils/shopify.d.ts
CHANGED
|
@@ -1,87 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export function
|
|
3
|
-
Context: import("@shopify/shopify-api/dist/context").ContextInterface;
|
|
4
|
-
Auth: {
|
|
5
|
-
SESSION_COOKIE_NAME: string;
|
|
6
|
-
STATE_COOKIE_NAME: string;
|
|
7
|
-
beginAuth(request: import("http").IncomingMessage, response: import("http").ServerResponse, shop: string, redirectPath: string, isOnline?: boolean): Promise<string>;
|
|
8
|
-
validateAuthCallback(request: import("http").IncomingMessage, response: import("http").ServerResponse, query: import("@shopify/shopify-api").AuthQuery): Promise<import("@shopify/shopify-api").SessionInterface>;
|
|
9
|
-
getCookieSessionId(request: import("http").IncomingMessage, response: import("http").ServerResponse): string;
|
|
10
|
-
getJwtSessionId(shop: string, userId: string): string;
|
|
11
|
-
getOfflineSessionId(shop: string): string;
|
|
12
|
-
getCurrentSessionId(request: import("http").IncomingMessage, response: import("http").ServerResponse, isOnline?: boolean): string;
|
|
13
|
-
};
|
|
14
|
-
Billing: {
|
|
15
|
-
check: typeof import("@shopify/shopify-api/dist/billing/check").check;
|
|
16
|
-
};
|
|
17
|
-
Session: {
|
|
18
|
-
Session: typeof import("@shopify/shopify-api/dist/auth/session/session").Session;
|
|
19
|
-
MemorySessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").MemorySessionStorage;
|
|
20
|
-
CustomSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").CustomSessionStorage;
|
|
21
|
-
MySQLSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").MySQLSessionStorage;
|
|
22
|
-
MongoDBSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").MongoDBSessionStorage;
|
|
23
|
-
PostgreSQLSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").PostgreSQLSessionStorage;
|
|
24
|
-
RedisSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").RedisSessionStorage;
|
|
25
|
-
SQLiteSessionStorage: typeof import("@shopify/shopify-api/dist/auth/session").SQLiteSessionStorage;
|
|
26
|
-
};
|
|
27
|
-
Clients: {
|
|
28
|
-
Rest: typeof import("@shopify/shopify-api/dist/clients/rest/rest_client").RestClient;
|
|
29
|
-
Graphql: typeof import("@shopify/shopify-api/dist/clients/graphql").GraphqlClient;
|
|
30
|
-
Storefront: typeof import("@shopify/shopify-api/dist/clients/graphql/storefront_client").StorefrontClient;
|
|
31
|
-
};
|
|
32
|
-
Utils: {
|
|
33
|
-
decodeSessionToken: typeof import("@shopify/shopify-api/dist/utils/decode-session-token").default;
|
|
34
|
-
deleteCurrentSession: typeof import("@shopify/shopify-api/dist/utils/delete-current-session").default;
|
|
35
|
-
deleteOfflineSession: typeof import("@shopify/shopify-api/dist/utils/delete-offline-session").default;
|
|
36
|
-
loadCurrentSession: typeof import("@shopify/shopify-api/dist/utils/load-current-session").default;
|
|
37
|
-
loadOfflineSession: typeof import("@shopify/shopify-api/dist/utils/load-offline-session").default;
|
|
38
|
-
nonce: typeof import("@shopify/shopify-api/dist/utils/nonce").default;
|
|
39
|
-
graphqlProxy: typeof import("@shopify/shopify-api/dist/utils/graphql_proxy").default;
|
|
40
|
-
safeCompare: typeof import("@shopify/shopify-api/dist/utils/safe-compare").default;
|
|
41
|
-
storeSession: typeof import("@shopify/shopify-api/dist/utils/store-session").default;
|
|
42
|
-
validateHmac: typeof import("@shopify/shopify-api/dist/utils/hmac-validator").default;
|
|
43
|
-
sanitizeShop: typeof import("@shopify/shopify-api/dist/utils/shop-validator").sanitizeShop;
|
|
44
|
-
sanitizeHost: typeof import("@shopify/shopify-api/dist/utils/shop-validator").sanitizeHost;
|
|
45
|
-
versionCompatible: typeof import("@shopify/shopify-api/dist/utils/version-compatible").default;
|
|
46
|
-
withSession: typeof import("@shopify/shopify-api/dist/utils/with-session").default;
|
|
47
|
-
getEmbeddedAppUrl: typeof import("@shopify/shopify-api/dist/utils/get-embedded-app-url").default;
|
|
48
|
-
};
|
|
49
|
-
Webhooks: {
|
|
50
|
-
Registry: import("@shopify/shopify-api/dist/webhooks/registry").RegistryInterface;
|
|
51
|
-
};
|
|
52
|
-
Errors: typeof import("@shopify/shopify-api/dist/error");
|
|
53
|
-
};
|
|
54
|
-
export function generatePaymentConfig(paymentConfig: any, data: any): {
|
|
55
|
-
type: any;
|
|
56
|
-
required: boolean;
|
|
57
|
-
test: boolean;
|
|
58
|
-
name: string;
|
|
59
|
-
price: {
|
|
60
|
-
amount: any;
|
|
61
|
-
currencyCode: any;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
export function getVerifiedSession({ req, res, shop, serverRuntimeConfig }: {
|
|
65
|
-
req: any;
|
|
66
|
-
res: any;
|
|
67
|
-
shop: any;
|
|
68
|
-
serverRuntimeConfig: any;
|
|
69
|
-
}): Promise<import("@shopify/shopify-api/dist/auth/session/session").Session>;
|
|
70
|
-
export function registerWebhooks(serverRuntimeConfig: any, webhookRegistry: any, session: any): Promise<[any, any, any, any, any, any, any, any, any, any][]>;
|
|
1
|
+
export function getInitializedShopify(serverRuntimeConfig: any, version: any): import("@shopify/shopify-api").Shopify<import("@shopify/shopify-api").ShopifyRestResources>;
|
|
2
|
+
export function initializeShopify(serverRuntimeConfig: any): Promise<import("@shopify/shopify-api").Shopify<import("@shopify/shopify-api").ShopifyRestResources>>;
|
|
71
3
|
export function getRedirectUrl(props: any, { req, res, query: _query, }: {
|
|
72
4
|
req: any;
|
|
73
5
|
res: any;
|
|
74
6
|
query: any;
|
|
75
|
-
}): string
|
|
76
|
-
export function getAuthErrorResponse({ error, shop, serverRuntimeConfig }: {
|
|
77
|
-
error: any;
|
|
78
|
-
shop: any;
|
|
79
|
-
serverRuntimeConfig: any;
|
|
80
|
-
}): {
|
|
81
|
-
statusCode: number;
|
|
82
|
-
message: any;
|
|
83
|
-
headers: {
|
|
84
|
-
'X-Shopify-API-Request-Failure-Reauthorize': string;
|
|
85
|
-
'X-Shopify-API-Request-Failure-Reauthorize-Url': any;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
7
|
+
}): Promise<string>;
|
package/dist/utils/shopify.js
CHANGED
|
@@ -1,100 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRedirectUrl = exports.initializeShopify = exports.getInitializedShopify = void 0;
|
|
4
|
+
require("@shopify/shopify-api/adapters/node");
|
|
4
5
|
const shopify_api_1 = require("@shopify/shopify-api");
|
|
5
6
|
const shopify_api_node_1 = require("./shopify-api-node");
|
|
6
|
-
const billing_1 = require("./billing");
|
|
7
|
-
const errors_1 = require("./errors");
|
|
8
7
|
const display_1 = require("./display");
|
|
9
|
-
const firebase_1 = require("./firebase");
|
|
10
8
|
const constants_1 = require("./constants");
|
|
11
|
-
// TODO
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
API_VERSION: version,
|
|
18
|
-
}), { SESSION_STORAGE: new shopify_api_1.Shopify.Session.CustomSessionStorage((session) => firebase_1.storeCallback(session, data, sessionHandler), (id) => firebase_1.loadCallback(id, data, sessionHandler), (id) => firebase_1.deleteSessionsCallback(id, data, sessionHandler), (ids) => firebase_1.deleteSessionsCallback(ids, data, sessionHandler), (__shop) => firebase_1.findSessionsByShop(shopify_api_1.Shopify.Utils.sanitizeShop(__shop), data, sessionHandler)) }));
|
|
19
|
-
return shopify_api_1.Shopify;
|
|
20
|
-
};
|
|
9
|
+
// TODO: change this to not be async
|
|
10
|
+
// TODO cleanup/consolidate getSessionStorage and getInitializedShopify
|
|
11
|
+
// TODO: do we need to pass along apiVersion here?
|
|
12
|
+
const getInitializedShopify = (serverRuntimeConfig, version) => (shopify_api_1.shopifyApi(Object.assign(Object.assign({}, serverRuntimeConfig === null || serverRuntimeConfig === void 0 ? void 0 : serverRuntimeConfig.APP_CONFIG), (display_1.stringNotEmpty(version)) && {
|
|
13
|
+
apiVersion: version,
|
|
14
|
+
})));
|
|
21
15
|
exports.getInitializedShopify = getInitializedShopify;
|
|
22
|
-
const
|
|
23
|
-
const {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const getVerifiedSession = async ({ req, res, shop, serverRuntimeConfig }) => {
|
|
48
|
-
try {
|
|
49
|
-
const shopify = exports.getInitializedShopify(serverRuntimeConfig, shop);
|
|
50
|
-
const { PAYMENT_CONFIG } = serverRuntimeConfig !== null && serverRuntimeConfig !== void 0 ? serverRuntimeConfig : {};
|
|
51
|
-
const session = await shopify.Utils.loadCurrentSession(req, res);
|
|
52
|
-
if (shop && (session === null || session === void 0 ? void 0 : session.shop) !== shop) {
|
|
53
|
-
throw new errors_1.ShopifyAuthenticationError('Invalid shop');
|
|
54
|
-
}
|
|
55
|
-
if (!(session === null || session === void 0 ? void 0 : session.isActive())) {
|
|
56
|
-
throw new errors_1.ShopifyAuthenticationError('Inactive session');
|
|
57
|
-
}
|
|
58
|
-
if (PAYMENT_CONFIG === null || PAYMENT_CONFIG === void 0 ? void 0 : PAYMENT_CONFIG.required) {
|
|
59
|
-
const billingManager = new billing_1.BillingManager(session, serverRuntimeConfig);
|
|
60
|
-
const confirmationUrl = await billingManager.ensureBilling();
|
|
61
|
-
if (display_1.stringNotEmpty(confirmationUrl)) {
|
|
62
|
-
throw new errors_1.ShopifyAuthenticationError('Invalid payment status', { redirectUrl: confirmationUrl });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// NOTE making a test call to ensure a valid session for free apps
|
|
67
|
-
const client = new shopify_api_1.Shopify.Clients.Graphql(shop, session.accessToken);
|
|
68
|
-
await client.query({ data: constants_1.SHOP_QUERY });
|
|
69
|
-
}
|
|
70
|
-
return session;
|
|
16
|
+
const initializeShopify = async (serverRuntimeConfig) => {
|
|
17
|
+
const { APP_WEBHOOKS } = serverRuntimeConfig;
|
|
18
|
+
const shopify = exports.getInitializedShopify(serverRuntimeConfig);
|
|
19
|
+
// TODO look for any/all topics via APP_WEBHOOKS??
|
|
20
|
+
const uninstallHandler = await shopify.webhooks.getHandlers(constants_1.API_WEBHOOK_TOPICS.APP_UNINSTALLED);
|
|
21
|
+
if (display_1.arrayEmpty(uninstallHandler)) {
|
|
22
|
+
shopify.webhooks.addHandlers(Object.entries(APP_WEBHOOKS).reduce((_payload, [webhookTopic, webhooks]) => (Object.assign(Object.assign({}, _payload), { [webhookTopic]: display_1.ensureArray(webhooks).reduce((_topicWebhooks, { path, url }) => {
|
|
23
|
+
const callbackUrl = path || url;
|
|
24
|
+
if (display_1.stringEmpty(callbackUrl)) {
|
|
25
|
+
return _topicWebhooks;
|
|
26
|
+
}
|
|
27
|
+
return [
|
|
28
|
+
..._topicWebhooks,
|
|
29
|
+
{
|
|
30
|
+
deliveryMethod: shopify_api_1.DeliveryMethod.Http,
|
|
31
|
+
callbackUrl,
|
|
32
|
+
// TODO: clean up/confirm????
|
|
33
|
+
callback: async (topic, shop) => {
|
|
34
|
+
// NOTE our webhook logic is handled in each api route
|
|
35
|
+
console.log(`handle webhook callback for ${shop}:${topic}`);
|
|
36
|
+
return true;
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
}, []) })), {}));
|
|
71
41
|
}
|
|
72
|
-
|
|
73
|
-
if (error instanceof shopify_api_1.Shopify.Errors.HttpResponseError &&
|
|
74
|
-
error.response.code === 401) {
|
|
75
|
-
throw new errors_1.ShopifyAuthenticationError('Not authenticated');
|
|
76
|
-
}
|
|
77
|
-
throw error;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
exports.getVerifiedSession = getVerifiedSession;
|
|
81
|
-
const registerTopicWebhook = async (serverRuntimeConfig, webhook, topic, { accessToken, shop }) => {
|
|
82
|
-
const shopify = exports.getInitializedShopify(serverRuntimeConfig, shop);
|
|
83
|
-
const webhookResponse = await shopify.Webhooks.Registry.register(Object.assign(Object.assign({ topic }, webhook), { accessToken,
|
|
84
|
-
shop }));
|
|
85
|
-
if (!webhookResponse[topic].success) {
|
|
86
|
-
throw new Error(`Failed to register ${webhook.path} on topic: ${topic} webhook`, webhookResponse.result);
|
|
87
|
-
}
|
|
88
|
-
return webhookResponse[topic].success;
|
|
42
|
+
return shopify;
|
|
89
43
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const getRedirectUrl = (props, { req, res, query: _query, }) => {
|
|
44
|
+
exports.initializeShopify = initializeShopify;
|
|
45
|
+
const getRedirectUrl = async (props, { req, res, query: _query, }) => {
|
|
93
46
|
var _a;
|
|
94
47
|
const { API_URLS, PAGE_PATHS } = props;
|
|
95
48
|
const query = (_a = _query !== null && _query !== void 0 ? _query : req.query) !== null && _a !== void 0 ? _a : {};
|
|
96
49
|
const { embedded, host, shop: _shop } = query !== null && query !== void 0 ? query : {};
|
|
97
|
-
|
|
50
|
+
// TODO: do we need to pass along apiVersion here?
|
|
51
|
+
const shopify = exports.getInitializedShopify(props);
|
|
52
|
+
const shop = shopify.utils.sanitizeShop(_shop);
|
|
98
53
|
if (display_1.stringEmpty(shop)) {
|
|
99
54
|
return `${PAGE_PATHS[constants_1.PAGE_ROUTE_NAMES.ERROR]}?code=no_shop_provided&type=getRedirectUrl`;
|
|
100
55
|
}
|
|
@@ -111,18 +66,4 @@ const getRedirectUrl = (props, { req, res, query: _query, }) => {
|
|
|
111
66
|
return shopify_api_node_1.beginAuth(props, { req, res, shop });
|
|
112
67
|
};
|
|
113
68
|
exports.getRedirectUrl = getRedirectUrl;
|
|
114
|
-
const getAuthErrorResponse = ({ error, shop, serverRuntimeConfig }) => {
|
|
115
|
-
const { message, data } = error;
|
|
116
|
-
const { API_URLS } = serverRuntimeConfig;
|
|
117
|
-
const reauthorizationUrl = (data === null || data === void 0 ? void 0 : data.redirectUrl) || `${API_URLS[constants_1.API_ROUTE_NAMES.AUTH]}?shop=${shop}`;
|
|
118
|
-
return {
|
|
119
|
-
statusCode: 403,
|
|
120
|
-
message,
|
|
121
|
-
headers: {
|
|
122
|
-
'X-Shopify-API-Request-Failure-Reauthorize': '1',
|
|
123
|
-
'X-Shopify-API-Request-Failure-Reauthorize-Url': reauthorizationUrl,
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
exports.getAuthErrorResponse = getAuthErrorResponse;
|
|
128
69
|
//# sourceMappingURL=shopify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify.js","sourceRoot":"","sources":["../../src/utils/shopify.js"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"shopify.js","sourceRoot":"","sources":["../../src/utils/shopify.js"],"names":[],"mappings":";;;AAAA,8CAA2C;AAC3C,sDAAiE;AAEjE,yDAA8C;AAC9C,uCAAgF;AAChF,2CAAmF;AAEnF,oCAAoC;AACpC,uEAAuE;AACvE,kDAAkD;AAC3C,MAAM,qBAAqB,GAAG,CAAC,mBAAmB,EAAE,OAAO,EAAE,EAAE,CAAC,CACrE,wBAAU,iCACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,UAAU,GAC/B,CAAC,wBAAc,CAAC,OAAO,CAAC,CAAC,IAAI;IAC9B,UAAU,EAAE,OAAO;CACpB,EACD,CACH,CAAA;AAPY,QAAA,qBAAqB,yBAOjC;AAEM,MAAM,iBAAiB,GAAG,KAAK,EAAE,mBAAmB,EAAE,EAAE;IAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAA;IAE5C,MAAM,OAAO,GAAG,6BAAqB,CAAC,mBAAmB,CAAC,CAAA;IAE1D,kDAAkD;IAClD,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC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GAAG,CAAC,KAAK,mCAAI,EAAE,CAAA;IACvC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAA;IAEjD,kDAAkD;IACpD,MAAM,OAAO,GAAG,6BAAqB,CAAC,KAAK,CAAC,CAAA;IAE5C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAE9C,IAAI,qBAAW,CAAC,IAAI,CAAC,EAAE;QACrB,OAAO,GAAG,UAAU,CAAC,4BAAgB,CAAC,KAAK,CAAC,4CAA4C,CAAA;KACzF;IAED,IAAI,QAAQ,KAAK,GAAG,EAAE;QACpB,oCAAoC;QACpC,MAAM,iBAAiB,GAAG,IAAI,eAAe,CAAC;YAC5C,IAAI;YACJ,IAAI;SACL,CAAC,CAAC,QAAQ,EAAE,CAAA;QAEb,oCAAoC;QACpC,MAAM,WAAW,GAAG,IAAI,eAAe,iCAClC,KAAK,KACR,IAAI,EACJ,WAAW,EAAE,GAAG,QAAQ,CAAC,2BAAe,CAAC,aAAa,CAAC,IAAI,iBAAiB,EAAE,IAC9E,CAAC,QAAQ,EAAE,CAAA;QAEb,OAAO,GAAG,UAAU,CAAC,4BAAgB,CAAC,IAAI,CAAC,IAAI,WAAW,EAAE,CAAA;KAC7D;IAED,OAAO,4BAAS,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;AAC7C,CAAC,CAAA;AArCY,QAAA,cAAc,kBAqC1B"}
|
package/dist/withShopify.js
CHANGED
|
@@ -23,10 +23,15 @@ const withShopify = async (nextPhase, _a) => {
|
|
|
23
23
|
defaultConfig } = _c, // NOTE: This is here in case we need anything from it
|
|
24
24
|
pluginConfig = __rest(_c, ["defaultConfig"]);
|
|
25
25
|
const basePath = utils_1.ensureString(_basePath);
|
|
26
|
-
const { data, interactive, paymentConfig, firebaseConfig, pageRoutes: { [utils_1.PAGE_ROUTE_NAMES.EXIT]: _pageRouteExit = '/exit', [utils_1.PAGE_ROUTE_NAMES.ERROR]: _pageRouteError = '/error', } = {}, apiRoutes: { [utils_1.API_ROUTE_NAMES.AUTH]: _apiRouteAuth = '/api/auth', [utils_1.API_ROUTE_NAMES.AUTH_CALLBACK]: _apiRouteAuthCallback = '/api/auth/callback', [utils_1.API_ROUTE_NAMES.APP_UNINSTALLED]: _apiRouteAppUninstalled = '/api/webhooks/app/uninstalled', } = {}, params: { APP_ID, URL: netlifyUrl, HOST: shopifyCLIUrl, NEXT_PUBLIC_APP_BASE_URL, NEXT_PUBLIC_SHOPIFY_API_KEY, NEXT_PUBLIC_APP_ROUTE_PAGE_EXIT: _pageRouteParamExit, NEXT_PUBLIC_APP_ROUTE_PAGE_ERROR: _pageRouteParamError, NEXT_PUBLIC_APP_ROUTE_API_AUTH: _apiRouteParamAuth, NEXT_PUBLIC_APP_ROUTE_API_AUTH_CALLBACK: _apiRouteParamAuthCallback, NEXT_PUBLIC_APP_ROUTE_API_UNINSTALLED: _apiRouteParamAppUninstalled, NEXT_PUBLIC_FB_ROOT_COLLECTION: FB_ROOT_COLLECTION, SHOPIFY_API_PUBLIC_KEY: _shopifyPublicAPIKey, SHOPIFY_API_VERSION = shopify_api_1.LATEST_API_VERSION, SHOPIFY_API_SCOPES, SHOPIFY_API_KEY, SHOPIFY_RUN_MODE, } = {}, } = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {};
|
|
26
|
+
const { data, interactive, paymentConfig, firebaseConfig, pageRoutes: { [utils_1.PAGE_ROUTE_NAMES.EXIT]: _pageRouteExit = '/exit', [utils_1.PAGE_ROUTE_NAMES.ERROR]: _pageRouteError = '/error', } = {}, apiRoutes: { [utils_1.API_ROUTE_NAMES.AUTH]: _apiRouteAuth = '/api/auth', [utils_1.API_ROUTE_NAMES.AUTH_CALLBACK]: _apiRouteAuthCallback = '/api/auth/callback', [utils_1.API_ROUTE_NAMES.APP_UNINSTALLED]: _apiRouteAppUninstalled = '/api/webhooks/app/uninstalled', } = {}, params: { APP_ID: _appId, URL: netlifyUrl, HOST: shopifyCLIUrl, NEXT_PUBLIC_APP_BASE_URL, NEXT_PUBLIC_SHOPIFY_API_ID, NEXT_PUBLIC_SHOPIFY_API_KEY, NEXT_PUBLIC_APP_ROUTE_PAGE_EXIT: _pageRouteParamExit, NEXT_PUBLIC_APP_ROUTE_PAGE_ERROR: _pageRouteParamError, NEXT_PUBLIC_APP_ROUTE_API_AUTH: _apiRouteParamAuth, NEXT_PUBLIC_APP_ROUTE_API_AUTH_CALLBACK: _apiRouteParamAuthCallback, NEXT_PUBLIC_APP_ROUTE_API_UNINSTALLED: _apiRouteParamAppUninstalled, NEXT_PUBLIC_FB_ROOT_COLLECTION: FB_ROOT_COLLECTION, SHOPIFY_API_PUBLIC_KEY: _shopifyPublicAPIKey, SHOPIFY_API_VERSION = shopify_api_1.LATEST_API_VERSION, SHOPIFY_API_SCOPES, SHOPIFY_API_KEY, SHOPIFY_RUN_MODE, } = {}, } = pluginConfig !== null && pluginConfig !== void 0 ? pluginConfig : {};
|
|
27
|
+
console.log(`>>> > withShopify > _appId:`, _appId);
|
|
27
28
|
const SHOPIFY_API_PUBLIC_KEY = NEXT_PUBLIC_SHOPIFY_API_KEY || _shopifyPublicAPIKey;
|
|
29
|
+
console.log(`>>> > withShopify > SHOPIFY_API_PUBLIC_KEY:`, SHOPIFY_API_PUBLIC_KEY);
|
|
30
|
+
const APP_ID = NEXT_PUBLIC_SHOPIFY_API_ID || _appId || SHOPIFY_API_PUBLIC_KEY;
|
|
31
|
+
console.log(`>>> > withShopify > APP_ID:`, APP_ID);
|
|
28
32
|
const appBaseUrl = NEXT_PUBLIC_APP_BASE_URL || netlifyUrl || shopifyCLIUrl;
|
|
29
33
|
const APP_BASE_URL = `${appBaseUrl}${basePath}`;
|
|
34
|
+
console.log(`>>> > withShopify > APP_BASE_URL:`, APP_BASE_URL);
|
|
30
35
|
const appUrl = new URL(appBaseUrl);
|
|
31
36
|
const { [utils_1.PAGE_ROUTE_NAMES.EXIT]: pageRouteExit, [utils_1.PAGE_ROUTE_NAMES.ERROR]: pageRouteError, [utils_1.API_ROUTE_NAMES.AUTH]: apiRouteAuth, [utils_1.API_ROUTE_NAMES.AUTH_CALLBACK]: apiRouteAuthCallback, [utils_1.API_ROUTE_NAMES.APP_UNINSTALLED]: apiRouteAppUninstalled, } = await next_plugins_1.getPrompts([
|
|
32
37
|
{
|
|
@@ -70,23 +75,28 @@ const withShopify = async (nextPhase, _a) => {
|
|
|
70
75
|
[utils_1.API_ROUTE_NAMES.AUTH_CALLBACK]: apiRouteAuthCallback,
|
|
71
76
|
[utils_1.API_ROUTE_NAMES.APP_UNINSTALLED]: apiRouteAppUninstalled,
|
|
72
77
|
};
|
|
78
|
+
console.log(`>>> > withShopify > API_ROUTES:`, API_ROUTES);
|
|
73
79
|
const API_PATHS = Object.entries(API_ROUTES).reduce((_apiPaths, [routeName, route]) => (Object.assign(Object.assign({}, _apiPaths), { [routeName]: `${basePath}${route}` })), {});
|
|
80
|
+
console.log(`>>> > withShopify > API_PATHS:`, API_PATHS);
|
|
74
81
|
const API_URLS = Object.entries(API_PATHS).reduce((_apiUrls, [routeName, routePath]) => (Object.assign(Object.assign({}, _apiUrls), { [routeName]: `${appBaseUrl}${routePath}` })), {});
|
|
82
|
+
console.log(`>>> > withShopify > API_URLS:`, API_URLS);
|
|
75
83
|
const APP_HOST_NAME = appUrl.hostname;
|
|
76
84
|
const APP_CONFIG = {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
apiVersion: SHOPIFY_API_VERSION,
|
|
86
|
+
apiKey: SHOPIFY_API_PUBLIC_KEY,
|
|
87
|
+
apiSecretKey: SHOPIFY_API_KEY,
|
|
88
|
+
hostName: APP_HOST_NAME,
|
|
89
|
+
hostScheme: appUrl.protocol.replace(':', ''),
|
|
90
|
+
scopes: SHOPIFY_API_SCOPES.replace(/, /g, ',').split(','),
|
|
91
|
+
isEmbeddedApp: true,
|
|
84
92
|
};
|
|
85
93
|
const APP_WEBHOOKS = {
|
|
86
|
-
|
|
94
|
+
// TODO: this should be adding in any extra stuff passed in from plugin config
|
|
95
|
+
[utils_1.API_WEBHOOK_TOPICS.APP_UNINSTALLED]: [{
|
|
87
96
|
path: API_PATHS[utils_1.API_ROUTE_NAMES.APP_UNINSTALLED],
|
|
88
97
|
}],
|
|
89
98
|
};
|
|
99
|
+
console.log(`>>> > withShopify > APP_WEBHOOKS:`, APP_WEBHOOKS);
|
|
90
100
|
const PAYMENT_CONFIG = utils_1.generatePaymentConfig(paymentConfig, data);
|
|
91
101
|
const publicRuntimeConfig = Object.assign(Object.assign({}, _publicRuntimeConfig), { SHOPIFY_API_PUBLIC_KEY,
|
|
92
102
|
SHOPIFY_RUN_MODE,
|
|
@@ -105,6 +115,11 @@ const withShopify = async (nextPhase, _a) => {
|
|
|
105
115
|
API_PATHS,
|
|
106
116
|
API_URLS,
|
|
107
117
|
API_ROUTES });
|
|
118
|
+
const boom = await utils_1.initializeShopify(serverRuntimeConfig);
|
|
119
|
+
console.log(`>>> > withShopify > boom:`, boom);
|
|
120
|
+
// TODO look for any/all topics via APP_WEBHOOKS??
|
|
121
|
+
const existingHandlers = await boom.webhooks.getHandlers(utils_1.API_WEBHOOK_TOPICS.APP_UNINSTALLED);
|
|
122
|
+
console.log(`>>> > withShopify > existingHandlers:`, existingHandlers);
|
|
108
123
|
return Object.assign(Object.assign({}, _nextConfig), { basePath: _basePath, publicRuntimeConfig,
|
|
109
124
|
serverRuntimeConfig });
|
|
110
125
|
};
|
package/dist/withShopify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withShopify.js","sourceRoot":"","sources":["../src/withShopify.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sDAAyD;AAEzD,0DAAoD;AAE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ACnB,mBAAmB,IACpB;AACH,CAAC,CAAA;AAhMY,QAAA,WAAW,eAgMvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnostack/next-shopify",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-alpha.10",
|
|
4
4
|
"author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
|
|
5
5
|
"owner": "agnoStack",
|
|
6
6
|
"description": "Please contact agnoStack via info@agnostack.com for any questions",
|
|
@@ -48,10 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@agnostack/next-plugins": "latest",
|
|
51
|
-
"@shopify/shopify-api": "
|
|
51
|
+
"@shopify/shopify-api": "7.1.0",
|
|
52
52
|
"browser-monads": "1.0.0",
|
|
53
53
|
"cookies": "0.8.0",
|
|
54
|
-
"nextjs-cors": "2.1.1"
|
|
54
|
+
"nextjs-cors": "2.1.1",
|
|
55
|
+
"raw-body": "2.5.2"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"@babel/core": "7.18.9",
|