@inlang/sdk 0.8.0 → 0.10.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/dist/adapter/solidAdapter.test.js +1 -1
- package/dist/errors.d.ts +18 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -10
- package/dist/loadProject.d.ts.map +1 -1
- package/dist/loadProject.js +14 -10
- package/dist/loadProject.test.js +4 -5
- package/dist/resolve-modules/errors.d.ts +6 -5
- package/dist/resolve-modules/errors.d.ts.map +1 -1
- package/dist/resolve-modules/errors.js +10 -8
- package/dist/resolve-modules/import.d.ts.map +1 -1
- package/dist/resolve-modules/import.js +2 -3
- package/dist/resolve-modules/message-lint-rules/errors.d.ts +5 -4
- package/dist/resolve-modules/message-lint-rules/errors.d.ts.map +1 -1
- package/dist/resolve-modules/message-lint-rules/errors.js +2 -4
- package/dist/resolve-modules/message-lint-rules/resolveMessageLintRules.d.ts.map +1 -1
- package/dist/resolve-modules/message-lint-rules/resolveMessageLintRules.js +4 -2
- package/dist/resolve-modules/plugins/errors.d.ts +35 -28
- package/dist/resolve-modules/plugins/errors.d.ts.map +1 -1
- package/dist/resolve-modules/plugins/errors.js +23 -30
- package/dist/resolve-modules/plugins/resolvePlugins.d.ts.map +1 -1
- package/dist/resolve-modules/plugins/resolvePlugins.js +17 -18
- package/dist/resolve-modules/plugins/resolvePlugins.test.js +79 -49
- package/dist/resolve-modules/plugins/types.d.ts +4 -5
- package/dist/resolve-modules/plugins/types.d.ts.map +1 -1
- package/dist/resolve-modules/resolveModules.d.ts.map +1 -1
- package/dist/resolve-modules/resolveModules.js +5 -4
- package/dist/resolve-modules/resolveModules.test.js +2 -2
- package/dist/test-utilities/createMessage.d.ts +1 -1
- package/package.json +1 -1
- package/src/adapter/solidAdapter.test.ts +1 -1
- package/src/errors.ts +19 -10
- package/src/loadProject.test.ts +11 -14
- package/src/loadProject.ts +18 -17
- package/src/resolve-modules/errors.ts +14 -8
- package/src/resolve-modules/import.ts +2 -3
- package/src/resolve-modules/message-lint-rules/errors.ts +5 -5
- package/src/resolve-modules/message-lint-rules/resolveMessageLintRules.ts +4 -2
- package/src/resolve-modules/plugins/errors.ts +34 -36
- package/src/resolve-modules/plugins/resolvePlugins.test.ts +94 -62
- package/src/resolve-modules/plugins/resolvePlugins.ts +19 -50
- package/src/resolve-modules/plugins/types.ts +4 -8
- package/src/resolve-modules/resolveModules.test.ts +2 -2
- package/src/resolve-modules/resolveModules.ts +5 -6
|
@@ -143,7 +143,7 @@ describe("messages", () => {
|
|
|
143
143
|
description: {
|
|
144
144
|
en: "wo",
|
|
145
145
|
},
|
|
146
|
-
loadMessages: ({
|
|
146
|
+
loadMessages: ({ settings }) => (settings.languageTags.length ? exampleMessages : []),
|
|
147
147
|
saveMessages: () => undefined,
|
|
148
148
|
};
|
|
149
149
|
const mockImport = async () => ({ default: mockPlugin });
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
+
import type { ValueError } from "@sinclair/typebox/errors";
|
|
1
2
|
export declare class ProjectSettingsInvalidError extends Error {
|
|
2
|
-
constructor(
|
|
3
|
+
constructor(options: {
|
|
4
|
+
errors: ValueError[];
|
|
5
|
+
});
|
|
3
6
|
}
|
|
4
7
|
export declare class ProjectSettingsFileJSONSyntaxError extends Error {
|
|
5
|
-
constructor(
|
|
8
|
+
constructor(options: {
|
|
9
|
+
cause: ErrorOptions["cause"];
|
|
10
|
+
path: string;
|
|
11
|
+
});
|
|
6
12
|
}
|
|
7
13
|
export declare class ProjectSettingsFileNotFoundError extends Error {
|
|
8
|
-
constructor(
|
|
14
|
+
constructor(options: {
|
|
15
|
+
cause?: ErrorOptions["cause"];
|
|
16
|
+
path: string;
|
|
17
|
+
});
|
|
9
18
|
}
|
|
10
19
|
export declare class PluginSaveMessagesError extends Error {
|
|
11
|
-
constructor(
|
|
20
|
+
constructor(options: {
|
|
21
|
+
cause: ErrorOptions["cause"];
|
|
22
|
+
});
|
|
12
23
|
}
|
|
13
24
|
export declare class PluginLoadMessagesError extends Error {
|
|
14
|
-
constructor(
|
|
25
|
+
constructor(options: {
|
|
26
|
+
cause: ErrorOptions["cause"];
|
|
27
|
+
});
|
|
15
28
|
}
|
|
16
29
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,2BAA4B,SAAQ,KAAK;gBACzC,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,qBAAa,2BAA4B,SAAQ,KAAK;gBACzC,OAAO,EAAE;QAAE,MAAM,EAAE,UAAU,EAAE,CAAA;KAAE;CAQ7C;AAED,qBAAa,kCAAmC,SAAQ,KAAK;gBAChD,OAAO,EAAE;QAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAOnE;AAED,qBAAa,gCAAiC,SAAQ,KAAK;gBAC9C,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAIpE;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACrC,OAAO,EAAE;QAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;KAAE;CAIrD;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACrC,OAAO,EAAE;QAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;KAAE;CAIrD"}
|
package/dist/errors.js
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
export class ProjectSettingsInvalidError extends Error {
|
|
2
|
-
constructor(
|
|
3
|
-
super(
|
|
2
|
+
constructor(options) {
|
|
3
|
+
super(`The project settings are invalid:\n\n${options.errors
|
|
4
|
+
.map((error) => `The value of "${error.path}" is invalid:\n\n${error.message}`)
|
|
5
|
+
.join("\n")}`);
|
|
4
6
|
this.name = "ProjectSettingsInvalidError";
|
|
5
7
|
}
|
|
6
8
|
}
|
|
7
9
|
export class ProjectSettingsFileJSONSyntaxError extends Error {
|
|
8
|
-
constructor(
|
|
9
|
-
super(
|
|
10
|
+
constructor(options) {
|
|
11
|
+
super(`The settings file at "${options.path}" is not a valid JSON file:\n\n${options.cause}`, options);
|
|
10
12
|
this.name = "ProjectSettingsFileJSONSyntaxError";
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
export class ProjectSettingsFileNotFoundError extends Error {
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
16
|
+
constructor(options) {
|
|
17
|
+
super(`The file at "${options.path}" could not be read. Does the file exists?`, options);
|
|
16
18
|
this.name = "ProjectSettingsFileNotFoundError";
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
export class PluginSaveMessagesError extends Error {
|
|
20
|
-
constructor(
|
|
21
|
-
super(
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super(`An error occured in saveMessages() caused by ${options.cause}.`, options);
|
|
22
24
|
this.name = "PluginSaveMessagesError";
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
export class PluginLoadMessagesError extends Error {
|
|
26
|
-
constructor(
|
|
27
|
-
super(
|
|
28
|
+
constructor(options) {
|
|
29
|
+
super(`An error occured in loadMessages() caused by ${options.cause}.`, options);
|
|
28
30
|
this.name = "PluginLoadMessagesError";
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadProject.d.ts","sourceRoot":"","sources":["../src/loadProject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,aAAa,EAGb,YAAY,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,4BAA4B,CAAA;AAahF,OAAO,EAA4B,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAMjG;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;sBACL,MAAM;eACb,uBAAuB;;qBAElB,MAAM,SAAS,OAAO,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;MAC5D,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"loadProject.d.ts","sourceRoot":"","sources":["../src/loadProject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,aAAa,EAGb,YAAY,EACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,4BAA4B,CAAA;AAahF,OAAO,EAA4B,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAMjG;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;sBACL,MAAM;eACb,uBAAuB;;qBAElB,MAAM,SAAS,OAAO,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI;MAC5D,QAAQ,aAAa,CAqLxB,CAAA;AAqGD,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAQtE"}
|
package/dist/loadProject.js
CHANGED
|
@@ -46,7 +46,7 @@ export const loadProject = async (args) => {
|
|
|
46
46
|
if (error instanceof ProjectSettingsInvalidError) {
|
|
47
47
|
return { error };
|
|
48
48
|
}
|
|
49
|
-
throw new Error("
|
|
49
|
+
throw new Error("Unhandled error in setSettings. This is an internal bug. Please file an issue.");
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
// -- resolvedModules -----------------------------------------------------------
|
|
@@ -77,14 +77,13 @@ export const loadProject = async (args) => {
|
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
makeTrulyAsync(_resolvedModules.resolvedPluginApi.loadMessages({
|
|
80
|
-
|
|
81
|
-
sourceLanguageTag: settingsValue.sourceLanguageTag,
|
|
80
|
+
settings: settingsValue,
|
|
82
81
|
}))
|
|
83
82
|
.then((messages) => {
|
|
84
83
|
setMessages(messages);
|
|
85
84
|
markInitAsComplete();
|
|
86
85
|
})
|
|
87
|
-
.catch((err) => markInitAsFailed(new PluginLoadMessagesError(
|
|
86
|
+
.catch((err) => markInitAsFailed(new PluginLoadMessagesError({ cause: err })));
|
|
88
87
|
});
|
|
89
88
|
// -- installed items ----------------------------------------------------
|
|
90
89
|
const installedMessageLintRules = () => {
|
|
@@ -117,10 +116,13 @@ export const loadProject = async (args) => {
|
|
|
117
116
|
const lintReportsQuery = createMessageLintReportsQuery(messages, settings, installedMessageLintRules, resolvedModules);
|
|
118
117
|
const debouncedSave = skipFirst(debounce(500, async (newMessages) => {
|
|
119
118
|
try {
|
|
120
|
-
await resolvedModules()?.resolvedPluginApi.saveMessages({
|
|
119
|
+
await resolvedModules()?.resolvedPluginApi.saveMessages({
|
|
120
|
+
settings: settingsValue,
|
|
121
|
+
messages: newMessages,
|
|
122
|
+
});
|
|
121
123
|
}
|
|
122
124
|
catch (err) {
|
|
123
|
-
throw new PluginSaveMessagesError(
|
|
125
|
+
throw new PluginSaveMessagesError({
|
|
124
126
|
cause: err,
|
|
125
127
|
});
|
|
126
128
|
}
|
|
@@ -158,13 +160,15 @@ export const loadProject = async (args) => {
|
|
|
158
160
|
const loadSettings = async (args) => {
|
|
159
161
|
const { data: settingsFile, error: settingsFileError } = await tryCatch(async () => await args.nodeishFs.readFile(args.settingsFilePath, { encoding: "utf-8" }));
|
|
160
162
|
if (settingsFileError)
|
|
161
|
-
throw new ProjectSettingsFileNotFoundError(
|
|
163
|
+
throw new ProjectSettingsFileNotFoundError({
|
|
162
164
|
cause: settingsFileError,
|
|
165
|
+
path: args.settingsFilePath,
|
|
163
166
|
});
|
|
164
167
|
const json = tryCatch(() => JSON.parse(settingsFile));
|
|
165
168
|
if (json.error) {
|
|
166
|
-
throw new ProjectSettingsFileJSONSyntaxError(
|
|
169
|
+
throw new ProjectSettingsFileJSONSyntaxError({
|
|
167
170
|
cause: json.error,
|
|
171
|
+
path: args.settingsFilePath,
|
|
168
172
|
});
|
|
169
173
|
}
|
|
170
174
|
return parseSettings(json.data);
|
|
@@ -174,8 +178,8 @@ const parseSettings = (settings) => {
|
|
|
174
178
|
if (settingsCompiler.Check(withMigration) === false) {
|
|
175
179
|
const typeErrors = [...settingsCompiler.Errors(settings)];
|
|
176
180
|
if (typeErrors.length > 0) {
|
|
177
|
-
throw new ProjectSettingsInvalidError(
|
|
178
|
-
|
|
181
|
+
throw new ProjectSettingsInvalidError({
|
|
182
|
+
errors: typeErrors,
|
|
179
183
|
});
|
|
180
184
|
}
|
|
181
185
|
}
|
package/dist/loadProject.test.js
CHANGED
|
@@ -399,14 +399,15 @@ describe("functionality", () => {
|
|
|
399
399
|
describe("query", () => {
|
|
400
400
|
it("should call saveMessages() on updates", async () => {
|
|
401
401
|
const fs = createNodeishMemoryFs();
|
|
402
|
-
|
|
402
|
+
const settings = {
|
|
403
403
|
sourceLanguageTag: "en",
|
|
404
404
|
languageTags: ["en", "de"],
|
|
405
405
|
modules: ["plugin.js"],
|
|
406
406
|
"plugin.project.json": {
|
|
407
407
|
pathPattern: "./resources/{languageTag}.json",
|
|
408
408
|
},
|
|
409
|
-
}
|
|
409
|
+
};
|
|
410
|
+
await fs.writeFile("./project.inlang.json", JSON.stringify(settings));
|
|
410
411
|
await fs.mkdir("./resources");
|
|
411
412
|
const mockSaveFn = vi.fn();
|
|
412
413
|
const _mockPlugin = {
|
|
@@ -486,9 +487,7 @@ describe("functionality", () => {
|
|
|
486
487
|
});
|
|
487
488
|
await new Promise((resolve) => setTimeout(resolve, 510));
|
|
488
489
|
expect(mockSaveFn.mock.calls.length).toBe(1);
|
|
489
|
-
expect(mockSaveFn.mock.calls[0][0].settings).toStrictEqual(
|
|
490
|
-
pathPattern: "./resources/{languageTag}.json",
|
|
491
|
-
});
|
|
490
|
+
expect(mockSaveFn.mock.calls[0][0].settings).toStrictEqual(settings);
|
|
492
491
|
expect(Object.values(mockSaveFn.mock.calls[0][0].messages)).toStrictEqual([
|
|
493
492
|
{
|
|
494
493
|
id: "a",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ValueError } from "@sinclair/typebox/errors";
|
|
1
2
|
export * from "./plugins/errors.js";
|
|
2
3
|
export * from "./message-lint-rules/errors.js";
|
|
3
4
|
export declare class ModuleError extends Error {
|
|
4
|
-
readonly
|
|
5
|
+
readonly module: string;
|
|
5
6
|
constructor(message: string, options: {
|
|
6
7
|
module: string;
|
|
7
8
|
cause?: Error;
|
|
@@ -11,7 +12,7 @@ export declare class ModuleError extends Error {
|
|
|
11
12
|
* Error when a Module does not export any plugins or lint rules.
|
|
12
13
|
*/
|
|
13
14
|
export declare class ModuleHasNoExportsError extends ModuleError {
|
|
14
|
-
constructor(
|
|
15
|
+
constructor(options: {
|
|
15
16
|
module: string;
|
|
16
17
|
cause?: Error;
|
|
17
18
|
});
|
|
@@ -20,15 +21,15 @@ export declare class ModuleHasNoExportsError extends ModuleError {
|
|
|
20
21
|
* Error when a Module cannot be imported.
|
|
21
22
|
*/
|
|
22
23
|
export declare class ModuleImportError extends ModuleError {
|
|
23
|
-
constructor(
|
|
24
|
+
constructor(options: {
|
|
24
25
|
module: string;
|
|
25
26
|
cause: Error;
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
export declare class ModuleExportIsInvalidError extends ModuleError {
|
|
29
|
-
constructor(
|
|
30
|
+
constructor(options: {
|
|
30
31
|
module: string;
|
|
31
|
-
|
|
32
|
+
errors: ValueError[];
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/resolve-modules/errors.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAE9C,qBAAa,WAAY,SAAQ,KAAK;IACrC,SAAgB,MAAM,EAAE,MAAM,CAAA;gBAClB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;CAMvE;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;gBAC3C,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/resolve-modules/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAE9C,qBAAa,WAAY,SAAQ,KAAK;IACrC,SAAgB,MAAM,EAAE,MAAM,CAAA;gBAClB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;CAMvE;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;gBAC3C,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE;CAItD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;gBACrC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE;CAIrD;AAED,qBAAa,0BAA2B,SAAQ,WAAW;gBAC9C,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,EAAE,CAAA;KAAE;CAS7D"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from "./plugins/errors.js";
|
|
2
2
|
export * from "./message-lint-rules/errors.js";
|
|
3
3
|
export class ModuleError extends Error {
|
|
4
|
-
|
|
4
|
+
module;
|
|
5
5
|
constructor(message, options) {
|
|
6
6
|
super(message);
|
|
7
7
|
this.name = "ModuleError";
|
|
8
|
-
this.
|
|
8
|
+
this.module = options.module;
|
|
9
9
|
this.cause = options.cause;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -13,8 +13,8 @@ export class ModuleError extends Error {
|
|
|
13
13
|
* Error when a Module does not export any plugins or lint rules.
|
|
14
14
|
*/
|
|
15
15
|
export class ModuleHasNoExportsError extends ModuleError {
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
16
|
+
constructor(options) {
|
|
17
|
+
super(`Module "${module}" has no exports. Every module must have an "export default".`, options);
|
|
18
18
|
this.name = "ModuleHasNoExportsError";
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -22,14 +22,16 @@ export class ModuleHasNoExportsError extends ModuleError {
|
|
|
22
22
|
* Error when a Module cannot be imported.
|
|
23
23
|
*/
|
|
24
24
|
export class ModuleImportError extends ModuleError {
|
|
25
|
-
constructor(
|
|
26
|
-
super(
|
|
25
|
+
constructor(options) {
|
|
26
|
+
super(`Couldn't import the plugin "${module}":\n\n${options.cause}`, options);
|
|
27
27
|
this.name = "ModuleImportError";
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
export class ModuleExportIsInvalidError extends ModuleError {
|
|
31
|
-
constructor(
|
|
32
|
-
super(
|
|
31
|
+
constructor(options) {
|
|
32
|
+
super(`The export(s) of "${module}" are invalid:\n\n${options.errors
|
|
33
|
+
.map((error) => `Path "${error.path}" with value "${error.value}": "${error.message}"`)
|
|
34
|
+
.join("\n")}`, options);
|
|
33
35
|
this.name = "ModuleExportIsInvalidError";
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/resolve-modules/import.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAG7D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAClC,6CAA6C;IAC7C,QAAQ,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CAC7C,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,OAAO,CAAC,CAG9C;AAED,iBAAe,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IACR;;OAEG;IACH,QAAQ,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CAC7C,GACC,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/resolve-modules/import.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAG7D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAClC,6CAA6C;IAC7C,QAAQ,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CAC7C,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,OAAO,CAAC,CAG9C;AAED,iBAAe,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IACR;;OAEG;IACH,QAAQ,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CAC7C,GACC,OAAO,CAAC,GAAG,CAAC,CAuBd"}
|
|
@@ -27,14 +27,13 @@ async function $import(uri, options) {
|
|
|
27
27
|
return await import(/* @vite-ignore */ moduleWithMimeType);
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
let message = `Error while importing ${uri}: ${error?.message ?? "Unknown error"}`;
|
|
31
30
|
if (error instanceof SyntaxError && uri.includes("jsdelivr")) {
|
|
32
|
-
message += dedent `\n\n
|
|
31
|
+
error.message += dedent `\n\n
|
|
33
32
|
Are you sure that the file exists on JSDelivr?
|
|
34
33
|
|
|
35
34
|
The error indicates that the imported file does not exist on JSDelivr. For non-existent files, JSDelivr returns a 404 text that JS cannot parse as a module and throws a SyntaxError.
|
|
36
35
|
`;
|
|
37
36
|
}
|
|
38
|
-
throw new ModuleImportError(
|
|
37
|
+
throw new ModuleImportError({ module: uri, cause: error });
|
|
39
38
|
}
|
|
40
39
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { MessageLintRule } from "@inlang/message-lint-rule";
|
|
2
|
+
import type { ValueError } from "@sinclair/typebox/errors";
|
|
1
3
|
export declare class MessageLintRuleIsInvalidError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
cause?: Error;
|
|
4
|
+
constructor(options: {
|
|
5
|
+
id: MessageLintRule["id"];
|
|
6
|
+
errors: ValueError[];
|
|
6
7
|
});
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/message-lint-rules/errors.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/message-lint-rules/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,qBAAa,6BAA8B,SAAQ,KAAK;gBAC3C,OAAO,EAAE;QAAE,EAAE,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;QAAC,MAAM,EAAE,UAAU,EAAE,CAAA;KAAE;CAIxE"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export class MessageLintRuleIsInvalidError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
super(message);
|
|
5
|
-
this.module = options.module;
|
|
2
|
+
constructor(options) {
|
|
3
|
+
super(`The message lint rule "${options.id}" is invalid:\n\n${options.errors.join("\n")}`);
|
|
6
4
|
this.name = "MessageLintRuleIsInvalidError";
|
|
7
5
|
}
|
|
8
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMessageLintRules.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/message-lint-rules/resolveMessageLintRules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAE3D,eAAO,MAAM,uBAAuB,SAAU;IAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC,CAAA;CAAE;;;
|
|
1
|
+
{"version":3,"file":"resolveMessageLintRules.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/message-lint-rules/resolveMessageLintRules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAE3D,eAAO,MAAM,uBAAuB,SAAU;IAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC,CAAA;CAAE;;;CAqBzF,CAAA"}
|
|
@@ -8,8 +8,10 @@ export const resolveMessageLintRules = (args) => {
|
|
|
8
8
|
};
|
|
9
9
|
for (const rule of args.messageLintRules) {
|
|
10
10
|
if (Value.Check(MessageLintRule, rule) === false) {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const errors = [...Value.Errors(MessageLintRule, rule)];
|
|
12
|
+
result.errors.push(new MessageLintRuleIsInvalidError({
|
|
13
|
+
id: rule.id,
|
|
14
|
+
errors,
|
|
13
15
|
}));
|
|
14
16
|
continue;
|
|
15
17
|
}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import type { Plugin } from "@inlang/plugin";
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import type { ValueError } from "@sinclair/typebox/errors";
|
|
3
|
+
export declare class PluginHasInvalidIdError extends Error {
|
|
4
|
+
constructor(options: {
|
|
5
|
+
id: Plugin["id"];
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export declare class PluginUsesReservedNamespaceError extends Error {
|
|
9
|
+
constructor(options: {
|
|
10
|
+
id: Plugin["id"];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export declare class PluginHasInvalidSchemaError extends Error {
|
|
14
|
+
constructor(options: {
|
|
15
|
+
id: Plugin["id"];
|
|
16
|
+
errors: ValueError[];
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export declare class PluginLoadMessagesFunctionAlreadyDefinedError extends Error {
|
|
20
|
+
constructor(options: {
|
|
21
|
+
id: Plugin["id"];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export declare class PluginSaveMessagesFunctionAlreadyDefinedError extends Error {
|
|
25
|
+
constructor(options: {
|
|
26
|
+
id: Plugin["id"];
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export declare class PluginReturnedInvalidCustomApiError extends Error {
|
|
30
|
+
constructor(options: {
|
|
31
|
+
id: Plugin["id"];
|
|
32
|
+
cause: ErrorOptions["cause"];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export declare class PluginsDoNotProvideLoadOrSaveMessagesError extends Error {
|
|
36
|
+
constructor();
|
|
8
37
|
}
|
|
9
|
-
export declare class PluginHasInvalidIdError extends PluginError {
|
|
10
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
11
|
-
}
|
|
12
|
-
export declare class PluginUsesReservedNamespaceError extends PluginError {
|
|
13
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
14
|
-
}
|
|
15
|
-
export declare class PluginHasInvalidSchemaError extends PluginError {
|
|
16
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
17
|
-
}
|
|
18
|
-
export declare class PluginLoadMessagesFunctionAlreadyDefinedError extends PluginError {
|
|
19
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
20
|
-
}
|
|
21
|
-
export declare class PluginSaveMessagesFunctionAlreadyDefinedError extends PluginError {
|
|
22
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
23
|
-
}
|
|
24
|
-
export declare class PluginReturnedInvalidCustomApiError extends PluginError {
|
|
25
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
26
|
-
}
|
|
27
|
-
export declare class PluginsDoNotProvideLoadOrSaveMessagesError extends PluginError {
|
|
28
|
-
constructor(message: string, options: PluginErrorOptions);
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
31
38
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/plugins/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/plugins/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,qBAAa,uBAAwB,SAAQ,KAAK;gBACrC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;KAAE;CAMzC;AAED,qBAAa,gCAAiC,SAAQ,KAAK;gBAC9C,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;KAAE;CAIzC;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACzC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAAC,MAAM,EAAE,UAAU,EAAE,CAAA;KAAE;CAQ/D;AAED,qBAAa,6CAA8C,SAAQ,KAAK;gBAC3D,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;KAAE;CAMzC;AAED,qBAAa,6CAA8C,SAAQ,KAAK;gBAC3D,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;KAAE;CAMzC;AAED,qBAAa,mCAAoC,SAAQ,KAAK;gBACjD,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAAC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;KAAE;CAIvE;AAED,qBAAa,0CAA2C,SAAQ,KAAK;;CAOpE"}
|
|
@@ -1,51 +1,44 @@
|
|
|
1
|
-
class
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
super(message);
|
|
5
|
-
this.name = "PluginError";
|
|
6
|
-
this.plugin = options.plugin ?? "unknown";
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export class PluginHasInvalidIdError extends PluginError {
|
|
10
|
-
constructor(message, options) {
|
|
11
|
-
super(message, options);
|
|
1
|
+
export class PluginHasInvalidIdError extends Error {
|
|
2
|
+
constructor(options) {
|
|
3
|
+
super(`Plugin "${options.id}" has an invalid id. The id must:\n1) Start with "plugin."\n2) camelCase\n3) Contain a namespace.\nAn example would be "plugin.namespace.myPlugin".`);
|
|
12
4
|
this.name = "PluginHasInvalidIdError";
|
|
13
5
|
}
|
|
14
6
|
}
|
|
15
|
-
export class PluginUsesReservedNamespaceError extends
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
7
|
+
export class PluginUsesReservedNamespaceError extends Error {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(`Plugin ${options.id} uses reserved namespace 'inlang'.`);
|
|
18
10
|
this.name = "PluginUsesReservedNamespaceError";
|
|
19
11
|
}
|
|
20
12
|
}
|
|
21
|
-
export class PluginHasInvalidSchemaError extends
|
|
22
|
-
constructor(
|
|
23
|
-
super(
|
|
13
|
+
export class PluginHasInvalidSchemaError extends Error {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
super(`Plugin "${options.id}" has an invalid schema:\n\n${options.errors
|
|
16
|
+
.map((error) => `Path "${error.path}" with value "${error.value}": "${error.message}"`)
|
|
17
|
+
.join("\n")})}\n\nPlease refer to the documentation for the correct schema.`);
|
|
24
18
|
this.name = "PluginHasInvalidSchemaError";
|
|
25
19
|
}
|
|
26
20
|
}
|
|
27
|
-
export class PluginLoadMessagesFunctionAlreadyDefinedError extends
|
|
28
|
-
constructor(
|
|
29
|
-
super(
|
|
21
|
+
export class PluginLoadMessagesFunctionAlreadyDefinedError extends Error {
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super(`Plugin "${options.id}" defines the \`loadMessages()\` function, but it was already defined by another plugin.\n\nInlang only allows one plugin to define the \`loadMessages()\` function.`);
|
|
30
24
|
this.name = "PluginLoadMessagesFunctionAlreadyDefinedError";
|
|
31
25
|
}
|
|
32
26
|
}
|
|
33
|
-
export class PluginSaveMessagesFunctionAlreadyDefinedError extends
|
|
34
|
-
constructor(
|
|
35
|
-
super(
|
|
27
|
+
export class PluginSaveMessagesFunctionAlreadyDefinedError extends Error {
|
|
28
|
+
constructor(options) {
|
|
29
|
+
super(`Plugin "${options.id}" defines the \`saveMessages()\` function, but it was already defined by another plugin.\n\nInlang only allows one plugin to define the \`saveMessages()\` function.`);
|
|
36
30
|
this.name = "PluginSaveMessagesFunctionAlreadyDefinedError";
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
|
-
export class PluginReturnedInvalidCustomApiError extends
|
|
40
|
-
constructor(
|
|
41
|
-
super(
|
|
33
|
+
export class PluginReturnedInvalidCustomApiError extends Error {
|
|
34
|
+
constructor(options) {
|
|
35
|
+
super(`Plugin "${options.id}" returned an invalid custom API:\n\n${options.cause}`, options);
|
|
42
36
|
this.name = "PluginReturnedInvalidCustomApiError";
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
|
-
export class PluginsDoNotProvideLoadOrSaveMessagesError extends
|
|
46
|
-
constructor(
|
|
47
|
-
super(
|
|
39
|
+
export class PluginsDoNotProvideLoadOrSaveMessagesError extends Error {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(`No plugin provides a \`loadMessages()\` or \`saveMessages()\` function\n\nIn case no plugin threw an error, you likely forgot to add a plugin that handles the loading and saving of messages. Refer to the marketplace for available plugins https://inlang.com/marketplace.`);
|
|
48
42
|
this.name = "PluginsDoNotProvideLoadOrSaveMessagesError";
|
|
49
|
-
options.plugin = "plugin.inlang.missing";
|
|
50
43
|
}
|
|
51
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvePlugins.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/plugins/resolvePlugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAuBxD,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"resolvePlugins.d.ts","sourceRoot":"","sources":["../../../src/resolve-modules/plugins/resolvePlugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAuBxD,eAAO,MAAM,cAAc,EAAE,sBAqH5B,CAAA"}
|
|
@@ -27,41 +27,42 @@ export const resolvePlugins = async (args) => {
|
|
|
27
27
|
// -- INVALID ID in META --
|
|
28
28
|
const hasInvalidId = errors.some((error) => error.path === "/id");
|
|
29
29
|
if (hasInvalidId) {
|
|
30
|
-
result.errors.push(new PluginHasInvalidIdError(
|
|
30
|
+
result.errors.push(new PluginHasInvalidIdError({ id: plugin.id }));
|
|
31
31
|
}
|
|
32
32
|
// -- USES RESERVED NAMESPACE --
|
|
33
33
|
if (plugin.id.includes("inlang") && !whitelistedPlugins.includes(plugin.id)) {
|
|
34
|
-
result.errors.push(new PluginUsesReservedNamespaceError(
|
|
35
|
-
|
|
34
|
+
result.errors.push(new PluginUsesReservedNamespaceError({
|
|
35
|
+
id: plugin.id,
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
38
|
// -- USES INVALID SCHEMA --
|
|
39
39
|
if (errors.length > 0) {
|
|
40
|
-
result.errors.push(new PluginHasInvalidSchemaError(
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
result.errors.push(new PluginHasInvalidSchemaError({
|
|
41
|
+
id: plugin.id,
|
|
42
|
+
errors: errors,
|
|
43
43
|
}));
|
|
44
44
|
}
|
|
45
45
|
// -- ALREADY DEFINED LOADMESSAGES / SAVEMESSAGES / DETECTEDLANGUAGETAGS --
|
|
46
46
|
if (typeof plugin.loadMessages === "function" && result.data.loadMessages !== undefined) {
|
|
47
|
-
result.errors.push(new PluginLoadMessagesFunctionAlreadyDefinedError(
|
|
47
|
+
result.errors.push(new PluginLoadMessagesFunctionAlreadyDefinedError({ id: plugin.id }));
|
|
48
48
|
}
|
|
49
49
|
if (typeof plugin.saveMessages === "function" && result.data.saveMessages !== undefined) {
|
|
50
|
-
result.errors.push(new PluginSaveMessagesFunctionAlreadyDefinedError(
|
|
50
|
+
result.errors.push(new PluginSaveMessagesFunctionAlreadyDefinedError({ id: plugin.id }));
|
|
51
51
|
}
|
|
52
52
|
// --- ADD APP SPECIFIC API ---
|
|
53
53
|
if (typeof plugin.addCustomApi === "function") {
|
|
54
54
|
// TODO: why do we call this function 2 times (here for validation and later for retrieving the actual value)?
|
|
55
55
|
const { data: customApi, error } = tryCatch(() => plugin.addCustomApi({
|
|
56
|
-
settings: args.settings
|
|
56
|
+
settings: args.settings,
|
|
57
57
|
}));
|
|
58
58
|
if (error) {
|
|
59
|
-
|
|
60
|
-
delete error.stack;
|
|
61
|
-
result.errors.push(error); // TODO: add correct error type
|
|
59
|
+
result.errors.push(new PluginReturnedInvalidCustomApiError({ id: plugin.id, cause: error }));
|
|
62
60
|
}
|
|
63
|
-
if (typeof customApi !== "object") {
|
|
64
|
-
result.errors.push(new PluginReturnedInvalidCustomApiError(
|
|
61
|
+
else if (typeof customApi !== "object") {
|
|
62
|
+
result.errors.push(new PluginReturnedInvalidCustomApiError({
|
|
63
|
+
id: plugin.id,
|
|
64
|
+
cause: new Error(`The return value must be an object. Received "${typeof customApi}".`),
|
|
65
|
+
}));
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
// -- CONTINUE IF ERRORS --
|
|
@@ -74,20 +75,18 @@ export const resolvePlugins = async (args) => {
|
|
|
74
75
|
if (typeof plugin.loadMessages === "function") {
|
|
75
76
|
result.data.loadMessages = (_args) => plugin.loadMessages({
|
|
76
77
|
..._args,
|
|
77
|
-
settings: args.settings?.[plugin.id] ?? {},
|
|
78
78
|
nodeishFs: args.nodeishFs,
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
if (typeof plugin.saveMessages === "function") {
|
|
82
82
|
result.data.saveMessages = (_args) => plugin.saveMessages({
|
|
83
83
|
..._args,
|
|
84
|
-
settings: args.settings?.[plugin.id] ?? {},
|
|
85
84
|
nodeishFs: args.nodeishFs,
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
87
|
if (typeof plugin.addCustomApi === "function") {
|
|
89
88
|
const { data: customApi } = tryCatch(() => plugin.addCustomApi({
|
|
90
|
-
settings: args.settings
|
|
89
|
+
settings: args.settings,
|
|
91
90
|
}));
|
|
92
91
|
if (customApi) {
|
|
93
92
|
result.data.customApi = deepmerge(result.data.customApi, customApi);
|
|
@@ -97,7 +96,7 @@ export const resolvePlugins = async (args) => {
|
|
|
97
96
|
// --- LOADMESSAGE / SAVEMESSAGE NOT DEFINED ---
|
|
98
97
|
if (typeof result.data.loadMessages !== "function" ||
|
|
99
98
|
typeof result.data.saveMessages !== "function") {
|
|
100
|
-
result.errors.push(new PluginsDoNotProvideLoadOrSaveMessagesError(
|
|
99
|
+
result.errors.push(new PluginsDoNotProvideLoadOrSaveMessagesError());
|
|
101
100
|
}
|
|
102
101
|
return result;
|
|
103
102
|
};
|