@xylabs/ts-scripts-yarn3 5.1.14 → 6.0.1
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/actions/compile-types.mjs +176 -0
- package/dist/actions/compile-types.mjs.map +1 -0
- package/dist/actions/fix.mjs +2 -2
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/index.mjs +253 -139
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/lint-clean.mjs +2 -2
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint.mjs +2 -2
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +88 -64
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +164 -0
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -0
- package/dist/actions/package/compile/deepMerge.mjs +31 -0
- package/dist/actions/package/compile/deepMerge.mjs.map +1 -0
- package/dist/actions/package/compile/index.mjs +101 -65
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +3 -2
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +90 -65
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +118 -80
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +2 -0
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +88 -64
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +88 -64
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +88 -64
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +88 -64
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +88 -64
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +173 -0
- package/dist/bin/package/compile-types.mjs.map +1 -0
- package/dist/bin/package/compile.mjs +88 -64
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +2 -0
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +2 -0
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +88 -64
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy.mjs +132 -45
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.mjs +277 -149
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +132 -45
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +132 -45
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +92 -5
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -2
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +18 -49
- package/src/actions/compile-types.ts +67 -0
- package/src/actions/index.ts +1 -0
- package/src/actions/lint.ts +1 -1
- package/src/actions/package/compile/compileTypes.ts +13 -0
- package/src/actions/package/compile/deepMerge.ts +33 -0
- package/src/actions/package/compile/index.ts +2 -0
- package/src/actions/package/compile/packageCompileTscTypes.ts +3 -2
- package/src/actions/package/compile/packageCompileTsup.ts +39 -53
- package/src/actions/package/lint.ts +2 -0
- package/src/bin/package/compile-types.ts +16 -0
- package/src/bin/xy.ts +1 -1
- package/src/xy/xyBuildCommands.ts +19 -1
- package/dist/bin/build.mjs +0 -17
- package/dist/bin/build.mjs.map +0 -1
- package/dist/bin/clean.mjs +0 -17
- package/dist/bin/clean.mjs.map +0 -1
- package/dist/bin/compile-only.mjs +0 -17
- package/dist/bin/compile-only.mjs.map +0 -1
- package/dist/bin/compile.mjs +0 -17
- package/dist/bin/compile.mjs.map +0 -1
- package/dist/bin/cycle.mjs +0 -17
- package/dist/bin/cycle.mjs.map +0 -1
- package/dist/bin/dead.mjs +0 -17
- package/dist/bin/dead.mjs.map +0 -1
- package/dist/bin/deploy-major.mjs +0 -17
- package/dist/bin/deploy-major.mjs.map +0 -1
- package/dist/bin/deploy-minor.mjs +0 -17
- package/dist/bin/deploy-minor.mjs.map +0 -1
- package/dist/bin/deploy-next.mjs +0 -17
- package/dist/bin/deploy-next.mjs.map +0 -1
- package/dist/bin/deploy.mjs +0 -17
- package/dist/bin/deploy.mjs.map +0 -1
- package/dist/bin/deps.mjs +0 -17
- package/dist/bin/deps.mjs.map +0 -1
- package/dist/bin/fix.mjs +0 -17
- package/dist/bin/fix.mjs.map +0 -1
- package/dist/bin/gen-docs.mjs +0 -17
- package/dist/bin/gen-docs.mjs.map +0 -1
- package/dist/bin/gitlint-fix.mjs +0 -17
- package/dist/bin/gitlint-fix.mjs.map +0 -1
- package/dist/bin/gitlint.mjs +0 -17
- package/dist/bin/gitlint.mjs.map +0 -1
- package/dist/bin/license.mjs +0 -17
- package/dist/bin/license.mjs.map +0 -1
- package/dist/bin/lint-clean.mjs +0 -17
- package/dist/bin/lint-clean.mjs.map +0 -1
- package/dist/bin/lint-fast.mjs +0 -17
- package/dist/bin/lint-fast.mjs.map +0 -1
- package/dist/bin/lint-profile.mjs +0 -17
- package/dist/bin/lint-profile.mjs.map +0 -1
- package/dist/bin/lint.mjs +0 -17
- package/dist/bin/lint.mjs.map +0 -1
- package/dist/bin/publint.mjs +0 -17
- package/dist/bin/publint.mjs.map +0 -1
- package/dist/bin/rebuild.mjs +0 -17
- package/dist/bin/rebuild.mjs.map +0 -1
- package/dist/bin/recompile.mjs +0 -17
- package/dist/bin/recompile.mjs.map +0 -1
- package/dist/bin/reinstall.mjs +0 -17
- package/dist/bin/reinstall.mjs.map +0 -1
- package/dist/bin/relint.mjs +0 -17
- package/dist/bin/relint.mjs.map +0 -1
- package/dist/bin/sonar.mjs +0 -17
- package/dist/bin/sonar.mjs.map +0 -1
- package/dist/bin/test.mjs +0 -17
- package/dist/bin/test.mjs.map +0 -1
- package/dist/bin/up.mjs +0 -17
- package/dist/bin/up.mjs.map +0 -1
- package/dist/bin/updo.mjs +0 -17
- package/dist/bin/updo.mjs.map +0 -1
- package/dist/bin/upplug.mjs +0 -17
- package/dist/bin/upplug.mjs.map +0 -1
- package/dist/bin/upyarn.mjs +0 -17
- package/dist/bin/upyarn.mjs.map +0 -1
- package/dist/bin/xy-ts.mjs +0 -1930
- package/dist/bin/xy-ts.mjs.map +0 -1
- package/dist/bin/yarn3only.mjs +0 -17
- package/dist/bin/yarn3only.mjs.map +0 -1
- package/src/bin/build.ts +0 -5
- package/src/bin/clean.ts +0 -5
- package/src/bin/compile-only.ts +0 -5
- package/src/bin/compile.ts +0 -5
- package/src/bin/cycle.ts +0 -5
- package/src/bin/dead.ts +0 -5
- package/src/bin/deploy-major.ts +0 -5
- package/src/bin/deploy-minor.ts +0 -5
- package/src/bin/deploy-next.ts +0 -5
- package/src/bin/deploy.ts +0 -5
- package/src/bin/deps.ts +0 -5
- package/src/bin/fix.ts +0 -5
- package/src/bin/gen-docs.ts +0 -5
- package/src/bin/gitlint-fix.ts +0 -5
- package/src/bin/gitlint.ts +0 -5
- package/src/bin/license.ts +0 -5
- package/src/bin/lint-clean.ts +0 -5
- package/src/bin/lint-fast.ts +0 -5
- package/src/bin/lint-profile.ts +0 -5
- package/src/bin/lint.ts +0 -5
- package/src/bin/publint.ts +0 -5
- package/src/bin/rebuild.ts +0 -5
- package/src/bin/recompile.ts +0 -5
- package/src/bin/reinstall.ts +0 -5
- package/src/bin/relint.ts +0 -5
- package/src/bin/sonar.ts +0 -5
- package/src/bin/test.ts +0 -5
- package/src/bin/up.ts +0 -5
- package/src/bin/updo.ts +0 -5
- package/src/bin/upplug.ts +0 -5
- package/src/bin/upyarn.ts +0 -5
- package/src/bin/xy-ts.ts +0 -12
- package/src/bin/yarn3only.ts +0 -5
|
@@ -262,13 +262,39 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode = "single", verbose
|
|
|
262
262
|
return entries;
|
|
263
263
|
}, "buildEntries");
|
|
264
264
|
|
|
265
|
+
// src/actions/package/compile/deepMerge.ts
|
|
266
|
+
function deepMerge(target, source) {
|
|
267
|
+
if (!source || typeof source !== "object") return target;
|
|
268
|
+
for (const key of Object.keys(source)) {
|
|
269
|
+
if (typeof source[key] === "object" && source[key] !== null && !Array.isArray(source[key])) {
|
|
270
|
+
if (!target[key] || typeof target[key] !== "object") {
|
|
271
|
+
target[key] = {};
|
|
272
|
+
}
|
|
273
|
+
deepMerge(target[key], source[key]);
|
|
274
|
+
} else {
|
|
275
|
+
target[key] = source[key];
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return target;
|
|
279
|
+
}
|
|
280
|
+
__name(deepMerge, "deepMerge");
|
|
281
|
+
function deepMergeObjects(objects) {
|
|
282
|
+
const result = {};
|
|
283
|
+
for (const obj of objects) {
|
|
284
|
+
deepMerge(result, obj);
|
|
285
|
+
}
|
|
286
|
+
return result;
|
|
287
|
+
}
|
|
288
|
+
__name(deepMergeObjects, "deepMergeObjects");
|
|
289
|
+
|
|
265
290
|
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
266
291
|
import { cwd as cwd2 } from "node:process";
|
|
267
292
|
import chalk7 from "chalk";
|
|
268
293
|
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
269
294
|
import { DiagnosticCategory as DiagnosticCategory2 } from "typescript";
|
|
270
|
-
var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src",
|
|
295
|
+
var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", config2 = {}, compilerOptionsParam) => {
|
|
271
296
|
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
297
|
+
const verbose = config2?.verbose ?? false;
|
|
272
298
|
if (verbose) {
|
|
273
299
|
console.log(`Compiling types with TSC [${pkg}]`);
|
|
274
300
|
}
|
|
@@ -276,7 +302,7 @@ var packageCompileTscTypes = /* @__PURE__ */ __name((folder = "src", { verbose }
|
|
|
276
302
|
...getCompilerOptions({
|
|
277
303
|
declaration: true,
|
|
278
304
|
emitDeclarationOnly: true,
|
|
279
|
-
outDir: "dist",
|
|
305
|
+
outDir: "dist/types",
|
|
280
306
|
removeComments: false,
|
|
281
307
|
skipDefaultLibCheck: true,
|
|
282
308
|
skipLibCheck: true,
|
|
@@ -365,37 +391,9 @@ var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single",
|
|
|
365
391
|
if (verbose) {
|
|
366
392
|
console.log(`TSUP:build:stop [${folder}] ${types}`);
|
|
367
393
|
}
|
|
368
|
-
if (types === "tsc") {
|
|
369
|
-
if (verbose) {
|
|
370
|
-
console.log(`Calling packageCompileTscTypes [${folder}] ${types}`);
|
|
371
|
-
}
|
|
372
|
-
const errors = packageCompileTscTypes(folder, {
|
|
373
|
-
verbose
|
|
374
|
-
}, {
|
|
375
|
-
outDir
|
|
376
|
-
});
|
|
377
|
-
if (errors) {
|
|
378
|
-
return errors;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
394
|
return 0;
|
|
382
395
|
}, "compileFolder");
|
|
383
|
-
var
|
|
384
|
-
console.warn("packageCompileTsup-types", types);
|
|
385
|
-
const compile = config2?.compile;
|
|
386
|
-
const verbose = config2?.verbose ?? false;
|
|
387
|
-
if (verbose) {
|
|
388
|
-
console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
|
|
389
|
-
}
|
|
390
|
-
const compileForNode = compile?.node ?? {
|
|
391
|
-
src: {}
|
|
392
|
-
};
|
|
393
|
-
const compileForBrowser = compile?.browser ?? {
|
|
394
|
-
src: {}
|
|
395
|
-
};
|
|
396
|
-
const compileForNeutral = compile?.neutral ?? {
|
|
397
|
-
src: {}
|
|
398
|
-
};
|
|
396
|
+
var tsupOptions = /* @__PURE__ */ __name((options = []) => {
|
|
399
397
|
const standardLoaders = {
|
|
400
398
|
".gif": "copy",
|
|
401
399
|
".html": "copy",
|
|
@@ -420,45 +418,71 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2, types = "tsc") =
|
|
|
420
418
|
sourcemap: true,
|
|
421
419
|
target: "esnext"
|
|
422
420
|
};
|
|
421
|
+
return deepMergeObjects([
|
|
422
|
+
standardOptions,
|
|
423
|
+
...options
|
|
424
|
+
]);
|
|
425
|
+
}, "tsupOptions");
|
|
426
|
+
var packageCompileTsup = /* @__PURE__ */ __name(async (config2, types = "tsc") => {
|
|
427
|
+
console.warn("packageCompileTsup-types", types);
|
|
428
|
+
const compile = config2?.compile;
|
|
429
|
+
const verbose = config2?.verbose ?? false;
|
|
430
|
+
if (verbose) {
|
|
431
|
+
console.log(`Compiling with TSUP [Depth: ${compile?.depth}]`);
|
|
432
|
+
}
|
|
433
|
+
const compileForNode = compile?.node ?? {
|
|
434
|
+
src: {}
|
|
435
|
+
};
|
|
436
|
+
const compileForBrowser = compile?.browser ?? {
|
|
437
|
+
src: {}
|
|
438
|
+
};
|
|
439
|
+
const compileForNeutral = compile?.neutral ?? {
|
|
440
|
+
src: {}
|
|
441
|
+
};
|
|
442
|
+
if (types === "tsc") {
|
|
443
|
+
if (verbose) {
|
|
444
|
+
console.log(`Calling packageCompileTscTypes [${types}`);
|
|
445
|
+
}
|
|
446
|
+
const errors = packageCompileTscTypes("src", {
|
|
447
|
+
verbose
|
|
448
|
+
});
|
|
449
|
+
if (errors) {
|
|
450
|
+
return errors;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
423
453
|
return (await Promise.all(Object.entries(compileForNode).map(async ([folder, options]) => {
|
|
424
454
|
const inEsBuildOptions = typeof compile?.node?.esbuildOptions === "object" ? compile?.node?.esbuildOptions : {};
|
|
425
|
-
return folder ? await compileFolder(folder, compile?.entryMode,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
...typeof options === "object" ? options : {}
|
|
435
|
-
}, types, verbose) : 0;
|
|
455
|
+
return folder ? await compileFolder(folder, compile?.entryMode, tsupOptions([
|
|
456
|
+
inEsBuildOptions,
|
|
457
|
+
compile?.tsup?.options ?? {},
|
|
458
|
+
typeof options === "object" ? options : {},
|
|
459
|
+
{
|
|
460
|
+
platform: "node",
|
|
461
|
+
outDir: "dist/node"
|
|
462
|
+
}
|
|
463
|
+
]), types, verbose) : 0;
|
|
436
464
|
}))).reduce((prev, value) => prev + value, 0) || (await Promise.all(Object.entries(compileForBrowser).map(async ([folder, options]) => {
|
|
437
465
|
const inEsBuildOptions = typeof compile?.browser?.esbuildOptions === "object" ? compile?.browser?.esbuildOptions : {};
|
|
438
|
-
return folder ? await compileFolder(folder, compile?.entryMode,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
...typeof options === "object" ? options : {}
|
|
448
|
-
}, types, verbose) : 0;
|
|
466
|
+
return folder ? await compileFolder(folder, compile?.entryMode, tsupOptions([
|
|
467
|
+
inEsBuildOptions,
|
|
468
|
+
compile?.tsup?.options ?? {},
|
|
469
|
+
typeof options === "object" ? options : {},
|
|
470
|
+
{
|
|
471
|
+
platform: "browser",
|
|
472
|
+
outDir: "dist/browser"
|
|
473
|
+
}
|
|
474
|
+
]), types, verbose) : 0;
|
|
449
475
|
}))).reduce((prev, value) => prev + value, 0) || (await Promise.all(Object.entries(compileForNeutral).map(async ([folder, options]) => {
|
|
450
476
|
const inEsBuildOptions = typeof compile?.neutral?.esbuildOptions === "object" ? compile?.neutral?.esbuildOptions : {};
|
|
451
|
-
return folder ? await compileFolder(folder, compile?.entryMode,
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
...typeof options === "object" ? options : {}
|
|
461
|
-
}, types, verbose) : 0;
|
|
477
|
+
return folder ? await compileFolder(folder, compile?.entryMode, tsupOptions([
|
|
478
|
+
inEsBuildOptions,
|
|
479
|
+
compile?.tsup?.options ?? {},
|
|
480
|
+
typeof options === "object" ? options : {},
|
|
481
|
+
{
|
|
482
|
+
platform: "neutral",
|
|
483
|
+
outDir: "dist/neutral"
|
|
484
|
+
}
|
|
485
|
+
]), types, verbose) : 0;
|
|
462
486
|
}))).reduce((prev, value) => prev + value, 0) || 0;
|
|
463
487
|
}, "packageCompileTsup");
|
|
464
488
|
|
|
@@ -483,9 +507,18 @@ var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}, types) => {
|
|
|
483
507
|
return result + (publint ? await packagePublint(config2) : 0);
|
|
484
508
|
}, "packageCompile");
|
|
485
509
|
|
|
510
|
+
// src/actions/package/compile/compileTypes.ts
|
|
511
|
+
import chalk9 from "chalk";
|
|
512
|
+
var packageCompileTypes = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
513
|
+
const pkg = process.env.INIT_CWD;
|
|
514
|
+
console.log(chalk9.green(`Compiling Types ${pkg}`));
|
|
515
|
+
const config2 = await loadConfig(inConfig);
|
|
516
|
+
return packageCompileTscTypes(void 0, config2);
|
|
517
|
+
}, "packageCompileTypes");
|
|
518
|
+
|
|
486
519
|
// src/actions/package/copy-assets.ts
|
|
487
520
|
import path3 from "node:path/posix";
|
|
488
|
-
import
|
|
521
|
+
import chalk10 from "chalk";
|
|
489
522
|
import cpy from "cpy";
|
|
490
523
|
var copyTargetAssets = /* @__PURE__ */ __name(async (target, name, location) => {
|
|
491
524
|
try {
|
|
@@ -504,7 +537,7 @@ var copyTargetAssets = /* @__PURE__ */ __name(async (target, name, location) =>
|
|
|
504
537
|
flat: false
|
|
505
538
|
});
|
|
506
539
|
if (values.length > 0) {
|
|
507
|
-
console.log(
|
|
540
|
+
console.log(chalk10.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
|
|
508
541
|
}
|
|
509
542
|
for (const value of values) {
|
|
510
543
|
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
@@ -535,7 +568,7 @@ var packageCopyAssets = /* @__PURE__ */ __name(async ({ target }) => {
|
|
|
535
568
|
// src/actions/package/deps.ts
|
|
536
569
|
import { existsSync, readFileSync } from "node:fs";
|
|
537
570
|
import { cwd as cwd3 } from "node:process";
|
|
538
|
-
import
|
|
571
|
+
import chalk11 from "chalk";
|
|
539
572
|
import depcheck from "depcheck";
|
|
540
573
|
var special = depcheck.special;
|
|
541
574
|
var defaultIgnorePatterns = [
|
|
@@ -561,21 +594,21 @@ var defaultIgnoreDevPatterns = [
|
|
|
561
594
|
var reportUnused = /* @__PURE__ */ __name((name, unused) => {
|
|
562
595
|
if (unused.length > 0) {
|
|
563
596
|
const message = [
|
|
564
|
-
|
|
597
|
+
chalk11.yellow(`${unused.length} Unused ${name}`)
|
|
565
598
|
];
|
|
566
|
-
for (const value of unused) message.push(
|
|
599
|
+
for (const value of unused) message.push(chalk11.gray(` ${value}`));
|
|
567
600
|
console.log(message.join("\n"));
|
|
568
601
|
}
|
|
569
602
|
}, "reportUnused");
|
|
570
603
|
var reportMissing = /* @__PURE__ */ __name((name, missing) => {
|
|
571
604
|
if (Object.keys(missing).length > 0) {
|
|
572
605
|
const message = [
|
|
573
|
-
|
|
606
|
+
chalk11.yellow(`${Object.entries(missing).length} Missing ${name}`)
|
|
574
607
|
];
|
|
575
608
|
for (const [key, value] of Object.entries(missing)) {
|
|
576
|
-
message.push(`${key}`,
|
|
609
|
+
message.push(`${key}`, chalk11.gray(` ${value.at(0)}`));
|
|
577
610
|
}
|
|
578
|
-
console.log(
|
|
611
|
+
console.log(chalk11.yellow(message.join("\n")));
|
|
579
612
|
}
|
|
580
613
|
}, "reportMissing");
|
|
581
614
|
var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
|
|
@@ -680,10 +713,10 @@ var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
|
680
713
|
reportUnused("dependencies", unusedDeps);
|
|
681
714
|
reportUnused("devDependencies", unusedDevDeps);
|
|
682
715
|
if (Object.entries(invalidDirs).length > 0) {
|
|
683
|
-
for (const [key, value] of Object.entries(invalidDirs)) console.warn(
|
|
716
|
+
for (const [key, value] of Object.entries(invalidDirs)) console.warn(chalk11.gray(`Invalid Dir: ${key}: ${value}`));
|
|
684
717
|
}
|
|
685
718
|
if (Object.entries(invalidFiles).length > 0) {
|
|
686
|
-
for (const [key, value] of Object.entries(invalidFiles)) console.warn(
|
|
719
|
+
for (const [key, value] of Object.entries(invalidFiles)) console.warn(chalk11.gray(`Invalid File: ${key}: ${value}`));
|
|
687
720
|
}
|
|
688
721
|
reportMissing("dependencies", missingDepsObject);
|
|
689
722
|
reportMissing("devDependencies", missingDevDepsObject);
|
|
@@ -694,7 +727,7 @@ var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
|
694
727
|
// src/actions/package/gen-docs.ts
|
|
695
728
|
import { existsSync as existsSync2 } from "node:fs";
|
|
696
729
|
import path4 from "node:path";
|
|
697
|
-
import
|
|
730
|
+
import chalk12 from "chalk";
|
|
698
731
|
import { Application, ArgumentsReader, TSConfigReader, TypeDocReader } from "typedoc";
|
|
699
732
|
var ExitCodes = {
|
|
700
733
|
CompileError: 3,
|
|
@@ -796,7 +829,7 @@ var runTypeDoc = /* @__PURE__ */ __name(async (app) => {
|
|
|
796
829
|
return ExitCodes.OutputError;
|
|
797
830
|
}
|
|
798
831
|
}
|
|
799
|
-
console.log(
|
|
832
|
+
console.log(chalk12.green(`${pkgName} - Ok`));
|
|
800
833
|
return ExitCodes.Ok;
|
|
801
834
|
}, "runTypeDoc");
|
|
802
835
|
|
|
@@ -805,7 +838,7 @@ import { readdirSync } from "node:fs";
|
|
|
805
838
|
import path5 from "node:path";
|
|
806
839
|
import { cwd as cwd4 } from "node:process";
|
|
807
840
|
import { pathToFileURL } from "node:url";
|
|
808
|
-
import
|
|
841
|
+
import chalk13 from "chalk";
|
|
809
842
|
import { ESLint } from "eslint";
|
|
810
843
|
import { findUp } from "find-up";
|
|
811
844
|
import picomatch from "picomatch";
|
|
@@ -822,10 +855,10 @@ var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
|
822
855
|
];
|
|
823
856
|
for (const lintResult of lintResults) {
|
|
824
857
|
if (lintResult.messages.length > 0) {
|
|
825
|
-
console.log(
|
|
858
|
+
console.log(chalk13.gray(`
|
|
826
859
|
${lintResult.filePath}`));
|
|
827
860
|
for (const message of lintResult.messages) {
|
|
828
|
-
console.log(
|
|
861
|
+
console.log(chalk13.gray(` ${message.line}:${message.column}`), chalk13[colors[message.severity]](` ${severity[message.severity]}`), chalk13.white(` ${message.message}`), chalk13.gray(` ${message.ruleId}`));
|
|
829
862
|
}
|
|
830
863
|
}
|
|
831
864
|
}
|
|
@@ -856,6 +889,7 @@ function getFiles(dir, ignoreFolders) {
|
|
|
856
889
|
}
|
|
857
890
|
__name(getFiles, "getFiles");
|
|
858
891
|
var packageLint = /* @__PURE__ */ __name(async (fix = false) => {
|
|
892
|
+
const pkg = process.env.INIT_CWD;
|
|
859
893
|
const configPath = await getRootESLintConfig();
|
|
860
894
|
const { default: eslintConfig } = await import(configPath.href);
|
|
861
895
|
const ignoreFolders = [
|
|
@@ -876,6 +910,7 @@ var packageLint = /* @__PURE__ */ __name(async (fix = false) => {
|
|
|
876
910
|
warnIgnored: false
|
|
877
911
|
});
|
|
878
912
|
const files = getFiles(cwd4(), ignoreFolders);
|
|
913
|
+
console.log(chalk13.green(`Linting ${pkg} [${files.length}]`));
|
|
879
914
|
const lintResults = await engine.lintFiles(files);
|
|
880
915
|
dumpMessages(lintResults);
|
|
881
916
|
if (fix) {
|
|
@@ -894,12 +929,15 @@ export {
|
|
|
894
929
|
packageCleanTypescript,
|
|
895
930
|
packageCompile,
|
|
896
931
|
packageCompileTsc,
|
|
932
|
+
packageCompileTscTypes,
|
|
897
933
|
packageCompileTsup,
|
|
934
|
+
packageCompileTypes,
|
|
898
935
|
packageCopyAssets,
|
|
899
936
|
packageDeps,
|
|
900
937
|
packageGenDocs,
|
|
901
938
|
packageLint,
|
|
902
939
|
packagePublint,
|
|
903
|
-
packageRecompile
|
|
940
|
+
packageRecompile,
|
|
941
|
+
tsupOptions
|
|
904
942
|
};
|
|
905
943
|
//# sourceMappingURL=index.mjs.map
|