lingo.dev 0.117.24 → 0.117.25
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/cli.cjs +20 -6
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +20 -6
- package/build/cli.mjs.map +1 -1
- package/package.json +5 -5
package/build/cli.cjs
CHANGED
|
@@ -10860,7 +10860,17 @@ var _https = require('https'); var _https2 = _interopRequireDefault(_https);
|
|
|
10860
10860
|
|
|
10861
10861
|
// src/cli/utils/repository-id.ts
|
|
10862
10862
|
var _child_process = require('child_process'); var cp = _interopRequireWildcard(_child_process);
|
|
10863
|
+
var _crypto = require('crypto');
|
|
10863
10864
|
var cachedGitRepoId = void 0;
|
|
10865
|
+
function hashProjectName(fullPath) {
|
|
10866
|
+
const parts = fullPath.split("/");
|
|
10867
|
+
if (parts.length !== 2) {
|
|
10868
|
+
return _crypto.createHash.call(void 0, "sha256").update(fullPath).digest("hex").slice(0, 8);
|
|
10869
|
+
}
|
|
10870
|
+
const [org, project] = parts;
|
|
10871
|
+
const hashedProject = _crypto.createHash.call(void 0, "sha256").update(project).digest("hex").slice(0, 8);
|
|
10872
|
+
return `${org}/${hashedProject}`;
|
|
10873
|
+
}
|
|
10864
10874
|
function getRepositoryId() {
|
|
10865
10875
|
const ciRepoId = getCIRepositoryId();
|
|
10866
10876
|
if (ciRepoId) return ciRepoId;
|
|
@@ -10870,13 +10880,16 @@ function getRepositoryId() {
|
|
|
10870
10880
|
}
|
|
10871
10881
|
function getCIRepositoryId() {
|
|
10872
10882
|
if (process.env.GITHUB_REPOSITORY) {
|
|
10873
|
-
|
|
10883
|
+
const hashed = hashProjectName(process.env.GITHUB_REPOSITORY);
|
|
10884
|
+
return `github:${hashed}`;
|
|
10874
10885
|
}
|
|
10875
10886
|
if (process.env.CI_PROJECT_PATH) {
|
|
10876
|
-
|
|
10887
|
+
const hashed = hashProjectName(process.env.CI_PROJECT_PATH);
|
|
10888
|
+
return `gitlab:${hashed}`;
|
|
10877
10889
|
}
|
|
10878
10890
|
if (process.env.BITBUCKET_REPO_FULL_NAME) {
|
|
10879
|
-
|
|
10891
|
+
const hashed = hashProjectName(process.env.BITBUCKET_REPO_FULL_NAME);
|
|
10892
|
+
return `bitbucket:${hashed}`;
|
|
10880
10893
|
}
|
|
10881
10894
|
return null;
|
|
10882
10895
|
}
|
|
@@ -10914,10 +10927,11 @@ function parseGitUrl(url) {
|
|
|
10914
10927
|
const httpsMatch = cleanUrl.match(/\/([^/]+\/[^/]+)$/);
|
|
10915
10928
|
const repoPath = _optionalChain([sshMatch, 'optionalAccess', _341 => _341[1]]) || _optionalChain([httpsMatch, 'optionalAccess', _342 => _342[1]]);
|
|
10916
10929
|
if (!repoPath) return null;
|
|
10930
|
+
const hashedPath = hashProjectName(repoPath);
|
|
10917
10931
|
if (platform) {
|
|
10918
|
-
return `${platform}:${
|
|
10932
|
+
return `${platform}:${hashedPath}`;
|
|
10919
10933
|
}
|
|
10920
|
-
return `git:${
|
|
10934
|
+
return `git:${hashedPath}`;
|
|
10921
10935
|
}
|
|
10922
10936
|
|
|
10923
10937
|
// src/cli/utils/observability.ts
|
|
@@ -14778,7 +14792,7 @@ async function renderHero2() {
|
|
|
14778
14792
|
// package.json
|
|
14779
14793
|
var package_default = {
|
|
14780
14794
|
name: "lingo.dev",
|
|
14781
|
-
version: "0.117.
|
|
14795
|
+
version: "0.117.25",
|
|
14782
14796
|
description: "Lingo.dev CLI",
|
|
14783
14797
|
private: false,
|
|
14784
14798
|
repository: {
|