@sortlist/cli 0.34.0 → 0.35.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/package.json +4 -1
- package/src/commands/dynamic.ts +16 -3
- package/src/graphql/client.ts +3 -1
- package/src/graphql/generated/graphql.ts +391 -4132
- package/src/graphql/query-builder.ts +1 -1
- package/src/lib/browser.ts +8 -3
- package/src/lib/output.ts +0 -26
- package/src/lib/sentry.ts +0 -7
- package/src/lib/parse.ts +0 -8
- package/src/lib/sequence-buffer.ts +0 -95
package/package.json
CHANGED
package/src/commands/dynamic.ts
CHANGED
|
@@ -129,9 +129,22 @@ function coerceValue(raw: string, type: GraphQLInputType, flagName: string): unk
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
const typeName = unwrap(type).name;
|
|
132
|
-
if (typeName === 'Int')
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
if (typeName === 'Int') {
|
|
133
|
+
const parsed = parseInt(raw, 10);
|
|
134
|
+
if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects an integer, got "${raw}".`);
|
|
135
|
+
return parsed;
|
|
136
|
+
}
|
|
137
|
+
if (typeName === 'Float') {
|
|
138
|
+
const parsed = parseFloat(raw);
|
|
139
|
+
if (Number.isNaN(parsed)) throw new Error(`--${flagName} expects a number, got "${raw}".`);
|
|
140
|
+
return parsed;
|
|
141
|
+
}
|
|
142
|
+
if (typeName === 'Boolean') {
|
|
143
|
+
if (raw !== 'true' && raw !== 'false') {
|
|
144
|
+
throw new Error(`--${flagName} expects "true" or "false", got "${raw}".`);
|
|
145
|
+
}
|
|
146
|
+
return raw === 'true';
|
|
147
|
+
}
|
|
135
148
|
return raw;
|
|
136
149
|
}
|
|
137
150
|
|
package/src/graphql/client.ts
CHANGED
|
@@ -131,7 +131,9 @@ async function executeQuery<T = Record<string, unknown>>(
|
|
|
131
131
|
headers['Authorization'] = `Bearer ${creds.accessToken}`;
|
|
132
132
|
|
|
133
133
|
if (verbose) {
|
|
134
|
-
|
|
134
|
+
// Never print the full token — debug output ends up in pasted logs.
|
|
135
|
+
// `sl token` is the deliberate way to get the raw value.
|
|
136
|
+
info(`[debug] JWT: ...${creds.accessToken.slice(-8)}`);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
|