@xylabs/ts-scripts-yarn3 7.4.20 → 7.4.22
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/claude-clean.mjs +71 -0
- package/dist/actions/claude-clean.mjs.map +1 -0
- package/dist/actions/claude-commands.mjs +11 -2
- package/dist/actions/claude-commands.mjs.map +1 -1
- package/dist/actions/claude-rules.mjs +27 -7
- package/dist/actions/claude-rules.mjs.map +1 -1
- package/dist/actions/claude-skills.mjs.map +1 -1
- package/dist/actions/dupdeps.mjs +3 -2
- package/dist/actions/dupdeps.mjs.map +1 -1
- package/dist/actions/gitignore.mjs +152 -0
- package/dist/actions/gitignore.mjs.map +1 -0
- package/dist/actions/index.mjs +392 -206
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy.mjs +432 -226
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.mjs +495 -282
- package/dist/index.mjs.map +1 -1
- package/dist/lib/claudeMdTemplate.mjs +5 -1
- package/dist/lib/claudeMdTemplate.mjs.map +1 -1
- package/dist/lib/gitignoreTemplate.mjs +12 -0
- package/dist/lib/gitignoreTemplate.mjs.map +1 -0
- package/dist/lib/index.mjs +17 -3
- package/dist/lib/index.mjs.map +1 -1
- package/dist/xy/build/buildCommand.mjs +161 -0
- package/dist/xy/build/buildCommand.mjs.map +1 -0
- package/dist/xy/build/compileCommand.mjs +174 -0
- package/dist/xy/build/compileCommand.mjs.map +1 -0
- package/dist/xy/build/compileOnlyCommand.mjs +175 -0
- package/dist/xy/build/compileOnlyCommand.mjs.map +1 -0
- package/dist/xy/build/copyAssetsCommand.mjs +84 -0
- package/dist/xy/build/copyAssetsCommand.mjs.map +1 -0
- package/dist/xy/{build-commands → build}/index.mjs +45 -40
- package/dist/xy/build/index.mjs.map +1 -0
- package/dist/xy/build/rebuildCommand.mjs +114 -0
- package/dist/xy/build/rebuildCommand.mjs.map +1 -0
- package/dist/xy/build/recompileCommand.mjs +204 -0
- package/dist/xy/build/recompileCommand.mjs.map +1 -0
- package/dist/xy/common/claude/cleanCommand.mjs +79 -0
- package/dist/xy/common/claude/cleanCommand.mjs.map +1 -0
- package/dist/xy/common/claude/commandsCommand.mjs +11 -2
- package/dist/xy/common/claude/commandsCommand.mjs.map +1 -1
- package/dist/xy/common/claude/index.mjs +171 -69
- package/dist/xy/common/claude/index.mjs.map +1 -1
- package/dist/xy/common/claude/initCommand.mjs +38 -115
- package/dist/xy/common/claude/initCommand.mjs.map +1 -1
- package/dist/xy/common/claude/rulesCommand.mjs +27 -7
- package/dist/xy/common/claude/rulesCommand.mjs.map +1 -1
- package/dist/xy/common/claude/skillsCommand.mjs.map +1 -1
- package/dist/xy/common/gitignoreCommand.mjs +158 -0
- package/dist/xy/common/gitignoreCommand.mjs.map +1 -0
- package/dist/xy/common/index.mjs +304 -109
- package/dist/xy/common/index.mjs.map +1 -1
- package/dist/xy/index.mjs +432 -226
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/install/dupdepsCommand.mjs +3 -2
- package/dist/xy/install/dupdepsCommand.mjs.map +1 -1
- package/dist/xy/install/index.mjs +3 -2
- package/dist/xy/install/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +432 -226
- package/dist/xy/xy.mjs.map +1 -1
- package/package.json +2 -2
- package/templates/claude/CLAUDE-local.md +4 -0
- package/templates/claude/commands/xy-dead.md +5 -0
- package/templates/claude/{rules/xylabs-dependencies.md → commands/xy-deps.md} +7 -7
- package/templates/claude/commands/xy-dupdeps.md +5 -0
- package/templates/claude/commands/xy-gen-docs.md +5 -0
- package/templates/claude/commands/xy-gitignore.md +5 -0
- package/templates/claude/commands/xy-gitlint.md +5 -0
- package/templates/claude/commands/xy-license.md +5 -0
- package/templates/claude/commands/xy-lint-rules.md +44 -0
- package/templates/claude/commands/xy-recompile.md +5 -0
- package/templates/claude/commands/xy-reinstall.md +5 -0
- package/templates/claude/commands/xy-relint.md +5 -0
- package/templates/claude/commands/xy-retest.md +5 -0
- package/templates/claude/commands/xy-sonar.md +5 -0
- package/templates/claude/commands/xy-up.md +7 -0
- package/templates/claude/rules/xylabs-architecture.md +4 -7
- package/templates/claude/rules/xylabs-build.md +6 -11
- package/templates/claude/rules/xylabs-git-workflow.md +3 -5
- package/templates/claude/rules/xylabs-naming.md +4 -7
- package/templates/claude/rules/xylabs-style.md +14 -19
- package/templates/claude/skills/xylabs-e2e-setup/SKILL.md +16 -2
- package/templates/gitignore/template.gitignore +40 -0
- package/dist/actions/gitignore-gen.mjs +0 -88
- package/dist/actions/gitignore-gen.mjs.map +0 -1
- package/dist/xy/build-commands/build.mjs +0 -502
- package/dist/xy/build-commands/build.mjs.map +0 -1
- package/dist/xy/build-commands/index.mjs.map +0 -1
- package/dist/xy/common/gitignoreGenCommand.mjs +0 -98
- package/dist/xy/common/gitignoreGenCommand.mjs.map +0 -1
- package/templates/claude/commands/xylabs-deploy-major.md +0 -7
- package/templates/claude/commands/xylabs-deploy-minor.md +0 -7
- package/templates/claude/commands/xylabs-deploy.md +0 -7
- package/templates/claude/rules/xylabs-error-handling.md +0 -7
- package/templates/claude/rules/xylabs-frameworks.md +0 -8
- package/templates/claude/rules/xylabs-linting.md +0 -55
- package/templates/claude/rules/xylabs-typescript.md +0 -11
- /package/templates/claude/commands/{xylabs-build.md → xy-build.md} +0 -0
- /package/templates/claude/commands/{xylabs-clean.md → xy-clean.md} +0 -0
- /package/templates/claude/commands/{xylabs-compile.md → xy-compile.md} +0 -0
- /package/templates/claude/commands/{xylabs-cycle.md → xy-cycle.md} +0 -0
- /package/templates/claude/commands/{xylabs-deplint.md → xy-deplint.md} +0 -0
- /package/templates/claude/commands/{xylabs-fix.md → xy-fix.md} +0 -0
- /package/templates/claude/commands/{xylabs-knip.md → xy-knip.md} +0 -0
- /package/templates/claude/commands/{xylabs-lint.md → xy-lint.md} +0 -0
- /package/templates/claude/commands/{xylabs-publint.md → xy-publint.md} +0 -0
- /package/templates/claude/commands/{xylabs-rebuild.md → xy-rebuild.md} +0 -0
- /package/templates/claude/commands/{xylabs-test.md → xy-test.md} +0 -0
package/dist/actions/index.mjs
CHANGED
|
@@ -26,7 +26,8 @@ var require2 = createRequire(import.meta.url);
|
|
|
26
26
|
var packageRoot = PATH.dirname(require2.resolve("@xylabs/ts-scripts-yarn3/package.json"));
|
|
27
27
|
var templatesDir = PATH.resolve(packageRoot, "templates", "claude");
|
|
28
28
|
var XYLABS_RULES_PREFIX = "xylabs-";
|
|
29
|
-
var XYLABS_COMMANDS_PREFIX = "
|
|
29
|
+
var XYLABS_COMMANDS_PREFIX = "xy-";
|
|
30
|
+
var LEGACY_COMMANDS_PREFIX = "xylabs-";
|
|
30
31
|
var XYLABS_SKILLS_PREFIX = "xylabs-";
|
|
31
32
|
var claudeMdRuleTemplates = () => {
|
|
32
33
|
const rulesDir = PATH.resolve(templatesDir, "rules");
|
|
@@ -64,7 +65,7 @@ var claudeSkillTemplates = () => {
|
|
|
64
65
|
}
|
|
65
66
|
return result;
|
|
66
67
|
};
|
|
67
|
-
var
|
|
68
|
+
var claudeMdLocalTemplate = () => readFileSync(PATH.resolve(templatesDir, "CLAUDE-local.md"), "utf8");
|
|
68
69
|
|
|
69
70
|
// src/lib/deleteGlob.ts
|
|
70
71
|
import fs from "fs";
|
|
@@ -324,19 +325,19 @@ var INIT_CWD = () => {
|
|
|
324
325
|
// src/lib/generateIgnoreFiles.ts
|
|
325
326
|
var localeCompare = (a, b) => a.localeCompare(b);
|
|
326
327
|
var mergeEntries = (a, b) => [...union(a, b)].toSorted(localeCompare);
|
|
327
|
-
var generateIgnoreFiles = (
|
|
328
|
-
console.log(chalk4.green(`Generate ${
|
|
328
|
+
var generateIgnoreFiles = (filename2, pkg) => {
|
|
329
|
+
console.log(chalk4.green(`Generate ${filename2} Files`));
|
|
329
330
|
const cwd5 = INIT_CWD() ?? ".";
|
|
330
331
|
const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
|
|
331
|
-
const readEntries = (location) => readNonEmptyLines(`${location}/${
|
|
332
|
-
const writeEntries = (location, entries) => writeLines(`${location}/${
|
|
332
|
+
const readEntries = (location) => readNonEmptyLines(`${location}/${filename2}`);
|
|
333
|
+
const writeEntries = (location, entries) => writeLines(`${location}/${filename2}`, entries);
|
|
333
334
|
const results = workspaces.map(({ location, name }) => {
|
|
334
335
|
try {
|
|
335
336
|
writeEntries(location, mergeEntries(readEntries(cwd5), readEntries(location)));
|
|
336
337
|
return 0;
|
|
337
338
|
} catch (ex) {
|
|
338
339
|
const error = ex;
|
|
339
|
-
console.error(`Generate ${
|
|
340
|
+
console.error(`Generate ${filename2} Files [${name}] [${error.message}]`);
|
|
340
341
|
return 1;
|
|
341
342
|
}
|
|
342
343
|
});
|
|
@@ -566,6 +567,15 @@ async function generateReadmeFiles({
|
|
|
566
567
|
return failed ? 1 : 0;
|
|
567
568
|
}
|
|
568
569
|
|
|
570
|
+
// src/lib/gitignoreTemplate.ts
|
|
571
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
572
|
+
import { createRequire as createRequire3 } from "module";
|
|
573
|
+
import PATH3 from "path";
|
|
574
|
+
var require4 = createRequire3(import.meta.url);
|
|
575
|
+
var packageRoot3 = PATH3.dirname(require4.resolve("@xylabs/ts-scripts-yarn3/package.json"));
|
|
576
|
+
var templatesDir2 = PATH3.resolve(packageRoot3, "templates", "gitignore");
|
|
577
|
+
var gitignoreTemplate = () => readFileSync4(PATH3.resolve(templatesDir2, "template.gitignore"), "utf8");
|
|
578
|
+
|
|
569
579
|
// src/lib/loadConfig.ts
|
|
570
580
|
import chalk6 from "chalk";
|
|
571
581
|
import { cosmiconfig } from "cosmiconfig";
|
|
@@ -588,10 +598,10 @@ var loadConfig = async (params) => {
|
|
|
588
598
|
};
|
|
589
599
|
|
|
590
600
|
// src/lib/parsedPackageJSON.ts
|
|
591
|
-
import { readFileSync as
|
|
601
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
592
602
|
var parsedPackageJSON = (path14) => {
|
|
593
603
|
const pathToPackageJSON = path14 ?? process.env.npm_package_json ?? "";
|
|
594
|
-
const packageJSON =
|
|
604
|
+
const packageJSON = readFileSync5(pathToPackageJSON).toString();
|
|
595
605
|
return JSON.parse(packageJSON);
|
|
596
606
|
};
|
|
597
607
|
|
|
@@ -701,25 +711,85 @@ var build = async ({
|
|
|
701
711
|
return result;
|
|
702
712
|
};
|
|
703
713
|
|
|
704
|
-
// src/actions/claude-
|
|
714
|
+
// src/actions/claude-clean.ts
|
|
705
715
|
import {
|
|
706
716
|
existsSync as existsSync4,
|
|
707
|
-
mkdirSync,
|
|
708
717
|
readdirSync as readdirSync2,
|
|
709
|
-
|
|
710
|
-
unlinkSync
|
|
711
|
-
writeFileSync as writeFileSync2
|
|
718
|
+
rmSync,
|
|
719
|
+
unlinkSync
|
|
712
720
|
} from "fs";
|
|
713
|
-
import
|
|
721
|
+
import PATH4 from "path";
|
|
714
722
|
import chalk10 from "chalk";
|
|
723
|
+
function removeFile(filePath, label) {
|
|
724
|
+
if (existsSync4(filePath)) {
|
|
725
|
+
unlinkSync(filePath);
|
|
726
|
+
console.log(chalk10.yellow(` Removed ${label}`));
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
return false;
|
|
730
|
+
}
|
|
731
|
+
function removeDir(dirPath, label) {
|
|
732
|
+
if (existsSync4(dirPath)) {
|
|
733
|
+
rmSync(dirPath, { recursive: true });
|
|
734
|
+
console.log(chalk10.yellow(` Removed ${label}`));
|
|
735
|
+
return true;
|
|
736
|
+
}
|
|
737
|
+
return false;
|
|
738
|
+
}
|
|
739
|
+
function claudeClean() {
|
|
740
|
+
console.log(chalk10.green("Clean Claude configuration"));
|
|
741
|
+
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
742
|
+
let removed = 0;
|
|
743
|
+
const rootFiles = ["CLAUDE.md", "CLAUDE.local.md"];
|
|
744
|
+
for (const file of rootFiles) {
|
|
745
|
+
if (removeFile(PATH4.resolve(cwd5, file), file)) removed++;
|
|
746
|
+
}
|
|
747
|
+
if (removeDir(PATH4.resolve(cwd5, ".claude"), ".claude/")) removed++;
|
|
748
|
+
const packagesDir = PATH4.resolve(cwd5, "packages");
|
|
749
|
+
if (existsSync4(packagesDir)) {
|
|
750
|
+
const findClaudeFiles = (dir, prefix) => {
|
|
751
|
+
const entries = readdirSync2(dir, { withFileTypes: true });
|
|
752
|
+
for (const entry of entries) {
|
|
753
|
+
const fullPath = PATH4.resolve(dir, entry.name);
|
|
754
|
+
const label = `${prefix}${entry.name}`;
|
|
755
|
+
if (entry.isFile() && (entry.name === "CLAUDE.md" || entry.name === "CLAUDE.local.md")) {
|
|
756
|
+
if (removeFile(fullPath, label)) removed++;
|
|
757
|
+
} else if (entry.isDirectory() && entry.name === ".claude") {
|
|
758
|
+
if (removeDir(fullPath, `${label}/`)) removed++;
|
|
759
|
+
} else if (entry.isDirectory() && entry.name !== "node_modules" && entry.name !== "dist") {
|
|
760
|
+
findClaudeFiles(fullPath, `${label}/`);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
};
|
|
764
|
+
findClaudeFiles(packagesDir, "packages/");
|
|
765
|
+
}
|
|
766
|
+
if (removed > 0) {
|
|
767
|
+
console.log(chalk10.green(` Removed ${removed} item(s)`));
|
|
768
|
+
} else {
|
|
769
|
+
console.log(chalk10.gray(" Nothing to clean"));
|
|
770
|
+
}
|
|
771
|
+
return 0;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// src/actions/claude-commands.ts
|
|
775
|
+
import {
|
|
776
|
+
existsSync as existsSync5,
|
|
777
|
+
mkdirSync,
|
|
778
|
+
readdirSync as readdirSync3,
|
|
779
|
+
readFileSync as readFileSync6,
|
|
780
|
+
unlinkSync as unlinkSync2,
|
|
781
|
+
writeFileSync as writeFileSync2
|
|
782
|
+
} from "fs";
|
|
783
|
+
import PATH5 from "path";
|
|
784
|
+
import chalk11 from "chalk";
|
|
715
785
|
var syncCommandFiles = (commandsDir) => {
|
|
716
786
|
const templates = claudeCommandTemplates();
|
|
717
787
|
const templateNames = new Set(Object.keys(templates));
|
|
718
788
|
let updated = 0;
|
|
719
789
|
let created = 0;
|
|
720
|
-
for (const [
|
|
721
|
-
const targetPath =
|
|
722
|
-
const existing =
|
|
790
|
+
for (const [filename2, content] of Object.entries(templates)) {
|
|
791
|
+
const targetPath = PATH5.resolve(commandsDir, filename2);
|
|
792
|
+
const existing = existsSync5(targetPath) ? readFileSync6(targetPath, "utf8") : void 0;
|
|
723
793
|
if (existing === content) continue;
|
|
724
794
|
writeFileSync2(targetPath, content, "utf8");
|
|
725
795
|
if (existing) {
|
|
@@ -735,16 +805,23 @@ var syncCommandFiles = (commandsDir) => {
|
|
|
735
805
|
};
|
|
736
806
|
};
|
|
737
807
|
var removeStaleCommands = (commandsDir, templateNames) => {
|
|
738
|
-
const existingCommands =
|
|
808
|
+
const existingCommands = readdirSync3(commandsDir).filter((f) => f.startsWith(XYLABS_COMMANDS_PREFIX) && f.endsWith(".md"));
|
|
739
809
|
let removed = 0;
|
|
740
810
|
for (const file of existingCommands) {
|
|
741
811
|
if (!templateNames.has(file)) {
|
|
742
|
-
|
|
812
|
+
unlinkSync2(PATH5.resolve(commandsDir, file));
|
|
743
813
|
removed++;
|
|
744
814
|
}
|
|
745
815
|
}
|
|
746
816
|
return removed;
|
|
747
817
|
};
|
|
818
|
+
var removeLegacyCommands = (commandsDir) => {
|
|
819
|
+
const legacyFiles = readdirSync3(commandsDir).filter((f) => f.startsWith(LEGACY_COMMANDS_PREFIX) && f.endsWith(".md"));
|
|
820
|
+
for (const file of legacyFiles) {
|
|
821
|
+
unlinkSync2(PATH5.resolve(commandsDir, file));
|
|
822
|
+
}
|
|
823
|
+
return legacyFiles.length;
|
|
824
|
+
};
|
|
748
825
|
var logCommandsResult = (created, updated, removed) => {
|
|
749
826
|
if (created || updated || removed) {
|
|
750
827
|
const parts = [
|
|
@@ -752,44 +829,46 @@ var logCommandsResult = (created, updated, removed) => {
|
|
|
752
829
|
updated ? `${updated} updated` : "",
|
|
753
830
|
removed ? `${removed} removed` : ""
|
|
754
831
|
].filter(Boolean);
|
|
755
|
-
console.log(
|
|
832
|
+
console.log(chalk11.green(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: ${parts.join(", ")}`));
|
|
756
833
|
} else {
|
|
757
|
-
console.log(
|
|
834
|
+
console.log(chalk11.gray(`.claude/commands/${XYLABS_COMMANDS_PREFIX}*.md: already up to date`));
|
|
758
835
|
}
|
|
759
836
|
};
|
|
760
837
|
var claudeCommands = () => {
|
|
761
838
|
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
762
|
-
const commandsDir =
|
|
839
|
+
const commandsDir = PATH5.resolve(cwd5, ".claude", "commands");
|
|
763
840
|
mkdirSync(commandsDir, { recursive: true });
|
|
841
|
+
const legacy = removeLegacyCommands(commandsDir);
|
|
764
842
|
const {
|
|
765
843
|
created,
|
|
766
844
|
templateNames,
|
|
767
845
|
updated
|
|
768
846
|
} = syncCommandFiles(commandsDir);
|
|
769
847
|
const removed = removeStaleCommands(commandsDir, templateNames);
|
|
770
|
-
logCommandsResult(created, updated, removed);
|
|
848
|
+
logCommandsResult(created, updated, removed + legacy);
|
|
771
849
|
return 0;
|
|
772
850
|
};
|
|
773
851
|
|
|
774
852
|
// src/actions/claude-rules.ts
|
|
853
|
+
import { spawnSync as spawnSync4 } from "child_process";
|
|
775
854
|
import {
|
|
776
|
-
existsSync as
|
|
855
|
+
existsSync as existsSync6,
|
|
777
856
|
mkdirSync as mkdirSync2,
|
|
778
|
-
readdirSync as
|
|
779
|
-
readFileSync as
|
|
780
|
-
unlinkSync as
|
|
857
|
+
readdirSync as readdirSync4,
|
|
858
|
+
readFileSync as readFileSync7,
|
|
859
|
+
unlinkSync as unlinkSync3,
|
|
781
860
|
writeFileSync as writeFileSync3
|
|
782
861
|
} from "fs";
|
|
783
|
-
import
|
|
784
|
-
import
|
|
862
|
+
import PATH6 from "path";
|
|
863
|
+
import chalk12 from "chalk";
|
|
785
864
|
var syncRuleFiles = (rulesDir) => {
|
|
786
865
|
const templates = claudeMdRuleTemplates();
|
|
787
866
|
const templateNames = new Set(Object.keys(templates));
|
|
788
867
|
let updated = 0;
|
|
789
868
|
let created = 0;
|
|
790
|
-
for (const [
|
|
791
|
-
const targetPath =
|
|
792
|
-
const existing =
|
|
869
|
+
for (const [filename2, content] of Object.entries(templates)) {
|
|
870
|
+
const targetPath = PATH6.resolve(rulesDir, filename2);
|
|
871
|
+
const existing = existsSync6(targetPath) ? readFileSync7(targetPath, "utf8") : void 0;
|
|
793
872
|
if (existing === content) continue;
|
|
794
873
|
writeFileSync3(targetPath, content, "utf8");
|
|
795
874
|
if (existing) {
|
|
@@ -805,11 +884,11 @@ var syncRuleFiles = (rulesDir) => {
|
|
|
805
884
|
};
|
|
806
885
|
};
|
|
807
886
|
var removeStaleRules = (rulesDir, templateNames) => {
|
|
808
|
-
const existingRules =
|
|
887
|
+
const existingRules = readdirSync4(rulesDir).filter((f) => f.startsWith(XYLABS_RULES_PREFIX) && f.endsWith(".md"));
|
|
809
888
|
let removed = 0;
|
|
810
889
|
for (const file of existingRules) {
|
|
811
890
|
if (!templateNames.has(file)) {
|
|
812
|
-
|
|
891
|
+
unlinkSync3(PATH6.resolve(rulesDir, file));
|
|
813
892
|
removed++;
|
|
814
893
|
}
|
|
815
894
|
}
|
|
@@ -822,26 +901,44 @@ var logRulesResult = (created, updated, removed) => {
|
|
|
822
901
|
updated ? `${updated} updated` : "",
|
|
823
902
|
removed ? `${removed} removed` : ""
|
|
824
903
|
].filter(Boolean);
|
|
825
|
-
console.log(
|
|
904
|
+
console.log(chalk12.green(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: ${parts.join(", ")}`));
|
|
826
905
|
} else {
|
|
827
|
-
console.log(
|
|
906
|
+
console.log(chalk12.gray(`.claude/rules/${XYLABS_RULES_PREFIX}*.md: already up to date`));
|
|
828
907
|
}
|
|
829
908
|
};
|
|
830
909
|
var ensureProjectClaudeMd = (cwd5, force) => {
|
|
831
|
-
const projectPath =
|
|
832
|
-
if (!
|
|
833
|
-
if (force &&
|
|
834
|
-
console.log(
|
|
910
|
+
const projectPath = PATH6.resolve(cwd5, "CLAUDE.md");
|
|
911
|
+
if (!existsSync6(projectPath) || force) {
|
|
912
|
+
if (force && existsSync6(projectPath)) {
|
|
913
|
+
console.log(chalk12.yellow("Regenerating CLAUDE.md"));
|
|
914
|
+
}
|
|
915
|
+
console.log(chalk12.green("Generating CLAUDE.md via claude /init..."));
|
|
916
|
+
const result = spawnSync4("claude", ["-p", "/init", "--allowedTools", "Read", "Write", "Glob", "Grep"], {
|
|
917
|
+
cwd: cwd5,
|
|
918
|
+
shell: true,
|
|
919
|
+
stdio: "inherit"
|
|
920
|
+
});
|
|
921
|
+
if (result.status !== 0) {
|
|
922
|
+
console.error(chalk12.red("claude /init failed \u2014 is Claude Code installed?"));
|
|
923
|
+
return 1;
|
|
835
924
|
}
|
|
836
|
-
writeFileSync3(projectPath, claudeMdProjectTemplate(), "utf8");
|
|
837
|
-
console.log(chalk11.green("Generated CLAUDE.md"));
|
|
838
925
|
} else {
|
|
839
|
-
console.log(
|
|
926
|
+
console.log(chalk12.gray("CLAUDE.md already exists (skipped, use --force to regenerate)"));
|
|
927
|
+
}
|
|
928
|
+
return 0;
|
|
929
|
+
};
|
|
930
|
+
var ensureLocalClaudeMd = (cwd5) => {
|
|
931
|
+
const localPath = PATH6.resolve(cwd5, "CLAUDE.local.md");
|
|
932
|
+
if (existsSync6(localPath)) {
|
|
933
|
+
console.log(chalk12.gray("CLAUDE.local.md already exists (skipped)"));
|
|
934
|
+
} else {
|
|
935
|
+
writeFileSync3(localPath, claudeMdLocalTemplate(), "utf8");
|
|
936
|
+
console.log(chalk12.green("Generated CLAUDE.local.md"));
|
|
840
937
|
}
|
|
841
938
|
};
|
|
842
939
|
var claudeRules = ({ force } = {}) => {
|
|
843
940
|
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
844
|
-
const rulesDir =
|
|
941
|
+
const rulesDir = PATH6.resolve(cwd5, ".claude", "rules");
|
|
845
942
|
mkdirSync2(rulesDir, { recursive: true });
|
|
846
943
|
const {
|
|
847
944
|
created,
|
|
@@ -850,19 +947,20 @@ var claudeRules = ({ force } = {}) => {
|
|
|
850
947
|
} = syncRuleFiles(rulesDir);
|
|
851
948
|
const removed = removeStaleRules(rulesDir, templateNames);
|
|
852
949
|
logRulesResult(created, updated, removed);
|
|
853
|
-
ensureProjectClaudeMd(cwd5, force);
|
|
854
|
-
|
|
950
|
+
const claudeMdResult = ensureProjectClaudeMd(cwd5, force);
|
|
951
|
+
ensureLocalClaudeMd(cwd5);
|
|
952
|
+
return claudeMdResult ?? 0;
|
|
855
953
|
};
|
|
856
954
|
|
|
857
955
|
// src/actions/claude-settings.ts
|
|
858
956
|
import {
|
|
859
|
-
existsSync as
|
|
957
|
+
existsSync as existsSync7,
|
|
860
958
|
mkdirSync as mkdirSync3,
|
|
861
959
|
writeFileSync as writeFileSync4
|
|
862
960
|
} from "fs";
|
|
863
|
-
import
|
|
961
|
+
import PATH7 from "path";
|
|
864
962
|
import { createInterface as createInterface2 } from "readline";
|
|
865
|
-
import
|
|
963
|
+
import chalk13 from "chalk";
|
|
866
964
|
var DEFAULT_SETTINGS = {
|
|
867
965
|
permissions: {
|
|
868
966
|
allow: [
|
|
@@ -907,48 +1005,48 @@ function askConfirmation2(question) {
|
|
|
907
1005
|
}
|
|
908
1006
|
async function claudeSettings() {
|
|
909
1007
|
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
910
|
-
const claudeDir =
|
|
911
|
-
const settingsPath =
|
|
1008
|
+
const claudeDir = PATH7.resolve(cwd5, ".claude");
|
|
1009
|
+
const settingsPath = PATH7.resolve(claudeDir, "settings.local.json");
|
|
912
1010
|
mkdirSync3(claudeDir, { recursive: true });
|
|
913
|
-
if (
|
|
1011
|
+
if (existsSync7(settingsPath)) {
|
|
914
1012
|
const confirmed = await askConfirmation2(
|
|
915
|
-
|
|
1013
|
+
chalk13.yellow(`${settingsPath} already exists. Replace it? (y/N) `)
|
|
916
1014
|
);
|
|
917
1015
|
if (!confirmed) {
|
|
918
|
-
console.log(
|
|
1016
|
+
console.log(chalk13.gray("Skipped \u2014 existing settings.local.json preserved"));
|
|
919
1017
|
return 0;
|
|
920
1018
|
}
|
|
921
1019
|
}
|
|
922
1020
|
writeFileSync4(settingsPath, `${JSON.stringify(DEFAULT_SETTINGS, null, 2)}
|
|
923
1021
|
`, "utf8");
|
|
924
|
-
console.log(
|
|
1022
|
+
console.log(chalk13.green("Generated .claude/settings.local.json"));
|
|
925
1023
|
return 0;
|
|
926
1024
|
}
|
|
927
1025
|
|
|
928
1026
|
// src/actions/claude-skills.ts
|
|
929
1027
|
import {
|
|
930
|
-
existsSync as
|
|
1028
|
+
existsSync as existsSync8,
|
|
931
1029
|
mkdirSync as mkdirSync4,
|
|
932
|
-
readdirSync as
|
|
933
|
-
readFileSync as
|
|
934
|
-
rmSync,
|
|
1030
|
+
readdirSync as readdirSync5,
|
|
1031
|
+
readFileSync as readFileSync8,
|
|
1032
|
+
rmSync as rmSync2,
|
|
935
1033
|
statSync as statSync2,
|
|
936
1034
|
writeFileSync as writeFileSync5
|
|
937
1035
|
} from "fs";
|
|
938
|
-
import
|
|
939
|
-
import
|
|
1036
|
+
import PATH8 from "path";
|
|
1037
|
+
import chalk14 from "chalk";
|
|
940
1038
|
var syncSkillFiles = (skillsDir) => {
|
|
941
1039
|
const templates = claudeSkillTemplates();
|
|
942
1040
|
const templateNames = new Set(Object.keys(templates));
|
|
943
1041
|
let updated = 0;
|
|
944
1042
|
let created = 0;
|
|
945
1043
|
for (const [skillName, files] of Object.entries(templates)) {
|
|
946
|
-
const skillDir =
|
|
1044
|
+
const skillDir = PATH8.resolve(skillsDir, skillName);
|
|
947
1045
|
mkdirSync4(skillDir, { recursive: true });
|
|
948
|
-
for (const [
|
|
949
|
-
const targetPath =
|
|
950
|
-
mkdirSync4(
|
|
951
|
-
const existing =
|
|
1046
|
+
for (const [filename2, content] of Object.entries(files)) {
|
|
1047
|
+
const targetPath = PATH8.resolve(skillDir, filename2);
|
|
1048
|
+
mkdirSync4(PATH8.dirname(targetPath), { recursive: true });
|
|
1049
|
+
const existing = existsSync8(targetPath) ? readFileSync8(targetPath, "utf8") : void 0;
|
|
952
1050
|
if (existing === content) continue;
|
|
953
1051
|
writeFileSync5(targetPath, content, "utf8");
|
|
954
1052
|
if (existing) {
|
|
@@ -965,13 +1063,13 @@ var syncSkillFiles = (skillsDir) => {
|
|
|
965
1063
|
};
|
|
966
1064
|
};
|
|
967
1065
|
var removeStaleSkills = (skillsDir, templateNames) => {
|
|
968
|
-
const existingSkills =
|
|
969
|
-
(f) => f.startsWith(XYLABS_SKILLS_PREFIX) && statSync2(
|
|
1066
|
+
const existingSkills = readdirSync5(skillsDir).filter(
|
|
1067
|
+
(f) => f.startsWith(XYLABS_SKILLS_PREFIX) && statSync2(PATH8.resolve(skillsDir, f)).isDirectory()
|
|
970
1068
|
);
|
|
971
1069
|
let removed = 0;
|
|
972
1070
|
for (const dir of existingSkills) {
|
|
973
1071
|
if (!templateNames.has(dir)) {
|
|
974
|
-
|
|
1072
|
+
rmSync2(PATH8.resolve(skillsDir, dir), { recursive: true });
|
|
975
1073
|
removed++;
|
|
976
1074
|
}
|
|
977
1075
|
}
|
|
@@ -984,14 +1082,14 @@ var logSkillsResult = (created, updated, removed) => {
|
|
|
984
1082
|
updated ? `${updated} updated` : "",
|
|
985
1083
|
removed ? `${removed} removed` : ""
|
|
986
1084
|
].filter(Boolean);
|
|
987
|
-
console.log(
|
|
1085
|
+
console.log(chalk14.green(`.claude/skills/${XYLABS_SKILLS_PREFIX}*/: ${parts.join(", ")}`));
|
|
988
1086
|
} else {
|
|
989
|
-
console.log(
|
|
1087
|
+
console.log(chalk14.gray(`.claude/skills/${XYLABS_SKILLS_PREFIX}*/: already up to date`));
|
|
990
1088
|
}
|
|
991
1089
|
};
|
|
992
1090
|
var claudeSkills = () => {
|
|
993
1091
|
const cwd5 = INIT_CWD() ?? process.cwd();
|
|
994
|
-
const skillsDir =
|
|
1092
|
+
const skillsDir = PATH8.resolve(cwd5, ".claude", "skills");
|
|
995
1093
|
mkdirSync4(skillsDir, { recursive: true });
|
|
996
1094
|
const {
|
|
997
1095
|
created,
|
|
@@ -1017,16 +1115,16 @@ var cleanAll = ({ verbose }) => {
|
|
|
1017
1115
|
|
|
1018
1116
|
// src/actions/clean-docs.ts
|
|
1019
1117
|
import path from "path";
|
|
1020
|
-
import
|
|
1118
|
+
import chalk15 from "chalk";
|
|
1021
1119
|
var cleanDocs = () => {
|
|
1022
1120
|
const pkgName = process.env.npm_package_name;
|
|
1023
|
-
console.log(
|
|
1121
|
+
console.log(chalk15.green(`Cleaning Docs [${pkgName}]`));
|
|
1024
1122
|
for (const { location } of yarnWorkspaces()) deleteGlob(path.join(location, "docs"));
|
|
1025
1123
|
return 0;
|
|
1026
1124
|
};
|
|
1027
1125
|
|
|
1028
1126
|
// src/actions/compile.ts
|
|
1029
|
-
import
|
|
1127
|
+
import chalk16 from "chalk";
|
|
1030
1128
|
var compile = ({
|
|
1031
1129
|
verbose,
|
|
1032
1130
|
target,
|
|
@@ -1067,7 +1165,7 @@ var compileAll = ({
|
|
|
1067
1165
|
const incrementalOptions = incremental ? ["--since", "-Ap", "--topological-dev"] : ["--parallel", "-Ap", "--topological-dev"];
|
|
1068
1166
|
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
1069
1167
|
if (jobs) {
|
|
1070
|
-
console.log(
|
|
1168
|
+
console.log(chalk16.blue(`Jobs set to [${jobs}]`));
|
|
1071
1169
|
}
|
|
1072
1170
|
const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1073
1171
|
["yarn", [
|
|
@@ -1081,13 +1179,13 @@ var compileAll = ({
|
|
|
1081
1179
|
...targetOptions
|
|
1082
1180
|
]]
|
|
1083
1181
|
]);
|
|
1084
|
-
console.log(`${
|
|
1182
|
+
console.log(`${chalk16.gray("Compiled in")} [${chalk16.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk16.gray("seconds")}`);
|
|
1085
1183
|
return result;
|
|
1086
1184
|
};
|
|
1087
1185
|
|
|
1088
1186
|
// src/actions/copy-assets.ts
|
|
1089
1187
|
import path2 from "path/posix";
|
|
1090
|
-
import
|
|
1188
|
+
import chalk17 from "chalk";
|
|
1091
1189
|
import cpy from "cpy";
|
|
1092
1190
|
var copyPackageTargetAssets = async (target, name, location) => {
|
|
1093
1191
|
try {
|
|
@@ -1110,7 +1208,7 @@ var copyPackageTargetAssets = async (target, name, location) => {
|
|
|
1110
1208
|
};
|
|
1111
1209
|
var copyTargetAssets = async (target, pkg) => {
|
|
1112
1210
|
const workspaces = yarnWorkspaces();
|
|
1113
|
-
console.log(
|
|
1211
|
+
console.log(chalk17.green(`Copying Assets [${target.toUpperCase()}]`));
|
|
1114
1212
|
const workspaceList = workspaces.filter(({ name }) => {
|
|
1115
1213
|
return pkg === void 0 || name === pkg;
|
|
1116
1214
|
});
|
|
@@ -1194,7 +1292,7 @@ var dead = () => {
|
|
|
1194
1292
|
};
|
|
1195
1293
|
|
|
1196
1294
|
// src/actions/deplint/deplint.ts
|
|
1197
|
-
import
|
|
1295
|
+
import chalk23 from "chalk";
|
|
1198
1296
|
|
|
1199
1297
|
// src/actions/deplint/findFiles.ts
|
|
1200
1298
|
import fs2 from "fs";
|
|
@@ -1399,7 +1497,7 @@ function getExternalImportsFromFiles({
|
|
|
1399
1497
|
|
|
1400
1498
|
// src/actions/deplint/checkPackage/getUnlistedDependencies.ts
|
|
1401
1499
|
import { builtinModules } from "module";
|
|
1402
|
-
import
|
|
1500
|
+
import chalk18 from "chalk";
|
|
1403
1501
|
function isRuntimeImportListed(imp, name, dependencies, peerDependencies) {
|
|
1404
1502
|
return dependencies.includes(imp) || imp === name || peerDependencies.includes(imp) || builtinModules.includes(imp);
|
|
1405
1503
|
}
|
|
@@ -1407,7 +1505,7 @@ function isTypeImportListed(imp, name, dependencies, devDependencies, peerDepend
|
|
|
1407
1505
|
return dependencies.includes(imp) || imp === name || dependencies.includes(`@types/${imp}`) || peerDependencies.includes(imp) || peerDependencies.includes(`@types/${imp}`) || devDependencies.includes(`@types/${imp}`) || builtinModules.includes(imp);
|
|
1408
1506
|
}
|
|
1409
1507
|
function logMissing(name, imp, importPaths) {
|
|
1410
|
-
console.log(`[${
|
|
1508
|
+
console.log(`[${chalk18.blue(name)}] Missing dependency in package.json: ${chalk18.red(imp)}`);
|
|
1411
1509
|
if (importPaths[imp]) {
|
|
1412
1510
|
console.log(` ${importPaths[imp].join("\n ")}`);
|
|
1413
1511
|
}
|
|
@@ -1436,7 +1534,7 @@ function getUnlistedDependencies({ name, location }, {
|
|
|
1436
1534
|
}
|
|
1437
1535
|
if (unlistedDependencies > 0) {
|
|
1438
1536
|
const packageLocation = `${location}/package.json`;
|
|
1439
|
-
console.log(` ${
|
|
1537
|
+
console.log(` ${chalk18.yellow(packageLocation)}
|
|
1440
1538
|
`);
|
|
1441
1539
|
}
|
|
1442
1540
|
return unlistedDependencies;
|
|
@@ -1444,7 +1542,7 @@ function getUnlistedDependencies({ name, location }, {
|
|
|
1444
1542
|
|
|
1445
1543
|
// src/actions/deplint/checkPackage/getUnlistedDevDependencies.ts
|
|
1446
1544
|
import { builtinModules as builtinModules2 } from "module";
|
|
1447
|
-
import
|
|
1545
|
+
import chalk19 from "chalk";
|
|
1448
1546
|
function getUnlistedDevDependencies({ name, location }, {
|
|
1449
1547
|
devDependencies,
|
|
1450
1548
|
dependencies,
|
|
@@ -1458,7 +1556,7 @@ function getUnlistedDevDependencies({ name, location }, {
|
|
|
1458
1556
|
for (const imp of externalAllImports) {
|
|
1459
1557
|
if (!distImports.includes(imp) && imp !== name && !dependencies.includes(imp) && !dependencies.includes(`@types/${imp}`) && !peerDependencies.includes(imp) && !peerDependencies.includes(`@types/${imp}`) && !devDependencies.includes(imp) && !devDependencies.includes(`@types/${imp}`) && !builtinModules2.includes(imp)) {
|
|
1460
1558
|
unlistedDevDependencies++;
|
|
1461
|
-
console.log(`[${
|
|
1559
|
+
console.log(`[${chalk19.blue(name)}] Missing devDependency in package.json: ${chalk19.red(imp)}`);
|
|
1462
1560
|
if (allImportPaths[imp]) {
|
|
1463
1561
|
console.log(` ${allImportPaths[imp].join("\n ")}`);
|
|
1464
1562
|
}
|
|
@@ -1466,14 +1564,14 @@ function getUnlistedDevDependencies({ name, location }, {
|
|
|
1466
1564
|
}
|
|
1467
1565
|
if (unlistedDevDependencies > 0) {
|
|
1468
1566
|
const packageLocation = `${location}/package.json`;
|
|
1469
|
-
console.log(` ${
|
|
1567
|
+
console.log(` ${chalk19.yellow(packageLocation)}
|
|
1470
1568
|
`);
|
|
1471
1569
|
}
|
|
1472
1570
|
return unlistedDevDependencies;
|
|
1473
1571
|
}
|
|
1474
1572
|
|
|
1475
1573
|
// src/actions/deplint/checkPackage/getUnusedDependencies.ts
|
|
1476
|
-
import
|
|
1574
|
+
import chalk20 from "chalk";
|
|
1477
1575
|
function getUnusedDependencies({ name, location }, { dependencies }, {
|
|
1478
1576
|
externalDistImports,
|
|
1479
1577
|
externalDistTypeImports,
|
|
@@ -1485,22 +1583,22 @@ function getUnusedDependencies({ name, location }, { dependencies }, {
|
|
|
1485
1583
|
if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
|
|
1486
1584
|
unusedDependencies++;
|
|
1487
1585
|
if (externalAllImports.includes(dep)) {
|
|
1488
|
-
console.log(`[${
|
|
1586
|
+
console.log(`[${chalk20.blue(name)}] dependency should be devDependency in package.json: ${chalk20.red(dep)}`);
|
|
1489
1587
|
} else {
|
|
1490
|
-
console.log(`[${
|
|
1588
|
+
console.log(`[${chalk20.blue(name)}] Unused dependency in package.json: ${chalk20.red(dep)}`);
|
|
1491
1589
|
}
|
|
1492
1590
|
}
|
|
1493
1591
|
}
|
|
1494
1592
|
if (unusedDependencies > 0) {
|
|
1495
1593
|
const packageLocation = `${location}/package.json`;
|
|
1496
|
-
console.log(` ${
|
|
1594
|
+
console.log(` ${chalk20.yellow(packageLocation)}
|
|
1497
1595
|
`);
|
|
1498
1596
|
}
|
|
1499
1597
|
return unusedDependencies;
|
|
1500
1598
|
}
|
|
1501
1599
|
|
|
1502
1600
|
// src/actions/deplint/checkPackage/getUnusedDevDependencies.ts
|
|
1503
|
-
import
|
|
1601
|
+
import chalk21 from "chalk";
|
|
1504
1602
|
|
|
1505
1603
|
// src/actions/deplint/getCliReferencedPackagesFromFiles.ts
|
|
1506
1604
|
import fs8 from "fs";
|
|
@@ -1784,19 +1882,19 @@ function getUnusedDevDependencies({ name, location }, {
|
|
|
1784
1882
|
if (dependencies.includes(dep) || peerDependencies.includes(dep)) continue;
|
|
1785
1883
|
if (!isDevDepUsed(dep, allImports, implicitDeps, requiredPeers, scriptRefs, cliRefs)) {
|
|
1786
1884
|
unusedDevDependencies++;
|
|
1787
|
-
console.log(`[${
|
|
1885
|
+
console.log(`[${chalk21.blue(name)}] Unused devDependency in package.json: ${chalk21.red(dep)}`);
|
|
1788
1886
|
}
|
|
1789
1887
|
}
|
|
1790
1888
|
if (unusedDevDependencies > 0) {
|
|
1791
1889
|
const packageLocation = `${location}/package.json`;
|
|
1792
|
-
console.log(` ${
|
|
1890
|
+
console.log(` ${chalk21.yellow(packageLocation)}
|
|
1793
1891
|
`);
|
|
1794
1892
|
}
|
|
1795
1893
|
return unusedDevDependencies;
|
|
1796
1894
|
}
|
|
1797
1895
|
|
|
1798
1896
|
// src/actions/deplint/checkPackage/getUnusedPeerDependencies.ts
|
|
1799
|
-
import
|
|
1897
|
+
import chalk22 from "chalk";
|
|
1800
1898
|
function getUnusedPeerDependencies({ name, location }, { peerDependencies, dependencies }, { externalDistImports, externalDistTypeImports }, exclude) {
|
|
1801
1899
|
let unusedDependencies = 0;
|
|
1802
1900
|
for (const dep of peerDependencies) {
|
|
@@ -1804,15 +1902,15 @@ function getUnusedPeerDependencies({ name, location }, { peerDependencies, depen
|
|
|
1804
1902
|
if (!externalDistImports.includes(dep) && !externalDistImports.includes(dep.replace(/^@types\//, "")) && !externalDistTypeImports.includes(dep) && !externalDistTypeImports.includes(dep.replace(/^@types\//, ""))) {
|
|
1805
1903
|
unusedDependencies++;
|
|
1806
1904
|
if (dependencies.includes(dep)) {
|
|
1807
|
-
console.log(`[${
|
|
1905
|
+
console.log(`[${chalk22.blue(name)}] Unused peerDependency [already a dependency] in package.json: ${chalk22.red(dep)}`);
|
|
1808
1906
|
} else {
|
|
1809
|
-
console.log(`[${
|
|
1907
|
+
console.log(`[${chalk22.blue(name)}] Unused peerDependency in package.json: ${chalk22.red(dep)}`);
|
|
1810
1908
|
}
|
|
1811
1909
|
}
|
|
1812
1910
|
}
|
|
1813
1911
|
if (unusedDependencies > 0) {
|
|
1814
1912
|
const packageLocation = `${location}/package.json`;
|
|
1815
|
-
console.log(` ${
|
|
1913
|
+
console.log(` ${chalk22.yellow(packageLocation)}
|
|
1816
1914
|
`);
|
|
1817
1915
|
}
|
|
1818
1916
|
return unusedDependencies;
|
|
@@ -1907,19 +2005,19 @@ var deplint = async ({
|
|
|
1907
2005
|
});
|
|
1908
2006
|
}
|
|
1909
2007
|
if (totalErrors > 0) {
|
|
1910
|
-
console.warn(`Deplint: Found ${
|
|
2008
|
+
console.warn(`Deplint: Found ${chalk23.red(totalErrors)} dependency problems. ${chalk23.red("\u2716")}`);
|
|
1911
2009
|
} else {
|
|
1912
|
-
console.info(`Deplint: Found no dependency problems. ${
|
|
2010
|
+
console.info(`Deplint: Found no dependency problems. ${chalk23.green("\u2714")}`);
|
|
1913
2011
|
}
|
|
1914
2012
|
return 0;
|
|
1915
2013
|
};
|
|
1916
2014
|
|
|
1917
2015
|
// src/actions/deploy.ts
|
|
1918
|
-
import { readFileSync as
|
|
2016
|
+
import { readFileSync as readFileSync9 } from "fs";
|
|
1919
2017
|
var privatePackageExcludeList = () => {
|
|
1920
2018
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1921
2019
|
workspace,
|
|
1922
|
-
JSON.parse(
|
|
2020
|
+
JSON.parse(readFileSync9(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1923
2021
|
]);
|
|
1924
2022
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1925
2023
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1939,11 +2037,11 @@ var deploy = () => {
|
|
|
1939
2037
|
};
|
|
1940
2038
|
|
|
1941
2039
|
// src/actions/deploy-major.ts
|
|
1942
|
-
import { readFileSync as
|
|
2040
|
+
import { readFileSync as readFileSync10 } from "fs";
|
|
1943
2041
|
var privatePackageExcludeList2 = () => {
|
|
1944
2042
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1945
2043
|
workspace,
|
|
1946
|
-
JSON.parse(
|
|
2044
|
+
JSON.parse(readFileSync10(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1947
2045
|
]);
|
|
1948
2046
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1949
2047
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1963,11 +2061,11 @@ var deployMajor = () => {
|
|
|
1963
2061
|
};
|
|
1964
2062
|
|
|
1965
2063
|
// src/actions/deploy-minor.ts
|
|
1966
|
-
import { readFileSync as
|
|
2064
|
+
import { readFileSync as readFileSync11 } from "fs";
|
|
1967
2065
|
var privatePackageExcludeList3 = () => {
|
|
1968
2066
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1969
2067
|
workspace,
|
|
1970
|
-
JSON.parse(
|
|
2068
|
+
JSON.parse(readFileSync11(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1971
2069
|
]);
|
|
1972
2070
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1973
2071
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -1987,11 +2085,11 @@ var deployMinor = () => {
|
|
|
1987
2085
|
};
|
|
1988
2086
|
|
|
1989
2087
|
// src/actions/deploy-next.ts
|
|
1990
|
-
import { readFileSync as
|
|
2088
|
+
import { readFileSync as readFileSync12 } from "fs";
|
|
1991
2089
|
var privatePackageExcludeList4 = () => {
|
|
1992
2090
|
const possibleDeployablePackages = yarnWorkspaces().map((workspace) => [
|
|
1993
2091
|
workspace,
|
|
1994
|
-
JSON.parse(
|
|
2092
|
+
JSON.parse(readFileSync12(`${workspace.location}/package.json`, { encoding: "utf8" }))
|
|
1995
2093
|
]);
|
|
1996
2094
|
const privatePackages = possibleDeployablePackages.filter(([_, pkg]) => pkg.private).map(([workspace]) => workspace);
|
|
1997
2095
|
const excludeList = privatePackages.map((workspace) => `--exclude ${workspace.name}`);
|
|
@@ -2011,22 +2109,23 @@ var deployNext = () => {
|
|
|
2011
2109
|
};
|
|
2012
2110
|
|
|
2013
2111
|
// src/actions/dupdeps.ts
|
|
2014
|
-
import
|
|
2112
|
+
import chalk24 from "chalk";
|
|
2015
2113
|
var dupdeps = () => {
|
|
2016
|
-
console.log(
|
|
2017
|
-
const
|
|
2018
|
-
const
|
|
2114
|
+
console.log(chalk24.green("Checking all Dependencies for Duplicates"));
|
|
2115
|
+
const pkg = parsedPackageJSON();
|
|
2116
|
+
const allDependencies = { ...pkg?.dependencies, ...pkg?.devDependencies };
|
|
2117
|
+
const dependencies = Object.keys(allDependencies);
|
|
2019
2118
|
return detectDuplicateDependencies(dependencies);
|
|
2020
2119
|
};
|
|
2021
2120
|
|
|
2022
2121
|
// src/actions/lint.ts
|
|
2023
|
-
import
|
|
2122
|
+
import chalk25 from "chalk";
|
|
2024
2123
|
var lintPackage = ({
|
|
2025
2124
|
pkg,
|
|
2026
2125
|
fix: fix2,
|
|
2027
2126
|
verbose
|
|
2028
2127
|
}) => {
|
|
2029
|
-
console.log(
|
|
2128
|
+
console.log(chalk25.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
2030
2129
|
const start = Date.now();
|
|
2031
2130
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
2032
2131
|
["yarn", [
|
|
@@ -2036,7 +2135,7 @@ var lintPackage = ({
|
|
|
2036
2135
|
fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
|
|
2037
2136
|
]]
|
|
2038
2137
|
]);
|
|
2039
|
-
console.log(
|
|
2138
|
+
console.log(chalk25.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk25.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk25.gray("seconds")}`));
|
|
2040
2139
|
return result;
|
|
2041
2140
|
};
|
|
2042
2141
|
var lint = ({
|
|
@@ -2056,13 +2155,13 @@ var lint = ({
|
|
|
2056
2155
|
});
|
|
2057
2156
|
};
|
|
2058
2157
|
var lintAllPackages = ({ fix: fix2 = false } = {}) => {
|
|
2059
|
-
console.log(
|
|
2158
|
+
console.log(chalk25.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
2060
2159
|
const start = Date.now();
|
|
2061
2160
|
const fixOptions = fix2 ? ["--fix"] : [];
|
|
2062
2161
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
2063
2162
|
["yarn", ["eslint", "--cache", "--cache-location", ".eslintcache", "--cache-strategy", "content", ...fixOptions]]
|
|
2064
2163
|
]);
|
|
2065
|
-
console.log(
|
|
2164
|
+
console.log(chalk25.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk25.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk25.gray("seconds")}`));
|
|
2066
2165
|
return result;
|
|
2067
2166
|
};
|
|
2068
2167
|
|
|
@@ -2085,12 +2184,97 @@ var genDocsAll = ({ incremental }) => {
|
|
|
2085
2184
|
return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [...steps]);
|
|
2086
2185
|
};
|
|
2087
2186
|
|
|
2088
|
-
// src/actions/gitignore
|
|
2089
|
-
|
|
2090
|
-
|
|
2187
|
+
// src/actions/gitignore.ts
|
|
2188
|
+
import { unlinkSync as unlinkSync4 } from "fs";
|
|
2189
|
+
import chalk26 from "chalk";
|
|
2190
|
+
var COMMENT_PREFIX = "#";
|
|
2191
|
+
var isComment = (line) => line.startsWith(COMMENT_PREFIX);
|
|
2192
|
+
var isNegation = (line) => line.startsWith("!");
|
|
2193
|
+
function parseTemplateSections(lines) {
|
|
2194
|
+
const sections = [];
|
|
2195
|
+
let current = [];
|
|
2196
|
+
for (const line of lines) {
|
|
2197
|
+
if (isComment(line)) {
|
|
2198
|
+
if (current.length > 0) {
|
|
2199
|
+
sections.push(current);
|
|
2200
|
+
}
|
|
2201
|
+
current = [line];
|
|
2202
|
+
} else {
|
|
2203
|
+
current.push(line);
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
if (current.length > 0) {
|
|
2207
|
+
sections.push(current);
|
|
2208
|
+
}
|
|
2209
|
+
return sections;
|
|
2210
|
+
}
|
|
2211
|
+
function mergeWithTemplate(existing, templateContent) {
|
|
2212
|
+
const templateLines = templateContent.split("\n").filter((line) => line.trim().length > 0);
|
|
2213
|
+
const sections = parseTemplateSections(templateLines);
|
|
2214
|
+
const existingEntries = new Set(existing.filter((line) => !isComment(line)));
|
|
2215
|
+
const templateEntries = new Set(templateLines.filter((line) => !isComment(line)));
|
|
2216
|
+
const customEntries = [...existingEntries].filter((entry) => !templateEntries.has(entry));
|
|
2217
|
+
const result = [];
|
|
2218
|
+
for (const section of sections) {
|
|
2219
|
+
for (const line of section) {
|
|
2220
|
+
result.push(line);
|
|
2221
|
+
}
|
|
2222
|
+
result.push("");
|
|
2223
|
+
}
|
|
2224
|
+
if (customEntries.length > 0) {
|
|
2225
|
+
result.push("# Custom");
|
|
2226
|
+
const sorted = [...union(customEntries, [])].toSorted((a, b) => {
|
|
2227
|
+
if (isNegation(a) && !isNegation(b)) return 1;
|
|
2228
|
+
if (!isNegation(a) && isNegation(b)) return -1;
|
|
2229
|
+
return a.localeCompare(b);
|
|
2230
|
+
});
|
|
2231
|
+
for (const entry of sorted) {
|
|
2232
|
+
result.push(entry);
|
|
2233
|
+
}
|
|
2234
|
+
result.push("");
|
|
2235
|
+
}
|
|
2236
|
+
return result;
|
|
2237
|
+
}
|
|
2238
|
+
function removePackageGitignores(cwd5) {
|
|
2239
|
+
let removed = 0;
|
|
2240
|
+
const workspaces = yarnWorkspaces();
|
|
2241
|
+
for (const { location } of workspaces) {
|
|
2242
|
+
if (location === ".") continue;
|
|
2243
|
+
const filePath = `${cwd5}/${location}/.gitignore`;
|
|
2244
|
+
try {
|
|
2245
|
+
unlinkSync4(filePath);
|
|
2246
|
+
console.log(chalk26.yellow(` Removed ${location}/.gitignore`));
|
|
2247
|
+
removed++;
|
|
2248
|
+
} catch {
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
return removed;
|
|
2252
|
+
}
|
|
2253
|
+
var gitignoreGen = gitignore;
|
|
2254
|
+
function gitignore() {
|
|
2255
|
+
console.log(chalk26.green("Generate .gitignore"));
|
|
2256
|
+
const cwd5 = INIT_CWD() ?? ".";
|
|
2257
|
+
const gitignorePath = `${cwd5}/.gitignore`;
|
|
2258
|
+
try {
|
|
2259
|
+
const templateContent = gitignoreTemplate();
|
|
2260
|
+
const existing = readNonEmptyLines(gitignorePath);
|
|
2261
|
+
const merged = mergeWithTemplate(existing, templateContent);
|
|
2262
|
+
writeLines(gitignorePath, merged);
|
|
2263
|
+
console.log(chalk26.green(" Root .gitignore updated"));
|
|
2264
|
+
const removed = removePackageGitignores(cwd5);
|
|
2265
|
+
if (removed > 0) {
|
|
2266
|
+
console.log(chalk26.green(` Removed ${removed} package .gitignore file(s)`));
|
|
2267
|
+
}
|
|
2268
|
+
return 0;
|
|
2269
|
+
} catch (ex) {
|
|
2270
|
+
const error = ex;
|
|
2271
|
+
console.error(chalk26.red(`Generate .gitignore failed: ${error.message}`));
|
|
2272
|
+
return 1;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2091
2275
|
|
|
2092
2276
|
// src/actions/gitlint.ts
|
|
2093
|
-
import
|
|
2277
|
+
import chalk27 from "chalk";
|
|
2094
2278
|
import ParseGitConfig from "parse-git-config";
|
|
2095
2279
|
var gitlint = () => {
|
|
2096
2280
|
console.log(`
|
|
@@ -2101,7 +2285,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
2101
2285
|
const errors = 0;
|
|
2102
2286
|
const gitConfig = ParseGitConfig.sync();
|
|
2103
2287
|
const warn = (message) => {
|
|
2104
|
-
console.warn(
|
|
2288
|
+
console.warn(chalk27.yellow(`Warning: ${message}`));
|
|
2105
2289
|
warnings++;
|
|
2106
2290
|
};
|
|
2107
2291
|
if (gitConfig.core.ignorecase) {
|
|
@@ -2121,13 +2305,13 @@ Gitlint Start [${process.cwd()}]
|
|
|
2121
2305
|
}
|
|
2122
2306
|
const resultMessages = [];
|
|
2123
2307
|
if (valid > 0) {
|
|
2124
|
-
resultMessages.push(
|
|
2308
|
+
resultMessages.push(chalk27.green(`Passed: ${valid}`));
|
|
2125
2309
|
}
|
|
2126
2310
|
if (warnings > 0) {
|
|
2127
|
-
resultMessages.push(
|
|
2311
|
+
resultMessages.push(chalk27.yellow(`Warnings: ${warnings}`));
|
|
2128
2312
|
}
|
|
2129
2313
|
if (errors > 0) {
|
|
2130
|
-
resultMessages.push(
|
|
2314
|
+
resultMessages.push(chalk27.red(` Errors: ${errors}`));
|
|
2131
2315
|
}
|
|
2132
2316
|
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
2133
2317
|
`);
|
|
@@ -2136,7 +2320,7 @@ Gitlint Start [${process.cwd()}]
|
|
|
2136
2320
|
|
|
2137
2321
|
// src/actions/gitlint-fix.ts
|
|
2138
2322
|
import { execSync as execSync3 } from "child_process";
|
|
2139
|
-
import
|
|
2323
|
+
import chalk28 from "chalk";
|
|
2140
2324
|
import ParseGitConfig2 from "parse-git-config";
|
|
2141
2325
|
var gitlintFix = () => {
|
|
2142
2326
|
console.log(`
|
|
@@ -2145,15 +2329,15 @@ Gitlint Fix Start [${process.cwd()}]
|
|
|
2145
2329
|
const gitConfig = ParseGitConfig2.sync();
|
|
2146
2330
|
if (gitConfig.core.ignorecase) {
|
|
2147
2331
|
execSync3("git config core.ignorecase false", { stdio: "inherit" });
|
|
2148
|
-
console.warn(
|
|
2332
|
+
console.warn(chalk28.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
2149
2333
|
}
|
|
2150
2334
|
if (gitConfig.core.autocrlf !== false) {
|
|
2151
2335
|
execSync3("git config core.autocrlf false", { stdio: "inherit" });
|
|
2152
|
-
console.warn(
|
|
2336
|
+
console.warn(chalk28.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
2153
2337
|
}
|
|
2154
2338
|
if (gitConfig.core.eol !== "lf") {
|
|
2155
2339
|
execSync3("git config core.eol lf", { stdio: "inherit" });
|
|
2156
|
-
console.warn(
|
|
2340
|
+
console.warn(chalk28.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
2157
2341
|
}
|
|
2158
2342
|
return 1;
|
|
2159
2343
|
};
|
|
@@ -2164,7 +2348,7 @@ var knip = () => {
|
|
|
2164
2348
|
};
|
|
2165
2349
|
|
|
2166
2350
|
// src/actions/license.ts
|
|
2167
|
-
import
|
|
2351
|
+
import chalk29 from "chalk";
|
|
2168
2352
|
import { init } from "license-checker";
|
|
2169
2353
|
var license = async (pkg) => {
|
|
2170
2354
|
const workspaces = yarnWorkspaces();
|
|
@@ -2189,18 +2373,18 @@ var license = async (pkg) => {
|
|
|
2189
2373
|
"LGPL-3.0-or-later",
|
|
2190
2374
|
"Python-2.0"
|
|
2191
2375
|
]);
|
|
2192
|
-
console.log(
|
|
2376
|
+
console.log(chalk29.green("License Checker"));
|
|
2193
2377
|
return (await Promise.all(
|
|
2194
2378
|
workspaceList.map(({ location, name }) => {
|
|
2195
2379
|
return new Promise((resolve) => {
|
|
2196
2380
|
init({ production: true, start: location }, (error, packages) => {
|
|
2197
2381
|
if (error) {
|
|
2198
|
-
console.error(
|
|
2199
|
-
console.error(
|
|
2382
|
+
console.error(chalk29.red(`License Checker [${name}] Error`));
|
|
2383
|
+
console.error(chalk29.gray(error));
|
|
2200
2384
|
console.log("\n");
|
|
2201
2385
|
resolve(1);
|
|
2202
2386
|
} else {
|
|
2203
|
-
console.log(
|
|
2387
|
+
console.log(chalk29.green(`License Checker [${name}]`));
|
|
2204
2388
|
let count = 0;
|
|
2205
2389
|
for (const [name2, info] of Object.entries(packages)) {
|
|
2206
2390
|
const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
|
|
@@ -2216,7 +2400,7 @@ var license = async (pkg) => {
|
|
|
2216
2400
|
}
|
|
2217
2401
|
if (!orLicenseFound) {
|
|
2218
2402
|
count++;
|
|
2219
|
-
console.warn(
|
|
2403
|
+
console.warn(chalk29.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
2220
2404
|
}
|
|
2221
2405
|
}
|
|
2222
2406
|
}
|
|
@@ -2231,17 +2415,17 @@ var license = async (pkg) => {
|
|
|
2231
2415
|
};
|
|
2232
2416
|
|
|
2233
2417
|
// src/actions/npmignore-gen.ts
|
|
2234
|
-
var
|
|
2235
|
-
var npmignoreGen = (pkg) => generateIgnoreFiles(
|
|
2418
|
+
var filename = ".npmignore";
|
|
2419
|
+
var npmignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
|
|
2236
2420
|
|
|
2237
2421
|
// src/actions/package/clean-outputs.ts
|
|
2238
2422
|
import path8 from "path";
|
|
2239
|
-
import
|
|
2423
|
+
import chalk30 from "chalk";
|
|
2240
2424
|
var packageCleanOutputs = () => {
|
|
2241
2425
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
2242
2426
|
const pkgName = process.env.npm_package_name;
|
|
2243
2427
|
const folders = [path8.join(pkg, "dist"), path8.join(pkg, "build"), path8.join(pkg, "docs")];
|
|
2244
|
-
console.log(
|
|
2428
|
+
console.log(chalk30.green(`Cleaning Outputs [${pkgName}]`));
|
|
2245
2429
|
for (let folder of folders) {
|
|
2246
2430
|
deleteGlob(folder);
|
|
2247
2431
|
}
|
|
@@ -2250,11 +2434,11 @@ var packageCleanOutputs = () => {
|
|
|
2250
2434
|
|
|
2251
2435
|
// src/actions/package/clean-typescript.ts
|
|
2252
2436
|
import path9 from "path";
|
|
2253
|
-
import
|
|
2437
|
+
import chalk31 from "chalk";
|
|
2254
2438
|
var packageCleanTypescript = () => {
|
|
2255
2439
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
2256
2440
|
const pkgName = process.env.npm_package_name;
|
|
2257
|
-
console.log(
|
|
2441
|
+
console.log(chalk31.green(`Cleaning Typescript [${pkgName}]`));
|
|
2258
2442
|
const files = [path9.join(pkg, "*.tsbuildinfo"), path9.join(pkg, ".tsconfig.*"), path9.join(pkg, ".eslintcache")];
|
|
2259
2443
|
for (let file of files) {
|
|
2260
2444
|
deleteGlob(file);
|
|
@@ -2268,26 +2452,26 @@ var packageClean = async () => {
|
|
|
2268
2452
|
};
|
|
2269
2453
|
|
|
2270
2454
|
// src/actions/package/compile/compile.ts
|
|
2271
|
-
import
|
|
2455
|
+
import chalk36 from "chalk";
|
|
2272
2456
|
|
|
2273
2457
|
// src/actions/package/compile/packageCompileTsup.ts
|
|
2274
|
-
import
|
|
2458
|
+
import chalk35 from "chalk";
|
|
2275
2459
|
import { build as build2, defineConfig } from "tsup";
|
|
2276
2460
|
|
|
2277
2461
|
// src/actions/package/compile/inputs.ts
|
|
2278
|
-
import
|
|
2462
|
+
import chalk32 from "chalk";
|
|
2279
2463
|
import { glob as glob2 } from "glob";
|
|
2280
2464
|
var getAllInputs = (srcDir, verbose = false) => {
|
|
2281
2465
|
return [...glob2.sync(`${srcDir}/**/*.ts`, { posix: true }).map((file) => {
|
|
2282
2466
|
const result = file.slice(Math.max(0, srcDir.length + 1));
|
|
2283
2467
|
if (verbose) {
|
|
2284
|
-
console.log(
|
|
2468
|
+
console.log(chalk32.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
|
|
2285
2469
|
}
|
|
2286
2470
|
return result;
|
|
2287
2471
|
}), ...glob2.sync(`${srcDir}/**/*.tsx`, { posix: true }).map((file) => {
|
|
2288
2472
|
const result = file.slice(Math.max(0, srcDir.length + 1));
|
|
2289
2473
|
if (verbose) {
|
|
2290
|
-
console.log(
|
|
2474
|
+
console.log(chalk32.gray(`getAllInputs: ${JSON.stringify(result, null, 2)}`));
|
|
2291
2475
|
}
|
|
2292
2476
|
return result;
|
|
2293
2477
|
})];
|
|
@@ -2349,7 +2533,7 @@ function deepMergeObjects(objects) {
|
|
|
2349
2533
|
|
|
2350
2534
|
// src/actions/package/compile/packageCompileTsc.ts
|
|
2351
2535
|
import { cwd as cwd2 } from "process";
|
|
2352
|
-
import
|
|
2536
|
+
import chalk33 from "chalk";
|
|
2353
2537
|
import { createProgramFromConfig } from "tsc-prog";
|
|
2354
2538
|
import ts3, {
|
|
2355
2539
|
DiagnosticCategory,
|
|
@@ -2371,7 +2555,7 @@ var getCompilerOptions = (options = {}, fileName = "tsconfig.json") => {
|
|
|
2371
2555
|
var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", compilerOptionsParam, verbose = false) => {
|
|
2372
2556
|
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
2373
2557
|
if (verbose) {
|
|
2374
|
-
console.log(
|
|
2558
|
+
console.log(chalk33.cyan(`Validating code START: ${entries.length} files to ${outDir} from ${srcDir}`));
|
|
2375
2559
|
}
|
|
2376
2560
|
const configFilePath = ts3.findConfigFile(
|
|
2377
2561
|
"./",
|
|
@@ -2394,10 +2578,10 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
|
|
|
2394
2578
|
emitDeclarationOnly: true,
|
|
2395
2579
|
noEmit: false
|
|
2396
2580
|
};
|
|
2397
|
-
console.log(
|
|
2581
|
+
console.log(chalk33.cyan(`Validating Files: ${entries.length}`));
|
|
2398
2582
|
if (verbose) {
|
|
2399
2583
|
for (const entry of entries) {
|
|
2400
|
-
console.log(
|
|
2584
|
+
console.log(chalk33.grey(`Validating: ${entry}`));
|
|
2401
2585
|
}
|
|
2402
2586
|
}
|
|
2403
2587
|
try {
|
|
@@ -2433,7 +2617,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
|
|
|
2433
2617
|
return 0;
|
|
2434
2618
|
} finally {
|
|
2435
2619
|
if (verbose) {
|
|
2436
|
-
console.log(
|
|
2620
|
+
console.log(chalk33.cyan(`Validating code FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
|
|
2437
2621
|
}
|
|
2438
2622
|
}
|
|
2439
2623
|
};
|
|
@@ -2441,7 +2625,7 @@ var packageCompileTsc = (platform, entries, srcDir = "src", outDir = "dist", com
|
|
|
2441
2625
|
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
2442
2626
|
import path10 from "path";
|
|
2443
2627
|
import { cwd as cwd3 } from "process";
|
|
2444
|
-
import
|
|
2628
|
+
import chalk34 from "chalk";
|
|
2445
2629
|
import { rollup } from "rollup";
|
|
2446
2630
|
import dts from "rollup-plugin-dts";
|
|
2447
2631
|
import nodeExternals from "rollup-plugin-node-externals";
|
|
@@ -2466,8 +2650,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
|
|
|
2466
2650
|
if (ignoredWarningCodes.has(warning.code ?? "")) {
|
|
2467
2651
|
return;
|
|
2468
2652
|
}
|
|
2469
|
-
console.warn(
|
|
2470
|
-
console.warn(
|
|
2653
|
+
console.warn(chalk34.yellow(`[${warning.code}] ${warning.message}`));
|
|
2654
|
+
console.warn(chalk34.gray(inputPath));
|
|
2471
2655
|
warn(warning);
|
|
2472
2656
|
}
|
|
2473
2657
|
});
|
|
@@ -2477,8 +2661,8 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
|
|
|
2477
2661
|
});
|
|
2478
2662
|
} catch (ex) {
|
|
2479
2663
|
const error = ex;
|
|
2480
|
-
console.warn(
|
|
2481
|
-
console.warn(
|
|
2664
|
+
console.warn(chalk34.red(error));
|
|
2665
|
+
console.warn(chalk34.gray(inputPath));
|
|
2482
2666
|
}
|
|
2483
2667
|
if (verbose) {
|
|
2484
2668
|
console.log(`Bundled declarations written to ${outputPath}`);
|
|
@@ -2486,7 +2670,7 @@ async function bundleDts(inputPath, outputPath, platform, options, verbose = fal
|
|
|
2486
2670
|
}
|
|
2487
2671
|
var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build", verbose = false) => {
|
|
2488
2672
|
if (verbose) {
|
|
2489
|
-
console.log(
|
|
2673
|
+
console.log(chalk34.cyan(`Compiling Types START [${platform}]: ${entries.length} files to ${outDir} from ${srcDir}`));
|
|
2490
2674
|
console.log(`Entries: ${entries.join(", ")}`);
|
|
2491
2675
|
}
|
|
2492
2676
|
const pkg = process.env.INIT_CWD ?? cwd3();
|
|
@@ -2510,7 +2694,7 @@ var packageCompileTscTypes = async (entries, outDir, platform, srcDir = "build",
|
|
|
2510
2694
|
await bundleDts(`${srcRoot}/${entryTypeName}`, `${outDir}/${entryTypeName}`, platform, { compilerOptions }, verbose);
|
|
2511
2695
|
}));
|
|
2512
2696
|
if (verbose) {
|
|
2513
|
-
console.log(
|
|
2697
|
+
console.log(chalk34.cyan(`Compiling Types FINISH: ${entries.length} files to ${outDir} from ${srcDir}`));
|
|
2514
2698
|
}
|
|
2515
2699
|
return 0;
|
|
2516
2700
|
};
|
|
@@ -2522,15 +2706,15 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
|
|
|
2522
2706
|
console.log(`compileFolder [${srcDir}, ${options?.outDir}]`);
|
|
2523
2707
|
}
|
|
2524
2708
|
if (entries.length === 0) {
|
|
2525
|
-
console.warn(
|
|
2709
|
+
console.warn(chalk35.yellow(`No entries found in ${srcDir} to compile`));
|
|
2526
2710
|
return 0;
|
|
2527
2711
|
}
|
|
2528
2712
|
if (verbose) {
|
|
2529
|
-
console.log(
|
|
2713
|
+
console.log(chalk35.gray(`buildDir [${buildDir}]`));
|
|
2530
2714
|
}
|
|
2531
2715
|
const validationResult = packageCompileTsc(options?.platform ?? "neutral", entries, srcDir, buildDir, void 0, verbose);
|
|
2532
2716
|
if (validationResult !== 0) {
|
|
2533
|
-
console.error(
|
|
2717
|
+
console.error(chalk35.red(`Compile:Validation had ${validationResult} errors`));
|
|
2534
2718
|
return validationResult;
|
|
2535
2719
|
}
|
|
2536
2720
|
const optionsParams = tsupOptions([{
|
|
@@ -2555,12 +2739,12 @@ var compileFolder = async (srcDir, entries, buildDir, options, bundleTypes = fal
|
|
|
2555
2739
|
})
|
|
2556
2740
|
)).flat();
|
|
2557
2741
|
if (verbose) {
|
|
2558
|
-
console.log(
|
|
2559
|
-
console.log(
|
|
2742
|
+
console.log(chalk35.cyan(`TSUP:build:start [${srcDir}]`));
|
|
2743
|
+
console.log(chalk35.gray(`TSUP:build:options [${JSON.stringify(optionsList, null, 2)}]`));
|
|
2560
2744
|
}
|
|
2561
2745
|
await Promise.all(optionsList.map((options2) => build2(options2)));
|
|
2562
2746
|
if (verbose) {
|
|
2563
|
-
console.log(
|
|
2747
|
+
console.log(chalk35.cyan(`TSUP:build:stop [${srcDir}]`));
|
|
2564
2748
|
}
|
|
2565
2749
|
if (bundleTypes) {
|
|
2566
2750
|
await packageCompileTscTypes(entries, outDir, options?.platform ?? "neutral", buildDir, verbose);
|
|
@@ -2671,14 +2855,14 @@ var packageCompileTsup = async (config2) => {
|
|
|
2671
2855
|
// src/actions/package/compile/compile.ts
|
|
2672
2856
|
var packageCompile = async (inConfig = {}) => {
|
|
2673
2857
|
const pkg = process.env.INIT_CWD;
|
|
2674
|
-
console.log(
|
|
2858
|
+
console.log(chalk36.green(`Compiling ${pkg}`));
|
|
2675
2859
|
const config2 = await loadConfig(inConfig);
|
|
2676
2860
|
return await packageCompileTsup(config2);
|
|
2677
2861
|
};
|
|
2678
2862
|
|
|
2679
2863
|
// src/actions/package/copy-assets.ts
|
|
2680
2864
|
import path11 from "path/posix";
|
|
2681
|
-
import
|
|
2865
|
+
import chalk37 from "chalk";
|
|
2682
2866
|
import cpy2 from "cpy";
|
|
2683
2867
|
var copyTargetAssets2 = async (target, name, location) => {
|
|
2684
2868
|
try {
|
|
@@ -2691,7 +2875,7 @@ var copyTargetAssets2 = async (target, name, location) => {
|
|
|
2691
2875
|
}
|
|
2692
2876
|
);
|
|
2693
2877
|
if (values.length > 0) {
|
|
2694
|
-
console.log(
|
|
2878
|
+
console.log(chalk37.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
|
|
2695
2879
|
}
|
|
2696
2880
|
for (const value of values) {
|
|
2697
2881
|
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
@@ -2756,9 +2940,9 @@ var packageCycle = async () => {
|
|
|
2756
2940
|
};
|
|
2757
2941
|
|
|
2758
2942
|
// src/actions/package/gen-docs.ts
|
|
2759
|
-
import { existsSync as
|
|
2943
|
+
import { existsSync as existsSync9 } from "fs";
|
|
2760
2944
|
import path12 from "path";
|
|
2761
|
-
import
|
|
2945
|
+
import chalk38 from "chalk";
|
|
2762
2946
|
import {
|
|
2763
2947
|
Application,
|
|
2764
2948
|
ArgumentsReader,
|
|
@@ -2776,7 +2960,7 @@ var ExitCodes = {
|
|
|
2776
2960
|
};
|
|
2777
2961
|
var packageGenDocs = async () => {
|
|
2778
2962
|
const pkg = process.env.INIT_CWD;
|
|
2779
|
-
if (pkg !== void 0 && !
|
|
2963
|
+
if (pkg !== void 0 && !existsSync9(path12.join(pkg, "typedoc.json"))) {
|
|
2780
2964
|
return;
|
|
2781
2965
|
}
|
|
2782
2966
|
const app = await Application.bootstrap({
|
|
@@ -2862,16 +3046,16 @@ var runTypeDoc = async (app) => {
|
|
|
2862
3046
|
return ExitCodes.OutputError;
|
|
2863
3047
|
}
|
|
2864
3048
|
}
|
|
2865
|
-
console.log(
|
|
3049
|
+
console.log(chalk38.green(`${pkgName} - Ok`));
|
|
2866
3050
|
return ExitCodes.Ok;
|
|
2867
3051
|
};
|
|
2868
3052
|
|
|
2869
3053
|
// src/actions/package/lint.ts
|
|
2870
|
-
import { readdirSync as
|
|
3054
|
+
import { readdirSync as readdirSync6 } from "fs";
|
|
2871
3055
|
import path13 from "path";
|
|
2872
3056
|
import { cwd as cwd4 } from "process";
|
|
2873
3057
|
import { pathToFileURL } from "url";
|
|
2874
|
-
import
|
|
3058
|
+
import chalk39 from "chalk";
|
|
2875
3059
|
import { ESLint } from "eslint";
|
|
2876
3060
|
import { findUp } from "find-up";
|
|
2877
3061
|
import picomatch from "picomatch";
|
|
@@ -2880,14 +3064,14 @@ var dumpMessages = (lintResults) => {
|
|
|
2880
3064
|
const severity = ["none", "warning", "error"];
|
|
2881
3065
|
for (const lintResult of lintResults) {
|
|
2882
3066
|
if (lintResult.messages.length > 0) {
|
|
2883
|
-
console.log(
|
|
3067
|
+
console.log(chalk39.gray(`
|
|
2884
3068
|
${lintResult.filePath}`));
|
|
2885
3069
|
for (const message of lintResult.messages) {
|
|
2886
3070
|
console.log(
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
3071
|
+
chalk39.gray(` ${message.line}:${message.column}`),
|
|
3072
|
+
chalk39[colors[message.severity]](` ${severity[message.severity]}`),
|
|
3073
|
+
chalk39.white(` ${message.message}`),
|
|
3074
|
+
chalk39.gray(` ${message.ruleId}`)
|
|
2891
3075
|
);
|
|
2892
3076
|
}
|
|
2893
3077
|
}
|
|
@@ -2904,7 +3088,7 @@ function getFiles(dir, ignoreFolders) {
|
|
|
2904
3088
|
const currentDirectory = cwd4();
|
|
2905
3089
|
const subDirectory = dir.split(currentDirectory)[1]?.split("/")[1];
|
|
2906
3090
|
if (ignoreFolders.includes(subDirectory)) return [];
|
|
2907
|
-
return
|
|
3091
|
+
return readdirSync6(dir, { withFileTypes: true }).flatMap((dirent) => {
|
|
2908
3092
|
const res = path13.resolve(dir, dirent.name);
|
|
2909
3093
|
const relativePath = subDirectory === void 0 ? dirent.name : `${subDirectory}/${dirent.name}`;
|
|
2910
3094
|
const ignoreMatchers = ignoreFolders.map((pattern) => picomatch(pattern));
|
|
@@ -2925,10 +3109,10 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
|
|
|
2925
3109
|
cache
|
|
2926
3110
|
});
|
|
2927
3111
|
const files = getFiles(cwd4(), ignoreFolders);
|
|
2928
|
-
console.log(
|
|
3112
|
+
console.log(chalk39.green(`Linting ${pkg} [files = ${files.length}]`));
|
|
2929
3113
|
if (verbose) {
|
|
2930
3114
|
for (const file of files) {
|
|
2931
|
-
console.log(
|
|
3115
|
+
console.log(chalk39.gray(` ${file}`));
|
|
2932
3116
|
}
|
|
2933
3117
|
}
|
|
2934
3118
|
const lintResults = await engine.lintFiles(files);
|
|
@@ -2939,32 +3123,32 @@ var packageLint = async (fix2 = false, verbose = false, cache = true) => {
|
|
|
2939
3123
|
const filesCountColor = files.length < 100 ? "green" : files.length < 1e3 ? "yellow" : "red";
|
|
2940
3124
|
const lintTime = Date.now() - start;
|
|
2941
3125
|
const lintTimeColor = lintTime < 1e3 ? "green" : lintTime < 3e3 ? "yellow" : "red";
|
|
2942
|
-
console.log(
|
|
3126
|
+
console.log(chalk39.white(`Linted ${chalk39[filesCountColor](files.length)} files in ${chalk39[lintTimeColor](lintTime)}ms`));
|
|
2943
3127
|
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
2944
3128
|
};
|
|
2945
3129
|
|
|
2946
3130
|
// src/actions/package/publint.ts
|
|
2947
3131
|
import { promises as fs10 } from "fs";
|
|
2948
|
-
import
|
|
3132
|
+
import chalk40 from "chalk";
|
|
2949
3133
|
import sortPackageJson from "sort-package-json";
|
|
2950
3134
|
var customPubLint = (pkg) => {
|
|
2951
3135
|
let errorCount = 0;
|
|
2952
3136
|
let warningCount = 0;
|
|
2953
3137
|
if (pkg.files === void 0) {
|
|
2954
|
-
console.warn(
|
|
3138
|
+
console.warn(chalk40.yellow('Publint [custom]: "files" field is missing'));
|
|
2955
3139
|
warningCount++;
|
|
2956
3140
|
}
|
|
2957
3141
|
if (pkg.main !== void 0) {
|
|
2958
|
-
console.warn(
|
|
3142
|
+
console.warn(chalk40.yellow('Publint [custom]: "main" field is deprecated, use "exports" instead'));
|
|
2959
3143
|
warningCount++;
|
|
2960
3144
|
}
|
|
2961
3145
|
if (pkg.sideEffects !== false) {
|
|
2962
|
-
console.warn(
|
|
3146
|
+
console.warn(chalk40.yellow('Publint [custom]: "sideEffects" field should be set to false'));
|
|
2963
3147
|
warningCount++;
|
|
2964
3148
|
}
|
|
2965
3149
|
if (pkg.resolutions !== void 0) {
|
|
2966
|
-
console.warn(
|
|
2967
|
-
console.warn(
|
|
3150
|
+
console.warn(chalk40.yellow('Publint [custom]: "resolutions" in use'));
|
|
3151
|
+
console.warn(chalk40.gray(JSON.stringify(pkg.resolutions, null, 2)));
|
|
2968
3152
|
warningCount++;
|
|
2969
3153
|
}
|
|
2970
3154
|
return [errorCount, warningCount];
|
|
@@ -2974,8 +3158,8 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
|
|
|
2974
3158
|
const sortedPkg = sortPackageJson(await fs10.readFile(`${pkgDir}/package.json`, "utf8"));
|
|
2975
3159
|
await fs10.writeFile(`${pkgDir}/package.json`, sortedPkg);
|
|
2976
3160
|
const pkg = JSON.parse(await fs10.readFile(`${pkgDir}/package.json`, "utf8"));
|
|
2977
|
-
console.log(
|
|
2978
|
-
console.log(
|
|
3161
|
+
console.log(chalk40.green(`Publint: ${pkg.name}`));
|
|
3162
|
+
console.log(chalk40.gray(pkgDir));
|
|
2979
3163
|
const { publint: publint2 } = await import("publint");
|
|
2980
3164
|
const { messages } = await publint2({
|
|
2981
3165
|
level: "suggestion",
|
|
@@ -2986,22 +3170,22 @@ var packagePublint = async ({ strict = true, verbose = false } = {}) => {
|
|
|
2986
3170
|
for (const message of messages) {
|
|
2987
3171
|
switch (message.type) {
|
|
2988
3172
|
case "error": {
|
|
2989
|
-
console.error(
|
|
3173
|
+
console.error(chalk40.red(`[${message.code}] ${formatMessage(message, pkg)}`));
|
|
2990
3174
|
break;
|
|
2991
3175
|
}
|
|
2992
3176
|
case "warning": {
|
|
2993
|
-
console.warn(
|
|
3177
|
+
console.warn(chalk40.yellow(`[${message.code}] ${formatMessage(message, pkg)}`));
|
|
2994
3178
|
break;
|
|
2995
3179
|
}
|
|
2996
3180
|
default: {
|
|
2997
|
-
console.log(
|
|
3181
|
+
console.log(chalk40.white(`[${message.code}] ${formatMessage(message, pkg)}`));
|
|
2998
3182
|
break;
|
|
2999
3183
|
}
|
|
3000
3184
|
}
|
|
3001
3185
|
}
|
|
3002
3186
|
const [errorCount, warningCount] = customPubLint(pkg);
|
|
3003
3187
|
if (verbose) {
|
|
3004
|
-
console.log(
|
|
3188
|
+
console.log(chalk40.gray(`Publint [Finish]: ${pkgDir} [${messages.length + errorCount + warningCount} messages]`));
|
|
3005
3189
|
}
|
|
3006
3190
|
return messages.filter((message) => message.type === "error").length + errorCount;
|
|
3007
3191
|
};
|
|
@@ -3064,7 +3248,7 @@ var rebuild = ({ target }) => {
|
|
|
3064
3248
|
};
|
|
3065
3249
|
|
|
3066
3250
|
// src/actions/recompile.ts
|
|
3067
|
-
import
|
|
3251
|
+
import chalk41 from "chalk";
|
|
3068
3252
|
var recompile = async ({
|
|
3069
3253
|
verbose,
|
|
3070
3254
|
target,
|
|
@@ -3100,7 +3284,7 @@ var recompileAll = async ({
|
|
|
3100
3284
|
const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
|
|
3101
3285
|
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
3102
3286
|
if (jobs) {
|
|
3103
|
-
console.log(
|
|
3287
|
+
console.log(chalk41.blue(`Jobs set to [${jobs}]`));
|
|
3104
3288
|
}
|
|
3105
3289
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
3106
3290
|
[
|
|
@@ -3131,7 +3315,7 @@ var recompileAll = async ({
|
|
|
3131
3315
|
]
|
|
3132
3316
|
]);
|
|
3133
3317
|
console.log(
|
|
3134
|
-
`${
|
|
3318
|
+
`${chalk41.gray("Recompiled in")} [${chalk41.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk41.gray("seconds")}`
|
|
3135
3319
|
);
|
|
3136
3320
|
return result;
|
|
3137
3321
|
};
|
|
@@ -3140,7 +3324,7 @@ var recompileAll = async ({
|
|
|
3140
3324
|
import {
|
|
3141
3325
|
closeSync,
|
|
3142
3326
|
openSync,
|
|
3143
|
-
rmSync as
|
|
3327
|
+
rmSync as rmSync3
|
|
3144
3328
|
} from "fs";
|
|
3145
3329
|
var reinstall = () => {
|
|
3146
3330
|
console.log("Reinstall [Clear Lock File]");
|
|
@@ -3150,7 +3334,7 @@ var reinstall = () => {
|
|
|
3150
3334
|
const result = workspaces.map(({ location, name }) => {
|
|
3151
3335
|
const dist = `${location}/node_modules`;
|
|
3152
3336
|
try {
|
|
3153
|
-
|
|
3337
|
+
rmSync3(dist, { force: true, recursive: true });
|
|
3154
3338
|
return 0;
|
|
3155
3339
|
} catch (ex) {
|
|
3156
3340
|
const error = ex;
|
|
@@ -3162,13 +3346,13 @@ var reinstall = () => {
|
|
|
3162
3346
|
};
|
|
3163
3347
|
|
|
3164
3348
|
// src/actions/relint.ts
|
|
3165
|
-
import
|
|
3349
|
+
import chalk42 from "chalk";
|
|
3166
3350
|
var relintPackage = ({
|
|
3167
3351
|
pkg,
|
|
3168
3352
|
fix: fix2,
|
|
3169
3353
|
verbose
|
|
3170
3354
|
}) => {
|
|
3171
|
-
console.log(
|
|
3355
|
+
console.log(chalk42.gray(`${fix2 ? "Fix" : "Lint"} [${pkg}]`));
|
|
3172
3356
|
const start = Date.now();
|
|
3173
3357
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [${pkg}]`, [
|
|
3174
3358
|
["yarn", [
|
|
@@ -3178,7 +3362,7 @@ var relintPackage = ({
|
|
|
3178
3362
|
fix2 ? "package-fix" : verbose ? "package-lint-verbose" : "package-lint"
|
|
3179
3363
|
]]
|
|
3180
3364
|
]);
|
|
3181
|
-
console.log(
|
|
3365
|
+
console.log(chalk42.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk42.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk42.gray("seconds")}`));
|
|
3182
3366
|
return result;
|
|
3183
3367
|
};
|
|
3184
3368
|
var relint = ({
|
|
@@ -3198,13 +3382,13 @@ var relint = ({
|
|
|
3198
3382
|
});
|
|
3199
3383
|
};
|
|
3200
3384
|
var relintAllPackages = ({ fix: fix2 = false } = {}) => {
|
|
3201
|
-
console.log(
|
|
3385
|
+
console.log(chalk42.gray(`${fix2 ? "Fix" : "Lint"} [All-Packages]`));
|
|
3202
3386
|
const start = Date.now();
|
|
3203
3387
|
const fixOptions = fix2 ? ["--fix"] : [];
|
|
3204
3388
|
const result = runSteps(`${fix2 ? "Fix" : "Lint"} [All-Packages]`, [
|
|
3205
3389
|
["yarn", ["eslint", ...fixOptions]]
|
|
3206
3390
|
]);
|
|
3207
|
-
console.log(
|
|
3391
|
+
console.log(chalk42.gray(`${fix2 ? "Fixed in" : "Linted in"} [${chalk42.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk42.gray("seconds")}`));
|
|
3208
3392
|
return result;
|
|
3209
3393
|
};
|
|
3210
3394
|
|
|
@@ -3222,10 +3406,10 @@ var sonar = () => {
|
|
|
3222
3406
|
};
|
|
3223
3407
|
|
|
3224
3408
|
// src/actions/statics.ts
|
|
3225
|
-
import
|
|
3409
|
+
import chalk43 from "chalk";
|
|
3226
3410
|
var DefaultDependencies = ["axios", "@xylabs/pixel", "react", "graphql", "react-router", "@mui/material", "@mui/system"];
|
|
3227
3411
|
var statics = () => {
|
|
3228
|
-
console.log(
|
|
3412
|
+
console.log(chalk43.green("Check Required Static Dependencies"));
|
|
3229
3413
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
3230
3414
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
3231
3415
|
};
|
|
@@ -3275,6 +3459,7 @@ var yarn3Only = () => {
|
|
|
3275
3459
|
export {
|
|
3276
3460
|
build,
|
|
3277
3461
|
bundleDts,
|
|
3462
|
+
claudeClean,
|
|
3278
3463
|
claudeCommands,
|
|
3279
3464
|
claudeRules,
|
|
3280
3465
|
claudeSettings,
|
|
@@ -3301,6 +3486,7 @@ export {
|
|
|
3301
3486
|
genDocs,
|
|
3302
3487
|
genDocsAll,
|
|
3303
3488
|
genDocsPackage,
|
|
3489
|
+
gitignore,
|
|
3304
3490
|
gitignoreGen,
|
|
3305
3491
|
gitlint,
|
|
3306
3492
|
gitlintFix,
|