@grunnverk/commands-tree 1.5.0 → 1.5.2

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { getLogger, getDryRunLogger, toAIConfig, createLoggerAdapter, createStorageAdapter, isInGitRepository, runGitWithLock, getOutputPath, DEFAULT_OUTPUT_DIRECTORY } from '@grunnverk/core';
2
- import { safeJsonParse, validatePackageJson, run, runSecure, getGloballyLinkedPackages, getGitStatusSummary, getLinkedDependencies, getLinkCompatibilityProblems } from '@grunnverk/git-tools';
2
+ import { safeJsonParse, validatePackageJson, run, runSecure, getGloballyLinkedPackages, getGitStatusSummary, getLinkedDependencies, getLinkCompatibilityProblems, escapeShellArg } from '@grunnverk/git-tools';
3
3
  import * as Commit from '@grunnverk/commands-git';
4
4
  import { findAllPackageJsonFiles, PerformanceTimer, optimizePrecommitCommand, recordTestRun } from '@grunnverk/commands-git';
5
5
  import { createStorage } from '@grunnverk/shared';
@@ -9,6 +9,7 @@ import { exec } from 'child_process';
9
9
  import util from 'util';
10
10
  import { scanForPackageJsonFiles, buildDependencyGraph, topologicalSort, parsePackageJson, shouldExclude } from '@grunnverk/tree-core';
11
11
  import { SimpleMutex } from '@grunnverk/tree-execution';
12
+ export { PackageContextFactory, PackageExecutionContext } from '@grunnverk/tree-execution';
12
13
 
13
14
  // Helper function to check if a path is a symbolic link
14
15
  const isSymbolicLink$1 = async (filePath)=>{
@@ -3942,7 +3943,7 @@ const execute$1 = async (runConfig)=>{
3942
3943
  commandSpecificOptions += ` --context "${runConfig.commit.context}"`;
3943
3944
  }
3944
3945
  if (((_runConfig_commit12 = runConfig.commit) === null || _runConfig_commit12 === void 0 ? void 0 : _runConfig_commit12.contextFiles) && runConfig.commit.contextFiles.length > 0) {
3945
- commandSpecificOptions += ` --context-files ${runConfig.commit.contextFiles.join(' ')}`;
3946
+ commandSpecificOptions += ` --context-files ${runConfig.commit.contextFiles.map((f)=>escapeShellArg(f)).join(' ')}`;
3946
3947
  }
3947
3948
  // Push option can be boolean or string (remote name)
3948
3949
  if ((_runConfig_commit13 = runConfig.commit) === null || _runConfig_commit13 === void 0 ? void 0 : _runConfig_commit13.push) {
@@ -3988,7 +3989,7 @@ const execute$1 = async (runConfig)=>{
3988
3989
  commandSpecificOptions += ` --context "${runConfig.release.context}"`;
3989
3990
  }
3990
3991
  if (((_runConfig_release7 = runConfig.release) === null || _runConfig_release7 === void 0 ? void 0 : _runConfig_release7.contextFiles) && runConfig.release.contextFiles.length > 0) {
3991
- commandSpecificOptions += ` --context-files ${runConfig.release.contextFiles.join(' ')}`;
3992
+ commandSpecificOptions += ` --context-files ${runConfig.release.contextFiles.map((f)=>escapeShellArg(f)).join(' ')}`;
3992
3993
  }
3993
3994
  if ((_runConfig_release8 = runConfig.release) === null || _runConfig_release8 === void 0 ? void 0 : _runConfig_release8.messageLimit) {
3994
3995
  commandSpecificOptions += ` --message-limit ${runConfig.release.messageLimit}`;
@@ -4036,7 +4037,7 @@ const execute$1 = async (runConfig)=>{
4036
4037
  }
4037
4038
  // Link/Unlink externals
4038
4039
  if ((builtInCommand === 'link' || builtInCommand === 'unlink') && ((_runConfig_tree36 = runConfig.tree) === null || _runConfig_tree36 === void 0 ? void 0 : _runConfig_tree36.externals) && runConfig.tree.externals.length > 0) {
4039
- commandSpecificOptions += ` --externals ${runConfig.tree.externals.join(' ')}`;
4040
+ commandSpecificOptions += ` --externals ${runConfig.tree.externals.map((e)=>escapeShellArg(e)).join(' ')}`;
4040
4041
  }
4041
4042
  commandToRun = `kodrdriv ${builtInCommand}${optionsString}${packageArgString}${commandSpecificOptions}`;
4042
4043
  isBuiltInCommand = true;