auth0-deploy-cli 7.14.0 → 7.14.1
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/CHANGELOG.md +9 -1
- package/lib/commands/import.d.ts +0 -2
- package/lib/commands/import.js +1 -36
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.14.1] - 2022-06-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Reverting unreplaced keyword mapping detection that would trigger some false-positives [#597]
|
|
15
|
+
|
|
10
16
|
## [7.14.0] - 2022-06-27
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -790,7 +796,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
790
796
|
[#590]: https://github.com/auth0/auth0-deploy-cli/issues/590
|
|
791
797
|
[#591]: https://github.com/auth0/auth0-deploy-cli/issues/591
|
|
792
798
|
[#592]: https://github.com/auth0/auth0-deploy-cli/issues/592
|
|
793
|
-
[
|
|
799
|
+
[#597]: https://github.com/auth0/auth0-deploy-cli/issues/597
|
|
800
|
+
[unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v7.14.1...HEAD
|
|
801
|
+
[7.14.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.14.0...v7.14.1
|
|
794
802
|
[7.14.0]: https://github.com/auth0/auth0-deploy-cli/compare/v7.13.1...v7.14.0
|
|
795
803
|
[7.13.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.13.0...v7.13.1
|
|
796
804
|
[7.13.0]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.3...v7.13.0
|
package/lib/commands/import.d.ts
CHANGED
package/lib/commands/import.js
CHANGED
|
@@ -12,7 +12,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.findUnreplacedKeywords = void 0;
|
|
16
15
|
const nconf_1 = __importDefault(require("nconf"));
|
|
17
16
|
const configFactory_1 = require("../configFactory");
|
|
18
17
|
const tools_1 = require("../tools");
|
|
@@ -41,43 +40,9 @@ function importCMD(params) {
|
|
|
41
40
|
yield context.load();
|
|
42
41
|
const config = (0, configFactory_1.configFactory)();
|
|
43
42
|
config.setProvider((key) => nconf_1.default.get(key));
|
|
44
|
-
|
|
43
|
+
//@ts-ignore because context and assets still need to be typed TODO: type assets and type context
|
|
45
44
|
yield (0, tools_1.deploy)(context.assets, context.mgmtClient, config);
|
|
46
45
|
logger_1.default.info('Import Successful');
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
exports.default = importCMD;
|
|
50
|
-
const findUnreplacedKeywords = (assets) => {
|
|
51
|
-
const recursiveFindUnreplacedKeywords = (target) => {
|
|
52
|
-
let unreplaced = [];
|
|
53
|
-
if (target === undefined || target === null)
|
|
54
|
-
return [];
|
|
55
|
-
if (Array.isArray(target)) {
|
|
56
|
-
target.forEach((child) => {
|
|
57
|
-
unreplaced.push(...recursiveFindUnreplacedKeywords(child));
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
else if (typeof target === 'object') {
|
|
61
|
-
Object.values(target).forEach((child) => {
|
|
62
|
-
unreplaced.push(...recursiveFindUnreplacedKeywords(child));
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
if (typeof target === 'string') {
|
|
66
|
-
const arrayMatches = target.match(/(?<=@@).*(?=@@)/g);
|
|
67
|
-
if (arrayMatches !== null) {
|
|
68
|
-
return arrayMatches;
|
|
69
|
-
}
|
|
70
|
-
const keywordMatches = target.match(/(?<=##).*(?=##)/g);
|
|
71
|
-
if (keywordMatches !== null) {
|
|
72
|
-
return keywordMatches;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return unreplaced;
|
|
76
|
-
};
|
|
77
|
-
const unreplacedKeywords = recursiveFindUnreplacedKeywords(assets);
|
|
78
|
-
if (unreplacedKeywords.length > 0) {
|
|
79
|
-
throw `Unreplaced keywords found: ${unreplacedKeywords.join(', ')}. Either correct these values or add to AUTH0_KEYWORD_REPLACE_MAPPINGS configuration.`;
|
|
80
|
-
}
|
|
81
|
-
return;
|
|
82
|
-
};
|
|
83
|
-
exports.findUnreplacedKeywords = findUnreplacedKeywords;
|