@xylabs/ts-scripts-yarn3 2.19.5 → 2.19.8

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.
Files changed (55) hide show
  1. package/dist/actions/build.js +2 -2
  2. package/dist/actions/build.js.map +1 -1
  3. package/dist/actions/build.mjs +2 -2
  4. package/dist/actions/build.mjs.map +1 -1
  5. package/dist/actions/compile.js +6 -6
  6. package/dist/actions/compile.js.map +1 -1
  7. package/dist/actions/compile.mjs +7 -7
  8. package/dist/actions/compile.mjs.map +1 -1
  9. package/dist/actions/package/publint.js +0 -1
  10. package/dist/actions/package/publint.js.map +1 -1
  11. package/dist/actions/package/publint.mjs +0 -1
  12. package/dist/actions/package/publint.mjs.map +1 -1
  13. package/dist/actions/publint.js +0 -3
  14. package/dist/actions/publint.js.map +1 -1
  15. package/dist/actions/publint.mjs +0 -3
  16. package/dist/actions/publint.mjs.map +1 -1
  17. package/dist/actions/recompile.js +1 -1
  18. package/dist/actions/recompile.js.map +1 -1
  19. package/dist/actions/recompile.mjs +1 -1
  20. package/dist/actions/recompile.mjs.map +1 -1
  21. package/dist/cjs/actions/build.js +2 -2
  22. package/dist/cjs/actions/build.js.map +1 -1
  23. package/dist/cjs/actions/compile.d.ts +3 -3
  24. package/dist/cjs/actions/compile.d.ts.map +1 -1
  25. package/dist/cjs/actions/compile.js +8 -8
  26. package/dist/cjs/actions/compile.js.map +1 -1
  27. package/dist/cjs/actions/package/publint.d.ts.map +1 -1
  28. package/dist/cjs/actions/package/publint.js +0 -1
  29. package/dist/cjs/actions/package/publint.js.map +1 -1
  30. package/dist/cjs/actions/publint.d.ts.map +1 -1
  31. package/dist/cjs/actions/publint.js +0 -3
  32. package/dist/cjs/actions/publint.js.map +1 -1
  33. package/dist/cjs/actions/recompile.js +1 -1
  34. package/dist/esm/actions/build.js +2 -2
  35. package/dist/esm/actions/build.js.map +1 -1
  36. package/dist/esm/actions/compile.d.ts +3 -3
  37. package/dist/esm/actions/compile.d.ts.map +1 -1
  38. package/dist/esm/actions/compile.js +7 -7
  39. package/dist/esm/actions/compile.js.map +1 -1
  40. package/dist/esm/actions/package/publint.d.ts.map +1 -1
  41. package/dist/esm/actions/package/publint.js +0 -1
  42. package/dist/esm/actions/package/publint.js.map +1 -1
  43. package/dist/esm/actions/publint.d.ts.map +1 -1
  44. package/dist/esm/actions/publint.js +0 -3
  45. package/dist/esm/actions/publint.js.map +1 -1
  46. package/dist/esm/actions/recompile.js +1 -1
  47. package/dist/index.d.mts +319 -0
  48. package/dist/index.d.ts +319 -0
  49. package/package.json +14 -14
  50. package/src/actions/build.ts +2 -2
  51. package/src/actions/compile.ts +7 -7
  52. package/src/actions/package/publint.ts +0 -1
  53. package/src/actions/publint.ts +0 -3
  54. package/src/actions/recompile.ts +1 -1
  55. package/tsup.config.ts +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"publint.js","sourceRoot":"","sources":["../../../../src/actions/package/publint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAA;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IACvC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;IACnC,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAA;IAExC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,MAAM,eAAe,EAAE,MAAM,CAAC,CAAC,CAAA;IAE3E,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAA;IAE3C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC;QACjC,KAAK,EAAE,SAAS;QAChB,MAAM;QACN,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IAEF,sDAAsD;IACtD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAA;IAEvD,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,0DAA0D;IAC1D,OAAO,CAAC,CAAA;AACV,CAAC,CAAA"}
1
+ {"version":3,"file":"publint.js","sourceRoot":"","sources":["../../../../src/actions/package/publint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAA;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IACvC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA;IAEnC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,MAAM,eAAe,EAAE,MAAM,CAAC,CAAC,CAAA;IAE3E,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAA;IAE3C,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC;QACjC,KAAK,EAAE,SAAS;QAChB,MAAM;QACN,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IAEF,sDAAsD;IACtD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAA;IAEvD,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,0DAA0D;IAC1D,OAAO,CAAC,CAAA;AACV,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"publint.d.ts","sourceRoot":"","sources":["../../../src/actions/publint.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,OAAO,qBAA4B,aAAa,oBAG5D,CAAA;AAED,eAAO,MAAM,cAAc,qBAAsB,oBAAoB,oBAIpE,CAAA;AAED,eAAO,MAAM,UAAU,gBAAiB,aAAa,WAIpD,CAAA"}
1
+ {"version":3,"file":"publint.d.ts","sourceRoot":"","sources":["../../../src/actions/publint.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,OAAO,qBAA4B,aAAa,oBAE5D,CAAA;AAED,eAAO,MAAM,cAAc,qBAAsB,oBAAoB,oBAGpE,CAAA;AAED,eAAO,MAAM,UAAU,gBAAiB,aAAa,WAGpD,CAAA"}
@@ -1,15 +1,12 @@
1
1
  import { runSteps, runStepsAsync } from '../lib';
2
2
  export const publint = async ({ verbose, pkg }) => {
3
- console.log(`publint: ${pkg}`);
4
3
  return pkg ? await publintPackage({ pkg, verbose }) : publintAll({ verbose });
5
4
  };
6
5
  export const publintPackage = ({ verbose, pkg }) => {
7
6
  const verboseOptions = verbose ? ['-v'] : [];
8
- console.log(`publintPackage: ${pkg}`);
9
7
  return runStepsAsync(`Publint [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-publint', ...verboseOptions]]]);
10
8
  };
11
9
  export const publintAll = ({ verbose }) => {
12
- console.log(`publintAll: ${verbose}`);
13
10
  const verboseOptions = verbose ? ['-v'] : [];
14
11
  return runSteps('Publint', [['yarn', ['workspaces foreach -pA run package-publint', ...verboseOptions]]]);
15
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"publint.js","sourceRoot":"","sources":["../../../src/actions/publint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAYhD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAiB,EAAE,EAAE;IAC/D,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,EAAE,CAAC,CAAA;IAC9B,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAC/E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAwB,EAAE,EAAE;IACvE,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,OAAO,CAAC,GAAG,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAA;IACrC,OAAO,aAAa,CAAC,YAAY,GAAG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AACvH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAiB,EAAE,EAAE;IACvD,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,EAAE,CAAC,CAAA;IACrC,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,OAAO,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,4CAA4C,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3G,CAAC,CAAA"}
1
+ {"version":3,"file":"publint.js","sourceRoot":"","sources":["../../../src/actions/publint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAYhD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAiB,EAAE,EAAE;IAC/D,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAC/E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAwB,EAAE,EAAE;IACvE,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,OAAO,aAAa,CAAC,YAAY,GAAG,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AACvH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAiB,EAAE,EAAE;IACvD,MAAM,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC5C,OAAO,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,4CAA4C,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3G,CAAC,CAAA"}
@@ -12,7 +12,7 @@ export const recompileAll = async ({ jobs, verbose, target, incremental }) => {
12
12
  const start = Date.now();
13
13
  const verboseOptions = verbose ? ['-v'] : [];
14
14
  const targetOptions = target ? ['-t', target] : [];
15
- const incrementalOptions = incremental ? ['--since', '-ptA'] : ['-ptA'];
15
+ const incrementalOptions = incremental ? ['--since', '-ptR'] : ['-ptR'];
16
16
  const jobsOptions = jobs ? ['-j', `${jobs}`] : [];
17
17
  if (jobs) {
18
18
  console.log(chalk.blue(`Jobs set to [${jobs}]`));
@@ -0,0 +1,319 @@
1
+ import { PathLike, WriteFileOptions } from 'node:fs';
2
+ import { SpawnSyncOptionsWithBufferEncoding } from 'child_process';
3
+ import yargs from 'yargs';
4
+
5
+ interface BuildParams {
6
+ incremental?: boolean;
7
+ jobs?: number;
8
+ pkg?: string;
9
+ target?: 'esm' | 'cjs';
10
+ verbose?: boolean;
11
+ }
12
+ declare const build: ({ incremental, jobs, target, verbose, pkg }: BuildParams) => Promise<number>;
13
+
14
+ interface CleanParams {
15
+ pkg?: string;
16
+ verbose?: boolean;
17
+ }
18
+ interface CleanPackageParams {
19
+ pkg: string;
20
+ verbose?: boolean;
21
+ }
22
+ declare const clean: ({ verbose, pkg }: CleanParams) => Promise<number>;
23
+ declare const cleanPackage: ({ verbose, pkg }: CleanPackageParams) => Promise<number>;
24
+ declare const cleanAll: ({ verbose }: CleanParams) => number;
25
+
26
+ declare const cleanDocs: () => number;
27
+
28
+ interface CompileParams {
29
+ incremental?: boolean;
30
+ jobs?: number;
31
+ pkg?: string;
32
+ target?: 'esm' | 'cjs';
33
+ verbose?: boolean;
34
+ }
35
+ interface CompilePackageParams {
36
+ pkg: string;
37
+ target?: 'esm' | 'cjs';
38
+ verbose?: boolean;
39
+ }
40
+ declare const compile: ({ verbose, target, pkg, incremental }: CompileParams) => number;
41
+ declare const compilePackage: ({ verbose, target, pkg }: CompilePackageParams) => number;
42
+ declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams) => number;
43
+
44
+ interface CopyAssetsParams {
45
+ pkg?: string;
46
+ target?: 'esm' | 'cjs';
47
+ }
48
+ declare const copyAssets: ({ target, pkg }: CopyAssetsParams) => Promise<0 | 1>;
49
+
50
+ declare const cycle: () => number;
51
+
52
+ declare const dead: () => number;
53
+
54
+ declare const deploy: () => number;
55
+
56
+ declare const deployMajor: () => number;
57
+
58
+ declare const deployMinor: () => number;
59
+
60
+ declare const deployNext: () => number;
61
+
62
+ interface DepsParams {
63
+ incremental?: boolean;
64
+ jobs?: number;
65
+ pkg?: string;
66
+ }
67
+ interface DepsPackageParams {
68
+ pkg: string;
69
+ }
70
+ declare const deps: ({ pkg, incremental }: DepsParams) => number;
71
+ declare const depsPackage: ({ pkg }: DepsPackageParams) => number;
72
+ declare const depsAll: ({ incremental, jobs }: DepsParams) => number;
73
+
74
+ declare const dupdeps: () => number;
75
+
76
+ declare const fix: () => number;
77
+
78
+ interface GenDocsParams {
79
+ incremental?: boolean;
80
+ pkg?: string;
81
+ }
82
+ interface GenDocsPackageParams {
83
+ pkg: string;
84
+ }
85
+ declare const genDocs: ({ pkg, incremental }: GenDocsParams) => number;
86
+ declare const genDocsPackage: ({ pkg }: GenDocsPackageParams) => number;
87
+ declare const genDocsAll: ({ incremental }: GenDocsParams) => number;
88
+
89
+ declare const gitignoreGen: (pkg?: string) => 1 | 0;
90
+
91
+ declare const gitlint: () => 1 | 0;
92
+
93
+ declare const gitlintFix: () => number;
94
+
95
+ declare const license: (pkg?: string) => Promise<number>;
96
+
97
+ interface LintParams {
98
+ pkg?: string;
99
+ verbose?: boolean;
100
+ }
101
+ interface LintPackageParams {
102
+ pkg: string;
103
+ verbose?: boolean;
104
+ }
105
+ declare const lintPackage: ({ pkg }: LintParams) => Promise<number>;
106
+ declare const lintAll: () => Promise<number>;
107
+ declare const lint: ({ pkg }?: LintParams) => Promise<number>;
108
+
109
+ declare const lintClean: () => 1 | Promise<number>;
110
+
111
+ declare const lintProfile: () => number;
112
+
113
+ declare const npmignoreGen: (pkg?: string) => 1 | 0;
114
+
115
+ declare const packageClean: () => number;
116
+
117
+ declare const packageCleanOutputs: () => number;
118
+
119
+ declare const packageCleanTypescript: () => number;
120
+
121
+ declare const packageCompile: () => Promise<number>;
122
+
123
+ declare const packageCompileCjs: () => Promise<number>;
124
+
125
+ declare const packageCompileEsm: () => Promise<number>;
126
+
127
+ interface PackageCopyAssetsParams {
128
+ target?: 'esm' | 'cjs';
129
+ }
130
+ declare const packageCopyAssets: ({ target }: PackageCopyAssetsParams) => Promise<1 | 0>;
131
+
132
+ declare const packageDeps: () => Promise<number>;
133
+
134
+ declare const packageGenDocs: () => Promise<number | undefined>;
135
+
136
+ declare const packagePublint: () => Promise<number>;
137
+
138
+ declare const packageRecompile: () => Promise<number>;
139
+
140
+ declare const packageTsconfigGenCjs: () => 1 | 0;
141
+
142
+ declare const packageTsconfigGenEsm: (quiet?: boolean) => 1 | 0;
143
+
144
+ interface PublintParams {
145
+ pkg?: string;
146
+ verbose?: boolean;
147
+ }
148
+ interface PublintPackageParams {
149
+ pkg: string;
150
+ verbose?: boolean;
151
+ }
152
+ declare const publint: ({ verbose, pkg }: PublintParams) => Promise<number>;
153
+ declare const publintPackage: ({ verbose, pkg }: PublintPackageParams) => Promise<number>;
154
+ declare const publintAll: ({ verbose }: PublintParams) => number;
155
+
156
+ interface RebuildParams {
157
+ pkg?: string;
158
+ target?: 'esm' | 'cjs';
159
+ }
160
+ declare const rebuild: ({ target }: RebuildParams) => number;
161
+
162
+ interface RecompileParams {
163
+ incremental?: boolean;
164
+ jobs?: number;
165
+ pkg?: string;
166
+ target?: 'esm' | 'cjs';
167
+ verbose?: boolean;
168
+ }
169
+ interface RecompilePackageParams {
170
+ pkg: string;
171
+ target?: 'esm' | 'cjs';
172
+ verbose?: boolean;
173
+ }
174
+ declare const recompile: ({ verbose, target, pkg, incremental }: RecompileParams) => Promise<number>;
175
+ declare const recompilePackage: ({ verbose, target, pkg }: RecompilePackageParams) => Promise<number>;
176
+ declare const recompileAll: ({ jobs, verbose, target, incremental }: RecompileParams) => Promise<number>;
177
+
178
+ declare const reinstall: () => number;
179
+
180
+ declare const relint: () => number;
181
+
182
+ declare const retest: () => number;
183
+
184
+ declare const sonar: () => number;
185
+
186
+ declare const statics: () => number;
187
+
188
+ declare const test: () => number;
189
+
190
+ interface TsconfigGenParams {
191
+ pkg?: string;
192
+ target?: 'esm' | 'cjs';
193
+ }
194
+ declare const tsconfigGen: ({ target, pkg }: TsconfigGenParams) => 1 | 0;
195
+
196
+ declare const tsconfigGenCjs: (pkg?: string) => 1 | 0;
197
+
198
+ declare const tsconfigGenClean: (pkg?: string) => 1 | 0;
199
+
200
+ declare const tsconfigGenEsm: (pkg?: string) => 1 | 0;
201
+
202
+ declare const tsconfigGenTest: (pkg?: string) => 1 | 0;
203
+
204
+ declare const up: () => number;
205
+
206
+ declare const updo: () => number;
207
+
208
+ declare const updateYarnPlugins: () => number;
209
+
210
+ declare const updateYarnVersion: () => number;
211
+
212
+ declare const yarn3Only: () => number;
213
+
214
+ declare const checkResult: (name: string, result: number, level?: 'error' | 'warn', exitOnFail?: boolean) => void;
215
+
216
+ declare const createBuildConfig: (location: string, module: 'ESNext' | 'CommonJS', target: 'ESNext' | 'ES6', outDirSuffix: string) => Record<string, any> | undefined;
217
+
218
+ declare const defaultBuildConfig: {
219
+ compilerOptions: {
220
+ rootDir: string;
221
+ rootDirs: string[];
222
+ };
223
+ exclude: string[];
224
+ include: string[];
225
+ };
226
+
227
+ declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
228
+
229
+ declare class DuplicateDetector {
230
+ private dependency;
231
+ private dependencyEntries;
232
+ constructor(output: string, dependency: string);
233
+ detect(): 1 | 0;
234
+ private detectReducer;
235
+ private resultsFactory;
236
+ }
237
+
238
+ declare const WINDOWS_NEWLINE_REGEX: RegExp;
239
+ declare const CROSS_PLATFORM_NEWLINE = "\n";
240
+
241
+ type ReadFileSyncOptions = BufferEncoding | {
242
+ encoding: BufferEncoding;
243
+ flags?: string;
244
+ };
245
+ declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
246
+
247
+ declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
248
+ declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
249
+ declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
250
+
251
+ declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
252
+
253
+ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
254
+
255
+ declare const multiLineToJSONArray: (output: string) => any;
256
+
257
+ declare const parsedPackageJSON: (path?: string) => any;
258
+
259
+ declare const processEx: (ex: any) => never;
260
+
261
+ type ScriptStep = [/*command*/ /*command*/ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /*arg*/ /*arg*/ string | string[]] | [/*command*/ string, /*arg*/ /*arg*/ string | string[], /*config*/ SpawnSyncOptionsWithBufferEncoding];
262
+ declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
263
+
264
+ declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
265
+ declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
266
+
267
+ declare const runXy: (command: string) => number;
268
+
269
+ declare const runXyWithWarning: (command: string) => number;
270
+
271
+ /** Catch child process a crash and returns the code */
272
+ declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
273
+ declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
274
+
275
+ declare const empty: (value?: string | undefined) => boolean;
276
+ declare const notEmpty: (value?: string | undefined) => boolean;
277
+
278
+ declare const union: (a: string[], b: string[]) => Set<string>;
279
+
280
+ declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: any, closure: (error: T) => number) => number | undefined;
281
+
282
+ declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
283
+
284
+ declare const xy: () => {
285
+ [x: string]: unknown;
286
+ _: (string | number)[];
287
+ $0: string;
288
+ } | Promise<{
289
+ [x: string]: unknown;
290
+ _: (string | number)[];
291
+ $0: string;
292
+ }>;
293
+
294
+ declare const xyBuildCommands: (args: yargs.Argv) => yargs.Argv<{}>;
295
+
296
+ declare const xyCommonCommands: (args: yargs.Argv) => yargs.Argv<{}>;
297
+
298
+ declare const xyDeployCommands: (args: yargs.Argv) => yargs.Argv<{}>;
299
+
300
+ declare const xyInstallCommands: (args: yargs.Argv) => yargs.Argv<{}>;
301
+
302
+ declare const xyLintCommands: (args: yargs.Argv) => yargs.Argv<{}>;
303
+
304
+ declare const xyParseOptions: () => yargs.Argv;
305
+
306
+ declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
307
+
308
+ interface Workspace {
309
+ location: string;
310
+ name: string;
311
+ }
312
+
313
+ declare const yarnWorkspace: (pkg: string) => Workspace;
314
+
315
+ declare const yarnWorkspaces: () => Workspace[];
316
+
317
+ declare const INIT_CWD: () => string | undefined;
318
+
319
+ export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompilePackageParams, CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCopyAssetsParams, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, TsconfigGenParams, WINDOWS_NEWLINE_REGEX, Workspace, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint, lintAll, lintClean, lintPackage, lintProfile, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileCjs, packageCompileEsm, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, packageTsconfigGenCjs, packageTsconfigGenEsm, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsconfigGen, tsconfigGenCjs, tsconfigGenClean, tsconfigGenEsm, tsconfigGenTest, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
@@ -0,0 +1,319 @@
1
+ import { PathLike, WriteFileOptions } from 'node:fs';
2
+ import { SpawnSyncOptionsWithBufferEncoding } from 'child_process';
3
+ import yargs from 'yargs';
4
+
5
+ interface BuildParams {
6
+ incremental?: boolean;
7
+ jobs?: number;
8
+ pkg?: string;
9
+ target?: 'esm' | 'cjs';
10
+ verbose?: boolean;
11
+ }
12
+ declare const build: ({ incremental, jobs, target, verbose, pkg }: BuildParams) => Promise<number>;
13
+
14
+ interface CleanParams {
15
+ pkg?: string;
16
+ verbose?: boolean;
17
+ }
18
+ interface CleanPackageParams {
19
+ pkg: string;
20
+ verbose?: boolean;
21
+ }
22
+ declare const clean: ({ verbose, pkg }: CleanParams) => Promise<number>;
23
+ declare const cleanPackage: ({ verbose, pkg }: CleanPackageParams) => Promise<number>;
24
+ declare const cleanAll: ({ verbose }: CleanParams) => number;
25
+
26
+ declare const cleanDocs: () => number;
27
+
28
+ interface CompileParams {
29
+ incremental?: boolean;
30
+ jobs?: number;
31
+ pkg?: string;
32
+ target?: 'esm' | 'cjs';
33
+ verbose?: boolean;
34
+ }
35
+ interface CompilePackageParams {
36
+ pkg: string;
37
+ target?: 'esm' | 'cjs';
38
+ verbose?: boolean;
39
+ }
40
+ declare const compile: ({ verbose, target, pkg, incremental }: CompileParams) => number;
41
+ declare const compilePackage: ({ verbose, target, pkg }: CompilePackageParams) => number;
42
+ declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams) => number;
43
+
44
+ interface CopyAssetsParams {
45
+ pkg?: string;
46
+ target?: 'esm' | 'cjs';
47
+ }
48
+ declare const copyAssets: ({ target, pkg }: CopyAssetsParams) => Promise<0 | 1>;
49
+
50
+ declare const cycle: () => number;
51
+
52
+ declare const dead: () => number;
53
+
54
+ declare const deploy: () => number;
55
+
56
+ declare const deployMajor: () => number;
57
+
58
+ declare const deployMinor: () => number;
59
+
60
+ declare const deployNext: () => number;
61
+
62
+ interface DepsParams {
63
+ incremental?: boolean;
64
+ jobs?: number;
65
+ pkg?: string;
66
+ }
67
+ interface DepsPackageParams {
68
+ pkg: string;
69
+ }
70
+ declare const deps: ({ pkg, incremental }: DepsParams) => number;
71
+ declare const depsPackage: ({ pkg }: DepsPackageParams) => number;
72
+ declare const depsAll: ({ incremental, jobs }: DepsParams) => number;
73
+
74
+ declare const dupdeps: () => number;
75
+
76
+ declare const fix: () => number;
77
+
78
+ interface GenDocsParams {
79
+ incremental?: boolean;
80
+ pkg?: string;
81
+ }
82
+ interface GenDocsPackageParams {
83
+ pkg: string;
84
+ }
85
+ declare const genDocs: ({ pkg, incremental }: GenDocsParams) => number;
86
+ declare const genDocsPackage: ({ pkg }: GenDocsPackageParams) => number;
87
+ declare const genDocsAll: ({ incremental }: GenDocsParams) => number;
88
+
89
+ declare const gitignoreGen: (pkg?: string) => 1 | 0;
90
+
91
+ declare const gitlint: () => 1 | 0;
92
+
93
+ declare const gitlintFix: () => number;
94
+
95
+ declare const license: (pkg?: string) => Promise<number>;
96
+
97
+ interface LintParams {
98
+ pkg?: string;
99
+ verbose?: boolean;
100
+ }
101
+ interface LintPackageParams {
102
+ pkg: string;
103
+ verbose?: boolean;
104
+ }
105
+ declare const lintPackage: ({ pkg }: LintParams) => Promise<number>;
106
+ declare const lintAll: () => Promise<number>;
107
+ declare const lint: ({ pkg }?: LintParams) => Promise<number>;
108
+
109
+ declare const lintClean: () => 1 | Promise<number>;
110
+
111
+ declare const lintProfile: () => number;
112
+
113
+ declare const npmignoreGen: (pkg?: string) => 1 | 0;
114
+
115
+ declare const packageClean: () => number;
116
+
117
+ declare const packageCleanOutputs: () => number;
118
+
119
+ declare const packageCleanTypescript: () => number;
120
+
121
+ declare const packageCompile: () => Promise<number>;
122
+
123
+ declare const packageCompileCjs: () => Promise<number>;
124
+
125
+ declare const packageCompileEsm: () => Promise<number>;
126
+
127
+ interface PackageCopyAssetsParams {
128
+ target?: 'esm' | 'cjs';
129
+ }
130
+ declare const packageCopyAssets: ({ target }: PackageCopyAssetsParams) => Promise<1 | 0>;
131
+
132
+ declare const packageDeps: () => Promise<number>;
133
+
134
+ declare const packageGenDocs: () => Promise<number | undefined>;
135
+
136
+ declare const packagePublint: () => Promise<number>;
137
+
138
+ declare const packageRecompile: () => Promise<number>;
139
+
140
+ declare const packageTsconfigGenCjs: () => 1 | 0;
141
+
142
+ declare const packageTsconfigGenEsm: (quiet?: boolean) => 1 | 0;
143
+
144
+ interface PublintParams {
145
+ pkg?: string;
146
+ verbose?: boolean;
147
+ }
148
+ interface PublintPackageParams {
149
+ pkg: string;
150
+ verbose?: boolean;
151
+ }
152
+ declare const publint: ({ verbose, pkg }: PublintParams) => Promise<number>;
153
+ declare const publintPackage: ({ verbose, pkg }: PublintPackageParams) => Promise<number>;
154
+ declare const publintAll: ({ verbose }: PublintParams) => number;
155
+
156
+ interface RebuildParams {
157
+ pkg?: string;
158
+ target?: 'esm' | 'cjs';
159
+ }
160
+ declare const rebuild: ({ target }: RebuildParams) => number;
161
+
162
+ interface RecompileParams {
163
+ incremental?: boolean;
164
+ jobs?: number;
165
+ pkg?: string;
166
+ target?: 'esm' | 'cjs';
167
+ verbose?: boolean;
168
+ }
169
+ interface RecompilePackageParams {
170
+ pkg: string;
171
+ target?: 'esm' | 'cjs';
172
+ verbose?: boolean;
173
+ }
174
+ declare const recompile: ({ verbose, target, pkg, incremental }: RecompileParams) => Promise<number>;
175
+ declare const recompilePackage: ({ verbose, target, pkg }: RecompilePackageParams) => Promise<number>;
176
+ declare const recompileAll: ({ jobs, verbose, target, incremental }: RecompileParams) => Promise<number>;
177
+
178
+ declare const reinstall: () => number;
179
+
180
+ declare const relint: () => number;
181
+
182
+ declare const retest: () => number;
183
+
184
+ declare const sonar: () => number;
185
+
186
+ declare const statics: () => number;
187
+
188
+ declare const test: () => number;
189
+
190
+ interface TsconfigGenParams {
191
+ pkg?: string;
192
+ target?: 'esm' | 'cjs';
193
+ }
194
+ declare const tsconfigGen: ({ target, pkg }: TsconfigGenParams) => 1 | 0;
195
+
196
+ declare const tsconfigGenCjs: (pkg?: string) => 1 | 0;
197
+
198
+ declare const tsconfigGenClean: (pkg?: string) => 1 | 0;
199
+
200
+ declare const tsconfigGenEsm: (pkg?: string) => 1 | 0;
201
+
202
+ declare const tsconfigGenTest: (pkg?: string) => 1 | 0;
203
+
204
+ declare const up: () => number;
205
+
206
+ declare const updo: () => number;
207
+
208
+ declare const updateYarnPlugins: () => number;
209
+
210
+ declare const updateYarnVersion: () => number;
211
+
212
+ declare const yarn3Only: () => number;
213
+
214
+ declare const checkResult: (name: string, result: number, level?: 'error' | 'warn', exitOnFail?: boolean) => void;
215
+
216
+ declare const createBuildConfig: (location: string, module: 'ESNext' | 'CommonJS', target: 'ESNext' | 'ES6', outDirSuffix: string) => Record<string, any> | undefined;
217
+
218
+ declare const defaultBuildConfig: {
219
+ compilerOptions: {
220
+ rootDir: string;
221
+ rootDirs: string[];
222
+ };
223
+ exclude: string[];
224
+ include: string[];
225
+ };
226
+
227
+ declare const detectDuplicateDependencies: (depsFromPackageJSON?: string[], DefaultDependencies?: string[]) => number;
228
+
229
+ declare class DuplicateDetector {
230
+ private dependency;
231
+ private dependencyEntries;
232
+ constructor(output: string, dependency: string);
233
+ detect(): 1 | 0;
234
+ private detectReducer;
235
+ private resultsFactory;
236
+ }
237
+
238
+ declare const WINDOWS_NEWLINE_REGEX: RegExp;
239
+ declare const CROSS_PLATFORM_NEWLINE = "\n";
240
+
241
+ type ReadFileSyncOptions = BufferEncoding | {
242
+ encoding: BufferEncoding;
243
+ flags?: string;
244
+ };
245
+ declare const defaultReadFileSyncOptions: ReadFileSyncOptions;
246
+
247
+ declare const readLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
248
+ declare const readNonEmptyLines: (uri: PathLike, options?: ReadFileSyncOptions) => string[];
249
+ declare const writeLines: (uri: PathLike, lines: string[], options?: WriteFileOptions) => void;
250
+
251
+ declare const tryReadFileSync: (uri: PathLike, options?: ReadFileSyncOptions) => string | undefined;
252
+
253
+ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
254
+
255
+ declare const multiLineToJSONArray: (output: string) => any;
256
+
257
+ declare const parsedPackageJSON: (path?: string) => any;
258
+
259
+ declare const processEx: (ex: any) => never;
260
+
261
+ type ScriptStep = [/*command*/ /*command*/ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /*arg*/ /*arg*/ string | string[]] | [/*command*/ string, /*arg*/ /*arg*/ string | string[], /*config*/ SpawnSyncOptionsWithBufferEncoding];
262
+ declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
263
+
264
+ declare const runStepAsync: (name: string, step: ScriptStep, exitOnFail?: boolean, message?: string) => Promise<number>;
265
+ declare const runStepsAsync: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => Promise<number>;
266
+
267
+ declare const runXy: (command: string) => number;
268
+
269
+ declare const runXyWithWarning: (command: string) => number;
270
+
271
+ /** Catch child process a crash and returns the code */
272
+ declare const safeExit: (func: () => number, exitOnFail?: boolean) => number;
273
+ declare const safeExitAsync: (func: () => Promise<number>, exitOnFail?: boolean) => Promise<number>;
274
+
275
+ declare const empty: (value?: string | undefined) => boolean;
276
+ declare const notEmpty: (value?: string | undefined) => boolean;
277
+
278
+ declare const union: (a: string[], b: string[]) => Set<string>;
279
+
280
+ declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: any, closure: (error: T) => number) => number | undefined;
281
+
282
+ declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
283
+
284
+ declare const xy: () => {
285
+ [x: string]: unknown;
286
+ _: (string | number)[];
287
+ $0: string;
288
+ } | Promise<{
289
+ [x: string]: unknown;
290
+ _: (string | number)[];
291
+ $0: string;
292
+ }>;
293
+
294
+ declare const xyBuildCommands: (args: yargs.Argv) => yargs.Argv<{}>;
295
+
296
+ declare const xyCommonCommands: (args: yargs.Argv) => yargs.Argv<{}>;
297
+
298
+ declare const xyDeployCommands: (args: yargs.Argv) => yargs.Argv<{}>;
299
+
300
+ declare const xyInstallCommands: (args: yargs.Argv) => yargs.Argv<{}>;
301
+
302
+ declare const xyLintCommands: (args: yargs.Argv) => yargs.Argv<{}>;
303
+
304
+ declare const xyParseOptions: () => yargs.Argv;
305
+
306
+ declare const isYarnVersionOrGreater: (major: number, minor?: number, patch?: number) => [boolean, string];
307
+
308
+ interface Workspace {
309
+ location: string;
310
+ name: string;
311
+ }
312
+
313
+ declare const yarnWorkspace: (pkg: string) => Workspace;
314
+
315
+ declare const yarnWorkspaces: () => Workspace[];
316
+
317
+ declare const INIT_CWD: () => string | undefined;
318
+
319
+ export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompilePackageParams, CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCopyAssetsParams, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, TsconfigGenParams, WINDOWS_NEWLINE_REGEX, Workspace, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, copyAssets, createBuildConfig, cycle, dead, defaultBuildConfig, defaultReadFileSyncOptions, deploy, deployMajor, deployMinor, deployNext, deps, depsAll, depsPackage, detectDuplicateDependencies, dupdeps, empty, fix, genDocs, genDocsAll, genDocsPackage, generateIgnoreFiles, gitignoreGen, gitlint, gitlintFix, isYarnVersionOrGreater, license, lint, lintAll, lintClean, lintPackage, lintProfile, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileCjs, packageCompileEsm, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, packageTsconfigGenCjs, packageTsconfigGenEsm, parsedPackageJSON, processEx, publint, publintAll, publintPackage, readLines, readNonEmptyLines, rebuild, recompile, recompileAll, recompilePackage, reinstall, relint, retest, runStepAsync, runSteps, runStepsAsync, runXy, runXyWithWarning, safeExit, safeExitAsync, sonar, statics, test, tryReadFileSync, tsconfigGen, tsconfigGenCjs, tsconfigGenClean, tsconfigGenEsm, tsconfigGenTest, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };