directus 9.11.1 → 9.12.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 (91) hide show
  1. package/dist/app.js +8 -1
  2. package/dist/cli/utils/create-env/env-stub.liquid +266 -9
  3. package/dist/controllers/activity.js +1 -1
  4. package/dist/controllers/flows.d.ts +2 -0
  5. package/dist/controllers/flows.js +157 -0
  6. package/dist/controllers/folders.js +1 -1
  7. package/dist/controllers/notifications.js +1 -1
  8. package/dist/controllers/operations.d.ts +2 -0
  9. package/dist/controllers/operations.js +138 -0
  10. package/dist/database/index.js +10 -19
  11. package/dist/database/migrations/20220429A-add-flows.d.ts +3 -0
  12. package/dist/database/migrations/20220429A-add-flows.js +83 -0
  13. package/dist/database/migrations/20220429B-add-color-to-insights-icon.d.ts +3 -0
  14. package/dist/database/migrations/20220429B-add-color-to-insights-icon.js +15 -0
  15. package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.d.ts +3 -0
  16. package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.js +15 -0
  17. package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.d.ts +3 -0
  18. package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.js +15 -0
  19. package/dist/database/seeds/05-activity.yaml +0 -1
  20. package/dist/database/system-data/collections/collections.yaml +4 -0
  21. package/dist/database/system-data/fields/flows.yaml +21 -0
  22. package/dist/database/system-data/fields/operations.yaml +19 -0
  23. package/dist/database/system-data/fields/users.yaml +2 -4
  24. package/dist/database/system-data/relations/relations.yaml +20 -0
  25. package/dist/env.d.ts +1 -1
  26. package/dist/env.js +6 -30
  27. package/dist/extensions.d.ts +3 -0
  28. package/dist/extensions.js +73 -20
  29. package/dist/flows.d.ts +17 -0
  30. package/dist/flows.js +310 -0
  31. package/dist/messenger.d.ts +24 -0
  32. package/dist/messenger.js +64 -0
  33. package/dist/operations/condition/index.d.ts +6 -0
  34. package/dist/operations/condition/index.js +15 -0
  35. package/dist/operations/item-create/index.d.ts +8 -0
  36. package/dist/operations/item-create/index.js +40 -0
  37. package/dist/operations/item-delete/index.d.ts +9 -0
  38. package/dist/operations/item-delete/index.js +45 -0
  39. package/dist/operations/item-read/index.d.ts +9 -0
  40. package/dist/operations/item-read/index.js +45 -0
  41. package/dist/operations/item-update/index.d.ts +10 -0
  42. package/dist/operations/item-update/index.js +50 -0
  43. package/dist/operations/log/index.d.ts +5 -0
  44. package/dist/operations/log/index.js +14 -0
  45. package/dist/operations/mail/index.d.ts +7 -0
  46. package/dist/operations/mail/index.js +16 -0
  47. package/dist/operations/notification/index.d.ts +8 -0
  48. package/dist/operations/notification/index.js +39 -0
  49. package/dist/operations/request/index.d.ts +9 -0
  50. package/dist/operations/request/index.js +14 -0
  51. package/dist/operations/sleep/index.d.ts +5 -0
  52. package/dist/operations/sleep/index.js +9 -0
  53. package/dist/operations/transform/index.d.ts +5 -0
  54. package/dist/operations/transform/index.js +10 -0
  55. package/dist/operations/trigger/index.d.ts +6 -0
  56. package/dist/operations/trigger/index.js +21 -0
  57. package/dist/services/activity.d.ts +1 -2
  58. package/dist/services/activity.js +10 -10
  59. package/dist/services/authentication.d.ts +2 -2
  60. package/dist/services/authentication.js +7 -7
  61. package/dist/services/authorization.js +12 -0
  62. package/dist/services/flows.d.ts +14 -0
  63. package/dist/services/flows.js +42 -0
  64. package/dist/services/graphql.js +7 -1
  65. package/dist/services/index.d.ts +2 -0
  66. package/dist/services/index.js +2 -0
  67. package/dist/services/items.js +1 -1
  68. package/dist/services/mail/index.js +2 -1
  69. package/dist/services/notifications.d.ts +2 -1
  70. package/dist/services/notifications.js +4 -3
  71. package/dist/services/operations.d.ts +14 -0
  72. package/dist/services/operations.js +42 -0
  73. package/dist/services/webhooks.d.ts +2 -0
  74. package/dist/services/webhooks.js +8 -7
  75. package/dist/types/events.d.ts +18 -0
  76. package/dist/types/events.js +2 -0
  77. package/dist/types/index.d.ts +1 -1
  78. package/dist/types/index.js +1 -1
  79. package/dist/utils/construct-flow-tree.d.ts +2 -0
  80. package/dist/utils/construct-flow-tree.js +31 -0
  81. package/dist/utils/get-accountability-for-role.d.ts +7 -0
  82. package/dist/utils/get-accountability-for-role.js +36 -0
  83. package/dist/utils/operation-options.d.ts +3 -0
  84. package/dist/utils/operation-options.js +45 -0
  85. package/dist/utils/validate-query.js +1 -1
  86. package/dist/webhooks.d.ts +2 -0
  87. package/dist/webhooks.js +17 -2
  88. package/package.json +18 -14
  89. package/dist/types/activity.d.ts +0 -9
  90. package/dist/types/activity.js +0 -13
  91. package/example.env +0 -202
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const express_1 = __importDefault(require("express"));
7
+ const exceptions_1 = require("../exceptions");
8
+ const respond_1 = require("../middleware/respond");
9
+ const use_collection_1 = __importDefault(require("../middleware/use-collection"));
10
+ const validate_batch_1 = require("../middleware/validate-batch");
11
+ const services_1 = require("../services");
12
+ const async_handler_1 = __importDefault(require("../utils/async-handler"));
13
+ const router = express_1.default.Router();
14
+ router.use((0, use_collection_1.default)('directus_operations'));
15
+ router.post('/', (0, async_handler_1.default)(async (req, res, next) => {
16
+ const service = new services_1.OperationsService({
17
+ accountability: req.accountability,
18
+ schema: req.schema,
19
+ });
20
+ const savedKeys = [];
21
+ if (Array.isArray(req.body)) {
22
+ const keys = await service.createMany(req.body);
23
+ savedKeys.push(...keys);
24
+ }
25
+ else {
26
+ const key = await service.createOne(req.body);
27
+ savedKeys.push(key);
28
+ }
29
+ try {
30
+ if (Array.isArray(req.body)) {
31
+ const items = await service.readMany(savedKeys, req.sanitizedQuery);
32
+ res.locals.payload = { data: items };
33
+ }
34
+ else {
35
+ const item = await service.readOne(savedKeys[0], req.sanitizedQuery);
36
+ res.locals.payload = { data: item };
37
+ }
38
+ }
39
+ catch (error) {
40
+ if (error instanceof exceptions_1.ForbiddenException) {
41
+ return next();
42
+ }
43
+ throw error;
44
+ }
45
+ return next();
46
+ }), respond_1.respond);
47
+ const readHandler = (0, async_handler_1.default)(async (req, res, next) => {
48
+ const service = new services_1.OperationsService({
49
+ accountability: req.accountability,
50
+ schema: req.schema,
51
+ });
52
+ const metaService = new services_1.MetaService({
53
+ accountability: req.accountability,
54
+ schema: req.schema,
55
+ });
56
+ const records = await service.readByQuery(req.sanitizedQuery);
57
+ const meta = await metaService.getMetaForQuery(req.collection, req.sanitizedQuery);
58
+ res.locals.payload = { data: records || null, meta };
59
+ return next();
60
+ });
61
+ router.get('/', (0, validate_batch_1.validateBatch)('read'), readHandler, respond_1.respond);
62
+ router.search('/', (0, validate_batch_1.validateBatch)('read'), readHandler, respond_1.respond);
63
+ router.get('/:pk', (0, async_handler_1.default)(async (req, res, next) => {
64
+ const service = new services_1.OperationsService({
65
+ accountability: req.accountability,
66
+ schema: req.schema,
67
+ });
68
+ const record = await service.readOne(req.params.pk, req.sanitizedQuery);
69
+ res.locals.payload = { data: record || null };
70
+ return next();
71
+ }), respond_1.respond);
72
+ router.patch('/', (0, validate_batch_1.validateBatch)('update'), (0, async_handler_1.default)(async (req, res, next) => {
73
+ const service = new services_1.OperationsService({
74
+ accountability: req.accountability,
75
+ schema: req.schema,
76
+ });
77
+ let keys = [];
78
+ if (req.body.keys) {
79
+ keys = await service.updateMany(req.body.keys, req.body.data);
80
+ }
81
+ else {
82
+ keys = await service.updateByQuery(req.body.query, req.body.data);
83
+ }
84
+ try {
85
+ const result = await service.readMany(keys, req.sanitizedQuery);
86
+ res.locals.payload = { data: result };
87
+ }
88
+ catch (error) {
89
+ if (error instanceof exceptions_1.ForbiddenException) {
90
+ return next();
91
+ }
92
+ throw error;
93
+ }
94
+ return next();
95
+ }), respond_1.respond);
96
+ router.patch('/:pk', (0, async_handler_1.default)(async (req, res, next) => {
97
+ const service = new services_1.OperationsService({
98
+ accountability: req.accountability,
99
+ schema: req.schema,
100
+ });
101
+ const primaryKey = await service.updateOne(req.params.pk, req.body);
102
+ try {
103
+ const item = await service.readOne(primaryKey, req.sanitizedQuery);
104
+ res.locals.payload = { data: item || null };
105
+ }
106
+ catch (error) {
107
+ if (error instanceof exceptions_1.ForbiddenException) {
108
+ return next();
109
+ }
110
+ throw error;
111
+ }
112
+ return next();
113
+ }), respond_1.respond);
114
+ router.delete('/', (0, async_handler_1.default)(async (req, res, next) => {
115
+ const service = new services_1.OperationsService({
116
+ accountability: req.accountability,
117
+ schema: req.schema,
118
+ });
119
+ if (Array.isArray(req.body)) {
120
+ await service.deleteMany(req.body);
121
+ }
122
+ else if (req.body.keys) {
123
+ await service.deleteMany(req.body.keys);
124
+ }
125
+ else {
126
+ await service.deleteByQuery(req.body.query);
127
+ }
128
+ return next();
129
+ }), respond_1.respond);
130
+ router.delete('/:pk', (0, async_handler_1.default)(async (req, res, next) => {
131
+ const service = new services_1.OperationsService({
132
+ accountability: req.accountability,
133
+ schema: req.schema,
134
+ });
135
+ await service.deleteOne(req.params.pk);
136
+ return next();
137
+ }), respond_1.respond);
138
+ exports.default = router;
@@ -22,18 +22,9 @@ function getDatabase() {
22
22
  if (database) {
23
23
  return database;
24
24
  }
25
- const connectionConfig = (0, get_config_from_env_1.getConfigFromEnv)('DB_', [
26
- 'DB_CLIENT',
27
- 'DB_VERSION',
28
- 'DB_SEARCH_PATH',
29
- 'DB_CONNECTION_STRING',
30
- 'DB_POOL',
31
- 'DB_EXCLUDE_TABLES',
32
- 'DB_VERSION',
33
- ]);
34
- const poolConfig = (0, get_config_from_env_1.getConfigFromEnv)('DB_POOL');
25
+ const { client, version, searchPath, connectionString, pool: poolConfig = {}, ...connectionConfig } = (0, get_config_from_env_1.getConfigFromEnv)('DB_', ['DB_EXCLUDE_TABLES']);
35
26
  const requiredEnvVars = ['DB_CLIENT'];
36
- switch (env_1.default.DB_CLIENT) {
27
+ switch (client) {
37
28
  case 'sqlite3':
38
29
  requiredEnvVars.push('DB_FILENAME');
39
30
  break;
@@ -47,7 +38,7 @@ function getDatabase() {
47
38
  break;
48
39
  case 'cockroachdb':
49
40
  case 'pg':
50
- if (!env_1.default.DB_CONNECTION_STRING) {
41
+ if (!connectionString) {
51
42
  requiredEnvVars.push('DB_HOST', 'DB_PORT', 'DB_DATABASE', 'DB_USER');
52
43
  }
53
44
  else {
@@ -64,10 +55,10 @@ function getDatabase() {
64
55
  }
65
56
  (0, validate_env_1.validateEnv)(requiredEnvVars);
66
57
  const knexConfig = {
67
- client: env_1.default.DB_CLIENT,
68
- version: env_1.default.DB_VERSION,
69
- searchPath: env_1.default.DB_SEARCH_PATH,
70
- connection: env_1.default.DB_CONNECTION_STRING || connectionConfig,
58
+ client,
59
+ version,
60
+ searchPath,
61
+ connection: connectionString || connectionConfig,
71
62
  log: {
72
63
  warn: (msg) => {
73
64
  // Ignore warnings about returning not being supported in some DBs
@@ -84,7 +75,7 @@ function getDatabase() {
84
75
  },
85
76
  pool: poolConfig,
86
77
  };
87
- if (env_1.default.DB_CLIENT === 'sqlite3') {
78
+ if (client === 'sqlite3') {
88
79
  knexConfig.useNullAsDefault = true;
89
80
  poolConfig.afterCreate = async (conn, callback) => {
90
81
  logger_1.default.trace('Enabling SQLite Foreign Keys support...');
@@ -93,7 +84,7 @@ function getDatabase() {
93
84
  callback(null, conn);
94
85
  };
95
86
  }
96
- if (env_1.default.DB_CLIENT === 'cockroachdb') {
87
+ if (client === 'cockroachdb') {
97
88
  poolConfig.afterCreate = async (conn, callback) => {
98
89
  logger_1.default.trace('Setting CRDB serial_normalization and default_int_size');
99
90
  const run = (0, util_1.promisify)(conn.query.bind(conn));
@@ -102,7 +93,7 @@ function getDatabase() {
102
93
  callback(null, conn);
103
94
  };
104
95
  }
105
- if (env_1.default.DB_CLIENT === 'mssql') {
96
+ if (client === 'mssql') {
106
97
  // This brings MS SQL in line with the other DB vendors. We shouldn't do any automatic
107
98
  // timezone conversion on the database level, especially not when other database vendors don't
108
99
  // act the same
@@ -0,0 +1,3 @@
1
+ import { Knex } from 'knex';
2
+ export declare function up(knex: Knex): Promise<void>;
3
+ export declare function down(knex: Knex): Promise<void>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ const utils_1 = require("@directus/shared/utils");
5
+ const uuid_1 = require("uuid");
6
+ const parse_json_1 = require("../../utils/parse-json");
7
+ async function up(knex) {
8
+ await knex.schema.createTable('directus_flows', (table) => {
9
+ table.uuid('id').primary().notNullable();
10
+ table.string('name').notNullable();
11
+ table.string('icon', 30);
12
+ table.string('color').nullable();
13
+ table.text('description');
14
+ table.string('status').notNullable().defaultTo('active');
15
+ table.string('trigger');
16
+ table.string('accountability').defaultTo('all');
17
+ table.json('options');
18
+ table.uuid('operation').unique();
19
+ table.timestamp('date_created').defaultTo(knex.fn.now());
20
+ table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL');
21
+ });
22
+ await knex.schema.createTable('directus_operations', (table) => {
23
+ table.uuid('id').primary().notNullable();
24
+ table.string('name');
25
+ table.string('key').notNullable();
26
+ table.string('type').notNullable();
27
+ table.integer('position_x').notNullable();
28
+ table.integer('position_y').notNullable();
29
+ table.json('options');
30
+ table.uuid('resolve').unique().references('id').inTable('directus_operations');
31
+ table.uuid('reject').unique().references('id').inTable('directus_operations');
32
+ table.uuid('flow').notNullable().references('id').inTable('directus_flows').onDelete('CASCADE');
33
+ table.timestamp('date_created').defaultTo(knex.fn.now());
34
+ table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL');
35
+ });
36
+ const webhooks = await knex.select('*').from('directus_webhooks');
37
+ const flows = [];
38
+ const operations = [];
39
+ for (const webhook of webhooks) {
40
+ const flowID = (0, uuid_1.v4)();
41
+ flows.push({
42
+ id: flowID,
43
+ name: webhook.name,
44
+ status: 'inactive',
45
+ trigger: 'hook',
46
+ options: JSON.stringify({
47
+ name: webhook.name,
48
+ type: 'action',
49
+ scope: (0, utils_1.toArray)(webhook.actions).map((scope) => `items.${scope}`),
50
+ collections: (0, utils_1.toArray)(webhook.collections),
51
+ }),
52
+ });
53
+ operations.push({
54
+ id: (0, uuid_1.v4)(),
55
+ name: 'Request',
56
+ key: 'request',
57
+ type: 'request',
58
+ position_x: 21,
59
+ position_y: 1,
60
+ options: JSON.stringify({
61
+ url: webhook.url,
62
+ headers: typeof webhook.headers === 'string' ? (0, parse_json_1.parseJSON)(webhook.headers) : webhook.headers,
63
+ data: webhook.data ? '{{$trigger}}' : null,
64
+ method: webhook.method,
65
+ }),
66
+ date_created: new Date(),
67
+ flow: flowID,
68
+ });
69
+ }
70
+ if (flows.length && operations.length) {
71
+ await knex.insert(flows).into('directus_flows');
72
+ await knex.insert(operations).into('directus_operations');
73
+ for (const operation of operations) {
74
+ await knex('directus_flows').update({ operation: operation.id }).where({ id: operation.flow });
75
+ }
76
+ }
77
+ }
78
+ exports.up = up;
79
+ async function down(knex) {
80
+ await knex.schema.dropTable('directus_operations');
81
+ await knex.schema.dropTable('directus_flows');
82
+ }
83
+ exports.down = down;
@@ -0,0 +1,3 @@
1
+ import { Knex } from 'knex';
2
+ export declare function up(knex: Knex): Promise<void>;
3
+ export declare function down(knex: Knex): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ async function up(knex) {
5
+ await knex.schema.alterTable('directus_dashboards', (table) => {
6
+ table.string('color').nullable();
7
+ });
8
+ }
9
+ exports.up = up;
10
+ async function down(knex) {
11
+ await knex.schema.alterTable('directus_dashboards', (table) => {
12
+ table.dropColumn('color');
13
+ });
14
+ }
15
+ exports.down = down;
@@ -0,0 +1,3 @@
1
+ import { Knex } from 'knex';
2
+ export declare function up(knex: Knex): Promise<void>;
3
+ export declare function down(knex: Knex): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ async function up(knex) {
5
+ await knex.schema.alterTable('directus_activity', (table) => {
6
+ table.setNullable('ip');
7
+ });
8
+ }
9
+ exports.up = up;
10
+ async function down(knex) {
11
+ await knex.schema.alterTable('directus_activity', (table) => {
12
+ table.dropNullable('ip');
13
+ });
14
+ }
15
+ exports.down = down;
@@ -0,0 +1,3 @@
1
+ import { Knex } from 'knex';
2
+ export declare function up(knex: Knex): Promise<void>;
3
+ export declare function down(knex: Knex): Promise<void>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ async function up(knex) {
5
+ await knex.schema.alterTable('directus_notifications', (table) => {
6
+ table.setNullable('sender');
7
+ });
8
+ }
9
+ exports.up = up;
10
+ async function down(knex) {
11
+ await knex.schema.alterTable('directus_notifications', (table) => {
12
+ table.dropNullable('sender');
13
+ });
14
+ }
15
+ exports.down = down;
@@ -20,7 +20,6 @@ columns:
20
20
  user_agent:
21
21
  type: string
22
22
  length: 255
23
- nullabel: false
24
23
  collection:
25
24
  type: string
26
25
  length: 64
@@ -68,3 +68,7 @@ data:
68
68
  - collection: directus_shares
69
69
  icon: share
70
70
  note: $t:directus_collection.directus_shares
71
+ - collection: directus_flows
72
+ note: $t:directus_collection.directus_flows
73
+ - collection: directus_operations
74
+ note: $t:directus_collection.directus_operations
@@ -0,0 +1,21 @@
1
+ table: directus_flows
2
+
3
+ fields:
4
+ - field: id
5
+ special: uuid
6
+ - field: name
7
+ - field: icon
8
+ - field: color
9
+ - field: note
10
+ - field: status
11
+ - field: trigger
12
+ - field: accountability
13
+ - field: options
14
+ special: cast-json
15
+ - field: operation
16
+ - field: operations
17
+ special: o2m
18
+ - field: date_created
19
+ special: date-created
20
+ - field: user_created
21
+ special: user-created
@@ -0,0 +1,19 @@
1
+ table: directus_operations
2
+
3
+ fields:
4
+ - field: id
5
+ special: uuid
6
+ - field: name
7
+ - field: key
8
+ - field: type
9
+ - field: position_x
10
+ - field: position_y
11
+ - field: options
12
+ special: cast-json
13
+ - field: resolve
14
+ - field: reject
15
+ - field: flow
16
+ - field: date_created
17
+ special: date-created
18
+ - field: user_created
19
+ special: user-created
@@ -135,10 +135,8 @@ fields:
135
135
  template: '{{ name }}'
136
136
 
137
137
  - field: token
138
- interface: token
139
- options:
140
- iconRight: vpn_key
141
- placeholder: $t:fields.directus_users.token_placeholder
138
+ interface: system-token
139
+ special: conceal
142
140
  width: full
143
141
 
144
142
  - field: id
@@ -61,6 +61,20 @@ data:
61
61
  many_field: dashboard
62
62
  one_collection: directus_dashboards
63
63
  one_field: panels
64
+ - many_collection: directus_flows
65
+ many_field: operation
66
+ one_collection: directus_operations
67
+ - many_collection: directus_operations
68
+ many_field: flow
69
+ one_collection: directus_flows
70
+ one_field: operations
71
+ one_deselect_action: delete
72
+ - many_collection: directus_operations
73
+ many_field: resolve
74
+ one_collection: directus_operations
75
+ - many_collection: directus_operations
76
+ many_field: reject
77
+ one_collection: directus_operations
64
78
  - many_collection: directus_files
65
79
  many_field: modified_by
66
80
  one_collection: directus_users
@@ -88,6 +102,12 @@ data:
88
102
  - many_collection: directus_panels
89
103
  many_field: user_created
90
104
  one_collection: directus_users
105
+ - many_collection: directus_flows
106
+ many_field: user_created
107
+ one_collection: directus_users
108
+ - many_collection: directus_operations
109
+ many_field: user_created
110
+ one_collection: directus_users
91
111
  - many_collection: directus_notifications
92
112
  many_field: recipient
93
113
  one_collection: directus_users
package/dist/env.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @NOTE
3
- * See example.env for all possible keys
3
+ * For all possible keys, see: https://docs.directus.io/configuration/config-options/
4
4
  */
5
5
  declare let env: Record<string, any>;
6
6
  export default env;
package/dist/env.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @NOTE
4
- * See example.env for all possible keys
4
+ * For all possible keys, see: https://docs.directus.io/configuration/config-options/
5
5
  */
6
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
7
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -28,22 +28,11 @@ const allowedEnvironmentVars = [
28
28
  'ROOT_REDIRECT',
29
29
  'SERVE_APP',
30
30
  'GRAPHQL_INTROSPECTION',
31
+ 'LOGGER_.+',
31
32
  // server
32
- 'SERVER_KEEP_ALIVE_TIMEOUT',
33
- 'SERVER_HEADERS_TIMEOUT',
33
+ 'SERVER_.+',
34
34
  // database
35
- 'DB_CLIENT',
36
- 'DB_HOST',
37
- 'DB_PORT',
38
- 'DB_DATABASE',
39
- 'DB_USER',
40
- 'DB_PASSWORD',
41
- 'DB_FILENAME',
42
- 'DB_CONNECTION_STRING',
43
- 'DB_POOL_.+',
44
- 'DB_EXCLUDE_TABLES',
45
- 'DB_CHARSET',
46
- 'DB_VERSION',
35
+ 'DB_.+',
47
36
  // security
48
37
  'KEY',
49
38
  'SECRET',
@@ -62,12 +51,7 @@ const allowedEnvironmentVars = [
62
51
  'CONTENT_SECURITY_POLICY_.+',
63
52
  'HSTS_.+',
64
53
  // hashing
65
- 'HASH_MEMORY_COST',
66
- 'HASH_LENGTH',
67
- 'HASH_TIME_COST',
68
- 'HASH_PARALLELISM',
69
- 'HASH_TYPE',
70
- 'HASH_ASSOCIATED_DATA',
54
+ 'HASH_.+',
71
55
  // cors
72
56
  'CORS_ENABLED',
73
57
  'CORS_ORIGIN',
@@ -77,15 +61,7 @@ const allowedEnvironmentVars = [
77
61
  'CORS_CREDENTIALS',
78
62
  'CORS_MAX_AGE',
79
63
  // rate limiting
80
- 'RATE_LIMITER_ENABLED',
81
- 'RATE_LIMITER_POINTS',
82
- 'RATE_LIMITER_DURATION',
83
- 'RATE_LIMITER_STORE',
84
- 'RATE_LIMITER_REDIS',
85
- 'RATE_LIMITER_REDIS_HOST',
86
- 'RATE_LIMITER_REDIS_PORT',
87
- 'RATE_LIMITER_REDIS_PASSWORD',
88
- 'RATE_LIMITER_MEMCACHE',
64
+ 'RATE_LIMITER_.+',
89
65
  // cache
90
66
  'CACHE_ENABLED',
91
67
  'CACHE_TTL',
@@ -29,9 +29,12 @@ declare class ExtensionManager {
29
29
  private getSharedDepsMapping;
30
30
  private registerHooks;
31
31
  private registerEndpoints;
32
+ private registerOperations;
32
33
  private registerHook;
33
34
  private registerEndpoint;
35
+ private registerOperation;
34
36
  private unregisterHooks;
35
37
  private unregisterEndpoints;
38
+ private unregisterOperations;
36
39
  }
37
40
  export {};