refactor: rename Protect branding to Stack/Encryption#285
refactor: rename Protect branding to Stack/Encryption#285calvinbrewer wants to merge 10 commits into
Conversation
Rename public API from Protect naming to Stack/Encryption naming: - protect() → Encryption() - csTable/csColumn → encryptedTable/encryptedColumn - ProtectClient → EncryptionClient - ProtectError → EncryptionError - @cipherstash/protect → @cipherstash/stack All old names kept as deprecated aliases for backward compat. Updates examples, docs, drizzle, dynamodb, and schema packages. Adds packages/stack as the new core package. Adds CLAUDE.md and MIGRATION.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
| Name | Type |
|---|---|
| @cipherstash/protect | Minor |
| @cipherstash/schema | Minor |
| @cipherstash/stack | Minor |
| @cipherstash/drizzle | Major |
| @cipherstash/protect-dynamodb | Major |
| @cipherstash/basic-example | Patch |
| @cipherstash/dynamo-example | Patch |
| nest | Patch |
| next-drizzle-mysql | Patch |
| @cipherstash/nextjs-clerk-example | Patch |
| @cipherstash/typeorm-example | Patch |
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Resolve merge conflicts and propagate incoming features (FFI error code preservation, STE Vec/searchableJson query support) to the stack package with rebranded naming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace `ReturnType<typeof protect>` with `EncryptionClient` type in 8 stack test files - Fix `ProtectClient` JSDoc reference in decrypt.ts → `EncryptionClient` - Rename `[protect]` error prefix to `[encryption]` in 10 stack runtime files - Update Nest example README: `ProtectClient` → `EncryptionClient` - Update Drizzle docs prose: "protect operators" → "encryption operators" - Update schema tests: `csTable`/`csColumn`/`csValue` → `encryptedTable`/`encryptedColumn`/`encryptedValue` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes from collated rename verification report: - E1-A1: Fix TypeORM example type error (EncryptionClientConfig → EncryptionClient) - E9-A2: Update CLI branding from "CipherStash Protect" to "CipherStash Stash" - E10-A2: Add @cipherstash/stack to SECURITY.md supported packages - C3: Rename internal AtLeastOneCsTable → AtLeastOneEncryptedTable - E3-A1: Update JSDoc eqlClient variable references → encryptionClient - E12-A2: Fix Drizzle JSDoc "ProtectTable" → "EncryptedTable" - E2-A1: Replace [protect]: error prefix with [encryption]: in 232 test assertions - E15-A2: Update schema test describe block ProtectTable → encryptedTable - E6-A2: Add deprecation notice to protect package README - E11-A2: Add @cipherstash/stack to changeset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename class Stash → SecretsClient, interface StashConfig → SecretsConfig - Add deprecated aliases: Stash, StashConfig - Update CLI (stash.ts) to use new names and import from secrets/ - Fix tsup.config.ts entry path: src/stash/ → src/secrets/ - Remove stale src/stash/ directory (was duplicate of src/secrets/) - Update all JSDoc examples to use Secrets() factory pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bulk rename of protectClient variable to encryptionClient across the entire repo, plus related branding fixes. Changes by area: - utils/logger: [protect] → [encryption] log prefix - dynamodb: protectClient → encryptionClient, ProtectDynamoDB* types → EncryptedDynamoDB* (with deprecated aliases), protectDynamoDB() → encryptedDynamoDB(), PROTECT_DYNAMODB_ERROR → DYNAMODB_ENCRYPTION_ERROR - drizzle: protectClient/protectTable/protectColumn internal vars renamed, test protectOps → encryptionOps - stack tests: protectClient → encryptionClient across all 16 test files - stack source: EQL client → Encryption client, Stash Encryption → Encryption - all 7 examples: protectClient → encryptionClient, [protect]: → [encryption]:, initializeProtectClient → initializeEncryptionClient, ProtectEntityHelper → EncryptionEntityHelper - all docs/READMEs: protectClient → encryptionClient (~180 replacements) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s (round 2) Renamed internal variables, error classes, and public API functions: - dynamodb: protectTable→table params, ProtectDynamoDBError→EncryptedDynamoDBError - drizzle: ProtectOperatorError→EncryptionOperatorError, createProtectOperators→createEncryptionOperators - nest example: full ProtectModule→EncryptionModule rebrand across all files - docs/examples: remaining protect* variable and function references All deprecated aliases preserved for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…js middleware, docs (round 3) File/directory renames: - Stack test files: *-protect.test.ts → *-encryption.test.ts (5 files) - Example directories: protect/ → encryption/ (nest, drizzle, nextjs-clerk, next-drizzle-mysql, dynamo, basic, typeorm) - Example files: protect.ts → encryption.ts, protect-entity.ts → encryption-entity.ts - Nest example: protect.module.ts → encryption.module.ts, etc. (6 files) - Doc files: drizzle-protect.md → drizzle-encryption.md, init-protect.md → init-encryption.md Source code: - FfiProtectError → FfiEncryptionError (with deprecated alias) - protectClerkMiddleware → encryptionClerkMiddleware (with deprecated alias) - protectMiddleware → encryptionMiddleware (with deprecated alias) - PROTECT_LOG_LEVEL → CS_LOG_LEVEL (with backward compat fallback) - extractProtectSchema → extractEncryptionSchema in drizzle example - docs.test.ts context key protect → encryption - protectedUser → encryptedUser in typeorm example Documentation: - All ./protect paths → ./encryption in READMEs, getting-started, schema, model-operations - Cross-references updated for renamed doc files - PROTECT_LOG_LEVEL → CS_LOG_LEVEL in env var docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nd 4) Comments: - "protected table schema" → "encrypted table schema" in 6 dynamo example files + dynamodb README - "protectjs" → "CipherStash" in nextjs-clerk schema comment - eql_payload_created_by_protect → eql_payload_created_by_encryption in docs Environment variables: - PROTECT_LOG_LEVEL → CS_LOG_LEVEL in .env files and nest module - AGENTS.md env var reference updated Database/infrastructure: - protect_example → encryption_example in next-drizzle-mysql (docker-compose, drizzle config, .env.example) - protectNestedJson → encryptedNestedJson in dynamodb test Documentation: - protect-example → encryption-example in getting-started.md - jsprotect.git → protectjs.git in hono-supabase README - Updated product URLs in next-drizzle-mysql README - MIGRATION.md: updated "after" examples with new function names - Nest README: fixed src/protect/ → src/encryption/ path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
protect()→Encryption(),csTable/csColumn→encryptedTable/encryptedColumn,ProtectClient→EncryptionClient, etc.)packages/stackas the new core package (source copied frompackages/protect, renamed internally)packages/protect-dynamodb→packages/dynamodbwith imports updated to@cipherstash/stack@cipherstash/drizzleto depend on@cipherstash/stackinstead of@cipherstash/protectCLAUDE.md(Claude Code project instructions) andMIGRATION.md(public migration guide)What changed
packages/stack/packages/schema/encryptedTable/encryptedColumn/encryptedValueexports + deprecated aliases forcsTable/csColumn/csValueandProtect*typespackages/dynamodb/packages/protect-dynamodb/, imports now use@cipherstash/stackpackages/drizzle/@cipherstash/protectto@cipherstash/stackexamples/docs/Test plan
pnpm run buildpassespnpm --filter @cipherstash/stack testpasses (249/251, 2 pre-existing skips)pnpm --filter @cipherstash/protect-dynamodb testpasses (12/12)pnpm --filter @cipherstash/drizzle testpasses (69/69)protect,csTable,ProtectClient, etc.)🤖 Generated with Claude Code