{"_id":"@alfonsoperez/purchases-js","_rev":"2-997ed7c3274c19e4fdea3642c9bafcb6","name":"@alfonsoperez/purchases-js","dist-tags":{"latest":"1.5.4"},"versions":{"1.5.3":{"name":"@alfonsoperez/purchases-js","version":"1.5.3","keywords":["revenuecat","purchases","subscriptions","iap"],"author":{"name":"RevenueCat, Inc."},"license":"MIT","_id":"@alfonsoperez/purchases-js@1.5.3","maintainers":[{"name":"alfonsoperez","email":"fon@revenuecat.com"}],"homepage":"https://github.com/RevenueCat/purchases-js#readme","bugs":{"url":"https://github.com/RevenueCat/purchases-js/issues"},"dist":{"shasum":"aad63f846f0454b81f97a2c7d3392bde9e2d677a","tarball":"https://registry.npmjs.org/@alfonsoperez/purchases-js/-/purchases-js-1.5.3.tgz","fileCount":7,"integrity":"sha512-J7IXLjSqRhQ8LylYwBfvF3y7bkF6YXLHdVQysTvgG9Xin2KO4vEvFqxboMqrro46m/u/UsdXOQZVWkU95pTzJQ==","signatures":[{"sig":"MEUCIExR5ucpDPSIx+O2m2G8bbMmWlyoWiDLgPfWmYvj8MxeAiEAg2qOQpeZCCn6X+xB12kQc+Vm/eEs9xqzo/4IH96Y4ZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1130277},"main":"./dist/Purchases.umd.js","type":"module","types":"./dist/Purchases.es.d.ts","module":"./dist/Purchases.es.js","exports":{".":{"import":"./dist/Purchases.es.js","require":"./dist/Purchases.umd.js"},"./styles":{"import":"./dist/style.css","require":"./dist/style.css"}},"gitHead":"89ff12882bf9f049964793c6057d1c21c4956e1b","private":false,"scripts":{"lint":"prettier --check .","test":"vitest","build":"tsc && vite build","watch":"vite build --watch","format":"prettier --write .","prepare":"husky","preview":"vite preview","prettier":"prettier --write .","build:dev":"tsc && vite build --mode development","storybook":"storybook dev -p 6006","typecheck":"tsc --noEmit","pack-build":"npm run build && npm pack","extract-api":"api-extractor run --local --verbose","prettier:ci":"prettier --check .","svelte-check":"svelte-check","test:typecheck":"tsc --project tsconfig.test.json","build-storybook":"storybook build","build:dev-watch":"tsc && vite build --mode development --watch"},"_npmUser":{"name":"alfonsoperez","email":"fon@revenuecat.com"},"repository":{"url":"git+https://github.com/RevenueCat/purchases-js.git","type":"git"},"_npmVersion":"10.7.0","description":"Web subscriptions made easy. Powered by RevenueCat","directories":{},"lint-staged":{"**/*":["prettier --write --ignore-unknown","eslint --fix --no-warn-ignored"]},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"packageManager":"npm@11.2.0+sha512.3dc9c50ba813a3d54393155a435fe66404b72685ab0e3008f9ae9ed8d81f6104860f07ed2656dd5748c1322d95f3140fa9b19c59a6bba7750fd12285f81866da","devDependencies":{"msw":"^2.0.4","uuid":"^11.0.5","vite":"^6.0.3","husky":"^9.1.7","jsdom":"^25.0.1","eslint":"^8.57.1","svelte":"^5.12.0","vitest":"^3.1.1","globals":"^15.13.0","typedoc":"^0.27.4","prettier":"^3.4.2","chromatic":"^11.20.0","storybook":"^8.5.0","@eslint/js":"^9.16.0","typescript":"^5.7.2","@types/uuid":"^10.0.0","lint-staged":"^15.2.10","svelte-check":"^4.1.1","@storybook/test":"^8.5.0","eslint-plugin-n":"^16.6.2","vite-plugin-dts":"^4.3.0","@tsconfig/svelte":"^5.0.4","@storybook/blocks":"^8.5.0","@storybook/svelte":"^8.5.0","@stripe/stripe-js":"^7.3.1","http-status-codes":"^2.3.0","typescript-eslint":"^8.17.0","@storybook/sveltekit":"^8.5.0","eslint-plugin-import":"^2.31.0","eslint-plugin-svelte":"^2.46.1","eslint-plugin-promise":"^6.6.0","@storybook/addon-links":"^8.5.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","prettier-plugin-svelte":"^3.3.2","@testing-library/svelte":"^5.2.6","eslint-plugin-storybook":"^0.11.1","@microsoft/api-extractor":"^7.48.0","@storybook/addon-viewport":"^8.5.2","@testing-library/jest-dom":"^6.6.3","storybook-addon-mock-date":"^0.6.0","@revenuecat/purchases-ui-js":"2.0.0","@storybook/addon-essentials":"^8.5.0","@storybook/addon-svelte-csf":"^5.0.0-next.24","@sveltejs/vite-plugin-svelte":"^5.0.2","@storybook/addon-interactions":"^8.5.0","storybook-addon-pseudo-states":"^4.0.2","@typescript-eslint/eslint-plugin":"^6.21.0","eslint-config-standard-with-typescript":"^43.0.1"},"_npmOperationalInternal":{"tmp":"tmp/purchases-js_1.5.3_1750098622979_0.3762228779783894","host":"s3://npm-registry-packages-npm-production"}},"1.5.4":{"name":"@alfonsoperez/purchases-js","description":"Web subscriptions made easy. Powered by RevenueCat","private":false,"version":"1.5.4","type":"module","main":"./dist/Purchases.umd.js","module":"./dist/Purchases.es.js","types":"./dist/Purchases.es.d.ts","exports":{".":{"import":"./dist/Purchases.es.js","require":"./dist/Purchases.umd.js"},"./styles":{"import":"./dist/style.css","require":"./dist/style.css"},"./dist/index-DuKHkfLn.js":"./dist/index-DuKHkfLn.js"},"author":{"name":"RevenueCat, Inc."},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/RevenueCat/purchases-js.git"},"bugs":{"url":"https://github.com/RevenueCat/purchases-js/issues"},"keywords":["revenuecat","purchases","subscriptions","iap"],"packageManager":"npm@11.2.0+sha512.3dc9c50ba813a3d54393155a435fe66404b72685ab0e3008f9ae9ed8d81f6104860f07ed2656dd5748c1322d95f3140fa9b19c59a6bba7750fd12285f81866da","scripts":{"watch":"vite build --watch","build":"tsc && vite build","build:dev":"tsc && vite build --mode development","build:dev-watch":"tsc && vite build --mode development --watch","preview":"vite preview","lint":"prettier --check .","format":"prettier --write .","pack-build":"npm run build && npm pack","test":"vitest","test:typecheck":"tsc --project tsconfig.test.json","typecheck":"tsc --noEmit","prettier":"prettier --write .","prettier:ci":"prettier --check .","svelte-check":"svelte-check","storybook":"storybook dev -p 6006","build-storybook":"storybook build","extract-api":"api-extractor run --local --verbose","prepare":"husky"},"devDependencies":{"@eslint/js":"^9.16.0","@microsoft/api-extractor":"^7.48.0","@revenuecat/purchases-ui-js":"2.0.0","@storybook/addon-essentials":"^8.5.0","@storybook/addon-interactions":"^8.5.0","@storybook/addon-links":"^8.5.0","@storybook/addon-svelte-csf":"^5.0.0-next.24","@storybook/addon-viewport":"^8.5.2","@storybook/blocks":"^8.5.0","@storybook/svelte":"^8.5.0","@storybook/sveltekit":"^8.5.0","@storybook/test":"^8.5.0","@stripe/stripe-js":"^7.3.1","@sveltejs/vite-plugin-svelte":"^5.0.2","@testing-library/jest-dom":"^6.6.3","@testing-library/svelte":"^5.2.6","@tsconfig/svelte":"^5.0.4","@types/uuid":"^10.0.0","@typescript-eslint/eslint-plugin":"^6.21.0","chromatic":"^11.20.0","eslint":"^8.57.1","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.1","eslint-plugin-import":"^2.31.0","eslint-plugin-n":"^16.6.2","eslint-plugin-prettier":"^5.2.1","eslint-plugin-promise":"^6.6.0","eslint-plugin-storybook":"^0.11.1","eslint-plugin-svelte":"^2.46.1","globals":"^15.13.0","http-status-codes":"^2.3.0","husky":"^9.1.7","jsdom":"^25.0.1","lint-staged":"^15.2.10","msw":"^2.0.4","prettier":"^3.4.2","prettier-plugin-svelte":"^3.3.2","storybook":"^8.5.0","storybook-addon-mock-date":"^0.6.0","storybook-addon-pseudo-states":"^4.0.2","svelte":"^5.12.0","svelte-check":"^4.1.1","typedoc":"^0.27.4","typescript":"^5.7.2","typescript-eslint":"^8.17.0","uuid":"^11.0.5","vite":"^6.0.3","vite-plugin-dts":"^4.3.0","vitest":"^3.1.1"},"lint-staged":{"**/*":["prettier --write --ignore-unknown","eslint --fix --no-warn-ignored"]},"_id":"@alfonsoperez/purchases-js@1.5.4","gitHead":"89ff12882bf9f049964793c6057d1c21c4956e1b","homepage":"https://github.com/RevenueCat/purchases-js#readme","_nodeVersion":"22.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-qfis/nfL/eaBmJ05i/U8Yxi2Oj5QkuRu13pbAa392UooblLZLH05nywQvpZGWV1sd7NHuz4Ha9ZPyKiRngsVBg==","shasum":"81786fc1e24a11ff1d760bf9c6b92eebe0cf2321","tarball":"https://registry.npmjs.org/@alfonsoperez/purchases-js/-/purchases-js-1.5.4.tgz","fileCount":7,"unpackedSize":1130337,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6rC0bpq2T2/3QI+kjIZ+dWeI2zZ4eENzj4MNk3J12jQIgPStYLByhB2D8LPMf+Ct6COT7McdB2/5AMM22l1jKy7U="}]},"_npmUser":{"name":"alfonsoperez","email":"fon@revenuecat.com"},"directories":{},"maintainers":[{"name":"alfonsoperez","email":"fon@revenuecat.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/purchases-js_1.5.4_1750117469043_0.1161590155320309"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-16T18:30:22.904Z","modified":"2025-06-16T23:44:29.408Z","1.5.3":"2025-06-16T18:30:23.255Z","1.5.4":"2025-06-16T23:44:29.249Z"},"bugs":{"url":"https://github.com/RevenueCat/purchases-js/issues"},"author":{"name":"RevenueCat, Inc."},"license":"MIT","homepage":"https://github.com/RevenueCat/purchases-js#readme","keywords":["revenuecat","purchases","subscriptions","iap"],"repository":{"type":"git","url":"git+https://github.com/RevenueCat/purchases-js.git"},"description":"Web subscriptions made easy. Powered by RevenueCat","maintainers":[{"name":"alfonsoperez","email":"fon@revenuecat.com"}],"readme":"<h3 align=\"center\">😻 In-App Subscriptions Made Easy 😻</h3>\n<h4 align=\"center\">🕸️ For the web 🕸️</h4>\n\nRevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support.\nThis repository includes all you need to manage your subscriptions on your website or web app using RevenueCat.\n\nSign up to [get started for free](https://app.revenuecat.com/signup).\n\n# Prerequisites\n\nLogin @ [app.revenuecat.com](https://app.revenuecat.com)\n\n- Connect your Stripe account if you haven't already (More payment gateways are coming soon)\n- Create a Project (if you haven't already)\n- Add a new Web Billing app\n- Get the sandbox API key or production API key (depending on the environment)\n- Create some products for the Web Billing App\n- Create an offering and add packages with Web Billing products\n- Create the entitlements you need in your app and link them to the Web Billing products\n\n# Installation\n\n- Add the library to your project's dependencies\n  - npm\n    ```\n    npm install --save @revenuecat/purchases-js\n    ```\n  - yarn\n    ```\n    yarn add --save @revenuecat/purchases-js\n    ```\n\n# Usage\n\nSee the [RevenueCat docs](https://www.revenuecat.com/docs/web/web-billing) and the [SDK Reference](https://revenuecat.github.io/purchases-js-docs).\n\n# Development\n\n## Install the library in a local project\n\n- Clone the repository\n- Install dependencies\n- Build the library\n\n```bash\nnpm install\nnpm run build:dev\n```\n\nTo avoid publishing the package you can use Yarn's link feature:\n\n1. In the purchases-js directory, register the package:\n\n```bash\nyarn link\n```\n\n2. In your testing project, link to the registered package:\n\n```bash\nyarn link \"@revenuecat/purchases-js\"\n```\n\n> **Note:** Any changes you make to the library will be automatically reflected in your testing project after running `npm run build:dev` or `npm run build`.\n\n## Running Storybook\n\n```bash\nnpm run storybook\n```\n\n### Environment Setup for Purchase Stories\n\n> **Note:** This setup is only required if you need to test Storybook stories involving the `payment-entry` page.\n\nTo run these specific stories, you'll need to set up some environment variables. There are two options:\n\n### Option 1: Internal Teams\n\nInternal team members can find the required environment variables in 1Password.\n\n### Option 2: Setup Manually\n\n1. Create a test account in Stripe\n2. Create a `.env.development.local` file and set the following variables:\n\n```bash\nVITE_STORYBOOK_PUBLISHABLE_API_KEY=\"pk_test_1234567890\"\nVITE_STORYBOOK_ACCOUNT_ID=\"acct_1234567890\"\n```\n\n## Running tests\n\n```bash\nnpm run test\n```\n\n## Running linters\n\n```bash\nnpm run test:typecheck\nnpm run svelte-check\nnpm run prettier\nnpm run lint\n```\n\n## Running E2E tests\n\nPlease check the Demo app readme [here](./examples/webbilling-demo/README.md#e2e-tests)\n\n## Update API specs\n\n```bash\nnpm run extract-api\n```\n\nThis will update the files in `api-report` with the latest public API.\nIf it has uncommitted changes, CI tests will fail. Run this command and commit the changes if\nthey are expected.\n\n# Publishing a new version\n\nNew versions are automated weekly, but you can also trigger a new release through CircleCI or locally\nfollowing these steps:\n\n- Run `bundle exec fastlane bump` and follow the instructions\n- A PR should be created with the changes and a hold job in CircleCI.\n- Approve the hold job once tests pass. This will create a tag and continue the release in CircleCI\n- Merge the PR once it's been released\n","readmeFilename":"README.md"}