cf-envsync 0.3.2 → 0.3.3
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/dist/index.js +3 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13476,11 +13476,6 @@ async function checkWrangler() {
|
|
|
13476
13476
|
const result = await exec(["npx", "wrangler", "--version"]);
|
|
13477
13477
|
return result.success;
|
|
13478
13478
|
}
|
|
13479
|
-
function envFlag(environment) {
|
|
13480
|
-
if (environment === "production")
|
|
13481
|
-
return [];
|
|
13482
|
-
return ["--env", environment];
|
|
13483
|
-
}
|
|
13484
13479
|
async function pushSecrets(workerName, secrets, environment, cwd) {
|
|
13485
13480
|
const json = JSON.stringify(secrets);
|
|
13486
13481
|
const args = [
|
|
@@ -13489,8 +13484,7 @@ async function pushSecrets(workerName, secrets, environment, cwd) {
|
|
|
13489
13484
|
"secret",
|
|
13490
13485
|
"bulk",
|
|
13491
13486
|
"--name",
|
|
13492
|
-
workerName
|
|
13493
|
-
...envFlag(environment)
|
|
13487
|
+
workerName
|
|
13494
13488
|
];
|
|
13495
13489
|
consola.debug(`Running: ${args.join(" ")}`);
|
|
13496
13490
|
const result = await exec(args, { cwd, stdin: json });
|
|
@@ -13502,15 +13496,14 @@ async function pushSecrets(workerName, secrets, environment, cwd) {
|
|
|
13502
13496
|
output: result.success ? result.stdout : result.stderr
|
|
13503
13497
|
};
|
|
13504
13498
|
}
|
|
13505
|
-
async function listSecrets(workerName,
|
|
13499
|
+
async function listSecrets(workerName, _environment, cwd) {
|
|
13506
13500
|
const args = [
|
|
13507
13501
|
"npx",
|
|
13508
13502
|
"wrangler",
|
|
13509
13503
|
"secret",
|
|
13510
13504
|
"list",
|
|
13511
13505
|
"--name",
|
|
13512
|
-
workerName
|
|
13513
|
-
...envFlag(environment)
|
|
13506
|
+
workerName
|
|
13514
13507
|
];
|
|
13515
13508
|
const result = await exec(args, { cwd });
|
|
13516
13509
|
if (!result.success) {
|