Skip to content

Commit 74ac58b

Browse files
authored
Update get all custom domain changes (#1054)
* Update dependencies * fix: enhance custom domain handling in branding and custom domains handlers * restore package-lock.json
1 parent 38a3a2f commit 74ac58b

5 files changed

Lines changed: 79 additions & 72 deletions

File tree

package-lock.json

Lines changed: 55 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@
3333
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
3434
"dependencies": {
3535
"ajv": "^6.12.6",
36-
"auth0": "^4.19.0",
37-
"dot-prop": "^5.2.0",
36+
"auth0": "^4.20.0",
37+
"dot-prop": "^5.3.0",
3838
"fs-extra": "^10.1.0",
3939
"js-yaml": "^4.1.0",
4040
"lodash": "^4.17.21",
4141
"mkdirp": "^1.0.4",
4242
"nconf": "^0.12.1",
4343
"promise-pool-executor": "^1.1.1",
4444
"sanitize-filename": "^1.6.3",
45-
"undici": "^7.4.0",
45+
"undici": "^7.5.0",
4646
"winston": "^3.17.0",
47-
"yargs": "^15.3.1"
47+
"yargs": "^15.4.1"
4848
},
4949
"devDependencies": {
5050
"@types/fs-extra": "^9.0.13",
51-
"@types/lodash": "^4.17.13",
52-
"@types/mocha": "^10.0.9",
51+
"@types/lodash": "^4.17.16",
52+
"@types/mocha": "^10.0.10",
5353
"@types/nconf": "^0.10.7",
54-
"@typescript-eslint/parser": "^5.30.3",
55-
"chai": "^4.3.7",
56-
"chai-as-promised": "^7.1.1",
57-
"eslint": "^7.28.0",
54+
"@typescript-eslint/parser": "^5.62.0",
55+
"chai": "^4.5.0",
56+
"chai-as-promised": "^7.1.2",
57+
"eslint": "^7.32.0",
5858
"eslint-config-airbnb-base": "^14.2.1",
59-
"eslint-config-prettier": "^8.5.0",
59+
"eslint-config-prettier": "^8.10.0",
6060
"eslint-plugin-import": "^2.31.0",
6161
"husky": "^7.0.4",
6262
"kacl": "^1.1.1",
6363
"mocha": "^10.8.2",
6464
"nock": "^13.5.6",
6565
"node-fetch": "^2.7.0",
66-
"nyc": "^15.0.1",
67-
"prettier": "^2.6.2",
68-
"pretty-quick": "^3.1.3",
66+
"nyc": "^15.1.0",
67+
"prettier": "^2.8.8",
68+
"pretty-quick": "^3.3.1",
6969
"rimraf": "^3.0.2",
7070
"rmdir-sync": "^1.0.1",
7171
"sinon": "^13.0.2",

src/tools/auth0/handlers/branding.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GetBranding200Response, GetUniversalLogin200ResponseOneOf } from 'auth0';
1+
import { CustomDomain, GetBranding200Response, GetUniversalLogin200ResponseOneOf } from 'auth0';
22
import DefaultHandler, { order } from './default';
33
import constants from '../../constants';
44
import log from '../../../logger';
@@ -42,7 +42,10 @@ export default class BrandingHandler extends DefaultHandler {
4242

4343
// in case client version does not custom domains
4444
if (this.client.customDomains && typeof this.client.customDomains.getAll === 'function') {
45-
const { data: customDomains } = await this.client.customDomains.getAll();
45+
let { data: customDomains } = await this.client.customDomains.getAll();
46+
47+
customDomains = customDomains as CustomDomain[];
48+
4649
// templates are only supported if there's custom domains.
4750
if (customDomains && customDomains.length) {
4851
const { data: payload } = await this.client.branding.getUniversalLoginTemplate();

src/tools/auth0/handlers/customDomains.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { CustomDomain } from 'auth0';
12
import DefaultAPIHandler, { order } from './default';
23
import { Asset, Assets } from '../../../types';
34

@@ -50,7 +51,7 @@ export default class CustomDomainsHadnler extends DefaultAPIHandler {
5051

5152
const { data: customDomains } = await this.client.customDomains.getAll();
5253

53-
this.existing = customDomains;
54+
this.existing = customDomains as CustomDomain[];
5455

5556
return customDomains;
5657
} catch (err) {

src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GetConnectionsStrategyEnum, ManagementClient, ResourceServer, SsProfile } from 'auth0';
1+
import { CustomDomain, GetConnectionsStrategyEnum, ManagementClient, ResourceServer } from 'auth0';
22
import { PromisePoolExecutor } from 'promise-pool-executor';
33
import { Action } from './tools/auth0/handlers/actions';
44
import { Prompts } from './tools/auth0/handlers/prompts';
@@ -92,11 +92,11 @@ export type Assets = Partial<{
9292
templates?: { template: string; body: string }[] | null;
9393
})
9494
| null;
95-
phoneProviders : PhoneProvider[] | null;
95+
phoneProviders: PhoneProvider[] | null;
9696
clients: Client[] | null;
9797
clientGrants: ClientGrant[] | null;
9898
connections: Asset[] | null;
99-
customDomains: Asset[] | null;
99+
customDomains: CustomDomain[] | null;
100100
databases: Asset[] | null;
101101
emailProvider: Asset | null;
102102
emailTemplates: Asset[] | null;

0 commit comments

Comments
 (0)