gt-next 3.0.6 → 3.0.7
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/config.d.ts +7 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +65 -31
- package/dist/config.js.map +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -16,13 +16,18 @@ import InitGTProps from './config/props/InitGTProps';
|
|
|
16
16
|
*
|
|
17
17
|
* export default withGT({})
|
|
18
18
|
*
|
|
19
|
+
* @param {string|undefined} config - Optional config filepath (defaults to './gt.config.json'). If a file is found, it will be parsed for GT config variables.
|
|
19
20
|
* @param {string|undefined} i18n - Optional i18n configuration file path. If a string is provided, it will be used as a path.
|
|
20
21
|
* @param {string|undefined} dictionary - Optional dictionary configuration file path. If a string is provided, it will be used as a path.
|
|
21
22
|
* @param {string} [apiKey=defaultInitGTProps.apiKey] - API key for the GeneralTranslation service. Required if using the default GT base URL.
|
|
23
|
+
* @param {string} [devApiKey=defaultInitGTProps.devApiKey] - API key for dev environment only.
|
|
22
24
|
* @param {string} [projectId=defaultInitGTProps.projectId] - Project ID for the GeneralTranslation service. Required for most functionality.
|
|
23
25
|
* @param {string} [runtimeUrl=defaultInitGTProps.runtimeUrl] - The base URL for the GT API. Set to an empty string to disable automatic translations.
|
|
24
26
|
* @param {string} [cacheUrl=defaultInitGTProps.cacheUrl] - The URL for cached translations.
|
|
25
|
-
* @param {
|
|
27
|
+
* @param {number} [cacheExpiryTime=defaultInitGTProps.cacheExpiryTime] - How long to cache translations in memory (milliseconds).
|
|
28
|
+
* @param {boolean} [runtimeTranslation=defaultInitGTProps.runtimeTranslation] - Whether to enable runtime translation.
|
|
29
|
+
* @param {boolean} [remoteCache=defaultInitGTProps.remoteCache] - Whether to enable remote caching of translations.
|
|
30
|
+
* @param {string[]} [locales=defaultInitGTProps.locales] - List of supported locales for the application.
|
|
26
31
|
* @param {string} [defaultLocale=defaultInitGTProps.defaultLocale] - The default locale to use if none is specified.
|
|
27
32
|
* @param {object} [renderSettings=defaultInitGTProps.renderSettings] - Render settings for how translations should be handled.
|
|
28
33
|
* @param {number} [maxConcurrentRequests=defaultInitGTProps.maxConcurrentRequests] - Maximum number of concurrent requests allowed.
|
|
@@ -35,5 +40,5 @@ import InitGTProps from './config/props/InitGTProps';
|
|
|
35
40
|
* @throws {Error} If the project ID is missing and default URLs are used, or if the API key is required and missing.
|
|
36
41
|
*
|
|
37
42
|
*/
|
|
38
|
-
export declare function initGT({ i18n, dictionary, runtimeTranslation, remoteCache, apiKey, devApiKey, projectId, runtimeUrl, cacheUrl, cacheExpiryTime, locales, defaultLocale, renderSettings, maxConcurrentRequests, maxBatchSize, batchInterval, ...metadata }?: InitGTProps): (
|
|
43
|
+
export declare function initGT({ config, i18n, dictionary, runtimeTranslation, remoteCache, apiKey, devApiKey, projectId, runtimeUrl, cacheUrl, cacheExpiryTime, locales, defaultLocale, renderSettings, maxConcurrentRequests, maxBatchSize, batchInterval, ...metadata }?: InitGTProps): (nextConfig?: any) => any;
|
|
39
44
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAKrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAA2B,EAC3B,IAAI,EACJ,UAAU,EACV,kBAA0D,EAC1D,WAA4C,EAC5C,MAAkC,EAClC,SAAS,EACT,SAAwC,EACxC,UAA0C,EAC1C,QAAsC,EACtC,eAAoD,EACpD,OAAoC,EACpC,aAAgD,EAChD,cAAc,EACd,qBAAgE,EAChE,YAA8C,EAC9C,aAAgD,EAChD,GAAG,QAAQ,EACZ,GAAE,WAAgC,iBAuHb,GAAG,KAAQ,GAAG,CA+BnC"}
|
package/dist/config.js
CHANGED
|
@@ -36,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.initGT = initGT;
|
|
38
38
|
var path_1 = __importDefault(require("path"));
|
|
39
|
+
var fs_1 = __importDefault(require("fs"));
|
|
39
40
|
var defaultInitGTProps_1 = __importDefault(require("./config/props/defaultInitGTProps"));
|
|
40
41
|
var createErrors_1 = require("./errors/createErrors");
|
|
41
42
|
var supported_locales_1 = require("@generaltranslation/supported-locales");
|
|
@@ -57,13 +58,18 @@ var internal_1 = require("gt-react/internal");
|
|
|
57
58
|
*
|
|
58
59
|
* export default withGT({})
|
|
59
60
|
*
|
|
61
|
+
* @param {string|undefined} config - Optional config filepath (defaults to './gt.config.json'). If a file is found, it will be parsed for GT config variables.
|
|
60
62
|
* @param {string|undefined} i18n - Optional i18n configuration file path. If a string is provided, it will be used as a path.
|
|
61
63
|
* @param {string|undefined} dictionary - Optional dictionary configuration file path. If a string is provided, it will be used as a path.
|
|
62
64
|
* @param {string} [apiKey=defaultInitGTProps.apiKey] - API key for the GeneralTranslation service. Required if using the default GT base URL.
|
|
65
|
+
* @param {string} [devApiKey=defaultInitGTProps.devApiKey] - API key for dev environment only.
|
|
63
66
|
* @param {string} [projectId=defaultInitGTProps.projectId] - Project ID for the GeneralTranslation service. Required for most functionality.
|
|
64
67
|
* @param {string} [runtimeUrl=defaultInitGTProps.runtimeUrl] - The base URL for the GT API. Set to an empty string to disable automatic translations.
|
|
65
68
|
* @param {string} [cacheUrl=defaultInitGTProps.cacheUrl] - The URL for cached translations.
|
|
66
|
-
* @param {
|
|
69
|
+
* @param {number} [cacheExpiryTime=defaultInitGTProps.cacheExpiryTime] - How long to cache translations in memory (milliseconds).
|
|
70
|
+
* @param {boolean} [runtimeTranslation=defaultInitGTProps.runtimeTranslation] - Whether to enable runtime translation.
|
|
71
|
+
* @param {boolean} [remoteCache=defaultInitGTProps.remoteCache] - Whether to enable remote caching of translations.
|
|
72
|
+
* @param {string[]} [locales=defaultInitGTProps.locales] - List of supported locales for the application.
|
|
67
73
|
* @param {string} [defaultLocale=defaultInitGTProps.defaultLocale] - The default locale to use if none is specified.
|
|
68
74
|
* @param {object} [renderSettings=defaultInitGTProps.renderSettings] - Render settings for how translations should be handled.
|
|
69
75
|
* @param {number} [maxConcurrentRequests=defaultInitGTProps.maxConcurrentRequests] - Maximum number of concurrent requests allowed.
|
|
@@ -77,64 +83,87 @@ var internal_1 = require("gt-react/internal");
|
|
|
77
83
|
*
|
|
78
84
|
*/
|
|
79
85
|
function initGT(_a) {
|
|
80
|
-
|
|
81
|
-
var _b;
|
|
86
|
+
var _b, _c;
|
|
82
87
|
if (_a === void 0) { _a = defaultInitGTProps_1.default; }
|
|
83
|
-
var
|
|
84
|
-
if
|
|
85
|
-
|
|
88
|
+
var _d = _a.config, config = _d === void 0 ? './gt.config.json' : _d, i18n = _a.i18n, dictionary = _a.dictionary, _e = _a.runtimeTranslation, runtimeTranslation = _e === void 0 ? defaultInitGTProps_1.default.runtimeTranslation : _e, _f = _a.remoteCache, remoteCache = _f === void 0 ? defaultInitGTProps_1.default.remoteCache : _f, _g = _a.apiKey, apiKey = _g === void 0 ? defaultInitGTProps_1.default.apiKey : _g, devApiKey = _a.devApiKey, _h = _a.projectId, projectId = _h === void 0 ? defaultInitGTProps_1.default.projectId : _h, _j = _a.runtimeUrl, runtimeUrl = _j === void 0 ? defaultInitGTProps_1.default.runtimeUrl : _j, _k = _a.cacheUrl, cacheUrl = _k === void 0 ? defaultInitGTProps_1.default.cacheUrl : _k, _l = _a.cacheExpiryTime, cacheExpiryTime = _l === void 0 ? defaultInitGTProps_1.default.cacheExpiryTime : _l, _m = _a.locales, locales = _m === void 0 ? defaultInitGTProps_1.default.locales : _m, _o = _a.defaultLocale, defaultLocale = _o === void 0 ? defaultInitGTProps_1.default.defaultLocale : _o, renderSettings = _a.renderSettings, _p = _a.maxConcurrentRequests, maxConcurrentRequests = _p === void 0 ? defaultInitGTProps_1.default.maxConcurrentRequests : _p, _q = _a.maxBatchSize, maxBatchSize = _q === void 0 ? defaultInitGTProps_1.default.maxBatchSize : _q, _r = _a.batchInterval, batchInterval = _r === void 0 ? defaultInitGTProps_1.default.batchInterval : _r, metadata = __rest(_a, ["config", "i18n", "dictionary", "runtimeTranslation", "remoteCache", "apiKey", "devApiKey", "projectId", "runtimeUrl", "cacheUrl", "cacheExpiryTime", "locales", "defaultLocale", "renderSettings", "maxConcurrentRequests", "maxBatchSize", "batchInterval"]);
|
|
89
|
+
// Load from config file if it's a string and exists
|
|
90
|
+
var loadedConfig = {};
|
|
91
|
+
try {
|
|
92
|
+
if (typeof config === 'string' && fs_1.default.existsSync(config)) {
|
|
93
|
+
var fileContent = fs_1.default.readFileSync(config, 'utf-8');
|
|
94
|
+
loadedConfig = JSON.parse(fileContent);
|
|
95
|
+
}
|
|
96
|
+
if (((_b = loadedConfig.locales) === null || _b === void 0 ? void 0 : _b.length) === 0) {
|
|
97
|
+
loadedConfig.locales = locales;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.error('Error reading GT config file:', error);
|
|
102
|
+
}
|
|
103
|
+
// Merge loaded file config, default props, and function args
|
|
104
|
+
var mergedConfig = __assign(__assign(__assign({}, defaultInitGTProps_1.default), loadedConfig), __assign({ i18n: i18n, dictionary: dictionary, runtimeTranslation: runtimeTranslation, remoteCache: remoteCache, apiKey: apiKey, devApiKey: devApiKey, projectId: projectId, runtimeUrl: runtimeUrl, cacheUrl: cacheUrl, cacheExpiryTime: cacheExpiryTime, locales: locales, defaultLocale: defaultLocale, renderSettings: renderSettings || internal_1.defaultRenderSettings, maxConcurrentRequests: maxConcurrentRequests, maxBatchSize: maxBatchSize, batchInterval: batchInterval }, metadata));
|
|
105
|
+
// Destructure final config
|
|
106
|
+
var finalI18n = mergedConfig.i18n, finalDictionary = mergedConfig.dictionary, finalRuntimeTranslation = mergedConfig.runtimeTranslation, finalRemoteCache = mergedConfig.remoteCache, finalApiKey = mergedConfig.apiKey, finalDevApiKey = mergedConfig.devApiKey, finalProjectId = mergedConfig.projectId, finalRuntimeUrl = mergedConfig.runtimeUrl, finalCacheUrl = mergedConfig.cacheUrl, finalCacheExpiryTime = mergedConfig.cacheExpiryTime, finalLocales = mergedConfig.locales, finalDefaultLocale = mergedConfig.defaultLocale, finalRenderSettings = mergedConfig.renderSettings, finalMaxConcurrentRequests = mergedConfig.maxConcurrentRequests, finalMaxBatchSize = mergedConfig.maxBatchSize, finalBatchInterval = mergedConfig.batchInterval, restMetadata = __rest(mergedConfig, ["i18n", "dictionary", "runtimeTranslation", "remoteCache", "apiKey", "devApiKey", "projectId", "runtimeUrl", "cacheUrl", "cacheExpiryTime", "locales", "defaultLocale", "renderSettings", "maxConcurrentRequests", "maxBatchSize", "batchInterval"]);
|
|
107
|
+
// ----- ERROR CHECKS ----- //
|
|
108
|
+
if (finalRuntimeTranslation || finalRemoteCache) {
|
|
109
|
+
if (!finalProjectId) {
|
|
86
110
|
console.error(createErrors_1.projectIdMissingError);
|
|
87
111
|
}
|
|
88
112
|
}
|
|
89
113
|
var envApiKey = process.env.GT_API_KEY || '';
|
|
90
|
-
var apiKeyType = (
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
var apiKeyType = (_c = envApiKey.split('-')) === null || _c === void 0 ? void 0 : _c[1];
|
|
115
|
+
var resolvedApiKey = finalApiKey;
|
|
116
|
+
var resolvedDevApiKey = finalDevApiKey;
|
|
117
|
+
if (apiKeyType === 'api') {
|
|
118
|
+
resolvedApiKey = envApiKey;
|
|
93
119
|
}
|
|
94
|
-
else if (apiKeyType ===
|
|
95
|
-
|
|
120
|
+
else if (apiKeyType === 'dev') {
|
|
121
|
+
resolvedDevApiKey = envApiKey;
|
|
96
122
|
}
|
|
97
|
-
if (
|
|
123
|
+
if (finalRuntimeTranslation && !resolvedApiKey && !resolvedDevApiKey) {
|
|
98
124
|
console.error(createErrors_1.APIKeyMissingError);
|
|
99
125
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var warningLocales = locales.filter(function (locale) { return !(0, supported_locales_1.getSupportedLocale)(locale); });
|
|
126
|
+
if (finalRuntimeUrl === defaultInitGTProps_1.default.runtimeUrl ||
|
|
127
|
+
finalCacheUrl === defaultInitGTProps_1.default.cacheUrl) {
|
|
128
|
+
var warningLocales = (finalLocales || defaultInitGTProps_1.default.locales).filter(function (locale) { return !(0, supported_locales_1.getSupportedLocale)(locale); });
|
|
103
129
|
if (warningLocales.length)
|
|
104
130
|
console.warn((0, createErrors_1.createUnsupportedLocalesWarning)(warningLocales));
|
|
105
131
|
}
|
|
106
|
-
;
|
|
107
132
|
// Store config params in environment variable to allow for global access (in some cases)
|
|
108
|
-
var I18NConfigParams = JSON.stringify(__assign({ remoteCache:
|
|
109
|
-
//
|
|
110
|
-
var resolvedI18NFilePath = typeof
|
|
111
|
-
var resolvedDictionaryFilePath = typeof
|
|
112
|
-
?
|
|
133
|
+
var I18NConfigParams = JSON.stringify(__assign({ remoteCache: finalRemoteCache, runtimeTranslation: finalRuntimeTranslation, apiKey: resolvedApiKey, devApiKey: resolvedDevApiKey, projectId: finalProjectId, runtimeUrl: finalRuntimeUrl, cacheUrl: finalCacheUrl, cacheExpiryTime: finalCacheExpiryTime, locales: finalLocales, defaultLocale: finalDefaultLocale, renderSettings: finalRenderSettings, maxConcurrentRequests: finalMaxConcurrentRequests, maxBatchSize: finalMaxBatchSize, batchInterval: finalBatchInterval }, restMetadata));
|
|
134
|
+
// Resolve i18n and dictionary paths
|
|
135
|
+
var resolvedI18NFilePath = typeof finalI18n === 'string' ? finalI18n : resolveConfigFilepath('i18n');
|
|
136
|
+
var resolvedDictionaryFilePath = typeof finalDictionary === 'string'
|
|
137
|
+
? finalDictionary
|
|
113
138
|
: resolveConfigFilepath('dictionary');
|
|
114
|
-
return function (
|
|
115
|
-
if (
|
|
116
|
-
return __assign(__assign({},
|
|
139
|
+
return function (nextConfig) {
|
|
140
|
+
if (nextConfig === void 0) { nextConfig = {}; }
|
|
141
|
+
return __assign(__assign({}, nextConfig), { env: __assign(__assign({}, nextConfig.env), { _GENERALTRANSLATION_I18N_CONFIG_PARAMS: I18NConfigParams }), webpack: function webpack() {
|
|
117
142
|
var _a = [];
|
|
118
143
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
119
144
|
_a[_i] = arguments[_i];
|
|
120
145
|
}
|
|
121
146
|
var webpackConfig = _a[0], options = _a[1];
|
|
122
147
|
if (resolvedI18NFilePath) {
|
|
123
|
-
// Add alias for importing request handler
|
|
124
148
|
webpackConfig.resolve.alias['gt-next/_request'] = path_1.default.resolve(webpackConfig.context, resolvedI18NFilePath);
|
|
125
149
|
}
|
|
126
150
|
if (resolvedDictionaryFilePath) {
|
|
127
|
-
// Add alias for importing dictionary via webpack
|
|
128
151
|
webpackConfig.resolve.alias['gt-next/_dictionary'] = path_1.default.resolve(webpackConfig.context, resolvedDictionaryFilePath);
|
|
129
152
|
}
|
|
130
|
-
if (typeof (
|
|
131
|
-
return
|
|
153
|
+
if (typeof (nextConfig === null || nextConfig === void 0 ? void 0 : nextConfig.webpack) === 'function') {
|
|
154
|
+
return nextConfig.webpack(webpackConfig, options);
|
|
132
155
|
}
|
|
133
156
|
return webpackConfig;
|
|
134
157
|
} });
|
|
135
158
|
};
|
|
136
159
|
}
|
|
137
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Resolves a configuration filepath for i18n or dictionary files.
|
|
162
|
+
*
|
|
163
|
+
* @param {string} fileName - The base name of the config file to look for.
|
|
164
|
+
* @param {string} [cwd] - An optional current working directory path.
|
|
165
|
+
* @returns {string|undefined} - The path if found; otherwise undefined.
|
|
166
|
+
*/
|
|
138
167
|
function resolveConfigFilepath(fileName, cwd) {
|
|
139
168
|
function resolvePath(pathname) {
|
|
140
169
|
var parts = [];
|
|
@@ -144,7 +173,7 @@ function resolveConfigFilepath(fileName, cwd) {
|
|
|
144
173
|
return path_1.default.resolve.apply(path_1.default, parts);
|
|
145
174
|
}
|
|
146
175
|
function pathExists(pathname) {
|
|
147
|
-
return
|
|
176
|
+
return fs_1.default.existsSync(resolvePath(pathname));
|
|
148
177
|
}
|
|
149
178
|
// Check for file existence in the root and src directories with supported extensions
|
|
150
179
|
for (var _i = 0, _a = __spreadArray(__spreadArray([], withExtensions("./".concat(fileName)), true), withExtensions("./src/".concat(fileName)), true); _i < _a.length; _i++) {
|
|
@@ -156,7 +185,12 @@ function resolveConfigFilepath(fileName, cwd) {
|
|
|
156
185
|
// Return undefined if no file is found
|
|
157
186
|
return undefined;
|
|
158
187
|
}
|
|
159
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Helper function to handle multiple extensions.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} localPath - The local path to which extensions will be appended.
|
|
192
|
+
* @returns {string[]} - Array of possible paths with supported TypeScript/JavaScript extensions.
|
|
193
|
+
*/
|
|
160
194
|
function withExtensions(localPath) {
|
|
161
195
|
return [
|
|
162
196
|
"".concat(localPath, ".ts"),
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,wBAyKC;AA3ND,8CAAwB;AACxB,0CAAoB;AAEpB,yFAAmE;AAEnE,sDAAmH;AACnH,2EAA2E;AAC3E,8CAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,MAAM,CAAC,EAmBY;;IAnBZ,mBAAA,EAAA,KAmBN,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