@lingo.dev/compiler 0.4.6 → 0.4.8

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.
@@ -1,12 +1,12 @@
1
1
  import { LingoProviderProps } from "../shared/LingoProvider.cjs";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/react/server/ServerLingoProvider.d.ts
5
5
  declare function LingoProvider({
6
6
  initialLocale,
7
7
  initialTranslations,
8
8
  ...rest
9
- }: LingoProviderProps): Promise<react_jsx_runtime1.JSX.Element>;
9
+ }: LingoProviderProps): Promise<react_jsx_runtime3.JSX.Element>;
10
10
  //#endregion
11
11
  export { LingoProvider };
12
12
  //# sourceMappingURL=ServerLingoProvider.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import { LocaleCode } from "lingo.dev/spec";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
  import { PropsWithChildren } from "react";
4
4
 
5
5
  //#region src/react/shared/LingoProvider.d.ts
@@ -70,7 +70,7 @@ declare function LingoProvider__Dev({
70
70
  router,
71
71
  devWidget,
72
72
  children
73
- }: LingoProviderProps): react_jsx_runtime3.JSX.Element;
73
+ }: LingoProviderProps): react_jsx_runtime1.JSX.Element;
74
74
  //#endregion
75
75
  export { LingoProvider, LingoProviderProps };
76
76
  //# sourceMappingURL=LingoProvider.d.cts.map
@@ -54,10 +54,11 @@ function getGitOrgId() {
54
54
  }
55
55
  function parseGitUrl(url) {
56
56
  const cleanUrl = url.replace(/\.git$/, "");
57
+ const host = cleanUrl.replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").replace(/^[^@/]+@/, "").split(/[/:]/)[0].toLowerCase();
57
58
  let platform = null;
58
- if (cleanUrl.includes("github.com")) platform = "github";
59
- else if (cleanUrl.includes("gitlab.com")) platform = "gitlab";
60
- else if (cleanUrl.includes("bitbucket.org")) platform = "bitbucket";
59
+ if (host === "github.com" || host.endsWith(".github.com")) platform = "github";
60
+ else if (host === "gitlab.com" || host.endsWith(".gitlab.com")) platform = "gitlab";
61
+ else if (host === "bitbucket.org" || host.endsWith(".bitbucket.org")) platform = "bitbucket";
61
62
  const sshMatch = cleanUrl.match(/[@:]([^:/@]+\/[^:/@]+)$/);
62
63
  const httpsMatch = cleanUrl.match(/\/([^/]+\/[^/]+)$/);
63
64
  const repoPath = sshMatch?.[1] || httpsMatch?.[1];
@@ -53,10 +53,11 @@ function getGitOrgId() {
53
53
  }
54
54
  function parseGitUrl(url) {
55
55
  const cleanUrl = url.replace(/\.git$/, "");
56
+ const host = cleanUrl.replace(/^[a-z][a-z0-9+.-]*:\/\//i, "").replace(/^[^@/]+@/, "").split(/[/:]/)[0].toLowerCase();
56
57
  let platform = null;
57
- if (cleanUrl.includes("github.com")) platform = "github";
58
- else if (cleanUrl.includes("gitlab.com")) platform = "gitlab";
59
- else if (cleanUrl.includes("bitbucket.org")) platform = "bitbucket";
58
+ if (host === "github.com" || host.endsWith(".github.com")) platform = "github";
59
+ else if (host === "gitlab.com" || host.endsWith(".gitlab.com")) platform = "gitlab";
60
+ else if (host === "bitbucket.org" || host.endsWith(".bitbucket.org")) platform = "bitbucket";
60
61
  const sshMatch = cleanUrl.match(/[@:]([^:/@]+\/[^:/@]+)$/);
61
62
  const httpsMatch = cleanUrl.match(/\/([^/]+\/[^/]+)$/);
62
63
  const repoPath = sshMatch?.[1] || httpsMatch?.[1];
@@ -1 +1 @@
1
- {"version":3,"file":"org-id.mjs","names":["cachedGitOrgId: string | null | undefined","platform: string | null"],"sources":["../../src/utils/org-id.ts"],"sourcesContent":["import { execSync } from \"child_process\";\n\nlet cachedGitOrgId: string | null | undefined = undefined;\n\nfunction extractOrg(fullPath: string): string | null {\n const parts = fullPath.split(\"/\");\n if (parts.length < 1) {\n return null;\n }\n return parts[0];\n}\n\nexport function getOrgId(): string | null {\n const ciOrgId = getCIOrgId();\n if (ciOrgId) return ciOrgId;\n\n const gitOrgId = getGitOrgId();\n if (gitOrgId) return gitOrgId;\n\n return null;\n}\n\nfunction getCIOrgId(): string | null {\n if (process.env.GITHUB_REPOSITORY) {\n const org = extractOrg(process.env.GITHUB_REPOSITORY);\n if (org) return `github:${org}`;\n }\n\n if (process.env.CI_PROJECT_PATH) {\n const org = extractOrg(process.env.CI_PROJECT_PATH);\n if (org) return `gitlab:${org}`;\n }\n\n if (process.env.BITBUCKET_REPO_FULL_NAME) {\n const org = extractOrg(process.env.BITBUCKET_REPO_FULL_NAME);\n if (org) return `bitbucket:${org}`;\n }\n\n return null;\n}\n\nfunction getGitOrgId(): string | null {\n if (cachedGitOrgId !== undefined) {\n return cachedGitOrgId;\n }\n\n try {\n const remoteUrl = execSync(\"git config --get remote.origin.url\", {\n encoding: \"utf8\",\n stdio: [\"pipe\", \"pipe\", \"ignore\"],\n }).trim();\n\n if (!remoteUrl) {\n cachedGitOrgId = null;\n return null;\n }\n\n cachedGitOrgId = parseGitUrl(remoteUrl);\n return cachedGitOrgId;\n } catch {\n cachedGitOrgId = null;\n return null;\n }\n}\n\nfunction parseGitUrl(url: string): string | null {\n const cleanUrl = url.replace(/\\.git$/, \"\");\n\n let platform: string | null = null;\n if (cleanUrl.includes(\"github.com\")) {\n platform = \"github\";\n } else if (cleanUrl.includes(\"gitlab.com\")) {\n platform = \"gitlab\";\n } else if (cleanUrl.includes(\"bitbucket.org\")) {\n platform = \"bitbucket\";\n }\n\n const sshMatch = cleanUrl.match(/[@:]([^:/@]+\\/[^:/@]+)$/);\n const httpsMatch = cleanUrl.match(/\\/([^/]+\\/[^/]+)$/);\n\n const repoPath = sshMatch?.[1] || httpsMatch?.[1];\n\n if (!repoPath) return null;\n\n const org = extractOrg(repoPath);\n if (!org) return null;\n\n if (platform) {\n return `${platform}:${org}`;\n }\n\n return `git:${org}`;\n}\n"],"mappings":";;;AAEA,IAAIA,iBAA4C;AAEhD,SAAS,WAAW,UAAiC;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U,QAAO;CAEtB,MAAM,MAAM,WAAW,SAAS;AAChC,KAAI,CAAC,IAAK,QAAO;AAEjB,KAAI,SACF,QAAO,GAAG,SAAS,GAAG;AAGxB,QAAO,OAAO"}
1
+ {"version":3,"file":"org-id.mjs","names":["cachedGitOrgId: string | null | undefined","platform: string | null"],"sources":["../../src/utils/org-id.ts"],"sourcesContent":["import { execSync } from \"child_process\";\n\nlet cachedGitOrgId: string | null | undefined = undefined;\n\nfunction extractOrg(fullPath: string): string | null {\n const parts = fullPath.split(\"/\");\n if (parts.length < 1) {\n return null;\n }\n return parts[0];\n}\n\nexport function getOrgId(): string | null {\n const ciOrgId = getCIOrgId();\n if (ciOrgId) return ciOrgId;\n\n const gitOrgId = getGitOrgId();\n if (gitOrgId) return gitOrgId;\n\n return null;\n}\n\nfunction getCIOrgId(): string | null {\n if (process.env.GITHUB_REPOSITORY) {\n const org = extractOrg(process.env.GITHUB_REPOSITORY);\n if (org) return `github:${org}`;\n }\n\n if (process.env.CI_PROJECT_PATH) {\n const org = extractOrg(process.env.CI_PROJECT_PATH);\n if (org) return `gitlab:${org}`;\n }\n\n if (process.env.BITBUCKET_REPO_FULL_NAME) {\n const org = extractOrg(process.env.BITBUCKET_REPO_FULL_NAME);\n if (org) return `bitbucket:${org}`;\n }\n\n return null;\n}\n\nfunction getGitOrgId(): string | null {\n if (cachedGitOrgId !== undefined) {\n return cachedGitOrgId;\n }\n\n try {\n const remoteUrl = execSync(\"git config --get remote.origin.url\", {\n encoding: \"utf8\",\n stdio: [\"pipe\", \"pipe\", \"ignore\"],\n }).trim();\n\n if (!remoteUrl) {\n cachedGitOrgId = null;\n return null;\n }\n\n cachedGitOrgId = parseGitUrl(remoteUrl);\n return cachedGitOrgId;\n } catch {\n cachedGitOrgId = null;\n return null;\n }\n}\n\nfunction parseGitUrl(url: string): string | null {\n const cleanUrl = url.replace(/\\.git$/, \"\");\n\n const host = cleanUrl\n .replace(/^[a-z][a-z0-9+.-]*:\\/\\//i, \"\") // strip scheme://\n .replace(/^[^@/]+@/, \"\") // strip user@\n .split(/[/:]/)[0] // host token, before first / or :\n .toLowerCase();\n\n let platform: string | null = null;\n if (host === \"github.com\" || host.endsWith(\".github.com\")) {\n platform = \"github\";\n } else if (host === \"gitlab.com\" || host.endsWith(\".gitlab.com\")) {\n platform = \"gitlab\";\n } else if (host === \"bitbucket.org\" || host.endsWith(\".bitbucket.org\")) {\n platform = \"bitbucket\";\n }\n\n const sshMatch = cleanUrl.match(/[@:]([^:/@]+\\/[^:/@]+)$/);\n const httpsMatch = cleanUrl.match(/\\/([^/]+\\/[^/]+)$/);\n\n const repoPath = sshMatch?.[1] || httpsMatch?.[1];\n\n if (!repoPath) return null;\n\n const org = extractOrg(repoPath);\n if (!org) return null;\n\n if (platform) {\n return `${platform}:${org}`;\n }\n\n return `git:${org}`;\n}\n"],"mappings":";;;AAEA,IAAIA,iBAA4C;AAEhD,SAAS,WAAW,UAAiC;CACnD,MAAM,QAAQ,SAAS,MAAM,IAAI;AACjC,KAAI,MAAM,SAAS,EACjB,QAAO;AAET,QAAO,MAAM;;AAGf,SAAgB,WAA0B;CACxC,MAAM,UAAU,YAAY;AAC5B,KAAI,QAAS,QAAO;CAEpB,MAAM,WAAW,aAAa;AAC9B,KAAI,SAAU,QAAO;AAErB,QAAO;;AAGT,SAAS,aAA4B;AACnC,KAAI,QAAQ,IAAI,mBAAmB;EACjC,MAAM,MAAM,WAAW,QAAQ,IAAI,kBAAkB;AACrD,MAAI,IAAK,QAAO,UAAU;;AAG5B,KAAI,QAAQ,IAAI,iBAAiB;EAC/B,MAAM,MAAM,WAAW,QAAQ,IAAI,gBAAgB;AACnD,MAAI,IAAK,QAAO,UAAU;;AAG5B,KAAI,QAAQ,IAAI,0BAA0B;EACxC,MAAM,MAAM,WAAW,QAAQ,IAAI,yBAAyB;AAC5D,MAAI,IAAK,QAAO,aAAa;;AAG/B,QAAO;;AAGT,SAAS,cAA6B;AACpC,KAAI,mBAAmB,OACrB,QAAO;AAGT,KAAI;EACF,MAAM,YAAY,SAAS,sCAAsC;GAC/D,UAAU;GACV,OAAO;IAAC;IAAQ;IAAQ;IAAS;GAClC,CAAC,CAAC,MAAM;AAET,MAAI,CAAC,WAAW;AACd,oBAAiB;AACjB,UAAO;;AAGT,mBAAiB,YAAY,UAAU;AACvC,SAAO;SACD;AACN,mBAAiB;AACjB,SAAO;;;AAIX,SAAS,YAAY,KAA4B;CAC/C,MAAM,WAAW,IAAI,QAAQ,UAAU,GAAG;CAE1C,MAAM,OAAO,SACV,QAAQ,4BAA4B,GAAG,CACvC,QAAQ,YAAY,GAAG,CACvB,MAAM,OAAO,CAAC,GACd,aAAa;CAEhB,IAAIC,WAA0B;AAC9B,KAAI,SAAS,gBAAgB,KAAK,SAAS,cAAc,CACvD,YAAW;UACF,SAAS,gBAAgB,KAAK,SAAS,cAAc,CAC9D,YAAW;UACF,SAAS,mBAAmB,KAAK,SAAS,iBAAiB,CACpE,YAAW;CAGb,MAAM,WAAW,SAAS,MAAM,0BAA0B;CAC1D,MAAM,aAAa,SAAS,MAAM,oBAAoB;CAEtD,MAAM,WAAW,WAAW,MAAM,aAAa;AAE/C,KAAI,CAAC,SAAU,QAAO;CAEtB,MAAM,MAAM,WAAW,SAAS;AAChC,KAAI,CAAC,IAAK,QAAO;AAEjB,KAAI,SACF,QAAO,GAAG,SAAS,GAAG;AAGxB,QAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/compiler",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Lingo.dev Compiler",
5
5
  "private": false,
6
6
  "repository": {
@@ -141,7 +141,7 @@
141
141
  "@ai-sdk/groq": "3.0.1",
142
142
  "@ai-sdk/mistral": "3.0.1",
143
143
  "@ai-sdk/openai": "3.0.1",
144
- "@babel/core": "7.26.0",
144
+ "@babel/core": "7.29.6",
145
145
  "@babel/generator": "7.28.5",
146
146
  "@babel/parser": "7.28.5",
147
147
  "@babel/preset-react": "7.26.3",
@@ -151,7 +151,7 @@
151
151
  "@formatjs/icu-messageformat-parser": "3.1.1",
152
152
  "@openrouter/ai-sdk-provider": "1.5.4",
153
153
  "ai": "6.0.3",
154
- "ai-sdk-ollama": "3.0.0",
154
+ "ai-sdk-ollama": "3.8.8",
155
155
  "dotenv": "17.2.3",
156
156
  "fast-xml-parser": "5.7.0",
157
157
  "ini": "5.0.0",
@@ -161,7 +161,7 @@
161
161
  "posthog-node": "5.14.0",
162
162
  "lmdb": "3.2.6",
163
163
  "ws": "8.21.0",
164
- "lingo.dev": "^0.137.2"
164
+ "lingo.dev": "^0.137.4"
165
165
  },
166
166
  "peerDependencies": {
167
167
  "next": "^15.0.0 || ^16.0.4",