{"_id":"@azure-utils/storybooks","_rev":"5-7cfa27a8f01e9dfcd85b511bb31eb3ad","name":"@azure-utils/storybooks","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.2":{"name":"@azure-utils/storybooks","version":"0.1.2","keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"author":{"url":"https://guptasiddhant.com","name":"Siddhant Gupta"},"license":"MIT","_id":"@azure-utils/storybooks@0.1.2","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/guptasiddhant/azure-utils#readme","bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"dist":{"shasum":"c26e5a112e0a35711eb84ae653451d417acf489b","tarball":"https://registry.npmjs.org/@azure-utils/storybooks/-/storybooks-0.1.2.tgz","fileCount":127,"integrity":"sha512-j+kvsHoujJxmSjLRIwE3cQlt8gYIMV5AE69uoDuNGkuKUJvOYGHfZu3EEw+f1F1/Bpb4edEkXXFLocQ7wuYTww==","signatures":[{"sig":"MEYCIQCENhN2dSzcMCjEq8b5Dv/s+QxkiMDTK6y2/EEyoP+HJwIhAJxeqNZhz5R1Bvza4HYgppayLb2jbVDahJfoBT39GW3a","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":485992},"main":"./test.mjs","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs","require":"./dist/index.cjs","internal":"./src/index.ts"},"./package.json":"./package.json"},"gitHead":"555e9c935ae98370ae3feda2372c99e357fbe0cd","scripts":{"dev":"rolldown -c ../../scripts/rolldown.config.ts --watch","bump":"node ../../scripts/bump-version.mjs","build":"rolldown -c ../../scripts/rolldown.config.ts","clear":"rm -rf *.cjs *.d.ts coverage dist & true","start":"func start","verify":"yarn clear; yarn build","azurite":"npx -y azurite --skipApiVersionCheck -s -l ./.azurite","jsr:publish":"npx -y jsr publish"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/guptasiddhant/azure-utils.git","type":"git","directory":"packages/storybooks"},"_npmVersion":"10.9.2","description":"Utils to upload and manage Storybooks via Azure Functions and storage.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","dependencies":{"decompress":"^4.0.0","@azure/functions":"^4.0.0","@azure/data-tables":"^13.0.0","@azure/storage-blob":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.0.10","rolldown":"latest","typescript":"^5.8.3","@types/node":"^22.16.5","@types/decompress":"^4.2.7","azure-functions-core-tools":"^4.1.0"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storybooks_0.1.2_1753631210713_0.29858969688096804","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@azure-utils/storybooks","version":"0.1.3","keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"author":{"url":"https://guptasiddhant.com","name":"Siddhant Gupta"},"license":"MIT","_id":"@azure-utils/storybooks@0.1.3","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/guptasiddhant/azure-utils#readme","bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"dist":{"shasum":"0346f44bb5807d8671097737f0959f2dafc276fe","tarball":"https://registry.npmjs.org/@azure-utils/storybooks/-/storybooks-0.1.3.tgz","fileCount":127,"integrity":"sha512-5hGqukrEI0Z0fKx+cP9iiwYuabx+2roY90NMDhfNWCY2uJYh3p+Axq+TuuvMXcAgwi6SD71IWVsQWpyEM3wEgQ==","signatures":[{"sig":"MEYCIQDGdCQS+mUyCA2XSGxnHOVFzRjQIT4gBmBEzhaGifoeMgIhAON4J9sI3mZS/EIScNe4xHvFnyCe8U/27uEs8oITCrlF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":486745},"main":"./test.mjs","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs","require":"./dist/index.cjs","internal":"./src/index.ts"},"./package.json":"./package.json"},"gitHead":"c863aebfa7f9704eb8fab62fde170603b0585245","scripts":{"dev":"rolldown -c ../../scripts/rolldown.config.ts --watch","bump":"node ../../scripts/bump-version.mjs","build":"rolldown -c ../../scripts/rolldown.config.ts","clear":"rm -rf *.cjs *.d.ts coverage dist & true","start":"func start","verify":"yarn clear; yarn build","azurite":"npx -y azurite --skipApiVersionCheck -s -l ./.azurite","jsr:publish":"npx -y jsr publish"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/guptasiddhant/azure-utils.git","type":"git","directory":"packages/storybooks"},"_npmVersion":"10.9.2","description":"Utils to upload and manage Storybooks via Azure Functions and storage.","directories":{},"sideEffects":false,"_nodeVersion":"22.17.1","dependencies":{"decompress":"^4.0.0","@azure/functions":"^4.0.0","@azure/data-tables":"^13.0.0","@azure/storage-blob":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.0.10","rolldown":"latest","typescript":"^5.8.3","@types/node":"^22.16.5","@types/decompress":"^4.2.7","azure-functions-core-tools":"^4.1.0"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storybooks_0.1.3_1753631510502_0.023489157082019485","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@azure-utils/storybooks","version":"0.2.0","keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"author":{"url":"https://guptasiddhant.com","name":"Siddhant Gupta"},"license":"MIT","_id":"@azure-utils/storybooks@0.2.0","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/guptasiddhant/azure-utils#readme","bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"dist":{"shasum":"16681201205138f642c9497aa40ded347ebaaa34","tarball":"https://registry.npmjs.org/@azure-utils/storybooks/-/storybooks-0.2.0.tgz","fileCount":175,"integrity":"sha512-pUFCDZfvvAYCTJ+ZB5S0HJsKZxmsVsb8oYENRMao6IyPn6Z+ZtkGeLUsv2B9dH+ND0oiK4ITMSFvttLOIttp2g==","signatures":[{"sig":"MEUCIQDZH3k/jMJwXOfMhIgDXFpRsvkxfO0sXOFVgubx6UF1CgIgcE428jFe3H+5+j8gvQNHVWbZRLb/suHO1DZXsKdIuKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1081630},"main":"./start.mjs","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs","require":"./dist/index.cjs","internal":"./src/index.ts"},"./package.json":"./package.json"},"gitHead":"f2089934d7439a52f5a05a51553455e4f76e37a6","scripts":{"dev":"rolldown -c ../../scripts/rolldown.config.ts --watch","bump":"node ../../scripts/bump-version.mjs","test":"xss-scan","build":"rolldown -c ../../scripts/rolldown.config.ts","clear":"rm -rf coverage dist & true","start":"func start","verify":"yarn clear; yarn build","azurite":"npx -y azurite --skipApiVersionCheck -s -l ./.azurite","jsr:publish":"npx -y jsr publish"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/guptasiddhant/azure-utils.git","type":"git","directory":"packages/storybooks"},"_npmVersion":"10.9.3","description":"Utils to upload and manage Storybooks via Azure Functions and storage.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"decompress":"^4.0.0","zod-openapi":"^5.3.0","@kitajs/html":"^4.2.9","@azure/functions":"^4.0.0","@azure/data-tables":"^13.0.0","@azure/storage-blob":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.0.10","glob":"^10.0.0","rolldown":"latest","typescript":"^5.8.3","@types/node":"^22.16.5","@types/decompress":"^4.2.7","@kitajs/ts-html-plugin":"^4.1.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storybooks_0.2.0_1754923249915_0.6357527912073413","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@azure-utils/storybooks","version":"0.2.1","keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"author":{"url":"https://guptasiddhant.com","name":"Siddhant Gupta"},"license":"MIT","_id":"@azure-utils/storybooks@0.2.1","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"homepage":"https://github.com/guptasiddhant/azure-utils#readme","bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"dist":{"shasum":"8d6d5fe034335c66d691a65da823a2db5f36b20b","tarball":"https://registry.npmjs.org/@azure-utils/storybooks/-/storybooks-0.2.1.tgz","fileCount":182,"integrity":"sha512-QKeiD1Zw4GwbNzxag3F2Pzm7kSjsk4Vc2I7z7mNbyLfV8rxFoh+LTn3u4Xt2bmOluz5tWnRk2iMNIUYxfHTUQg==","signatures":[{"sig":"MEYCIQCbNEkeid0Ag8b5FDlVZZGjaHR0LeC8FeUj46HGNLDR8QIhANLi+So0FZk41P8HvEAWOqJV5SFHI67RK6t2+92cxbkg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":678480},"main":"./start.mjs","type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs","require":"./dist/index.cjs","internal":"./src/index.ts"},"./package.json":"./package.json"},"gitHead":"6140e201acd73446d213f032ed5638ac6b4c4a8a","scripts":{"dev":"rolldown -c ../../scripts/rolldown.config.ts --watch","bump":"node ../../scripts/bump-version.mjs","test":"xss-scan","build":"rolldown -c ../../scripts/rolldown.config.ts","clear":"rm -rf coverage dist & true","start":"func start","verify":"yarn clear; yarn build","azurite":"npx -y azurite --skipApiVersionCheck -s -l ./.azurite","jsr:publish":"npx -y jsr publish"},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"repository":{"url":"git+https://github.com/guptasiddhant/azure-utils.git","type":"git","directory":"packages/storybooks"},"_npmVersion":"10.9.3","description":"Utils to upload and manage Storybooks via Azure Functions and storage.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"decompress":"^4.0.0","zod-openapi":"^5.3.0","@kitajs/html":"^4.2.9","@azure/functions":"^4.0.0","@azure/data-tables":"^13.0.0","@azure/storage-blob":"^12.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.0.10","glob":"^10.0.0","rolldown":"latest","typescript":"^5.8.3","@types/node":"^22.16.5","@types/decompress":"^4.2.7","@kitajs/ts-html-plugin":"^4.1.1"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storybooks_0.2.1_1755167962214_0.8946063760372738","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@azure-utils/storybooks","version":"0.2.2","type":"module","description":"Utils to upload and manage Storybooks via Azure Functions and storage.","author":{"name":"Siddhant Gupta","url":"https://guptasiddhant.com"},"repository":{"type":"git","url":"git+https://github.com/guptasiddhant/azure-utils.git","directory":"packages/storybooks"},"license":"MIT","bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"publishConfig":{"access":"public"},"keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"sideEffects":false,"exports":{"./package.json":"./package.json",".":{"internal":"./src/index.ts","types":"./dist/index.d.ts","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"main":"./start.mjs","scripts":{"azurite":"npx -y azurite --skipApiVersionCheck -s -l ./.azurite","build":"rolldown -c ../../scripts/rolldown.config.ts","bump":"node ../../scripts/bump-version.mjs","dev":"rolldown -c ../../scripts/rolldown.config.ts --watch","clear":"rm -rf coverage dist & true","jsr:publish":"npx -y jsr publish","start":"func start","test":"xss-scan","verify":"yarn clear; yarn build"},"dependencies":{"@azure/data-tables":"^13.0.0","@azure/functions":"^4.0.0","@azure/storage-blob":"^12.0.0","@kitajs/html":"^4.2.9","decompress":"^4.0.0","zod-openapi":"^5.3.0"},"devDependencies":{"@kitajs/ts-html-plugin":"^4.1.1","@types/decompress":"^4.2.7","@types/node":"^22.16.5","glob":"^10.0.0","rolldown":"latest","typescript":"^5.8.3","zod":"^4.0.10"},"peerDependencies":{"zod":"^3.25.0 || ^4.0.0"},"_id":"@azure-utils/storybooks@0.2.2","gitHead":"4c85d5354e46e89c3541d8e69c1cc9744c4a5b31","homepage":"https://github.com/guptasiddhant/azure-utils#readme","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-sBVnfxhHD+XztyJ+uFwgcx+cxJrGhFDc/F3XJZxEU/ti4AflwTQicnfRljztUbfXUF26YdW2Man3Met2ZC7jZQ==","shasum":"d17780466e439d35b0daa4d68f2f77bd850a6ffb","tarball":"https://registry.npmjs.org/@azure-utils/storybooks/-/storybooks-0.2.2.tgz","fileCount":199,"unpackedSize":808273,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDAQv9BSquxFzrcQzPXfTLSeMhskIzZa7n7E7427/ROIAiBZn0t6qBF3vZ9t6EjCsj74HjBHOHNRIbi0+g+Dpf3brg=="}]},"_npmUser":{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"},"directories":{},"maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storybooks_0.2.2_1755257598758_0.9367464517484974"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-27T15:46:50.617Z","modified":"2025-08-15T11:33:19.232Z","0.1.2":"2025-07-27T15:46:51.034Z","0.1.3":"2025-07-27T15:51:50.675Z","0.2.0":"2025-08-11T14:40:50.163Z","0.2.1":"2025-08-14T10:39:22.419Z","0.2.2":"2025-08-15T11:33:19.000Z"},"bugs":{"url":"https://github.com/guptasiddhant/azure-utils/issues"},"author":{"name":"Siddhant Gupta","url":"https://guptasiddhant.com"},"license":"MIT","homepage":"https://github.com/guptasiddhant/azure-utils#readme","keywords":["azure","functions","azure-functions","storybook","storybooks","chromatic","storage","blob","upload","table","compress"],"repository":{"type":"git","url":"git+https://github.com/guptasiddhant/azure-utils.git","directory":"packages/storybooks"},"description":"Utils to upload and manage Storybooks via Azure Functions and storage.","maintainers":[{"name":"guptasiddhant","email":"guptasiddhant@icloud.com"}],"readme":"# Azure Functions Storybooks management Router\n\nAn easy way to deploy Storybooks management using Azure Functions. The package registers all endpoints required for upload, delete and serve storybooks.\n\n> Only works with **V4** functions written in TypeScript/JavaScript.\n\n[DOCS](https://jsr.io/@azure-utils/storybooks/doc) • Packages:\n[![NPM](https://img.shields.io/npm/v/@azure-utils/storybooks)](https://www.npmjs.com/package/@azure-utils/storybooks)\n[![JSR](https://jsr.io/badges/@azure-utils/storybooks)](https://jsr.io/badges/@azure-utils/storybooks)\n\n## Install\n\n### NPM\n\n```sh\nnpm i @azure-utils/storybooks\n```\n\n### JSR\n\n```sh\nnpx jsr add @azure-utils/storybooks\nyarn add jsr:@azure-utils/storybooks\n```\n\n## Build and deploy app\n\nThe package exports a `registerStorybooksRouter` function which registers all endpoint required.\n\n### Register the router\n\nInvoke the registration function is a file that is covered by Azure Functions. Normally this is the `index.js` file. The function takes an optional options argument which can be used override default settings.\n\n```ts\n// index.js\nimport { registerStorybooksRouter } from \"@azure-utils/storybooks\";\n\nregisterStorybooksRouter();\n```\n\n-- or --\n\n```ts\n// index.js\nimport { registerStorybooksRouter, getStore } from \"@azure-utils/storybooks\";\n\nconst registerRoute = registerStorybooksRouter({\n   /**\n   * Define the route on which all router is placed.\n   *\n   * @default 'storybooks/'\n   */\n  route?: string;\n\n  /**\n   * The function HTTP authorization level Defaults to 'anonymous' if not specified.\n   */\n  authLevel?: HttpTriggerOptions[\"authLevel\"];\n\n  /**\n   * Name of the Environment variable which stores\n   * the connection string to the Azure Storage resource.\n   * @default 'AzureWebJobsStorage'\n   */\n  storageConnectionStringEnvVar?: string;\n\n  /**\n   * Modify the cron-schedule of timer function\n   * which purge outdated storybooks.\n   *\n   * Pass `null` to disable auto-purge functionality.\n   *\n   * @default \"0 0 0 * * *\" // Every midnight\n   */\n  purgeScheduleCron?: string | null;\n});\n\n// Register additional routes on the service\nregisterRoute(\"account\", {\n  route: \"account\",\n  methods: [\"GET\",\"POST\"],\n  handler: (request, context) => {\n    return { statue: 200 }\n  }\n})\n\n```\n\n### Update `host.json` (optional)\n\nAzure functions use `host.json` in app root to configure the settings for whole functions-app.\n\nAdd/update the following setting to make sure there is no (empty) prefix before routes. If left unset, then Azure Functions may add `/api` prefix to routes which is undesirable for clean routing.\n\n```json\n{\n  \"version\": \"2.0\",\n  \"extensionBundle\": {\n    \"id\": \"Microsoft.Azure.Functions.ExtensionBundle\",\n    \"version\": \"[4.*, 5.0.0)\"\n  },\n  \"extensions\": {\n    \"http\": {\n      \"routePrefix\": \"\"\n    }\n  }\n}\n```\n\n### Deploy app\n\nIn order to deploy the app by CLI, CI or Azure plugin, you a need an Azure Functions resource in your Azure subscription.\n\nIf you are creating a new resource, select the option to create an associated Storage account, that will be used to store cache artifacts.\n\nIf your app is not connected to Storage account or you wish to override storage account, use ENV or OPTIONS to do so.\n\n## License\n\nMIT © 2025 Siddhant Gupta (@GuptaSiddhant)\n","readmeFilename":"README.md"}