gh-secrets-sync 0.1.2 → 0.1.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/cli.mjs +3 -3
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import Spinner from 'yocto-spinner';
|
|
|
10
10
|
import sodium from 'libsodium-wrappers';
|
|
11
11
|
|
|
12
12
|
const name = "gh-secrets-sync";
|
|
13
|
-
const version = "0.1.
|
|
13
|
+
const version = "0.1.3";
|
|
14
14
|
|
|
15
15
|
const DEFAULT_SYNC_OPTIONS = {
|
|
16
16
|
config: "./secrets.config.yaml",
|
|
@@ -242,7 +242,7 @@ async function resolveConfig(options) {
|
|
|
242
242
|
}
|
|
243
243
|
async function resolveRepoPatterns(options) {
|
|
244
244
|
const filter = createRegexFilter(options.repos, "full_name");
|
|
245
|
-
let repos = (await getRepos(options)).filter((i) => filter(i) && (options.private || !i.private)).map((i) => i.full_name);
|
|
245
|
+
let repos = (await getRepos(options)).filter((i) => filter(i) && (options.private || !i.private)).filter((i) => options.fork || !i.fork).map((i) => i.full_name);
|
|
246
246
|
if (repos.length) {
|
|
247
247
|
repos = [.../* @__PURE__ */ new Set([...options.repos, ...repos])];
|
|
248
248
|
}
|
|
@@ -295,7 +295,7 @@ async function resolveSecretPatterns(options) {
|
|
|
295
295
|
|
|
296
296
|
try {
|
|
297
297
|
const cli = cac("gh-secrets-sync");
|
|
298
|
-
cli.command("").option("--config <config>", "secrets config file", { default: "./secrets.config.yaml" }).option("--secrets <secrets...>", "secrets name to sync", { default: [] }).option("--token <token>", "GitHub token").option("--api-version <version>", "GitHub API version", { default: "2022-11-28" }).option("--private", "Detect private repositories", { default: false }).option("--env-prefix <prefix>", "environment variable prefix", { default: "" }).option("--repo <repo>", "central GitHub repository").option("--strict", "Throw error if secret is not found in the environment variables", { default: true }).option("--yes", "Prompt to confirm resolved matches when regex patterns are used in repos or secrets", { default: false }).option("--dry", "Dry run", { default: false }).allowUnknownOptions().action(async (options) => {
|
|
298
|
+
cli.command("").option("--config <config>", "secrets config file", { default: "./secrets.config.yaml" }).option("--secrets <secrets...>", "secrets name to sync", { default: [] }).option("--token <token>", "GitHub token").option("--api-version <version>", "GitHub API version", { default: "2022-11-28" }).option("--private", "Detect private repositories", { default: false }).option("--fork", "Detect forked repositories", { default: false }).option("--env-prefix <prefix>", "environment variable prefix", { default: "" }).option("--repo <repo>", "central GitHub repository").option("--strict", "Throw error if secret is not found in the environment variables", { default: true }).option("--yes", "Prompt to confirm resolved matches when regex patterns are used in repos or secrets", { default: false }).option("--dry", "Dry run", { default: false }).allowUnknownOptions().action(async (options) => {
|
|
299
299
|
console.log(`${c.yellow(name)} ${c.dim(`v${version}`)}`);
|
|
300
300
|
console.log();
|
|
301
301
|
const config = await resolveConfig(options);
|