auth0-deploy-cli 7.5.0 → 7.6.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 (75) hide show
  1. package/.eslintrc +66 -17
  2. package/CHANGELOG.md +25 -2
  3. package/lib/args.js +6 -3
  4. package/lib/commands/export.js +8 -6
  5. package/lib/commands/import.js +11 -10
  6. package/lib/context/directory/handlers/actions.js +3 -2
  7. package/lib/context/directory/handlers/attackProtection.js +3 -2
  8. package/lib/context/directory/handlers/branding.js +59 -0
  9. package/lib/context/directory/handlers/clientGrants.js +3 -2
  10. package/lib/context/directory/handlers/clients.js +3 -2
  11. package/lib/context/directory/handlers/connections.js +3 -2
  12. package/lib/context/directory/handlers/databases.js +18 -16
  13. package/lib/context/directory/handlers/emailProvider.js +3 -2
  14. package/lib/context/directory/handlers/emailTemplates.js +11 -9
  15. package/lib/context/directory/handlers/guardianFactorProviders.js +3 -2
  16. package/lib/context/directory/handlers/guardianFactorTemplates.js +3 -2
  17. package/lib/context/directory/handlers/guardianFactors.js +3 -2
  18. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +3 -2
  19. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +3 -2
  20. package/lib/context/directory/handlers/guardianPolicies.js +3 -2
  21. package/lib/context/directory/handlers/hooks.js +3 -2
  22. package/lib/context/directory/handlers/index.js +3 -1
  23. package/lib/context/directory/handlers/migrations.js +8 -8
  24. package/lib/context/directory/handlers/organizations.js +3 -2
  25. package/lib/context/directory/handlers/pages.js +18 -18
  26. package/lib/context/directory/handlers/resourceServers.js +3 -2
  27. package/lib/context/directory/handlers/roles.js +3 -2
  28. package/lib/context/directory/handlers/rules.js +3 -2
  29. package/lib/context/directory/handlers/rulesConfigs.js +4 -3
  30. package/lib/context/directory/handlers/tenant.js +5 -3
  31. package/lib/context/directory/handlers/triggers.js +3 -2
  32. package/lib/context/directory/index.js +2 -4
  33. package/lib/context/yaml/handlers/actions.js +4 -3
  34. package/lib/context/yaml/handlers/attackProtection.js +5 -11
  35. package/lib/context/yaml/handlers/branding.js +65 -0
  36. package/lib/context/yaml/handlers/clientGrants.js +3 -2
  37. package/lib/context/yaml/handlers/clients.js +3 -2
  38. package/lib/context/yaml/handlers/connections.js +3 -2
  39. package/lib/context/yaml/handlers/databases.js +3 -2
  40. package/lib/context/yaml/handlers/emailProvider.js +3 -2
  41. package/lib/context/yaml/handlers/emailTemplates.js +3 -2
  42. package/lib/context/yaml/handlers/guardianFactorProviders.js +5 -12
  43. package/lib/context/yaml/handlers/guardianFactorTemplates.js +5 -12
  44. package/lib/context/yaml/handlers/guardianFactors.js +5 -12
  45. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +5 -12
  46. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +5 -12
  47. package/lib/context/yaml/handlers/guardianPolicies.js +5 -12
  48. package/lib/context/yaml/handlers/hooks.js +3 -2
  49. package/lib/context/yaml/handlers/index.js +3 -1
  50. package/lib/context/yaml/handlers/migrations.js +3 -2
  51. package/lib/context/yaml/handlers/organizations.js +3 -2
  52. package/lib/context/yaml/handlers/pages.js +3 -2
  53. package/lib/context/yaml/handlers/resourceServers.js +3 -2
  54. package/lib/context/yaml/handlers/roles.js +3 -2
  55. package/lib/context/yaml/handlers/rules.js +3 -2
  56. package/lib/context/yaml/handlers/rulesConfigs.js +4 -3
  57. package/lib/context/yaml/handlers/tenant.js +3 -2
  58. package/lib/context/yaml/handlers/triggers.js +3 -2
  59. package/lib/context/yaml/index.js +2 -1
  60. package/lib/index.js +1 -1
  61. package/lib/tools/auth0/handlers/branding.js +67 -13
  62. package/lib/tools/auth0/handlers/default.js +7 -1
  63. package/lib/tools/auth0/handlers/organizations.js +7 -2
  64. package/lib/tools/auth0/handlers/resourceServers.js +7 -2
  65. package/lib/tools/auth0/handlers/roles.js +7 -2
  66. package/lib/tools/auth0/handlers/rules.js +7 -1
  67. package/lib/tools/calculateChanges.js +144 -0
  68. package/lib/tools/constants.js +7 -0
  69. package/lib/tools/utils.js +1 -142
  70. package/package.json +8 -15
  71. package/tsconfig.json +11 -89
  72. package/.babelrc +0 -17
  73. package/.nyc_output/60b76a45-577b-4171-9982-a8e836ab7fd6.json +0 -1
  74. package/.nyc_output/processinfo/60b76a45-577b-4171-9982-a8e836ab7fd6.json +0 -1
  75. package/.nyc_output/processinfo/index.json +0 -1
@@ -22,27 +22,26 @@ function parse(context) {
22
22
  if (!(0, utils_1.existsMustBeDir)(pagesFolder))
23
23
  return { pages: undefined }; // Skip
24
24
  const files = (0, utils_1.getFiles)(pagesFolder, ['.json', '.html']);
25
- const sorted = {};
26
- files.forEach((file) => {
25
+ const sorted = files.reduce((acc, file) => {
27
26
  const { ext, name } = path_1.default.parse(file);
28
- if (!sorted[name])
29
- sorted[name] = {};
27
+ if (!acc[name])
28
+ acc[name] = {};
30
29
  if (ext === '.json')
31
- sorted[name].meta = file;
30
+ acc[name].meta = file;
32
31
  if (ext === '.html')
33
- sorted[name].html = file;
34
- });
35
- const pages = [];
36
- Object.values(sorted).forEach((data) => {
37
- if (!data.meta) {
38
- logger_1.default.warn(`Skipping pages file ${data.html} as missing the corresponding '.json' file`);
39
- }
40
- else if (!data.html) {
41
- logger_1.default.warn(`Skipping pages file ${data.meta} as missing corresponding '.html' file`);
32
+ acc[name].html = file;
33
+ return acc;
34
+ }, {});
35
+ const pages = Object.values(sorted).flatMap(({ meta, html }) => {
36
+ if (!meta) {
37
+ logger_1.default.warn(`Skipping pages file ${html} as missing the corresponding '.json' file`);
38
+ return [];
42
39
  }
43
- else {
44
- pages.push(Object.assign(Object.assign({}, (0, utils_1.loadJSON)(data.meta, context.mappings)), { html: (0, tools_1.loadFileAndReplaceKeywords)(data.html, context.mappings) }));
40
+ if (!html) {
41
+ logger_1.default.warn(`Skipping pages file ${meta} as missing corresponding '.html' file`);
42
+ return [];
45
43
  }
44
+ return Object.assign(Object.assign({}, (0, utils_1.loadJSON)(meta, context.mappings)), { html: (0, tools_1.loadFileAndReplaceKeywords)(html, context.mappings) });
46
45
  });
47
46
  return {
48
47
  pages
@@ -71,7 +70,8 @@ function dump(context) {
71
70
  });
72
71
  });
73
72
  }
74
- exports.default = {
73
+ const pagesHandler = {
75
74
  parse,
76
- dump
75
+ dump,
77
76
  };
77
+ exports.default = pagesHandler;
@@ -40,7 +40,8 @@ function dump(context) {
40
40
  });
41
41
  });
42
42
  }
43
- exports.default = {
43
+ const resourceServersHandler = {
44
44
  parse,
45
- dump
45
+ dump,
46
46
  };
47
+ exports.default = resourceServersHandler;
@@ -49,7 +49,8 @@ function dump(context) {
49
49
  });
50
50
  });
51
51
  }
52
- exports.default = {
52
+ const rolesHandler = {
53
53
  parse,
54
- dump
54
+ dump,
55
55
  };
56
+ exports.default = rolesHandler;
@@ -53,7 +53,8 @@ function dump(context) {
53
53
  });
54
54
  });
55
55
  }
56
- exports.default = {
56
+ const rulesHandler = {
57
57
  parse,
58
- dump
58
+ dump,
59
59
  };
60
+ exports.default = rulesHandler;
@@ -29,10 +29,11 @@ function parse(context) {
29
29
  function dump() {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  // do not export rulesConfigs as its values cannot be extracted
32
- return null;
32
+ return;
33
33
  });
34
34
  }
35
- exports.default = {
35
+ const rulesConfigsHandler = {
36
36
  parse,
37
- dump
37
+ dump,
38
38
  };
39
+ exports.default = rulesConfigsHandler;
@@ -35,7 +35,7 @@ function parse(context) {
35
35
  const _a = (0, utils_1.loadJSON)(tenantFile, context.mappings), { session_lifetime, idle_session_lifetime } = _a, tenant = __rest(_a, ["session_lifetime", "idle_session_lifetime"]);
36
36
  (0, utils_1.clearTenantFlags)(tenant);
37
37
  return {
38
- tenant: Object.assign(tenant, session_lifetime && (0, utils_1.hoursAsInteger)('session_lifetime', session_lifetime), idle_session_lifetime && (0, utils_1.hoursAsInteger)('idle_session_lifetime', idle_session_lifetime))
38
+ tenant: Object.assign(Object.assign({}, tenant), { session_lifetime_in_minutes: (0, utils_1.hoursAsInteger)('session_lifetime', session_lifetime)['session_lifetime_in_minutes'], idle_session_lifetime_in_minutes: (0, utils_1.hoursAsInteger)('idle_session_lifetime', idle_session_lifetime)['idle_session_lifetime_in_minutes'] })
39
39
  };
40
40
  /* eslint-enable camelcase */
41
41
  }
@@ -49,9 +49,11 @@ function dump(context) {
49
49
  (0, utils_1.clearTenantFlags)(tenant);
50
50
  const tenantFile = path_1.default.join(context.filePath, 'tenant.json');
51
51
  (0, utils_1.dumpJSON)(tenantFile, tenant);
52
+ return;
52
53
  });
53
54
  }
54
- exports.default = {
55
+ const tenantHandler = {
55
56
  parse,
56
- dump
57
+ dump,
57
58
  };
59
+ exports.default = tenantHandler;
@@ -38,7 +38,8 @@ function dump(context) {
38
38
  fs_extra_1.default.writeFileSync(triggerFile, JSON.stringify(triggers, null, 2));
39
39
  });
40
40
  }
41
- exports.default = {
41
+ const triggersHandler = {
42
42
  parse,
43
- dump
43
+ dump,
44
44
  };
45
+ exports.default = triggersHandler;
@@ -96,6 +96,7 @@ class default_1 {
96
96
  this.assets = (0, readonly_1.default)(this.assets, this.config);
97
97
  // Copy clients to be used by handlers which require converting client_id to the name
98
98
  // Must copy as the client_id will be stripped if AUTH0_EXPORT_IDENTIFIERS is false
99
+ //@ts-ignore because assets haven't been typed yet TODO: type assets
99
100
  this.assets.clientsOrig = [...this.assets.clients];
100
101
  // Optionally Strip identifiers
101
102
  if (!this.config.AUTH0_EXPORT_IDENTIFIERS) {
@@ -103,10 +104,7 @@ class default_1 {
103
104
  }
104
105
  yield Promise.all(Object.entries(handlers_1.default).map(([name, handler]) => __awaiter(this, void 0, void 0, function* () {
105
106
  try {
106
- const data = yield handler.dump(this);
107
- if (data) {
108
- logger_1.default.info(`Exporting ${name}`);
109
- }
107
+ yield handler.dump(this);
110
108
  }
111
109
  catch (err) {
112
110
  logger_1.default.debug(err.stack);
@@ -58,9 +58,9 @@ function mapActionCode(basePath, action) {
58
58
  function dump(context) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  const { actions } = context.assets;
61
- // Nothing to do
61
+ //@ts-ignore but need to investigate why returning void here when other handlers do not
62
62
  if (!actions)
63
- return;
63
+ return; // Nothing to do
64
64
  return {
65
65
  actions: actions.map((action) => ({
66
66
  name: action.name,
@@ -75,7 +75,8 @@ function dump(context) {
75
75
  };
76
76
  });
77
77
  }
78
- exports.default = {
78
+ const ActionsHandler = {
79
79
  parse,
80
80
  dump
81
81
  };
82
+ exports.default = ActionsHandler;
@@ -9,21 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
12
+ function parseAndDump(context) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  return {
15
15
  attackProtection: context.assets.attackProtection || {}
16
16
  };
17
17
  });
18
18
  }
19
- function dump(context) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- return {
22
- attackProtection: context.assets.attackProtection || {}
23
- };
24
- });
25
- }
26
- exports.default = {
27
- parse,
28
- dump
19
+ const attackProtectionHandler = {
20
+ parse: parseAndDump,
21
+ dump: parseAndDump,
29
22
  };
23
+ exports.default = attackProtectionHandler;
@@ -0,0 +1,65 @@
1
+ "use strict";
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
+ function parse(context) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ // Load the HTML file for each page
21
+ const { branding } = context.assets;
22
+ if (!branding || !branding.templates)
23
+ return { branding };
24
+ const templates = branding.templates.map((templateDefinition) => {
25
+ const markupFile = path_1.default.join(templateDefinition.body);
26
+ return {
27
+ template: templateDefinition.template,
28
+ body: (0, tools_1.loadFileAndReplaceKeywords)(markupFile, context.mappings)
29
+ };
30
+ });
31
+ return {
32
+ branding: Object.assign(Object.assign({}, branding), { templates })
33
+ };
34
+ });
35
+ }
36
+ function dump(context) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const { branding } = context.assets || { branding: undefined };
39
+ branding.templates = branding.templates || [];
40
+ // create templates folder
41
+ if (branding.templates.length) {
42
+ const brandingTemplatesFolder = path_1.default.join(context.basePath, tools_1.constants.BRANDING_TEMPLATES_YAML_DIRECTORY);
43
+ fs_extra_1.default.ensureDirSync(brandingTemplatesFolder);
44
+ branding.templates = branding.templates.map((templateDefinition) => {
45
+ const file = `${templateDefinition.template}.html`;
46
+ const templateMarkupFile = path_1.default.join(brandingTemplatesFolder, file);
47
+ const markup = templateDefinition.body;
48
+ try {
49
+ fs_extra_1.default.writeFileSync(templateMarkupFile, markup);
50
+ }
51
+ catch (e) {
52
+ throw new Error(`Error writing template file: ${templateDefinition.template}, because: ${e.message}`);
53
+ }
54
+ // save the location as relative file.
55
+ templateDefinition.body = `.${path_1.default.sep}${path_1.default.join(tools_1.constants.BRANDING_TEMPLATES_YAML_DIRECTORY, file)}`;
56
+ return templateDefinition;
57
+ });
58
+ }
59
+ return { branding };
60
+ });
61
+ }
62
+ exports.default = {
63
+ parse,
64
+ dump
65
+ };
@@ -34,7 +34,8 @@ function dump(context) {
34
34
  };
35
35
  });
36
36
  }
37
- exports.default = {
37
+ const clientGrantsHandler = {
38
38
  parse,
39
- dump
39
+ dump,
40
40
  };
41
+ exports.default = clientGrantsHandler;
@@ -60,7 +60,8 @@ function dump(context) {
60
60
  };
61
61
  });
62
62
  }
63
- exports.default = {
63
+ const clientsHandler = {
64
64
  parse,
65
- dump
65
+ dump,
66
66
  };
67
+ exports.default = clientsHandler;
@@ -77,7 +77,8 @@ function dump(context) {
77
77
  };
78
78
  });
79
79
  }
80
- exports.default = {
80
+ const connectionsHandler = {
81
81
  parse,
82
- dump
82
+ dump,
83
83
  };
84
+ exports.default = connectionsHandler;
@@ -62,7 +62,8 @@ function dump(context) {
62
62
  };
63
63
  });
64
64
  }
65
- exports.default = {
65
+ const databasesHandler = {
66
66
  parse,
67
- dump
67
+ dump,
68
68
  };
69
+ exports.default = databasesHandler;
@@ -31,7 +31,8 @@ function dump(context) {
31
31
  };
32
32
  });
33
33
  }
34
- exports.default = {
34
+ const emailProviderHandler = {
35
35
  parse,
36
- dump
36
+ dump,
37
37
  };
38
+ exports.default = emailProviderHandler;
@@ -44,7 +44,8 @@ function dump(context) {
44
44
  return { emailTemplates };
45
45
  });
46
46
  }
47
- exports.default = {
47
+ const emailTemplatesHandler = {
48
48
  parse,
49
- dump
49
+ dump,
50
50
  };
51
+ exports.default = emailTemplatesHandler;
@@ -9,15 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- // nothing to do, set default if empty
15
- return {
16
- guardianFactorProviders: [...context.assets.guardianFactorProviders || []]
17
- };
18
- });
19
- }
20
- function dump(context) {
12
+ function parseAndDump(context) {
21
13
  return __awaiter(this, void 0, void 0, function* () {
22
14
  // nothing to do, set default empty
23
15
  return {
@@ -25,7 +17,8 @@ function dump(context) {
25
17
  };
26
18
  });
27
19
  }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianFactorProvidersHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianFactorProvidersHandler;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
12
+ function parseAndDump(context) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  // nothing to do, set default if empty
15
15
  return {
@@ -17,15 +17,8 @@ function parse(context) {
17
17
  };
18
18
  });
19
19
  }
20
- function dump(context) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- // nothing to do, set default empty
23
- return {
24
- guardianFactorTemplates: [...context.assets.guardianFactorTemplates || []]
25
- };
26
- });
27
- }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianFactorTemplatesHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianFactorTemplatesHandler;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
12
+ function parseAndDump(context) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  // nothing to do, set default if empty
15
15
  return {
@@ -17,15 +17,8 @@ function parse(context) {
17
17
  };
18
18
  });
19
19
  }
20
- function dump(context) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- // nothing to do, set default empty
23
- return {
24
- guardianFactors: [...context.assets.guardianFactors || []]
25
- };
26
- });
27
- }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianFactorsHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianFactorsHandler;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
12
+ function parseAndDump(context) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  // nothing to do, set default if empty
15
15
  return {
@@ -17,15 +17,8 @@ function parse(context) {
17
17
  };
18
18
  });
19
19
  }
20
- function dump(context) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- // nothing to do, set default empty
23
- return {
24
- guardianPhoneFactorMessageTypes: Object.assign({}, context.assets.guardianPhoneFactorMessageTypes || {})
25
- };
26
- });
27
- }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianPhoneFactorMessageTypesHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianPhoneFactorMessageTypesHandler;
@@ -9,15 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
13
- return __awaiter(this, void 0, void 0, function* () {
14
- // nothing to do, set default if empty
15
- return {
16
- guardianPhoneFactorSelectedProvider: Object.assign({}, context.assets.guardianPhoneFactorSelectedProvider || {})
17
- };
18
- });
19
- }
20
- function dump(context) {
12
+ function parseAndDump(context) {
21
13
  return __awaiter(this, void 0, void 0, function* () {
22
14
  // nothing to do, set default empty
23
15
  return {
@@ -25,7 +17,8 @@ function dump(context) {
25
17
  };
26
18
  });
27
19
  }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianPhoneFactorSelectedProviderHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianPhoneFactorSelectedProviderHandler;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function parse(context) {
12
+ function parseAndDump(context) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  // nothing to do, set default if empty
15
15
  return {
@@ -17,15 +17,8 @@ function parse(context) {
17
17
  };
18
18
  });
19
19
  }
20
- function dump(context) {
21
- return __awaiter(this, void 0, void 0, function* () {
22
- // nothing to do, set default empty
23
- return {
24
- guardianPolicies: Object.assign({}, context.assets.guardianPolicies || {})
25
- };
26
- });
27
- }
28
- exports.default = {
29
- parse,
30
- dump
20
+ const guardianPoliciesHandler = {
21
+ parse: parseAndDump,
22
+ dump: parseAndDump,
31
23
  };
24
+ exports.default = guardianPoliciesHandler;
@@ -56,7 +56,8 @@ function dump(context) {
56
56
  return { hooks };
57
57
  });
58
58
  }
59
- exports.default = {
59
+ const hooksHandler = {
60
60
  parse,
61
- dump
61
+ dump,
62
62
  };
63
+ exports.default = hooksHandler;
@@ -27,6 +27,7 @@ const migrations_1 = __importDefault(require("./migrations"));
27
27
  const actions_1 = __importDefault(require("./actions"));
28
28
  const triggers_1 = __importDefault(require("./triggers"));
29
29
  const attackProtection_1 = __importDefault(require("./attackProtection"));
30
+ const branding_1 = __importDefault(require("./branding"));
30
31
  exports.default = {
31
32
  rules: rules_1.default,
32
33
  hooks: hooks_1.default,
@@ -51,5 +52,6 @@ exports.default = {
51
52
  actions: actions_1.default,
52
53
  organizations: organizations_1.default,
53
54
  triggers: triggers_1.default,
54
- attackProtection: attackProtection_1.default
55
+ attackProtection: attackProtection_1.default,
56
+ branding: branding_1.default
55
57
  };
@@ -21,7 +21,8 @@ function dump(context) {
21
21
  return { migrations: migrations || {} };
22
22
  });
23
23
  }
24
- exports.default = {
24
+ const migrationsHandler = {
25
25
  parse,
26
- dump
26
+ dump,
27
27
  };
28
+ exports.default = migrationsHandler;
@@ -38,7 +38,8 @@ function dump(context) {
38
38
  };
39
39
  });
40
40
  }
41
- exports.default = {
41
+ const organizationsHandler = {
42
42
  parse,
43
- dump
43
+ dump,
44
44
  };
45
+ exports.default = organizationsHandler;
@@ -48,7 +48,8 @@ function dump(context) {
48
48
  return { pages };
49
49
  });
50
50
  }
51
- exports.default = {
51
+ const pagesHandler = {
52
52
  parse,
53
- dump
53
+ dump,
54
54
  };
55
+ exports.default = pagesHandler;
@@ -25,7 +25,8 @@ function dump(context) {
25
25
  };
26
26
  });
27
27
  }
28
- exports.default = {
28
+ const resourceServersHandler = {
29
29
  parse,
30
- dump
30
+ dump,
31
31
  };
32
+ exports.default = resourceServersHandler;
@@ -32,7 +32,8 @@ function dump(context) {
32
32
  };
33
33
  });
34
34
  }
35
- exports.default = {
35
+ const rolesHandler = {
36
36
  parse,
37
- dump
37
+ dump,
38
38
  };
39
+ exports.default = rolesHandler;
@@ -47,7 +47,8 @@ function dump(context) {
47
47
  return { rules };
48
48
  });
49
49
  }
50
- exports.default = {
50
+ const rulesHandler = {
51
51
  parse,
52
- dump
52
+ dump,
53
53
  };
54
+ exports.default = rulesHandler;
@@ -17,7 +17,7 @@ function parse(context) {
17
17
  };
18
18
  });
19
19
  }
20
- function dump() {
20
+ function dump(_context) {
21
21
  return __awaiter(this, void 0, void 0, function* () {
22
22
  // do not export rulesConfigs as its values cannot be extracted
23
23
  return {
@@ -25,7 +25,8 @@ function dump() {
25
25
  };
26
26
  });
27
27
  }
28
- exports.default = {
28
+ const rulesConfigsHandler = {
29
29
  parse,
30
- dump
30
+ dump,
31
31
  };
32
+ exports.default = rulesConfigsHandler;
@@ -42,7 +42,8 @@ function dump(context) {
42
42
  return { tenant };
43
43
  });
44
44
  }
45
- exports.default = {
45
+ const tenantHandler = {
46
46
  parse,
47
- dump
47
+ dump,
48
48
  };
49
+ exports.default = tenantHandler;