socket 1.1.71 → 1.1.73

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/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.1.73](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.73) - 2026-03-13
8
+
9
+ ### Changed
10
+ - Updated the Coana CLI to v `14.12.197`.
11
+
12
+ ## [1.1.72](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.72) - 2026-03-12
13
+
14
+ ### Changed
15
+ - Updated the Coana CLI to v `14.12.196`.
16
+
7
17
  ## [1.1.71](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.71) - 2026-03-11
8
18
 
9
19
  ### Changed
package/dist/cli.js CHANGED
@@ -888,7 +888,8 @@ async function fetchCreateOrgFullScan(packagePaths, orgSlug, config, options) {
888
888
  committers,
889
889
  pullRequest,
890
890
  repoName,
891
- scanType
891
+ scanType,
892
+ workspace
892
893
  } = {
893
894
  __proto__: null,
894
895
  ...config
@@ -938,6 +939,9 @@ async function fetchCreateOrgFullScan(packagePaths, orgSlug, config, options) {
938
939
  } : {}),
939
940
  scan_type: scanType,
940
941
  repo: repoName,
942
+ ...(workspace ? {
943
+ workspace
944
+ } : {}),
941
945
  set_as_pending_head: String(pendingHead),
942
946
  tmp: String(tmp)
943
947
  }), {
@@ -2218,9 +2222,10 @@ async function handleCreateNewScan({
2218
2222
  report,
2219
2223
  reportLevel,
2220
2224
  targets,
2221
- tmp
2225
+ tmp,
2226
+ workspace
2222
2227
  }) {
2223
- require$$9.debugFn('notice', `Creating new scan for ${orgSlug}/${repoName}`);
2228
+ require$$9.debugFn('notice', `Creating new scan for ${orgSlug}/${workspace ? `${workspace}/` : ''}${repoName}`);
2224
2229
  require$$9.debugDir('inspect', {
2225
2230
  autoManifest,
2226
2231
  branchName,
@@ -2233,7 +2238,8 @@ async function handleCreateNewScan({
2233
2238
  report,
2234
2239
  reportLevel,
2235
2240
  targets,
2236
- tmp
2241
+ tmp,
2242
+ workspace
2237
2243
  });
2238
2244
  if (autoManifest) {
2239
2245
  logger.logger.info('Auto-generating manifest files ...');
@@ -2343,7 +2349,8 @@ async function handleCreateNewScan({
2343
2349
  pullRequest,
2344
2350
  repoName,
2345
2351
  branchName,
2346
- scanType: reach.runReachabilityAnalysis ? constants.default.SCAN_TYPE_SOCKET_TIER1 : constants.default.SCAN_TYPE_SOCKET
2352
+ scanType: reach.runReachabilityAnalysis ? constants.default.SCAN_TYPE_SOCKET_TIER1 : constants.default.SCAN_TYPE_SOCKET,
2353
+ workspace
2347
2354
  }, {
2348
2355
  cwd,
2349
2356
  defaultBranch,
@@ -11160,6 +11167,11 @@ const generalFlags$1 = {
11160
11167
  shortFlag: 'r',
11161
11168
  description: 'Repository name'
11162
11169
  },
11170
+ workspace: {
11171
+ type: 'string',
11172
+ default: '',
11173
+ description: 'The workspace in the Socket Organization that the repository is in to associate with the full scan.'
11174
+ },
11163
11175
  report: {
11164
11176
  type: 'boolean',
11165
11177
  description: 'Wait for the scan creation to complete, then basically run `socket scan report` on it'
@@ -11300,7 +11312,8 @@ async function run$d(argv, importMeta, {
11300
11312
  autoManifest,
11301
11313
  branch: branchName,
11302
11314
  repo: repoName,
11303
- report
11315
+ report,
11316
+ workspace
11304
11317
  } = cli.flags;
11305
11318
  let {
11306
11319
  0: orgSlug
@@ -11334,6 +11347,10 @@ async function run$d(argv, importMeta, {
11334
11347
  repoName = await utils.getRepoName(cwd);
11335
11348
  }
11336
11349
  }
11350
+ if (!workspace && sockJson.defaults?.scan?.create?.workspace) {
11351
+ workspace = sockJson.defaults.scan.create.workspace;
11352
+ logger.logger.info(`Using default --workspace from ${constants.SOCKET_JSON}:`, workspace);
11353
+ }
11337
11354
  if (typeof report !== 'boolean') {
11338
11355
  if (sockJson.defaults?.scan?.create?.report !== undefined) {
11339
11356
  report = sockJson.defaults.scan.create.report;
@@ -11513,7 +11530,8 @@ async function run$d(argv, importMeta, {
11513
11530
  report,
11514
11531
  reportLevel,
11515
11532
  targets,
11516
- tmp: Boolean(tmp)
11533
+ tmp: Boolean(tmp),
11534
+ workspace: workspace && String(workspace) || ''
11517
11535
  });
11518
11536
  }
11519
11537
 
@@ -13831,6 +13849,20 @@ async function configureScan(config, cwd = process.cwd()) {
13831
13849
  } else {
13832
13850
  delete config.repo;
13833
13851
  }
13852
+ const defaultWorkspace = await prompts.input({
13853
+ message: '(--workspace) The workspace in the Socket Organization that the repository is in to associate with the full scan.',
13854
+ default: config.workspace || (await utils.getRepoOwner(cwd)) || '',
13855
+ required: false
13856
+ // validate: async string => bool
13857
+ });
13858
+ if (defaultWorkspace === undefined) {
13859
+ return canceledByUser();
13860
+ }
13861
+ if (defaultWorkspace) {
13862
+ config.workspace = defaultWorkspace;
13863
+ } else {
13864
+ delete config.workspace;
13865
+ }
13834
13866
  const defaultBranchName = await prompts.input({
13835
13867
  message: '(--branch) What branch name (slug) should be reported to Socket for this dir?',
13836
13868
  default: config.branch || (await utils.gitBranch(cwd)) || (await utils.detectDefaultBranch(cwd)),
@@ -15466,5 +15498,5 @@ process.on('unhandledRejection', async (reason, promise) => {
15466
15498
  // eslint-disable-next-line n/no-process-exit
15467
15499
  process.exit(1);
15468
15500
  });
15469
- //# debugId=bf987bb4-3cfd-43e7-9673-b9d51702fb49
15501
+ //# debugId=1b8d864a-84a9-4c68-bd33-68e2ce165fd0
15470
15502
  //# sourceMappingURL=cli.js.map