@lingo.dev/_sdk 0.7.27 → 0.7.29
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/build/index.cjs +19 -7
- package/build/index.d.cts +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.mjs +16 -4
- package/package.json +2 -2
package/build/index.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;// src/index.ts
|
2
2
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
3
3
|
var __spec = require('@lingo.dev/_spec');
|
4
4
|
var _cuid2 = require('@paralleldrive/cuid2');
|
@@ -324,18 +324,30 @@ var LingoDotDevEngine = class {
|
|
324
324
|
return jsonResponse.locale;
|
325
325
|
}
|
326
326
|
};
|
327
|
-
var ReplexicaEngine = class extends LingoDotDevEngine {
|
327
|
+
var ReplexicaEngine = (_class = class _ReplexicaEngine extends LingoDotDevEngine {
|
328
|
+
static __initStatic() {this.hasWarnedDeprecation = false}
|
328
329
|
constructor(config) {
|
329
330
|
super(config);
|
330
|
-
|
331
|
+
if (!_ReplexicaEngine.hasWarnedDeprecation) {
|
332
|
+
console.warn(
|
333
|
+
"ReplexicaEngine is deprecated and will be removed in a future release. Please use LingoDotDevEngine instead. See https://docs.lingo.dev/migration for more information."
|
334
|
+
);
|
335
|
+
_ReplexicaEngine.hasWarnedDeprecation = true;
|
336
|
+
}
|
331
337
|
}
|
332
|
-
};
|
333
|
-
var LingoEngine = class extends LingoDotDevEngine {
|
338
|
+
}, _class.__initStatic(), _class);
|
339
|
+
var LingoEngine = (_class2 = class _LingoEngine extends LingoDotDevEngine {
|
340
|
+
static __initStatic2() {this.hasWarnedDeprecation = false}
|
334
341
|
constructor(config) {
|
335
342
|
super(config);
|
336
|
-
|
343
|
+
if (!_LingoEngine.hasWarnedDeprecation) {
|
344
|
+
console.warn(
|
345
|
+
"LingoEngine is deprecated and will be removed in a future release. Please use LingoDotDevEngine instead. See https://docs.lingo.dev/migration for more information."
|
346
|
+
);
|
347
|
+
_LingoEngine.hasWarnedDeprecation = true;
|
348
|
+
}
|
337
349
|
}
|
338
|
-
};
|
350
|
+
}, _class2.__initStatic2(), _class2);
|
339
351
|
|
340
352
|
|
341
353
|
|
package/build/index.d.cts
CHANGED
@@ -151,12 +151,14 @@ declare class LingoDotDevEngine {
|
|
151
151
|
* @deprecated Use LingoDotDevEngine instead. This class is maintained for backwards compatibility.
|
152
152
|
*/
|
153
153
|
declare class ReplexicaEngine extends LingoDotDevEngine {
|
154
|
+
private static hasWarnedDeprecation;
|
154
155
|
constructor(config: Partial<Z.infer<typeof engineParamsSchema>>);
|
155
156
|
}
|
156
157
|
/**
|
157
158
|
* @deprecated Use LingoDotDevEngine instead. This class is maintained for backwards compatibility.
|
158
159
|
*/
|
159
160
|
declare class LingoEngine extends LingoDotDevEngine {
|
161
|
+
private static hasWarnedDeprecation;
|
160
162
|
constructor(config: Partial<Z.infer<typeof engineParamsSchema>>);
|
161
163
|
}
|
162
164
|
|
package/build/index.d.ts
CHANGED
@@ -151,12 +151,14 @@ declare class LingoDotDevEngine {
|
|
151
151
|
* @deprecated Use LingoDotDevEngine instead. This class is maintained for backwards compatibility.
|
152
152
|
*/
|
153
153
|
declare class ReplexicaEngine extends LingoDotDevEngine {
|
154
|
+
private static hasWarnedDeprecation;
|
154
155
|
constructor(config: Partial<Z.infer<typeof engineParamsSchema>>);
|
155
156
|
}
|
156
157
|
/**
|
157
158
|
* @deprecated Use LingoDotDevEngine instead. This class is maintained for backwards compatibility.
|
158
159
|
*/
|
159
160
|
declare class LingoEngine extends LingoDotDevEngine {
|
161
|
+
private static hasWarnedDeprecation;
|
160
162
|
constructor(config: Partial<Z.infer<typeof engineParamsSchema>>);
|
161
163
|
}
|
162
164
|
|
package/build/index.mjs
CHANGED
@@ -324,16 +324,28 @@ var LingoDotDevEngine = class {
|
|
324
324
|
return jsonResponse.locale;
|
325
325
|
}
|
326
326
|
};
|
327
|
-
var ReplexicaEngine = class extends LingoDotDevEngine {
|
327
|
+
var ReplexicaEngine = class _ReplexicaEngine extends LingoDotDevEngine {
|
328
|
+
static hasWarnedDeprecation = false;
|
328
329
|
constructor(config) {
|
329
330
|
super(config);
|
330
|
-
|
331
|
+
if (!_ReplexicaEngine.hasWarnedDeprecation) {
|
332
|
+
console.warn(
|
333
|
+
"ReplexicaEngine is deprecated and will be removed in a future release. Please use LingoDotDevEngine instead. See https://docs.lingo.dev/migration for more information."
|
334
|
+
);
|
335
|
+
_ReplexicaEngine.hasWarnedDeprecation = true;
|
336
|
+
}
|
331
337
|
}
|
332
338
|
};
|
333
|
-
var LingoEngine = class extends LingoDotDevEngine {
|
339
|
+
var LingoEngine = class _LingoEngine extends LingoDotDevEngine {
|
340
|
+
static hasWarnedDeprecation = false;
|
334
341
|
constructor(config) {
|
335
342
|
super(config);
|
336
|
-
|
343
|
+
if (!_LingoEngine.hasWarnedDeprecation) {
|
344
|
+
console.warn(
|
345
|
+
"LingoEngine is deprecated and will be removed in a future release. Please use LingoDotDevEngine instead. See https://docs.lingo.dev/migration for more information."
|
346
|
+
);
|
347
|
+
_LingoEngine.hasWarnedDeprecation = true;
|
348
|
+
}
|
337
349
|
}
|
338
350
|
};
|
339
351
|
export {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lingo.dev/_sdk",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.29",
|
4
4
|
"description": "Lingo.dev JS SDK",
|
5
5
|
"private": false,
|
6
6
|
"publishConfig": {
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"typescript": "^5.7.2",
|
24
24
|
"vitest": "^2.1.8",
|
25
25
|
"zod": "^3.24.1",
|
26
|
-
"@lingo.dev/_spec": "0.26.
|
26
|
+
"@lingo.dev/_spec": "0.26.5"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@types/jsdom": "^21.1.7",
|