{"_id":"@codemonkss/azure-blob-deploy","_rev":"3-fdb2ec44397777754fb92dc7bceecfd7","name":"@codemonkss/azure-blob-deploy","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@codemonkss/azure-blob-deploy","version":"1.0.0","keywords":["azure","blob","storage","deploy","cli","react","angular","vue","cdn","static"],"author":{"name":"Sajal Sinha","email":"me@sajalsinha.co"},"license":"MIT","_id":"@codemonkss/azure-blob-deploy@1.0.0","maintainers":[{"name":"sscodemonk","email":"sajallsiinha@gmail.com"}],"homepage":"https://github.com/codemonkss/azure-blob-deploy#readme","bugs":{"url":"https://github.com/codemonkss/azure-blob-deploy/issues"},"bin":{"azure-blob-deploy":"bin/azure-blob-deploy.js"},"dist":{"shasum":"4fb557244f77b7e6ed1f392089d8175d12968933","tarball":"https://registry.npmjs.org/@codemonkss/azure-blob-deploy/-/azure-blob-deploy-1.0.0.tgz","fileCount":4,"integrity":"sha512-0BC6/a6Jv+z3SVdeAegjBUNPoV8BlAggU6e/SC9M5EhErlsfO13796i6eKCTUCh4Wpw2v42hp/RIt4I8pleoHA==","signatures":[{"sig":"MEYCIQDcqYYQ5UhdKs4n99bh837vSwB45tcQ87jv/yyXoz28FwIhAJ/SqyNf3rOOsDCj+ICGSSYKvUPitZ648sNvvdcBUqPA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16610},"engines":{"node":">=16.0.0"},"_npmUser":{"name":"sscodemonk","email":"sajallsiinha@gmail.com"},"repository":{"url":"git+https://github.com/codemonkss/azure-blob-deploy.git","type":"git"},"_npmVersion":"11.6.0","description":"A self-contained CLI tool to deploy web app build artifacts to Azure Blob Storage.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"ora":"^5.4.1","mime-types":"^2.1.35","@azure/storage-blob":"^12.17.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/azure-blob-deploy_1.0.0_1757588582194_0.3535464760208704","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@codemonkss/azure-blob-deploy","version":"1.0.1","keywords":["azure","blob","storage","deploy","cli","react","angular","vue","cdn","static"],"author":{"name":"Sajal Sinha","email":"me@sajalsinha.co"},"license":"MIT","_id":"@codemonkss/azure-blob-deploy@1.0.1","maintainers":[{"name":"sscodemonk","email":"sajallsiinha@gmail.com"}],"homepage":"https://github.com/codemonkss/azure-blob-deploy#readme","bugs":{"url":"https://github.com/codemonkss/azure-blob-deploy/issues"},"bin":{"azure-blob-deploy":"bin/azure-blob-deploy.js"},"dist":{"shasum":"6bd103eac1b53f7f4ad3e7db6b97168189df7f31","tarball":"https://registry.npmjs.org/@codemonkss/azure-blob-deploy/-/azure-blob-deploy-1.0.1.tgz","fileCount":4,"integrity":"sha512-O1d1cz2pyWXU40xTM2JyAcZ9RhOyHfluDNq2+Y5pV9OLd1v7av12U2uGfPesjOwiYH/oVjorR1rT0AiH/OEEfA==","signatures":[{"sig":"MEUCIHTLO9hI5yx/5dDO0Mzt95Qr2ElOrfBj+Puv5cKdYIMRAiEA4+BD66R6bLe3tq3c/7p7Y0iLEyhbLWZx48SgaQ45IO8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17268},"engines":{"node":">=16.0.0"},"gitHead":"36f8363a52de8505cff95f288320c383f5df2a1b","_npmUser":{"name":"sscodemonk","email":"sajallsiinha@gmail.com"},"repository":{"url":"git+https://github.com/codemonkss/azure-blob-deploy.git","type":"git"},"_npmVersion":"11.6.0","description":"A self-contained CLI tool to deploy web app build artifacts to Azure Blob Storage.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"ora":"^5.4.1","mime-types":"^2.1.35","cli-progress":"^3.12.0","@azure/storage-blob":"^12.17.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/azure-blob-deploy_1.0.1_1757591973023_0.26740053136731","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@codemonkss/azure-blob-deploy","version":"1.0.2","description":"A self-contained CLI tool to deploy web app build artifacts to Azure Blob Storage.","author":{"name":"Sajal Sinha","email":"me@sajalsinha.co"},"license":"MIT","bin":{"azure-blob-deploy":"bin/azure-blob-deploy.js"},"repository":{"type":"git","url":"git+https://github.com/codemonkss/azure-blob-deploy.git"},"keywords":["azure","blob","storage","deploy","cli","react","angular","vue","cdn","static"],"engines":{"node":">=16.0.0"},"dependencies":{"@azure/storage-blob":"^12.17.0","mime-types":"^2.1.35","ora":"^5.4.1"},"_id":"@codemonkss/azure-blob-deploy@1.0.2","gitHead":"36f8363a52de8505cff95f288320c383f5df2a1b","bugs":{"url":"https://github.com/codemonkss/azure-blob-deploy/issues"},"homepage":"https://github.com/codemonkss/azure-blob-deploy#readme","_nodeVersion":"22.18.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-u9f/k/Pk6mwItM31oT1c/Mqj1Pl725LaIfNmrrjeorVokZ1omdOJSZqqrYZieGMOepIk/UIsINvZDS9U5kPgVA==","shasum":"178111c9109973c17a0f4d27e77fa371d06ace52","tarball":"https://registry.npmjs.org/@codemonkss/azure-blob-deploy/-/azure-blob-deploy-1.0.2.tgz","fileCount":4,"unpackedSize":16578,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF/c74pbn75Yujp6uqnjN1aLjA70CLfU8KJYub06USVqAiEAz5CKXE/BrPGpFS3xPG827AUPN15gvp+g7JyZ7zFmPCE="}]},"_npmUser":{"name":"sscodemonk","email":"sajallsiinha@gmail.com"},"directories":{},"maintainers":[{"name":"sscodemonk","email":"sajallsiinha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/azure-blob-deploy_1.0.2_1757593200325_0.4902919058537145"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-11T11:03:02.125Z","modified":"2025-09-11T12:20:00.707Z","1.0.0":"2025-09-11T11:03:02.362Z","1.0.1":"2025-09-11T11:59:33.214Z","1.0.2":"2025-09-11T12:20:00.507Z"},"bugs":{"url":"https://github.com/codemonkss/azure-blob-deploy/issues"},"author":{"name":"Sajal Sinha","email":"me@sajalsinha.co"},"license":"MIT","homepage":"https://github.com/codemonkss/azure-blob-deploy#readme","keywords":["azure","blob","storage","deploy","cli","react","angular","vue","cdn","static"],"repository":{"type":"git","url":"git+https://github.com/codemonkss/azure-blob-deploy.git"},"description":"A self-contained CLI tool to deploy web app build artifacts to Azure Blob Storage.","maintainers":[{"name":"sscodemonk","email":"sajallsiinha@gmail.com"}],"readme":"# @codemonkss/azure-blob-deploy\n\n![npm](https://img.shields.io/npm/v/@codemonkss/azure-blob-deploy)\n![license](https://img.shields.io/npm/l/@codemonkss/azure-blob-deploy)\n\nA powerful yet lightweight, self-contained CLI tool for deploying static web application builds (e.g., React, Vue, Angular) to an Azure Blob Storage container. 🚀\n\nThis tool provides a secure, flexible, and interactive deployment experience without requiring any external dependencies like the Azure CLI. It supports multiple deployment environments and includes a safety confirmation for production deployments.\n\n---\n\n## Table of Contents\n\n- [@codemonkss/azure-blob-deploy](#codemonkssazure-blob-deploy)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n    - [1. Global Credentials (Recommended)](#1-global-credentials-recommended)\n    - [2. Local Project Configuration](#2-local-project-configuration)\n  - [How to Get Azure Credentials](#how-to-get-azure-credentials)\n  - [Usage](#usage)\n    - [1. Set Up Your `package.json` Scripts](#1-set-up-your-packagejson-scripts)\n    - [2. Run the Deployment](#2-run-the-deployment)\n      - [Production Deployment (with Safety Prompt)](#production-deployment-with-safety-prompt)\n      - [Staging Deployment](#staging-deployment)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n---\n\n## Features\n\n- **Secure Credential Storage**: Keeps your secret keys in a global file, separate from your project's repository.\n- **Multi-Environment Support**: Easily manage separate configurations for production, staging, and other environments.\n- **Production Safety Checks**:\n  - Warns you if you're redeploying the same version (based on Git tags).\n  - Requires explicit confirmation before deploying to production.\n- **Interactive Feedback**: Displays a live spinner and line-by-line progress of your file uploads.\n- **Self-Contained**: Uses the official Azure SDK and has no external dependencies.\n\n---\n\n## Installation\n\nInstall the package as a development dependency in your project.\n\n```bash\n# With Yarn\nyarn add @codemonkss/azure-blob-deploy --dev\n\n# With npm\nnpm install @codemonkss/azure-blob-deploy --save-dev\n```\n\n---\n\n## Configuration\n\nConfiguration is split into two parts for better security and reusability: a global file for your secrets and a local file for project-specific settings.\n\n### 1. Global Credentials (Recommended)\n\nFirst, create a file named **`.azure-blob-token`** in your user home directory (e.g., `~/.azure-blob-token`). This file will store your sensitive connection strings or keys, which can be reused across all your projects.\n\n**Important:** This file should **never** be committed to version control.\n\nYou can define multiple credential profiles using a header like `[my_account_name]`.\n\n**Example `~/.azure-blob-token`:**\n\n```ini\n# This is my main work account profile\n[work_prod]\nCONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...\n\n# This account uses an Account Key instead together with ACCOUNT_NAME in the .deploy-script file\n[work_staging]\nACCOUNT_KEY=yourSuperSecretStagingKey...\n\n# A personal project profile\n[personal_account]\nCONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...\n```\n\n### 2. Local Project Configuration\n\nIn the root of your project, create configuration files for each environment. The convention is:\n\n- `.deploy-script` for **Production**\n- `.deploy-script-staging` for **Staging/Preview**\n\nThese files are safe to commit to version control as they do not contain secrets. They simply reference a profile from your global credentials file.\n\n**Example `.deploy-script` (for Production):**\n\n```ini\n# ==> Azure Credential Profile\n# Points to the [work_prod] section in your global ~/.azure-blob-token file.\nCREDENTIAL_KEY=work_prod\n\n# ==> Azure Storage Account Details\n# The non-secret account name can be included for clarity.\nACCOUNT_NAME=my-prod-account\nCONTAINER_NAME=$web\n\n# ==> Project Build Configuration\nSOURCE_PATH=build\n\n# The destination path inside the container.\n# Use a single dot '.' to upload to the root OR\n# replace with a specific directory name / path.\nDESTINATION_PATH=.\n```\n\n**Example `.deploy-script-staging` (for Staging):**\n\n```ini\n# ==> Azure Credential Profile\n# Points to the [work_staging] section in your global ~/.azure-blob-token file.\nCREDENTIAL_KEY=work_staging\n\n# ==> Azure Storage Account Details\nACCOUNT_NAME=my-staging-account\nCONTAINER_NAME=staging-container\n\n# ==> Project Build Configuration\nSOURCE_PATH=dist\nDESTINATION_PATH=preview/\n```\n\n---\n\n## How to Get Azure Credentials\n\n1. Navigate to your Storage Account in the [Azure Portal](https://portal.azure.com/).\n2. In the left-hand menu, under Security + networking, click on Access keys.\n3. Here you will find your Storage account name and can reveal and copy Key 1 (to use as `ACCOUNT_KEY`) or the Connection string.\n4. To find your **Container Name**, navigate to **Containers** under Data storage. If you're hosting a static website, the container is typically named `$web` unless a `customName` is specified.\n\n---\n\n## Usage\n\n### 1. Set Up Your `package.json` Scripts\n\nUpdate your `package.json` scripts to handle different deployment targets. The tool accepts the config filename as an argument. If no argument is given, it defaults to `.deploy-script`.\n\n```json\n\"scripts\": {\n  \"build\": \"react-scripts build\",\n  \"deploy\": \"azure-blob-deploy\",\n  \"deploy:staging\": \"azure-blob-deploy .deploy-script-staging\"\n}\n```\n\n### 2. Run the Deployment\n\n#### Production Deployment (with Safety Prompt)\n\nRunning the default deploy command will trigger a safety confirmation.\n\n```bash\n# With yarn\nyarn deploy\n\n\n# With npm\nnpm run deploy\n```\n\nThis will display a warning in your terminal. You must type **`yes`** or **`y`** to proceed.\n\nThe output will look like this:\n\n```\n🔵 Using configuration file: .deploy-script\n🟠 The version in package.json (1.2.3) matches the latest Git tag...\n***************************************************\n*          ⚠️  PRODUCTION DEPLOYMENT  ⚠️           *\n***************************************************\n\n🔵 You are about to deploy to the PRODUCTION environment.\nAre you sure you want to continue? (yes/no): yes\n\n🔵 Production deployment confirmed.\n✔ Found 251 files to upload to \"$web/.\".\n✔ Uploaded: assets/index-D8asbS.js\n✔ Uploaded: assets/index-C5fghJ.css\n⠏ Uploading: index.html\n```\n\n#### Staging Deployment\n\nThis command passes the staging config file, which bypasses the production warning.\n\n```bash\n# With yarn\nyarn deploy:staging\n\n\n# With npm\nnpm run deploy:staging\n```\n\n---\n\n## Contributing\n\nContributions are welcome! If you have ideas for improvements or find a bug, please open an issue or submit a pull request on the [GitHub repository](https://github.com/codemonkss/azure-blob-deploy).\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n","readmeFilename":"README.md"}