@codyswann/lisa 1.0.0 → 1.0.5

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 (280) hide show
  1. package/README.md +244 -36
  2. package/all/copy-overwrite/.claude/README.md +1 -3
  3. package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
  4. package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
  5. package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
  6. package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
  7. package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
  8. package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
  9. package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
  10. package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
  11. package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
  12. package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
  13. package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
  14. package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
  15. package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
  16. package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
  17. package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
  18. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
  19. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
  20. package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
  21. package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
  22. package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
  23. package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
  24. package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
  25. package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
  26. package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
  27. package/all/copy-overwrite/.claude/hooks/README.md +75 -0
  28. package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
  29. package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
  30. package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
  31. package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
  32. package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
  33. package/all/copy-overwrite/.claude/settings.json +35 -14
  34. package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
  35. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
  36. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
  37. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
  38. package/all/copy-overwrite/.safety-net.json +25 -0
  39. package/all/copy-overwrite/CLAUDE.md +8 -30
  40. package/all/copy-overwrite/HUMAN.md +517 -17
  41. package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
  42. package/all/create-only/scripts/setup-deploy-key.sh +190 -0
  43. package/all/deletions.json +5 -0
  44. package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
  45. package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
  46. package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
  47. package/cdk/copy-overwrite/eslint.config.ts +51 -0
  48. package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
  49. package/cdk/copy-overwrite/knip.json +53 -0
  50. package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
  51. package/cdk/merge/package.json +17 -1
  52. package/dist/cli/index.d.ts +3 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +83 -64
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/prompts.d.ts +17 -3
  57. package/dist/cli/prompts.d.ts.map +1 -1
  58. package/dist/cli/prompts.js +52 -16
  59. package/dist/cli/prompts.js.map +1 -1
  60. package/dist/core/config.d.ts +13 -4
  61. package/dist/core/config.d.ts.map +1 -1
  62. package/dist/core/config.js +17 -9
  63. package/dist/core/config.js.map +1 -1
  64. package/dist/core/git-service.d.ts +40 -0
  65. package/dist/core/git-service.d.ts.map +1 -0
  66. package/dist/core/git-service.js +52 -0
  67. package/dist/core/git-service.js.map +1 -0
  68. package/dist/core/index.d.ts +3 -3
  69. package/dist/core/index.js +3 -3
  70. package/dist/core/lisa.d.ts +124 -7
  71. package/dist/core/lisa.d.ts.map +1 -1
  72. package/dist/core/lisa.js +423 -221
  73. package/dist/core/lisa.js.map +1 -1
  74. package/dist/core/manifest.d.ts +5 -1
  75. package/dist/core/manifest.d.ts.map +1 -1
  76. package/dist/core/manifest.js +22 -16
  77. package/dist/core/manifest.js.map +1 -1
  78. package/dist/detection/detector.interface.d.ts +1 -1
  79. package/dist/detection/detectors/cdk.d.ts +6 -1
  80. package/dist/detection/detectors/cdk.d.ts.map +1 -1
  81. package/dist/detection/detectors/cdk.js +16 -8
  82. package/dist/detection/detectors/cdk.js.map +1 -1
  83. package/dist/detection/detectors/expo.d.ts +6 -1
  84. package/dist/detection/detectors/expo.d.ts.map +1 -1
  85. package/dist/detection/detectors/expo.js +13 -8
  86. package/dist/detection/detectors/expo.js.map +1 -1
  87. package/dist/detection/detectors/nestjs.d.ts +7 -2
  88. package/dist/detection/detectors/nestjs.d.ts.map +1 -1
  89. package/dist/detection/detectors/nestjs.js +17 -9
  90. package/dist/detection/detectors/nestjs.js.map +1 -1
  91. package/dist/detection/detectors/npm-package.d.ts +6 -1
  92. package/dist/detection/detectors/npm-package.d.ts.map +1 -1
  93. package/dist/detection/detectors/npm-package.js +9 -4
  94. package/dist/detection/detectors/npm-package.js.map +1 -1
  95. package/dist/detection/detectors/typescript.d.ts +6 -1
  96. package/dist/detection/detectors/typescript.d.ts.map +1 -1
  97. package/dist/detection/detectors/typescript.js +12 -7
  98. package/dist/detection/detectors/typescript.js.map +1 -1
  99. package/dist/detection/index.d.ts +13 -3
  100. package/dist/detection/index.d.ts.map +1 -1
  101. package/dist/detection/index.js +17 -7
  102. package/dist/detection/index.js.map +1 -1
  103. package/dist/errors/index.d.ts +66 -2
  104. package/dist/errors/index.d.ts.map +1 -1
  105. package/dist/errors/index.js +89 -17
  106. package/dist/errors/index.js.map +1 -1
  107. package/dist/index.js +3 -3
  108. package/dist/index.js.map +1 -1
  109. package/dist/logging/console-logger.d.ts +21 -1
  110. package/dist/logging/console-logger.d.ts.map +1 -1
  111. package/dist/logging/console-logger.js +26 -6
  112. package/dist/logging/console-logger.js.map +1 -1
  113. package/dist/logging/index.d.ts +3 -3
  114. package/dist/logging/index.js +2 -2
  115. package/dist/logging/logger.interface.d.ts +1 -1
  116. package/dist/logging/silent-logger.d.ts +21 -1
  117. package/dist/logging/silent-logger.d.ts.map +1 -1
  118. package/dist/logging/silent-logger.js +20 -0
  119. package/dist/logging/silent-logger.js.map +1 -1
  120. package/dist/strategies/copy-contents.d.ts +47 -6
  121. package/dist/strategies/copy-contents.d.ts.map +1 -1
  122. package/dist/strategies/copy-contents.js +99 -49
  123. package/dist/strategies/copy-contents.js.map +1 -1
  124. package/dist/strategies/copy-overwrite.d.ts +10 -2
  125. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  126. package/dist/strategies/copy-overwrite.js +17 -9
  127. package/dist/strategies/copy-overwrite.js.map +1 -1
  128. package/dist/strategies/create-only.d.ts +10 -2
  129. package/dist/strategies/create-only.d.ts.map +1 -1
  130. package/dist/strategies/create-only.js +14 -6
  131. package/dist/strategies/create-only.js.map +1 -1
  132. package/dist/strategies/index.d.ts +17 -7
  133. package/dist/strategies/index.d.ts.map +1 -1
  134. package/dist/strategies/index.js +19 -9
  135. package/dist/strategies/index.js.map +1 -1
  136. package/dist/strategies/merge.d.ts +10 -2
  137. package/dist/strategies/merge.d.ts.map +1 -1
  138. package/dist/strategies/merge.js +21 -21
  139. package/dist/strategies/merge.js.map +1 -1
  140. package/dist/strategies/strategy.interface.d.ts +1 -1
  141. package/dist/strategies/strategy.interface.d.ts.map +1 -1
  142. package/dist/transaction/backup.d.ts +15 -1
  143. package/dist/transaction/backup.d.ts.map +1 -1
  144. package/dist/transaction/backup.js +47 -12
  145. package/dist/transaction/backup.js.map +1 -1
  146. package/dist/transaction/index.d.ts +3 -3
  147. package/dist/transaction/index.js +2 -2
  148. package/dist/transaction/transaction.d.ts +25 -2
  149. package/dist/transaction/transaction.d.ts.map +1 -1
  150. package/dist/transaction/transaction.js +25 -2
  151. package/dist/transaction/transaction.js.map +1 -1
  152. package/dist/utils/file-operations.d.ts +21 -0
  153. package/dist/utils/file-operations.d.ts.map +1 -1
  154. package/dist/utils/file-operations.js +48 -12
  155. package/dist/utils/file-operations.js.map +1 -1
  156. package/dist/utils/index.d.ts +3 -3
  157. package/dist/utils/index.js +3 -3
  158. package/dist/utils/json-utils.d.ts +12 -0
  159. package/dist/utils/json-utils.d.ts.map +1 -1
  160. package/dist/utils/json-utils.js +17 -5
  161. package/dist/utils/json-utils.js.map +1 -1
  162. package/dist/utils/path-utils.d.ts +11 -0
  163. package/dist/utils/path-utils.d.ts.map +1 -1
  164. package/dist/utils/path-utils.js +12 -1
  165. package/dist/utils/path-utils.js.map +1 -1
  166. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  167. package/eslint-plugin-code-organization/index.js +5 -0
  168. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  169. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
  170. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
  171. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
  172. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
  173. package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
  174. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
  175. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
  176. package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
  177. package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
  178. package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
  179. package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
  180. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
  181. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
  182. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
  183. package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
  184. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
  185. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
  186. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
  187. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
  188. package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
  189. package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
  190. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
  191. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
  192. package/expo/copy-overwrite/eslint.config.ts +53 -0
  193. package/expo/copy-overwrite/eslint.expo.ts +330 -0
  194. package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
  195. package/expo/copy-overwrite/knip.json +132 -0
  196. package/expo/copy-overwrite/lighthouserc.js +27 -0
  197. package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
  198. package/expo/create-only/lighthouserc-config.json +6 -1
  199. package/expo/merge/package.json +16 -3
  200. package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
  201. package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
  202. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
  203. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
  204. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
  205. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
  206. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
  207. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
  208. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
  209. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
  210. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
  211. package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
  212. package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
  213. package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
  214. package/nestjs/copy-overwrite/eslint.config.ts +53 -0
  215. package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
  216. package/nestjs/merge/package.json +11 -3
  217. package/package.json +34 -40
  218. package/typescript/copy-contents/.husky/pre-commit +1 -1
  219. package/typescript/copy-contents/.husky/pre-push +99 -118
  220. package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
  221. package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
  222. package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
  223. package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
  224. package/typescript/copy-overwrite/.claude/settings.json +79 -0
  225. package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
  226. package/typescript/copy-overwrite/.github/README.md +49 -1
  227. package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
  228. package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
  229. package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
  230. package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
  231. package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
  232. package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
  233. package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
  234. package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
  235. package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
  236. package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
  237. package/typescript/copy-overwrite/.gitleaksignore +3 -0
  238. package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
  239. package/typescript/copy-overwrite/.prettierignore +2 -1
  240. package/typescript/copy-overwrite/.yamllint +2 -0
  241. package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
  242. package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
  243. package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
  244. package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
  245. package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  246. package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
  247. package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  248. package/typescript/copy-overwrite/eslint.base.ts +430 -0
  249. package/typescript/copy-overwrite/eslint.config.ts +52 -0
  250. package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
  251. package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
  252. package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
  253. package/typescript/copy-overwrite/knip.json +64 -0
  254. package/typescript/copy-overwrite/sgconfig.yml +11 -0
  255. package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
  256. package/typescript/create-only/eslint.config.local.ts +24 -0
  257. package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
  258. package/typescript/github-rulesets/base.json +2 -75
  259. package/typescript/merge/.claude/settings.json +160 -0
  260. package/typescript/merge/package.json +35 -34
  261. package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
  262. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
  263. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
  264. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
  265. package/expo/copy-overwrite/eslint.config.mjs +0 -560
  266. package/lisa.sh +0 -35
  267. package/typescript/copy-overwrite/eslint.config.mjs +0 -390
  268. /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
  269. /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
  270. /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
  271. /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
  272. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
  273. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
  274. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
  275. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
  276. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
  277. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
  278. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
  279. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
  280. /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json",
3
+ "entry": [
4
+ "bin/**/*.ts",
5
+ "lib/**/*.ts",
6
+ "config/**/*.ts",
7
+ "util/**/*.ts",
8
+ "utils/**/*.ts",
9
+ "lambda/**/*.ts",
10
+ "lambdas/**/*.ts",
11
+ "functions/**/*.ts"
12
+ ],
13
+ "project": [
14
+ "bin/**/*.ts",
15
+ "lib/**/*.ts",
16
+ "config/**/*.ts",
17
+ "util/**/*.ts",
18
+ "utils/**/*.ts",
19
+ "lambda/**/*.ts",
20
+ "lambdas/**/*.ts",
21
+ "functions/**/*.ts"
22
+ ],
23
+ "ignore": [
24
+ "**/*.test.ts",
25
+ "**/*.spec.ts",
26
+ "**/__tests__/**",
27
+ "**/__mocks__/**",
28
+ "**/tests/**",
29
+ "**/test/**",
30
+ "**/dist/**",
31
+ "**/build/**",
32
+ "**/coverage/**",
33
+ "**/node_modules/**",
34
+ "**/cdk.out/**",
35
+ "**/scripts/**",
36
+ "**/eslint-plugin-*/**"
37
+ ],
38
+ "ignoreDependencies": [
39
+ "jscodeshift",
40
+ "ts-morph",
41
+ "commitizen",
42
+ "eslint-*",
43
+ "lint-staged",
44
+ "ts-node",
45
+ "@commitlint/*",
46
+ "aws-cdk",
47
+ "aws-cdk-lib",
48
+ "@aws-cdk/*",
49
+ "constructs",
50
+ "esbuild"
51
+ ],
52
+ "ignoreExportsUsedInFile": true
53
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "noEmit": true,
6
+ "module": "NodeNext",
7
+ "moduleResolution": "NodeNext"
8
+ },
9
+ "include": ["lib/**/*", "bin/**/*", "test/**/*", "*.config.ts", "eslint.*.ts"],
10
+ "exclude": ["node_modules", "dist", "cdk.out"]
11
+ }
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "scripts": {
3
+ "test": "NODE_ENV=test jest --passWithNoTests",
4
+ "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns=\"\\.integration\\.test\\.(ts|tsx)$\" --passWithNoTests",
5
+ "test:integration": "NODE_ENV=test jest --testPathPatterns=\"\\.integration\\.test\\.(ts|tsx)$\" --passWithNoTests",
6
+ "test:cov": "NODE_ENV=test jest --coverage",
3
7
  "watch": "tsc -w",
4
8
  "cdk": "cdk"
5
9
  },
@@ -12,7 +16,19 @@
12
16
  "source-map-support": "^0.5.21"
13
17
  },
14
18
  "devDependencies": {
15
- "aws-cdk": "2.235.0"
19
+ "@istanbuljs/nyc-config-typescript": "^1.0.2",
20
+ "@jest/test-sequencer": "^30.2.0",
21
+ "@types/jest": "^30.0.0",
22
+ "aws-cdk": "2.235.0",
23
+ "jest": "^30.0.0",
24
+ "ts-jest": "^29.4.6"
25
+ },
26
+ "engines": {
27
+ "npm": ">= 10.9.4",
28
+ "yarn": "please-use-npm",
29
+ "pnpm": "please-use-npm",
30
+ "bun": "please-use-npm",
31
+ "node": "22.21.1"
16
32
  },
17
33
  "bin": {
18
34
  "infrastructure": "bin/infrastructure.js"
@@ -1,7 +1,8 @@
1
- import { Command } from 'commander';
1
+ import { Command } from "commander";
2
2
  /**
3
3
  * Create and configure the CLI program
4
+ * @returns Configured Commander program
4
5
  */
5
6
  export declare function createProgram(): Command;
6
- export { createPrompter } from './prompts.js';
7
+ export { createPrompter } from "./prompts.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAiBvC;AAkFD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAyBvC;AAkHD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
package/dist/cli/index.js CHANGED
@@ -1,100 +1,119 @@
1
- import { Command } from 'commander';
2
- import * as path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- import { Lisa } from '../core/lisa.js';
5
- import { DetectorRegistry } from '../detection/index.js';
6
- import { StrategyRegistry } from '../strategies/index.js';
7
- import { ManifestService, DryRunManifestService } from '../core/manifest.js';
8
- import { BackupService, DryRunBackupService } from '../transaction/index.js';
9
- import { ConsoleLogger } from '../logging/index.js';
10
- import { createPrompter } from './prompts.js';
11
- import { toAbsolutePath } from '../utils/path-utils.js';
1
+ import { Command } from "commander";
2
+ import * as path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { GitService } from "../core/git-service.js";
5
+ import { Lisa } from "../core/lisa.js";
6
+ import { DryRunManifestService, ManifestService } from "../core/manifest.js";
7
+ import { DetectorRegistry } from "../detection/index.js";
8
+ import { ConsoleLogger } from "../logging/index.js";
9
+ import { StrategyRegistry } from "../strategies/index.js";
10
+ import { BackupService, DryRunBackupService } from "../transaction/index.js";
11
+ import { toAbsolutePath } from "../utils/path-utils.js";
12
+ import { createPrompter } from "./prompts.js";
12
13
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
13
14
  /**
14
15
  * Get Lisa directory (where configs are stored)
16
+ * @returns Path to Lisa directory
15
17
  */
16
18
  function getLisaDir() {
17
19
  // Go up from dist/cli to project root
18
- return path.resolve(__dirname, '..', '..');
20
+ return path.resolve(__dirname, "..", "..");
19
21
  }
20
22
  /**
21
23
  * Create and configure the CLI program
24
+ * @returns Configured Commander program
22
25
  */
23
26
  export function createProgram() {
24
27
  const program = new Command();
25
28
  program
26
- .name('lisa')
27
- .description('Claude Code governance framework - apply guardrails and guidance to projects')
28
- .version('1.0.0')
29
- .argument('[destination]', 'Path to the project directory')
30
- .option('-n, --dry-run', 'Show what would be done without making changes')
31
- .option('-y, --yes', 'Non-interactive mode (auto-accept defaults, overwrite on conflict)')
32
- .option('-v, --validate', 'Validate project compatibility without applying changes')
33
- .option('-u, --uninstall', 'Remove Lisa-managed files from the project')
29
+ .name("lisa")
30
+ .description("Claude Code governance framework - apply guardrails and guidance to projects")
31
+ .version("1.0.0")
32
+ .argument("[destination]", "Path to the project directory")
33
+ .option("-n, --dry-run", "Show what would be done without making changes")
34
+ .option("-y, --yes", "Non-interactive mode (auto-accept defaults, overwrite on conflict)")
35
+ .option("-v, --validate", "Validate project compatibility without applying changes")
36
+ .option("-u, --uninstall", "Remove Lisa-managed files from the project")
34
37
  .action(async (destination, options) => {
35
38
  await runLisa(destination, options);
36
39
  });
37
40
  return program;
38
41
  }
42
+ /**
43
+ * Print usage help and exit
44
+ */
45
+ function printUsageAndExit() {
46
+ console.error("Error: destination path is required");
47
+ console.log("");
48
+ console.log("Usage: lisa [options] <destination-path>");
49
+ console.log("");
50
+ console.log("Options:");
51
+ console.log(" -n, --dry-run Show what would be done without making changes");
52
+ console.log(" -y, --yes Non-interactive mode (auto-accept defaults, overwrite on conflict)");
53
+ console.log(" -v, --validate Validate project compatibility without applying changes");
54
+ console.log(" -u, --uninstall Remove Lisa-managed files from the project");
55
+ console.log(" -h, --help Show this help message");
56
+ console.log("");
57
+ console.log("Examples:");
58
+ console.log(" lisa /path/to/my-project");
59
+ console.log(" lisa --dry-run .");
60
+ console.log(" lisa --yes /path/to/project # CI/CD pipeline usage");
61
+ console.log(" lisa --validate . # Check compatibility only");
62
+ console.log(" lisa --uninstall . # Remove Lisa configurations");
63
+ process.exit(1);
64
+ }
65
+ /**
66
+ * Create Lisa dependencies based on options
67
+ * @param dryRun - Whether in dry run mode
68
+ * @param yesMode - Whether in non-interactive mode
69
+ * @param logger - Logger instance
70
+ * @returns Dependencies for Lisa
71
+ */
72
+ function createDependencies(dryRun, yesMode, logger) {
73
+ return {
74
+ logger,
75
+ prompter: createPrompter(yesMode),
76
+ manifestService: dryRun
77
+ ? new DryRunManifestService()
78
+ : new ManifestService(),
79
+ backupService: dryRun
80
+ ? new DryRunBackupService()
81
+ : new BackupService(logger),
82
+ detectorRegistry: new DetectorRegistry(),
83
+ strategyRegistry: new StrategyRegistry(),
84
+ gitService: new GitService(),
85
+ };
86
+ }
39
87
  /**
40
88
  * Run Lisa with the given options
89
+ * @param destination - Path to destination directory
90
+ * @param options - CLI options
91
+ * @returns Promise that completes when Lisa finishes
41
92
  */
42
93
  async function runLisa(destination, options) {
43
- // Check for destination
44
94
  if (!destination) {
45
- console.error('Error: destination path is required');
46
- console.log('');
47
- console.log('Usage: lisa [options] <destination-path>');
48
- console.log('');
49
- console.log('Options:');
50
- console.log(' -n, --dry-run Show what would be done without making changes');
51
- console.log(' -y, --yes Non-interactive mode (auto-accept defaults, overwrite on conflict)');
52
- console.log(' -v, --validate Validate project compatibility without applying changes');
53
- console.log(' -u, --uninstall Remove Lisa-managed files from the project');
54
- console.log(' -h, --help Show this help message');
55
- console.log('');
56
- console.log('Examples:');
57
- console.log(' lisa /path/to/my-project');
58
- console.log(' lisa --dry-run .');
59
- console.log(' lisa --yes /path/to/project # CI/CD pipeline usage');
60
- console.log(' lisa --validate . # Check compatibility only');
61
- console.log(' lisa --uninstall . # Remove Lisa configurations');
62
- process.exit(1);
95
+ printUsageAndExit();
63
96
  }
64
- const lisaDir = getLisaDir();
65
- const destDir = toAbsolutePath(destination);
66
97
  const dryRun = options.dryRun ?? options.validate ?? false;
67
98
  const yesMode = options.yes ?? false;
68
- const validateOnly = options.validate ?? false;
69
99
  const config = {
70
- lisaDir,
71
- destDir,
100
+ lisaDir: getLisaDir(),
101
+ destDir: toAbsolutePath(destination),
72
102
  dryRun,
73
103
  yesMode,
74
- validateOnly,
104
+ validateOnly: options.validate ?? false,
75
105
  };
76
106
  const logger = new ConsoleLogger();
77
- const deps = {
78
- logger,
79
- prompter: createPrompter(yesMode),
80
- manifestService: dryRun ? new DryRunManifestService() : new ManifestService(),
81
- backupService: dryRun ? new DryRunBackupService() : new BackupService(logger),
82
- detectorRegistry: new DetectorRegistry(),
83
- strategyRegistry: new StrategyRegistry(),
84
- };
107
+ const deps = createDependencies(dryRun, yesMode, logger);
85
108
  const lisa = new Lisa(config, deps);
86
109
  try {
87
- let result;
88
- if (options.uninstall) {
89
- result = await lisa.uninstall();
90
- }
91
- else if (options.validate) {
92
- result = await lisa.validate();
93
- }
94
- else {
95
- result = await lisa.apply();
96
- }
110
+ const result = options.uninstall
111
+ ? await lisa.uninstall()
112
+ : options.validate
113
+ ? await lisa.validate()
114
+ : await lisa.apply();
97
115
  if (!result.success) {
116
+ result.errors.forEach(error => logger.error(error));
98
117
  process.exit(1);
99
118
  }
100
119
  }
@@ -103,5 +122,5 @@ async function runLisa(destination, options) {
103
122
  process.exit(1);
104
123
  }
105
124
  }
106
- export { createPrompter } from './prompts.js';
125
+ export { createPrompter } from "./prompts.js";
107
126
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAyB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,yBAAy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,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE;YACxB,CAAC,CAAC,OAAO,CAAC,QAAQ;gBAChB,CAAC,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE;gBACvB,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QAEzB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -1,8 +1,8 @@
1
- import type { ProjectType } from '../core/config.js';
1
+ import type { ProjectType } from "../core/config.js";
2
2
  /**
3
3
  * Overwrite decision options
4
4
  */
5
- export type OverwriteDecision = 'yes' | 'no' | 'diff';
5
+ export type OverwriteDecision = "yes" | "no" | "diff";
6
6
  /**
7
7
  * Interface for user prompts
8
8
  */
@@ -19,27 +19,41 @@ export interface IPrompter {
19
19
  * @returns Confirmed/modified project types
20
20
  */
21
21
  confirmProjectTypes(detected: readonly ProjectType[]): Promise<readonly ProjectType[]>;
22
+ /**
23
+ * Gate risky runs on explicit user consent, even in --yes mode.
24
+ * @param status Git status output showing uncommitted changes
25
+ * @returns True if user wants to proceed despite dirty state
26
+ */
27
+ confirmDirtyGit(status: string): Promise<boolean>;
22
28
  }
23
29
  /**
24
- * Interactive prompter using @inquirer/prompts
30
+ * Interactive prompter using {@link https://github.com/enquirer/enquirer inquirer}/prompts
25
31
  */
26
32
  export declare class InteractivePrompter implements IPrompter {
27
33
  promptOverwrite(relativePath: string): Promise<OverwriteDecision>;
28
34
  confirmProjectTypes(detected: readonly ProjectType[]): Promise<readonly ProjectType[]>;
35
+ confirmDirtyGit(status: string): Promise<boolean>;
29
36
  }
30
37
  /**
31
38
  * Auto-accepting prompter for non-interactive mode
39
+ *
40
+ * Note: confirmDirtyGit always prompts interactively even in auto-accept mode,
41
+ * as running Lisa on a dirty working directory requires explicit user consent.
32
42
  */
33
43
  export declare class AutoAcceptPrompter implements IPrompter {
34
44
  promptOverwrite(_relativePath: string): Promise<OverwriteDecision>;
35
45
  confirmProjectTypes(detected: readonly ProjectType[]): Promise<readonly ProjectType[]>;
46
+ confirmDirtyGit(status: string): Promise<boolean>;
36
47
  }
37
48
  /**
38
49
  * Check if running in interactive mode (TTY available)
50
+ * @returns True if running in TTY mode
39
51
  */
40
52
  export declare function isInteractive(): boolean;
41
53
  /**
42
54
  * Create appropriate prompter based on mode and TTY
55
+ * @param yesMode Non-interactive mode flag
56
+ * @returns Prompter instance
43
57
  */
44
58
  export declare function createPrompter(yesMode: boolean): IPrompter;
45
59
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAElE;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,OAAO,CAAC,SAAS,WAAW,EAA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AiB,CAAC;IAWjE,mBAAmB,CACvB,QAAQ,EAAE,SAAS,WAAW,EAAE,GAC/B,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;IAY5B,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAUxD;AAED;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAC5C,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIlE,mBAAmB,CACvB,QAAQ,EAAE,SAAS,WAAW,EAAE,GAC/B,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;IAI5B,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAwBxD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAK1D"}
@@ -1,53 +1,89 @@
1
- import { confirm, select } from '@inquirer/prompts';
1
+ import { confirm, select } from "@inquirer/prompts";
2
2
  /**
3
- * Interactive prompter using @inquirer/prompts
3
+ * Header printed before git status so users see context before deciding.
4
+ */
5
+ const UNCOMMITTED_CHANGES_HEADER = "\nUncommitted changes detected:";
6
+ /**
7
+ * Explicit consent prompt to avoid overwriting uncommitted work.
8
+ */
9
+ const DIRTY_GIT_CONFIRM_MESSAGE = "Your git working directory has uncommitted changes.\nContinue with Lisa anyway?";
10
+ /**
11
+ * Interactive prompter using {@link https://github.com/enquirer/enquirer inquirer}/prompts
4
12
  */
5
13
  export class InteractivePrompter {
6
14
  async promptOverwrite(relativePath) {
7
- const choice = await select({
15
+ return select({
8
16
  message: `File differs: ${relativePath}\nOverwrite?`,
9
17
  choices: [
10
- { name: 'Yes - overwrite', value: 'yes' },
11
- { name: 'No - skip', value: 'no' },
12
- { name: 'Diff - show differences', value: 'diff' },
18
+ { name: "Yes - overwrite", value: "yes" },
19
+ { name: "No - skip", value: "no" },
20
+ { name: "Diff - show differences", value: "diff" },
13
21
  ],
14
22
  });
15
- return choice;
16
23
  }
17
24
  async confirmProjectTypes(detected) {
18
- const typesDisplay = detected.length > 0 ? detected.join(', ') : '(none detected)';
19
- const confirmed = await confirm({
25
+ const typesDisplay = detected.length > 0 ? detected.join(", ") : "(none detected)";
26
+ await confirm({
20
27
  message: `Detected project types: ${typesDisplay}\nContinue with these types?`,
21
28
  default: true,
22
29
  });
23
- if (confirmed) {
24
- return detected;
25
- }
26
- // Allow user to specify types manually
27
- // For simplicity, just return detected types for now
28
- // Full implementation would allow type selection
29
30
  return detected;
30
31
  }
32
+ async confirmDirtyGit(status) {
33
+ console.log(UNCOMMITTED_CHANGES_HEADER);
34
+ console.log(status);
35
+ console.log("");
36
+ return confirm({
37
+ message: DIRTY_GIT_CONFIRM_MESSAGE,
38
+ default: false,
39
+ });
40
+ }
31
41
  }
32
42
  /**
33
43
  * Auto-accepting prompter for non-interactive mode
44
+ *
45
+ * Note: confirmDirtyGit always prompts interactively even in auto-accept mode,
46
+ * as running Lisa on a dirty working directory requires explicit user consent.
34
47
  */
35
48
  export class AutoAcceptPrompter {
36
49
  async promptOverwrite(_relativePath) {
37
- return 'yes';
50
+ return "yes";
38
51
  }
39
52
  async confirmProjectTypes(detected) {
40
53
  return detected;
41
54
  }
55
+ async confirmDirtyGit(status) {
56
+ // Always prompt for dirty git, even in auto-accept mode
57
+ // This is intentional - running Lisa on uncommitted changes is risky
58
+ if (!isInteractive()) {
59
+ // If not in TTY, cannot prompt - fail safe by returning false
60
+ console.log(UNCOMMITTED_CHANGES_HEADER);
61
+ console.log(status);
62
+ console.log("");
63
+ console.log("Cannot proceed: working directory has uncommitted changes and no TTY available for confirmation.");
64
+ console.log("Please commit or stash your changes before running Lisa.");
65
+ return false;
66
+ }
67
+ console.log(UNCOMMITTED_CHANGES_HEADER);
68
+ console.log(status);
69
+ console.log("");
70
+ return confirm({
71
+ message: DIRTY_GIT_CONFIRM_MESSAGE,
72
+ default: false,
73
+ });
74
+ }
42
75
  }
43
76
  /**
44
77
  * Check if running in interactive mode (TTY available)
78
+ * @returns True if running in TTY mode
45
79
  */
46
80
  export function isInteractive() {
47
81
  return process.stdin.isTTY === true;
48
82
  }
49
83
  /**
50
84
  * Create appropriate prompter based on mode and TTY
85
+ * @param yesMode Non-interactive mode flag
86
+ * @returns Prompter instance
51
87
  */
52
88
  export function createPrompter(yesMode) {
53
89
  if (yesMode || !isInteractive()) {
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AA2BpD;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAC9B,KAAK,CAAC,eAAe,CAAC,YAAoB;QACxC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;YAC1B,OAAO,EAAE,iBAAiB,YAAY,cAAc;YACpD,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAc,EAAE;gBAClD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAa,EAAE;gBAC3C,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,EAAE,MAAe,EAAE;aAC5D;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,QAAgC;QACxD,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC;QAEnF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;YAC9B,OAAO,EAAE,2BAA2B,YAAY,8BAA8B;YAC9E,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,QAAQ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AAG,CAAC,0BAA0B,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAEhB,OAAO,OAAO,CAAC;YACb,OAAO,EAAE,yBAAyB;YAClC,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,IAAI,OAAO,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QAChC,OAAO,IAAI,kBAAkB,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,IAAI,mBAAmB,EAAE,CAAC;AACnC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Copy strategy types for handling file operations
3
3
  */
4
- export type CopyStrategy = 'copy-overwrite' | 'copy-contents' | 'create-only' | 'merge';
4
+ export type CopyStrategy = "copy-overwrite" | "copy-contents" | "create-only" | "merge";
5
5
  /**
6
6
  * Available project types that Lisa can detect and configure
7
7
  */
8
- export type ProjectType = 'typescript' | 'expo' | 'nestjs' | 'cdk' | 'npm-package';
8
+ export type ProjectType = "typescript" | "expo" | "nestjs" | "cdk" | "npm-package";
9
9
  /**
10
10
  * Project type hierarchy - child types include their parent types
11
11
  */
@@ -36,14 +36,14 @@ export interface LisaConfig {
36
36
  /**
37
37
  * Operation mode for Lisa execution
38
38
  */
39
- export type OperationMode = 'apply' | 'validate' | 'uninstall';
39
+ export type OperationMode = "apply" | "validate" | "uninstall";
40
40
  /**
41
41
  * Result of a single file operation
42
42
  */
43
43
  export interface FileOperationResult {
44
44
  readonly relativePath: string;
45
45
  readonly strategy: CopyStrategy;
46
- readonly action: 'copied' | 'skipped' | 'overwritten' | 'appended' | 'merged' | 'created';
46
+ readonly action: "copied" | "skipped" | "overwritten" | "appended" | "merged" | "created";
47
47
  readonly linesAdded?: number;
48
48
  }
49
49
  /**
@@ -55,6 +55,14 @@ export interface OperationCounters {
55
55
  overwritten: number;
56
56
  appended: number;
57
57
  merged: number;
58
+ deleted: number;
59
+ }
60
+ /**
61
+ * Structure of deletions.json file
62
+ */
63
+ export interface DeletionsConfig {
64
+ /** Paths to delete (files or directories) */
65
+ readonly paths: readonly string[];
58
66
  }
59
67
  /**
60
68
  * Result of a Lisa operation
@@ -68,6 +76,7 @@ export interface LisaResult {
68
76
  }
69
77
  /**
70
78
  * Create initial operation counters with all values at zero
79
+ * @returns Operation counters initialized to zero
71
80
  */
72
81
  export declare function createInitialCounters(): OperationCounters;
73
82
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,eAAe,GAAG,aAAa,GAAG,OAAO,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC,CAM3E,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,WAAW,EAAoE,CAAC;AAE1H;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAKzC,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;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,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,iBAAiB,CASzD"}
@@ -2,27 +2,34 @@
2
2
  * Project type hierarchy - child types include their parent types
3
3
  */
4
4
  export const PROJECT_TYPE_HIERARCHY = {
5
- expo: 'typescript',
6
- nestjs: 'typescript',
7
- cdk: 'typescript',
8
- 'npm-package': 'typescript',
5
+ expo: "typescript",
6
+ nestjs: "typescript",
7
+ cdk: "typescript",
8
+ "npm-package": "typescript",
9
9
  typescript: undefined,
10
10
  };
11
11
  /**
12
12
  * Canonical order for processing project types (parents before children)
13
13
  */
14
- export const PROJECT_TYPE_ORDER = ['typescript', 'npm-package', 'expo', 'nestjs', 'cdk'];
14
+ export const PROJECT_TYPE_ORDER = [
15
+ "typescript",
16
+ "npm-package",
17
+ "expo",
18
+ "nestjs",
19
+ "cdk",
20
+ ];
15
21
  /**
16
22
  * All available copy strategies in processing order
17
23
  */
18
24
  export const COPY_STRATEGIES = [
19
- 'copy-overwrite',
20
- 'copy-contents',
21
- 'create-only',
22
- 'merge',
25
+ "copy-overwrite",
26
+ "copy-contents",
27
+ "create-only",
28
+ "merge",
23
29
  ];
24
30
  /**
25
31
  * Create initial operation counters with all values at zero
32
+ * @returns Operation counters initialized to zero
26
33
  */
27
34
  export function createInitialCounters() {
28
35
  return {
@@ -31,6 +38,7 @@ export function createInitialCounters() {
31
38
  overwritten: 0,
32
39
  appended: 0,
33
40
  merged: 0,
41
+ deleted: 0,
34
42
  };
35
43
  }
36
44
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsD;IACvF,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,YAAY;IACpB,GAAG,EAAE,YAAY;IACjB,aAAa,EAAE,YAAY;IAC3B,UAAU,EAAE,SAAS;CACb,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAE1H;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4B;IACtD,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,OAAO;CACC,CAAC;AA2DX;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAE/B;IACF,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,YAAY;IACpB,GAAG,EAAE,YAAY;IACjB,aAAa,EAAE,YAAY;IAC3B,UAAU,EAAE,SAAS;CACb,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,YAAY;IACZ,aAAa;IACb,MAAM;IACN,QAAQ;IACR,KAAK;CACG,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4B;I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