@tolgee/core 6.5.0 → 6.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.
|
@@ -66,8 +66,8 @@ export declare function Controller({ options }: StateServiceProps): Readonly<{
|
|
|
66
66
|
apiUrl?: string | undefined;
|
|
67
67
|
apiKey?: string | undefined;
|
|
68
68
|
projectId?: string | number | undefined;
|
|
69
|
-
language?: string | undefined;
|
|
70
69
|
branch?: string | undefined;
|
|
70
|
+
language?: string | undefined;
|
|
71
71
|
defaultLanguage?: string | undefined;
|
|
72
72
|
availableLanguages?: string[] | undefined;
|
|
73
73
|
fallbackLanguage?: import("../types").FallbackLanguageOption;
|
|
@@ -15,8 +15,8 @@ export declare function State(onLanguageChange: EventEmitterInstance<LanguageEve
|
|
|
15
15
|
apiUrl?: string | undefined;
|
|
16
16
|
apiKey?: string | undefined;
|
|
17
17
|
projectId?: string | number | undefined;
|
|
18
|
-
language?: string | undefined;
|
|
19
18
|
branch?: string | undefined;
|
|
19
|
+
language?: string | undefined;
|
|
20
20
|
defaultLanguage?: string | undefined;
|
|
21
21
|
availableLanguages?: string[] | undefined;
|
|
22
22
|
fallbackLanguage?: import("../../types").FallbackLanguageOption;
|
package/lib/TolgeeCore.d.ts
CHANGED
|
@@ -131,8 +131,8 @@ declare function createTolgee(options: TolgeeOptions): Readonly<{
|
|
|
131
131
|
apiUrl?: string | undefined;
|
|
132
132
|
apiKey?: string | undefined;
|
|
133
133
|
projectId?: string | number | undefined;
|
|
134
|
-
language?: string | undefined;
|
|
135
134
|
branch?: string | undefined;
|
|
135
|
+
language?: string | undefined;
|
|
136
136
|
defaultLanguage?: string | undefined;
|
|
137
137
|
availableLanguages?: string[] | undefined;
|
|
138
138
|
fallbackLanguage?: import("./types").FallbackLanguageOption;
|
package/lib/types/plugin.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolgee/core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Library providing ability to translate messages directly in context of developed application.",
|
|
5
5
|
"main": "./dist/tolgee.cjs.js",
|
|
6
6
|
"module": "./dist/tolgee.esm.js",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "723cf70b9331e89d74056cedef8292b7defcac34"
|
|
77
77
|
}
|
|
@@ -61,4 +61,35 @@ describe('initial options', () => {
|
|
|
61
61
|
|
|
62
62
|
expect(tolgee.getInitialOptions().apiUrl).toEqual('http://localhost:8000');
|
|
63
63
|
});
|
|
64
|
+
|
|
65
|
+
it('overrideCredentials with branch', () => {
|
|
66
|
+
const tolgee = TolgeeCore().init({
|
|
67
|
+
language: 'en',
|
|
68
|
+
apiUrl: 'http://localhost:8080',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
tolgee.overrideCredentials({
|
|
72
|
+
apiUrl: 'http://localhost:8000',
|
|
73
|
+
apiKey: 'test',
|
|
74
|
+
branch: 'feature-x',
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
expect(tolgee.getInitialOptions().branch).toEqual('feature-x');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('overrideCredentials branch overrides init branch', () => {
|
|
81
|
+
const tolgee = TolgeeCore().init({
|
|
82
|
+
language: 'en',
|
|
83
|
+
apiUrl: 'http://localhost:8080',
|
|
84
|
+
branch: 'original',
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
tolgee.overrideCredentials({
|
|
88
|
+
apiUrl: 'http://localhost:8000',
|
|
89
|
+
apiKey: 'test',
|
|
90
|
+
branch: 'override',
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
expect(tolgee.getInitialOptions().branch).toEqual('override');
|
|
94
|
+
});
|
|
64
95
|
});
|