@lumy-pack/syncpoint 0.0.1 → 0.0.3
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 +943 -0
- package/assets/config.default.yml +16 -2
- package/dist/cli.mjs +2810 -1449
- package/dist/commands/Backup.d.ts +1 -1
- package/dist/commands/CreateTemplate.d.ts +2 -0
- package/dist/commands/Help.d.ts +2 -0
- package/dist/commands/Wizard.d.ts +2 -0
- package/dist/constants.d.ts +1 -2
- package/dist/core/backup.d.ts +8 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/metadata.d.ts +1 -1
- package/dist/core/provision.d.ts +1 -1
- package/dist/core/restore.d.ts +1 -1
- package/dist/index.cjs +240 -47
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +244 -51
- package/dist/prompts/wizard-config.d.ts +9 -0
- package/dist/prompts/wizard-template.d.ts +7 -0
- package/dist/schemas/ajv.d.ts +1 -1
- package/dist/utils/claude-code-runner.d.ts +29 -0
- package/dist/utils/command-registry.d.ts +23 -0
- package/dist/utils/error-formatter.d.ts +16 -0
- package/dist/utils/file-scanner.d.ts +25 -0
- package/dist/utils/paths.d.ts +5 -0
- package/dist/utils/pattern.d.ts +46 -0
- package/dist/utils/types.d.ts +5 -3
- package/dist/utils/yaml-parser.d.ts +19 -0
- package/dist/version.d.ts +5 -0
- package/package.json +5 -3
package/dist/utils/types.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export interface RestorePlan {
|
|
|
65
65
|
}
|
|
66
66
|
export interface RestoreAction {
|
|
67
67
|
path: string;
|
|
68
|
-
action:
|
|
68
|
+
action: 'overwrite' | 'skip' | 'create';
|
|
69
69
|
currentSize?: number;
|
|
70
70
|
backupSize?: number;
|
|
71
71
|
reason: string;
|
|
@@ -76,7 +76,7 @@ export interface ProvisionResult {
|
|
|
76
76
|
}
|
|
77
77
|
export interface StepResult {
|
|
78
78
|
name: string;
|
|
79
|
-
status:
|
|
79
|
+
status: 'success' | 'skipped' | 'failed' | 'running' | 'pending';
|
|
80
80
|
duration?: number;
|
|
81
81
|
error?: string;
|
|
82
82
|
output?: string;
|
|
@@ -84,6 +84,7 @@ export interface StepResult {
|
|
|
84
84
|
export interface BackupOptions {
|
|
85
85
|
dryRun?: boolean;
|
|
86
86
|
tag?: string;
|
|
87
|
+
verbose?: boolean;
|
|
87
88
|
}
|
|
88
89
|
export interface RestoreOptions {
|
|
89
90
|
dryRun?: boolean;
|
|
@@ -91,6 +92,7 @@ export interface RestoreOptions {
|
|
|
91
92
|
export interface ProvisionOptions {
|
|
92
93
|
dryRun?: boolean;
|
|
93
94
|
skipRestore?: boolean;
|
|
95
|
+
file?: string;
|
|
94
96
|
}
|
|
95
97
|
export interface BackupInfo {
|
|
96
98
|
filename: string;
|
|
@@ -121,7 +123,7 @@ export interface StatusInfo {
|
|
|
121
123
|
oldestBackup?: Date;
|
|
122
124
|
}
|
|
123
125
|
export interface CleanupPolicy {
|
|
124
|
-
type:
|
|
126
|
+
type: 'keep-recent' | 'older-than' | 'select';
|
|
125
127
|
count?: number;
|
|
126
128
|
days?: number;
|
|
127
129
|
indices?: number[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract YAML content from LLM response
|
|
3
|
+
* Handles markdown code blocks and pure YAML
|
|
4
|
+
* Rejects plain text and scalar values
|
|
5
|
+
*/
|
|
6
|
+
export declare function extractYAML(response: string): string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Parse YAML string to object
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseYAML<T = unknown>(yamlString: string): T;
|
|
11
|
+
/**
|
|
12
|
+
* Extract and parse YAML from LLM response
|
|
13
|
+
*/
|
|
14
|
+
export declare function extractAndParseYAML<T = unknown>(response: string): T | null;
|
|
15
|
+
/**
|
|
16
|
+
* Extract config-specific YAML (requires 'backup:' key)
|
|
17
|
+
* More strict validation for Syncpoint config files
|
|
18
|
+
*/
|
|
19
|
+
export declare function extractConfigYAML(response: string): string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumy-pack/syncpoint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "CLI tool for project synchronization and scaffolding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -45,12 +45,14 @@
|
|
|
45
45
|
"ink": "^5.0.0",
|
|
46
46
|
"ink-select-input": "^6.0.0",
|
|
47
47
|
"ink-spinner": "^5.0.0",
|
|
48
|
+
"micromatch": "^4.0.8",
|
|
48
49
|
"picocolors": "^1.1.1",
|
|
49
50
|
"react": "^18.0.0",
|
|
50
51
|
"tar": "^7.0.0",
|
|
51
52
|
"yaml": "^2.0.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@types/micromatch": "^4.0.9",
|
|
54
56
|
"@types/node": "^20.11.0",
|
|
55
57
|
"@types/react": "^18.0.0",
|
|
56
58
|
"@types/tar": "^6.1.13",
|
|
@@ -58,10 +60,10 @@
|
|
|
58
60
|
"ink-testing-library": "^4.0.0"
|
|
59
61
|
},
|
|
60
62
|
"scripts": {
|
|
61
|
-
"build": "tsup && pnpm build:types",
|
|
63
|
+
"build": "node scripts/inject-version.js && tsup && pnpm build:types",
|
|
62
64
|
"build:types": "tsc -p ./tsconfig.declarations.json",
|
|
63
65
|
"build:publish:npm": "pnpm build && pnpm publish:npm",
|
|
64
|
-
"dev": "tsx src/cli.ts",
|
|
66
|
+
"dev": "node scripts/inject-version.js && tsx src/cli.ts",
|
|
65
67
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
66
68
|
"lint": "eslint \"src/**/*.ts\"",
|
|
67
69
|
"publish:npm": "pnpm publish --access public --no-git-checks",
|