@picked/shopify 0.0.1-dev.1763077817547

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@picked/client/plugins/shopify"),n=require("@shopify/storefront-api-client");function i(r){const o=t.getShopify();if(!o)throw new Error("Shopify window object not found. This plugin must be used on a Shopify storefront page");const e=t.getPickedConfigStorefrontApiToken();if(!e)throw new Error("Shopify Storefront API token not found. Ensure the Picked Script is enabled on your Shopify storefront");return n.createStorefrontApiClient({storeDomain:o.shop,apiVersion:r.apiVersion,publicAccessToken:e})}exports.createStorefrontApiClient=i;
@@ -0,0 +1,22 @@
1
+ import { getShopify as r, getPickedConfigStorefrontApiToken as n } from "@picked/client/plugins/shopify";
2
+ import { createStorefrontApiClient as i } from "@shopify/storefront-api-client";
3
+ function s(t) {
4
+ const o = r();
5
+ if (!o)
6
+ throw new Error(
7
+ "Shopify window object not found. This plugin must be used on a Shopify storefront page"
8
+ );
9
+ const e = n();
10
+ if (!e)
11
+ throw new Error(
12
+ "Shopify Storefront API token not found. Ensure the Picked Script is enabled on your Shopify storefront"
13
+ );
14
+ return i({
15
+ storeDomain: o.shop,
16
+ apiVersion: t.apiVersion,
17
+ publicAccessToken: e
18
+ });
19
+ }
20
+ export {
21
+ s as createStorefrontApiClient
22
+ };
@@ -0,0 +1,3 @@
1
+ import { createStorefrontApiClient as _createStorefrontApiClient } from '@shopify/storefront-api-client';
2
+ export declare function createStorefrontApiClient(options: Pick<Parameters<typeof _createStorefrontApiClient>[0], 'apiVersion'>): import('@shopify/storefront-api-client').StorefrontApiClient;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAExG,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,gEAsB9E"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@picked/shopify",
3
+ "description": "Shopify plugin for @picked/client",
4
+ "version": "0.0.1-dev.1763077817547",
5
+ "dependencies": {},
6
+ "devDependencies": {
7
+ "@picked/client": "workspace:*",
8
+ "@repo/eslint-config": "workspace:*",
9
+ "@repo/typescript-config": "workspace:*",
10
+ "@rollup/plugin-replace": "^6.0.2",
11
+ "@shopify/storefront-api-client": "^1.0.9",
12
+ "@types/jsdom": "^21.1.7",
13
+ "@types/node": "^22",
14
+ "@vitest/coverage-v8": "^3.2.3",
15
+ "effector": "^23.3.0",
16
+ "tsup": "^8.5.0",
17
+ "tsx": "^4.20.3",
18
+ "vite": "^6.4.1",
19
+ "vite-plugin-dts": "^4.5.4",
20
+ "vitest": "^3.2.4"
21
+ },
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/types/index.d.ts",
25
+ "import": "./dist/esm/index.js",
26
+ "require": "./dist/cjs/index.js",
27
+ "default": "./dist/esm/index.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist"
32
+ ],
33
+ "main": "./dist/cjs/index.js",
34
+ "module": "./dist/esm/index.js",
35
+ "peerDependencies": {
36
+ "@picked/client": "0.0.1-dev.1763077817547",
37
+ "@shopify/storefront-api-client": "^1.0.9",
38
+ "effector": "^23.3.0"
39
+ },
40
+ "private": false,
41
+ "scripts": {
42
+ "_test": "vitest run",
43
+ "_test:coverage": "vitest run --coverage",
44
+ "_test:packaged-types": "attw --pack",
45
+ "_test:watch": "vitest",
46
+ "build": "vite build",
47
+ "dev": "vite build --watch",
48
+ "lint": "eslint .",
49
+ "lint-files": "eslint",
50
+ "lint:format": "eslint . --fix",
51
+ "lint:report": "eslint . -o './.reports/eslint.json' -f json || true",
52
+ "type-check": "tsc -p . --noEmit"
53
+ },
54
+ "type": "module",
55
+ "types": "./dist/types/index.d.ts"
56
+ }