@deepdiver_sj/claude-settings 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -0
- package/dist/bin/claude-settings.d.ts +51 -0
- package/dist/bin/claude-settings.d.ts.map +1 -0
- package/dist/bin/claude-settings.js +218 -0
- package/dist/bin/claude-settings.js.map +1 -0
- package/dist/core/constants.d.ts +609 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +463 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/paths.d.ts +134 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +318 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/snapshot/exporter.d.ts +14 -0
- package/dist/snapshot/exporter.d.ts.map +1 -0
- package/dist/snapshot/exporter.js +168 -0
- package/dist/snapshot/exporter.js.map +1 -0
- package/dist/snapshot/importer.d.ts +11 -0
- package/dist/snapshot/importer.d.ts.map +1 -0
- package/dist/snapshot/importer.js +118 -0
- package/dist/snapshot/importer.js.map +1 -0
- package/dist/snapshot/types.d.ts +57 -0
- package/dist/snapshot/types.d.ts.map +1 -0
- package/dist/snapshot/types.js +5 -0
- package/dist/snapshot/types.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the Claude settings snapshot (export / import).
|
|
3
|
+
*/
|
|
4
|
+
export interface SnapshotFile {
|
|
5
|
+
/** Path relative to ~/.claude e.g. "executables/hooks/biome-check.mjs" */
|
|
6
|
+
relativePath: string;
|
|
7
|
+
/** UTF-8 file content */
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PluginEntry {
|
|
11
|
+
/** Human-readable plugin name */
|
|
12
|
+
name: string;
|
|
13
|
+
/** npm package name or git URL */
|
|
14
|
+
source: string;
|
|
15
|
+
/** Shell command to re-install the plugin on the target machine */
|
|
16
|
+
installCmd: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EnvSnapshot {
|
|
19
|
+
/** Format version — bump when the shape changes */
|
|
20
|
+
version: string;
|
|
21
|
+
/** ISO-8601 timestamp of when the snapshot was created */
|
|
22
|
+
exportedAt: string;
|
|
23
|
+
/** OS that produced the snapshot */
|
|
24
|
+
sourceOS: 'win32' | 'linux' | 'darwin';
|
|
25
|
+
/** Environment files (settings, hooks, rules, skills …) */
|
|
26
|
+
files: SnapshotFile[];
|
|
27
|
+
/** settings.json content with paths normalised to {{CLAUDE_HOME}} */
|
|
28
|
+
settings: Record<string, unknown>;
|
|
29
|
+
/** Plugins that need to be re-installed */
|
|
30
|
+
plugins: PluginEntry[];
|
|
31
|
+
}
|
|
32
|
+
export interface ExportOptions {
|
|
33
|
+
/** Where to write the snapshot JSON (default: ./env-snapshot.json) */
|
|
34
|
+
outputPath?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ImportOptions {
|
|
37
|
+
/** Path to the snapshot JSON file */
|
|
38
|
+
snapshotPath: string;
|
|
39
|
+
/** If true, show what would be done without writing anything */
|
|
40
|
+
dryRun?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface ExportResult {
|
|
43
|
+
success: boolean;
|
|
44
|
+
message: string;
|
|
45
|
+
outputPath?: string;
|
|
46
|
+
fileCount?: number;
|
|
47
|
+
pluginCount?: number;
|
|
48
|
+
error?: Error;
|
|
49
|
+
}
|
|
50
|
+
export interface ImportResult {
|
|
51
|
+
success: boolean;
|
|
52
|
+
message: string;
|
|
53
|
+
filesWritten?: number;
|
|
54
|
+
pluginsInstalled?: number;
|
|
55
|
+
errors?: string[];
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/snapshot/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,YAAY,EAAE,MAAM,C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B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/snapshot/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepdiver_sj/claude-settings",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Manage Claude global settings across Windows, Linux, and macOS",
|
|
5
|
+
"author": "deepdiver_sj",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/deepdiver_sj/claude-settings.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/deepdiver_sj/claude-settings/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/deepdiver_sj/claude-settings#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=20.0.0",
|
|
18
|
+
"pnpm": ">=9.0.0"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"bin": {
|
|
23
|
+
"claude-settings": "dist/bin/claude-settings.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc --noEmitOnError false || true",
|
|
32
|
+
"dev": "tsc --watch",
|
|
33
|
+
"start": "node dist/bin/claude-settings.js",
|
|
34
|
+
"test": "jest",
|
|
35
|
+
"test:watch": "jest --watch",
|
|
36
|
+
"test:coverage": "jest --coverage",
|
|
37
|
+
"lint": "eslint src/**/*.ts",
|
|
38
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
39
|
+
"type-check": "tsc --noEmit",
|
|
40
|
+
"prepack": "pnpm build",
|
|
41
|
+
"prepublishOnly": "pnpm build"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"claude",
|
|
45
|
+
"settings",
|
|
46
|
+
"cli",
|
|
47
|
+
"configuration",
|
|
48
|
+
"cross-platform",
|
|
49
|
+
"windows",
|
|
50
|
+
"linux",
|
|
51
|
+
"macos"
|
|
52
|
+
],
|
|
53
|
+
"dependencies": {},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@jest/globals": "^29.7.0",
|
|
56
|
+
"@types/jest": "^29.5.11",
|
|
57
|
+
"@types/node": "^20.10.6",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
|
59
|
+
"@typescript-eslint/parser": "^6.17.0",
|
|
60
|
+
"eslint": "^8.56.0",
|
|
61
|
+
"jest": "^29.7.0",
|
|
62
|
+
"ts-jest": "^29.1.1",
|
|
63
|
+
"tslib": "^2.6.2",
|
|
64
|
+
"typescript": "^5.3.3"
|
|
65
|
+
},
|
|
66
|
+
"pnpm": {
|
|
67
|
+
"overrides": {}
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
}
|
|
72
|
+
}
|