This commit is contained in:
1 parent
e4843e7d1d
commit
1808f14cc6
17 files changed
+711
-23
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { getOrgDirectory } from '../src/org-context.js';
|
||||
import { deploymentOrgSettings } from './org-context-settings.mjs';
|
||||
|
||||
try {
|
||||
const { vars, secrets } = deploymentOrgSettings(process.env);
|
||||
if (vars.ORG_CONTEXT_ENABLED !== 'true') {
|
||||
console.log('Organization integration disabled; existing behavior retained.');
|
||||
} else {
|
||||
const directory = await getOrgDirectory({ ...vars, ...secrets });
|
||||
console.log(JSON.stringify({
|
||||
status: 'verified', rootCount: JSON.parse(vars.ORG_CONTEXT_TENANT_IDS).length,
|
||||
tenantCount: directory.tenantCount, userCount: directory.byUser.size,
|
||||
membershipCount: directory.membershipCount
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(/^org_context_[a-z0-9_]+$/.test(error?.message || '') ? error.message : 'Organization integration configuration or verification failed.');
|
||||
process.exitCode = 1;
|
||||
}
|
||||
Reference in new issue
Block a user