{"_id":"@b64hub/sfpm","name":"@b64hub/sfpm","dist-tags":{"beta":"0.1.0","latest":"0.1.0"},"versions":{"0.1.0":{"name":"@b64hub/sfpm","version":"0.1.0","description":"Salesforce Package Manager","lint-staged":{"packages/*/src/**/*.ts":["eslint --fix"]},"devDependencies":{"@commitlint/cli":"^18.4.3","@commitlint/config-conventional":"^18.4.3","@eslint/compat":"^2.0.1","@stylistic/eslint-plugin":"^5.8.0","@types/node":"^20.10.0","@typescript-eslint/eslint-plugin":"^6.13.0","@typescript-eslint/parser":"^6.13.0","eslint":"^9.0.0","eslint-config-oclif":"^6.0.130","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.0.1","eslint-plugin-unicorn":"^62.0.0","husky":"^8.0.3","lint-staged":"^15.2.0","prettier":"^3.1.0","ts-node":"^10.9.2","typescript":"^5.3.3"},"engines":{"node":">=18.0.0","pnpm":">=8.0.0"},"scripts":{"build":"turbo build","dev":"turbo dev","watch":"turbo watch build","test":"turbo test","lint":"turbo lint","format":"prettier --write \"packages/*/src/**/*.ts\"","typecheck":"turbo typecheck","clean":"turbo clean && rm -rf node_modules"},"_id":"@b64hub/sfpm@0.1.0","_integrity":"sha512-GY0q8+6Vjz6JSCEziEWr0KzTlGkvyKkjG5LigeJtvoJN25KP2HMyjI5zsPY/ppRfKAHTASGC9zkKXLBudNd5tg==","_resolved":"/private/var/folders/_v/nz569h295px9gvkd08jpnzzr0000gn/T/404897f1584d6ce0a777b62eb17f179c/b64hub-sfpm-0.1.0.tgz","_from":"file:b64hub-sfpm-0.1.0.tgz","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-GY0q8+6Vjz6JSCEziEWr0KzTlGkvyKkjG5LigeJtvoJN25KP2HMyjI5zsPY/ppRfKAHTASGC9zkKXLBudNd5tg==","shasum":"bcd6ad175afa71b9b29f9a405817134633a4cfb4","tarball":"https://registry.npmjs.org/@b64hub/sfpm/-/sfpm-0.1.0.tgz","fileCount":418,"unpackedSize":2918545,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCSBlvFiirmMU3aFWAKa+avZkM8uCtf0Ki9quWel2CVhwIhAIIaLQToOjGfpGKgws0RX6OPmU/ib4ZMvBzM7M8c5WSy"}]},"_npmUser":{"name":"nkskaare","email":"nik.skaare@gmail.com"},"directories":{},"maintainers":[{"name":"b64-devs","email":"sebastian.kvalvag@b64.no"},{"name":"nkskaare","email":"nik.skaare@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sfpm_0.1.0_1785177853218_0.596263648809094"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T18:44:13.023Z","0.1.0":"2026-07-27T18:44:13.416Z","modified":"2026-07-27T18:44:13.619Z"},"maintainers":[{"name":"b64-devs","email":"sebastian.kvalvag@b64.no"},{"name":"nkskaare","email":"nik.skaare@gmail.com"}],"description":"Salesforce Package Manager","readme":"# SFPM — Salesforce Package Manager\n\n```\n  ███████╗███████╗██████╗ ███╗   ███╗\n  ██╔════╝██╔════╝██╔══██╗████╗ ████║\n  ███████╗█████╗  ██████╔╝██╔████╔██║\n  ╚════██║██╔══╝  ██╔═══╝ ██║╚██╔╝██║\n  ███████║██║     ██║     ██║ ╚═╝ ██║\n  ╚══════╝╚═╝     ╚═╝     ╚═╝     ╚═╝\n```\n\n_by developers, for developers_\n\n[![tests](https://github.com/b64hub/sfpm/actions/workflows/test.yml/badge.svg)](https://github.com/b64hub/sfpm/actions/workflows/test.yml)\n[![npm](https://img.shields.io/npm/v/@b64hub/sfpm-cli)](https://www.npmjs.com/package/@b64hub/sfpm-cli)\n![node](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/b64hub/sfpm/main/package.json&label=node&query=$.engines.node&color=brightgreen)\n![pnpm](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/b64hub/sfpm/main/package.json&label=pnpm&query=$.engines.pnpm&color=F69220)\n![license](https://img.shields.io/badge/license-MIT-blue)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://www.conventionalcommits.org/)\n\n> **Status: early-stage (v0.1.0, \"Seedling\")** — APIs and commands may change.\n> <img width=\"1280\" height=\"760\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b290d673-5da5-4cfb-84e1-75a2370f3829\" />\n\n## What is SFPM?\n\nSFPM is a CLI and toolchain that brings a modern package-manager workflow to Salesforce metadata. It builds Salesforce packages into versioned artifacts, installs or deploys them across orgs in dependency order, and runs lifecycle hooks for the metadata types Salesforce doesn't handle cleanly out of the box (profiles, permission sets, picklists, flows, managed-package settings, and more).\n\nThink `npm`, but the artifacts are unlocked / second-generation Salesforce packages instead of JavaScript modules.\n\n## Why use it?\n\n- **Dependency-aware orchestration** — build and deploy graphs of packages with one command instead of hand-rolling order.\n- **Async validation watchers** — kick off long unlocked-package builds and check back later with `sfpm build status`.\n- **Lifecycle hooks** — pre/post-deploy logic for the metadata Salesforce makes painful: profiles, perm sets, picklists, flows, LWC, managed packages, Browserforce settings.\n- **Scratch org pools** — provision and reuse warm scratch orgs to cut feedback time.\n- **Data seeding** — first-class [SFDMU](https://github.com/forcedotcom/SFDX-Data-Move-Utility) integration for reference data.\n- **CI-ready** — every flow that runs locally also ships as a GitHub Action.\n- **Turborepo-friendly** — `--turbo` flag on `build` / `deploy` / `install` for single-package mode under external orchestrators.\n\n## Repository layout\n\nThis is a pnpm + Turborepo monorepo:\n\n| Package                                 | Purpose                                                                          |\n| --------------------------------------- | -------------------------------------------------------------------------------- |\n| [`@b64hub/sfpm-cli`](packages/cli/)        | The `sfpm` CLI (oclif).                                                          |\n| [`@b64hub/sfpm-core`](packages/core/)      | Build/install orchestrators, artifact registry, lifecycle engine, project model. |\n| [`packages/actions`](packages/actions/) | GitHub Actions wrapping the same flows for CI.                                   |\n| [`packages/hooks`](packages/hooks/)     | Pre/post-deploy hooks for tricky metadata.                                       |\n| [`packages/orgs`](packages/orgs/)       | Scratch org and pool management.                                                 |\n| [`packages/sfdmu`](packages/sfdmu/)     | SFDMU data builder/installer integration.                                        |\n\n## Requirements\n\n- Node.js **>= 18**\n- **pnpm >= 8** (do not use `npm` or `yarn` for the workspace)\n- Salesforce CLI (`sf`) authenticated to your DevHub and target orgs\n- Git\n\n## Installation\n\nInstall the CLI globally with the package manager of your choice. **pnpm is recommended** — it matches the rest of the project's tooling — but npm and yarn work too.\n\n```bash\n# pnpm (recommended)\npnpm add -g @b64hub/sfpm-cli\n\n# npm\nnpm install -g @b64hub/sfpm-cli\n\n# yarn\nyarn global add @b64hub/sfpm-cli\n```\n\nVerify it's working:\n\n```bash\nsfpm --version\n```\n\n> **Note:** the \"do not use npm or yarn\" rule in [Requirements](#requirements) applies to the workspace itself (resolving `workspace:^` dependencies). For installing the published CLI as an end user, any package manager that talks to the npm registry is fine.\n\n### From source (for contributors)\n\n```bash\ngit clone https://github.com/b64hub/sfpm.git\ncd sfpm\npnpm install\npnpm build\n# Run via the local binary\nnode packages/cli/bin/run.js --help\n# Or link it for global use\npnpm --filter @b64hub/sfpm-cli link --global\n```\n\n## Quick start\n\n```bash\n# 1. Initialize an SFPM project\nsfpm project init\n\n# 2. Bootstrap the SFPM helper packages into your DevHub/prod org\nsfpm bootstrap -o my-devhub\n\n# 3. Build a package (or several) against your DevHub\nsfpm build my-package -v my-devhub\n\n# 4. Deploy from local source to a sandbox\nsfpm deploy my-package -o my-sandbox\n\n# 5. Install a previously built artifact into a target org\nsfpm install my-package -o my-sandbox\n```\n\n## Commands\n\nTop-level command reference — run `sfpm <command> --help` for full flags.\n\n### Project setup\n\n| Command                     | Description                                                                                                  |\n| --------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| `sfpm project init`         | Verify project configuration and setup requirements.                                                         |\n| `sfpm project init turbo`   | Initialize a Turborepo-native workspace for SFPM packages.                                                   |\n| `sfpm project sync`         | Generate `sfdx-project.json` from workspace `package.json` files.                                            |\n| `sfpm project version bump` | Bump package versions in `sfdx-project.json`.                                                                |\n| `sfpm bootstrap -o <org>`   | Install the SFPM helper packages (artifact tracking, pool, UI) into a DevHub. Tiers: `core`, `pool`, `full`. |\n\n### Build & deploy\n\n| Command                                     | Description                                                                                                                                    |\n| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |\n| `sfpm build <packages…> -v <devhub>`        | Build one or more packages, in dependency order. Supports `--async-validation`, `--skip-validation`, `--no-dependencies`, `--turbo`, `--json`. |\n| `sfpm build status`                         | Check the status of async package validation watchers.                                                                                         |\n| `sfpm deploy <packages…> -o <org>`          | Deploy packages from local source via `source:deploy`.                                                                                         |\n| `sfpm deploy artifact <packages…> -o <org>` | Deploy from previously built artifacts using source-deploy.                                                                                    |\n| `sfpm install <packages…> -o <org>`         | Install packages (from artifacts) into a target org.                                                                                           |\n\n### Scratch org pools\n\n| Command               | Description                    |\n| --------------------- | ------------------------------ |\n| `sfpm pool provision` | Provision orgs to fill a pool. |\n| `sfpm pool list`      | List orgs in a pool.           |\n| `sfpm pool fetch`     | Fetch an org from a pool.      |\n| `sfpm pool delete`    | Delete orgs from a pool.       |\n\n## Configuration\n\nSFPM reads project configuration from `sfpm.config.{ts,js,mjs}` at the project root (TypeScript preferred). The file is loaded with [`jiti`](https://github.com/unjs/jiti), so no build step is required.\n\n```ts\n// sfpm.config.ts\nimport { defineConfig } from '@b64hub/sfpm-core';\n\nexport default defineConfig({\n  namespace: 'myns',\n  sourceApiVersion: '62.0',\n  hooks: [\n    // lifecycle hook plugins\n  ],\n  artifacts: {\n    trackHistory: true,\n  },\n  ignoreFiles: [\n    // glob patterns excluded from package builds\n  ],\n});\n```\n\nRelevant environment variables:\n\n- `SF_DEV_HUB` — default `--target-dev-hub` for `sfpm build`.\n- `SF_TARGET_ORG` — default `--target-org` for `sfpm deploy` / `install`.\n- `SFPM_FORCE_BUILD` — equivalent to `sfpm build --force`.\n- `SFPM_PROJECT_DIR` — override the project directory (debugging).\n\nIf no config file is present, SFPM falls back to sensible defaults driven by `sfdx-project.json`.\n\n## CI integration\n\nThe same orchestrators ship as GitHub Actions in [packages/actions/](packages/actions/):\n\n- [`build-action.yml`](packages/actions/build-action.yml) — build packages.\n- [`build-resume-action.yml`](packages/actions/build-resume-action.yml) — resume async validation.\n- [`provision-pool-action.yml`](packages/actions/provision-pool-action.yml) — fill a scratch org pool.\n\n## Development\n\n```bash\npnpm install      # install workspace deps\npnpm build        # turbo build all packages\npnpm watch        # rebuild on change\npnpm test         # run vitest/mocha across the workspace\npnpm typecheck    # tsc -b across the workspace\npnpm lint         # eslint\npnpm format       # prettier\n```\n\nCommits follow [Conventional Commits](https://www.conventionalcommits.org/) (enforced by commitlint + Husky).\n\n## Contributing\n\nIssues and PRs are welcome at <https://github.com/b64hub/sfpm/issues>. Please:\n\n1. Open an issue first for non-trivial changes.\n2. Use Conventional Commit messages (`feat:`, `fix:`, `chore:`, …).\n3. Run `pnpm lint && pnpm typecheck && pnpm test` before pushing.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_rev":"1-3b3b753d44ada80c59e665294b3e4a24"}