[PR #165] [CLOSED] feat: add vinext migrate-env command #362

Closed
opened 2026-05-06 12:39:25 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/165
Author: @StringerBell69
Created: 2/27/2026
Status: Closed

Base: mainHead: feat/migrate-env


📝 Commits (1)

  • cf884da feat: add vinext migrate-env command

📊 Changes

4 files changed (+2341 additions, -3 deletions)

View changed files

📝 README.md (+20 -1)
📝 packages/vinext/src/cli.ts (+69 -2)
packages/vinext/src/migrate-env.ts (+1241 -0)
tests/migrate-env.test.ts (+1011 -0)

📄 Description

Securely migrate environment variables from Vercel to Cloudflare Workers.

  • Secrets uploaded via wrangler secret bulk (temp file zeroed before delete)
  • NEXT_PUBLIC_* vars injected into wrangler.jsonc as plain vars
  • Auto-detects Vercel auth (CLI, VERCEL_TOKEN, interactive prompt)
  • Auto-login for Cloudflare (wrangler login with retry)
  • Requires existing wrangler.jsonc (from vinext deploy --dry-run)
  • Early validation: checks for wrangler config and Vercel project
  • All child processes use execFileSync (no shell injection)
  • Vitest tests covering arg parsing, classification, API pagination, config injection, secure deletion, and more

Workflow:
vinext deploy --dry-run # Generate config files
vinext migrate-env # Migrate env vars from Vercel
vinext deploy # Build and deploy with env vars


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/165 **Author:** [@StringerBell69](https://github.com/StringerBell69) **Created:** 2/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/migrate-env` --- ### 📝 Commits (1) - [`cf884da`](https://github.com/cloudflare/vinext/commit/cf884da3837dc8eaf27d3ae72548853de9a7c7b1) feat: add vinext migrate-env command ### 📊 Changes **4 files changed** (+2341 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+20 -1) 📝 `packages/vinext/src/cli.ts` (+69 -2) ➕ `packages/vinext/src/migrate-env.ts` (+1241 -0) ➕ `tests/migrate-env.test.ts` (+1011 -0) </details> ### 📄 Description Securely migrate environment variables from Vercel to Cloudflare Workers. - Secrets uploaded via wrangler secret bulk (temp file zeroed before delete) - NEXT_PUBLIC_* vars injected into wrangler.jsonc as plain vars - Auto-detects Vercel auth (CLI, VERCEL_TOKEN, interactive prompt) - Auto-login for Cloudflare (wrangler login with retry) - Requires existing wrangler.jsonc (from vinext deploy --dry-run) - Early validation: checks for wrangler config and Vercel project - All child processes use execFileSync (no shell injection) - Vitest tests covering arg parsing, classification, API pagination, config injection, secure deletion, and more Workflow: vinext deploy --dry-run # Generate config files vinext migrate-env # Migrate env vars from Vercel vinext deploy # Build and deploy with env vars --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:25 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#362
No description provided.