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.
Files changed (30) hide show
  1. package/.github/workflows/claude-code-review.yml +1 -4
  2. package/CHANGELOG.md +30 -1
  3. package/lib/tools/auth0/handlers/actions.js +1 -1
  4. package/lib/tools/auth0/handlers/clientGrants.d.ts +5 -0
  5. package/lib/tools/auth0/handlers/clientGrants.js +18 -3
  6. package/lib/tools/auth0/handlers/clients.d.ts +43 -8
  7. package/lib/tools/auth0/handlers/clients.js +106 -35
  8. package/lib/tools/auth0/handlers/connectionProfiles.js +0 -3
  9. package/lib/tools/auth0/handlers/connections.d.ts +5 -6
  10. package/lib/tools/auth0/handlers/connections.js +34 -49
  11. package/lib/tools/auth0/handlers/customDomains.d.ts +4 -0
  12. package/lib/tools/auth0/handlers/customDomains.js +6 -3
  13. package/lib/tools/auth0/handlers/databases.d.ts +57 -0
  14. package/lib/tools/auth0/handlers/databases.js +52 -2
  15. package/lib/tools/auth0/handlers/default.js +2 -4
  16. package/lib/tools/auth0/handlers/flowVaultConnections.js +6 -3
  17. package/lib/tools/auth0/handlers/flows.js +0 -3
  18. package/lib/tools/auth0/handlers/forms.js +0 -3
  19. package/lib/tools/auth0/handlers/logStreams.js +0 -3
  20. package/lib/tools/auth0/handlers/organizations.d.ts +4 -1
  21. package/lib/tools/auth0/handlers/organizations.js +61 -32
  22. package/lib/tools/auth0/handlers/prompts.d.ts +2 -2
  23. package/lib/tools/auth0/handlers/prompts.js +1 -0
  24. package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -3
  25. package/lib/tools/auth0/handlers/resourceServers.js +4 -4
  26. package/lib/tools/auth0/handlers/roles.js +6 -3
  27. package/lib/tools/auth0/handlers/scimHandler.d.ts +5 -8
  28. package/lib/tools/auth0/handlers/scimHandler.js +13 -13
  29. package/lib/tools/auth0/handlers/userAttributeProfiles.js +0 -3
  30. 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({ id: connection.id })
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({ id },
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({ id, }) {
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({ id },
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({ id }) {
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(requestParams, bodyParams) {
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(requestParams.id, bodyParams);
196
- const idMapEntry = this.idMap.get(requestParams.id);
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(requestParams, scimBodyParams);
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(requestParams);
209
+ await this.deleteScimConfiguration(connectionId);
210
210
  }
211
211
  }
212
212
  else {
213
- logger_1.default.warn(`Skipping DELETE scim_configuration on \"${requestParams.id}\". Enable deletes by setting \"AUTH0_ALLOW_DELETE\" to true in your config.`);
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(requestParams, scimBodyParams);
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({ id: data.id }, scimBodyParams);
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.25.0",
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.2.0",
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.21",
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.18.0",
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.21",
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.52.0",
56
- "@typescript-eslint/parser": "^8.52.0",
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": "^10.1.0",
75
+ "ts-mocha": "^11.1.0",
76
76
  "typescript": "^5.9.3"
77
77
  },
78
78
  "engines": {