nx 22.5.3 → 22.5.4
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/.eslintrc.json +3 -1
- package/migrations.json +6 -0
- package/package.json +12 -12
- package/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts.map +1 -1
- package/src/ai/set-up-ai-agents/set-up-ai-agents.js +2 -0
- package/src/command-line/import/command-object.d.ts.map +1 -1
- package/src/command-line/import/command-object.js +1 -1
- package/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +10 -0
- package/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts.map +1 -0
- package/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +61 -0
- package/src/command-line/release/utils/remote-release-clients/github.d.ts.map +1 -1
- package/src/command-line/release/utils/remote-release-clients/github.js +8 -13
- package/src/command-line/release/utils/remote-release-clients/gitlab.d.ts.map +1 -1
- package/src/command-line/release/utils/remote-release-clients/gitlab.js +4 -9
- package/src/core/graph/main.js +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +13 -5
- package/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +3 -0
- package/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts.map +1 -0
- package/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +14 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/project-graph/nx-deps-cache.d.ts +10 -0
- package/src/project-graph/nx-deps-cache.d.ts.map +1 -1
- package/src/project-graph/nx-deps-cache.js +36 -0
- package/src/project-graph/project-graph.d.ts.map +1 -1
- package/src/project-graph/project-graph.js +23 -4
- package/src/project-graph/utils/project-configuration-utils.js +1 -1
- package/src/utils/ignore.d.ts +5 -0
- package/src/utils/ignore.d.ts.map +1 -1
- package/src/utils/ignore.js +16 -0
- package/src/utils/package-manager.d.ts.map +1 -1
- package/src/utils/package-manager.js +22 -1
package/.eslintrc.json
CHANGED
|
@@ -145,7 +145,9 @@
|
|
|
145
145
|
// Nx Docker plugin conditionally available dynamically at runtime
|
|
146
146
|
"@nx/docker",
|
|
147
147
|
// Only used in test-utils at the time of writing
|
|
148
|
-
"@ltd/j-toml"
|
|
148
|
+
"@ltd/j-toml",
|
|
149
|
+
// Used in WASI browser implementation (nx.wasi-browser.js)
|
|
150
|
+
"@napi-rs/wasm-runtime"
|
|
149
151
|
]
|
|
150
152
|
}
|
|
151
153
|
]
|
package/migrations.json
CHANGED
|
@@ -136,6 +136,12 @@
|
|
|
136
136
|
"version": "22.1.0-beta.5",
|
|
137
137
|
"description": "Updates the nx wrapper.",
|
|
138
138
|
"implementation": "./src/migrations/update-22-1-0/update-nx-wrapper"
|
|
139
|
+
},
|
|
140
|
+
"22-7-0-add-polygraph-to-git-ignore": {
|
|
141
|
+
"cli": "nx",
|
|
142
|
+
"version": "22.7.0-beta.0",
|
|
143
|
+
"description": "Adds .nx/polygraph to .gitignore",
|
|
144
|
+
"implementation": "./src/migrations/update-22-7-0/add-polygraph-to-git-ignore"
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "22.5.
|
|
3
|
+
"version": "22.5.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
6
6
|
"repository": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"jest-diff": "^30.0.2",
|
|
55
55
|
"jsonc-parser": "3.2.0",
|
|
56
56
|
"lines-and-columns": "2.0.3",
|
|
57
|
-
"minimatch": "10.2.
|
|
57
|
+
"minimatch": "10.2.4",
|
|
58
58
|
"node-machine-id": "1.1.12",
|
|
59
59
|
"npm-run-path": "^4.0.1",
|
|
60
60
|
"open": "^8.4.0",
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"optionalDependencies": {
|
|
87
|
-
"@nx/nx-darwin-arm64": "22.5.
|
|
88
|
-
"@nx/nx-darwin-x64": "22.5.
|
|
89
|
-
"@nx/nx-freebsd-x64": "22.5.
|
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "22.5.
|
|
91
|
-
"@nx/nx-linux-arm64-gnu": "22.5.
|
|
92
|
-
"@nx/nx-linux-arm64-musl": "22.5.
|
|
93
|
-
"@nx/nx-linux-x64-gnu": "22.5.
|
|
94
|
-
"@nx/nx-linux-x64-musl": "22.5.
|
|
95
|
-
"@nx/nx-win32-arm64-msvc": "22.5.
|
|
96
|
-
"@nx/nx-win32-x64-msvc": "22.5.
|
|
87
|
+
"@nx/nx-darwin-arm64": "22.5.4",
|
|
88
|
+
"@nx/nx-darwin-x64": "22.5.4",
|
|
89
|
+
"@nx/nx-freebsd-x64": "22.5.4",
|
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "22.5.4",
|
|
91
|
+
"@nx/nx-linux-arm64-gnu": "22.5.4",
|
|
92
|
+
"@nx/nx-linux-arm64-musl": "22.5.4",
|
|
93
|
+
"@nx/nx-linux-x64-gnu": "22.5.4",
|
|
94
|
+
"@nx/nx-linux-x64-musl": "22.5.4",
|
|
95
|
+
"@nx/nx-win32-arm64-msvc": "22.5.4",
|
|
96
|
+
"@nx/nx-win32-x64-msvc": "22.5.4"
|
|
97
97
|
},
|
|
98
98
|
"nx-migrations": {
|
|
99
99
|
"migrations": "./migrations.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-up-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"set-up-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AA0B5B,OAAO,EACL,sCAAsC,EACtC,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC,CAAC;AAmCF,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,EACrC,KAAK,UAAQ,GACZ,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAmC5D;AAaD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAmP7C;AAqJD,eAAe,sBAAsB,CAAC"}
|
|
@@ -11,6 +11,7 @@ const generate_files_1 = require("../../generators/utils/generate-files");
|
|
|
11
11
|
const json_1 = require("../../generators/utils/json");
|
|
12
12
|
const native_1 = require("../../native");
|
|
13
13
|
const package_json_1 = require("../../utils/package-json");
|
|
14
|
+
const ignore_1 = require("../../utils/ignore");
|
|
14
15
|
const provenance_1 = require("../../utils/provenance");
|
|
15
16
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
16
17
|
const constants_1 = require("../constants");
|
|
@@ -182,6 +183,7 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
185
|
}
|
|
186
|
+
(0, ignore_1.addEntryToGitIgnore)(tree, (0, path_1.join)(options.directory, '.gitignore'), '.nx/polygraph');
|
|
185
187
|
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
|
|
186
188
|
// we use the check variable to determine if we should actually make changes or just report what would be changed
|
|
187
189
|
return async (check = false) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/import/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/import/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,eAAO,MAAM,kBAAkB,EAAE,aAgDhC,CAAC"}
|
|
@@ -10,7 +10,7 @@ exports.yargsImportCommand = {
|
|
|
10
10
|
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withVerbose)(yargs
|
|
11
11
|
.positional('sourceRepository', {
|
|
12
12
|
type: 'string',
|
|
13
|
-
description: 'The remote URL of the source to import.',
|
|
13
|
+
description: 'The remote URL or local path of the source repository to import.',
|
|
14
14
|
})
|
|
15
15
|
.positional('destinationDirectory', {
|
|
16
16
|
type: 'string',
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RemoteRepoSlug } from './remote-release-client';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts a GitHub-style repo slug (user/repo).
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractGitHubRepoSlug(remoteUrl: string, expectedHostname: string): RemoteRepoSlug | null;
|
|
6
|
+
/**
|
|
7
|
+
* Extracts a GitLab-style repo slug with full nested group path.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractGitLabRepoSlug(remoteUrl: string, expectedHostname: string): RemoteRepoSlug | null;
|
|
10
|
+
//# sourceMappingURL=extract-repo-slug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract-repo-slug.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/command-line/release/utils/remote-release-clients/extract-repo-slug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,cAAc,GAAG,IAAI,CAEvB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,cAAc,GAAG,IAAI,CAEvB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractGitHubRepoSlug = extractGitHubRepoSlug;
|
|
4
|
+
exports.extractGitLabRepoSlug = extractGitLabRepoSlug;
|
|
5
|
+
/**
|
|
6
|
+
* Extracts a GitHub-style repo slug (user/repo).
|
|
7
|
+
*/
|
|
8
|
+
function extractGitHubRepoSlug(remoteUrl, expectedHostname) {
|
|
9
|
+
return extractRepoSlug(remoteUrl, expectedHostname, 2);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Extracts a GitLab-style repo slug with full nested group path.
|
|
13
|
+
*/
|
|
14
|
+
function extractGitLabRepoSlug(remoteUrl, expectedHostname) {
|
|
15
|
+
return extractRepoSlug(remoteUrl, expectedHostname, Infinity);
|
|
16
|
+
}
|
|
17
|
+
const SCP_URL_REGEX = /^git@([^:]+):(.+)$/;
|
|
18
|
+
/**
|
|
19
|
+
* Extracts a repository slug from a Git remote URL.
|
|
20
|
+
* `segmentLimit` = 2 for GitHub (user/repo), `Infinity` for GitLab (with subgroups).
|
|
21
|
+
*/
|
|
22
|
+
function extractRepoSlug(remoteUrl, expectedHostname, segmentLimit) {
|
|
23
|
+
if (!remoteUrl)
|
|
24
|
+
return null;
|
|
25
|
+
// SCP-like: git@host:path
|
|
26
|
+
const scpMatch = remoteUrl.match(SCP_URL_REGEX);
|
|
27
|
+
if (scpMatch) {
|
|
28
|
+
const [, host, path] = scpMatch;
|
|
29
|
+
if (!isHostMatch(host, expectedHostname))
|
|
30
|
+
return null;
|
|
31
|
+
const segments = normalizeRepoPath(path).split('/').filter(Boolean);
|
|
32
|
+
if (segments.length < 2)
|
|
33
|
+
return null;
|
|
34
|
+
return segments.slice(0, segmentLimit).join('/');
|
|
35
|
+
}
|
|
36
|
+
// URL-like
|
|
37
|
+
try {
|
|
38
|
+
const url = new URL(remoteUrl);
|
|
39
|
+
if (!isHostMatch(url.hostname, expectedHostname))
|
|
40
|
+
return null;
|
|
41
|
+
const segments = normalizeRepoPath(url.pathname).split('/').filter(Boolean);
|
|
42
|
+
if (segments.length < 2)
|
|
43
|
+
return null;
|
|
44
|
+
return segments.slice(0, segmentLimit).join('/');
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function normalizeRepoPath(s) {
|
|
51
|
+
return s.replace(/^\/+|\/+$|\.git$/g, '');
|
|
52
|
+
}
|
|
53
|
+
function normalizeHostname(hostname) {
|
|
54
|
+
return hostname
|
|
55
|
+
.toLowerCase()
|
|
56
|
+
.replace(/^ssh\./, '')
|
|
57
|
+
.split(':')[0];
|
|
58
|
+
}
|
|
59
|
+
function isHostMatch(actual, expected) {
|
|
60
|
+
return normalizeHostname(actual) === normalizeHostname(expected);
|
|
61
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/command-line/release/utils/remote-release-clients/github.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/command-line/release/utils/remote-release-clients/github.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAOjC,MAAM,WAAW,cAAe,SAAQ,cAAc;CAAG;AAGzD,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,4BAA4B,EAAE,mCAKxC,CAAC;AAEJ,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,mBAAmB,CAAC;IACrF,yBAAyB,SAAY;IAErC;;OAEG;IACH,MAAM,CAAC,eAAe,CACpB,mBAAmB,EAAE,KAAK,GAAG,mCAAmC,EAChE,UAAU,SAAW,GACpB,cAAc,GAAG,IAAI;IAkCxB;;OAEG;WACU,gBAAgB,CAC3B,QAAQ,EAAE,MA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node_fs_1 = require("node:fs");
|
|
|
8
8
|
const node_os_1 = require("node:os");
|
|
9
9
|
const output_1 = require("../../../../utils/output");
|
|
10
10
|
const path_1 = require("../../../../utils/path");
|
|
11
|
+
const extract_repo_slug_1 = require("./extract-repo-slug");
|
|
11
12
|
const remote_release_client_1 = require("./remote-release-client");
|
|
12
13
|
// axios types and values don't seem to match
|
|
13
14
|
const _axios = require("axios");
|
|
@@ -36,27 +37,21 @@ class GithubRemoteReleaseClient extends remote_release_client_1.RemoteReleaseCli
|
|
|
36
37
|
let apiBaseUrl = exports.defaultCreateReleaseProvider.apiBaseUrl;
|
|
37
38
|
if (createReleaseConfig !== false &&
|
|
38
39
|
typeof createReleaseConfig !== 'string') {
|
|
39
|
-
hostname = createReleaseConfig.hostname;
|
|
40
|
+
hostname = createReleaseConfig.hostname || hostname;
|
|
40
41
|
apiBaseUrl = createReleaseConfig.apiBaseUrl;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const regex = new RegExp(regexString);
|
|
46
|
-
const match = remoteUrl.match(regex);
|
|
47
|
-
if (match && match[1]) {
|
|
48
|
-
return {
|
|
49
|
-
hostname,
|
|
50
|
-
apiBaseUrl,
|
|
51
|
-
// Ensure any trailing .git is stripped
|
|
52
|
-
slug: match[1].replace(/\.git$/, ''),
|
|
53
|
-
};
|
|
43
|
+
const slug = (0, extract_repo_slug_1.extractGitHubRepoSlug)(remoteUrl, hostname);
|
|
44
|
+
if (slug) {
|
|
45
|
+
return { hostname, apiBaseUrl, slug };
|
|
54
46
|
}
|
|
55
47
|
else {
|
|
56
48
|
throw new Error(`Could not extract "user/repo" data from the resolved remote URL: ${remoteUrl}`);
|
|
57
49
|
}
|
|
58
50
|
}
|
|
59
51
|
catch (error) {
|
|
52
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
53
|
+
console.error(error);
|
|
54
|
+
}
|
|
60
55
|
return null;
|
|
61
56
|
}
|
|
62
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/command-line/release/utils/remote-release-clients/gitlab.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/nx/src/command-line/release/utils/remote-release-clients/gitlab.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;YACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,EAAE,CAAC;KACL,CAAC;IACF,W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,OAAO,CAAC,IAAI,CAAC;YA+CF,yBAAyB;IA6BvC;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,MAAM;cAuCjC,WAAW,CACzB,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,CAAC,EAAE,aAAa,GAC9B,OAAO,CAAC,mBAAmB,CAAC;IAoC/B,OAAO,CAAC,yBAAyB;CASlC"}
|
|
@@ -5,6 +5,7 @@ const pc = require("picocolors");
|
|
|
5
5
|
const enquirer_1 = require("enquirer");
|
|
6
6
|
const node_child_process_1 = require("node:child_process");
|
|
7
7
|
const output_1 = require("../../../../utils/output");
|
|
8
|
+
const extract_repo_slug_1 = require("./extract-repo-slug");
|
|
8
9
|
const remote_release_client_1 = require("./remote-release-client");
|
|
9
10
|
exports.defaultCreateReleaseProvider = {
|
|
10
11
|
provider: 'gitlab',
|
|
@@ -31,16 +32,10 @@ class GitLabRemoteReleaseClient extends remote_release_client_1.RemoteReleaseCli
|
|
|
31
32
|
if (createReleaseConfig !== false &&
|
|
32
33
|
typeof createReleaseConfig !== 'string') {
|
|
33
34
|
hostname = createReleaseConfig.hostname || hostname;
|
|
34
|
-
apiBaseUrl = createReleaseConfig.apiBaseUrl
|
|
35
|
+
apiBaseUrl = createReleaseConfig.apiBaseUrl;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const regexString = `${escapedHostname}[/:]([\\w.-]+/[\\w.-]+(?:/[\\w.-]+)*)(\\.git)?`;
|
|
39
|
-
const regex = new RegExp(regexString);
|
|
40
|
-
const match = remoteUrl.match(regex);
|
|
41
|
-
if (match && match[1]) {
|
|
42
|
-
// Remove trailing .git if present
|
|
43
|
-
const slug = match[1].replace(/\.git$/, '');
|
|
37
|
+
const slug = (0, extract_repo_slug_1.extractGitLabRepoSlug)(remoteUrl, hostname);
|
|
38
|
+
if (slug) {
|
|
44
39
|
// Encode the project path for use in API URLs
|
|
45
40
|
const projectId = encodeURIComponent(slug);
|
|
46
41
|
return {
|