@crowdin/app-project-module 0.58.5 → 0.59.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/out/index.js +0 -2
- package/out/modules/integration/util/cron.js +17 -11
- package/out/modules/manifest.js +0 -7
- package/out/types.d.ts +0 -5
- package/package.json +1 -1
- package/out/modules/editor-themes/index.d.ts +0 -6
- package/out/modules/editor-themes/index.js +0 -11
- package/out/modules/editor-themes/types.d.ts +0 -17
- package/out/modules/editor-themes/types.js +0 -2
package/out/index.js
CHANGED
|
@@ -64,7 +64,6 @@ const aiProvider = __importStar(require("./modules/ai-provider"));
|
|
|
64
64
|
const aiPromptProvider = __importStar(require("./modules/ai-prompt-provider"));
|
|
65
65
|
const aiTools = __importStar(require("./modules/ai-tools"));
|
|
66
66
|
const editorRightPanelApp = __importStar(require("./modules/editor-right-panel"));
|
|
67
|
-
const editorThemesApp = __importStar(require("./modules/editor-themes"));
|
|
68
67
|
const externalQaCheck = __importStar(require("./modules/external-qa-check"));
|
|
69
68
|
const fileProcessingApps = __importStar(require("./modules/file-processing"));
|
|
70
69
|
const integrationApp = __importStar(require("./modules/integration"));
|
|
@@ -159,7 +158,6 @@ function addCrowdinEndpoints(app, clientConfig) {
|
|
|
159
158
|
* /handlers -> for http handlers
|
|
160
159
|
*/
|
|
161
160
|
integrationApp.register({ config, app });
|
|
162
|
-
editorThemesApp.register({ config, app });
|
|
163
161
|
customMTApp.register({ config, app });
|
|
164
162
|
fileProcessingApps.registerCustomFileFormat({ config, app });
|
|
165
163
|
fileProcessingApps.registerFilePreImport({ config, app });
|
|
@@ -157,17 +157,23 @@ function filesCron({ config, integration, period, }) {
|
|
|
157
157
|
if (!integration.webhooks &&
|
|
158
158
|
((_a = integration.syncNewElements) === null || _a === void 0 ? void 0 : _a[syncSettings.provider]) &&
|
|
159
159
|
intConfig[`new-${syncSettings.provider}-files`]) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
160
|
+
try {
|
|
161
|
+
newFiles = yield getAllNewFiles({
|
|
162
|
+
config,
|
|
163
|
+
integration,
|
|
164
|
+
projectData,
|
|
165
|
+
syncSettings,
|
|
166
|
+
crowdinApiClient: crowdinClient,
|
|
167
|
+
crowdinId: crowdinCredentials.id,
|
|
168
|
+
integrationCredentials: apiCredentials,
|
|
169
|
+
integrationId: integrationCredentials.id,
|
|
170
|
+
integrationSettings: intConfig,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
catch (e) {
|
|
174
|
+
(0, logger_1.logError)(e);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
171
177
|
}
|
|
172
178
|
if (integration.webhooks) {
|
|
173
179
|
const webhooks = yield (0, storage_1.getStorage)().getAllWebhooks(syncSettings.integrationId, syncSettings.crowdinId, syncSettings.provider);
|
package/out/modules/manifest.js
CHANGED
|
@@ -102,13 +102,6 @@ function handle(config) {
|
|
|
102
102
|
})),
|
|
103
103
|
];
|
|
104
104
|
}
|
|
105
|
-
if (config.editorThemes) {
|
|
106
|
-
modules['editor-themes'] = [
|
|
107
|
-
Object.assign({ key: config.identifier + '-editor-themes', name: config.editorThemes.name || config.name, logo: (0, util_1.getLogoUrl)(config.editorThemes, '/editor-themes'), styles: config.editorThemes.styles, modes: config.editorThemes.modes }, (!!config.editorThemes.environments && {
|
|
108
|
-
environments: normalizeEnvironments(config.editorThemes.environments),
|
|
109
|
-
})),
|
|
110
|
-
];
|
|
111
|
-
}
|
|
112
105
|
if (config.projectMenu) {
|
|
113
106
|
modules['project-menu'] = [
|
|
114
107
|
Object.assign({ key: config.identifier + '-project-menu', name: config.projectMenu.name || config.name, url: '/project-menu/' + (config.projectMenu.fileName || 'index.html') }, (!!config.projectMenu.environments && {
|
package/out/types.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { ContextModule } from './modules/context-menu/types';
|
|
|
5
5
|
import { CustomMTLogic } from './modules/custom-mt/types';
|
|
6
6
|
import { CustomSpellcheckerModule } from './modules/custom-spell-check/types';
|
|
7
7
|
import { EditorPanels } from './modules/editor-right-panel/types';
|
|
8
|
-
import { EditorThemes } from './modules/editor-themes/types';
|
|
9
8
|
import { CustomFileFormatLogic, FilePostExportLogic, FilePostImportLogic, FilePreExportLogic, FilePreImportLogic } from './modules/file-processing/types';
|
|
10
9
|
import { IntegrationLogic } from './modules/integration/types';
|
|
11
10
|
import { MySQLStorageConfig } from './storage/mysql';
|
|
@@ -113,10 +112,6 @@ export interface ClientConfig extends ImagePath {
|
|
|
113
112
|
* editor-right-panel module
|
|
114
113
|
*/
|
|
115
114
|
editorRightPanel?: EditorPanels & Environments;
|
|
116
|
-
/**
|
|
117
|
-
* editor-themes module
|
|
118
|
-
*/
|
|
119
|
-
editorThemes?: EditorThemes & ImagePath & Environments;
|
|
120
115
|
/**
|
|
121
116
|
* project menu module
|
|
122
117
|
*/
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.register = void 0;
|
|
4
|
-
const util_1 = require("../../util");
|
|
5
|
-
function register({ config, app }) {
|
|
6
|
-
if (!config.editorThemes) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
app.get((0, util_1.getLogoUrl)(config.editorThemes, '/editor-themes'), (req, res) => { var _a; return res.sendFile(((_a = config.editorThemes) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath); });
|
|
10
|
-
}
|
|
11
|
-
exports.register = register;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EditorMode } from '../../types';
|
|
2
|
-
export interface EditorThemes {
|
|
3
|
-
/**
|
|
4
|
-
* Module name
|
|
5
|
-
*/
|
|
6
|
-
name?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Defines a set of CSS custom variables for theming purposes
|
|
9
|
-
*/
|
|
10
|
-
styles: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* The Editor's mode list where the module will be available.
|
|
15
|
-
*/
|
|
16
|
-
modes: EditorMode[];
|
|
17
|
-
}
|