d2l-lms-launch-darkly-feature-converter-plugin
Advanced tools
Comparing version 0.0.2 to 0.1.0
{ | ||
"name": "d2l-lms-launch-darkly-feature-converter-plugin", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -7,10 +7,10 @@ const _ = require( 'lodash' ); | ||
const instanceIdsByName = new Map(); | ||
const tenantIdsByDomainName = new Map(); | ||
const tenantIdsByDomain = new Map(); | ||
_.forEach( instances, instance => { | ||
instanceIdsByName.set( instance.ClientName, instance.InstanceId ); | ||
instanceIdsByName.set( instance.name, instance.instanceId ); | ||
_.forIn( instance.Orgs, org => { | ||
_.forIn( org.HostNames, ( domain, domainName ) => { | ||
tenantIdsByDomainName.set( domainName, org.TenantId ); | ||
_.forEach( instance.tenants, tenant => { | ||
_.forEach( tenant.domains, domain => { | ||
tenantIdsByDomain.set( domain, tenant.tenantId ); | ||
} ); | ||
@@ -20,3 +20,3 @@ } ); | ||
return new InstanceCatalog( instanceIdsByName, tenantIdsByDomainName ); | ||
return new InstanceCatalog( instanceIdsByName, tenantIdsByDomain ); | ||
}; |
[ | ||
{ | ||
"InstanceId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
"ClientName": "instance_a", | ||
"Orgs": { | ||
"6606": { | ||
"TenantId": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
"HostNames": { | ||
"www.tenant_b.org": {} | ||
} | ||
"instanceId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
"name": "instance_a", | ||
"tenants": [ | ||
{ | ||
"tenantId": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
"domains": [ | ||
"www.tenant_b.org" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] |
@@ -7,25 +7,25 @@ const _ = require( 'lodash' ); | ||
{ | ||
InstanceId: 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', | ||
ClientName: 'instance_a', | ||
Orgs: { | ||
6606: { | ||
TenantId: 'cccccccc-cccc-cccc-cccc-cccccccccccc', | ||
HostNames: { | ||
'www.tenant_c.org': {} | ||
} | ||
instanceId: 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', | ||
name: 'instance_a', | ||
tenants: [ | ||
{ | ||
tenantId: 'cccccccc-cccc-cccc-cccc-cccccccccccc', | ||
domains: [ | ||
'www.tenant_c.org' | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
InstanceId: 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', | ||
ClientName: 'instance_b', | ||
Orgs: { | ||
6606: { | ||
TenantId: 'dddddddd-dddd-dddd-dddd-dddddddddddd', | ||
HostNames: { | ||
'www.tenant_d.org': {}, | ||
'alt.tenant_d.org': {} | ||
} | ||
instanceId: 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', | ||
name: 'instance_b', | ||
tenants: [ | ||
{ | ||
tenantId: 'dddddddd-dddd-dddd-dddd-dddddddddddd', | ||
domains: [ | ||
'www.tenant_d.org', | ||
'alt.tenant_d.org' | ||
] | ||
} | ||
} | ||
] | ||
} | ||
@@ -32,0 +32,0 @@ ] ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72595