@xylabs/toolchain 7.10.0
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/analyze.mjs +140 -0
- package/dist/actions/analyze.mjs.map +1 -0
- package/dist/actions/build.mjs +173 -0
- package/dist/actions/build.mjs.map +1 -0
- package/dist/actions/claude-check.mjs +199 -0
- package/dist/actions/claude-check.mjs.map +1 -0
- package/dist/actions/claude-clean.mjs +70 -0
- package/dist/actions/claude-clean.mjs.map +1 -0
- package/dist/actions/claude-commands.mjs +126 -0
- package/dist/actions/claude-commands.mjs.map +1 -0
- package/dist/actions/claude-rules.mjs +151 -0
- package/dist/actions/claude-rules.mjs.map +1 -0
- package/dist/actions/claude-settings.mjs +99 -0
- package/dist/actions/claude-settings.mjs.map +1 -0
- package/dist/actions/claude-skills.mjs +131 -0
- package/dist/actions/claude-skills.mjs.map +1 -0
- package/dist/actions/clean-docs.mjs +66 -0
- package/dist/actions/clean-docs.mjs.map +1 -0
- package/dist/actions/clean-eslint.mjs +47 -0
- package/dist/actions/clean-eslint.mjs.map +1 -0
- package/dist/actions/clean.mjs +166 -0
- package/dist/actions/clean.mjs.map +1 -0
- package/dist/actions/compile.mjs +184 -0
- package/dist/actions/compile.mjs.map +1 -0
- package/dist/actions/copy-assets.mjs +81 -0
- package/dist/actions/copy-assets.mjs.map +1 -0
- package/dist/actions/cycle.mjs +275 -0
- package/dist/actions/cycle.mjs.map +1 -0
- package/dist/actions/dead.mjs +119 -0
- package/dist/actions/dead.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/checkPackage.mjs +1556 -0
- package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs +1 -0
- package/dist/actions/deplint/checkPackage/checkPackageTypes.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs +77 -0
- package/dist/actions/deplint/checkPackage/getMismatchedPeerDevVersions.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +158 -0
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +125 -0
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs +207 -0
- package/dist/actions/deplint/checkPackage/getUnnecessaryPeerDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs +318 -0
- package/dist/actions/deplint/checkPackage/getUnsatisfiedPeerDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +163 -0
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs +408 -0
- package/dist/actions/deplint/checkPackage/getUnusedDevDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +75 -0
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs +128 -0
- package/dist/actions/deplint/checkPackage/getWorkspaceVersionProblems.mjs.map +1 -0
- package/dist/actions/deplint/checkPackage/index.mjs +1609 -0
- package/dist/actions/deplint/checkPackage/index.mjs.map +1 -0
- package/dist/actions/deplint/deplint.mjs +1840 -0
- package/dist/actions/deplint/deplint.mjs.map +1 -0
- package/dist/actions/deplint/engine.mjs +1736 -0
- package/dist/actions/deplint/engine.mjs.map +1 -0
- package/dist/actions/deplint/findFiles.mjs +39 -0
- package/dist/actions/deplint/findFiles.mjs.map +1 -0
- package/dist/actions/deplint/findFilesByGlob.mjs +14 -0
- package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -0
- package/dist/actions/deplint/fixer.mjs +103 -0
- package/dist/actions/deplint/fixer.mjs.map +1 -0
- package/dist/actions/deplint/getBasePackageName.mjs +13 -0
- package/dist/actions/deplint/getBasePackageName.mjs.map +1 -0
- package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs +140 -0
- package/dist/actions/deplint/getCliReferencedPackagesFromFiles.mjs.map +1 -0
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +29 -0
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -0
- package/dist/actions/deplint/getExtendsFromTsconfigs.mjs +68 -0
- package/dist/actions/deplint/getExtendsFromTsconfigs.mjs.map +1 -0
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs +143 -0
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -0
- package/dist/actions/deplint/getImportsFromFile.mjs +85 -0
- package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -0
- package/dist/actions/deplint/getRequiredPeerDependencies.mjs +37 -0
- package/dist/actions/deplint/getRequiredPeerDependencies.mjs.map +1 -0
- package/dist/actions/deplint/getScriptReferencedPackages.mjs +83 -0
- package/dist/actions/deplint/getScriptReferencedPackages.mjs.map +1 -0
- package/dist/actions/deplint/implicitDevDependencies.mjs +116 -0
- package/dist/actions/deplint/implicitDevDependencies.mjs.map +1 -0
- package/dist/actions/deplint/index.mjs +1848 -0
- package/dist/actions/deplint/index.mjs.map +1 -0
- package/dist/actions/deplint/packageEditor.mjs +82 -0
- package/dist/actions/deplint/packageEditor.mjs.map +1 -0
- package/dist/actions/deplint/packageJsonEditor.mjs +101 -0
- package/dist/actions/deplint/packageJsonEditor.mjs.map +1 -0
- package/dist/actions/deplint/reporters.mjs +36 -0
- package/dist/actions/deplint/reporters.mjs.map +1 -0
- package/dist/actions/deplint/rules.mjs +1223 -0
- package/dist/actions/deplint/rules.mjs.map +1 -0
- package/dist/actions/deplint/snapshot.mjs +372 -0
- package/dist/actions/deplint/snapshot.mjs.map +1 -0
- package/dist/actions/deplint/tsScriptsAliases.mjs +20 -0
- package/dist/actions/deplint/tsScriptsAliases.mjs.map +1 -0
- package/dist/actions/deplint/types.mjs +1 -0
- package/dist/actions/deplint/types.mjs.map +1 -0
- package/dist/actions/deploy.mjs +194 -0
- package/dist/actions/deploy.mjs.map +1 -0
- package/dist/actions/dupdeps.mjs +226 -0
- package/dist/actions/dupdeps.mjs.map +1 -0
- package/dist/actions/eject.mjs +142 -0
- package/dist/actions/eject.mjs.map +1 -0
- package/dist/actions/fix.mjs +359 -0
- package/dist/actions/fix.mjs.map +1 -0
- package/dist/actions/gen-docs.mjs +155 -0
- package/dist/actions/gen-docs.mjs.map +1 -0
- package/dist/actions/gitignore.mjs +159 -0
- package/dist/actions/gitignore.mjs.map +1 -0
- package/dist/actions/gitlint-fix.mjs +27 -0
- package/dist/actions/gitlint-fix.mjs.map +1 -0
- package/dist/actions/gitlint.mjs +48 -0
- package/dist/actions/gitlint.mjs.map +1 -0
- package/dist/actions/index.mjs +8259 -0
- package/dist/actions/index.mjs.map +1 -0
- package/dist/actions/knip.mjs +119 -0
- package/dist/actions/knip.mjs.map +1 -0
- package/dist/actions/license.mjs +92 -0
- package/dist/actions/license.mjs.map +1 -0
- package/dist/actions/lint-init.mjs +275 -0
- package/dist/actions/lint-init.mjs.map +1 -0
- package/dist/actions/lint.mjs +356 -0
- package/dist/actions/lint.mjs.map +1 -0
- package/dist/actions/lintNext.mjs +209 -0
- package/dist/actions/lintNext.mjs.map +1 -0
- package/dist/actions/lintlint.mjs +341 -0
- package/dist/actions/lintlint.mjs.map +1 -0
- package/dist/actions/npmignore-gen.mjs +90 -0
- package/dist/actions/npmignore-gen.mjs.map +1 -0
- package/dist/actions/orphan.mjs +110 -0
- package/dist/actions/orphan.mjs.map +1 -0
- package/dist/actions/package/clean-outputs.mjs +50 -0
- package/dist/actions/package/clean-outputs.mjs.map +1 -0
- package/dist/actions/package/clean-typescript.mjs +50 -0
- package/dist/actions/package/clean-typescript.mjs.map +1 -0
- package/dist/actions/package/clean.mjs +69 -0
- package/dist/actions/package/clean.mjs.map +1 -0
- package/dist/actions/package/compile/XyConfig.mjs +32 -0
- package/dist/actions/package/compile/XyConfig.mjs.map +1 -0
- package/dist/actions/package/compile/buildEntries.mjs +53 -0
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -0
- package/dist/actions/package/compile/compile.mjs +439 -0
- package/dist/actions/package/compile/compile.mjs.map +1 -0
- package/dist/actions/package/compile/copyTypeFiles.mjs +34 -0
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -0
- package/dist/actions/package/compile/deepMerge.mjs +27 -0
- package/dist/actions/package/compile/deepMerge.mjs.map +1 -0
- package/dist/actions/package/compile/getCompilerOptions.mjs +12 -0
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -0
- package/dist/actions/package/compile/index.mjs +472 -0
- package/dist/actions/package/compile/index.mjs.map +1 -0
- package/dist/actions/package/compile/inputs.mjs +22 -0
- package/dist/actions/package/compile/inputs.mjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTsc.mjs +93 -0
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +92 -0
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTsup.mjs +402 -0
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -0
- package/dist/actions/package/copy-assets.mjs +69 -0
- package/dist/actions/package/copy-assets.mjs.map +1 -0
- package/dist/actions/package/cycle.mjs +62 -0
- package/dist/actions/package/cycle.mjs.map +1 -0
- package/dist/actions/package/gen-docs.mjs +137 -0
- package/dist/actions/package/gen-docs.mjs.map +1 -0
- package/dist/actions/package/index.mjs +1131 -0
- package/dist/actions/package/index.mjs.map +1 -0
- package/dist/actions/package/lint.mjs +87 -0
- package/dist/actions/package/lint.mjs.map +1 -0
- package/dist/actions/package/publint.mjs +336 -0
- package/dist/actions/package/publint.mjs.map +1 -0
- package/dist/actions/package/recompile.mjs +510 -0
- package/dist/actions/package/recompile.mjs.map +1 -0
- package/dist/actions/package-lint-deps.mjs +348 -0
- package/dist/actions/package-lint-deps.mjs.map +1 -0
- package/dist/actions/package-lint.mjs +774 -0
- package/dist/actions/package-lint.mjs.map +1 -0
- package/dist/actions/packman/clean.mjs +144 -0
- package/dist/actions/packman/clean.mjs.map +1 -0
- package/dist/actions/packman/convert.mjs +1331 -0
- package/dist/actions/packman/convert.mjs.map +1 -0
- package/dist/actions/packman/convertToPnpm.mjs +295 -0
- package/dist/actions/packman/convertToPnpm.mjs.map +1 -0
- package/dist/actions/packman/convertToYarn.mjs +307 -0
- package/dist/actions/packman/convertToYarn.mjs.map +1 -0
- package/dist/actions/packman/index.mjs +1493 -0
- package/dist/actions/packman/index.mjs.map +1 -0
- package/dist/actions/packman/lint.mjs +109 -0
- package/dist/actions/packman/lint.mjs.map +1 -0
- package/dist/actions/packman/rewriteScripts.mjs +52 -0
- package/dist/actions/packman/rewriteScripts.mjs.map +1 -0
- package/dist/actions/packman/rewriteSourceImports.mjs +60 -0
- package/dist/actions/packman/rewriteSourceImports.mjs.map +1 -0
- package/dist/actions/packman/swapTsScriptsDependency.mjs +57 -0
- package/dist/actions/packman/swapTsScriptsDependency.mjs.map +1 -0
- package/dist/actions/publint.mjs +748 -0
- package/dist/actions/publint.mjs.map +1 -0
- package/dist/actions/publish.mjs +208 -0
- package/dist/actions/publish.mjs.map +1 -0
- package/dist/actions/reactTest.mjs +142 -0
- package/dist/actions/reactTest.mjs.map +1 -0
- package/dist/actions/readme-gen.mjs +362 -0
- package/dist/actions/readme-gen.mjs.map +1 -0
- package/dist/actions/readme-init.mjs +89 -0
- package/dist/actions/readme-init.mjs.map +1 -0
- package/dist/actions/readme-lint.mjs +147 -0
- package/dist/actions/readme-lint.mjs.map +1 -0
- package/dist/actions/rebuild.mjs +143 -0
- package/dist/actions/rebuild.mjs.map +1 -0
- package/dist/actions/recompile.mjs +196 -0
- package/dist/actions/recompile.mjs.map +1 -0
- package/dist/actions/reinstall.mjs +283 -0
- package/dist/actions/reinstall.mjs.map +1 -0
- package/dist/actions/relint.mjs +355 -0
- package/dist/actions/relint.mjs.map +1 -0
- package/dist/actions/repo-init.mjs +217 -0
- package/dist/actions/repo-init.mjs.map +1 -0
- package/dist/actions/retest.mjs +150 -0
- package/dist/actions/retest.mjs.map +1 -0
- package/dist/actions/sitemap.mjs +121 -0
- package/dist/actions/sitemap.mjs.map +1 -0
- package/dist/actions/sonar.mjs +119 -0
- package/dist/actions/sonar.mjs.map +1 -0
- package/dist/actions/start.mjs +142 -0
- package/dist/actions/start.mjs.map +1 -0
- package/dist/actions/statics.mjs +225 -0
- package/dist/actions/statics.mjs.map +1 -0
- package/dist/actions/test.mjs +144 -0
- package/dist/actions/test.mjs.map +1 -0
- package/dist/actions/up.mjs +140 -0
- package/dist/actions/up.mjs.map +1 -0
- package/dist/actions/updo.mjs +533 -0
- package/dist/actions/updo.mjs.map +1 -0
- package/dist/actions/upplug.mjs +124 -0
- package/dist/actions/upplug.mjs.map +1 -0
- package/dist/actions/upyarn.mjs +119 -0
- package/dist/actions/upyarn.mjs.map +1 -0
- package/dist/actions/yarn3only.mjs +60 -0
- package/dist/actions/yarn3only.mjs.map +1 -0
- package/dist/bin/package/build-only.mjs +451 -0
- package/dist/bin/package/build-only.mjs.map +1 -0
- package/dist/bin/package/build.mjs +451 -0
- package/dist/bin/package/build.mjs.map +1 -0
- package/dist/bin/package/clean-outputs.mjs +50 -0
- package/dist/bin/package/clean-outputs.mjs.map +1 -0
- package/dist/bin/package/clean-typescript.mjs +50 -0
- package/dist/bin/package/clean-typescript.mjs.map +1 -0
- package/dist/bin/package/clean.mjs +75 -0
- package/dist/bin/package/clean.mjs.map +1 -0
- package/dist/bin/package/compile-only.mjs +447 -0
- package/dist/bin/package/compile-only.mjs.map +1 -0
- package/dist/bin/package/compile-tsup.mjs +409 -0
- package/dist/bin/package/compile-tsup.mjs.map +1 -0
- package/dist/bin/package/compile.mjs +451 -0
- package/dist/bin/package/compile.mjs.map +1 -0
- package/dist/bin/package/copy-assets-cjs.mjs +75 -0
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -0
- package/dist/bin/package/copy-assets-esm.mjs +75 -0
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -0
- package/dist/bin/package/cycle.mjs +72 -0
- package/dist/bin/package/cycle.mjs.map +1 -0
- package/dist/bin/package/fix.mjs +97 -0
- package/dist/bin/package/fix.mjs.map +1 -0
- package/dist/bin/package/gen-docs.mjs +142 -0
- package/dist/bin/package/gen-docs.mjs.map +1 -0
- package/dist/bin/package/lint-verbose.mjs +97 -0
- package/dist/bin/package/lint-verbose.mjs.map +1 -0
- package/dist/bin/package/lint.mjs +97 -0
- package/dist/bin/package/lint.mjs.map +1 -0
- package/dist/bin/package/publint.mjs +423 -0
- package/dist/bin/package/publint.mjs.map +1 -0
- package/dist/bin/package/recompile.mjs +516 -0
- package/dist/bin/package/recompile.mjs.map +1 -0
- package/dist/bin/package/relint.mjs +97 -0
- package/dist/bin/package/relint.mjs.map +1 -0
- package/dist/bin/run-or-exec.mjs +20 -0
- package/dist/bin/run-or-exec.mjs.map +1 -0
- package/dist/bin/xy.mjs +8885 -0
- package/dist/bin/xy.mjs.map +1 -0
- package/dist/index.d.ts +1102 -0
- package/dist/index.mjs +9986 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/checkResult.mjs +16 -0
- package/dist/lib/checkResult.mjs.map +1 -0
- package/dist/lib/claudeMdTemplate.mjs +69 -0
- package/dist/lib/claudeMdTemplate.mjs.map +1 -0
- package/dist/lib/concurrency.mjs +38 -0
- package/dist/lib/concurrency.mjs.map +1 -0
- package/dist/lib/createBuildConfig.mjs +55 -0
- package/dist/lib/createBuildConfig.mjs.map +1 -0
- package/dist/lib/defaultBuildConfig.mjs +23 -0
- package/dist/lib/defaultBuildConfig.mjs.map +1 -0
- package/dist/lib/deleteGlob.mjs +13 -0
- package/dist/lib/deleteGlob.mjs.map +1 -0
- package/dist/lib/dependencies/DuplicateDetector.mjs +99 -0
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +203 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -0
- package/dist/lib/dependencies/index.mjs +281 -0
- package/dist/lib/dependencies/index.mjs.map +1 -0
- package/dist/lib/dependencies/workspaceCycles.mjs +79 -0
- package/dist/lib/dependencies/workspaceCycles.mjs.map +1 -0
- package/dist/lib/file/ReadFileSyncOptions.mjs +6 -0
- package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -0
- package/dist/lib/file/constants.mjs +8 -0
- package/dist/lib/file/constants.mjs.map +1 -0
- package/dist/lib/file/fileLines.mjs +32 -0
- package/dist/lib/file/fileLines.mjs.map +1 -0
- package/dist/lib/file/index.mjs +42 -0
- package/dist/lib/file/index.mjs.map +1 -0
- package/dist/lib/file/tryReadFileSync.mjs +14 -0
- package/dist/lib/file/tryReadFileSync.mjs.map +1 -0
- package/dist/lib/fillTemplate.mjs +8 -0
- package/dist/lib/fillTemplate.mjs.map +1 -0
- package/dist/lib/generateIgnoreFiles.mjs +86 -0
- package/dist/lib/generateIgnoreFiles.mjs.map +1 -0
- package/dist/lib/generateReadmeFiles.mjs +323 -0
- package/dist/lib/generateReadmeFiles.mjs.map +1 -0
- package/dist/lib/gitignoreTemplate.mjs +12 -0
- package/dist/lib/gitignoreTemplate.mjs.map +1 -0
- package/dist/lib/index.mjs +1627 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/initCwd.mjs +8 -0
- package/dist/lib/initCwd.mjs.map +1 -0
- package/dist/lib/jsonFormatters.mjs +11 -0
- package/dist/lib/jsonFormatters.mjs.map +1 -0
- package/dist/lib/latestVersions.mjs +12 -0
- package/dist/lib/latestVersions.mjs.map +1 -0
- package/dist/lib/loadConfig.mjs +72 -0
- package/dist/lib/loadConfig.mjs.map +1 -0
- package/dist/lib/packageName.mjs +26 -0
- package/dist/lib/packageName.mjs.map +1 -0
- package/dist/lib/parsedPackageJSON.mjs +11 -0
- package/dist/lib/parsedPackageJSON.mjs.map +1 -0
- package/dist/lib/processEx.mjs +36 -0
- package/dist/lib/processEx.mjs.map +1 -0
- package/dist/lib/repoTemplates.mjs +34 -0
- package/dist/lib/repoTemplates.mjs.map +1 -0
- package/dist/lib/runInstall.mjs +30 -0
- package/dist/lib/runInstall.mjs.map +1 -0
- package/dist/lib/runSteps.mjs +118 -0
- package/dist/lib/runSteps.mjs.map +1 -0
- package/dist/lib/runStepsAsync.mjs +136 -0
- package/dist/lib/runStepsAsync.mjs.map +1 -0
- package/dist/lib/runXy.mjs +147 -0
- package/dist/lib/runXy.mjs.map +1 -0
- package/dist/lib/runXyWithWarning.mjs +36 -0
- package/dist/lib/runXyWithWarning.mjs.map +1 -0
- package/dist/lib/safeExit.mjs +61 -0
- package/dist/lib/safeExit.mjs.map +1 -0
- package/dist/lib/string/empty.mjs +8 -0
- package/dist/lib/string/empty.mjs.map +1 -0
- package/dist/lib/string/index.mjs +12 -0
- package/dist/lib/string/index.mjs.map +1 -0
- package/dist/lib/string/union.mjs +6 -0
- package/dist/lib/string/union.mjs.map +1 -0
- package/dist/lib/tryRunLocalScript.mjs +57 -0
- package/dist/lib/tryRunLocalScript.mjs.map +1 -0
- package/dist/lib/updo/applyUpdates.mjs +44 -0
- package/dist/lib/updo/applyUpdates.mjs.map +1 -0
- package/dist/lib/updo/collectWorkspaceDeps.mjs +48 -0
- package/dist/lib/updo/collectWorkspaceDeps.mjs.map +1 -0
- package/dist/lib/updo/fetchRegistryInfo.mjs +53 -0
- package/dist/lib/updo/fetchRegistryInfo.mjs.map +1 -0
- package/dist/lib/updo/index.mjs +594 -0
- package/dist/lib/updo/index.mjs.map +1 -0
- package/dist/lib/updo/interactiveSelect.mjs +185 -0
- package/dist/lib/updo/interactiveSelect.mjs.map +1 -0
- package/dist/lib/updo/interfaces.mjs +1 -0
- package/dist/lib/updo/interfaces.mjs.map +1 -0
- package/dist/lib/updo/renderTable.mjs +79 -0
- package/dist/lib/updo/renderTable.mjs.map +1 -0
- package/dist/lib/updo/resolveVersions.mjs +49 -0
- package/dist/lib/updo/resolveVersions.mjs.map +1 -0
- package/dist/lib/updo/runUpdo.mjs +511 -0
- package/dist/lib/updo/runUpdo.mjs.map +1 -0
- package/dist/lib/withErrnoException.mjs +13 -0
- package/dist/lib/withErrnoException.mjs.map +1 -0
- package/dist/lib/withError.mjs +8 -0
- package/dist/lib/withError.mjs.map +1 -0
- package/dist/lib/yarn/index.mjs +39 -0
- package/dist/lib/yarn/index.mjs.map +1 -0
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs +18 -0
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -0
- package/dist/lib/yarn/workspace/Workspace.mjs +1 -0
- package/dist/lib/yarn/workspace/Workspace.mjs.map +1 -0
- package/dist/lib/yarn/workspace/index.mjs +23 -0
- package/dist/lib/yarn/workspace/index.mjs.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs +22 -0
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +15 -0
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -0
- package/dist/lib/yarn/yarnInitCwd.mjs +8 -0
- package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -0
- package/dist/loadPackageConfig.mjs +18 -0
- package/dist/loadPackageConfig.mjs.map +1 -0
- package/dist/pm/PackageManager.mjs +1 -0
- package/dist/pm/PackageManager.mjs.map +1 -0
- package/dist/pm/detectPackageManager.mjs +10 -0
- package/dist/pm/detectPackageManager.mjs.map +1 -0
- package/dist/pm/detectReact.mjs +52 -0
- package/dist/pm/detectReact.mjs.map +1 -0
- package/dist/pm/index.mjs +263 -0
- package/dist/pm/index.mjs.map +1 -0
- package/dist/pm/pnpmPackageManager.mjs +97 -0
- package/dist/pm/pnpmPackageManager.mjs.map +1 -0
- package/dist/pm/registry.mjs +27 -0
- package/dist/pm/registry.mjs.map +1 -0
- package/dist/pm/yarnPackageManager.mjs +112 -0
- package/dist/pm/yarnPackageManager.mjs.map +1 -0
- package/dist/types.d.mjs +1 -0
- package/dist/types.d.mjs.map +1 -0
- package/dist/xy/build/buildCommand.mjs +194 -0
- package/dist/xy/build/buildCommand.mjs.map +1 -0
- package/dist/xy/build/compileCommand.mjs +203 -0
- package/dist/xy/build/compileCommand.mjs.map +1 -0
- package/dist/xy/build/compileOnlyCommand.mjs +204 -0
- package/dist/xy/build/compileOnlyCommand.mjs.map +1 -0
- package/dist/xy/build/copyAssetsCommand.mjs +92 -0
- package/dist/xy/build/copyAssetsCommand.mjs.map +1 -0
- package/dist/xy/build/index.mjs +487 -0
- package/dist/xy/build/index.mjs.map +1 -0
- package/dist/xy/build/rebuildCommand.mjs +156 -0
- package/dist/xy/build/rebuildCommand.mjs.map +1 -0
- package/dist/xy/build/recompileCommand.mjs +215 -0
- package/dist/xy/build/recompileCommand.mjs.map +1 -0
- package/dist/xy/common/checkCommand.mjs +1909 -0
- package/dist/xy/common/checkCommand.mjs.map +1 -0
- package/dist/xy/common/claude/checkCommand.mjs +207 -0
- package/dist/xy/common/claude/checkCommand.mjs.map +1 -0
- package/dist/xy/common/claude/cleanCommand.mjs +78 -0
- package/dist/xy/common/claude/cleanCommand.mjs.map +1 -0
- package/dist/xy/common/claude/commandsCommand.mjs +134 -0
- package/dist/xy/common/claude/commandsCommand.mjs.map +1 -0
- package/dist/xy/common/claude/index.mjs +734 -0
- package/dist/xy/common/claude/index.mjs.map +1 -0
- package/dist/xy/common/claude/initCommand.mjs +458 -0
- package/dist/xy/common/claude/initCommand.mjs.map +1 -0
- package/dist/xy/common/claude/rulesCommand.mjs +167 -0
- package/dist/xy/common/claude/rulesCommand.mjs.map +1 -0
- package/dist/xy/common/claude/settingsCommand.mjs +115 -0
- package/dist/xy/common/claude/settingsCommand.mjs.map +1 -0
- package/dist/xy/common/claude/skillsCommand.mjs +140 -0
- package/dist/xy/common/claude/skillsCommand.mjs.map +1 -0
- package/dist/xy/common/cleanDocsCommand.mjs +74 -0
- package/dist/xy/common/cleanDocsCommand.mjs.map +1 -0
- package/dist/xy/common/deadCommand.mjs +137 -0
- package/dist/xy/common/deadCommand.mjs.map +1 -0
- package/dist/xy/common/genDocsCommand.mjs +175 -0
- package/dist/xy/common/genDocsCommand.mjs.map +1 -0
- package/dist/xy/common/gitignoreCommand.mjs +165 -0
- package/dist/xy/common/gitignoreCommand.mjs.map +1 -0
- package/dist/xy/common/gitlintCommand.mjs +89 -0
- package/dist/xy/common/gitlintCommand.mjs.map +1 -0
- package/dist/xy/common/index.mjs +4654 -0
- package/dist/xy/common/index.mjs.map +1 -0
- package/dist/xy/common/licenseCommand.mjs +108 -0
- package/dist/xy/common/licenseCommand.mjs.map +1 -0
- package/dist/xy/common/npmignoreGenCommand.mjs +100 -0
- package/dist/xy/common/npmignoreGenCommand.mjs.map +1 -0
- package/dist/xy/common/orphan/cleanCommand.mjs +102 -0
- package/dist/xy/common/orphan/cleanCommand.mjs.map +1 -0
- package/dist/xy/common/orphan/index.mjs +138 -0
- package/dist/xy/common/orphan/index.mjs.map +1 -0
- package/dist/xy/common/orphan/listCommand.mjs +100 -0
- package/dist/xy/common/orphan/listCommand.mjs.map +1 -0
- package/dist/xy/common/packmanCommand.mjs +1538 -0
- package/dist/xy/common/packmanCommand.mjs.map +1 -0
- package/dist/xy/common/readme/genCommand.mjs +395 -0
- package/dist/xy/common/readme/genCommand.mjs.map +1 -0
- package/dist/xy/common/readme/index.mjs +538 -0
- package/dist/xy/common/readme/index.mjs.map +1 -0
- package/dist/xy/common/readme/initCommand.mjs +109 -0
- package/dist/xy/common/readme/initCommand.mjs.map +1 -0
- package/dist/xy/common/readme/lintCommand.mjs +181 -0
- package/dist/xy/common/readme/lintCommand.mjs.map +1 -0
- package/dist/xy/common/repo/index.mjs +1070 -0
- package/dist/xy/common/repo/index.mjs.map +1 -0
- package/dist/xy/common/repo/initCommand.mjs +273 -0
- package/dist/xy/common/repo/initCommand.mjs.map +1 -0
- package/dist/xy/common/repo/lintCommand.mjs +789 -0
- package/dist/xy/common/repo/lintCommand.mjs.map +1 -0
- package/dist/xy/common/retestCommand.mjs +163 -0
- package/dist/xy/common/retestCommand.mjs.map +1 -0
- package/dist/xy/common/testCommand.mjs +157 -0
- package/dist/xy/common/testCommand.mjs.map +1 -0
- package/dist/xy/deploy/deployCommand.mjs +214 -0
- package/dist/xy/deploy/deployCommand.mjs.map +1 -0
- package/dist/xy/deploy/index.mjs +289 -0
- package/dist/xy/deploy/index.mjs.map +1 -0
- package/dist/xy/deploy/publishCommand.mjs +218 -0
- package/dist/xy/deploy/publishCommand.mjs.map +1 -0
- package/dist/xy/index.mjs +8887 -0
- package/dist/xy/index.mjs.map +1 -0
- package/dist/xy/install/cleanCommand.mjs +182 -0
- package/dist/xy/install/cleanCommand.mjs.map +1 -0
- package/dist/xy/install/dupdepsCommand.mjs +234 -0
- package/dist/xy/install/dupdepsCommand.mjs.map +1 -0
- package/dist/xy/install/index.mjs +1006 -0
- package/dist/xy/install/index.mjs.map +1 -0
- package/dist/xy/install/reinstallCommand.mjs +292 -0
- package/dist/xy/install/reinstallCommand.mjs.map +1 -0
- package/dist/xy/install/staticsCommand.mjs +233 -0
- package/dist/xy/install/staticsCommand.mjs.map +1 -0
- package/dist/xy/install/upCommand.mjs +150 -0
- package/dist/xy/install/upCommand.mjs.map +1 -0
- package/dist/xy/install/updoCommand.mjs +550 -0
- package/dist/xy/install/updoCommand.mjs.map +1 -0
- package/dist/xy/lint/cycleCommand.mjs +289 -0
- package/dist/xy/lint/cycleCommand.mjs.map +1 -0
- package/dist/xy/lint/deplintCommand.mjs +1897 -0
- package/dist/xy/lint/deplintCommand.mjs.map +1 -0
- package/dist/xy/lint/fixCommand.mjs +398 -0
- package/dist/xy/lint/fixCommand.mjs.map +1 -0
- package/dist/xy/lint/index.mjs +3759 -0
- package/dist/xy/lint/index.mjs.map +1 -0
- package/dist/xy/lint/knipCommand.mjs +142 -0
- package/dist/xy/lint/knipCommand.mjs.map +1 -0
- package/dist/xy/lint/lint/index.mjs +695 -0
- package/dist/xy/lint/lint/index.mjs.map +1 -0
- package/dist/xy/lint/lint/initCommand.mjs +282 -0
- package/dist/xy/lint/lint/initCommand.mjs.map +1 -0
- package/dist/xy/lint/lint/runCommand.mjs +405 -0
- package/dist/xy/lint/lint/runCommand.mjs.map +1 -0
- package/dist/xy/lint/lintCommand.mjs +695 -0
- package/dist/xy/lint/lintCommand.mjs.map +1 -0
- package/dist/xy/lint/lintlintCommand.mjs +359 -0
- package/dist/xy/lint/lintlintCommand.mjs.map +1 -0
- package/dist/xy/lint/publintCommand.mjs +778 -0
- package/dist/xy/lint/publintCommand.mjs.map +1 -0
- package/dist/xy/lint/relintCommand.mjs +381 -0
- package/dist/xy/lint/relintCommand.mjs.map +1 -0
- package/dist/xy/lint/sonarCommand.mjs +137 -0
- package/dist/xy/lint/sonarCommand.mjs.map +1 -0
- package/dist/xy/param.mjs +8 -0
- package/dist/xy/param.mjs.map +1 -0
- package/dist/xy/react/analyzeCommand.mjs +150 -0
- package/dist/xy/react/analyzeCommand.mjs.map +1 -0
- package/dist/xy/react/ejectCommand.mjs +150 -0
- package/dist/xy/react/ejectCommand.mjs.map +1 -0
- package/dist/xy/react/index.mjs +202 -0
- package/dist/xy/react/index.mjs.map +1 -0
- package/dist/xy/react/sitemapCommand.mjs +129 -0
- package/dist/xy/react/sitemapCommand.mjs.map +1 -0
- package/dist/xy/react/startCommand.mjs +150 -0
- package/dist/xy/react/startCommand.mjs.map +1 -0
- package/dist/xy/xy.mjs +8879 -0
- package/dist/xy/xy.mjs.map +1 -0
- package/dist/xy/xyParseOptions.mjs +117 -0
- package/dist/xy/xyParseOptions.mjs.map +1 -0
- package/dist/xy/yarn/index.mjs +188 -0
- package/dist/xy/yarn/index.mjs.map +1 -0
- package/dist/xy/yarn/upplugCommand.mjs +134 -0
- package/dist/xy/yarn/upplugCommand.mjs.map +1 -0
- package/dist/xy/yarn/upyarnCommand.mjs +129 -0
- package/dist/xy/yarn/upyarnCommand.mjs.map +1 -0
- package/dist/xy/yarn/yarn3OnlyCommand.mjs +70 -0
- package/dist/xy/yarn/yarn3OnlyCommand.mjs.map +1 -0
- package/package.json +119 -0
- package/templates/claude/CLAUDE-local.md +4 -0
- package/templates/claude/CLAUDE-project.md +4 -0
- package/templates/claude/commands/xy-build.md +7 -0
- package/templates/claude/commands/xy-clean.md +7 -0
- package/templates/claude/commands/xy-compile.md +7 -0
- package/templates/claude/commands/xy-cycle.md +7 -0
- package/templates/claude/commands/xy-dead.md +7 -0
- package/templates/claude/commands/xy-deplint.md +7 -0
- package/templates/claude/commands/xy-deps.md +24 -0
- package/templates/claude/commands/xy-dupdeps.md +7 -0
- package/templates/claude/commands/xy-fix.md +7 -0
- package/templates/claude/commands/xy-gen-docs.md +7 -0
- package/templates/claude/commands/xy-gitignore.md +7 -0
- package/templates/claude/commands/xy-gitlint.md +7 -0
- package/templates/claude/commands/xy-knip.md +7 -0
- package/templates/claude/commands/xy-license.md +7 -0
- package/templates/claude/commands/xy-lint-rules.md +44 -0
- package/templates/claude/commands/xy-lint.md +7 -0
- package/templates/claude/commands/xy-publint.md +7 -0
- package/templates/claude/commands/xy-rebuild.md +7 -0
- package/templates/claude/commands/xy-recompile.md +7 -0
- package/templates/claude/commands/xy-reinstall.md +7 -0
- package/templates/claude/commands/xy-relint.md +7 -0
- package/templates/claude/commands/xy-retest.md +7 -0
- package/templates/claude/commands/xy-sonar.md +7 -0
- package/templates/claude/commands/xy-test.md +7 -0
- package/templates/claude/commands/xy-up.md +9 -0
- package/templates/claude/rules/xylabs-architecture.md +8 -0
- package/templates/claude/rules/xylabs-git-workflow.md +7 -0
- package/templates/claude/rules/xylabs-naming.md +7 -0
- package/templates/claude/rules/xylabs-style.md +17 -0
- package/templates/claude/skills/xylabs-e2e-setup/SKILL.md +223 -0
- package/templates/claude/skills/xylabs-xy-cli/SKILL.md +236 -0
- package/templates/claude/skills/xylabs-xy-deplint-fix/SKILL.md +122 -0
- package/templates/gitignore/gitignore/template.gitignore +51 -0
- package/templates/gitignore/template.gitignore +51 -0
- package/templates/readme/README.body.md +25 -0
- package/templates/readme/README.template.md +22 -0
- package/templates/repo/cli/package/package.json.tmpl +63 -0
- package/templates/repo/cli/package/src/__packageName__.ts.tmpl +21 -0
- package/templates/repo/cli/package/src/actions/index.ts +1 -0
- package/templates/repo/cli/package/src/actions/printVersion.ts.tmpl +8 -0
- package/templates/repo/cli/package/src/bin/__packageName__.ts.tmpl +12 -0
- package/templates/repo/cli/package/src/commands/index.ts +1 -0
- package/templates/repo/cli/package/src/commands/versionCommand.ts.tmpl +11 -0
- package/templates/repo/cli/package/src/index.ts.tmpl +1 -0
- package/templates/repo/cli/package/tsconfig.build.json +25 -0
- package/templates/repo/cli/package/tsconfig.json +4 -0
- package/templates/repo/cli/package/tsup.config.ts +15 -0
- package/templates/repo/cli/package/xy.config.ts +3 -0
- package/templates/repo/cli/root/CLAUDE.md.tmpl +38 -0
- package/templates/repo/cli/root/cspell.json.tmpl +13 -0
- package/templates/repo/cli/root/eslint.config.ts +28 -0
- package/templates/repo/cli/root/github/workflows/build-pnpm.yml.tmpl +34 -0
- package/templates/repo/cli/root/github/workflows/build-yarn.yml.tmpl +32 -0
- package/templates/repo/cli/root/gitignore.tmpl +47 -0
- package/templates/repo/cli/root/knip.config.ts +16 -0
- package/templates/repo/cli/root/package.json.tmpl +54 -0
- package/templates/repo/cli/root/pnpm-workspace.yaml +2 -0
- package/templates/repo/cli/root/tsconfig.json +4 -0
- package/templates/repo/cli/root/vitest.config.ts +31 -0
- package/templates/repo/cli/root/xy.config.ts.tmpl +5 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
2
|
+
import { spawnSync } from "child_process";
|
|
3
|
+
var isYarnVersionOrGreater = (major, minor, patch) => {
|
|
4
|
+
const result = spawnSync("yarn", ["-v"], { encoding: "utf8", shell: true });
|
|
5
|
+
const version = result.stdout.toString().replaceAll("\n", "");
|
|
6
|
+
const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
|
|
7
|
+
const majorDelta = versionNumbers[0] - major;
|
|
8
|
+
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
9
|
+
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
10
|
+
const majorOk = majorDelta >= 0;
|
|
11
|
+
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
12
|
+
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
13
|
+
return [majorOk && minorOk && patchOk, version];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// src/lib/processEx.ts
|
|
17
|
+
import chalk from "chalk";
|
|
18
|
+
|
|
19
|
+
// src/lib/withError.ts
|
|
20
|
+
var withError = (ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
|
|
21
|
+
return predicate(ex) ? closure(ex) : void 0;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// src/lib/withErrnoException.ts
|
|
25
|
+
var withErrnoException = (ex, closure) => {
|
|
26
|
+
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/lib/processEx.ts
|
|
30
|
+
var processEx = (ex) => {
|
|
31
|
+
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
32
|
+
const exitCode = withErrnoException(error, (error2) => {
|
|
33
|
+
if (error2.code === "ENOENT") {
|
|
34
|
+
console.error(chalk.red(`'${error2.path}' not found.`));
|
|
35
|
+
} else {
|
|
36
|
+
console.error(chalk.red(`Errno: ${error2.code}`));
|
|
37
|
+
}
|
|
38
|
+
return error2.errno ?? -1;
|
|
39
|
+
}) ?? withError(error, (error2) => {
|
|
40
|
+
console.error(chalk.red(`${error2.name}: ${error2.message}`));
|
|
41
|
+
return -1;
|
|
42
|
+
}) ?? (() => {
|
|
43
|
+
console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
44
|
+
return -1;
|
|
45
|
+
})();
|
|
46
|
+
process.exit(process.exitCode ?? exitCode);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/actions/yarn3only.ts
|
|
50
|
+
var yarn3Only = () => {
|
|
51
|
+
const [valid, version] = isYarnVersionOrGreater(3);
|
|
52
|
+
if (!valid) {
|
|
53
|
+
processEx(`Invalid Yarn version [${version}]`);
|
|
54
|
+
}
|
|
55
|
+
return 0;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/xy/yarn/yarn3OnlyCommand.ts
|
|
59
|
+
var yarn3OnlyCommand = {
|
|
60
|
+
command: "yarn3only",
|
|
61
|
+
describe: "Yarn3Only - Check if using Yarn v3",
|
|
62
|
+
handler: (argv) => {
|
|
63
|
+
if (argv.verbose) console.log("Yarn 3 Check");
|
|
64
|
+
process.exitCode = yarn3Only();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
yarn3OnlyCommand
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=yarn3OnlyCommand.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/yarn/isYarnVersionOrGreater.ts","../../../src/lib/processEx.ts","../../../src/lib/withError.ts","../../../src/lib/withErrnoException.ts","../../../src/actions/yarn3only.ts","../../../src/xy/yarn/yarn3OnlyCommand.ts"],"sourcesContent":["import { spawnSync } from 'node:child_process'\n\nexport const isYarnVersionOrGreater = (major: number, minor?: number, patch?: number): [boolean, string] => {\n const result = spawnSync('yarn', ['-v'], { encoding: 'utf8', shell: true })\n const version = result.stdout.toString().replaceAll('\\n', '')\n const versionNumbers = version.split('.').map(ver => Number.parseInt(ver))\n const majorDelta = versionNumbers[0] - major\n const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1])\n const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2])\n\n const majorOk = majorDelta >= 0\n const minorOk = majorDelta > 0 || minorDelta >= 0\n const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0\n\n return [majorOk && minorOk && patchOk, version]\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => (!!ex.name && !!ex.message),\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(\n ex: unknown, closure: (error: T) => number,\n) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","import { isYarnVersionOrGreater, processEx } from '../lib/index.ts'\n\nexport const yarn3Only = () => {\n const [valid, version] = isYarnVersionOrGreater(3)\n if (!valid) {\n processEx(`Invalid Yarn version [${version}]`)\n }\n return 0\n}\n","import type { CommandModule } from 'yargs'\n\nimport { yarn3Only } from '../../actions/index.ts'\n\nexport const yarn3OnlyCommand: CommandModule = {\n command: 'yarn3only',\n describe: 'Yarn3Only - Check if using Yarn v3',\n handler: (argv) => {\n if (argv.verbose) console.log('Yarn 3 Check')\n process.exitCode = yarn3Only()\n },\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAEnB,IAAM,yBAAyB,CAAC,OAAe,OAAgB,UAAsC;AAC1G,QAAM,SAAS,UAAU,QAAQ,CAAC,IAAI,GAAG,EAAE,UAAU,QAAQ,OAAO,KAAK,CAAC;AAC1E,QAAM,UAAU,OAAO,OAAO,SAAS,EAAE,WAAW,MAAM,EAAE;AAC5D,QAAM,iBAAiB,QAAQ,MAAM,GAAG,EAAE,IAAI,SAAO,OAAO,SAAS,GAAG,CAAC;AACzE,QAAM,aAAa,eAAe,CAAC,IAAI;AACvC,QAAM,aAAa,eAAe,CAAC,KAAK,SAAS,eAAe,CAAC;AACjE,QAAM,aAAa,eAAe,CAAC,KAAK,SAAS,eAAe,CAAC;AAEjE,QAAM,UAAU,cAAc;AAC9B,QAAM,UAAU,aAAa,KAAK,cAAc;AAChD,QAAM,UAAU,aAAa,KAAK,aAAa,KAAK,cAAc;AAElE,SAAO,CAAC,WAAW,WAAW,SAAS,OAAO;AAChD;;;ACfA,OAAO,WAAW;;;ACAX,IAAM,YAAY,CAEvB,IACA,SACA,YAAY,CAACA,QAAW,CAAC,CAACA,IAAG,QAAQ,CAAC,CAACA,IAAG,YACvC;AACH,SAAO,UAAU,EAAO,IAAI,QAAQ,EAAO,IAAI;AACjD;;;ACLO,IAAM,qBAAqB,CAChC,IAAa,YACV;AACH,SAAO,UAAa,IAAI,SAAS,CAACC,QAAiBA,IAA6B,UAAU,MAAS;AACrG;;;AFDO,IAAM,YAAY,CAAC,OAAgB;AACxC,QAAM,QAAQ,OAAO,OAAO,WAAW,IAAI,MAAM,EAAE,IAAI;AACvD,QAAM,WACF,mBAAmB,OAAO,CAACC,WAAU;AACrC,QAAIA,OAAM,SAAS,UAAU;AAC3B,cAAQ,MAAM,MAAM,IAAI,IAAIA,OAAM,IAAI,cAAc,CAAC;AAAA,IACvD,OAAO;AACL,cAAQ,MAAM,MAAM,IAAI,UAAUA,OAAM,IAAI,EAAE,CAAC;AAAA,IACjD;AACA,WAAOA,OAAM,SAAS;AAAA,EACxB,CAAC,KACE,UAAU,OAAO,CAACA,WAAU;AAC7B,YAAQ,MAAM,MAAM,IAAI,GAAGA,OAAM,IAAI,KAAKA,OAAM,OAAO,EAAE,CAAC;AAC1D,WAAO;AAAA,EACT,CAAC,MACG,MAAM;AACR,YAAQ,MAAM,MAAM,IAAI,qBAAqB,KAAK,UAAU,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;AAC3E,WAAO;AAAA,EACT,GAAG;AAEL,UAAQ,KAAK,QAAQ,YAAY,QAAQ;AAC3C;;;AGxBO,IAAM,YAAY,MAAM;AAC7B,QAAM,CAAC,OAAO,OAAO,IAAI,uBAAuB,CAAC;AACjD,MAAI,CAAC,OAAO;AACV,cAAU,yBAAyB,OAAO,GAAG;AAAA,EAC/C;AACA,SAAO;AACT;;;ACJO,IAAM,mBAAkC;AAAA,EAC7C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,SAAS;AACjB,QAAI,KAAK,QAAS,SAAQ,IAAI,cAAc;AAC5C,YAAQ,WAAW,UAAU;AAAA,EAC/B;AACF;","names":["ex","ex","error"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xylabs/toolchain",
|
|
3
|
+
"version": "7.10.0",
|
|
4
|
+
"description": "Unified TypeScript toolchain for XY Labs — build, lint, test, deploy with auto-detected package manager and React support",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"xylabs",
|
|
7
|
+
"utility",
|
|
8
|
+
"typescript",
|
|
9
|
+
"toolchain"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://xylabs.com",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "git+https://github.com/xylabs/config/issues",
|
|
14
|
+
"email": "support@xylabs.com"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/xylabs/config.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "LGPL-3.0-only",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "XY Labs Development Team",
|
|
23
|
+
"email": "support@xylabs.com",
|
|
24
|
+
"url": "https://xylabs.com"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"bin": {
|
|
36
|
+
"package-build": "dist/bin/package/build.mjs",
|
|
37
|
+
"package-build-only": "dist/bin/package/build-only.mjs",
|
|
38
|
+
"package-clean": "dist/bin/package/clean.mjs",
|
|
39
|
+
"package-compile": "dist/bin/package/compile.mjs",
|
|
40
|
+
"package-compile-only": "dist/bin/package/compile-only.mjs",
|
|
41
|
+
"package-copy-assets-cjs": "dist/bin/package/copy-assets-cjs.mjs",
|
|
42
|
+
"package-copy-assets-esm": "dist/bin/package/copy-assets-esm.mjs",
|
|
43
|
+
"package-cycle": "dist/bin/package/cycle.mjs",
|
|
44
|
+
"package-fix": "dist/bin/package/fix.mjs",
|
|
45
|
+
"package-gen-docs": "dist/bin/package/gen-docs.mjs",
|
|
46
|
+
"package-lint": "dist/bin/package/lint.mjs",
|
|
47
|
+
"package-lint-verbose": "dist/bin/package/lint-verbose.mjs",
|
|
48
|
+
"package-publint": "dist/bin/package/publint.mjs",
|
|
49
|
+
"package-recompile": "dist/bin/package/recompile.mjs",
|
|
50
|
+
"package-relint": "dist/bin/package/relint.mjs",
|
|
51
|
+
"run-or-exec": "dist/bin/run-or-exec.mjs",
|
|
52
|
+
"xy": "dist/bin/xy.mjs"
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist",
|
|
56
|
+
"templates",
|
|
57
|
+
"README.md"
|
|
58
|
+
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"package-clean": "echo Not cleaning...",
|
|
61
|
+
"package-compile": "tsc -p tsconfig.build.json --noEmit && tsup && publint",
|
|
62
|
+
"package-recompile": "tsc -p tsconfig.build.json --noEmit && tsup && publint"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@inquirer/core": "~10.3.0",
|
|
66
|
+
"async-mutex": "~0.5.0",
|
|
67
|
+
"chalk": "~5.6.2",
|
|
68
|
+
"cosmiconfig": "~9.0.1",
|
|
69
|
+
"cosmiconfig-typescript-loader": "~6.3.0",
|
|
70
|
+
"cpy": "~13.2.1",
|
|
71
|
+
"deepmerge": "~4.3.1",
|
|
72
|
+
"dependency-cruiser": "~17.3.10",
|
|
73
|
+
"eslint": "^10.2.0",
|
|
74
|
+
"find-up": "~8.0.0",
|
|
75
|
+
"get-tsconfig": "~4.13.7",
|
|
76
|
+
"glob": "~13.0.6",
|
|
77
|
+
"license-checker": "~25.0.1",
|
|
78
|
+
"parse-git-config": "~3.0.0",
|
|
79
|
+
"picomatch": "~4.0.4",
|
|
80
|
+
"publint": "~0.3.18",
|
|
81
|
+
"rollup": "~4.60.1",
|
|
82
|
+
"rollup-plugin-dts": "~6.4.1",
|
|
83
|
+
"rollup-plugin-node-externals": "~8.1.2",
|
|
84
|
+
"semver": "~7.7.4",
|
|
85
|
+
"sort-package-json": "~3.6.1",
|
|
86
|
+
"tsc-prog": "~2.3.0",
|
|
87
|
+
"tsup": "~8.5.1",
|
|
88
|
+
"typedoc": "~0.28.18",
|
|
89
|
+
"types-package-json": "~2.0.39",
|
|
90
|
+
"yargs": "~18.0.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@types/eslint": "~9.6.1",
|
|
94
|
+
"@types/license-checker": "~25.0.6",
|
|
95
|
+
"@types/node": "~25.6.0",
|
|
96
|
+
"@types/parse-git-config": "~3.0.4",
|
|
97
|
+
"@types/picomatch": "~4.0.3",
|
|
98
|
+
"@types/semver": "^7.7.1",
|
|
99
|
+
"@types/yargs": "~17.0.35",
|
|
100
|
+
"@typescript-eslint/parser": "^8.58.1",
|
|
101
|
+
"@xylabs/eslint-config-flat": "~7.10.0",
|
|
102
|
+
"@xylabs/tsconfig": "~7.10.0",
|
|
103
|
+
"acorn": "^8.16.0",
|
|
104
|
+
"esbuild": "0.28.0",
|
|
105
|
+
"knip": "*",
|
|
106
|
+
"typescript": "^5.9.3",
|
|
107
|
+
"vite": "^8.0.8",
|
|
108
|
+
"vitest": "~4.1.4"
|
|
109
|
+
},
|
|
110
|
+
"peerDependencies": {
|
|
111
|
+
"typescript": "~5"
|
|
112
|
+
},
|
|
113
|
+
"engines": {
|
|
114
|
+
"node": ">=18.17.1"
|
|
115
|
+
},
|
|
116
|
+
"publishConfig": {
|
|
117
|
+
"access": "public"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Run a full build of the current project using `xy build`. This compiles TypeScript, runs publint, deplint, and lint. Review the output for errors and fix any issues found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy build
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Clean build artifacts from the current project using `xy clean`. This removes dist, build, and other generated directories.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy clean
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Compile the current project using `xy compile`. This runs TypeScript compilation via tsup and publint validation. Review the output for errors and fix any issues found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy compile
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Check for circular dependency cycles in the current project using `xy cycle`. Review the output and refactor any circular dependencies found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy cycle
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Check for dead (unreachable) code in the current project using `xy dead`. Review the output and remove any dead code found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy dead
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Check dependency declarations in the current project using `xy deplint`. This verifies that all imports have corresponding entries in package.json dependencies. Review the output for missing or extraneous dependencies and fix them.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy deplint
|
|
7
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Reference for preferred dependencies in XY Labs projects. Consult this when adding a new dependency.
|
|
2
|
+
|
|
3
|
+
| Purpose | Package |
|
|
4
|
+
|---|---|
|
|
5
|
+
| HTTP client | `axios` |
|
|
6
|
+
| Schema validation | `zod` |
|
|
7
|
+
| Logging | `@xylabs/logger` |
|
|
8
|
+
| Assert/invariants | `@xylabs/assert` |
|
|
9
|
+
| Async utilities | `@xylabs/promise` |
|
|
10
|
+
| Lodash replacements | `@xylabs/lodash` |
|
|
11
|
+
| React state | React hooks + context (avoid Redux) |
|
|
12
|
+
| React UI components | `@mui/material` (Material UI) |
|
|
13
|
+
| Styling | MUI `sx` prop and `styled()` — no CSS-in-JS libraries or raw CSS |
|
|
14
|
+
| Testing | `vitest` |
|
|
15
|
+
| Bundling | `tsup` (libraries), `webpack` (apps) |
|
|
16
|
+
| Linting | `eslint` with `@xylabs/eslint-config-flat` |
|
|
17
|
+
| Shared XY Labs utilities | `@xylabs/sdk-js` |
|
|
18
|
+
| XYO application code | `@xyo-network/sdk-js` |
|
|
19
|
+
| XYO Layer 1 Protocol | `@xyo-network/xl1-sdk` |
|
|
20
|
+
| XYO Layer 1 Chain | `@xyo-network/chain-sdk` |
|
|
21
|
+
|
|
22
|
+
**Notes:**
|
|
23
|
+
- `zod` must be a `peerDependency`, never a direct `dependency`
|
|
24
|
+
- `sideEffects: false` required on every published package
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Check for duplicate dependency declarations in package.json files using `xy dupdeps`. Review and resolve any duplicates found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy dupdeps
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Auto-fix lint issues in the current project using `xy fix`. This runs ESLint with the --fix flag. Review the output for any remaining issues that could not be auto-fixed and fix them manually.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy fix
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Generate the root .gitignore from the standard template and remove any .gitignore files from workspace packages using `xy gitignore`. Custom entries are preserved under a `# Custom` section.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy gitignore
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Lint the git configuration using `xy gitlint`. Checks settings like `core.ignorecase`, `core.autocrlf`, and `core.eol`. Use `--fix` to auto-fix issues.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy gitlint
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Check for unused exports and dead code in the current project using `xy knip`. Review the output and remove any unused exports, files, or dependencies.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy knip
|
|
7
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Reference for non-obvious ESLint rules enforced by `@xylabs/eslint-config-flat`. Consult this before writing code to avoid common violations.
|
|
2
|
+
|
|
3
|
+
## Complexity limits
|
|
4
|
+
- `max-statements: 32` — break large functions into smaller helpers
|
|
5
|
+
- `complexity: 18` — max cyclomatic complexity per function
|
|
6
|
+
- `max-lines: 512` — per file (blank lines excluded)
|
|
7
|
+
- `max-depth: 6` — max nesting depth
|
|
8
|
+
|
|
9
|
+
## Import style
|
|
10
|
+
- `unicorn/import-style` — default imports for Node built-ins: `import PATH from 'node:path'`
|
|
11
|
+
- `no-restricted-imports` — never import from barrel `index.ts` files
|
|
12
|
+
|
|
13
|
+
## Object formatting
|
|
14
|
+
- Objects/imports/destructuring with 3+ properties must use multi-line:
|
|
15
|
+
```typescript
|
|
16
|
+
// wrong
|
|
17
|
+
const { created, templateNames, updated } = syncRuleFiles(rulesDir)
|
|
18
|
+
|
|
19
|
+
// correct
|
|
20
|
+
const {
|
|
21
|
+
created, templateNames, updated,
|
|
22
|
+
} = syncRuleFiles(rulesDir)
|
|
23
|
+
```
|
|
24
|
+
- Always use spaces inside braces: `{ foo }` not `{foo}`
|
|
25
|
+
|
|
26
|
+
## Expressions
|
|
27
|
+
- No standalone ternaries as statements — use `if/else`
|
|
28
|
+
- Prefix unused variables with `_`
|
|
29
|
+
|
|
30
|
+
## Enums are disallowed
|
|
31
|
+
- Use string literal unions or `const` objects:
|
|
32
|
+
```typescript
|
|
33
|
+
// wrong
|
|
34
|
+
enum Status { Active, Inactive }
|
|
35
|
+
|
|
36
|
+
// correct
|
|
37
|
+
type Status = 'active' | 'inactive'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Class member ordering
|
|
41
|
+
- Order: fields, constructor, accessors, methods (alphabetical within groups)
|
|
42
|
+
|
|
43
|
+
## JSX
|
|
44
|
+
- No unnecessary braces in props: `prop="value"` not `prop={"value"}`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Lint the current project using `xy lint`. This runs ESLint across all packages. Review the output for errors and fix any issues found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy lint
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Validate package.json files for npm publishing correctness using `xy publint`. Review the output for issues and fix them.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy publint
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Rebuild the current project from scratch using `xy rebuild`. This cleans build artifacts, then compiles and lints. Review the output for errors and fix any issues found.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy rebuild
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Re-compile the current project using `xy recompile`. This cleans compiled output and recompiles all packages from scratch.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy recompile
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Clean ESLint cache and re-lint the current project using `xy relint`. Use this when lint results seem stale or inconsistent.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy relint
|
|
7
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Re-run tests with a cleaned cache using `xy retest`. Use this when test results seem stale or cached state may be causing issues.
|
|
2
|
+
|
|
3
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xy retest
|
|
7
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Update all dependencies to their latest compatible versions using `xy up`.
|
|
2
|
+
|
|
3
|
+
**Important:** Confirm with the user before running this command, as it modifies package.json and lock files.
|
|
4
|
+
|
|
5
|
+
Detect the package manager from the repo root (`yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm) and prefix accordingly.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
xy up
|
|
9
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# XY Labs - Architecture
|
|
2
|
+
|
|
3
|
+
> Auto-managed by `yarn xy claude-rules`. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
- Yarn workspaces monorepo; all packages share a single version
|
|
6
|
+
- Each package compiles to ESM via `tsup` (output to `dist/`)
|
|
7
|
+
- Prefer composition over inheritance; depend on abstractions
|
|
8
|
+
- Vitest for testing; React + MUI for frontend; Express for backend
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# XY Labs - Naming
|
|
2
|
+
|
|
3
|
+
> Auto-managed by `yarn xy claude-rules`. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
- Files: camelCase for modules, PascalCase for components/classes
|
|
6
|
+
- Variables/functions: camelCase; Classes/interfaces/types: PascalCase
|
|
7
|
+
- Constants: UPPER_SNAKE_CASE; Booleans: `is`/`has`/`should`/`can` prefix
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# XY Labs - Code Style
|
|
2
|
+
|
|
3
|
+
> Auto-managed by `yarn xy claude-rules`. Do not edit manually.
|
|
4
|
+
|
|
5
|
+
- ESM only — no CommonJS (`require`/`module.exports`)
|
|
6
|
+
- No semicolons, single quotes, trailing commas, 2-space indent
|
|
7
|
+
- `const` over `let`; never `var`
|
|
8
|
+
- `function` declarations for top-level; arrows only for callbacks/closures
|
|
9
|
+
- Explicit return types on exported functions
|
|
10
|
+
- `interface` over `type` for object shapes; named exports over default exports
|
|
11
|
+
- Default imports for Node built-ins: `import PATH from 'node:path'` (not named imports)
|
|
12
|
+
- No `enum` — use string literal unions or `const` objects
|
|
13
|
+
- No `any` — use `unknown`; avoid `as`, prefer type guards
|
|
14
|
+
- No `import * as X`; no importing from barrel `index.ts` files
|
|
15
|
+
- Prefix unused variables with `_`
|
|
16
|
+
- Objects/imports/destructuring with 3+ properties must use multi-line formatting
|
|
17
|
+
- When a function uses `await`, return `Promise<T>` — never `Promise<Promisable<T>>`
|