tnp-core 18.0.28 → 18.0.30

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.
@@ -7,16 +7,32 @@ export declare namespace CoreModels {
7
7
  };
8
8
  export type NpmInstallOptions = {
9
9
  pkg?: CoreModels.Package;
10
+ /**
11
+ * false by default
12
+ */
10
13
  silent?: boolean;
11
- remove?: boolean;
14
+ /**
15
+ * false by default
16
+ */
12
17
  useYarn?: boolean;
18
+ /**
19
+ * false by default
20
+ */
13
21
  force?: boolean;
22
+ /**
23
+ * Reason for installing package(s)
24
+ */
14
25
  reason?: string;
26
+ /**
27
+ * true by default
28
+ */
15
29
  removeYarnOrPackageJsonLock?: boolean;
30
+ /**
31
+ * false by default
32
+ */
16
33
  generateYarnOrPackageJsonLock?: boolean;
17
- ignoreOptional?: boolean;
18
34
  };
19
- export type InstalationType = '-g' | '--save' | '--save-dev';
35
+ export type InstalationType = '-g' | '--save' | '--save-dev' | 'remove';
20
36
  export const InstalationTypeArr: string[];
21
37
  export type PackageJsonDependencyObj = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'resolutions';
22
38
  export const PackageJsonDependencyObjArr: PackageJsonDependencyObj[];
@@ -79,5 +79,54 @@ export declare namespace Utils {
79
79
  */
80
80
  function numValue(pixelsCss: string | number): number;
81
81
  }
82
+ export namespace process {
83
+ interface ProcessStartOptions {
84
+ /**
85
+ * by default is process.cwd();
86
+ */
87
+ cwd?: string;
88
+ showCommand?: boolean;
89
+ /**
90
+ * Modify output line by line
91
+ */
92
+ outputLineReplace?: (outputLineStderOrStdout: string) => string;
93
+ resolvePromiseMsg?: {
94
+ /**
95
+ * unitil this string is in output of stdout
96
+ */
97
+ stdout?: string | string[];
98
+ /**
99
+ * unitil this string is in output of stderr
100
+ */
101
+ stderr?: string | string[];
102
+ /**
103
+ * by default only resolve when exit code is 0
104
+ */
105
+ resolveAfterAnyExitCode?: boolean;
106
+ };
107
+ /**
108
+ * Prefix messages output from child_prcess
109
+ */
110
+ prefix?: string;
111
+ /**
112
+ * Try command again after fail after n miliseconds
113
+ */
114
+ tryAgainWhenFailAfter?: number;
115
+ askToTryAgainOnError?: boolean;
116
+ exitOnErrorCallback?: (code: number) => void;
117
+ /**
118
+ * Use big buffer for big webpack logs
119
+ */
120
+ biggerBuffer?: boolean;
121
+ hideOutput?: {
122
+ stdout?: boolean;
123
+ stderr?: boolean;
124
+ };
125
+ }
126
+ function startAsync(command: string, options?: ProcessStartOptions & {
127
+ detach?: boolean;
128
+ }): Promise<void>;
129
+ function startSync(command: string, options?: ProcessStartOptions): void;
130
+ }
82
131
  export {};
83
132
  }