@lingo.dev/_compiler 0.11.6 → 0.12.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/build/index.cjs CHANGED
@@ -28,7 +28,7 @@ var _unplugin = require('unplugin');
28
28
  // package.json
29
29
  var package_default = {
30
30
  name: "@lingo.dev/_compiler",
31
- version: "0.11.6",
31
+ version: "0.12.0",
32
32
  description: "Lingo.dev Compiler",
33
33
  private: false,
34
34
  repository: {
@@ -266,16 +266,16 @@ async function getDistinctId() {
266
266
  async function tryGetEmail() {
267
267
  const rc = _chunk5WTAUBGEcjs.getRc.call(void 0, );
268
268
  const apiKey = process.env.LINGODOTDEV_API_KEY || _optionalChain([rc, 'optionalAccess', _5 => _5.auth, 'optionalAccess', _6 => _6.apiKey]);
269
- const apiUrl = process.env.LINGODOTDEV_API_URL || _optionalChain([rc, 'optionalAccess', _7 => _7.auth, 'optionalAccess', _8 => _8.apiUrl]) || "https://engine.lingo.dev";
269
+ const apiUrl = process.env.LINGODOTDEV_API_URL || _optionalChain([rc, 'optionalAccess', _7 => _7.auth, 'optionalAccess', _8 => _8.apiUrl]) || "https://api.lingo.dev";
270
270
  if (!apiKey) {
271
271
  return null;
272
272
  }
273
273
  try {
274
- const res = await fetch(`${apiUrl}/whoami`, {
275
- method: "POST",
274
+ const res = await fetch(`${apiUrl}/users/me`, {
275
+ method: "GET",
276
276
  headers: {
277
- Authorization: `Bearer ${apiKey}`,
278
- ContentType: "application/json"
277
+ "X-API-Key": apiKey,
278
+ "Content-Type": "application/json"
279
279
  }
280
280
  });
281
281
  if (res.ok) {
package/build/index.mjs CHANGED
@@ -28,7 +28,7 @@ import { createUnplugin } from "unplugin";
28
28
  // package.json
29
29
  var package_default = {
30
30
  name: "@lingo.dev/_compiler",
31
- version: "0.11.6",
31
+ version: "0.12.0",
32
32
  description: "Lingo.dev Compiler",
33
33
  private: false,
34
34
  repository: {
@@ -266,16 +266,16 @@ async function getDistinctId() {
266
266
  async function tryGetEmail() {
267
267
  const rc = getRc();
268
268
  const apiKey = process.env.LINGODOTDEV_API_KEY || rc?.auth?.apiKey;
269
- const apiUrl = process.env.LINGODOTDEV_API_URL || rc?.auth?.apiUrl || "https://engine.lingo.dev";
269
+ const apiUrl = process.env.LINGODOTDEV_API_URL || rc?.auth?.apiUrl || "https://api.lingo.dev";
270
270
  if (!apiKey) {
271
271
  return null;
272
272
  }
273
273
  try {
274
- const res = await fetch(`${apiUrl}/whoami`, {
275
- method: "POST",
274
+ const res = await fetch(`${apiUrl}/users/me`, {
275
+ method: "GET",
276
276
  headers: {
277
- Authorization: `Bearer ${apiKey}`,
278
- ContentType: "application/json"
277
+ "X-API-Key": apiKey,
278
+ "Content-Type": "application/json"
279
279
  }
280
280
  });
281
281
  if (res.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_compiler",
3
- "version": "0.11.6",
3
+ "version": "0.12.0",
4
4
  "description": "Lingo.dev Compiler",
5
5
  "private": false,
6
6
  "repository": {
@@ -65,8 +65,8 @@
65
65
  "posthog-node": "5.14.0",
66
66
  "unplugin": "2.3.11",
67
67
  "zod": "4.1.12",
68
- "@lingo.dev/_sdk": "0.15.2",
69
- "@lingo.dev/_spec": "0.48.1"
68
+ "@lingo.dev/_sdk": "0.16.0",
69
+ "@lingo.dev/_spec": "0.49.0"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "tsup --watch",