@codyswann/lisa 1.0.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.
Files changed (322) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +867 -0
  3. package/all/copy-overwrite/.claude/README.md +205 -0
  4. package/all/copy-overwrite/.claude/agents/agent-architect.md +311 -0
  5. package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +146 -0
  6. package/all/copy-overwrite/.claude/agents/codebase-locator.md +125 -0
  7. package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +237 -0
  8. package/all/copy-overwrite/.claude/agents/git-history-analyzer.md +183 -0
  9. package/all/copy-overwrite/.claude/agents/hooks-expert.md +74 -0
  10. package/all/copy-overwrite/.claude/agents/skill-evaluator.md +246 -0
  11. package/all/copy-overwrite/.claude/agents/slash-command-architect.md +87 -0
  12. package/all/copy-overwrite/.claude/agents/web-search-researcher.md +112 -0
  13. package/all/copy-overwrite/.claude/commands/git/commit-and-submit-pr.md +8 -0
  14. package/all/copy-overwrite/.claude/commands/git/commit.md +44 -0
  15. package/all/copy-overwrite/.claude/commands/git/prune.md +34 -0
  16. package/all/copy-overwrite/.claude/commands/git/submit-pr.md +50 -0
  17. package/all/copy-overwrite/.claude/commands/jira/create.md +50 -0
  18. package/all/copy-overwrite/.claude/commands/jira/verify.md +34 -0
  19. package/all/copy-overwrite/.claude/commands/project/archive.md +8 -0
  20. package/all/copy-overwrite/.claude/commands/project/bootstrap.md +49 -0
  21. package/all/copy-overwrite/.claude/commands/project/complete-task.md +7 -0
  22. package/all/copy-overwrite/.claude/commands/project/debrief.md +65 -0
  23. package/all/copy-overwrite/.claude/commands/project/execute.md +94 -0
  24. package/all/copy-overwrite/.claude/commands/project/implement.md +42 -0
  25. package/all/copy-overwrite/.claude/commands/project/local-code-review.md +88 -0
  26. package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +74 -0
  27. package/all/copy-overwrite/.claude/commands/project/plan.md +314 -0
  28. package/all/copy-overwrite/.claude/commands/project/research.md +248 -0
  29. package/all/copy-overwrite/.claude/commands/project/review.md +63 -0
  30. package/all/copy-overwrite/.claude/commands/project/setup.md +19 -0
  31. package/all/copy-overwrite/.claude/commands/project/verify.md +38 -0
  32. package/all/copy-overwrite/.claude/commands/pull-request/review.md +12 -0
  33. package/all/copy-overwrite/.claude/commands/rules/format-md.md +72 -0
  34. package/all/copy-overwrite/.claude/commands/sonarqube/check.md +6 -0
  35. package/all/copy-overwrite/.claude/commands/sonarqube/fix.md +3 -0
  36. package/all/copy-overwrite/.claude/hooks/README.md +301 -0
  37. package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +181 -0
  38. package/all/copy-overwrite/.claude/settings.json +41 -0
  39. package/all/copy-overwrite/.claude/settings.local.json.example +14 -0
  40. package/all/copy-overwrite/.claude/skills/coding-philosophy/SKILL.md +405 -0
  41. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +416 -0
  42. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +316 -0
  43. package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +118 -0
  44. package/all/copy-overwrite/.claude/skills/skill-creator/LICENSE.txt +202 -0
  45. package/all/copy-overwrite/.claude/skills/skill-creator/SKILL.md +210 -0
  46. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  47. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  48. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  49. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  50. package/all/copy-overwrite/CLAUDE.md +77 -0
  51. package/all/copy-overwrite/HUMAN.md +17 -0
  52. package/all/copy-overwrite/specs/.keep +0 -0
  53. package/all/create-only/PROJECT_RULES.md +0 -0
  54. package/cdk/merge/package.json +20 -0
  55. package/dist/cli/index.d.ts +7 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +107 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/prompts.d.ts +45 -0
  60. package/dist/cli/prompts.d.ts.map +1 -0
  61. package/dist/cli/prompts.js +58 -0
  62. package/dist/cli/prompts.js.map +1 -0
  63. package/dist/core/config.d.ts +73 -0
  64. package/dist/core/config.d.ts.map +1 -0
  65. package/dist/core/config.js +36 -0
  66. package/dist/core/config.js.map +1 -0
  67. package/dist/core/index.d.ts +4 -0
  68. package/dist/core/index.d.ts.map +1 -0
  69. package/dist/core/index.js +4 -0
  70. package/dist/core/index.js.map +1 -0
  71. package/dist/core/lisa.d.ts +81 -0
  72. package/dist/core/lisa.d.ts.map +1 -0
  73. package/dist/core/lisa.js +459 -0
  74. package/dist/core/lisa.js.map +1 -0
  75. package/dist/core/manifest.d.ts +58 -0
  76. package/dist/core/manifest.d.ts.map +1 -0
  77. package/dist/core/manifest.js +104 -0
  78. package/dist/core/manifest.js.map +1 -0
  79. package/dist/detection/detector.interface.d.ts +15 -0
  80. package/dist/detection/detector.interface.d.ts.map +1 -0
  81. package/dist/detection/detector.interface.js +2 -0
  82. package/dist/detection/detector.interface.js.map +1 -0
  83. package/dist/detection/detectors/cdk.d.ts +10 -0
  84. package/dist/detection/detectors/cdk.d.ts.map +1 -0
  85. package/dist/detection/detectors/cdk.js +34 -0
  86. package/dist/detection/detectors/cdk.js.map +1 -0
  87. package/dist/detection/detectors/expo.d.ts +10 -0
  88. package/dist/detection/detectors/expo.d.ts.map +1 -0
  89. package/dist/detection/detectors/expo.js +30 -0
  90. package/dist/detection/detectors/expo.js.map +1 -0
  91. package/dist/detection/detectors/nestjs.d.ts +10 -0
  92. package/dist/detection/detectors/nestjs.d.ts.map +1 -0
  93. package/dist/detection/detectors/nestjs.js +34 -0
  94. package/dist/detection/detectors/nestjs.js.map +1 -0
  95. package/dist/detection/detectors/npm-package.d.ts +13 -0
  96. package/dist/detection/detectors/npm-package.d.ts.map +1 -0
  97. package/dist/detection/detectors/npm-package.js +30 -0
  98. package/dist/detection/detectors/npm-package.js.map +1 -0
  99. package/dist/detection/detectors/typescript.d.ts +10 -0
  100. package/dist/detection/detectors/typescript.d.ts.map +1 -0
  101. package/dist/detection/detectors/typescript.js +25 -0
  102. package/dist/detection/detectors/typescript.js.map +1 -0
  103. package/dist/detection/index.d.ts +24 -0
  104. package/dist/detection/index.d.ts.map +1 -0
  105. package/dist/detection/index.js +57 -0
  106. package/dist/detection/index.js.map +1 -0
  107. package/dist/errors/index.d.ts +69 -0
  108. package/dist/errors/index.d.ts.map +1 -0
  109. package/dist/errors/index.js +110 -0
  110. package/dist/errors/index.js.map +1 -0
  111. package/dist/index.d.ts +3 -0
  112. package/dist/index.d.ts.map +1 -0
  113. package/dist/index.js +8 -0
  114. package/dist/index.js.map +1 -0
  115. package/dist/logging/console-logger.d.ts +12 -0
  116. package/dist/logging/console-logger.d.ts.map +1 -0
  117. package/dist/logging/console-logger.js +22 -0
  118. package/dist/logging/console-logger.js.map +1 -0
  119. package/dist/logging/index.d.ts +4 -0
  120. package/dist/logging/index.d.ts.map +1 -0
  121. package/dist/logging/index.js +3 -0
  122. package/dist/logging/index.js.map +1 -0
  123. package/dist/logging/logger.interface.d.ts +20 -0
  124. package/dist/logging/logger.interface.d.ts.map +1 -0
  125. package/dist/logging/logger.interface.js +2 -0
  126. package/dist/logging/logger.interface.js.map +1 -0
  127. package/dist/logging/silent-logger.d.ts +12 -0
  128. package/dist/logging/silent-logger.d.ts.map +1 -0
  129. package/dist/logging/silent-logger.js +21 -0
  130. package/dist/logging/silent-logger.js.map +1 -0
  131. package/dist/strategies/copy-contents.d.ts +14 -0
  132. package/dist/strategies/copy-contents.d.ts.map +1 -0
  133. package/dist/strategies/copy-contents.js +69 -0
  134. package/dist/strategies/copy-contents.js.map +1 -0
  135. package/dist/strategies/copy-overwrite.d.ts +14 -0
  136. package/dist/strategies/copy-overwrite.d.ts.map +1 -0
  137. package/dist/strategies/copy-overwrite.js +47 -0
  138. package/dist/strategies/copy-overwrite.js.map +1 -0
  139. package/dist/strategies/create-only.d.ts +13 -0
  140. package/dist/strategies/create-only.d.ts.map +1 -0
  141. package/dist/strategies/create-only.js +30 -0
  142. package/dist/strategies/create-only.js.map +1 -0
  143. package/dist/strategies/index.d.ts +31 -0
  144. package/dist/strategies/index.d.ts.map +1 -0
  145. package/dist/strategies/index.js +52 -0
  146. package/dist/strategies/index.js.map +1 -0
  147. package/dist/strategies/merge.d.ts +13 -0
  148. package/dist/strategies/merge.d.ts.map +1 -0
  149. package/dist/strategies/merge.js +60 -0
  150. package/dist/strategies/merge.js.map +1 -0
  151. package/dist/strategies/strategy.interface.d.ts +31 -0
  152. package/dist/strategies/strategy.interface.d.ts.map +1 -0
  153. package/dist/strategies/strategy.interface.js +2 -0
  154. package/dist/strategies/strategy.interface.js.map +1 -0
  155. package/dist/transaction/backup.d.ts +38 -0
  156. package/dist/transaction/backup.d.ts.map +1 -0
  157. package/dist/transaction/backup.js +97 -0
  158. package/dist/transaction/backup.js.map +1 -0
  159. package/dist/transaction/index.d.ts +4 -0
  160. package/dist/transaction/index.d.ts.map +1 -0
  161. package/dist/transaction/index.js +3 -0
  162. package/dist/transaction/index.js.map +1 -0
  163. package/dist/transaction/transaction.d.ts +34 -0
  164. package/dist/transaction/transaction.d.ts.map +1 -0
  165. package/dist/transaction/transaction.js +68 -0
  166. package/dist/transaction/transaction.js.map +1 -0
  167. package/dist/utils/file-operations.d.ts +29 -0
  168. package/dist/utils/file-operations.d.ts.map +1 -0
  169. package/dist/utils/file-operations.js +84 -0
  170. package/dist/utils/file-operations.js.map +1 -0
  171. package/dist/utils/index.d.ts +4 -0
  172. package/dist/utils/index.d.ts.map +1 -0
  173. package/dist/utils/index.js +4 -0
  174. package/dist/utils/index.js.map +1 -0
  175. package/dist/utils/json-utils.d.ts +22 -0
  176. package/dist/utils/json-utils.d.ts.map +1 -0
  177. package/dist/utils/json-utils.js +57 -0
  178. package/dist/utils/json-utils.js.map +1 -0
  179. package/dist/utils/path-utils.d.ts +21 -0
  180. package/dist/utils/path-utils.d.ts.map +1 -0
  181. package/dist/utils/path-utils.js +35 -0
  182. package/dist/utils/path-utils.js.map +1 -0
  183. package/eslint-plugin-code-organization/README.md +149 -0
  184. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
  185. package/eslint-plugin-code-organization/index.js +23 -0
  186. package/eslint-plugin-code-organization/package.json +10 -0
  187. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
  188. package/expo/copy-overwrite/.claude/skills/apollo-client/SKILL.md +238 -0
  189. package/expo/copy-overwrite/.claude/skills/apollo-client/references/mutation-patterns.md +360 -0
  190. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/SKILL.md +360 -0
  191. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/atomic-levels.md +417 -0
  192. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/folder-structure.md +257 -0
  193. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/gluestack-mapping.md +233 -0
  194. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +327 -0
  195. package/expo/copy-overwrite/.claude/skills/container-view-pattern/SKILL.md +299 -0
  196. package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/examples.md +749 -0
  197. package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/patterns.md +318 -0
  198. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +198 -0
  199. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +207 -0
  200. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/SKILL.md +268 -0
  201. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/common-issues.md +619 -0
  202. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/file-extensions.md +340 -0
  203. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/platform-api.md +276 -0
  204. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +414 -0
  205. package/expo/copy-overwrite/.claude/skills/directory-structure/SKILL.md +202 -0
  206. package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +443 -0
  207. package/expo/copy-overwrite/.claude/skills/expo-env-config/SKILL.md +309 -0
  208. package/expo/copy-overwrite/.claude/skills/expo-env-config/references/validation-patterns.md +417 -0
  209. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/SKILL.md +431 -0
  210. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/references/official-docs.md +290 -0
  211. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +169 -0
  212. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/SKILL.md +411 -0
  213. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/color-tokens.md +343 -0
  214. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/component-mapping.md +307 -0
  215. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/spacing-scale.md +300 -0
  216. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +354 -0
  217. package/expo/copy-overwrite/.claude/skills/local-state/SKILL.md +362 -0
  218. package/expo/copy-overwrite/.claude/skills/local-state/references/async-storage.md +505 -0
  219. package/expo/copy-overwrite/.claude/skills/local-state/references/persistence-patterns.md +711 -0
  220. package/expo/copy-overwrite/.claude/skills/local-state/references/reactive-variables.md +446 -0
  221. package/expo/copy-overwrite/.claude/skills/playwright-selectors/SKILL.md +223 -0
  222. package/expo/copy-overwrite/.claude/skills/testing-library/SKILL.md +319 -0
  223. package/expo/copy-overwrite/.claude/skills/testing-library/references/async-patterns.md +420 -0
  224. package/expo/copy-overwrite/.claude/skills/testing-library/references/expo-router-testing.md +556 -0
  225. package/expo/copy-overwrite/.claude/skills/testing-library/references/mocking-patterns.md +590 -0
  226. package/expo/copy-overwrite/.claude/skills/testing-library/references/query-priority.md +291 -0
  227. package/expo/copy-overwrite/.easignore.extra +2 -0
  228. package/expo/copy-overwrite/.mcp.json +33 -0
  229. package/expo/copy-overwrite/eslint-plugin-component-structure/README.md +234 -0
  230. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +84 -0
  231. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +196 -0
  232. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +289 -0
  233. package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +32 -0
  234. package/expo/copy-overwrite/eslint-plugin-component-structure/package.json +10 -0
  235. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +230 -0
  236. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +91 -0
  237. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +178 -0
  238. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +238 -0
  239. package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +260 -0
  240. package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +29 -0
  241. package/expo/copy-overwrite/eslint-plugin-ui-standards/package.json +10 -0
  242. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +51 -0
  243. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +55 -0
  244. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +73 -0
  245. package/expo/copy-overwrite/eslint.config.mjs +560 -0
  246. package/expo/copy-overwrite/lighthouserc.js +194 -0
  247. package/expo/create-only/lighthouserc-config.json +28 -0
  248. package/expo/merge/package.json +132 -0
  249. package/lisa.sh +35 -0
  250. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/SKILL.md +176 -0
  251. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/advanced-features.md +527 -0
  252. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/project-patterns.md +483 -0
  253. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/quick-start.md +257 -0
  254. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/resolvers-mutations.md +413 -0
  255. package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/types-scalars.md +513 -0
  256. package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +536 -0
  257. package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/SKILL.md +275 -0
  258. package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/configuration-patterns.md +487 -0
  259. package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/entity-patterns.md +450 -0
  260. package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/observability-patterns.md +536 -0
  261. package/nestjs/merge/package.json +75 -0
  262. package/package.json +124 -0
  263. package/typescript/copy-contents/.husky/commit-msg +91 -0
  264. package/typescript/copy-contents/.husky/pre-commit +96 -0
  265. package/typescript/copy-contents/.husky/pre-push +211 -0
  266. package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +74 -0
  267. package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +59 -0
  268. package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +103 -0
  269. package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +388 -0
  270. package/typescript/copy-overwrite/.github/README.md +455 -0
  271. package/typescript/copy-overwrite/.github/dependabot.yml +40 -0
  272. package/typescript/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +129 -0
  273. package/typescript/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +354 -0
  274. package/typescript/copy-overwrite/.github/k6/README.md +386 -0
  275. package/typescript/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +264 -0
  276. package/typescript/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +115 -0
  277. package/typescript/copy-overwrite/.github/k6/examples/data-driven-test.js +268 -0
  278. package/typescript/copy-overwrite/.github/k6/scenarios/load.js +142 -0
  279. package/typescript/copy-overwrite/.github/k6/scenarios/load.json +27 -0
  280. package/typescript/copy-overwrite/.github/k6/scenarios/smoke.js +26 -0
  281. package/typescript/copy-overwrite/.github/k6/scenarios/smoke.json +20 -0
  282. package/typescript/copy-overwrite/.github/k6/scenarios/soak.js +244 -0
  283. package/typescript/copy-overwrite/.github/k6/scenarios/soak.json +29 -0
  284. package/typescript/copy-overwrite/.github/k6/scenarios/spike.js +180 -0
  285. package/typescript/copy-overwrite/.github/k6/scenarios/spike.json +32 -0
  286. package/typescript/copy-overwrite/.github/k6/scenarios/stress.js +206 -0
  287. package/typescript/copy-overwrite/.github/k6/scenarios/stress.json +38 -0
  288. package/typescript/copy-overwrite/.github/k6/scripts/api-test.js +452 -0
  289. package/typescript/copy-overwrite/.github/k6/scripts/default-test.js +185 -0
  290. package/typescript/copy-overwrite/.github/k6/thresholds/normal.json +30 -0
  291. package/typescript/copy-overwrite/.github/k6/thresholds/relaxed.json +21 -0
  292. package/typescript/copy-overwrite/.github/k6/thresholds/strict.json +29 -0
  293. package/typescript/copy-overwrite/.github/workflows/build.yml +72 -0
  294. package/typescript/copy-overwrite/.github/workflows/ci.yml +49 -0
  295. package/typescript/copy-overwrite/.github/workflows/claude.yml +51 -0
  296. package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +113 -0
  297. package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +195 -0
  298. package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +267 -0
  299. package/typescript/copy-overwrite/.github/workflows/deploy.yml +228 -0
  300. package/typescript/copy-overwrite/.github/workflows/k6-load-test-README.md +230 -0
  301. package/typescript/copy-overwrite/.github/workflows/lighthouse.yml +68 -0
  302. package/typescript/copy-overwrite/.github/workflows/load-test.yml +282 -0
  303. package/typescript/copy-overwrite/.github/workflows/quality.yml +1737 -0
  304. package/typescript/copy-overwrite/.github/workflows/release.yml +1599 -0
  305. package/typescript/copy-overwrite/.gitleaksignore +28 -0
  306. package/typescript/copy-overwrite/.nvmrc +1 -0
  307. package/typescript/copy-overwrite/.prettierignore +23 -0
  308. package/typescript/copy-overwrite/.prettierrc.json +22 -0
  309. package/typescript/copy-overwrite/.versionrc +42 -0
  310. package/typescript/copy-overwrite/.yamllint +20 -0
  311. package/typescript/copy-overwrite/commitlint.config.js +11 -0
  312. package/typescript/copy-overwrite/eslint-plugin-code-organization/README.md +149 -0
  313. package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
  314. package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +23 -0
  315. package/typescript/copy-overwrite/eslint-plugin-code-organization/package.json +10 -0
  316. package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
  317. package/typescript/copy-overwrite/eslint.config.mjs +390 -0
  318. package/typescript/copy-overwrite/eslint.ignore.config.json +57 -0
  319. package/typescript/copy-overwrite/eslint.thresholds.config.json +5 -0
  320. package/typescript/github-rulesets/base.json +106 -0
  321. package/typescript/merge/.claude/settings.json +28 -0
  322. package/typescript/merge/package.json +71 -0
@@ -0,0 +1,4 @@
1
+ export type { ILogger, LogLevel } from './logger.interface.js';
2
+ export { ConsoleLogger } from './console-logger.js';
3
+ export { SilentLogger } from './silent-logger.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ConsoleLogger } from './console-logger.js';
2
+ export { SilentLogger } from './silent-logger.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Log levels for Lisa operations
3
+ */
4
+ export type LogLevel = 'info' | 'success' | 'warn' | 'error' | 'dry';
5
+ /**
6
+ * Interface for logging implementations
7
+ */
8
+ export interface ILogger {
9
+ /** Log an informational message */
10
+ info(message: string): void;
11
+ /** Log a success message */
12
+ success(message: string): void;
13
+ /** Log a warning message */
14
+ warn(message: string): void;
15
+ /** Log an error message */
16
+ error(message: string): void;
17
+ /** Log a dry-run message */
18
+ dry(message: string): void;
19
+ }
20
+ //# sourceMappingURL=logger.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.interface.d.ts","sourceRoot":"","sources":["../../src/logging/logger.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,mCAAmC;IACnC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,4BAA4B;IAC5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,4BAA4B;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,2BAA2B;IAC3B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,4BAA4B;IAC5B,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=logger.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.interface.js","sourceRoot":"","sources":["../../src/logging/logger.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { ILogger } from './logger.interface.js';
2
+ /**
3
+ * Silent logger that produces no output (for testing)
4
+ */
5
+ export declare class SilentLogger implements ILogger {
6
+ info(_message: string): void;
7
+ success(_message: string): void;
8
+ warn(_message: string): void;
9
+ error(_message: string): void;
10
+ dry(_message: string): void;
11
+ }
12
+ //# sourceMappingURL=silent-logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"silent-logger.d.ts","sourceRoot":"","sources":["../../src/logging/silent-logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD;;GAEG;AACH,qBAAa,YAAa,YAAW,OAAO;IAC1C,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI5B,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI/B,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI5B,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI7B,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAG5B"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Silent logger that produces no output (for testing)
3
+ */
4
+ export class SilentLogger {
5
+ info(_message) {
6
+ // Silent
7
+ }
8
+ success(_message) {
9
+ // Silent
10
+ }
11
+ warn(_message) {
12
+ // Silent
13
+ }
14
+ error(_message) {
15
+ // Silent
16
+ }
17
+ dry(_message) {
18
+ // Silent
19
+ }
20
+ }
21
+ //# sourceMappingURL=silent-logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"silent-logger.js","sourceRoot":"","sources":["../../src/logging/silent-logger.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB,IAAI,CAAC,QAAgB;QACnB,SAAS;IACX,CAAC;IAED,OAAO,CAAC,QAAgB;QACtB,SAAS;IACX,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,SAAS;IACX,CAAC;IAED,KAAK,CAAC,QAAgB;QACpB,SAAS;IACX,CAAC;IAED,GAAG,CAAC,QAAgB;QAClB,SAAS;IACX,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { FileOperationResult } from '../core/config.js';
2
+ import type { ICopyStrategy, StrategyContext } from './strategy.interface.js';
3
+ /**
4
+ * Copy-contents strategy: Append missing lines (for .gitignore-style files)
5
+ * - Create new files silently
6
+ * - Append missing lines using Set difference
7
+ * - Handle empty lines, normalize line endings
8
+ * - O(n log n) algorithm using Set operations
9
+ */
10
+ export declare class CopyContentsStrategy implements ICopyStrategy {
11
+ readonly name: "copy-contents";
12
+ apply(sourcePath: string, destPath: string, relativePath: string, context: StrategyContext): Promise<FileOperationResult>;
13
+ }
14
+ //# sourceMappingURL=copy-contents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-contents.d.ts","sourceRoot":"","sources":["../../src/strategies/copy-contents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,aAAa;IACxD,QAAQ,CAAC,IAAI,EAAG,eAAe,CAAU;IAEnC,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;CAkEhC"}
@@ -0,0 +1,69 @@
1
+ import * as fse from 'fs-extra';
2
+ import { readFile, copyFile, appendFile } from 'node:fs/promises';
3
+ import { filesIdentical, ensureParentDir } from '../utils/file-operations.js';
4
+ /**
5
+ * Copy-contents strategy: Append missing lines (for .gitignore-style files)
6
+ * - Create new files silently
7
+ * - Append missing lines using Set difference
8
+ * - Handle empty lines, normalize line endings
9
+ * - O(n log n) algorithm using Set operations
10
+ */
11
+ export class CopyContentsStrategy {
12
+ name = 'copy-contents';
13
+ async apply(sourcePath, destPath, relativePath, context) {
14
+ const { config, recordFile, backupFile } = context;
15
+ const destExists = await fse.pathExists(destPath);
16
+ if (!destExists) {
17
+ // Destination doesn't exist - copy silently
18
+ if (!config.dryRun) {
19
+ await ensureParentDir(destPath);
20
+ await copyFile(sourcePath, destPath);
21
+ recordFile(relativePath, this.name);
22
+ }
23
+ return { relativePath, strategy: this.name, action: 'copied' };
24
+ }
25
+ // Check if files are identical
26
+ if (await filesIdentical(sourcePath, destPath)) {
27
+ if (!config.dryRun) {
28
+ recordFile(relativePath, this.name);
29
+ }
30
+ return { relativePath, strategy: this.name, action: 'skipped' };
31
+ }
32
+ // Find lines in source that are not in destination
33
+ const sourceContent = await readFile(sourcePath, 'utf-8');
34
+ const destContent = await readFile(destPath, 'utf-8');
35
+ // Get non-empty lines from source
36
+ const sourceLines = sourceContent
37
+ .split('\n')
38
+ .map((line) => line.trimEnd())
39
+ .filter((line) => line.length > 0);
40
+ // Get all lines from destination
41
+ const destLines = new Set(destContent.split('\n').map((line) => line.trimEnd()));
42
+ // Find lines that need to be added
43
+ const newLines = sourceLines.filter((line) => !destLines.has(line));
44
+ if (newLines.length === 0) {
45
+ if (!config.dryRun) {
46
+ recordFile(relativePath, this.name);
47
+ }
48
+ return { relativePath, strategy: this.name, action: 'skipped' };
49
+ }
50
+ if (!config.dryRun) {
51
+ await backupFile(destPath);
52
+ // Ensure destination ends with newline before appending
53
+ let appendContent = newLines.join('\n');
54
+ if (!destContent.endsWith('\n')) {
55
+ appendContent = '\n' + appendContent;
56
+ }
57
+ appendContent += '\n';
58
+ await appendFile(destPath, appendContent, 'utf-8');
59
+ recordFile(relativePath, this.name);
60
+ }
61
+ return {
62
+ relativePath,
63
+ strategy: this.name,
64
+ action: 'appended',
65
+ linesAdded: newLines.length,
66
+ };
67
+ }
68
+ }
69
+ //# sourceMappingURL=copy-contents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-contents.js","sourceRoot":"","sources":["../../src/strategies/copy-contents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACtB,IAAI,GAAG,eAAwB,CAAC;IAEzC,KAAK,CAAC,KAAK,CACT,UAAkB,EAClB,QAAgB,EAChB,YAAoB,EACpB,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QACnD,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAElD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,4CAA4C;YAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;gBAChC,MAAM,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBACrC,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QACjE,CAAC;QAED,+BAA+B;QAC/B,IAAI,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;Y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AAC;YAE3B,wDAAwD;YACxD,IAAI,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChC,aAAa,GAAG,IAAI,GAAG,aAAa,CAAC;YACvC,CAAC;YACD,aAAa,IAAI,IAAI,CAAC;YAEtB,MAAM,UAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;YACnD,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QAED,OAAO;YACL,YAAY;YACZ,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,QAAQ,CAAC,MAAM;SAC5B,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { FileOperationResult } from '../core/config.js';
2
+ import type { ICopyStrategy, StrategyContext } from './strategy.interface.js';
3
+ /**
4
+ * Copy-overwrite strategy: Replace file if exists (prompts on conflict)
5
+ * - Create new files silently
6
+ * - Skip identical files
7
+ * - Prompt on differences (or auto-accept in yesMode)
8
+ * - Backup before overwriting
9
+ */
10
+ export declare class CopyOverwriteStrategy implements ICopyStrategy {
11
+ readonly name: "copy-overwrite";
12
+ apply(sourcePath: string, destPath: string, relativePath: string, context: StrategyContext): Promise<FileOperationResult>;
13
+ }
14
+ //# sourceMappingURL=copy-overwrite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-overwrite.d.ts","sourceRoot":"","sources":["../../src/strategies/copy-overwrite.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;;GAMG;AACH,qBAAa,qBAAsB,YAAW,aAAa;IACzD,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;IAEpC,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;CAuChC"}
@@ -0,0 +1,47 @@
1
+ import * as fse from 'fs-extra';
2
+ import { copyFile } from 'node:fs/promises';
3
+ import { filesIdentical, ensureParentDir } from '../utils/file-operations.js';
4
+ /**
5
+ * Copy-overwrite strategy: Replace file if exists (prompts on conflict)
6
+ * - Create new files silently
7
+ * - Skip identical files
8
+ * - Prompt on differences (or auto-accept in yesMode)
9
+ * - Backup before overwriting
10
+ */
11
+ export class CopyOverwriteStrategy {
12
+ name = 'copy-overwrite';
13
+ async apply(sourcePath, destPath, relativePath, context) {
14
+ const { config, recordFile, backupFile, promptOverwrite } = context;
15
+ const destExists = await fse.pathExists(destPath);
16
+ if (!destExists) {
17
+ // Destination doesn't exist - copy silently
18
+ if (!config.dryRun) {
19
+ await ensureParentDir(destPath);
20
+ await copyFile(sourcePath, destPath);
21
+ recordFile(relativePath, this.name);
22
+ }
23
+ return { relativePath, strategy: this.name, action: 'copied' };
24
+ }
25
+ // Check if files are identical
26
+ if (await filesIdentical(sourcePath, destPath)) {
27
+ // Files are identical - still record for uninstall tracking
28
+ if (!config.dryRun) {
29
+ recordFile(relativePath, this.name);
30
+ }
31
+ return { relativePath, strategy: this.name, action: 'skipped' };
32
+ }
33
+ // Files differ - need to prompt or auto-accept
34
+ if (config.dryRun) {
35
+ return { relativePath, strategy: this.name, action: 'overwritten' };
36
+ }
37
+ const shouldOverwrite = await promptOverwrite(relativePath, sourcePath, destPath);
38
+ if (shouldOverwrite) {
39
+ await backupFile(destPath);
40
+ await copyFile(sourcePath, destPath);
41
+ recordFile(relativePath, this.name);
42
+ return { relativePath, strategy: this.name, action: 'overwritten' };
43
+ }
44
+ return { relativePath, strategy: this.name, action: 'skipped' };
45
+ }
46
+ }
47
+ //#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,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAClE,CAAC;QAED,+CAA+C;QAC/C,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;QACtE,CAAC;QAED,MAAM,eAAe,GAAG,MAAM,eAAe,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAElF,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC3B,MAAM,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACrC,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACpC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;QACtE,CAAC;QAED,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ import type { FileOperationResult } from '../core/config.js';
2
+ import type { ICopyStrategy, StrategyContext } from './strategy.interface.js';
3
+ /**
4
+ * Create-only strategy: Create file if not exists, never update
5
+ * - Create if not exists
6
+ * - Skip silently if exists (whether identical or different)
7
+ * - Record in manifest even when skipping
8
+ */
9
+ export declare class CreateOnlyStrategy implements ICopyStrategy {
10
+ readonly name: "create-only";
11
+ apply(sourcePath: string, destPath: string, relativePath: string, context: StrategyContext): Promise<FileOperationResult>;
12
+ }
13
+ //# sourceMappingURL=create-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-only.d.ts","sourceRoot":"","sources":["../../src/strategies/create-only.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACtD,QAAQ,CAAC,IAAI,EAAG,aAAa,CAAU;IAEjC,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;CAmBhC"}
@@ -0,0 +1,30 @@
1
+ import * as fse from 'fs-extra';
2
+ import { copyFile } from 'node:fs/promises';
3
+ import { ensureParentDir } from '../utils/file-operations.js';
4
+ /**
5
+ * Create-only strategy: Create file if not exists, never update
6
+ * - Create if not exists
7
+ * - Skip silently if exists (whether identical or different)
8
+ * - Record in manifest even when skipping
9
+ */
10
+ export class CreateOnlyStrategy {
11
+ name = 'create-only';
12
+ async apply(sourcePath, destPath, relativePath, context) {
13
+ const { config, recordFile } = context;
14
+ const destExists = await fse.pathExists(destPath);
15
+ if (!destExists) {
16
+ // Destination doesn't exist - copy silently
17
+ if (!config.dryRun) {
18
+ await ensureParentDir(destPath);
19
+ await copyFile(sourcePath, destPath);
20
+ recordFile(relativePath, this.name);
21
+ }
22
+ return { relativePath, strategy: this.name, action: 'created' };
23
+ }
24
+ // Destination exists - skip silently (but still track for potential uninstall)
25
+ // Note: We don't record to manifest when skipping in create-only mode
26
+ // because the user's file takes precedence
27
+ return { relativePath, strategy: this.name, action: 'skipped' };
28
+ }
29
+ }
30
+ //# sourceMappingURL=create-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-only.js","sourceRoot":"","sources":["../../src/strategies/create-only.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IACpB,IAAI,GAAG,aAAsB,CAAC;IAEvC,KAAK,CAAC,KAAK,CACT,UAAkB,EAClB,QAAgB,EAChB,YAAoB,EACpB,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QACvC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAElD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,4CAA4C;YAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;gBAChC,MAAM,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gBACrC,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAClE,CAAC;QAED,+EAA+E;QAC/E,sEAAsE;QACtE,2CAA2C;QAC3C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ import type { CopyStrategy } from '../core/config.js';
2
+ import type { ICopyStrategy } from './strategy.interface.js';
3
+ export type { ICopyStrategy, StrategyContext } from './strategy.interface.js';
4
+ export { CopyOverwriteStrategy } from './copy-overwrite.js';
5
+ export { CopyContentsStrategy } from './copy-contents.js';
6
+ export { CreateOnlyStrategy } from './create-only.js';
7
+ export { MergeStrategy } from './merge.js';
8
+ /**
9
+ * Registry for copy strategies
10
+ */
11
+ export declare class StrategyRegistry {
12
+ private readonly strategies;
13
+ constructor(strategies?: readonly ICopyStrategy[]);
14
+ /**
15
+ * Get a strategy by name
16
+ */
17
+ get(name: CopyStrategy): ICopyStrategy;
18
+ /**
19
+ * Check if a strategy exists
20
+ */
21
+ has(name: CopyStrategy): boolean;
22
+ /**
23
+ * Get all registered strategies
24
+ */
25
+ getAll(): readonly ICopyStrategy[];
26
+ }
27
+ /**
28
+ * Create default strategy registry
29
+ */
30
+ export declare function createStrategyRegistry(): StrategyRegistry;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;gBAElD,UAAU,CAAC,EAAE,SAAS,aAAa,EAAE;IAWjD;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa;IAQtC;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO;IAIhC;;OAEG;IACH,MAAM,IAAI,SAAS,aAAa,EAAE;CAGnC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD"}
@@ -0,0 +1,52 @@
1
+ import { CopyOverwriteStrategy } from './copy-overwrite.js';
2
+ import { CopyContentsStrategy } from './copy-contents.js';
3
+ import { CreateOnlyStrategy } from './create-only.js';
4
+ import { MergeStrategy } from './merge.js';
5
+ export { CopyOverwriteStrategy } from './copy-overwrite.js';
6
+ export { CopyContentsStrategy } from './copy-contents.js';
7
+ export { CreateOnlyStrategy } from './create-only.js';
8
+ export { MergeStrategy } from './merge.js';
9
+ /**
10
+ * Registry for copy strategies
11
+ */
12
+ export class StrategyRegistry {
13
+ strategies;
14
+ constructor(strategies) {
15
+ const allStrategies = strategies ?? [
16
+ new CopyOverwriteStrategy(),
17
+ new CopyContentsStrategy(),
18
+ new CreateOnlyStrategy(),
19
+ new MergeStrategy(),
20
+ ];
21
+ this.strategies = new Map(allStrategies.map((s) => [s.name, s]));
22
+ }
23
+ /**
24
+ * Get a strategy by name
25
+ */
26
+ get(name) {
27
+ const strategy = this.strategies.get(name);
28
+ if (!strategy) {
29
+ throw new Error(`Unknown strategy: ${name}`);
30
+ }
31
+ return strategy;
32
+ }
33
+ /**
34
+ * Check if a strategy exists
35
+ */
36
+ has(name) {
37
+ return this.strategies.has(name);
38
+ }
39
+ /**
40
+ * Get all registered strategies
41
+ */
42
+ getAll() {
43
+ return Array.from(this.strategies.values());
44
+ }
45
+ }
46
+ /**
47
+ * Create default strategy registry
48
+ */
49
+ export function createStrategyRegistry() {
50
+ return new StrategyRegistry();
51
+ }
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/strategies/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,gBAAgB;IACV,UAAU,CAAmC;IAE9D,YAAY,UAAqC;QAC/C,MAAM,aAAa,GAAG,UAAU,IAAI;YAClC,IAAI,qBAAqB,EAAE;YAC3B,IAAI,oBAAoB,EAAE;YAC1B,IAAI,kBAAkB,EAAE;YACxB,IAAI,aAAa,EAAE;SACpB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAkB;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAkB;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,IAAI,gBAAgB,EAAE,CAAC;AAChC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { FileOperationResult } from '../core/config.js';
2
+ import type { ICopyStrategy, StrategyContext } from './strategy.interface.js';
3
+ /**
4
+ * Merge strategy: Deep merge JSON files (project values take precedence)
5
+ * - Lisa values serve as defaults
6
+ * - Project values take precedence on conflicts
7
+ * - Handle nested paths (.claude/settings.json)
8
+ */
9
+ export declare class MergeStrategy implements ICopyStrategy {
10
+ readonly name: "merge";
11
+ apply(sourcePath: string, destPath: string, relativePath: string, context: StrategyContext): Promise<FileOperationResult>;
12
+ }
13
+ //# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/strategies/merge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK9E;;;;;GAKG;AACH,qBAAa,aAAc,YAAW,aAAa;IACjD,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAU;IAE3B,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;CAoDhC"}
@@ -0,0 +1,60 @@
1
+ import * as fse from 'fs-extra';
2
+ import { copyFile } from 'node:fs/promises';
3
+ import { ensureParentDir } from '../utils/file-operations.js';
4
+ import { readJson, writeJson, deepMerge } from '../utils/json-utils.js';
5
+ import { JsonMergeError } from '../errors/index.js';
6
+ /**
7
+ * Merge strategy: Deep merge JSON files (project values take precedence)
8
+ * - Lisa values serve as defaults
9
+ * - Project values take precedence on conflicts
10
+ * - Handle nested paths (.claude/settings.json)
11
+ */
12
+ export class MergeStrategy {
13
+ name = 'merge';
14
+ async apply(sourcePath, destPath, relativePath, context) {
15
+ const { config, recordFile, backupFile } = context;
16
+ const destExists = await fse.pathExists(destPath);
17
+ if (!destExists) {
18
+ // Destination doesn't exist - copy the file
19
+ if (!config.dryRun) {
20
+ await ensureParentDir(destPath);
21
+ await copyFile(sourcePath, destPath);
22
+ recordFile(relativePath, this.name);
23
+ }
24
+ return { relativePath, strategy: this.name, action: 'copied' };
25
+ }
26
+ // Both files exist - merge them
27
+ let sourceJson;
28
+ let destJson;
29
+ try {
30
+ sourceJson = await readJson(sourcePath);
31
+ }
32
+ catch (error) {
33
+ throw new JsonMergeError(relativePath, `Failed to parse source: ${sourcePath}`);
34
+ }
35
+ try {
36
+ destJson = await readJson(destPath);
37
+ }
38
+ catch (error) {
39
+ throw new JsonMergeError(relativePath, `Failed to parse destination: ${destPath}`);
40
+ }
41
+ // Deep merge: Lisa (source) provides defaults, project (dest) values win
42
+ const merged = deepMerge(sourceJson, destJson);
43
+ // Normalize for comparison (parse and re-stringify both)
44
+ const normalizedDest = JSON.stringify(destJson, null, 2);
45
+ const normalizedMerged = JSON.stringify(merged, null, 2);
46
+ if (normalizedDest === normalizedMerged) {
47
+ if (!config.dryRun) {
48
+ recordFile(relativePath, this.name);
49
+ }
50
+ return { relativePath, strategy: this.name, action: 'skipped' };
51
+ }
52
+ if (!config.dryRun) {
53
+ await backupFile(destPath);
54
+ await writeJson(destPath, merged);
55
+ recordFile(relativePath, this.name);
56
+ }
57
+ return { relativePath, strategy: this.name, action: 'merged' };
58
+ }
59
+ }
60
+ //# sourceMappingURL=merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/strategies/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IACf,IAAI,GAAG,OAAgB,CAAC;IAEjC,KAAK,CAAC,KAAK,CACT,UAAkB,EAClB,QAAgB,EAChB,YAAoB,EACp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,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAEzD,IAAI,cAAc,KAAK,gBAAgB,EAAE,CAAC;YACxC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC3B,MAAM,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjE,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ import type { CopyStrategy, FileOperationResult, LisaConfig } from '../core/config.js';
2
+ /**
3
+ * Context for strategy execution
4
+ */
5
+ export interface StrategyContext {
6
+ /** Full configuration */
7
+ readonly config: LisaConfig;
8
+ /** Record a file to the manifest */
9
+ readonly recordFile: (relativePath: string, strategy: CopyStrategy) => void;
10
+ /** Backup a file before modification */
11
+ readonly backupFile: (absolutePath: string) => Promise<void>;
12
+ /** Prompt user for overwrite decision */
13
+ readonly promptOverwrite: (relativePath: string, sourcePath: string, destPath: string) => Promise<boolean>;
14
+ }
15
+ /**
16
+ * Interface for copy strategy implementations
17
+ */
18
+ export interface ICopyStrategy {
19
+ /** Strategy name matching the directory name */
20
+ readonly name: CopyStrategy;
21
+ /**
22
+ * Apply this strategy to copy a file from source to destination
23
+ * @param sourcePath Absolute path to source file
24
+ * @param destPath Absolute path to destination file
25
+ * @param relativePath Path relative to destination root (for logging/manifest)
26
+ * @param context Strategy context with config and utilities
27
+ * @returns Result of the file operation
28
+ */
29
+ apply(sourcePath: string, destPath: string, relativePath: string, context: StrategyContext): Promise<FileOperationResult>;
30
+ }
31
+ //# sourceMappingURL=strategy.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.interface.d.ts","sourceRoot":"","sources":["../../src/strategies/strategy.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,oCAAoC;IACpC,QAAQ,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAE5E,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D,yCAAyC;IACzC,QAAQ,CAAC,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5G;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAE5B;;;;;;;OAOG;IACH,KAAK,CACH,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=strategy.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.interface.js","sourceRoot":"","sources":["../../src/strategies/strategy.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import type { ILogger } from '../logging/index.js';
2
+ /**
3
+ * Interface for backup service
4
+ */
5
+ export interface IBackupService {
6
+ /** Initialize backup directory */
7
+ init(destDir: string): Promise<void>;
8
+ /** Backup a file before modification */
9
+ backup(absolutePath: string): Promise<void>;
10
+ /** Rollback all changes from backup */
11
+ rollback(): Promise<void>;
12
+ /** Cleanup backup directory (on success) */
13
+ cleanup(): Promise<void>;
14
+ }
15
+ /**
16
+ * Service for backing up and restoring files during operations
17
+ */
18
+ export declare class BackupService implements IBackupService {
19
+ private backupDir;
20
+ private destDir;
21
+ private readonly logger;
22
+ constructor(logger: ILogger);
23
+ init(destDir: string): Promise<void>;
24
+ backup(absolutePath: string): Promise<void>;
25
+ rollback(): Promise<void>;
26
+ cleanup(): Promise<void>;
27
+ private listFilesRecursive;
28
+ }
29
+ /**
30
+ * No-op backup service for dry-run mode
31
+ */
32
+ export declare class DryRunBackupService implements IBackupService {
33
+ init(_destDir: string): Promise<void>;
34
+ backup(_absolutePath: string): Promise<void>;
35
+ rollback(): Promise<void>;
36
+ cleanup(): Promise<void>;
37
+ }
38
+ //# sourceMappingURL=backup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../src/transaction/backup.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,wCAAwC;IACxC,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C,uCAAuC;IACvC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B,4CAA4C;IAC5C,OAAO,IAAI,OAAO,CAAC,I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