@ted-galago/wave-cli 0.1.11 → 0.1.13
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.cjs +32 -2
- package/dist/index.js +32 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3043,11 +3043,40 @@ var import_zod7 = require("zod");
|
|
|
3043
3043
|
var idSchema6 = import_zod7.z.string().min(1);
|
|
3044
3044
|
var createHelp3 = buildDataJsonHelp("member", "create") ?? 'JSON object for member or {"member": {...}}';
|
|
3045
3045
|
var updateHelp3 = buildDataJsonHelp("member", "update") ?? 'JSON object for member or {"member": {...}}';
|
|
3046
|
+
function parseStrictBooleanOption(value, optionName) {
|
|
3047
|
+
if (typeof value === "boolean") {
|
|
3048
|
+
return value;
|
|
3049
|
+
}
|
|
3050
|
+
if (typeof value === "string") {
|
|
3051
|
+
const lowered = value.trim().toLowerCase();
|
|
3052
|
+
if (lowered === "true") {
|
|
3053
|
+
return true;
|
|
3054
|
+
}
|
|
3055
|
+
if (lowered === "false") {
|
|
3056
|
+
return false;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
throw new CliError({
|
|
3060
|
+
message: `Invalid ${optionName} value. Use true or false.`,
|
|
3061
|
+
kind: "invalid_args",
|
|
3062
|
+
status: 400,
|
|
3063
|
+
exitCode: EXIT_CODES.invalidArgs,
|
|
3064
|
+
details: {
|
|
3065
|
+
option: optionName,
|
|
3066
|
+
value,
|
|
3067
|
+
allowed: ["true", "false"]
|
|
3068
|
+
}
|
|
3069
|
+
});
|
|
3070
|
+
}
|
|
3046
3071
|
function registerMemberCommands(program) {
|
|
3047
3072
|
const members = program.command("members").description("Member operations");
|
|
3048
|
-
members.command("list").option("--page <page>").option("--per <per>").
|
|
3073
|
+
members.command("list").option("--page <page>").option("--per <per>").option(
|
|
3074
|
+
"--include-coaches <includeCoaches>",
|
|
3075
|
+
"Include linked coach members. Defaults to false; omitted/false returns organization members only."
|
|
3076
|
+
).action(async (opts, cmd) => {
|
|
3049
3077
|
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
3050
3078
|
const organizationId = resolveOrganizationId(context.organizationId);
|
|
3079
|
+
const includeCoaches = opts.includeCoaches === void 0 ? void 0 : parseStrictBooleanOption(opts.includeCoaches, "--include-coaches");
|
|
3051
3080
|
await runGraphqlQueryCommand({
|
|
3052
3081
|
command: "members.list",
|
|
3053
3082
|
runtimeOptions: context.runtimeOptions,
|
|
@@ -3055,7 +3084,8 @@ function registerMemberCommands(program) {
|
|
|
3055
3084
|
variables: normalizeGraphqlVariables2({
|
|
3056
3085
|
organization_id: organizationId,
|
|
3057
3086
|
page: opts.page,
|
|
3058
|
-
per: opts.per
|
|
3087
|
+
per: opts.per,
|
|
3088
|
+
include_coaches: includeCoaches
|
|
3059
3089
|
}),
|
|
3060
3090
|
isList: true
|
|
3061
3091
|
});
|
package/dist/index.js
CHANGED
|
@@ -3042,11 +3042,40 @@ import { z as z7 } from "zod";
|
|
|
3042
3042
|
var idSchema6 = z7.string().min(1);
|
|
3043
3043
|
var createHelp3 = buildDataJsonHelp("member", "create") ?? 'JSON object for member or {"member": {...}}';
|
|
3044
3044
|
var updateHelp3 = buildDataJsonHelp("member", "update") ?? 'JSON object for member or {"member": {...}}';
|
|
3045
|
+
function parseStrictBooleanOption(value, optionName) {
|
|
3046
|
+
if (typeof value === "boolean") {
|
|
3047
|
+
return value;
|
|
3048
|
+
}
|
|
3049
|
+
if (typeof value === "string") {
|
|
3050
|
+
const lowered = value.trim().toLowerCase();
|
|
3051
|
+
if (lowered === "true") {
|
|
3052
|
+
return true;
|
|
3053
|
+
}
|
|
3054
|
+
if (lowered === "false") {
|
|
3055
|
+
return false;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
throw new CliError({
|
|
3059
|
+
message: `Invalid ${optionName} value. Use true or false.`,
|
|
3060
|
+
kind: "invalid_args",
|
|
3061
|
+
status: 400,
|
|
3062
|
+
exitCode: EXIT_CODES.invalidArgs,
|
|
3063
|
+
details: {
|
|
3064
|
+
option: optionName,
|
|
3065
|
+
value,
|
|
3066
|
+
allowed: ["true", "false"]
|
|
3067
|
+
}
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3045
3070
|
function registerMemberCommands(program) {
|
|
3046
3071
|
const members = program.command("members").description("Member operations");
|
|
3047
|
-
members.command("list").option("--page <page>").option("--per <per>").
|
|
3072
|
+
members.command("list").option("--page <page>").option("--per <per>").option(
|
|
3073
|
+
"--include-coaches <includeCoaches>",
|
|
3074
|
+
"Include linked coach members. Defaults to false; omitted/false returns organization members only."
|
|
3075
|
+
).action(async (opts, cmd) => {
|
|
3048
3076
|
const context = await resolveCommandContext(cmd.optsWithGlobals());
|
|
3049
3077
|
const organizationId = resolveOrganizationId(context.organizationId);
|
|
3078
|
+
const includeCoaches = opts.includeCoaches === void 0 ? void 0 : parseStrictBooleanOption(opts.includeCoaches, "--include-coaches");
|
|
3050
3079
|
await runGraphqlQueryCommand({
|
|
3051
3080
|
command: "members.list",
|
|
3052
3081
|
runtimeOptions: context.runtimeOptions,
|
|
@@ -3054,7 +3083,8 @@ function registerMemberCommands(program) {
|
|
|
3054
3083
|
variables: normalizeGraphqlVariables2({
|
|
3055
3084
|
organization_id: organizationId,
|
|
3056
3085
|
page: opts.page,
|
|
3057
|
-
per: opts.per
|
|
3086
|
+
per: opts.per,
|
|
3087
|
+
include_coaches: includeCoaches
|
|
3058
3088
|
}),
|
|
3059
3089
|
isList: true
|
|
3060
3090
|
});
|