From 7f6702c2c352d62b14d6c5bdfd446557826e0aa6 Mon Sep 17 00:00:00 2001 From: Chris Geihsler Date: Mon, 10 May 2021 17:40:45 -0400 Subject: [PATCH 1/3] fix: skip actions if the api2_enable_actions flag is disabled --- src/auth0/handlers/actions.js | 287 +++++++++++++++++-------- src/auth0/handlers/triggers.js | 86 ++++++-- tests/auth0/handlers/actions.tests.js | 96 ++++++--- tests/auth0/handlers/triggers.tests.js | 56 ++++- 4 files changed, 384 insertions(+), 141 deletions(-) diff --git a/src/auth0/handlers/actions.js b/src/auth0/handlers/actions.js index ab72bd3..031662d 100644 --- a/src/auth0/handlers/actions.js +++ b/src/auth0/handlers/actions.js @@ -57,7 +57,9 @@ export const schema = { } }; -function wait(n) { return new Promise(resolve => setTimeout(resolve, n)); } +function wait(n) { + return new Promise(resolve => setTimeout(resolve, n)); +} function mapSecrets(secrets) { if (secrets) { @@ -67,7 +69,7 @@ function mapSecrets(secrets) { function mapDeployedVersion(deployedVersion) { if (deployedVersion) { - return ({ ...deployedVersion, secrets: mapSecrets(deployedVersion.secrets) }); + return { ...deployedVersion, secrets: mapSecrets(deployedVersion.secrets) }; } } @@ -76,15 +78,27 @@ function mapAction(action, deployedVersion) { ...action, code: deployedVersion ? deployedVersion.code : action.code, deployed: !!deployedVersion, - secrets: deployedVersion ? mapSecrets(deployedVersion.secrets) : mapSecrets(action.secrets), - dependencies: deployedVersion ? deployedVersion.dependencies : action.dependencies, + secrets: deployedVersion + ? mapSecrets(deployedVersion.secrets) + : mapSecrets(action.secrets), + dependencies: deployedVersion + ? deployedVersion.dependencies + : action.dependencies, status: deployedVersion ? deployedVersion.status : action.status, deployed_version: mapDeployedVersion(deployedVersion) }; } -async function waitUntilVersionIsDeployed(client, actionId, versionId, retries) { - const version = await client.actions.getVersion({ action_id: actionId, version_id: versionId }); +async function waitUntilVersionIsDeployed( + client, + actionId, + versionId, + retries +) { + const version = await client.actions.getVersion({ + action_id: actionId, + version_id: versionId + }); if (retries > 0 && !version.deployed) { await wait(1000); await waitUntilVersionIsDeployed(client, actionId, versionId, retries - 1); @@ -95,6 +109,13 @@ async function waitUntilVersionIsDeployed(client, actionId, versionId, retries) } } +function isActionsDisabled(err) { + const errorBody = _.get(err, 'originalError.response.body') || {}; + + return ( + err.statusCode === 403 && errorBody.errorCode === 'feature_not_enabled' + ); +} export default class ActionHandler extends DefaultHandler { constructor(options) { @@ -115,11 +136,18 @@ export default class ActionHandler extends DefaultHandler { } try { - return await this.client.actions.getVersions({ action_id: actionId, version_id: deployedVersion.id }); + return await this.client.actions.getVersions({ + action_id: actionId, + version_id: deployedVersion.id + }); } catch (err) { if (err.statusCode === 404 || err.statusCode === 501) { return null; } + if (isActionsDisabled(err)) { + log.info('Skipping actions because it is not enabled.'); + return []; + } throw err; } } @@ -130,7 +158,10 @@ export default class ActionHandler extends DefaultHandler { } // in case client version does not support actions - if (!this.client.actions || typeof this.client.actions.getAll !== 'function') { + if ( + !this.client.actions + || typeof this.client.actions.getAll !== 'function' + ) { return []; } @@ -138,28 +169,44 @@ export default class ActionHandler extends DefaultHandler { const actions = await this.client.actions.getAll(); // need to get complete current version for each action // the deployed_version inside the action doesn't have all the necessary information - this.existing = await Promise.all(actions.actions.map(action => this.getVersionById(action.id, action.deployed_version) - .then(async deployedVersion => mapAction(action, deployedVersion)))); + this.existing = await Promise.all( + actions.actions.map(action => this.getVersionById(action.id, action.deployed_version).then( + async deployedVersion => mapAction(action, deployedVersion) + )) + ); return this.existing; } catch (err) { if (err.statusCode === 404 || err.statusCode === 501) { return null; } + + if (isActionsDisabled(err)) { + log.info('Skipping actions because it is not enabled.'); + return []; + } + throw err; } } - async createVersion(version) { const actionId = version.action_id; const versionToCreate = { code: version.code, dependencies: version.dependencies }; - const newVersion = await this.client.actions.createVersion({ action_id: actionId }, versionToCreate); + const newVersion = await this.client.actions.createVersion( + { action_id: actionId }, + versionToCreate + ); // wait WAIT_FOR_DEPLOY seconds for version deploy, if can't deploy an error will arise - await waitUntilVersionIsDeployed(this.client, actionId, newVersion.id, WAIT_FOR_DEPLOY); + await waitUntilVersionIsDeployed( + this.client, + actionId, + newVersion.id, + WAIT_FOR_DEPLOY + ); // Update draft version await this.client.actions.update({ action_id: actionId }, versionToCreate); @@ -178,7 +225,13 @@ export default class ActionHandler extends DefaultHandler { }; if (existingVersion) { // name or secrets modifications are not supported yet - if (actionAsset.code !== existingVersion.code || !areArraysEquals(actionAsset.dependencies, existingVersion.dependencies)) { + if ( + actionAsset.code !== existingVersion.code + || !areArraysEquals( + actionAsset.dependencies, + existingVersion.dependencies + ) + ) { create.push(versionToCreate); } } else { @@ -192,30 +245,40 @@ export default class ActionHandler extends DefaultHandler { } async createVersions(creates) { - await this.client.pool.addEachTask({ - data: creates || [], - generator: item => this.createVersion(item).then((data) => { - this.didCreate({ version_id: data.id }); - this.created += 1; - }).catch((err) => { - throw new Error(`Problem creating ${this.type} ${this.objString(item)}\n${err}`); + await this.client.pool + .addEachTask({ + data: creates || [], + generator: item => this.createVersion(item) + .then((data) => { + this.didCreate({ version_id: data.id }); + this.created += 1; + }) + .catch((err) => { + throw new Error( + `Problem creating ${this.type} ${this.objString(item)}\n${err}` + ); + }) }) - }).promise(); + .promise(); } async processVersionsChanges(changes) { - log.info(`Start processChanges for action versions [create:${changes.create.length}]`); + log.info( + `Start processChanges for action versions [create:${changes.create.length}]` + ); const myChanges = [ { create: changes.create } ]; - await Promise.all(myChanges.map(async (change) => { - switch (true) { - case change.create && change.create.length > 0: - await this.createVersions(changes.create); - break; - default: - break; - } - })); + await Promise.all( + myChanges.map(async (change) => { + switch (true) { + case change.create && change.create.length > 0: + await this.createVersions(changes.create); + break; + default: + break; + } + }) + ); } async actionChanges(action, found) { @@ -254,25 +317,33 @@ export default class ActionHandler extends DefaultHandler { // if action.deployed is true an actionVersion should be created if (action.deployed) { - await this.createVersions([ { - code: action.code, - dependencies: action.dependencies, - action_id: created.id - } ]); + await this.createVersions([ + { + code: action.code, + dependencies: action.dependencies, + action_id: created.id + } + ]); } return created; } async createActions(creates) { - await this.client.pool.addEachTask({ - data: creates || [], - generator: item => this.createAction(item).then((data) => { - this.didCreate({ action_id: data.id }); - this.created += 1; - }).catch((err) => { - throw new Error(`Problem creating ${this.type} ${this.objString(item)}\n${err}`); + await this.client.pool + .addEachTask({ + data: creates || [], + generator: item => this.createAction(item) + .then((data) => { + this.didCreate({ action_id: data.id }); + this.created += 1; + }) + .catch((err) => { + throw new Error( + `Problem creating ${this.type} ${this.objString(item)}\n${err}` + ); + }) }) - }).promise(); + .promise(); } async deleteAction(action) { @@ -281,16 +352,27 @@ export default class ActionHandler extends DefaultHandler { } async deleteActions(dels) { - if (this.config('AUTH0_ALLOW_DELETE') === 'true' || this.config('AUTH0_ALLOW_DELETE') === true) { - await this.client.pool.addEachTask({ - data: dels || [], - generator: action => this.deleteAction(action).then(() => { - this.didDelete({ action_id: action.id }); - this.deleted += 1; - }).catch((err) => { - throw new Error(`Problem deleting ${this.type} ${this.objString({ action_id: action.id })}\n${err}`); + if ( + this.config('AUTH0_ALLOW_DELETE') === 'true' + || this.config('AUTH0_ALLOW_DELETE') === true + ) { + await this.client.pool + .addEachTask({ + data: dels || [], + generator: action => this.deleteAction(action) + .then(() => { + this.didDelete({ action_id: action.id }); + this.deleted += 1; + }) + .catch((err) => { + throw new Error( + `Problem deleting ${this.type} ${this.objString({ + action_id: action.id + })}\n${err}` + ); + }) }) - }).promise(); + .promise(); } else { log.warn(`Detected the following actions should be deleted. Doing so may be destructive.\nYou can enable deletes by setting 'AUTH0_ALLOW_DELETE' to true in the config \n${dels.map(i => this.objString(i)).join('\n')}`); @@ -298,9 +380,15 @@ export default class ActionHandler extends DefaultHandler { } async updateAction(action, existing) { - const found = existing.find(existingAction => existingAction.name === action.name); + const found = existing.find( + existingAction => existingAction.name === action.name + ); // update current version - const currentVersionChanges = await this.calcDeployedVersionChanges(found.id, action, found.deployed_version); + const currentVersionChanges = await this.calcDeployedVersionChanges( + found.id, + action, + found.deployed_version + ); if (currentVersionChanges.create.length > 0) { await this.processVersionsChanges(currentVersionChanges); } @@ -313,15 +401,21 @@ export default class ActionHandler extends DefaultHandler { } async updateActions(updates, actions) { - await this.client.pool.addEachTask({ - data: updates || [], - generator: item => this.updateAction(item, actions).then((data) => { - this.didUpdate({ action_id: data.id }); - this.updated += 1; - }).catch((err) => { - throw new Error(`Problem updating ${this.type} ${this.objString(item)}\n${err}`); + await this.client.pool + .addEachTask({ + data: updates || [], + generator: item => this.updateAction(item, actions) + .then((data) => { + this.didUpdate({ action_id: data.id }); + this.updated += 1; + }) + .catch((err) => { + throw new Error( + `Problem updating ${this.type} ${this.objString(item)}\n${err}` + ); + }) }) - }).promise(); + .promise(); } async calcChanges(actionsAssets, existing) { @@ -330,15 +424,26 @@ export default class ActionHandler extends DefaultHandler { let del = [ ...existing ]; const create = []; actionsAssets.forEach(async (action) => { - const found = existing.find(existingAction => existingAction.name === action.name); + const found = existing.find( + existingAction => existingAction.name === action.name + ); if (found) { del = del.filter(e => e.id !== found.id); // current version changes - const currentVersionChanges = await this.calcDeployedVersionChanges(found.id, action, found.deployed_version); - if (action.code !== found.code - || !areArraysEquals(action.dependencies, found.dependencies) - || !areArraysEquals(action.supported_triggers, found.supported_triggers) - || currentVersionChanges.create.length > 0) { + const currentVersionChanges = await this.calcDeployedVersionChanges( + found.id, + action, + found.deployed_version + ); + if ( + action.code !== found.code + || !areArraysEquals(action.dependencies, found.dependencies) + || !areArraysEquals( + action.supported_triggers, + found.supported_triggers + ) + || currentVersionChanges.create.length > 0 + ) { update.push(action); } } else { @@ -366,22 +471,30 @@ export default class ActionHandler extends DefaultHandler { const changes = await this.calcChanges(actions, existing); - log.info(`Start processChanges for actions [delete:${changes.del.length}] [update:${changes.update.length}], [create:${changes.create.length}]`); - const myChanges = [ { del: changes.del }, { create: changes.create }, { update: changes.update } ]; - await Promise.all(myChanges.map(async (change) => { - switch (true) { - case change.del && change.del.length > 0: - await this.deleteActions(change.del); - break; - case change.create && change.create.length > 0: - await this.createActions(changes.create); - break; - case change.update && change.update.length > 0: - await this.updateActions(change.update, existing); - break; - default: - break; - } - })); + log.info( + `Start processChanges for actions [delete:${changes.del.length}] [update:${changes.update.length}], [create:${changes.create.length}]` + ); + const myChanges = [ + { del: changes.del }, + { create: changes.create }, + { update: changes.update } + ]; + await Promise.all( + myChanges.map(async (change) => { + switch (true) { + case change.del && change.del.length > 0: + await this.deleteActions(change.del); + break; + case change.create && change.create.length > 0: + await this.createActions(changes.create); + break; + case change.update && change.update.length > 0: + await this.updateActions(change.update, existing); + break; + default: + break; + } + }) + ); } } diff --git a/src/auth0/handlers/triggers.js b/src/auth0/handlers/triggers.js index defb1a9..ef6c315 100644 --- a/src/auth0/handlers/triggers.js +++ b/src/auth0/handlers/triggers.js @@ -21,6 +21,14 @@ export const schema = { } }; +function isActionsDisabled(err) { + const errorBody = _.get(err, 'originalError.response.body') || {}; + + return ( + err.statusCode === 403 && errorBody.errorCode === 'feature_not_enabled' + ); +} + export default class TriggersHandler extends DefaultHandler { constructor(options) { super({ @@ -50,8 +58,13 @@ export default class TriggersHandler extends DefaultHandler { for (let i = 0; i < triggers.length; i++) { const triggerId = triggers[i]; - const { bindings } = await this.client.actions.getTriggerBindings({ trigger_id: triggerId }); - triggerBindings[triggerId] = bindings.map(binding => ({ action_name: binding.action.name, display_name: binding.display_name })); + const { bindings } = await this.client.actions.getTriggerBindings({ + trigger_id: triggerId + }); + triggerBindings[triggerId] = bindings.map(binding => ({ + action_name: binding.action.name, + display_name: binding.display_name + })); } this.existing = triggerBindings; @@ -60,13 +73,22 @@ export default class TriggersHandler extends DefaultHandler { if (err.statusCode === 404 || err.statusCode === 501) { return null; } + + if (isActionsDisabled(err)) { + log.info('Skipping triggers because Actions is not enabled.'); + return []; + } + throw err; } } async updateTrigger(updates) { const triggerId = updates.trigger_id; - const bindings = updates.bindings.map(binding => ({ ref: { type: 'action_name', value: binding.action_name }, display_name: binding.display_name })); + const bindings = updates.bindings.map(binding => ({ + ref: { type: 'action_name', value: binding.action_name }, + display_name: binding.display_name + })); const data = { bindings: bindings }; const params = { trigger_id: triggerId }; try { @@ -75,21 +97,31 @@ export default class TriggersHandler extends DefaultHandler { if (err.statusCode === 404 || err.statusCode === 501) { return null; } + if (isActionsDisabled(err)) { + log.info('Skipping triggers because Actions is not enabled.'); + return []; + } throw err; } return triggerId; } async updateTriggers(updates) { - await this.client.pool.addEachTask({ - data: updates || [], - generator: item => this.updateTrigger(item).then((triggerId) => { - this.didUpdate({ trigger: triggerId }); - this.updated += 1; - }).catch((err) => { - throw new Error(`Problem updating ${this.type} ${this.objString(item)}\n${err}`); + await this.client.pool + .addEachTask({ + data: updates || [], + generator: item => this.updateTrigger(item) + .then((triggerId) => { + this.didUpdate({ trigger: triggerId }); + this.updated += 1; + }) + .catch((err) => { + throw new Error( + `Problem updating ${this.type} ${this.objString(item)}\n${err}` + ); + }) }) - }).promise(); + .promise(); } async calcChanges(triggerId, bindings, existing) { @@ -116,19 +148,27 @@ export default class TriggersHandler extends DefaultHandler { /* eslint-disable guard-for-in */ /* eslint-disable no-restricted-syntax */ for (const triggerId in existing) { - const changes = await this.calcChanges(triggerId, triggers[triggerId], existing[triggerId]); - - log.info(`Start processChanges for trigger ${triggerId} [update:${changes.update.length}]`); + const changes = await this.calcChanges( + triggerId, + triggers[triggerId], + existing[triggerId] + ); + + log.info( + `Start processChanges for trigger ${triggerId} [update:${changes.update.length}]` + ); const myChanges = [ { update: changes.update } ]; - await Promise.all(myChanges.map(async (change) => { - switch (true) { - case change.update && change.update.length > 0: - await this.updateTriggers(change.update); - break; - default: - break; - } - })); + await Promise.all( + myChanges.map(async (change) => { + switch (true) { + case change.update && change.update.length > 0: + await this.updateTriggers(change.update); + break; + default: + break; + } + }) + ); } } } diff --git a/tests/auth0/handlers/actions.tests.js b/tests/auth0/handlers/actions.tests.js index 6e549d9..ced0555 100644 --- a/tests/auth0/handlers/actions.tests.js +++ b/tests/auth0/handlers/actions.tests.js @@ -32,21 +32,26 @@ describe('#actions handler', () => { const data = [ { name: 'actions-one', - supported_triggers: [ { - id: 'post-login', - version: 'v1' - } ] + supported_triggers: [ + { + id: 'post-login', + version: 'v1' + } + ] }, { name: 'actions-one', - supported_triggers: [ { - id: 'credentials-exchange', - version: 'v1' - } ] + supported_triggers: [ + { + id: 'credentials-exchange', + version: 'v1' + } + ] } ]; - stageFn.apply(handler, [ { actions: data } ]) + stageFn + .apply(handler, [ { actions: data } ]) .then(() => done(new Error('Expecting error'))) .catch((err) => { expect(err).to.be.an('object'); @@ -67,10 +72,12 @@ describe('#actions handler', () => { const data = [ { name: 'action-one', - supported_triggers: [ { - id: 'post-login', - version: 'v1' - } ], + supported_triggers: [ + { + id: 'post-login', + version: 'v1' + } + ], deployed_version: { code: 'some code', dependencies: [], @@ -80,12 +87,14 @@ describe('#actions handler', () => { }, { name: 'action-two', - supported_triggers: [ { - id: 'post-login', - version: 'v1' - } ], + supported_triggers: [ + { + id: 'post-login', + version: 'v1' + } + ], deployed_version: { - code: '/** @type {PostLoginAction} */\nmodule.exports = async (event, context) => {\n console.log(\'new version\');\n return {};\n };\n ', + code: "/** @type {PostLoginAction} */\nmodule.exports = async (event, context) => {\n console.log('new version');\n return {};\n };\n ", dependencies: [], secrets: [], runtime: 'node12' @@ -110,10 +119,12 @@ describe('#actions handler', () => { const actionId = 'new-action-id'; const action = { name: 'action-test', - supported_triggers: [ { - id: 'post-login', - version: 'v1' - } ], + supported_triggers: [ + { + id: 'post-login', + version: 'v1' + } + ], deployed_version: { code: 'some code', dependencies: [], @@ -143,7 +154,15 @@ describe('#actions handler', () => { return Promise.resolve({ actions: [] }); } - return Promise.resolve({ actions: [ { name: action.name, supported_triggers: action.supported_triggers, id: actionId } ] }); + return Promise.resolve({ + actions: [ + { + name: action.name, + supported_triggers: action.supported_triggers, + id: actionId + } + ] + }); }, createVersion: () => Promise.resolve(version) }, @@ -200,7 +219,9 @@ describe('#actions handler', () => { const handler = new actions.default({ client: auth0, config }); const data = await handler.getType(); - expect(data).to.deep.equal([ { ...actionsData[0], deployed: true, deployed_version: version } ]); + expect(data).to.deep.equal([ + { ...actionsData[0], deployed: true, deployed_version: version } + ]); }); it('should return an null for 501 status code', async () => { @@ -237,6 +258,30 @@ describe('#actions handler', () => { expect(data).to.deep.equal(null); }); + it('should return an empty array when the feature flag is disabled', async () => { + const auth0 = { + actions: { + getAll: () => { + const error = new Error('Not enabled'); + error.statusCode = 403; + error.originalError = { + response: { + body: { + errorCode: 'feature_not_enabled' + } + } + }; + throw error; + } + }, + pool + }; + + const handler = new actions.default({ client: auth0, config }); + const data = await handler.getType(); + expect(data).to.deep.equal([]); + }); + it('should throw an error for all other failed requests', async () => { const auth0 = { actions: { @@ -283,8 +328,7 @@ describe('#actions handler', () => { }), getVersion: () => Promise.resolve({ action: {}, - code: - '/** @type {PostLoginAction} */\nmodule.exports = async (event, context) => {\n console.log(\'new version\');\n return {};\n };\n ', + code: "/** @type {PostLoginAction} */\nmodule.exports = async (event, context) => {\n console.log('new version');\n return {};\n };\n ", dependencies: [], runtime: 'node12', id: '0906fe5b-f4d6-44ec-a8f1-3c05fc186483', diff --git a/tests/auth0/handlers/triggers.tests.js b/tests/auth0/handlers/triggers.tests.js index f1ae002..cc7d29e 100644 --- a/tests/auth0/handlers/triggers.tests.js +++ b/tests/auth0/handlers/triggers.tests.js @@ -26,7 +26,9 @@ describe('#triggers handler', () => { const handler = new triggers.default({ client: auth0, config }); const stageFn = Object.getPrototypeOf(handler).validate; const data = { - 'post-login': [ { action_name: 'action-one', display_name: 'dysplay-name' } ], + 'post-login': [ + { action_name: 'action-one', display_name: 'dysplay-name' } + ], 'credentials-exchange': [], 'pre-user-registration': [], 'post-user-registration': [], @@ -41,7 +43,9 @@ describe('#triggers handler', () => { describe('#triggers process', () => { it('should bind a trigger', async () => { const triggersBindings = { - 'post-login': [ { action_name: 'action-one', display_name: 'dysplay-name' } ], + 'post-login': [ + { action_name: 'action-one', display_name: 'dysplay-name' } + ], 'credentials-exchange': [], 'pre-user-registration': [], 'post-user-registration': [], @@ -66,7 +70,9 @@ describe('#triggers handler', () => { it('should get all triggers', async () => { const triggersBindings = { - 'post-login': [ { action_name: 'action-one', display_name: 'display-name' } ], + 'post-login': [ + { action_name: 'action-one', display_name: 'display-name' } + ], 'credentials-exchange': [], 'pre-user-registration': [], 'post-user-registration': [], @@ -76,12 +82,28 @@ describe('#triggers handler', () => { const auth0 = { actions: { - getAllTriggers: () => Promise.resolve({ triggers: [ { id: 'post-login' }, { id: 'credentials-exchange' }, { id: 'pre-user-registration' }, { id: 'post-user-registration' }, { id: 'post-change-password' }, { id: 'send-phone-message' } ] }), + getAllTriggers: () => Promise.resolve({ + triggers: [ + { id: 'post-login' }, + { id: 'credentials-exchange' }, + { id: 'pre-user-registration' }, + { id: 'post-user-registration' }, + { id: 'post-change-password' }, + { id: 'send-phone-message' } + ] + }), getTriggerBindings: (params) => { let res = {}; switch (params.trigger_id) { case 'post-login': - res = { bindings: [ { action: { name: 'action-one' }, display_name: 'display-name' } ] }; + res = { + bindings: [ + { + action: { name: 'action-one' }, + display_name: 'display-name' + } + ] + }; break; case 'credentials-exchange': res = { bindings: [] }; @@ -128,6 +150,30 @@ describe('#triggers handler', () => { expect(data).to.deep.equal([]); }); + it('should return an empty array when the feature flag is disabled', async () => { + const auth0 = { + actions: { + getAllTriggers: () => { + const error = new Error('Not enabled'); + error.statusCode = 403; + error.originalError = { + response: { + body: { + errorCode: 'feature_not_enabled' + } + } + }; + throw error; + } + }, + pool + }; + + const handler = new triggers.default({ client: auth0, config }); + const data = await handler.getType(); + expect(data).to.deep.equal([]); + }); + it('should throw an error for all other failed requests', async () => { const auth0 = { actions: { From 482654cb3334ac28cd79917754468bcc84f96a88 Mon Sep 17 00:00:00 2001 From: Chris Geihsler Date: Mon, 10 May 2021 17:41:12 -0400 Subject: [PATCH 2/3] chore: fix test:watch to run all test files --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54df693..5dfafe4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint:js": "eslint --ignore-path .gitignore --ignore-pattern webpack .", "lint:fix": "eslint --fix --ignore-path .gitignore --ignore-pattern webpack .", "test": "npm run test:pre && cross-env NODE_ENV=test nyc mocha tests/mocha.js './tests/**/*.tests.js'", - "test:watch": "cross-env NODE_ENV=test mocha tests/mocha.js ./tests/**/*.tests.js ./tests/*.tests.js --watch", + "test:watch": "cross-env NODE_ENV=test mocha tests/mocha.js './tests/**/*.tests.js' --watch", "test:pre": "npm run test:clean && npm run lint:js", "test:clean": "rimraf ./coverage && rimraf ./.nyc_output" }, From 7b08d47cd92f88528f1c81cd5585f9e2ada0ad5d Mon Sep 17 00:00:00 2001 From: Chris Geihsler Date: Tue, 11 May 2021 08:33:27 -0400 Subject: [PATCH 3/3] 5.8.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c119949..38cc8a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "auth0-source-control-extension-tools", - "version": "5.7.0", + "version": "5.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5dfafe4..f730924 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth0-source-control-extension-tools", - "version": "5.7.0", + "version": "5.8.0", "description": "Supporting tools for the Source Control extensions", "main": "lib/index.js", "scripts": {