Repository navigation
fix(organizations): say --org takes a UID when it is given an organization name - #293
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
1 similar comment
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
08b8ddf to
5891759
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
9d94cb1
5891759 to
9d94cb1
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
9d94cb1 to
a595b0f
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
--org takes an organization UID only. A name passed with it went to the
Launch API unchanged as x-organization-uid, so the user got the API's
rejection, which never said what was wrong.
organizationResolution.org now has a normalize step: a value passed with
--org is trimmed and must look like a Contentstack organization UID
(blt + 16 hex). Anything else exits 2 before any request with
"--org accepts an organization UID, not a name." Values from .cs-launch.json and the
organization picker are UIDs already and are not checked.
Tests that passed placeholder org values ('org1', 'org-from-flag',
random 18-hex strings) with --org now use UID-shaped constants, the
resources test no longer pins org as having no normalize step, and the
Talisman checksums of the four edited test files are refreshed.
a595b0f to
91318ee
Compare
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
Jira: CL-8826
What
--orgstill takes an organization UID only. A value given to--orgis now trimmed and must look like a Contentstack organization UID (blt+ 16 hex). Anything else, such as an organization name with or without spaces, exits 2 before any request with:x-organization-uid, and the user got the API's rejection, which never said what was wrong.organizationUidfrom.cs-launch.jsonand the organization picker's choice are not checked.--org(name → UID lookup, as--projectand--envdo). That would be new behaviour and needs its own ticket.For reviewers: the check assumes every Contentstack organization UID is
blt+ 16 hex. Every org UID in the e2e fixtures has that shape. Please flag it if you know of an org UID that doesn't.Tests
src/organizations/organization.inputs.test.ts: a name with spaces, a one-word name, a valid UID, a UID with whitespace around it, and config/picker values left unchecked.test/integration/organization-prompt.test.ts:launch:projects:list --org "Acme Production"exits 2 with the message and sends no request.'org1','org-from-flag', random 18-hex strings) to--orgnow use UID-shaped constants.resources.test.tsno longer asserts thatorghas no normalize step.npm test: 194 suites, 3852 tests, all passing. ESLint andtscare clean.The pre-commit Snyk scan reports
adm-zip@0.6.1andopen@8.4.2(via@contentstack/cli-utilities). Both are already onv2-devand unrelated to this change.#claude_code#
🤖 Generated with Claude Code