Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 105 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"readme": "README.md",
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
"dependencies": {
"ajv": "^6.12.6",
"ajv": "^8.18.0",
"ajv-formats": "^3.0.1",
"auth0": "^5.3.1",
"dot-prop": "^5.3.0",
"fs-extra": "^10.1.0",
Expand All @@ -47,11 +48,11 @@
"yargs": "^15.4.1"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.17.23",
"@types/mocha": "^10.0.10",
"@types/nconf": "^0.10.7",
"@eslint/js": "^9.39.2",
"@typescript-eslint/eslint-plugin": "^8.55.0",
"@typescript-eslint/parser": "^8.55.0",
"chai": "^4.5.0",
Expand Down
3 changes: 1 addition & 2 deletions src/tools/auth0/handlers/customDomains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export const schema = {
properties: {
custom_domain_id: { type: 'string' },
custom_client_ip_header: {
type: 'string',
nullable: true,
type: ['string', 'null'],
enum: ['true-client-ip', 'cf-connecting-ip', 'x-forwarded-for', null],
},
domain: { type: 'string' },
Expand Down
55 changes: 10 additions & 45 deletions src/tools/auth0/handlers/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,33 +194,16 @@ export const schema = {
},
customText: {
type: 'object',
properties: languages.reduce(
(acc, language) => ({
...acc,
[language]: {
type: 'object',
properties: promptTypes.reduce(
(promptAcc, promptType) => ({
...promptAcc,
[promptType]: {
type: 'object',
properties: screenTypes.reduce(
(screenAcc, screenType) => ({
...screenAcc,
[screenType]: {
type: 'object',
},
}),
{}
),
},
}),
{}
),
},
}),
{}
),
propertyNames: { enum: [...languages] },
additionalProperties: {
type: 'object',
propertyNames: { enum: [...promptTypes] },
additionalProperties: {
type: 'object',
propertyNames: { enum: [...screenTypes] },
additionalProperties: { type: 'object' },
},
},
},
partials: {
type: 'object',
Expand Down Expand Up @@ -264,24 +247,6 @@ export const schema = {
},
screenRenderers: {
type: 'array',
properties: promptTypes.reduce(
(promptAcc, promptType) => ({
...promptAcc,
[promptType]: {
type: 'array',
properties: screenTypes.reduce(
(screenAcc, screenType) => ({
...screenAcc,
[screenType]: {
type: 'string',
},
}),
{}
),
},
}),
{}
),
},
},
};
Expand Down
6 changes: 4 additions & 2 deletions src/tools/auth0/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Ajv from 'ajv/lib/ajv';
import Ajv from 'ajv';
import addFormats from 'ajv-formats';

import pagedClient from './client';
import schema from './schema';
Expand Down Expand Up @@ -95,7 +96,8 @@ export default class Auth0 {
}

async validate(): Promise<void> {
const ajv = new Ajv({ useDefaults: true, nullable: true });
const ajv = new Ajv({ useDefaults: true, strict: false, unicodeRegExp: false });
addFormats(ajv);
const nonNullAssets = Object.keys(this.assets)
.filter((k) => this.assets[k] != null)
.reduce((a, k) => ({ ...a, [k]: this.assets[k] }), {});
Expand Down
Loading