@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.
- package/README.md +244 -36
- package/all/copy-overwrite/.claude/README.md +1 -3
- package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
- package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
- package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
- package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
- package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
- package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
- package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
- package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
- package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
- package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
- package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
- package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
- package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
- package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
- package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
- package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
- package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
- package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
- package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
- package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
- package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
- package/all/copy-overwrite/.claude/hooks/README.md +75 -0
- package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
- package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
- package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
- package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
- package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
- package/all/copy-overwrite/.claude/settings.json +35 -14
- package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
- package/all/copy-overwrite/.safety-net.json +25 -0
- package/all/copy-overwrite/CLAUDE.md +8 -30
- package/all/copy-overwrite/HUMAN.md +517 -17
- package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
- package/all/create-only/scripts/setup-deploy-key.sh +190 -0
- package/all/deletions.json +5 -0
- package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
- package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
- package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
- package/cdk/copy-overwrite/eslint.config.ts +51 -0
- package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
- package/cdk/copy-overwrite/knip.json +53 -0
- package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
- package/cdk/merge/package.json +17 -1
- package/dist/cli/index.d.ts +3 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +83 -64
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/prompts.d.ts +17 -3
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +52 -16
- package/dist/cli/prompts.js.map +1 -1
- package/dist/core/config.d.ts +13 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +17 -9
- package/dist/core/config.js.map +1 -1
- package/dist/core/git-service.d.ts +40 -0
- package/dist/core/git-service.d.ts.map +1 -0
- package/dist/core/git-service.js +52 -0
- package/dist/core/git-service.js.map +1 -0
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +3 -3
- package/dist/core/lisa.d.ts +124 -7
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +423 -221
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/manifest.d.ts +5 -1
- package/dist/core/manifest.d.ts.map +1 -1
- package/dist/core/manifest.js +22 -16
- package/dist/core/manifest.js.map +1 -1
- package/dist/detection/detector.interface.d.ts +1 -1
- package/dist/detection/detectors/cdk.d.ts +6 -1
- package/dist/detection/detectors/cdk.d.ts.map +1 -1
- package/dist/detection/detectors/cdk.js +16 -8
- package/dist/detection/detectors/cdk.js.map +1 -1
- package/dist/detection/detectors/expo.d.ts +6 -1
- package/dist/detection/detectors/expo.d.ts.map +1 -1
- package/dist/detection/detectors/expo.js +13 -8
- package/dist/detection/detectors/expo.js.map +1 -1
- package/dist/detection/detectors/nestjs.d.ts +7 -2
- package/dist/detection/detectors/nestjs.d.ts.map +1 -1
- package/dist/detection/detectors/nestjs.js +17 -9
- package/dist/detection/detectors/nestjs.js.map +1 -1
- package/dist/detection/detectors/npm-package.d.ts +6 -1
- package/dist/detection/detectors/npm-package.d.ts.map +1 -1
- package/dist/detection/detectors/npm-package.js +9 -4
- package/dist/detection/detectors/npm-package.js.map +1 -1
- package/dist/detection/detectors/typescript.d.ts +6 -1
- package/dist/detection/detectors/typescript.d.ts.map +1 -1
- package/dist/detection/detectors/typescript.js +12 -7
- package/dist/detection/detectors/typescript.js.map +1 -1
- package/dist/detection/index.d.ts +13 -3
- package/dist/detection/index.d.ts.map +1 -1
- package/dist/detection/index.js +17 -7
- package/dist/detection/index.js.map +1 -1
- package/dist/errors/index.d.ts +66 -2
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +89 -17
- package/dist/errors/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/logging/console-logger.d.ts +21 -1
- package/dist/logging/console-logger.d.ts.map +1 -1
- package/dist/logging/console-logger.js +26 -6
- package/dist/logging/console-logger.js.map +1 -1
- package/dist/logging/index.d.ts +3 -3
- package/dist/logging/index.js +2 -2
- package/dist/logging/logger.interface.d.ts +1 -1
- package/dist/logging/silent-logger.d.ts +21 -1
- package/dist/logging/silent-logger.d.ts.map +1 -1
- package/dist/logging/silent-logger.js +20 -0
- package/dist/logging/silent-logger.js.map +1 -1
- package/dist/strategies/copy-contents.d.ts +47 -6
- package/dist/strategies/copy-contents.d.ts.map +1 -1
- package/dist/strategies/copy-contents.js +99 -49
- package/dist/strategies/copy-contents.js.map +1 -1
- package/dist/strategies/copy-overwrite.d.ts +10 -2
- package/dist/strategies/copy-overwrite.d.ts.map +1 -1
- package/dist/strategies/copy-overwrite.js +17 -9
- package/dist/strategies/copy-overwrite.js.map +1 -1
- package/dist/strategies/create-only.d.ts +10 -2
- package/dist/strategies/create-only.d.ts.map +1 -1
- package/dist/strategies/create-only.js +14 -6
- package/dist/strategies/create-only.js.map +1 -1
- package/dist/strategies/index.d.ts +17 -7
- package/dist/strategies/index.d.ts.map +1 -1
- package/dist/strategies/index.js +19 -9
- package/dist/strategies/index.js.map +1 -1
- package/dist/strategies/merge.d.ts +10 -2
- package/dist/strategies/merge.d.ts.map +1 -1
- package/dist/strategies/merge.js +21 -21
- package/dist/strategies/merge.js.map +1 -1
- package/dist/strategies/strategy.interface.d.ts +1 -1
- package/dist/strategies/strategy.interface.d.ts.map +1 -1
- package/dist/transaction/backup.d.ts +15 -1
- package/dist/transaction/backup.d.ts.map +1 -1
- package/dist/transaction/backup.js +47 -12
- package/dist/transaction/backup.js.map +1 -1
- package/dist/transaction/index.d.ts +3 -3
- package/dist/transaction/index.js +2 -2
- package/dist/transaction/transaction.d.ts +25 -2
- package/dist/transaction/transaction.d.ts.map +1 -1
- package/dist/transaction/transaction.js +25 -2
- package/dist/transaction/transaction.js.map +1 -1
- package/dist/utils/file-operations.d.ts +21 -0
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +48 -12
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/json-utils.d.ts +12 -0
- package/dist/utils/json-utils.d.ts.map +1 -1
- package/dist/utils/json-utils.js +17 -5
- package/dist/utils/json-utils.js.map +1 -1
- package/dist/utils/path-utils.d.ts +11 -0
- package/dist/utils/path-utils.d.ts.map +1 -1
- package/dist/utils/path-utils.js +12 -1
- package/dist/utils/path-utils.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
- package/eslint-plugin-code-organization/index.js +5 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
- package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
- package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
- package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
- package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
- package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
- package/expo/copy-overwrite/eslint.config.ts +53 -0
- package/expo/copy-overwrite/eslint.expo.ts +330 -0
- package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
- package/expo/copy-overwrite/knip.json +132 -0
- package/expo/copy-overwrite/lighthouserc.js +27 -0
- package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
- package/expo/create-only/lighthouserc-config.json +6 -1
- package/expo/merge/package.json +16 -3
- package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
- package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
- package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
- package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
- package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
- package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
- package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
- package/nestjs/copy-overwrite/eslint.config.ts +53 -0
- package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
- package/nestjs/merge/package.json +11 -3
- package/package.json +34 -40
- package/typescript/copy-contents/.husky/pre-commit +1 -1
- package/typescript/copy-contents/.husky/pre-push +99 -118
- package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
- package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
- package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
- package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
- package/typescript/copy-overwrite/.claude/settings.json +79 -0
- package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
- package/typescript/copy-overwrite/.github/README.md +49 -1
- package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
- package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
- package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
- package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
- package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
- package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
- package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
- package/typescript/copy-overwrite/.gitleaksignore +3 -0
- package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
- package/typescript/copy-overwrite/.prettierignore +2 -1
- package/typescript/copy-overwrite/.yamllint +2 -0
- package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
- package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
- package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
- package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
- package/typescript/copy-overwrite/eslint.base.ts +430 -0
- package/typescript/copy-overwrite/eslint.config.ts +52 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
- package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
- package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
- package/typescript/copy-overwrite/knip.json +64 -0
- package/typescript/copy-overwrite/sgconfig.yml +11 -0
- package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
- package/typescript/create-only/eslint.config.local.ts +24 -0
- package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
- package/typescript/github-rulesets/base.json +2 -75
- package/typescript/merge/.claude/settings.json +160 -0
- package/typescript/merge/package.json +35 -34
- package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
- package/expo/copy-overwrite/eslint.config.mjs +0 -560
- package/lisa.sh +0 -35
- package/typescript/copy-overwrite/eslint.config.mjs +0 -390
- /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
- /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for git operations
|
|
3
|
+
*/
|
|
4
|
+
export interface IGitService {
|
|
5
|
+
/**
|
|
6
|
+
* Check if directory is a git repository
|
|
7
|
+
* @param dir - Directory to check
|
|
8
|
+
* @returns True if directory is a git repository
|
|
9
|
+
*/
|
|
10
|
+
isRepository(dir: string): Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Check if working directory has uncommitted changes
|
|
13
|
+
* @param dir - Directory to check
|
|
14
|
+
* @returns True if there are uncommitted or unstaged changes
|
|
15
|
+
*/
|
|
16
|
+
isDirty(dir: string): Promise<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Get git status output
|
|
19
|
+
* @param dir - Directory to check
|
|
20
|
+
* @returns Git status output (short format)
|
|
21
|
+
*/
|
|
22
|
+
getStatus(dir: string): Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Git service implementation
|
|
26
|
+
*/
|
|
27
|
+
export declare class GitService implements IGitService {
|
|
28
|
+
isRepository(dir: string): Promise<boolean>;
|
|
29
|
+
isDirty(dir: string): Promise<boolean>;
|
|
30
|
+
getStatus(dir: string): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* No-op git service for testing or when git checks should be skipped
|
|
34
|
+
*/
|
|
35
|
+
export declare class NoOpGitService implements IGitService {
|
|
36
|
+
isRepository(_dir: string): Promise<boolean>;
|
|
37
|
+
isDirty(_dir: string): Promise<boolean>;
|
|
38
|
+
getStatus(_dir: string): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=git-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-service.d.ts","sourceRoot":"","sources":["../../src/core/git-service.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5C;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvC;;;;OAIG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,qBAAa,UAAW,YAAW,WAAW;IACtC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3C,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYtC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAU9C;AAED;;GAEG;AACH,qBAAa,cAAe,YAAW,WAAW;IAC1C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG/C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { exec } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import * as fse from "fs-extra";
|
|
5
|
+
const execAsync = promisify(exec);
|
|
6
|
+
/**
|
|
7
|
+
* Git service implementation
|
|
8
|
+
*/
|
|
9
|
+
export class GitService {
|
|
10
|
+
async isRepository(dir) {
|
|
11
|
+
const gitDir = path.join(dir, ".git");
|
|
12
|
+
return fse.pathExists(gitDir);
|
|
13
|
+
}
|
|
14
|
+
async isDirty(dir) {
|
|
15
|
+
try {
|
|
16
|
+
const { stdout } = await execAsync("git status --porcelain", {
|
|
17
|
+
cwd: dir,
|
|
18
|
+
});
|
|
19
|
+
return stdout.trim().length > 0;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// Fail safe: unknown git state should block risky operations
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async getStatus(dir) {
|
|
27
|
+
try {
|
|
28
|
+
const { stdout } = await execAsync("git status --short", {
|
|
29
|
+
cwd: dir,
|
|
30
|
+
});
|
|
31
|
+
return stdout.trim();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* No-op git service for testing or when git checks should be skipped
|
|
40
|
+
*/
|
|
41
|
+
export class NoOpGitService {
|
|
42
|
+
async isRepository(_dir) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
async isDirty(_dir) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
async getStatus(_dir) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=git-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-service.js","sourceRoot":"","sources":["../../src/core/git-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AA4BlC;;GAEG;AACH,MAAM,OAAO,UAAU;IACrB,KAAK,CAAC,YAAY,CAAC,GAAW;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACvB,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,wBAAwB,EAAE;gBAC3D,GAAG,EAAE,GAAG;aACT,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,6DAA6D;YAC7D,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAW;QACzB,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,oBAAoB,EAAE;gBACvD,GAAG,EAAE,GAAG;aACT,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,YAAY,CAAC,IAAY;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAY;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { Lisa, type LisaDependencies } from
|
|
3
|
-
export { ManifestService, DryRunManifestService, ManifestNotFoundError, MANIFEST_FILENAME, type IManifestService, type ManifestEntry, } from
|
|
1
|
+
export * from "./config.js";
|
|
2
|
+
export { Lisa, type LisaDependencies } from "./lisa.js";
|
|
3
|
+
export { ManifestService, DryRunManifestService, ManifestNotFoundError, MANIFEST_FILENAME, type IManifestService, type ManifestEntry, } from "./manifest.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { Lisa } from
|
|
3
|
-
export { ManifestService, DryRunManifestService, ManifestNotFoundError, MANIFEST_FILENAME, } from
|
|
1
|
+
export * from "./config.js";
|
|
2
|
+
export { Lisa } from "./lisa.js";
|
|
3
|
+
export { ManifestService, DryRunManifestService, ManifestNotFoundError, MANIFEST_FILENAME, } from "./manifest.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/core/lisa.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { DetectorRegistry } from
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import type { IBackupService } from
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
1
|
+
import type { IPrompter } from "../cli/prompts.js";
|
|
2
|
+
import { DetectorRegistry } from "../detection/index.js";
|
|
3
|
+
import type { ILogger } from "../logging/index.js";
|
|
4
|
+
import { StrategyRegistry } from "../strategies/index.js";
|
|
5
|
+
import type { IBackupService } from "../transaction/index.js";
|
|
6
|
+
import type { LisaConfig, LisaResult } from "./config.js";
|
|
7
|
+
import type { IGitService } from "./git-service.js";
|
|
8
|
+
import type { IManifestService } from "./manifest.js";
|
|
8
9
|
/**
|
|
9
10
|
* Dependencies for Lisa operations
|
|
10
11
|
*/
|
|
@@ -15,6 +16,7 @@ export interface LisaDependencies {
|
|
|
15
16
|
readonly backupService: IBackupService;
|
|
16
17
|
readonly detectorRegistry: DetectorRegistry;
|
|
17
18
|
readonly strategyRegistry: StrategyRegistry;
|
|
19
|
+
readonly gitService: IGitService;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Main Lisa orchestrator
|
|
@@ -24,51 +26,166 @@ export declare class Lisa {
|
|
|
24
26
|
private readonly deps;
|
|
25
27
|
private counters;
|
|
26
28
|
private detectedTypes;
|
|
29
|
+
private readonly separator;
|
|
30
|
+
private readonly dryRunPrefix;
|
|
31
|
+
private readonly dryRunSkipMsg;
|
|
32
|
+
private readonly dryRunPromptMsg;
|
|
33
|
+
private readonly dryRunAppendMsg;
|
|
34
|
+
private readonly dryRunMergeMsg;
|
|
35
|
+
private readonly copyMsg;
|
|
36
|
+
private readonly skipMsg;
|
|
37
|
+
private readonly promptMsg;
|
|
38
|
+
private readonly appendMsg;
|
|
39
|
+
private readonly mergeMsg;
|
|
40
|
+
/**
|
|
41
|
+
* Initialize Lisa orchestrator
|
|
42
|
+
* @param config - Configuration for the apply/uninstall operation
|
|
43
|
+
* @param deps - Injected service dependencies
|
|
44
|
+
*/
|
|
27
45
|
constructor(config: LisaConfig, deps: LisaDependencies);
|
|
46
|
+
/**
|
|
47
|
+
* Initialize services
|
|
48
|
+
*/
|
|
49
|
+
private initServices;
|
|
50
|
+
/**
|
|
51
|
+
* Detect and confirm project types
|
|
52
|
+
*/
|
|
53
|
+
private detectTypes;
|
|
54
|
+
/**
|
|
55
|
+
* Process all configurations
|
|
56
|
+
*/
|
|
57
|
+
private processConfigurations;
|
|
58
|
+
/**
|
|
59
|
+
* Process deletions from deletions.json files
|
|
60
|
+
*/
|
|
61
|
+
private processDeletions;
|
|
62
|
+
/**
|
|
63
|
+
* Process a single deletions.json file
|
|
64
|
+
* @param deletionsPath - Path to the deletions.json file
|
|
65
|
+
*/
|
|
66
|
+
private processDeletionsFile;
|
|
67
|
+
/**
|
|
68
|
+
* Process a single deletion path
|
|
69
|
+
* @param relativePath - Relative path to delete
|
|
70
|
+
*/
|
|
71
|
+
private processSingleDeletion;
|
|
72
|
+
/**
|
|
73
|
+
* Finalize operation
|
|
74
|
+
* @returns Promise that resolves when finalization is complete
|
|
75
|
+
*/
|
|
76
|
+
private finalize;
|
|
77
|
+
/**
|
|
78
|
+
* Create success result
|
|
79
|
+
* @returns Success result with operation counters and detected types
|
|
80
|
+
*/
|
|
81
|
+
private getSuccessResult;
|
|
82
|
+
/**
|
|
83
|
+
* Handle apply error and rollback
|
|
84
|
+
* @param error Error that occurred during apply
|
|
85
|
+
* @returns Error result
|
|
86
|
+
*/
|
|
87
|
+
private handleApplyError;
|
|
28
88
|
/**
|
|
29
89
|
* Apply Lisa configurations to the destination project
|
|
90
|
+
* @returns Result of the apply operation
|
|
30
91
|
*/
|
|
31
92
|
apply(): Promise<LisaResult>;
|
|
32
93
|
/**
|
|
33
94
|
* Validate compatibility without applying changes
|
|
95
|
+
* @returns Result of the validate operation
|
|
34
96
|
*/
|
|
35
97
|
validate(): Promise<LisaResult>;
|
|
36
98
|
/**
|
|
37
99
|
* Uninstall Lisa-managed files from the project
|
|
100
|
+
* @returns Result of the uninstall operation with removal statistics
|
|
38
101
|
*/
|
|
39
102
|
uninstall(): Promise<LisaResult>;
|
|
103
|
+
/**
|
|
104
|
+
* Process single uninstall entry and return updated counts
|
|
105
|
+
* @param entry - Manifest entry to process for removal
|
|
106
|
+
* @param stats - Current removal statistics
|
|
107
|
+
* @param stats.removed - Number of files removed so far
|
|
108
|
+
* @param stats.skipped - Number of files skipped so far
|
|
109
|
+
* @returns Updated removal statistics after processing this entry
|
|
110
|
+
*/
|
|
111
|
+
private processEntry;
|
|
112
|
+
/**
|
|
113
|
+
* Process manifest entries during uninstall
|
|
114
|
+
* @param entries Manifest entries to process
|
|
115
|
+
* @returns Stats with removed and skipped counts
|
|
116
|
+
*/
|
|
117
|
+
private processUninstallEntries;
|
|
40
118
|
/**
|
|
41
119
|
* Process all files for a given project type
|
|
120
|
+
* @param type Project type to process
|
|
42
121
|
*/
|
|
43
122
|
private processProjectType;
|
|
44
123
|
/**
|
|
45
124
|
* Process all files in a directory with the given strategy
|
|
125
|
+
* @param srcDir Source directory
|
|
126
|
+
* @param strategy Strategy to apply
|
|
127
|
+
* @param strategy.name Strategy name
|
|
128
|
+
* @param strategy.apply Apply function
|
|
46
129
|
*/
|
|
47
130
|
private processDirectory;
|
|
48
131
|
/**
|
|
49
132
|
* Handle overwrite prompt for conflicting files
|
|
133
|
+
* @param relativePath Relative path of the file
|
|
134
|
+
* @param sourcePath Source file path
|
|
135
|
+
* @param destPath Destination file path
|
|
136
|
+
* @returns True if user approves overwrite
|
|
50
137
|
*/
|
|
51
138
|
private handleOverwritePrompt;
|
|
52
139
|
/**
|
|
53
140
|
* Show diff between two files
|
|
141
|
+
* @param sourcePath Source file path
|
|
142
|
+
* @param destPath Destination file path
|
|
54
143
|
*/
|
|
55
144
|
private showDiff;
|
|
56
145
|
/**
|
|
57
146
|
* Update counters based on operation result
|
|
147
|
+
* @param result Operation result to count
|
|
58
148
|
*/
|
|
59
149
|
private updateCounters;
|
|
150
|
+
/**
|
|
151
|
+
* Log a message using appropriate logger method
|
|
152
|
+
* @param dryMsg Message for dry run mode
|
|
153
|
+
* @param successMsg Message for success mode
|
|
154
|
+
*/
|
|
155
|
+
private logMessage;
|
|
60
156
|
/**
|
|
61
157
|
* Log operation result
|
|
158
|
+
* @param result Result to log
|
|
62
159
|
*/
|
|
63
160
|
private logResult;
|
|
64
161
|
/**
|
|
65
162
|
* Validate destination directory exists and is a directory
|
|
66
163
|
*/
|
|
67
164
|
private validateDestination;
|
|
165
|
+
/**
|
|
166
|
+
* Check for uncommitted git changes and prompt user if dirty
|
|
167
|
+
*/
|
|
168
|
+
private validateGitState;
|
|
68
169
|
/**
|
|
69
170
|
* Print header banner
|
|
70
171
|
*/
|
|
71
172
|
private printHeader;
|
|
173
|
+
/**
|
|
174
|
+
* Print summary header with mode
|
|
175
|
+
*/
|
|
176
|
+
private printSummaryHeader;
|
|
177
|
+
/**
|
|
178
|
+
* Print summary statistics
|
|
179
|
+
*/
|
|
180
|
+
private printSummaryStats;
|
|
181
|
+
/**
|
|
182
|
+
* Print project types
|
|
183
|
+
*/
|
|
184
|
+
private printProjectTypes;
|
|
185
|
+
/**
|
|
186
|
+
* Print validation result
|
|
187
|
+
*/
|
|
188
|
+
private printValidationResult;
|
|
72
189
|
/**
|
|
73
190
|
* Print summary
|
|
74
191
|
*/
|
package/dist/core/lisa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lisa.d.ts","sourceRoot":"","sources":["../../src/core/lisa.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lisa.d.ts","sourceRoot":"","sources":["../../src/core/lisa.ts"],"names":[],"mappings":"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"}
|