@solongate/proxy 0.82.21 → 0.82.23
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/commands/index.js +0 -28
- package/dist/index.js +140 -821
- package/package.json +1 -1
- package/dist/create.d.ts +0 -13
- package/dist/create.js +0 -329
- package/dist/inject.d.ts +0 -19
- package/dist/inject.js +0 -375
package/dist/commands/index.js
CHANGED
|
@@ -503,8 +503,6 @@ var USAGE = `${bold("solongate policy")} \u2014 manage cloud policies
|
|
|
503
503
|
policy allow <id> --tool <p> [--command|--path|--url <val>]
|
|
504
504
|
Append an ALLOW rule
|
|
505
505
|
policy revoke <id> <ruleId> Remove a rule
|
|
506
|
-
policy versions <id> List version history
|
|
507
|
-
policy rollback <id> <version> Roll back to a version
|
|
508
506
|
policy active Show the resolved active policy
|
|
509
507
|
policy activate <id> | --clear Pin / unpin the active policy
|
|
510
508
|
policy dry-run <id|file.json> [--limit N] [--mode denylist|whitelist]
|
|
@@ -589,32 +587,6 @@ async function run(argv) {
|
|
|
589
587
|
err(green(` \u2713 Revoked ${ruleId}`) + dim(` \u2192 v${res.policy_version}`));
|
|
590
588
|
return 0;
|
|
591
589
|
}
|
|
592
|
-
case "versions": {
|
|
593
|
-
const id = positionals[1];
|
|
594
|
-
if (!id) return err(" Usage: policy versions <id>"), 1;
|
|
595
|
-
const { versions: versions2 } = await api.policies.versions(id, { limit: flagNum(flags, "limit") });
|
|
596
|
-
if (json) return printJson(versions2), 0;
|
|
597
|
-
table(
|
|
598
|
-
["VER", "RULES", "REASON", "BY", "WHEN"],
|
|
599
|
-
versions2.map((v) => [
|
|
600
|
-
`v${v.version}`,
|
|
601
|
-
String(v.rules_count),
|
|
602
|
-
truncate(v.reason || "\u2014", 40),
|
|
603
|
-
dim(truncate(v.created_by || "\u2014", 18)),
|
|
604
|
-
dim(v.created_at)
|
|
605
|
-
])
|
|
606
|
-
);
|
|
607
|
-
return 0;
|
|
608
|
-
}
|
|
609
|
-
case "rollback": {
|
|
610
|
-
const id = positionals[1];
|
|
611
|
-
const version = Number(positionals[2]);
|
|
612
|
-
if (!id || !Number.isFinite(version)) return err(" Usage: policy rollback <id> <version>"), 1;
|
|
613
|
-
const res = await api.policies.rollback(id, version);
|
|
614
|
-
if (json) return printJson(res), 0;
|
|
615
|
-
err(green(` \u2713 Rolled back ${res.policy_id} from v${res.rolled_back_from} \u2192 v${res.version}`));
|
|
616
|
-
return 0;
|
|
617
|
-
}
|
|
618
590
|
case "active": {
|
|
619
591
|
const a = await api.policies.active();
|
|
620
592
|
if (json) return printJson(a), 0;
|