@psg2/env-sync 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cli.js +1 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,11 +96,11 @@ targets:
|
|
|
96
96
|
type: vercel
|
|
97
97
|
environments: [production] # preview, production, development
|
|
98
98
|
groups: [prod-secrets]
|
|
99
|
-
project: my-app # Optional
|
|
99
|
+
project: my-app # Optional: expected name of the linked project
|
|
100
100
|
redeploy: true # Optional (default: false)
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
**Authentication:** the token is read from `VERCEL_TOKEN` first, then from the Vercel CLI auth store written by `vercel login` (e.g. `~/Library/Application Support/com.vercel.cli/auth.json` on macOS, `~/.local/share/com.vercel.cli/auth.json` on Linux, `%APPDATA%/com.vercel.cli/auth.json` on Windows). The project and team ids come from `.vercel/project.json`, created by `vercel link` (or written by hand with `projectId` and `orgId`). The `vercel` CLI itself is optional at runtime — it's only needed once, to produce the token and the linked project file.
|
|
103
|
+
**Authentication:** the token is read from `VERCEL_TOKEN` first, then from the Vercel CLI auth store written by `vercel login` (e.g. `~/Library/Application Support/com.vercel.cli/auth.json` on macOS, `~/.local/share/com.vercel.cli/auth.json` on Linux, `%APPDATA%/com.vercel.cli/auth.json` on Windows). The project and team ids come from `.vercel/project.json`, created by `vercel link` (or written by hand with `projectId` and `orgId`). The folder that holds `env-sync.yaml` must be linked; `project:` does not look a project up by name, it only warns when the linked project has a different name. The `vercel` CLI itself is optional at runtime — it's only needed once, to produce the token and the linked project file.
|
|
104
104
|
|
|
105
105
|
#### GitHub
|
|
106
106
|
|
package/dist/cli.js
CHANGED
|
@@ -325,9 +325,6 @@ async function syncGitHub(name, target, vars, _configDir, opts) {
|
|
|
325
325
|
errors.push(` \u2717 ${v.key}: ${err}`);
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
if (errors.length > 0) {
|
|
329
|
-
for (const e of errors) console.error(e);
|
|
330
|
-
}
|
|
331
328
|
const succeeded = vars.length - errors.length;
|
|
332
329
|
console.log(` Done: ${succeeded}/${vars.length} secrets pushed to GitHub [${label}]`);
|
|
333
330
|
return { target: name, type: "github", vars: vars.length, errors };
|
|
@@ -479,9 +476,6 @@ async function syncVercel(name, target, vars, configDir, opts) {
|
|
|
479
476
|
}
|
|
480
477
|
}
|
|
481
478
|
}
|
|
482
|
-
if (errors.length > 0) {
|
|
483
|
-
for (const e of errors) console.error(e);
|
|
484
|
-
}
|
|
485
479
|
const succeeded = vars.length * target.environments.length - errors.length;
|
|
486
480
|
console.log(
|
|
487
481
|
` Done: ${succeeded}/${vars.length * target.environments.length} vars pushed to Vercel [${envLabel}]`
|
|
@@ -595,6 +589,7 @@ async function sync(config, opts) {
|
|
|
595
589
|
for (const e of resolveErrors) console.error(` ${e}`);
|
|
596
590
|
}
|
|
597
591
|
const result = await dispatch(name, target, resolved, opts);
|
|
592
|
+
for (const e of result.errors) console.error(e);
|
|
598
593
|
result.errors.push(...resolveErrors);
|
|
599
594
|
results.push(result);
|
|
600
595
|
}
|