Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/promoCreditCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ const nonSelfServicePromos: readonly NonSelfServicePromoCreditCategoryConfig[] =
* These are decrypted at runtime to build the actual selfServicePromos array.
*
* To add a new promo code:
* 1. Run: pnpm promo encrypt PROMO_CODE
* 1. Run: vercel env run -e production -- pnpm promo encrypt PROMO_CODE
* 2. Copy the encrypted value and use in encrypted_credit_category
*/
const encryptedSelfServicePromos: readonly EncryptedSelfServicePromoCreditCategoryConfig[] = [
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/encrypt-promo-codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Script to encrypt or decrypt promo codes.
*
* Run with:
* pnpm promo encrypt <plaintext>
* pnpm promo decrypt <encrypted>
* vercel env run -e production -- pnpm promo encrypt <plaintext>
* vercel env run -e production -- pnpm promo decrypt <encrypted>
*
* Requires CREDIT_CATEGORIES_ENCRYPTION_KEY environment variable to be set.
*/
Expand All @@ -21,7 +21,7 @@ if (!CREDIT_CATEGORIES_ENCRYPTION_KEY) {
const [operation, value] = process.argv.slice(2);

if (!operation || !value) {
console.error('Usage: pnpm promo <encrypt|decrypt> <value>');
console.error('Usage: vercel env run -e production -- pnpm promo <encrypt|decrypt> <value>');
process.exit(1);
}

Expand Down
Loading