@xylabs/ts-scripts-yarn3 3.0.11 → 3.0.13

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 (74) hide show
  1. package/dist/actions/package/compile/CompileParams.js +17 -0
  2. package/dist/actions/package/compile/CompileParams.js.map +1 -0
  3. package/dist/actions/package/compile/CompileParams.mjs +1 -0
  4. package/dist/actions/package/compile/CompileParams.mjs.map +1 -0
  5. package/dist/actions/package/compile/compile.js +98 -0
  6. package/dist/actions/package/compile/compile.js.map +1 -0
  7. package/dist/actions/package/compile/compile.mjs +64 -0
  8. package/dist/actions/package/compile/compile.mjs.map +1 -0
  9. package/dist/actions/package/compile/copyTypeFiles.js +49 -0
  10. package/dist/actions/package/compile/copyTypeFiles.js.map +1 -0
  11. package/dist/actions/package/compile/copyTypeFiles.mjs +25 -0
  12. package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -0
  13. package/dist/actions/package/compile/index.js +29 -0
  14. package/dist/actions/package/compile/index.js.map +1 -0
  15. package/dist/actions/package/compile/index.mjs +5 -0
  16. package/dist/actions/package/compile/index.mjs.map +1 -0
  17. package/dist/actions/package/compile/inputs.js +58 -0
  18. package/dist/actions/package/compile/inputs.js.map +1 -0
  19. package/dist/actions/package/compile/inputs.mjs +32 -0
  20. package/dist/actions/package/compile/inputs.mjs.map +1 -0
  21. package/dist/actions/package/{compile.js → compile/rollup.js} +24 -75
  22. package/dist/actions/package/compile/rollup.js.map +1 -0
  23. package/dist/actions/package/compile/rollup.mjs +98 -0
  24. package/dist/actions/package/compile/rollup.mjs.map +1 -0
  25. package/dist/actions/package/compile/tsc.js +105 -0
  26. package/dist/actions/package/compile/tsc.js.map +1 -0
  27. package/dist/actions/package/compile/tsc.mjs +79 -0
  28. package/dist/actions/package/compile/tsc.mjs.map +1 -0
  29. package/dist/actions/package/compile/tscTypes.js +53 -0
  30. package/dist/actions/package/compile/tscTypes.js.map +1 -0
  31. package/dist/actions/package/compile/tscTypes.mjs +29 -0
  32. package/dist/actions/package/compile/tscTypes.mjs.map +1 -0
  33. package/dist/actions/package/compile/tsup.js +75 -0
  34. package/dist/actions/package/compile/tsup.js.map +1 -0
  35. package/dist/actions/package/compile/tsup.mjs +51 -0
  36. package/dist/actions/package/compile/tsup.mjs.map +1 -0
  37. package/dist/actions/package/publint.js +1 -1
  38. package/dist/actions/package/publint.js.map +1 -1
  39. package/dist/actions/package/publint.mjs +1 -1
  40. package/dist/actions/package/publint.mjs.map +1 -1
  41. package/dist/bin/package/compile-tsup.js +31 -0
  42. package/dist/bin/package/compile-tsup.js.map +1 -0
  43. package/dist/bin/package/compile-tsup.mjs +8 -0
  44. package/dist/bin/package/compile-tsup.mjs.map +1 -0
  45. package/dist/index.d.mts +53 -10
  46. package/dist/index.d.ts +53 -10
  47. package/dist/lib/index.js +2 -0
  48. package/dist/lib/index.js.map +1 -1
  49. package/dist/lib/index.mjs +1 -0
  50. package/dist/lib/index.mjs.map +1 -1
  51. package/dist/lib/loadConfig.js +54 -0
  52. package/dist/lib/loadConfig.js.map +1 -0
  53. package/dist/lib/loadConfig.mjs +20 -0
  54. package/dist/lib/loadConfig.mjs.map +1 -0
  55. package/package.json +5 -6
  56. package/src/actions/package/compile/CompileParams.ts +10 -0
  57. package/src/actions/package/compile/compile.ts +73 -0
  58. package/src/actions/package/compile/copyTypeFiles.ts +26 -0
  59. package/src/actions/package/compile/index.ts +4 -0
  60. package/src/actions/package/compile/inputs.ts +33 -0
  61. package/src/actions/package/compile/rollup.ts +109 -0
  62. package/src/actions/package/compile/tsc.ts +105 -0
  63. package/src/actions/package/compile/tscTypes.ts +30 -0
  64. package/src/actions/package/compile/tsup.ts +69 -0
  65. package/src/actions/package/publint.ts +5 -1
  66. package/src/bin/package/compile-tsup.ts +9 -0
  67. package/src/lib/index.ts +1 -0
  68. package/src/lib/loadConfig.ts +21 -0
  69. package/tsconfig.build.json +2 -2
  70. package/tsconfig.json +1 -7
  71. package/dist/actions/package/compile.js.map +0 -1
  72. package/dist/actions/package/compile.mjs +0 -150
  73. package/dist/actions/package/compile.mjs.map +0 -1
  74. package/src/actions/package/compile.ts +0 -177
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
+ mod
24
+ ));
25
+ var import_chalk = __toESM(require("chalk"));
26
+ var import_actions = require("../../actions");
27
+ (0, import_actions.packageCompileTsup)({ verbose: true }).then((value) => process.exitCode = value).catch((reason) => {
28
+ console.error(import_chalk.default.red(reason));
29
+ process.exitCode = 1;
30
+ });
31
+ //# sourceMappingURL=compile-tsup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/bin/package/compile-tsup.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport chalk from 'chalk'\nimport { packageCompileTsup } from '../../actions'\n\npackageCompileTsup({verbose: true}).then((value) => process.exitCode = value).catch((reason) => {\n console.error(chalk.red(reason))\n process.exitCode = 1\n})"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,mBAAkB;AAClB,qBAAmC;AAAA,IAEnC,mCAAmB,EAAC,SAAS,KAAI,CAAC,EAAE,KAAK,CAAC,UAAU,QAAQ,WAAW,KAAK,EAAE,MAAM,CAAC,WAAW;AAC9F,UAAQ,MAAM,aAAAA,QAAM,IAAI,MAAM,CAAC;AAC/B,UAAQ,WAAW;AACrB,CAAC;","names":["chalk"]}
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import chalk from "chalk";
3
+ import { packageCompileTsup } from "../../actions";
4
+ packageCompileTsup({ verbose: true }).then((value) => process.exitCode = value).catch((reason) => {
5
+ console.error(chalk.red(reason));
6
+ process.exitCode = 1;
7
+ });
8
+ //# sourceMappingURL=compile-tsup.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/bin/package/compile-tsup.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport chalk from 'chalk'\nimport { packageCompileTsup } from '../../actions'\n\npackageCompileTsup({verbose: true}).then((value) => process.exitCode = value).catch((reason) => {\n console.error(chalk.red(reason))\n process.exitCode = 1\n})"],"mappings":";AAEA,OAAO,WAAW;AAClB,SAAS,0BAA0B;AAEnC,mBAAmB,EAAC,SAAS,KAAI,CAAC,EAAE,KAAK,CAAC,UAAU,QAAQ,WAAW,KAAK,EAAE,MAAM,CAAC,WAAW;AAC9F,UAAQ,MAAM,MAAM,IAAI,MAAM,CAAC;AAC/B,UAAQ,WAAW;AACrB,CAAC;","names":[]}
package/dist/index.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { CompilerOptions } from 'typescript';
2
+ import { Options } from 'tsup';
1
3
  import { PathLike, WriteFileOptions } from 'node:fs';
2
4
  import { SpawnSyncOptionsWithBufferEncoding } from 'child_process';
3
5
  import { PackageJson } from 'types-package-json';
@@ -26,7 +28,7 @@ declare const cleanAll: ({ verbose }: CleanParams) => number;
26
28
 
27
29
  declare const cleanDocs: () => number;
28
30
 
29
- interface CompileParams {
31
+ interface CompileParams$1 {
30
32
  incremental?: boolean;
31
33
  jobs?: number;
32
34
  pkg?: string;
@@ -34,15 +36,15 @@ interface CompileParams {
34
36
  target?: 'esm' | 'cjs';
35
37
  verbose?: boolean;
36
38
  }
37
- interface CompilePackageParams$1 {
39
+ interface CompilePackageParams {
38
40
  pkg: string;
39
41
  publint?: boolean;
40
42
  target?: 'esm' | 'cjs';
41
43
  verbose?: boolean;
42
44
  }
43
- declare const compile: ({ verbose, target, pkg, incremental, publint }: CompileParams) => number;
44
- declare const compilePackage: ({ verbose, target, pkg, publint }: CompilePackageParams$1) => number;
45
- declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams) => number;
45
+ declare const compile: ({ verbose, target, pkg, incremental, publint }: CompileParams$1) => number;
46
+ declare const compilePackage: ({ verbose, target, pkg, publint }: CompilePackageParams) => number;
47
+ declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams$1) => number;
46
48
 
47
49
  interface CopyAssetsParams {
48
50
  pkg?: string;
@@ -121,11 +123,47 @@ declare const packageCleanOutputs: () => number;
121
123
 
122
124
  declare const packageCleanTypescript: () => number;
123
125
 
124
- interface CompilePackageParams {
125
- publint?: boolean;
126
+ interface RootParams {
126
127
  verbose?: boolean;
127
128
  }
128
- declare const packageCompile: ({ publint, verbose }?: CompilePackageParams) => Promise<number>;
129
+ interface CompileParams extends RootParams {
130
+ compile?: {
131
+ depth?: number;
132
+ publint?: boolean;
133
+ };
134
+ }
135
+
136
+ type PackageCompileMode = 'tsup' | 'tsc' | 'rollup';
137
+ type PackageCompileParams = CompileParams & {
138
+ compile?: {
139
+ modes?: PackageCompileMode[];
140
+ };
141
+ };
142
+ declare const packageCompile: (params?: PackageCompileParams) => Promise<number>;
143
+
144
+ interface PackageCompileRollupParams extends CompileParams {
145
+ }
146
+ declare const compileSubDir: (format: 'cjs' | 'esm', ext: string, subDir?: string, _verbose?: boolean) => Promise<number>;
147
+ declare const packageCompileRollup: (params?: PackageCompileRollupParams) => Promise<number>;
148
+
149
+ type PackageCompileTscParams = Partial<CompileParams & {
150
+ compile?: {
151
+ tsc?: {
152
+ compilerOptions?: CompilerOptions;
153
+ tsconfig?: string;
154
+ };
155
+ };
156
+ }>;
157
+ declare const packageCompileTsc: (params?: PackageCompileTscParams) => Promise<number>;
158
+
159
+ type PackageCompileTsupParams = Partial<CompileParams & {
160
+ compile?: {
161
+ tsup?: {
162
+ options?: Options;
163
+ };
164
+ };
165
+ }>;
166
+ declare const packageCompileTsup: (params?: PackageCompileTsupParams) => Promise<number>;
129
167
 
130
168
  interface PackageCopyAssetsParams {
131
169
  target?: 'esm' | 'cjs';
@@ -136,7 +174,10 @@ declare const packageDeps: () => Promise<number>;
136
174
 
137
175
  declare const packageGenDocs: () => Promise<number | undefined>;
138
176
 
139
- declare const packagePublint: () => Promise<number>;
177
+ interface PackagePublintParams {
178
+ verbose?: boolean;
179
+ }
180
+ declare const packagePublint: (_params?: PackagePublintParams) => Promise<number>;
140
181
 
141
182
  declare const packageRecompile: () => Promise<number>;
142
183
 
@@ -239,6 +280,8 @@ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
239
280
 
240
281
  declare const multiLineToJSONArray: (output: string) => any;
241
282
 
283
+ declare const loadConfig: <T extends object>(params?: T | undefined) => Promise<T>;
284
+
242
285
  declare const parsedPackageJSON: (path?: string) => any;
243
286
 
244
287
  declare const processEx: (ex: any) => never;
@@ -306,4 +349,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
306
349
 
307
350
  declare const xyParseOptions: () => Argv;
308
351
 
309
- export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompilePackageParams, CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCopyAssetsParams, PackageJsonEx, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, 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, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, 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, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
352
+ export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompileParams$1 as CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCompileMode, PackageCompileParams, PackageCompileRollupParams, PackageCompileTscParams, PackageCompileTsupParams, PackageCopyAssetsParams, PackageJsonEx, PackagePublintParams, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, WINDOWS_NEWLINE_REGEX, Workspace, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileSubDir, 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, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileRollup, packageCompileTsc, packageCompileTsup, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, 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, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { CompilerOptions } from 'typescript';
2
+ import { Options } from 'tsup';
1
3
  import { PathLike, WriteFileOptions } from 'node:fs';
2
4
  import { SpawnSyncOptionsWithBufferEncoding } from 'child_process';
3
5
  import { PackageJson } from 'types-package-json';
@@ -26,7 +28,7 @@ declare const cleanAll: ({ verbose }: CleanParams) => number;
26
28
 
27
29
  declare const cleanDocs: () => number;
28
30
 
29
- interface CompileParams {
31
+ interface CompileParams$1 {
30
32
  incremental?: boolean;
31
33
  jobs?: number;
32
34
  pkg?: string;
@@ -34,15 +36,15 @@ interface CompileParams {
34
36
  target?: 'esm' | 'cjs';
35
37
  verbose?: boolean;
36
38
  }
37
- interface CompilePackageParams$1 {
39
+ interface CompilePackageParams {
38
40
  pkg: string;
39
41
  publint?: boolean;
40
42
  target?: 'esm' | 'cjs';
41
43
  verbose?: boolean;
42
44
  }
43
- declare const compile: ({ verbose, target, pkg, incremental, publint }: CompileParams) => number;
44
- declare const compilePackage: ({ verbose, target, pkg, publint }: CompilePackageParams$1) => number;
45
- declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams) => number;
45
+ declare const compile: ({ verbose, target, pkg, incremental, publint }: CompileParams$1) => number;
46
+ declare const compilePackage: ({ verbose, target, pkg, publint }: CompilePackageParams) => number;
47
+ declare const compileAll: ({ jobs, verbose, target, incremental }: CompileParams$1) => number;
46
48
 
47
49
  interface CopyAssetsParams {
48
50
  pkg?: string;
@@ -121,11 +123,47 @@ declare const packageCleanOutputs: () => number;
121
123
 
122
124
  declare const packageCleanTypescript: () => number;
123
125
 
124
- interface CompilePackageParams {
125
- publint?: boolean;
126
+ interface RootParams {
126
127
  verbose?: boolean;
127
128
  }
128
- declare const packageCompile: ({ publint, verbose }?: CompilePackageParams) => Promise<number>;
129
+ interface CompileParams extends RootParams {
130
+ compile?: {
131
+ depth?: number;
132
+ publint?: boolean;
133
+ };
134
+ }
135
+
136
+ type PackageCompileMode = 'tsup' | 'tsc' | 'rollup';
137
+ type PackageCompileParams = CompileParams & {
138
+ compile?: {
139
+ modes?: PackageCompileMode[];
140
+ };
141
+ };
142
+ declare const packageCompile: (params?: PackageCompileParams) => Promise<number>;
143
+
144
+ interface PackageCompileRollupParams extends CompileParams {
145
+ }
146
+ declare const compileSubDir: (format: 'cjs' | 'esm', ext: string, subDir?: string, _verbose?: boolean) => Promise<number>;
147
+ declare const packageCompileRollup: (params?: PackageCompileRollupParams) => Promise<number>;
148
+
149
+ type PackageCompileTscParams = Partial<CompileParams & {
150
+ compile?: {
151
+ tsc?: {
152
+ compilerOptions?: CompilerOptions;
153
+ tsconfig?: string;
154
+ };
155
+ };
156
+ }>;
157
+ declare const packageCompileTsc: (params?: PackageCompileTscParams) => Promise<number>;
158
+
159
+ type PackageCompileTsupParams = Partial<CompileParams & {
160
+ compile?: {
161
+ tsup?: {
162
+ options?: Options;
163
+ };
164
+ };
165
+ }>;
166
+ declare const packageCompileTsup: (params?: PackageCompileTsupParams) => Promise<number>;
129
167
 
130
168
  interface PackageCopyAssetsParams {
131
169
  target?: 'esm' | 'cjs';
@@ -136,7 +174,10 @@ declare const packageDeps: () => Promise<number>;
136
174
 
137
175
  declare const packageGenDocs: () => Promise<number | undefined>;
138
176
 
139
- declare const packagePublint: () => Promise<number>;
177
+ interface PackagePublintParams {
178
+ verbose?: boolean;
179
+ }
180
+ declare const packagePublint: (_params?: PackagePublintParams) => Promise<number>;
140
181
 
141
182
  declare const packageRecompile: () => Promise<number>;
142
183
 
@@ -239,6 +280,8 @@ declare const generateIgnoreFiles: (filename: string, pkg?: string) => 1 | 0;
239
280
 
240
281
  declare const multiLineToJSONArray: (output: string) => any;
241
282
 
283
+ declare const loadConfig: <T extends object>(params?: T | undefined) => Promise<T>;
284
+
242
285
  declare const parsedPackageJSON: (path?: string) => any;
243
286
 
244
287
  declare const processEx: (ex: any) => never;
@@ -306,4 +349,4 @@ declare const xyLintCommands: (args: Argv) => Argv<{}>;
306
349
 
307
350
  declare const xyParseOptions: () => Argv;
308
351
 
309
- export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompilePackageParams, CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCopyAssetsParams, PackageJsonEx, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, 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, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, 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, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
352
+ export { BuildParams, CROSS_PLATFORM_NEWLINE, CleanPackageParams, CleanParams, CompileParams$1 as CompileParams, CopyAssetsParams, DepsPackageParams, DepsParams, DuplicateDetector, GenDocsPackageParams, GenDocsParams, INIT_CWD, LintPackageParams, LintParams, PackageCompileMode, PackageCompileParams, PackageCompileRollupParams, PackageCompileTscParams, PackageCompileTsupParams, PackageCopyAssetsParams, PackageJsonEx, PackagePublintParams, PublintPackageParams, PublintParams, ReadFileSyncOptions, RebuildParams, RecompilePackageParams, RecompileParams, ScriptStep, WINDOWS_NEWLINE_REGEX, Workspace, build, checkResult, clean, cleanAll, cleanDocs, cleanPackage, compile, compileAll, compilePackage, compileSubDir, 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, loadConfig, loadPackageConfig, multiLineToJSONArray, notEmpty, npmignoreGen, packageClean, packageCleanOutputs, packageCleanTypescript, packageCompile, packageCompileRollup, packageCompileTsc, packageCompileTsup, packageCopyAssets, packageDeps, packageGenDocs, packagePublint, packageRecompile, 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, union, up, updateYarnPlugins, updateYarnVersion, updo, withErrnoException, withError, writeLines, xy, xyBuildCommands, xyCommonCommands, xyDeployCommands, xyInstallCommands, xyLintCommands, xyParseOptions, yarn3Only, yarnWorkspace, yarnWorkspaces };
package/dist/lib/index.js CHANGED
@@ -22,6 +22,7 @@ __reExport(lib_exports, require("./dependencies"), module.exports);
22
22
  __reExport(lib_exports, require("./file"), module.exports);
23
23
  __reExport(lib_exports, require("./generateIgnoreFiles"), module.exports);
24
24
  __reExport(lib_exports, require("./jsonFormatters"), module.exports);
25
+ __reExport(lib_exports, require("./loadConfig"), module.exports);
25
26
  __reExport(lib_exports, require("./parsedPackageJSON"), module.exports);
26
27
  __reExport(lib_exports, require("./processEx"), module.exports);
27
28
  __reExport(lib_exports, require("./runSteps"), module.exports);
@@ -42,6 +43,7 @@ __reExport(lib_exports, require("./yarn"), module.exports);
42
43
  ...require("./file"),
43
44
  ...require("./generateIgnoreFiles"),
44
45
  ...require("./jsonFormatters"),
46
+ ...require("./loadConfig"),
45
47
  ...require("./parsedPackageJSON"),
46
48
  ...require("./processEx"),
47
49
  ...require("./runSteps"),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/index.ts"],"sourcesContent":["export * from './checkResult'\nexport * from './createBuildConfig'\nexport * from './defaultBuildConfig'\nexport * from './dependencies'\nexport * from './file'\nexport * from './generateIgnoreFiles'\nexport * from './jsonFormatters'\nexport * from './parsedPackageJSON'\nexport * from './processEx'\nexport * from './runSteps'\nexport * from './runStepsAsync'\nexport * from './runXy'\nexport * from './runXyWithWarning'\nexport * from './safeExit'\nexport * from './string'\nexport * from './withErrnoException'\nexport * from './withError'\nexport * from './yarn'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,0BAAd;AACA,wBAAc,gCADd;AAEA,wBAAc,iCAFd;AAGA,wBAAc,2BAHd;AAIA,wBAAc,mBAJd;AAKA,wBAAc,kCALd;AAMA,wBAAc,6BANd;AAOA,wBAAc,gCAPd;AAQA,wBAAc,wBARd;AASA,wBAAc,uBATd;AAUA,wBAAc,4BAVd;AAWA,wBAAc,oBAXd;AAYA,wBAAc,+BAZd;AAaA,wBAAc,uBAbd;AAcA,wBAAc,qBAdd;AAeA,wBAAc,iCAfd;AAgBA,wBAAc,wBAhBd;AAiBA,wBAAc,mBAjBd;","names":[]}
1
+ {"version":3,"sources":["../../src/lib/index.ts"],"sourcesContent":["export * from './checkResult'\nexport * from './createBuildConfig'\nexport * from './defaultBuildConfig'\nexport * from './dependencies'\nexport * from './file'\nexport * from './generateIgnoreFiles'\nexport * from './jsonFormatters'\nexport * from './loadConfig'\nexport * from './parsedPackageJSON'\nexport * from './processEx'\nexport * from './runSteps'\nexport * from './runStepsAsync'\nexport * from './runXy'\nexport * from './runXyWithWarning'\nexport * from './safeExit'\nexport * from './string'\nexport * from './withErrnoException'\nexport * from './withError'\nexport * from './yarn'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,0BAAd;AACA,wBAAc,gCADd;AAEA,wBAAc,iCAFd;AAGA,wBAAc,2BAHd;AAIA,wBAAc,mBAJd;AAKA,wBAAc,kCALd;AAMA,wBAAc,6BANd;AAOA,wBAAc,yBAPd;AAQA,wBAAc,gCARd;AASA,wBAAc,wBATd;AAUA,wBAAc,uBAVd;AAWA,wBAAc,4BAXd;AAYA,wBAAc,oBAZd;AAaA,wBAAc,+BAbd;AAcA,wBAAc,uBAdd;AAeA,wBAAc,qBAfd;AAgBA,wBAAc,iCAhBd;AAiBA,wBAAc,wBAjBd;AAkBA,wBAAc,mBAlBd;","names":[]}
@@ -5,6 +5,7 @@ export * from "./dependencies";
5
5
  export * from "./file";
6
6
  export * from "./generateIgnoreFiles";
7
7
  export * from "./jsonFormatters";
8
+ export * from "./loadConfig";
8
9
  export * from "./parsedPackageJSON";
9
10
  export * from "./processEx";
10
11
  export * from "./runSteps";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/index.ts"],"sourcesContent":["export * from './checkResult'\nexport * from './createBuildConfig'\nexport * from './defaultBuildConfig'\nexport * from './dependencies'\nexport * from './file'\nexport * from './generateIgnoreFiles'\nexport * from './jsonFormatters'\nexport * from './parsedPackageJSON'\nexport * from './processEx'\nexport * from './runSteps'\nexport * from './runStepsAsync'\nexport * from './runXy'\nexport * from './runXyWithWarning'\nexport * from './safeExit'\nexport * from './string'\nexport * from './withErrnoException'\nexport * from './withError'\nexport * from './yarn'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/lib/index.ts"],"sourcesContent":["export * from './checkResult'\nexport * from './createBuildConfig'\nexport * from './defaultBuildConfig'\nexport * from './dependencies'\nexport * from './file'\nexport * from './generateIgnoreFiles'\nexport * from './jsonFormatters'\nexport * from './loadConfig'\nexport * from './parsedPackageJSON'\nexport * from './processEx'\nexport * from './runSteps'\nexport * from './runStepsAsync'\nexport * from './runXy'\nexport * from './runXyWithWarning'\nexport * from './safeExit'\nexport * from './string'\nexport * from './withErrnoException'\nexport * from './withError'\nexport * from './yarn'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var loadConfig_exports = {};
30
+ __export(loadConfig_exports, {
31
+ loadConfig: () => loadConfig
32
+ });
33
+ module.exports = __toCommonJS(loadConfig_exports);
34
+ var import_chalk = __toESM(require("chalk"));
35
+ var import_cosmiconfig = require("cosmiconfig");
36
+ var import_merge = __toESM(require("lodash/merge"));
37
+ let config;
38
+ const loadConfig = async (params) => {
39
+ if (config) {
40
+ return (0, import_merge.default)({}, config, params);
41
+ }
42
+ const cosmicConfigResult = await (0, import_cosmiconfig.cosmiconfig)("xy").search();
43
+ config = cosmicConfigResult?.config;
44
+ const configFilePath = cosmicConfigResult?.filepath;
45
+ if (configFilePath) {
46
+ console.log(import_chalk.default.gray(`Loading config from ${configFilePath}`));
47
+ }
48
+ return (0, import_merge.default)({}, config, params);
49
+ };
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ loadConfig
53
+ });
54
+ //# sourceMappingURL=loadConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet config: Record<string, any>\n\nexport const loadConfig = async <T extends object>(params?: T): Promise<T> => {\n if (config) {\n return merge({}, config, params)\n }\n\n const cosmicConfigResult = await cosmiconfig('xy').search()\n config = cosmicConfigResult?.config\n const configFilePath = cosmicConfigResult?.filepath\n if (configFilePath) {\n console.log(chalk.gray(`Loading config from ${configFilePath}`))\n }\n return merge({}, config, params)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,yBAA4B;AAE5B,mBAAkB;AAGlB,IAAI;AAEG,MAAM,aAAa,OAAyB,WAA2B;AAC5E,MAAI,QAAQ;AACV,eAAO,aAAAA,SAAM,CAAC,GAAG,QAAQ,MAAM;AAAA,EACjC;AAEA,QAAM,qBAAqB,UAAM,gCAAY,IAAI,EAAE,OAAO;AAC1D,WAAS,oBAAoB;AAC7B,QAAM,iBAAiB,oBAAoB;AAC3C,MAAI,gBAAgB;AAClB,YAAQ,IAAI,aAAAC,QAAM,KAAK,uBAAuB,cAAc,EAAE,CAAC;AAAA,EACjE;AACA,aAAO,aAAAD,SAAM,CAAC,GAAG,QAAQ,MAAM;AACjC;","names":["merge","chalk"]}
@@ -0,0 +1,20 @@
1
+ import chalk from "chalk";
2
+ import { cosmiconfig } from "cosmiconfig";
3
+ import merge from "lodash/merge";
4
+ let config;
5
+ const loadConfig = async (params) => {
6
+ if (config) {
7
+ return merge({}, config, params);
8
+ }
9
+ const cosmicConfigResult = await cosmiconfig("xy").search();
10
+ config = cosmicConfigResult?.config;
11
+ const configFilePath = cosmicConfigResult?.filepath;
12
+ if (configFilePath) {
13
+ console.log(chalk.gray(`Loading config from ${configFilePath}`));
14
+ }
15
+ return merge({}, config, params);
16
+ };
17
+ export {
18
+ loadConfig
19
+ };
20
+ //# sourceMappingURL=loadConfig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n// eslint-disable-next-line import/no-internal-modules\nimport merge from 'lodash/merge'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet config: Record<string, any>\n\nexport const loadConfig = async <T extends object>(params?: T): Promise<T> => {\n if (config) {\n return merge({}, config, params)\n }\n\n const cosmicConfigResult = await cosmiconfig('xy').search()\n config = cosmicConfigResult?.config\n const configFilePath = cosmicConfigResult?.filepath\n if (configFilePath) {\n console.log(chalk.gray(`Loading config from ${configFilePath}`))\n }\n return merge({}, config, params)\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,mBAAmB;AAE5B,OAAO,WAAW;AAGlB,IAAI;AAEG,MAAM,aAAa,OAAyB,WAA2B;AAC5E,MAAI,QAAQ;AACV,WAAO,MAAM,CAAC,GAAG,QAAQ,MAAM;AAAA,EACjC;AAEA,QAAM,qBAAqB,MAAM,YAAY,IAAI,EAAE,OAAO;AAC1D,WAAS,oBAAoB;AAC7B,QAAM,iBAAiB,oBAAoB;AAC3C,MAAI,gBAAgB;AAClB,YAAQ,IAAI,MAAM,KAAK,uBAAuB,cAAc,EAAE,CAAC;AAAA,EACjE;AACA,SAAO,MAAM,CAAC,GAAG,QAAQ,MAAM;AACjC;","names":[]}
package/package.json CHANGED
@@ -66,7 +66,7 @@
66
66
  "@types/yargs": "^17.0.24",
67
67
  "@typescript-eslint/eslint-plugin": "^6.7.0",
68
68
  "@typescript-eslint/parser": "^6.7.0",
69
- "@xylabs/tsconfig": "~3.0.11",
69
+ "@xylabs/tsconfig": "~3.0.13",
70
70
  "chalk": "^4.1.2",
71
71
  "cosmiconfig": "^8.3.6",
72
72
  "cpy": "^8.1.2",
@@ -76,7 +76,6 @@
76
76
  "eslint-plugin-prettier": "^5.0.0",
77
77
  "eslint-plugin-sonarjs": "^0.21.0",
78
78
  "jest": "^29.7.0",
79
- "jest-environment-jsdom": "^29.7.0",
80
79
  "jest-extended": "^4.0.1",
81
80
  "jest-mock-extended": "^3.0.5",
82
81
  "jest-sorted": "^1.0.14",
@@ -98,6 +97,7 @@
98
97
  "ts-jest": "^29.1.1",
99
98
  "ts-node": "^10.9.1",
100
99
  "ts-prune": "^0.10.3",
100
+ "tsc-prog": "^2.3.0",
101
101
  "tslib": "^2.6.2",
102
102
  "tsup": "^7.2.0",
103
103
  "typedoc": "^0.24.8",
@@ -110,10 +110,9 @@
110
110
  "@types/license-checker": "^25.0.4",
111
111
  "@types/lodash": "^4.14.198",
112
112
  "@types/parse-git-config": "^3.0.1",
113
- "@xylabs/eslint-config": "^3.0.11",
114
- "@xylabs/tsconfig": "^3.0.11",
113
+ "@xylabs/eslint-config": "^3.0.13",
114
+ "@xylabs/tsconfig": "^3.0.13",
115
115
  "publint": "^0.2.2",
116
- "tsup": "^7.2.0",
117
116
  "typescript": "^5.2.2"
118
117
  },
119
118
  "peerDependencies": {
@@ -169,5 +168,5 @@
169
168
  "package-clean": "echo Not cleaning..."
170
169
  },
171
170
  "sideEffects": false,
172
- "version": "3.0.11"
171
+ "version": "3.0.13"
173
172
  }
@@ -0,0 +1,10 @@
1
+ export interface RootParams {
2
+ verbose?: boolean
3
+ }
4
+
5
+ export interface CompileParams extends RootParams {
6
+ compile?: {
7
+ depth?: number
8
+ publint?: boolean
9
+ }
10
+ }
@@ -0,0 +1,73 @@
1
+ import chalk from 'chalk'
2
+ // eslint-disable-next-line import/no-internal-modules
3
+ import merge from 'lodash/merge'
4
+
5
+ import { loadConfig } from '../../../lib'
6
+ import { packagePublint } from '../publint'
7
+ import { CompileParams } from './CompileParams'
8
+ import { packageCompileRollup } from './rollup'
9
+ import { packageCompileTsc } from './tsc'
10
+ import { packageCompileTsup } from './tsup'
11
+
12
+ export type PackageCompileMode = 'tsup' | 'tsc' | 'rollup'
13
+
14
+ export type PackageCompileParams = CompileParams & {
15
+ compile?: {
16
+ modes?: PackageCompileMode[]
17
+ }
18
+ }
19
+
20
+ export const packageCompile = async (params?: PackageCompileParams): Promise<number> => {
21
+ const pkg = process.env.INIT_CWD
22
+ console.log(chalk.green(`Compiling ${pkg}`))
23
+ const config = await loadConfig(params)
24
+
25
+ const modes = config.compile?.modes ?? ['tsup']
26
+ let modeIndex = 0
27
+ while (modeIndex < modes.length) {
28
+ const mode = modes[modeIndex]
29
+ switch (mode) {
30
+ case 'rollup': {
31
+ const result = packageCompileRollup(
32
+ merge({}, params, {
33
+ compile: {
34
+ publint: false,
35
+ },
36
+ }),
37
+ )
38
+ if (result) {
39
+ return result
40
+ }
41
+ break
42
+ }
43
+ case 'tsc': {
44
+ const result = packageCompileTsc(
45
+ merge({}, params, {
46
+ compile: {
47
+ publint: false,
48
+ },
49
+ }),
50
+ )
51
+ if (result) {
52
+ return result
53
+ }
54
+ break
55
+ }
56
+ case 'tsup': {
57
+ const result = packageCompileTsup(
58
+ merge({}, params, {
59
+ compile: {
60
+ publint: false,
61
+ },
62
+ }),
63
+ )
64
+ if (result) {
65
+ return result
66
+ }
67
+ break
68
+ }
69
+ }
70
+ modeIndex++
71
+ }
72
+ return config.compile?.publint ? await packagePublint(params) : 0
73
+ }
@@ -0,0 +1,26 @@
1
+ import { copyFile, readdir } from 'fs/promises'
2
+
3
+ const getDistTypeFiles = async () => {
4
+ return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts')).map((file) => `dist/${file}`)
5
+ }
6
+
7
+ const getDistTypeMapFiles = async () => {
8
+ return (await readdir('dist', { recursive: true })).filter((file) => file.endsWith('d.ts.map')).map((file) => `dist/${file}`)
9
+ }
10
+
11
+ export const copyTypeFiles = async () => {
12
+ //hybrid packages want two copies of the types
13
+ const distTypeFiles = await getDistTypeFiles()
14
+ await Promise.all(
15
+ distTypeFiles.map(async (file) => {
16
+ await copyFile(file, file.replace('d.ts', 'd.mts'))
17
+ }),
18
+ )
19
+
20
+ const distTypeMapFiles = await getDistTypeMapFiles()
21
+ await Promise.all(
22
+ distTypeMapFiles.map(async (file) => {
23
+ await copyFile(file, file.replace('d.ts.map', 'd.mts.map'))
24
+ }),
25
+ )
26
+ }
@@ -0,0 +1,4 @@
1
+ export * from './compile'
2
+ export * from './rollup'
3
+ export * from './tsc'
4
+ export * from './tsup'
@@ -0,0 +1,33 @@
1
+ import { readdir } from 'fs/promises'
2
+
3
+ export const getInputs = async (subDir?: string) => {
4
+ return (await readdir(subDir ? `src/${subDir}` : 'src', { recursive: false }))
5
+ .filter((file) => (file.endsWith('.ts') || file.endsWith('.tsx')) && !file.endsWith('d.ts') && !file.endsWith('spec.ts'))
6
+ .map((file) => (subDir ? `${subDir}/${file}` : file))
7
+ }
8
+
9
+ export const getInputDirs = async (depth: number = 0) => {
10
+ if (depth === 0) {
11
+ return []
12
+ }
13
+ return [
14
+ '.',
15
+ ...(await readdir('src', { recursive: depth > 1, withFileTypes: true }))
16
+ .filter((file) => file.isDirectory())
17
+ .map((file) => {
18
+ const pathParts = file.path.split('/')
19
+ pathParts.shift()
20
+ if (pathParts.length) {
21
+ const root = pathParts.join('/')
22
+ return `${root}/${file.name}`
23
+ } else {
24
+ return file.name
25
+ }
26
+ }),
27
+ ]
28
+ }
29
+
30
+ export const getAllInputs = async (depth: number = 100) => {
31
+ const dirs = await getInputDirs(depth)
32
+ return (await Promise.all(dirs.map(async (dir) => await getInputs(dir)))).flat()
33
+ }