@lingo.dev/compiler 0.4.5 → 0.4.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.
@@ -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,12 +1,12 @@
1
1
  import { LingoProviderProps } from "../shared/LingoProvider.mjs";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 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_runtime2.JSX.Element>;
10
10
  //#endregion
11
11
  export { LingoProvider };
12
12
  //# sourceMappingURL=ServerLingoProvider.d.mts.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
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from "react";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
  import { LocaleCode } from "lingo.dev/spec";
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.mts.map
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from "react";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
  import { LocaleCode } from "lingo.dev/spec";
4
4
 
5
5
  //#region src/react/shared/LocaleSwitcher.d.ts
@@ -65,7 +65,7 @@ declare function LocaleSwitcher({
65
65
  style,
66
66
  className,
67
67
  showLoadingState
68
- }: LocaleSwitcherProps): react_jsx_runtime2.JSX.Element;
68
+ }: LocaleSwitcherProps): react_jsx_runtime3.JSX.Element;
69
69
  //#endregion
70
70
  export { LocaleSwitcher };
71
71
  //# sourceMappingURL=LocaleSwitcher.d.mts.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,WAA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CAAC,SAAU,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.5",
3
+ "version": "0.4.7",
4
4
  "description": "Lingo.dev Compiler",
5
5
  "private": false,
6
6
  "repository": {
@@ -129,7 +129,7 @@
129
129
  "@types/react": "19.2.7",
130
130
  "@types/react-dom": "19.2.3",
131
131
  "@types/ws": "8.18.1",
132
- "next": "16.1.0",
132
+ "next": "16.2.9",
133
133
  "tsdown": "0.18.2",
134
134
  "tsx": "4.21.0",
135
135
  "typescript": "5.9.3",
@@ -156,12 +156,12 @@
156
156
  "fast-xml-parser": "5.7.0",
157
157
  "ini": "5.0.0",
158
158
  "intl-messageformat": "11.0.6",
159
- "lodash": "4.17.23",
159
+ "lodash": "4.18.1",
160
160
  "node-machine-id": "1.1.12",
161
161
  "posthog-node": "5.14.0",
162
162
  "lmdb": "3.2.6",
163
- "ws": "8.18.3",
164
- "lingo.dev": "^0.137.1"
163
+ "ws": "8.21.0",
164
+ "lingo.dev": "^0.137.3"
165
165
  },
166
166
  "peerDependencies": {
167
167
  "next": "^15.0.0 || ^16.0.4",