@calimero-network/registry-cli 1.23.0 → 1.25.0
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 +3 -3
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,9 +48,9 @@ calimero-registry org update <orgId> [-n <name>] [-m <json>]
|
|
|
48
48
|
calimero-registry org delete <orgId> [-y] # irreversible
|
|
49
49
|
|
|
50
50
|
calimero-registry org members list <orgId>
|
|
51
|
-
calimero-registry org members add <orgId> <
|
|
52
|
-
calimero-registry org members update <orgId> <
|
|
53
|
-
calimero-registry org members remove <orgId> <
|
|
51
|
+
calimero-registry org members add <orgId> <username> [-r admin|member]
|
|
52
|
+
calimero-registry org members update <orgId> <username> -r admin|member
|
|
53
|
+
calimero-registry org members remove <orgId> <username>
|
|
54
54
|
|
|
55
55
|
calimero-registry org packages link <orgId> <package>
|
|
56
56
|
calimero-registry org packages unlink <orgId> <package>
|
package/dist/index.js
CHANGED
|
@@ -2758,7 +2758,7 @@ var orgCommand = new Command("org").description("Manage organizations (create, l
|
|
|
2758
2758
|
}
|
|
2759
2759
|
)
|
|
2760
2760
|
).addCommand(
|
|
2761
|
-
new Command("members").description("List,
|
|
2761
|
+
new Command("members").description("List, invite, or remove organization members").addCommand(
|
|
2762
2762
|
new Command("list").description("List members of an org").argument("<orgId>", "Organization id or slug").action(async (orgId, _options, command) => {
|
|
2763
2763
|
const { url, timeout } = getGlobalOpts(command);
|
|
2764
2764
|
const base = url.replace(/\/$/, "");
|
|
@@ -2783,15 +2783,17 @@ var orgCommand = new Command("org").description("Manage organizations (create, l
|
|
|
2783
2783
|
}
|
|
2784
2784
|
})
|
|
2785
2785
|
).addCommand(
|
|
2786
|
-
new Command("add").description(
|
|
2787
|
-
|
|
2786
|
+
new Command("add").description(
|
|
2787
|
+
"Invite a member by username; they join once they accept"
|
|
2788
|
+
).argument("<orgId>", "Organization id or slug").argument("<username>", "Member username").option("-r, --role <role>", "Role: member or admin", "member").action(
|
|
2789
|
+
async (orgId, username, options, command) => {
|
|
2788
2790
|
const { url, timeout } = getGlobalOpts(command);
|
|
2789
|
-
const spinner2 = ora4("
|
|
2791
|
+
const spinner2 = ora4("Inviting member...").start();
|
|
2790
2792
|
try {
|
|
2791
2793
|
const authHeaders = getAuthHeaders(url);
|
|
2792
2794
|
const pathname = `/api/v2/orgs/${encodeURIComponent(orgId)}/members`;
|
|
2793
2795
|
const body = {
|
|
2794
|
-
|
|
2796
|
+
username: username.trim().replace(/^@+/, ""),
|
|
2795
2797
|
role: options.role === "admin" ? "admin" : "member"
|
|
2796
2798
|
};
|
|
2797
2799
|
const base = url.replace(/\/$/, "");
|
|
@@ -2808,7 +2810,9 @@ var orgCommand = new Command("org").description("Manage organizations (create, l
|
|
|
2808
2810
|
console.error(chalk4.red(JSON.stringify(data)));
|
|
2809
2811
|
process.exit(1);
|
|
2810
2812
|
}
|
|
2811
|
-
spinner2.succeed(
|
|
2813
|
+
spinner2.succeed(
|
|
2814
|
+
status === 202 ? "Invitation sent; the user joins once they accept it" : "Member added"
|
|
2815
|
+
);
|
|
2812
2816
|
} catch (e) {
|
|
2813
2817
|
spinner2.fail("Failed");
|
|
2814
2818
|
console.error(
|
|
@@ -2819,7 +2823,7 @@ var orgCommand = new Command("org").description("Manage organizations (create, l
|
|
|
2819
2823
|
}
|
|
2820
2824
|
)
|
|
2821
2825
|
).addCommand(
|
|
2822
|
-
new Command("update").description("Update a member role (admin or member)").argument("<orgId>", "Organization id or slug").argument("<
|
|
2826
|
+
new Command("update").description("Update a member role (admin or member)").argument("<orgId>", "Organization id or slug").argument("<member>", "Member username or email address").requiredOption("-r, --role <role>", "New role: admin or member").action(
|
|
2823
2827
|
async (orgId, email, options, command) => {
|
|
2824
2828
|
const { url, timeout } = getGlobalOpts(command);
|
|
2825
2829
|
const role = options.role === "admin" ? "admin" : "member";
|
|
@@ -2853,7 +2857,7 @@ var orgCommand = new Command("org").description("Manage organizations (create, l
|
|
|
2853
2857
|
}
|
|
2854
2858
|
)
|
|
2855
2859
|
).addCommand(
|
|
2856
|
-
new Command("remove").description("Remove a member by email").argument("<orgId>", "Organization id or slug").argument("<
|
|
2860
|
+
new Command("remove").description("Remove a member by username or email").argument("<orgId>", "Organization id or slug").argument("<member>", "Member username or email address").action(
|
|
2857
2861
|
async (orgId, email, _options, command) => {
|
|
2858
2862
|
const { url, timeout } = getGlobalOpts(command);
|
|
2859
2863
|
const spinner2 = ora4("Removing member...").start();
|