@socketsecurity/cli-with-sentry 1.0.50 → 1.0.52
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/dist/cli.js +166 -345
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +7 -3
- package/dist/constants.js.map +1 -1
- package/dist/types/commands/ci/handle-ci.d.mts.map +1 -1
- package/dist/types/commands/fix/agent-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/fix-env-helpers.d.mts +1 -1
- package/dist/types/commands/fix/fix-env-helpers.d.mts.map +1 -1
- package/dist/types/commands/fix/{git.d.mts → socket-git.d.mts} +1 -17
- package/dist/types/commands/fix/socket-git.d.mts.map +1 -0
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/setup-scan-config.d.mts.map +1 -1
- package/dist/types/constants.d.mts +2 -0
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/shadow/npm/arborist/types.d.mts +4 -4
- package/dist/types/shadow/npm/arborist/types.d.mts.map +1 -1
- package/dist/types/utils/git.d.mts +29 -0
- package/dist/types/utils/git.d.mts.map +1 -0
- package/dist/types/utils/glob.d.mts.map +1 -1
- package/dist/utils.js +317 -15
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +68 -59
- package/external/@socketsecurity/registry/lib/words.js +1 -1
- package/package.json +9 -9
- package/dist/types/commands/fix/git.d.mts.map +0 -1
package/dist/utils.js
CHANGED
|
@@ -13,11 +13,11 @@ var regexps = require('../external/@socketsecurity/registry/lib/regexps');
|
|
|
13
13
|
var prompts = require('../external/@socketsecurity/registry/lib/prompts');
|
|
14
14
|
var strings = require('../external/@socketsecurity/registry/lib/strings');
|
|
15
15
|
var promises = require('node:timers/promises');
|
|
16
|
+
var spawn = require('../external/@socketsecurity/registry/lib/spawn');
|
|
16
17
|
var fs = require('node:fs');
|
|
17
18
|
var registry = require('../external/@socketsecurity/registry');
|
|
18
19
|
var packages = require('../external/@socketsecurity/registry/lib/packages');
|
|
19
20
|
var Module = require('node:module');
|
|
20
|
-
var spawn = require('../external/@socketsecurity/registry/lib/spawn');
|
|
21
21
|
var npm = require('../external/@socketsecurity/registry/lib/npm');
|
|
22
22
|
var words = require('../external/@socketsecurity/registry/lib/words');
|
|
23
23
|
var fs$1 = require('../external/@socketsecurity/registry/lib/fs');
|
|
@@ -25,7 +25,6 @@ var require$$7 = require('../external/@socketsecurity/registry/lib/promises');
|
|
|
25
25
|
|
|
26
26
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
27
27
|
const {
|
|
28
|
-
NPM: NPM$5,
|
|
29
28
|
PNPM: PNPM$2
|
|
30
29
|
} = constants;
|
|
31
30
|
const PNPM_WORKSPACE = `${PNPM$2}-workspace`;
|
|
@@ -136,11 +135,13 @@ function workspacePatternToGlobPattern(workspace) {
|
|
|
136
135
|
return `${workspace}/package.json`;
|
|
137
136
|
}
|
|
138
137
|
async function filterGlobResultToSupportedFiles(entries, supportedFiles) {
|
|
139
|
-
const patterns = [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
const patterns = [];
|
|
139
|
+
for (const key of Object.keys(supportedFiles)) {
|
|
140
|
+
const supported = supportedFiles[key];
|
|
141
|
+
if (supported) {
|
|
142
|
+
patterns.push(...Object.values(supported).map(p => `**/${p.pattern}`));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
144
145
|
return entries.filter(p => vendor.micromatchExports.some(p, patterns));
|
|
145
146
|
}
|
|
146
147
|
async function globWithGitIgnore(patterns, options) {
|
|
@@ -163,6 +164,7 @@ async function globWithGitIgnore(patterns, options) {
|
|
|
163
164
|
const globOptions = {
|
|
164
165
|
absolute: true,
|
|
165
166
|
cwd,
|
|
167
|
+
dot: true,
|
|
166
168
|
expandDirectories: false,
|
|
167
169
|
ignore: hasNegatedPattern ? [] : ignores,
|
|
168
170
|
...additionalOptions
|
|
@@ -1515,11 +1517,11 @@ function msAtHome(isoTimeStamp) {
|
|
|
1515
1517
|
}
|
|
1516
1518
|
|
|
1517
1519
|
async function suggestOrgSlug() {
|
|
1518
|
-
const
|
|
1519
|
-
if (!
|
|
1520
|
+
const sockSdkCResult = await setupSdk();
|
|
1521
|
+
if (!sockSdkCResult.ok) {
|
|
1520
1522
|
return;
|
|
1521
1523
|
}
|
|
1522
|
-
const sockSdk =
|
|
1524
|
+
const sockSdk = sockSdkCResult.data;
|
|
1523
1525
|
const result = await handleApiCall(sockSdk.getOrganizations(), 'list of organizations');
|
|
1524
1526
|
|
|
1525
1527
|
// Ignore a failed request here. It was not the primary goal of
|
|
@@ -1626,6 +1628,292 @@ async function determineOrgSlug(orgFlag, interactive, dryRun) {
|
|
|
1626
1628
|
return [orgSlug, defaultOrgSlug];
|
|
1627
1629
|
}
|
|
1628
1630
|
|
|
1631
|
+
async function getBaseBranch(cwd = process.cwd()) {
|
|
1632
|
+
// Lazily access constants.ENV properties.
|
|
1633
|
+
const {
|
|
1634
|
+
GITHUB_BASE_REF,
|
|
1635
|
+
GITHUB_REF_NAME,
|
|
1636
|
+
GITHUB_REF_TYPE
|
|
1637
|
+
} = constants.ENV;
|
|
1638
|
+
// 1. In a pull request, this is always the base branch.
|
|
1639
|
+
if (GITHUB_BASE_REF) {
|
|
1640
|
+
return GITHUB_BASE_REF;
|
|
1641
|
+
}
|
|
1642
|
+
// 2. If it's a branch (not a tag), GITHUB_REF_TYPE should be 'branch'.
|
|
1643
|
+
if (GITHUB_REF_TYPE === 'branch' && GITHUB_REF_NAME) {
|
|
1644
|
+
return GITHUB_REF_NAME;
|
|
1645
|
+
}
|
|
1646
|
+
// 3. Try to resolve the default remote branch using 'git remote show origin'.
|
|
1647
|
+
// This handles detached HEADs or workflows triggered by tags/releases.
|
|
1648
|
+
try {
|
|
1649
|
+
const originDetails = (await spawn.spawn('git', ['remote', 'show', 'origin'], {
|
|
1650
|
+
cwd
|
|
1651
|
+
})).stdout;
|
|
1652
|
+
const match = /(?<=HEAD branch: ).+/.exec(originDetails);
|
|
1653
|
+
if (match?.[0]) {
|
|
1654
|
+
return match[0].trim();
|
|
1655
|
+
}
|
|
1656
|
+
} catch {}
|
|
1657
|
+
// GitHub and GitLab default to branch name "main"
|
|
1658
|
+
// https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch
|
|
1659
|
+
return 'main';
|
|
1660
|
+
}
|
|
1661
|
+
async function getRepoInfo(cwd = process.cwd()) {
|
|
1662
|
+
let info = null;
|
|
1663
|
+
try {
|
|
1664
|
+
const remoteUrl = (await spawn.spawn('git', ['remote', 'get-url', 'origin'], {
|
|
1665
|
+
cwd
|
|
1666
|
+
})).stdout;
|
|
1667
|
+
info = parseGitRemoteUrl(remoteUrl);
|
|
1668
|
+
if (!info) {
|
|
1669
|
+
debug.debugFn('error', 'git: unmatched git remote URL format');
|
|
1670
|
+
debug.debugDir('inspect', {
|
|
1671
|
+
remoteUrl
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
} catch (e) {
|
|
1675
|
+
debug.debugFn('error', 'caught: `git remote get-url origin` failed');
|
|
1676
|
+
debug.debugDir('inspect', {
|
|
1677
|
+
error: e
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
return info;
|
|
1681
|
+
}
|
|
1682
|
+
async function getRepoName(cwd = process.cwd()) {
|
|
1683
|
+
const repoInfo = await getRepoInfo(cwd);
|
|
1684
|
+
return repoInfo?.repo ?? null;
|
|
1685
|
+
}
|
|
1686
|
+
async function gitBranch(cwd = process.cwd()) {
|
|
1687
|
+
const stdioPipeOptions = {
|
|
1688
|
+
cwd
|
|
1689
|
+
};
|
|
1690
|
+
// Try symbolic-ref first which returns the branch name or fails in a
|
|
1691
|
+
// detached HEAD state.
|
|
1692
|
+
try {
|
|
1693
|
+
return (await spawn.spawn('git', ['symbolic-ref', '--short', 'HEAD'], stdioPipeOptions)).stdout;
|
|
1694
|
+
} catch {}
|
|
1695
|
+
// Fallback to using rev-parse to get the short commit hash in a
|
|
1696
|
+
// detached HEAD state.
|
|
1697
|
+
try {
|
|
1698
|
+
return (await spawn.spawn('git', ['rev-parse', '--short', 'HEAD'], stdioPipeOptions)).stdout;
|
|
1699
|
+
} catch {}
|
|
1700
|
+
return null;
|
|
1701
|
+
}
|
|
1702
|
+
async function gitCleanFdx(cwd = process.cwd()) {
|
|
1703
|
+
const stdioIgnoreOptions = {
|
|
1704
|
+
cwd,
|
|
1705
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1706
|
+
};
|
|
1707
|
+
// TODO: propagate CResult?
|
|
1708
|
+
await spawn.spawn('git', ['clean', '-fdx'], stdioIgnoreOptions);
|
|
1709
|
+
}
|
|
1710
|
+
async function gitCheckoutBranch(branch, cwd = process.cwd()) {
|
|
1711
|
+
const stdioIgnoreOptions = {
|
|
1712
|
+
cwd,
|
|
1713
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1714
|
+
};
|
|
1715
|
+
try {
|
|
1716
|
+
await spawn.spawn('git', ['checkout', branch], stdioIgnoreOptions);
|
|
1717
|
+
return true;
|
|
1718
|
+
} catch {}
|
|
1719
|
+
return false;
|
|
1720
|
+
}
|
|
1721
|
+
async function gitCreateBranch(branch, cwd = process.cwd()) {
|
|
1722
|
+
if (await gitLocalBranchExists(branch)) {
|
|
1723
|
+
return true;
|
|
1724
|
+
}
|
|
1725
|
+
const stdioIgnoreOptions = {
|
|
1726
|
+
cwd,
|
|
1727
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1728
|
+
};
|
|
1729
|
+
try {
|
|
1730
|
+
await spawn.spawn('git', ['branch', branch], stdioIgnoreOptions);
|
|
1731
|
+
return true;
|
|
1732
|
+
} catch {}
|
|
1733
|
+
return false;
|
|
1734
|
+
}
|
|
1735
|
+
async function gitPushBranch(branch, cwd = process.cwd()) {
|
|
1736
|
+
const stdioIgnoreOptions = {
|
|
1737
|
+
cwd,
|
|
1738
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1739
|
+
};
|
|
1740
|
+
try {
|
|
1741
|
+
await spawn.spawn('git', ['push', '--force', '--set-upstream', 'origin', branch], stdioIgnoreOptions);
|
|
1742
|
+
return true;
|
|
1743
|
+
} catch (e) {
|
|
1744
|
+
debug.debugFn('error', `caught: git push --force --set-upstream origin ${branch} failed`);
|
|
1745
|
+
debug.debugDir('inspect', {
|
|
1746
|
+
error: e
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
return false;
|
|
1750
|
+
}
|
|
1751
|
+
async function gitCommit(commitMsg, filepaths, options) {
|
|
1752
|
+
if (!filepaths.length) {
|
|
1753
|
+
debug.debugFn('notice', `miss: no filepaths to add`);
|
|
1754
|
+
return false;
|
|
1755
|
+
}
|
|
1756
|
+
const {
|
|
1757
|
+
cwd = process.cwd(),
|
|
1758
|
+
// Lazily access constants.ENV.SOCKET_CLI_GIT_USER_EMAIL.
|
|
1759
|
+
email = constants.ENV.SOCKET_CLI_GIT_USER_EMAIL,
|
|
1760
|
+
// Lazily access constants.ENV.SOCKET_CLI_GIT_USER_NAME.
|
|
1761
|
+
user = constants.ENV.SOCKET_CLI_GIT_USER_NAME
|
|
1762
|
+
} = {
|
|
1763
|
+
__proto__: null,
|
|
1764
|
+
...options
|
|
1765
|
+
};
|
|
1766
|
+
const stdioIgnoreOptions = {
|
|
1767
|
+
cwd,
|
|
1768
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1769
|
+
};
|
|
1770
|
+
try {
|
|
1771
|
+
await gitEnsureIdentity(user, email, cwd);
|
|
1772
|
+
await spawn.spawn('git', ['add', ...filepaths], stdioIgnoreOptions);
|
|
1773
|
+
await spawn.spawn('git', ['commit', '-m', commitMsg], stdioIgnoreOptions);
|
|
1774
|
+
return true;
|
|
1775
|
+
} catch {}
|
|
1776
|
+
return false;
|
|
1777
|
+
}
|
|
1778
|
+
async function gitDeleteBranch(branch, cwd = process.cwd()) {
|
|
1779
|
+
const stdioIgnoreOptions = {
|
|
1780
|
+
cwd,
|
|
1781
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1782
|
+
};
|
|
1783
|
+
try {
|
|
1784
|
+
// Will throw with exit code 1 if branch does not exist.
|
|
1785
|
+
await spawn.spawn('git', ['branch', '-D', branch], stdioIgnoreOptions);
|
|
1786
|
+
return true;
|
|
1787
|
+
} catch {}
|
|
1788
|
+
return false;
|
|
1789
|
+
}
|
|
1790
|
+
async function gitEnsureIdentity(name, email, cwd = process.cwd()) {
|
|
1791
|
+
const stdioIgnoreOptions = {
|
|
1792
|
+
cwd,
|
|
1793
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1794
|
+
};
|
|
1795
|
+
const stdioPipeOptions = {
|
|
1796
|
+
cwd
|
|
1797
|
+
};
|
|
1798
|
+
const identEntries = [['user.email', name], ['user.name', email]];
|
|
1799
|
+
await Promise.all(identEntries.map(async ({
|
|
1800
|
+
0: prop,
|
|
1801
|
+
1: value
|
|
1802
|
+
}) => {
|
|
1803
|
+
let configValue;
|
|
1804
|
+
try {
|
|
1805
|
+
// Will throw with exit code 1 if the config property is not set.
|
|
1806
|
+
configValue = (await spawn.spawn('git', ['config', '--get', prop], stdioPipeOptions)).stdout;
|
|
1807
|
+
} catch {}
|
|
1808
|
+
if (configValue !== value) {
|
|
1809
|
+
try {
|
|
1810
|
+
await spawn.spawn('git', ['config', prop, value], stdioIgnoreOptions);
|
|
1811
|
+
} catch (e) {
|
|
1812
|
+
debug.debugFn('error', `caught: git config ${prop} ${value} failed`);
|
|
1813
|
+
debug.debugDir('inspect', {
|
|
1814
|
+
error: e
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
}));
|
|
1819
|
+
}
|
|
1820
|
+
async function gitLocalBranchExists(branch, cwd = process.cwd()) {
|
|
1821
|
+
const stdioIgnoreOptions = {
|
|
1822
|
+
cwd,
|
|
1823
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1824
|
+
};
|
|
1825
|
+
try {
|
|
1826
|
+
// Will throw with exit code 1 if the branch does not exist.
|
|
1827
|
+
await spawn.spawn('git', ['show-ref', '--quiet', `refs/heads/${branch}`], stdioIgnoreOptions);
|
|
1828
|
+
return true;
|
|
1829
|
+
} catch {}
|
|
1830
|
+
return false;
|
|
1831
|
+
}
|
|
1832
|
+
async function gitRemoteBranchExists(branch, cwd = process.cwd()) {
|
|
1833
|
+
const stdioPipeOptions = {
|
|
1834
|
+
cwd
|
|
1835
|
+
};
|
|
1836
|
+
try {
|
|
1837
|
+
return (await spawn.spawn('git', ['ls-remote', '--heads', 'origin', branch], stdioPipeOptions)).stdout.length > 0;
|
|
1838
|
+
} catch {}
|
|
1839
|
+
return false;
|
|
1840
|
+
}
|
|
1841
|
+
async function gitResetAndClean(branch = 'HEAD', cwd = process.cwd()) {
|
|
1842
|
+
// Discards tracked changes.
|
|
1843
|
+
await gitResetHard(branch, cwd);
|
|
1844
|
+
// Deletes all untracked files and directories.
|
|
1845
|
+
await gitCleanFdx(cwd);
|
|
1846
|
+
}
|
|
1847
|
+
async function gitResetHard(branch = 'HEAD', cwd = process.cwd()) {
|
|
1848
|
+
const stdioIgnoreOptions = {
|
|
1849
|
+
cwd,
|
|
1850
|
+
stdio: debug.isDebug('stdio') ? 'inherit' : 'ignore'
|
|
1851
|
+
};
|
|
1852
|
+
await spawn.spawn('git', ['reset', '--hard', branch], stdioIgnoreOptions);
|
|
1853
|
+
}
|
|
1854
|
+
async function gitUnstagedModifiedFiles(cwd = process.cwd()) {
|
|
1855
|
+
try {
|
|
1856
|
+
const stdioPipeOptions = {
|
|
1857
|
+
cwd
|
|
1858
|
+
};
|
|
1859
|
+
const changedFilesDetails = (await spawn.spawn('git', ['diff', '--name-only'], stdioPipeOptions)).stdout;
|
|
1860
|
+
const relPaths = changedFilesDetails.split('\n') ?? [];
|
|
1861
|
+
return {
|
|
1862
|
+
ok: true,
|
|
1863
|
+
data: relPaths.map(p => path$1.normalizePath(p))
|
|
1864
|
+
};
|
|
1865
|
+
} catch (e) {
|
|
1866
|
+
debug.debugFn('error', 'caught: git diff --name-only failed');
|
|
1867
|
+
debug.debugDir('inspect', {
|
|
1868
|
+
error: e
|
|
1869
|
+
});
|
|
1870
|
+
return {
|
|
1871
|
+
ok: false,
|
|
1872
|
+
message: 'Git Error',
|
|
1873
|
+
cause: 'Unexpected error while trying to ask git whether repo is dirty'
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
const parsedGitRemoteUrlCache = new Map();
|
|
1878
|
+
function parseGitRemoteUrl(remoteUrl) {
|
|
1879
|
+
let result = parsedGitRemoteUrlCache.get(remoteUrl) ?? null;
|
|
1880
|
+
if (result) {
|
|
1881
|
+
return {
|
|
1882
|
+
...result
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
// Handle SSH-style
|
|
1886
|
+
const sshMatch = /^git@[^:]+:([^/]+)\/(.+?)(?:\.git)?$/.exec(remoteUrl);
|
|
1887
|
+
// 1. Handle SSH-style, e.g. git@github.com:owner/repo.git
|
|
1888
|
+
if (sshMatch) {
|
|
1889
|
+
result = {
|
|
1890
|
+
owner: sshMatch[1],
|
|
1891
|
+
repo: sshMatch[2]
|
|
1892
|
+
};
|
|
1893
|
+
} else {
|
|
1894
|
+
// 2. Handle HTTPS/URL-style, e.g. https://github.com/owner/repo.git
|
|
1895
|
+
try {
|
|
1896
|
+
const parsed = new URL(remoteUrl);
|
|
1897
|
+
// Remove leading slashes from pathname and split by "/" to extract segments.
|
|
1898
|
+
const segments = parsed.pathname.replace(/^\/+/, '').split('/');
|
|
1899
|
+
// The second-to-last segment is expected to be the owner (e.g., "owner" in /owner/repo.git).
|
|
1900
|
+
const owner = segments.at(-2);
|
|
1901
|
+
// The last segment is expected to be the repo name, so we remove the ".git" suffix if present.
|
|
1902
|
+
const repo = segments.at(-1)?.replace(/\.git$/, '');
|
|
1903
|
+
if (owner && repo) {
|
|
1904
|
+
result = {
|
|
1905
|
+
owner,
|
|
1906
|
+
repo
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
} catch {}
|
|
1910
|
+
}
|
|
1911
|
+
parsedGitRemoteUrlCache.set(remoteUrl, result);
|
|
1912
|
+
return result ? {
|
|
1913
|
+
...result
|
|
1914
|
+
} : result;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1629
1917
|
function getPurlObject(purl) {
|
|
1630
1918
|
return typeof purl === 'string' ? vendor.packageurlJsExports.PackageURL.fromString(purl) : purl;
|
|
1631
1919
|
}
|
|
@@ -1769,7 +2057,9 @@ async function getPackageFilesForScan(cwd, inputPaths, supportedFiles, config) {
|
|
|
1769
2057
|
}
|
|
1770
2058
|
const packageFiles = await filterGlobResultToSupportedFiles(entries, supportedFiles);
|
|
1771
2059
|
spinner.successAndStop(`Found ${packageFiles.length} local ${words.pluralize('file', packageFiles.length)}`);
|
|
1772
|
-
debug.
|
|
2060
|
+
debug.debugDir('inspect', {
|
|
2061
|
+
packageFiles
|
|
2062
|
+
});
|
|
1773
2063
|
return packageFiles;
|
|
1774
2064
|
}
|
|
1775
2065
|
|
|
@@ -2633,12 +2923,12 @@ async function getAlertsMapFromPurls(purls, options_) {
|
|
|
2633
2923
|
}
|
|
2634
2924
|
const getText = () => `Looking up data for ${remaining} packages`;
|
|
2635
2925
|
spinner?.start(getText());
|
|
2636
|
-
const
|
|
2637
|
-
if (!
|
|
2926
|
+
const sockSdkCResult = await setupSdk(getPublicToken());
|
|
2927
|
+
if (!sockSdkCResult.ok) {
|
|
2638
2928
|
spinner?.stop();
|
|
2639
2929
|
throw new Error('Auth error: Try to run `socket login` first');
|
|
2640
2930
|
}
|
|
2641
|
-
const sockSdk =
|
|
2931
|
+
const sockSdk = sockSdkCResult.data;
|
|
2642
2932
|
const alertsMapOptions = {
|
|
2643
2933
|
overrides: options.overrides,
|
|
2644
2934
|
consolidate: options.consolidate,
|
|
@@ -3346,6 +3636,7 @@ exports.extractOverridesFromPnpmLockSrc = extractOverridesFromPnpmLockSrc;
|
|
|
3346
3636
|
exports.failMsgWithBadge = failMsgWithBadge;
|
|
3347
3637
|
exports.getAlertsMapFromPnpmLockfile = getAlertsMapFromPnpmLockfile;
|
|
3348
3638
|
exports.getAlertsMapFromPurls = getAlertsMapFromPurls;
|
|
3639
|
+
exports.getBaseBranch = getBaseBranch;
|
|
3349
3640
|
exports.getBashrcDetails = getBashrcDetails;
|
|
3350
3641
|
exports.getConfigValue = getConfigValue;
|
|
3351
3642
|
exports.getConfigValueOrUndef = getConfigValueOrUndef;
|
|
@@ -3361,8 +3652,19 @@ exports.getOutputKind = getOutputKind;
|
|
|
3361
3652
|
exports.getPackageFilesForScan = getPackageFilesForScan;
|
|
3362
3653
|
exports.getPkgFullNameFromPurl = getPkgFullNameFromPurl;
|
|
3363
3654
|
exports.getPurlObject = getPurlObject;
|
|
3655
|
+
exports.getRepoInfo = getRepoInfo;
|
|
3656
|
+
exports.getRepoName = getRepoName;
|
|
3364
3657
|
exports.getSocketDevPackageOverviewUrlFromPurl = getSocketDevPackageOverviewUrlFromPurl;
|
|
3365
3658
|
exports.getVisibleTokenPrefix = getVisibleTokenPrefix;
|
|
3659
|
+
exports.gitBranch = gitBranch;
|
|
3660
|
+
exports.gitCheckoutBranch = gitCheckoutBranch;
|
|
3661
|
+
exports.gitCommit = gitCommit;
|
|
3662
|
+
exports.gitCreateBranch = gitCreateBranch;
|
|
3663
|
+
exports.gitDeleteBranch = gitDeleteBranch;
|
|
3664
|
+
exports.gitPushBranch = gitPushBranch;
|
|
3665
|
+
exports.gitRemoteBranchExists = gitRemoteBranchExists;
|
|
3666
|
+
exports.gitResetAndClean = gitResetAndClean;
|
|
3667
|
+
exports.gitUnstagedModifiedFiles = gitUnstagedModifiedFiles;
|
|
3366
3668
|
exports.globWorkspace = globWorkspace;
|
|
3367
3669
|
exports.handleApiCall = handleApiCall;
|
|
3368
3670
|
exports.handleApiCallNoSpinner = handleApiCallNoSpinner;
|
|
@@ -3405,5 +3707,5 @@ exports.tildify = tildify;
|
|
|
3405
3707
|
exports.updateConfigValue = updateConfigValue;
|
|
3406
3708
|
exports.walkNestedMap = walkNestedMap;
|
|
3407
3709
|
exports.writeSocketJson = writeSocketJson;
|
|
3408
|
-
//# debugId=
|
|
3710
|
+
//# debugId=f0a536ee-29b1-4d1e-a6d8-6d4f9395cd8f
|
|
3409
3711
|
//# sourceMappingURL=utils.js.map
|