{"_id":"@crashdotdev/shopify-app-session-storage-vercel-kv","_rev":"2-3954c3384160e4ef2c634d024542ee46","name":"@crashdotdev/shopify-app-session-storage-vercel-kv","dist-tags":{"latest":"1.0.10"},"versions":{"1.0.8":{"name":"@crashdotdev/shopify-app-session-storage-vercel-kv","version":"1.0.8","description":"Shopify App Session Storage for Vercel KV","type":"module","repository":{"type":"git","url":"git+https://github.com/Shopify/shopify-app-js.git"},"bugs":{"url":"https://github.com/Shopify/shopify-app-js/issues"},"homepage":"https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-kv","author":{"name":"Shopify Inc."},"license":"MIT","main":"./build/cjs/vercel-kv.js","types":"./build/ts/vercel-kv.d.ts","scripts":{},"publishConfig":{"access":"public"},"keywords":["shopify","node","app","graphql","rest","webhook","Admin API","Storefront API","session storage","KV","Vercel"],"dependencies":{"@vercel/kv":"^0.2.2","semver":"^7.5.1","tslib":"^2.4.0"},"peerDependencies":{"@shopify/shopify-api":"^7.3.1","@shopify/shopify-app-session-storage":"^1.1.4"},"devDependencies":{"@cloudflare/workers-types":"^4.20230511.0","@shopify/eslint-plugin":"^42.1.0","@shopify/prettier-config":"^1.1.2","@shopify/shopify-app-session-storage-test-utils":"^0.1.4","eslint":"^8.40.0","eslint-plugin-prettier":"^4.2.1","prettier":"^2.8.8","typescript":"^4.9.5"},"gitHead":"4bb0ee6303335f9fb3be02ac777dc5e48223fbab","_id":"@crashdotdev/shopify-app-session-storage-vercel-kv@1.0.8","_nodeVersion":"18.16.1","_npmVersion":"9.7.2","dist":{"integrity":"sha512-zlNZyFFX2GmQf7E9vEUyCZDmjWXCXy5bmOE6NVLbzcivMJcBaXUyT68dOjOggaVBTPj8JbH7tG4aSAClSNr7kg==","shasum":"4ff3ac063fa9ebe573f029418b88cd9a2ea6c494","tarball":"https://registry.npmjs.org/@crashdotdev/shopify-app-session-storage-vercel-kv/-/shopify-app-session-storage-vercel-kv-1.0.8.tgz","fileCount":8,"unpackedSize":18954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFfz+C2zWtSZRDg+NUdbs83d8Cbn4lBMfjE8XiFmUppAiEArGPTe0PZDoXmi1Y/50EOAID/PlOR0o28CQcy78wIczU="}]},"_npmUser":{"name":"juliusdotdev","email":"me@julius.dev"},"directories":{},"maintainers":[{"name":"juliusdotdev","email":"me@julius.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-app-session-storage-vercel-kv_1.0.8_1688382169173_0.18849784484322063"},"_hasShrinkwrap":false},"1.0.9":{"name":"@crashdotdev/shopify-app-session-storage-vercel-kv","version":"1.0.9","description":"Shopify App Session Storage for Vercel KV","repository":{"type":"git","url":"git+https://github.com/Shopify/shopify-app-js.git"},"bugs":{"url":"https://github.com/Shopify/shopify-app-js/issues"},"homepage":"https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-kv","author":{"name":"Shopify Inc."},"license":"MIT","main":"./build/cjs/vercel-kv.js","types":"./build/ts/vercel-kv.d.ts","scripts":{},"publishConfig":{"access":"public"},"keywords":["shopify","node","app","graphql","rest","webhook","Admin API","Storefront API","session storage","KV","Vercel"],"dependencies":{"@vercel/kv":"^0.2.2","semver":"^7.5.1","tslib":"^2.4.0"},"peerDependencies":{"@shopify/shopify-api":"^7.3.1","@shopify/shopify-app-session-storage":"^1.1.4"},"devDependencies":{"@cloudflare/workers-types":"^4.20230511.0","@shopify/eslint-plugin":"^42.1.0","@shopify/prettier-config":"^1.1.2","@shopify/shopify-app-session-storage-test-utils":"^0.1.4","eslint":"^8.40.0","eslint-plugin-prettier":"^4.2.1","prettier":"^2.8.8","typescript":"^4.9.5"},"gitHead":"4bb0ee6303335f9fb3be02ac777dc5e48223fbab","_id":"@crashdotdev/shopify-app-session-storage-vercel-kv@1.0.9","_nodeVersion":"18.16.1","_npmVersion":"9.7.2","dist":{"integrity":"sha512-jGja7RtBJYclEzVq+c0kfDkFCL8iidUH7hiVqOS+N5FirQMKKrJtzwvl1+F7JZZ+FCo9meh7FNieLUQbTrNG6Q==","shasum":"3171fdcf26b004f2dda1ee000e14a9658dc2a2db","tarball":"https://registry.npmjs.org/@crashdotdev/shopify-app-session-storage-vercel-kv/-/shopify-app-session-storage-vercel-kv-1.0.9.tgz","fileCount":8,"unpackedSize":18933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6noUzBGIsPC21paFdwa8nc+OcIOZdMQkzQg7N9jEBQgIhAM4F2uS/U57oBl4kCKicxjr6qh6Ud3p4HgKNueGXfG/y"}]},"_npmUser":{"name":"juliusdotdev","email":"me@julius.dev"},"directories":{},"maintainers":[{"name":"juliusdotdev","email":"me@julius.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-app-session-storage-vercel-kv_1.0.9_1688382893188_0.40182627835691265"},"_hasShrinkwrap":false},"1.0.10":{"name":"@crashdotdev/shopify-app-session-storage-vercel-kv","version":"1.0.10","description":"Shopify App Session Storage for Vercel KV","repository":{"type":"git","url":"git+https://github.com/Shopify/shopify-app-js.git"},"bugs":{"url":"https://github.com/Shopify/shopify-app-js/issues"},"homepage":"https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-kv","author":{"name":"Shopify Inc."},"license":"MIT","type":"module","main":"./build/cjs/vercel-kv.js","types":"./build/ts/vercel-kv.d.ts","scripts":{},"publishConfig":{"access":"public"},"keywords":["shopify","node","app","graphql","rest","webhook","Admin API","Storefront API","session storage","KV","Vercel"],"dependencies":{"semver":"^7.5.1","tslib":"^2.4.0"},"peerDependencies":{"@shopify/shopify-api":"^7.3.1","@shopify/shopify-app-session-storage":"^1.1.4","@vercel/kv":"^0.2.2"},"devDependencies":{"@cloudflare/workers-types":"^4.20230511.0","@shopify/eslint-plugin":"^42.1.0","@shopify/prettier-config":"^1.1.2","@shopify/shopify-app-session-storage-test-utils":"^0.1.4","@vercel/kv":"^0.2.2","eslint":"^8.40.0","eslint-plugin-prettier":"^4.2.1","prettier":"^2.8.8","typescript":"^4.9.5"},"gitHead":"4bb0ee6303335f9fb3be02ac777dc5e48223fbab","_id":"@crashdotdev/shopify-app-session-storage-vercel-kv@1.0.10","_nodeVersion":"18.16.1","_npmVersion":"9.7.2","dist":{"integrity":"sha512-wIBKBlDaQdNuGPFnoC8t958EISCD/i0uzpX6dqcwubEdcwbbKcVp4CNwHrPOKBTuFK+Kp271GGCWJNJgSR39aQ==","shasum":"3b602c3993d14980138d82f54b692eb41a59aae4","tarball":"https://registry.npmjs.org/@crashdotdev/shopify-app-session-storage-vercel-kv/-/shopify-app-session-storage-vercel-kv-1.0.10.tgz","fileCount":12,"unpackedSize":28007,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAP14WAdTPj0Bk4bnCu4zkbQVxsQfFapbQiN9+6VY3vVAiAqGQX9EPYpSiGOb/ikqwnQkXBYKnhvD6IeWxc1zbc4fA=="}]},"_npmUser":{"name":"juliusdotdev","email":"me@julius.dev"},"directories":{},"maintainers":[{"name":"juliusdotdev","email":"me@julius.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopify-app-session-storage-vercel-kv_1.0.10_1688395257543_0.8839877854317706"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-03T11:02:49.062Z","1.0.8":"2023-07-03T11:02:49.374Z","modified":"2023-07-03T14:40:57.833Z","1.0.9":"2023-07-03T11:14:53.334Z","1.0.10":"2023-07-03T14:40:57.714Z"},"maintainers":[{"name":"juliusdotdev","email":"me@julius.dev"}],"description":"Shopify App Session Storage for Vercel KV","homepage":"https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-kv","keywords":["shopify","node","app","graphql","rest","webhook","Admin API","Storefront API","session storage","KV","Vercel"],"repository":{"type":"git","url":"git+https://github.com/Shopify/shopify-app-js.git"},"author":{"name":"Shopify Inc."},"bugs":{"url":"https://github.com/Shopify/shopify-app-js/issues"},"license":"MIT","readme":"# Session Storage Adapter for CloudFlare KV\r\n\r\nCloudFlare's [KV](https://www.cloudflare.com/products/workers-kv/) storage can be used on worker runtimes.\r\nBefore using it, you'll need to set up a namespace for your sessions and pass in a `KVNamespace` object.\r\nYou can do that either when creating an instance of `KVSessionStorage`, or by calling the `setNamespace` method.\r\n\r\n```js\r\nimport {shopifyApp} from '@shopify/shopify-app-express';\r\nimport {KVSessionStorage} from '@shopify/shopify-app-session-storage-kv';\r\n\r\nconst shopify = shopifyApp({\r\n  sessionStorage: new KVSessionStorage(),\r\n  // ...\r\n});\r\n\r\nexport default {\r\n  async fetch(\r\n    request: Request,\r\n    env: Env,\r\n    ctx: ExecutionContext,\r\n  ): Promise<Response> {\r\n    shopify.config.sessionStorage.setNamespace(env.MY_KV_NAMESPACE);\r\n    // Handle request\r\n  },\r\n};\r\n\r\n// OR\r\n\r\nimport {Miniflare} from 'miniflare';\r\nconst mf = new Miniflare({\r\n  kvNamespaces: ['MY_KV_NAMESPACE'],\r\n});\r\nconst shopify = shopifyApp({\r\n  sessionStorage: new KVSessionStorage(\r\n    await mf.getKVNamespace('MY_KV_NAMESPACE'),\r\n  ),\r\n  // ...\r\n});\r\n```\r\n\r\nIf you prefer to use your own implementation of a session storage mechanism that uses the `SessionStorage` interface, see the [implementing session storage guide](../shopify-app-session-storage/implementing-session-storage.md).\r\n","readmeFilename":"README.md"}