auth0-deploy-cli
Advanced tools
Comparing version 7.14.0 to 7.14.1
@@ -10,2 +10,8 @@ # Changelog | ||
## [7.14.1] - 2022-06-29 | ||
### Fixed | ||
- Reverting unreplaced keyword mapping detection that would trigger some false-positives [#597] | ||
## [7.14.0] - 2022-06-27 | ||
@@ -794,3 +800,5 @@ | ||
[#592]: https://github.com/auth0/auth0-deploy-cli/issues/592 | ||
[unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v7.14.0...HEAD | ||
[#597]: https://github.com/auth0/auth0-deploy-cli/issues/597 | ||
[unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v7.14.1...HEAD | ||
[7.14.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.14.0...v7.14.1 | ||
[7.14.0]: https://github.com/auth0/auth0-deploy-cli/compare/v7.13.1...v7.14.0 | ||
@@ -797,0 +805,0 @@ [7.13.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.13.0...v7.13.1 |
import { ImportParams } from '../args'; | ||
import { Assets } from '../types'; | ||
export default function importCMD(params: ImportParams): Promise<void>; | ||
export declare const findUnreplacedKeywords: (assets: Assets) => void; |
@@ -15,3 +15,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findUnreplacedKeywords = void 0; | ||
const nconf_1 = __importDefault(require("nconf")); | ||
@@ -45,3 +44,3 @@ const configFactory_1 = require("../configFactory"); | ||
config.setProvider((key) => nconf_1.default.get(key)); | ||
(0, exports.findUnreplacedKeywords)(context.assets); | ||
//@ts-ignore because context and assets still need to be typed TODO: type assets and type context | ||
yield (0, tools_1.deploy)(context.assets, context.mgmtClient, config); | ||
@@ -52,35 +51,1 @@ logger_1.default.info('Import Successful'); | ||
exports.default = importCMD; | ||
const findUnreplacedKeywords = (assets) => { | ||
const recursiveFindUnreplacedKeywords = (target) => { | ||
let unreplaced = []; | ||
if (target === undefined || target === null) | ||
return []; | ||
if (Array.isArray(target)) { | ||
target.forEach((child) => { | ||
unreplaced.push(...recursiveFindUnreplacedKeywords(child)); | ||
}); | ||
} | ||
else if (typeof target === 'object') { | ||
Object.values(target).forEach((child) => { | ||
unreplaced.push(...recursiveFindUnreplacedKeywords(child)); | ||
}); | ||
} | ||
if (typeof target === 'string') { | ||
const arrayMatches = target.match(/(?<=@@).*(?=@@)/g); | ||
if (arrayMatches !== null) { | ||
return arrayMatches; | ||
} | ||
const keywordMatches = target.match(/(?<=##).*(?=##)/g); | ||
if (keywordMatches !== null) { | ||
return keywordMatches; | ||
} | ||
} | ||
return unreplaced; | ||
}; | ||
const unreplacedKeywords = recursiveFindUnreplacedKeywords(assets); | ||
if (unreplacedKeywords.length > 0) { | ||
throw `Unreplaced keywords found: ${unreplacedKeywords.join(', ')}. Either correct these values or add to AUTH0_KEYWORD_REPLACE_MAPPINGS configuration.`; | ||
} | ||
return; | ||
}; | ||
exports.findUnreplacedKeywords = findUnreplacedKeywords; |
{ | ||
"name": "auth0-deploy-cli", | ||
"version": "7.14.0", | ||
"version": "7.14.1", | ||
"description": "A command line tool for deploying updates to your Auth0 tenant", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
647888
12992