auth0-deploy-cli 7.4.0 → 7.5.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/.circleci/config.yml +15 -0
- package/.github/CODEOWNERS +1 -0
- package/.husky/pre-commit +2 -0
- package/.nyc_output/60b76a45-577b-4171-9982-a8e836ab7fd6.json +1 -0
- package/.nyc_output/processinfo/60b76a45-577b-4171-9982-a8e836ab7fd6.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +13 -1
- package/lib/args.js +89 -81
- package/lib/commands/export.js +51 -77
- package/lib/commands/import.js +45 -69
- package/lib/commands/index.js +11 -20
- package/lib/configFactory.js +19 -27
- package/lib/context/defaults.js +18 -41
- package/lib/context/directory/handlers/actions.js +77 -107
- package/lib/context/directory/handlers/attackProtection.js +59 -0
- package/lib/context/directory/handlers/clientGrants.js +45 -54
- package/lib/context/directory/handlers/clients.js +60 -79
- package/lib/context/directory/handlers/connections.js +65 -89
- package/lib/context/directory/handlers/databases.js +91 -123
- package/lib/context/directory/handlers/emailProvider.js +46 -57
- package/lib/context/directory/handlers/emailTemplates.js +67 -80
- package/lib/context/directory/handlers/guardianFactorProviders.js +41 -49
- package/lib/context/directory/handlers/guardianFactorTemplates.js +41 -49
- package/lib/context/directory/handlers/guardianFactors.js +41 -49
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +40 -50
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +40 -50
- package/lib/context/directory/handlers/guardianPolicies.js +40 -50
- package/lib/context/directory/handlers/hooks.js +55 -70
- package/lib/context/directory/handlers/index.js +53 -123
- package/lib/context/directory/handlers/migrations.js +36 -41
- package/lib/context/directory/handlers/organizations.js +54 -69
- package/lib/context/directory/handlers/pages.js +72 -86
- package/lib/context/directory/handlers/resourceServers.js +41 -49
- package/lib/context/directory/handlers/roles.js +49 -62
- package/lib/context/directory/handlers/rules.js +52 -68
- package/lib/context/directory/handlers/rulesConfigs.js +33 -32
- package/lib/context/directory/handlers/tenant.js +52 -47
- package/lib/context/directory/handlers/triggers.js +39 -54
- package/lib/context/directory/index.js +113 -101
- package/lib/context/index.js +96 -105
- package/lib/context/yaml/handlers/actions.js +71 -88
- package/lib/context/yaml/handlers/attackProtection.js +29 -0
- package/lib/context/yaml/handlers/clientGrants.js +36 -29
- package/lib/context/yaml/handlers/clients.js +61 -76
- package/lib/context/yaml/handlers/connections.js +76 -103
- package/lib/context/yaml/handlers/databases.js +64 -79
- package/lib/context/yaml/handlers/emailProvider.js +33 -30
- package/lib/context/yaml/handlers/emailTemplates.js +45 -54
- package/lib/context/yaml/handlers/guardianFactorProviders.js +27 -18
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +27 -18
- package/lib/context/yaml/handlers/guardianFactors.js +27 -18
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +27 -20
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +27 -20
- package/lib/context/yaml/handlers/guardianPolicies.js +27 -20
- package/lib/context/yaml/handlers/hooks.js +57 -67
- package/lib/context/yaml/handlers/index.js +53 -123
- package/lib/context/yaml/handlers/migrations.js +23 -24
- package/lib/context/yaml/handlers/organizations.js +40 -38
- package/lib/context/yaml/handlers/pages.js +49 -58
- package/lib/context/yaml/handlers/resourceServers.js +27 -18
- package/lib/context/yaml/handlers/roles.js +34 -24
- package/lib/context/yaml/handlers/rules.js +48 -58
- package/lib/context/yaml/handlers/rulesConfigs.js +27 -18
- package/lib/context/yaml/handlers/tenant.js +44 -30
- package/lib/context/yaml/handlers/triggers.js +32 -23
- package/lib/context/yaml/index.js +127 -142
- package/lib/index.js +73 -79
- package/lib/logger.js +18 -22
- package/lib/readonly.js +74 -66
- package/lib/tools/ValidationError.js +8 -13
- package/lib/tools/auth0/client.js +143 -133
- package/lib/tools/auth0/handlers/actions.js +231 -243
- package/lib/tools/auth0/handlers/attackProtection.js +86 -0
- package/lib/tools/auth0/handlers/branding.js +47 -46
- package/lib/tools/auth0/handlers/clientGrants.js +118 -116
- package/lib/tools/auth0/handlers/clients.js +72 -90
- package/lib/tools/auth0/handlers/connections.js +150 -118
- package/lib/tools/auth0/handlers/databases.js +127 -124
- package/lib/tools/auth0/handlers/default.js +186 -189
- package/lib/tools/auth0/handlers/emailProvider.js +67 -78
- package/lib/tools/auth0/handlers/emailTemplates.js +116 -92
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +66 -81
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +60 -71
- package/lib/tools/auth0/handlers/guardianFactors.js +56 -63
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +80 -79
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +77 -76
- package/lib/tools/auth0/handlers/guardianPolicies.js +59 -62
- package/lib/tools/auth0/handlers/hooks.js +201 -227
- package/lib/tools/auth0/handlers/index.js +53 -111
- package/lib/tools/auth0/handlers/migrations.js +99 -79
- package/lib/tools/auth0/handlers/organizations.js +225 -247
- package/lib/tools/auth0/handlers/pages.js +116 -154
- package/lib/tools/auth0/handlers/prompts.js +47 -46
- package/lib/tools/auth0/handlers/resourceServers.js +88 -112
- package/lib/tools/auth0/handlers/roles.js +203 -220
- package/lib/tools/auth0/handlers/rules.js +168 -189
- package/lib/tools/auth0/handlers/rulesConfigs.js +54 -63
- package/lib/tools/auth0/handlers/tenant.js +88 -64
- package/lib/tools/auth0/handlers/triggers.js +126 -126
- package/lib/tools/auth0/index.js +92 -85
- package/lib/tools/auth0/schema.js +39 -31
- package/lib/tools/constants.js +111 -21
- package/lib/tools/deploy.js +35 -32
- package/lib/tools/index.js +19 -32
- package/lib/tools/logger.js +11 -12
- package/lib/tools/utils.js +255 -282
- package/lib/utils.js +167 -190
- package/package.json +4 -3
- package/tsconfig.json +96 -0
- package/typescript-migration-progress.sh +22 -0
- package/.nyc_output/597f412e-a239-4319-ad5b-ddb87fc39e67.json +0 -1
- package/.nyc_output/processinfo/597f412e-a239-4319-ad5b-ddb87fc39e67.json +0 -1
|
@@ -1,54 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
20
|
+
const factorProvidersFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_PROVIDERS_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(factorProvidersFolder))
|
|
22
|
+
return { guardianFactorProviders: undefined }; // Skip
|
|
23
|
+
const foundFiles = (0, utils_1.getFiles)(factorProvidersFolder, ['.json']);
|
|
24
|
+
const guardianFactorProviders = foundFiles.map((f) => (0, utils_1.loadJSON)(f, context.mappings))
|
|
25
|
+
.filter((p) => Object.keys(p).length > 0); // Filter out empty factorProvidersFolder
|
|
26
|
+
return {
|
|
27
|
+
guardianFactorProviders
|
|
28
|
+
};
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const factorProviderFile = _path2.default.join(factorProvidersFolder, `${factorProvider.name}-${factorProvider.provider}.json`);
|
|
46
|
-
|
|
47
|
-
(0, _utils.dumpJSON)(factorProviderFile, factorProvider);
|
|
48
|
-
});
|
|
30
|
+
function dump(context) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { guardianFactorProviders } = context.assets;
|
|
33
|
+
if (!guardianFactorProviders)
|
|
34
|
+
return; // Skip, nothing to dump
|
|
35
|
+
const factorProvidersFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_PROVIDERS_DIRECTORY);
|
|
36
|
+
fs_extra_1.default.ensureDirSync(factorProvidersFolder);
|
|
37
|
+
guardianFactorProviders.forEach((factorProvider) => {
|
|
38
|
+
const factorProviderFile = path_1.default.join(factorProvidersFolder, `${factorProvider.name}-${factorProvider.provider}.json`);
|
|
39
|
+
(0, utils_1.dumpJSON)(factorProviderFile, factorProvider);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
49
42
|
}
|
|
50
|
-
|
|
51
43
|
exports.default = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
44
|
+
parse,
|
|
45
|
+
dump
|
|
46
|
+
};
|
|
@@ -1,54 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
20
|
+
const factorTemplatesFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_TEMPLATES_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(factorTemplatesFolder))
|
|
22
|
+
return { guardianFactorTemplates: undefined }; // Skip
|
|
23
|
+
const foundFiles = (0, utils_1.getFiles)(factorTemplatesFolder, ['.json']);
|
|
24
|
+
const guardianFactorTemplates = foundFiles.map((f) => (0, utils_1.loadJSON)(f, context.mappings))
|
|
25
|
+
.filter((p) => Object.keys(p).length > 0); // Filter out empty guardianFactorTemplates
|
|
26
|
+
return {
|
|
27
|
+
guardianFactorTemplates
|
|
28
|
+
};
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const factorTemplatesFile = _path2.default.join(factorTemplatesFolder, `${factorTemplates.name}.json`);
|
|
46
|
-
|
|
47
|
-
(0, _utils.dumpJSON)(factorTemplatesFile, factorTemplates);
|
|
48
|
-
});
|
|
30
|
+
function dump(context) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { guardianFactorTemplates } = context.assets;
|
|
33
|
+
if (!guardianFactorTemplates)
|
|
34
|
+
return; // Skip, nothing to dump
|
|
35
|
+
const factorTemplatesFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_TEMPLATES_DIRECTORY);
|
|
36
|
+
fs_extra_1.default.ensureDirSync(factorTemplatesFolder);
|
|
37
|
+
guardianFactorTemplates.forEach((factorTemplates) => {
|
|
38
|
+
const factorTemplatesFile = path_1.default.join(factorTemplatesFolder, `${factorTemplates.name}.json`);
|
|
39
|
+
(0, utils_1.dumpJSON)(factorTemplatesFile, factorTemplates);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
49
42
|
}
|
|
50
|
-
|
|
51
43
|
exports.default = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
44
|
+
parse,
|
|
45
|
+
dump
|
|
46
|
+
};
|
|
@@ -1,54 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
20
|
+
const factorsFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_FACTORS_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(factorsFolder))
|
|
22
|
+
return { guardianFactors: undefined }; // Skip
|
|
23
|
+
const foundFiles = (0, utils_1.getFiles)(factorsFolder, ['.json']);
|
|
24
|
+
const guardianFactors = foundFiles.map((f) => (0, utils_1.loadJSON)(f, context.mappings))
|
|
25
|
+
.filter((p) => Object.keys(p).length > 0); // Filter out empty guardianFactors
|
|
26
|
+
return {
|
|
27
|
+
guardianFactors
|
|
28
|
+
};
|
|
32
29
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const factorFile = _path2.default.join(factorsFolder, `${factor.name}.json`);
|
|
46
|
-
|
|
47
|
-
(0, _utils.dumpJSON)(factorFile, factor);
|
|
48
|
-
});
|
|
30
|
+
function dump(context) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const { guardianFactors } = context.assets;
|
|
33
|
+
if (!guardianFactors)
|
|
34
|
+
return; // Skip, nothing to dump
|
|
35
|
+
const factorsFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY, tools_1.constants.GUARDIAN_FACTORS_DIRECTORY);
|
|
36
|
+
fs_extra_1.default.ensureDirSync(factorsFolder);
|
|
37
|
+
guardianFactors.forEach((factor) => {
|
|
38
|
+
const factorFile = path_1.default.join(factorsFolder, `${factor.name}.json`);
|
|
39
|
+
(0, utils_1.dumpJSON)(factorFile, factor);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
49
42
|
}
|
|
50
|
-
|
|
51
43
|
exports.default = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
44
|
+
parse,
|
|
45
|
+
dump
|
|
46
|
+
};
|
|
@@ -1,55 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return {};
|
|
20
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(guardianFolder))
|
|
22
|
+
return {}; // Skip
|
|
23
|
+
const file = path_1.default.join(guardianFolder, 'phoneFactorMessageTypes.json');
|
|
24
|
+
if ((0, utils_1.isFile)(file)) {
|
|
25
|
+
return {
|
|
26
|
+
guardianPhoneFactorMessageTypes: (0, utils_1.loadJSON)(file, context.mappings)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {};
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const file = _path2.default.join(guardianFolder, 'phoneFactorMessageTypes.json');
|
|
48
|
-
|
|
49
|
-
(0, _utils.dumpJSON)(file, guardianPhoneFactorMessageTypes);
|
|
31
|
+
function dump(context) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { guardianPhoneFactorMessageTypes } = context.assets;
|
|
34
|
+
if (!guardianPhoneFactorMessageTypes)
|
|
35
|
+
return; // Skip, nothing to dump
|
|
36
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
37
|
+
fs_extra_1.default.ensureDirSync(guardianFolder);
|
|
38
|
+
const file = path_1.default.join(guardianFolder, 'phoneFactorMessageTypes.json');
|
|
39
|
+
(0, utils_1.dumpJSON)(file, guardianPhoneFactorMessageTypes);
|
|
40
|
+
});
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
exports.default = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
43
|
+
parse,
|
|
44
|
+
dump
|
|
45
|
+
};
|
|
@@ -1,55 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return {};
|
|
20
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(guardianFolder))
|
|
22
|
+
return {}; // Skip
|
|
23
|
+
const file = path_1.default.join(guardianFolder, 'phoneFactorSelectedProvider.json');
|
|
24
|
+
if ((0, utils_1.isFile)(file)) {
|
|
25
|
+
return {
|
|
26
|
+
guardianPhoneFactorSelectedProvider: (0, utils_1.loadJSON)(file, context.mappings)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {};
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const file = _path2.default.join(guardianFolder, 'phoneFactorSelectedProvider.json');
|
|
48
|
-
|
|
49
|
-
(0, _utils.dumpJSON)(file, guardianPhoneFactorSelectedProvider);
|
|
31
|
+
function dump(context) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { guardianPhoneFactorSelectedProvider } = context.assets;
|
|
34
|
+
if (!guardianPhoneFactorSelectedProvider)
|
|
35
|
+
return; // Skip, nothing to dump
|
|
36
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
37
|
+
fs_extra_1.default.ensureDirSync(guardianFolder);
|
|
38
|
+
const file = path_1.default.join(guardianFolder, 'phoneFactorSelectedProvider.json');
|
|
39
|
+
(0, utils_1.dumpJSON)(file, guardianPhoneFactorSelectedProvider);
|
|
40
|
+
});
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
exports.default = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
43
|
+
parse,
|
|
44
|
+
dump
|
|
45
|
+
};
|
|
@@ -1,55 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
16
|
+
const path_1 = __importDefault(require("path"));
|
|
17
|
+
const tools_1 = require("../../../tools");
|
|
18
|
+
const utils_1 = require("../../../utils");
|
|
21
19
|
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return {};
|
|
20
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
21
|
+
if (!(0, utils_1.existsMustBeDir)(guardianFolder))
|
|
22
|
+
return {}; // Skip
|
|
23
|
+
const file = path_1.default.join(guardianFolder, 'policies.json');
|
|
24
|
+
if ((0, utils_1.isFile)(file)) {
|
|
25
|
+
return {
|
|
26
|
+
guardianPolicies: (0, utils_1.loadJSON)(file, context.mappings)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {};
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const file = _path2.default.join(guardianFolder, 'policies.json');
|
|
48
|
-
|
|
49
|
-
(0, _utils.dumpJSON)(file, guardianPolicies);
|
|
31
|
+
function dump(context) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { guardianPolicies } = context.assets;
|
|
34
|
+
if (!guardianPolicies)
|
|
35
|
+
return; // Skip, nothing to dump
|
|
36
|
+
const guardianFolder = path_1.default.join(context.filePath, tools_1.constants.GUARDIAN_DIRECTORY);
|
|
37
|
+
fs_extra_1.default.ensureDirSync(guardianFolder);
|
|
38
|
+
const file = path_1.default.join(guardianFolder, 'policies.json');
|
|
39
|
+
(0, utils_1.dumpJSON)(file, guardianPolicies);
|
|
40
|
+
});
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
exports.default = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
43
|
+
parse,
|
|
44
|
+
dump
|
|
45
|
+
};
|