auth0-deploy-cli 8.25.0 → 8.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/claude-code-review.yml +1 -4
- package/CHANGELOG.md +30 -1
- package/lib/tools/auth0/handlers/actions.js +1 -1
- package/lib/tools/auth0/handlers/clientGrants.d.ts +5 -0
- package/lib/tools/auth0/handlers/clientGrants.js +18 -3
- package/lib/tools/auth0/handlers/clients.d.ts +43 -8
- package/lib/tools/auth0/handlers/clients.js +106 -35
- package/lib/tools/auth0/handlers/connectionProfiles.js +0 -3
- package/lib/tools/auth0/handlers/connections.d.ts +5 -6
- package/lib/tools/auth0/handlers/connections.js +34 -49
- package/lib/tools/auth0/handlers/customDomains.d.ts +4 -0
- package/lib/tools/auth0/handlers/customDomains.js +6 -3
- package/lib/tools/auth0/handlers/databases.d.ts +57 -0
- package/lib/tools/auth0/handlers/databases.js +52 -2
- package/lib/tools/auth0/handlers/default.js +2 -4
- package/lib/tools/auth0/handlers/flowVaultConnections.js +6 -3
- package/lib/tools/auth0/handlers/flows.js +0 -3
- package/lib/tools/auth0/handlers/forms.js +0 -3
- package/lib/tools/auth0/handlers/logStreams.js +0 -3
- package/lib/tools/auth0/handlers/organizations.d.ts +4 -1
- package/lib/tools/auth0/handlers/organizations.js +61 -32
- package/lib/tools/auth0/handlers/prompts.d.ts +2 -2
- package/lib/tools/auth0/handlers/prompts.js +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -3
- package/lib/tools/auth0/handlers/resourceServers.js +4 -4
- package/lib/tools/auth0/handlers/roles.js +6 -3
- package/lib/tools/auth0/handlers/scimHandler.d.ts +5 -8
- package/lib/tools/auth0/handlers/scimHandler.js +13 -13
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +0 -3
- package/package.json +8 -8
|
@@ -49,7 +49,7 @@ class ScimHandler {
|
|
|
49
49
|
if (!this.isScimStrategy(connection.strategy))
|
|
50
50
|
return Promise.resolve(null);
|
|
51
51
|
this.idMap.set(connection.id, { strategy: connection.strategy });
|
|
52
|
-
return this.getScimConfiguration(
|
|
52
|
+
return this.getScimConfiguration(connection.id)
|
|
53
53
|
.then((response) => {
|
|
54
54
|
const scimConfiguration = response;
|
|
55
55
|
if (scimConfiguration) {
|
|
@@ -156,7 +156,7 @@ class ScimHandler {
|
|
|
156
156
|
/**
|
|
157
157
|
* Creates a new `SCIM` configuration.
|
|
158
158
|
*/
|
|
159
|
-
async createScimConfiguration(
|
|
159
|
+
async createScimConfiguration(id,
|
|
160
160
|
// eslint-disable-next-line camelcase
|
|
161
161
|
{ user_id_attribute, mapping }) {
|
|
162
162
|
logger_1.default.debug(`Creating SCIM configuration on connection ${id}`);
|
|
@@ -165,14 +165,14 @@ class ScimHandler {
|
|
|
165
165
|
/**
|
|
166
166
|
* Retrieves `SCIM` configuration of an enterprise connection.
|
|
167
167
|
*/
|
|
168
|
-
async getScimConfiguration(
|
|
168
|
+
async getScimConfiguration(id) {
|
|
169
169
|
logger_1.default.debug(`Getting SCIM configuration from connection ${id}`);
|
|
170
170
|
return this.withErrorHandling(async () => this.connectionsManager.scimConfiguration.get(id), 'get', id);
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
173
|
* Updates an existing `SCIM` configuration.
|
|
174
174
|
*/
|
|
175
|
-
async updateScimConfiguration(
|
|
175
|
+
async updateScimConfiguration(id,
|
|
176
176
|
// eslint-disable-next-line camelcase
|
|
177
177
|
{ user_id_attribute, mapping }) {
|
|
178
178
|
logger_1.default.debug(`Updating SCIM configuration on connection ${id}`);
|
|
@@ -181,19 +181,19 @@ class ScimHandler {
|
|
|
181
181
|
/**
|
|
182
182
|
* Deletes an existing `SCIM` configuration.
|
|
183
183
|
*/
|
|
184
|
-
async deleteScimConfiguration(
|
|
184
|
+
async deleteScimConfiguration(id) {
|
|
185
185
|
logger_1.default.debug(`Deleting SCIM configuration on connection ${id}`);
|
|
186
186
|
return this.withErrorHandling(async () => this.connectionsManager.scimConfiguration.delete(id), 'delete', id);
|
|
187
187
|
}
|
|
188
|
-
async updateOverride(
|
|
188
|
+
async updateOverride(connectionId, bodyParams) {
|
|
189
189
|
// Extract `scim_configuration` from `bodyParams`.
|
|
190
190
|
// Remove `scim_configuration` from `bodyParams`, because `connections.update` doesn't accept it.
|
|
191
191
|
const { scim_configuration: scimBodyParams } = bodyParams;
|
|
192
192
|
delete bodyParams.scim_configuration;
|
|
193
193
|
delete bodyParams.directory_provisioning_configuration;
|
|
194
194
|
// First, update `connections`.
|
|
195
|
-
const updated = await this.connectionsManager.update(
|
|
196
|
-
const idMapEntry = this.idMap.get(
|
|
195
|
+
const updated = await this.connectionsManager.update(connectionId, bodyParams);
|
|
196
|
+
const idMapEntry = this.idMap.get(connectionId);
|
|
197
197
|
// Now, update `scim_configuration` inside the updated connection.
|
|
198
198
|
// If `scim_configuration` exists in both local and remote -> updateScimConfiguration(...)
|
|
199
199
|
// If `scim_configuration` exists in remote but local -> deleteScimConfiguration(...)
|
|
@@ -201,20 +201,20 @@ class ScimHandler {
|
|
|
201
201
|
if (idMapEntry?.scimConfiguration) {
|
|
202
202
|
if (scimBodyParams) {
|
|
203
203
|
if (this.scimScopes.update) {
|
|
204
|
-
await this.updateScimConfiguration(
|
|
204
|
+
await this.updateScimConfiguration(connectionId, scimBodyParams);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
else if (this.config('AUTH0_ALLOW_DELETE')) {
|
|
208
208
|
if (this.scimScopes.delete) {
|
|
209
|
-
await this.deleteScimConfiguration(
|
|
209
|
+
await this.deleteScimConfiguration(connectionId);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
else {
|
|
213
|
-
logger_1.default.warn(`Skipping DELETE scim_configuration on \"${
|
|
213
|
+
logger_1.default.warn(`Skipping DELETE scim_configuration on \"${connectionId}\". Enable deletes by setting \"AUTH0_ALLOW_DELETE\" to true in your config.`);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
else if (scimBodyParams && this.scimScopes.create) {
|
|
217
|
-
await this.createScimConfiguration(
|
|
217
|
+
await this.createScimConfiguration(connectionId, scimBodyParams);
|
|
218
218
|
}
|
|
219
219
|
// Return response from connections.update(...).
|
|
220
220
|
return updated;
|
|
@@ -229,7 +229,7 @@ class ScimHandler {
|
|
|
229
229
|
const data = await this.connectionsManager.create(bodyParams);
|
|
230
230
|
if (data?.id && scimBodyParams && this.scimScopes.create) {
|
|
231
231
|
// Now, create the `scim_configuration` for newly created `connection`.
|
|
232
|
-
await this.createScimConfiguration(
|
|
232
|
+
await this.createScimConfiguration(data.id, scimBodyParams);
|
|
233
233
|
}
|
|
234
234
|
// Return response from connections.create(...).
|
|
235
235
|
return data;
|
|
@@ -256,9 +256,6 @@ class UserAttributeProfilesHandler extends default_1.default {
|
|
|
256
256
|
id: 'id',
|
|
257
257
|
identifiers: ['id', 'name'],
|
|
258
258
|
stripUpdateFields: ['id'],
|
|
259
|
-
functions: {
|
|
260
|
-
update: async (params, payload) => this.client.userAttributeProfiles.update(params?.id, payload),
|
|
261
|
-
},
|
|
262
259
|
});
|
|
263
260
|
}
|
|
264
261
|
async getType() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.26.0",
|
|
4
4
|
"description": "A command line tool for deploying updates to your Auth0 tenant",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ajv": "^6.12.6",
|
|
36
|
-
"auth0": "^5.
|
|
36
|
+
"auth0": "^5.3.0",
|
|
37
37
|
"dot-prop": "^5.3.0",
|
|
38
38
|
"fs-extra": "^10.1.0",
|
|
39
39
|
"js-yaml": "^4.1.1",
|
|
40
|
-
"lodash": "^4.17.
|
|
40
|
+
"lodash": "^4.17.23",
|
|
41
41
|
"mkdirp": "^1.0.4",
|
|
42
42
|
"nconf": "^0.13.0",
|
|
43
43
|
"promise-pool-executor": "^1.1.1",
|
|
44
44
|
"sanitize-filename": "^1.6.3",
|
|
45
|
-
"undici": "^7.
|
|
45
|
+
"undici": "^7.19.2",
|
|
46
46
|
"winston": "^3.19.0",
|
|
47
47
|
"yargs": "^15.4.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "^9.0.13",
|
|
51
|
-
"@types/lodash": "^4.17.
|
|
51
|
+
"@types/lodash": "^4.17.23",
|
|
52
52
|
"@types/mocha": "^10.0.10",
|
|
53
53
|
"@types/nconf": "^0.10.7",
|
|
54
54
|
"@eslint/js": "^9.39.2",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
56
|
-
"@typescript-eslint/parser": "^8.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
56
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"chai-as-promised": "^7.1.2",
|
|
59
59
|
"eslint": "^9.39.2",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"rmdir-sync": "^1.0.1",
|
|
73
73
|
"sinon": "^13.0.2",
|
|
74
74
|
"sinon-chai": "^3.7.0",
|
|
75
|
-
"ts-mocha": "^
|
|
75
|
+
"ts-mocha": "^11.1.0",
|
|
76
76
|
"typescript": "^5.9.3"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|