@crowdin/app-project-module 1.15.1 → 2.0.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 (101) hide show
  1. package/out/index.js +8 -15
  2. package/out/middlewares/auto-credentials-masker.js +5 -2
  3. package/out/middlewares/crowdin-client.d.ts +1 -1
  4. package/out/middlewares/crowdin-client.js +1 -1
  5. package/out/middlewares/export.d.ts +2 -2
  6. package/out/middlewares/export.js +4 -35
  7. package/out/middlewares/json-response.d.ts +1 -1
  8. package/out/middlewares/json-response.js +1 -1
  9. package/out/modules/ai-prompt-provider/index.js +6 -6
  10. package/out/modules/ai-provider/index.js +7 -7
  11. package/out/modules/ai-provider/types.d.ts +10 -0
  12. package/out/modules/ai-provider/types.js +12 -0
  13. package/out/modules/ai-provider/util/index.d.ts +0 -10
  14. package/out/modules/ai-provider/util/index.js +2 -13
  15. package/out/modules/ai-request-processors/index.js +4 -4
  16. package/out/modules/api/api.js +18 -18
  17. package/out/modules/auth-guard/index.js +4 -5
  18. package/out/modules/automation-action/index.js +4 -6
  19. package/out/modules/context-menu/index.js +4 -13
  20. package/out/modules/custom-mt/index.js +4 -4
  21. package/out/modules/custom-spell-check/index.js +11 -11
  22. package/out/modules/editor-right-panel/index.js +1 -1
  23. package/out/modules/external-qa-check/index.js +7 -7
  24. package/out/modules/file-processing/index.js +14 -14
  25. package/out/modules/integration/index.js +26 -26
  26. package/out/modules/integration/types.d.ts +4 -4
  27. package/out/modules/integration/util/files.js +1 -1
  28. package/out/modules/integration/util/types.d.ts +1 -1
  29. package/out/modules/manifest.js +70 -281
  30. package/out/modules/modal/index.js +4 -13
  31. package/out/modules/organization-menu/index.js +1 -1
  32. package/out/modules/organization-settings-menu/index.js +1 -1
  33. package/out/modules/profile-resources-menu/index.js +1 -1
  34. package/out/modules/profile-settings-menu/index.js +1 -1
  35. package/out/modules/project-menu/index.js +1 -1
  36. package/out/modules/project-menu-crowdsource/index.js +1 -1
  37. package/out/modules/project-reports/index.js +1 -1
  38. package/out/modules/project-tools/index.js +1 -1
  39. package/out/modules/webhooks/index.js +3 -6
  40. package/out/modules/workflow-step-type/index.js +6 -6
  41. package/out/static/ui/form.bundle.js +7947 -6975
  42. package/out/static/ui/form.bundle.js.map +1 -1
  43. package/out/storage/drizzle/d1/index.d.ts +7 -0
  44. package/out/storage/drizzle/d1/index.js +48 -0
  45. package/out/storage/drizzle/d1/migrations/init.d.ts +2 -0
  46. package/out/storage/drizzle/d1/migrations/init.js +122 -0
  47. package/out/storage/drizzle/d1/types.d.ts +13 -0
  48. package/out/storage/drizzle/d1/types.js +38 -0
  49. package/out/storage/{sqlite.d.ts → drizzle/index.d.ts} +37 -58
  50. package/out/storage/drizzle/index.js +939 -0
  51. package/out/storage/drizzle/postgresql/config.d.ts +5 -0
  52. package/out/storage/drizzle/postgresql/config.js +11 -0
  53. package/out/storage/drizzle/postgresql/index.d.ts +14 -0
  54. package/out/storage/drizzle/postgresql/index.js +144 -0
  55. package/out/storage/drizzle/postgresql/migrations/0000_init.sql +113 -0
  56. package/out/storage/drizzle/postgresql/migrations/0001_init_indexes.sql +28 -0
  57. package/out/storage/drizzle/postgresql/migrations/meta/0000_snapshot.json +646 -0
  58. package/out/storage/drizzle/postgresql/migrations/meta/0001_snapshot.json +646 -0
  59. package/out/storage/drizzle/postgresql/migrations/meta/_journal.json +20 -0
  60. package/out/storage/drizzle/postgresql/schema.d.ts +1410 -0
  61. package/out/storage/drizzle/postgresql/schema.js +106 -0
  62. package/out/storage/drizzle/sqlite/config.d.ts +5 -0
  63. package/out/storage/drizzle/sqlite/config.js +11 -0
  64. package/out/storage/drizzle/sqlite/index.d.ts +8 -0
  65. package/out/storage/drizzle/sqlite/index.js +63 -0
  66. package/out/storage/drizzle/sqlite/migrations/0000_init.sql +113 -0
  67. package/out/storage/drizzle/sqlite/migrations/meta/0000_snapshot.json +687 -0
  68. package/out/storage/drizzle/sqlite/migrations/meta/_journal.json +13 -0
  69. package/out/storage/drizzle/sqlite/schema.d.ts +1544 -0
  70. package/out/storage/drizzle/sqlite/schema.js +106 -0
  71. package/out/storage/index.d.ts +2 -88
  72. package/out/storage/index.js +12 -128
  73. package/out/storage/internal/backup.d.ts +3 -0
  74. package/out/storage/internal/backup.js +94 -0
  75. package/out/storage/types.d.ts +66 -0
  76. package/out/types.d.ts +43 -47
  77. package/out/util/credentials-masker.js +2 -2
  78. package/out/util/export.d.ts +1 -0
  79. package/out/util/export.js +2 -1
  80. package/out/util/index.d.ts +2 -1
  81. package/out/util/index.js +12 -9
  82. package/out/util/normalize-module.d.ts +0 -1
  83. package/out/util/normalize-module.js +0 -4
  84. package/package.json +23 -23
  85. package/out/modules/ai-tools/handlers/tool-calls.d.ts +0 -4
  86. package/out/modules/ai-tools/handlers/tool-calls.js +0 -52
  87. package/out/modules/ai-tools/index.d.ts +0 -10
  88. package/out/modules/ai-tools/index.js +0 -46
  89. package/out/modules/ai-tools/types.d.ts +0 -63
  90. package/out/modules/ai-tools/types.js +0 -2
  91. package/out/modules/ai-tools/util/index.d.ts +0 -5
  92. package/out/modules/ai-tools/util/index.js +0 -24
  93. package/out/storage/d1.d.ts +0 -107
  94. package/out/storage/d1.js +0 -837
  95. package/out/storage/export.d.ts +0 -1
  96. package/out/storage/export.js +0 -2
  97. package/out/storage/mysql.d.ts +0 -109
  98. package/out/storage/mysql.js +0 -984
  99. package/out/storage/postgre.d.ts +0 -124
  100. package/out/storage/postgre.js +0 -1027
  101. package/out/storage/sqlite.js +0 -786
@@ -14,7 +14,7 @@ function register({ config, app }) {
14
14
  if (!config.profileResourcesMenu) {
15
15
  return;
16
16
  }
17
- const items = (0, normalize_module_1.normalizeToArray)(config.profileResourcesMenu);
17
+ const items = config.profileResourcesMenu;
18
18
  const isSingle = items.length === 1;
19
19
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
20
20
  for (const [index, item] of items.entries()) {
@@ -14,7 +14,7 @@ function register({ config, app }) {
14
14
  if (!config.profileSettingsMenu) {
15
15
  return;
16
16
  }
17
- const items = (0, normalize_module_1.normalizeToArray)(config.profileSettingsMenu);
17
+ const items = config.profileSettingsMenu;
18
18
  const isSingle = items.length === 1;
19
19
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
20
20
  for (const [index, item] of items.entries()) {
@@ -13,7 +13,7 @@ function register({ config, app }) {
13
13
  if (!config.projectMenu) {
14
14
  return;
15
15
  }
16
- const items = (0, normalize_module_1.normalizeToArray)(config.projectMenu);
16
+ const items = config.projectMenu;
17
17
  const isSingle = items.length === 1;
18
18
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
19
19
  for (const [index, item] of items.entries()) {
@@ -13,7 +13,7 @@ function register({ config, app }) {
13
13
  if (!config.projectMenuCrowdsource) {
14
14
  return;
15
15
  }
16
- const items = (0, normalize_module_1.normalizeToArray)(config.projectMenuCrowdsource);
16
+ const items = config.projectMenuCrowdsource;
17
17
  const isSingle = items.length === 1;
18
18
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
19
19
  for (const [index, item] of items.entries()) {
@@ -14,7 +14,7 @@ function register({ config, app }) {
14
14
  if (!config.projectReports) {
15
15
  return;
16
16
  }
17
- const items = (0, normalize_module_1.normalizeToArray)(config.projectReports);
17
+ const items = config.projectReports;
18
18
  const isSingle = items.length === 1;
19
19
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
20
20
  for (const [index, item] of items.entries()) {
@@ -14,7 +14,7 @@ function register({ config, app }) {
14
14
  if (!config.projectTools) {
15
15
  return;
16
16
  }
17
- const items = (0, normalize_module_1.normalizeToArray)(config.projectTools);
17
+ const items = config.projectTools;
18
18
  const isSingle = items.length === 1;
19
19
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
20
20
  for (const [index, item] of items.entries()) {
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.register = register;
7
- const json_response_1 = __importDefault(require("../../middlewares/json-response"));
4
+ const json_response_1 = require("../../middlewares/json-response");
8
5
  const webhook_handler_1 = require("./handlers/webhook-handler");
9
6
  function register({ config, app }) {
10
7
  if (!config.webhooks) {
11
8
  return;
12
9
  }
13
- const webhooks = Array.isArray(config.webhooks) ? config.webhooks : [config.webhooks];
10
+ const webhooks = config.webhooks;
14
11
  if (webhooks.length) {
15
- app.post('/webhooks', json_response_1.default, (0, webhook_handler_1.webhookHandler)(config, webhooks));
12
+ app.post('/webhooks', json_response_1.handle, (0, webhook_handler_1.webhookHandler)(config, webhooks));
16
13
  }
17
14
  }
@@ -7,7 +7,7 @@ exports.register = register;
7
7
  const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
8
8
  const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
9
9
  const util_1 = require("./util");
10
- const crowdin_client_1 = __importDefault(require("../../middlewares/crowdin-client"));
10
+ const crowdin_client_1 = require("../../middlewares/crowdin-client");
11
11
  const step_settings_save_1 = __importDefault(require("./handlers/step-settings-save"));
12
12
  const delete_step_1 = __importDefault(require("./handlers/delete-step"));
13
13
  const util_2 = require("../../util");
@@ -15,27 +15,27 @@ function register({ config, app }) {
15
15
  if (!config.workflowStepType) {
16
16
  return;
17
17
  }
18
- const workflowSteps = Array.isArray(config.workflowStepType) ? config.workflowStepType : [config.workflowStepType];
18
+ const workflowSteps = config.workflowStepType;
19
19
  for (const workflowStep of workflowSteps) {
20
- app.post((0, util_1.getWorkflowStepUrl)('/workflow-step/settings', workflowStep), (0, crowdin_client_1.default)({
20
+ app.post((0, util_1.getWorkflowStepUrl)('/workflow-step/settings', workflowStep), (0, crowdin_client_1.handle)({
21
21
  config,
22
22
  optional: true,
23
23
  checkSubscriptionExpiration: false,
24
24
  moduleKey: workflowStep.key,
25
25
  }), (0, step_settings_save_1.default)(workflowStep));
26
- app.delete((0, util_1.getWorkflowStepUrl)('/workflow-step/delete', workflowStep), (0, crowdin_client_1.default)({
26
+ app.delete((0, util_1.getWorkflowStepUrl)('/workflow-step/delete', workflowStep), (0, crowdin_client_1.handle)({
27
27
  config,
28
28
  optional: true,
29
29
  checkSubscriptionExpiration: false,
30
30
  moduleKey: workflowStep.key,
31
31
  }), (0, delete_step_1.default)(workflowStep));
32
32
  // TEMPORARY CODE: it needs to support old path
33
- app.post((0, util_1.getWorkflowStepUrl)('/settings', workflowStep), (0, crowdin_client_1.default)({
33
+ app.post((0, util_1.getWorkflowStepUrl)('/settings', workflowStep), (0, crowdin_client_1.handle)({
34
34
  config,
35
35
  optional: true,
36
36
  checkSubscriptionExpiration: false,
37
37
  }), (0, step_settings_save_1.default)(workflowStep));
38
- app.delete((0, util_1.getWorkflowStepUrl)('/delete', workflowStep), (0, crowdin_client_1.default)({
38
+ app.delete((0, util_1.getWorkflowStepUrl)('/delete', workflowStep), (0, crowdin_client_1.handle)({
39
39
  config,
40
40
  optional: true,
41
41
  checkSubscriptionExpiration: false,