craftdesk 0.3.0 → 0.5.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/CHANGELOG.md +88 -0
- package/README.md +1609 -132
- package/dist/commands/add.d.ts +5 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +306 -8
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/convert.d.ts +8 -0
- package/dist/commands/convert.d.ts.map +1 -0
- package/dist/commands/convert.js +146 -0
- package/dist/commands/convert.js.map +1 -0
- package/dist/commands/detect-agents.d.ts +14 -0
- package/dist/commands/detect-agents.d.ts.map +1 -0
- package/dist/commands/detect-agents.js +86 -0
- package/dist/commands/detect-agents.js.map +1 -0
- package/dist/commands/embed.d.ts +14 -0
- package/dist/commands/embed.d.ts.map +1 -0
- package/dist/commands/embed.js +147 -0
- package/dist/commands/embed.js.map +1 -0
- package/dist/commands/info.d.ts +8 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +66 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +5 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +24 -4
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.d.ts +5 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +75 -7
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/login.d.ts +8 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +158 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +8 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +51 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/outdated.d.ts +23 -0
- package/dist/commands/outdated.d.ts.map +1 -0
- package/dist/commands/outdated.js +268 -0
- package/dist/commands/outdated.js.map +1 -0
- package/dist/commands/publish.d.ts +8 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +203 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/remove.d.ts +5 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +51 -10
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/search.d.ts +8 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +60 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/setup-multi-agent.d.ts +17 -0
- package/dist/commands/setup-multi-agent.d.ts.map +1 -0
- package/dist/commands/setup-multi-agent.js +188 -0
- package/dist/commands/setup-multi-agent.js.map +1 -0
- package/dist/commands/sync.d.ts +14 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +144 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/unembed.d.ts +14 -0
- package/dist/commands/unembed.d.ts.map +1 -0
- package/dist/commands/unembed.js +96 -0
- package/dist/commands/unembed.js.map +1 -0
- package/dist/commands/update.d.ts +8 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +372 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/verify.d.ts +14 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +143 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/whoami.d.ts +8 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +58 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/converters/base-converter.d.ts +89 -0
- package/dist/converters/base-converter.d.ts.map +1 -0
- package/dist/converters/base-converter.js +249 -0
- package/dist/converters/base-converter.js.map +1 -0
- package/dist/converters/continue-converter.d.ts +53 -0
- package/dist/converters/continue-converter.d.ts.map +1 -0
- package/dist/converters/continue-converter.js +243 -0
- package/dist/converters/continue-converter.js.map +1 -0
- package/dist/converters/cursor-converter.d.ts +70 -0
- package/dist/converters/cursor-converter.d.ts.map +1 -0
- package/dist/converters/cursor-converter.js +272 -0
- package/dist/converters/cursor-converter.js.map +1 -0
- package/dist/index.js +56 -3
- package/dist/index.js.map +1 -1
- package/dist/services/agent-detector.d.ts +57 -0
- package/dist/services/agent-detector.d.ts.map +1 -0
- package/dist/services/agent-detector.js +146 -0
- package/dist/services/agent-detector.js.map +1 -0
- package/dist/services/config-manager.d.ts +128 -10
- package/dist/services/config-manager.d.ts.map +1 -1
- package/dist/services/config-manager.js +190 -18
- package/dist/services/config-manager.js.map +1 -1
- package/dist/services/converter.d.ts +53 -0
- package/dist/services/converter.d.ts.map +1 -0
- package/dist/services/converter.js +185 -0
- package/dist/services/converter.js.map +1 -0
- package/dist/services/craft-wrapper.d.ts +108 -0
- package/dist/services/craft-wrapper.d.ts.map +1 -0
- package/dist/services/craft-wrapper.js +268 -0
- package/dist/services/craft-wrapper.js.map +1 -0
- package/dist/services/git-resolver.d.ts +9 -3
- package/dist/services/git-resolver.d.ts.map +1 -1
- package/dist/services/git-resolver.js +44 -20
- package/dist/services/git-resolver.js.map +1 -1
- package/dist/services/gitignore-manager.d.ts +74 -0
- package/dist/services/gitignore-manager.d.ts.map +1 -0
- package/dist/services/gitignore-manager.js +188 -0
- package/dist/services/gitignore-manager.js.map +1 -0
- package/dist/services/installer.d.ts +60 -1
- package/dist/services/installer.d.ts.map +1 -1
- package/dist/services/installer.js +295 -20
- package/dist/services/installer.js.map +1 -1
- package/dist/services/multi-agent-sync.d.ts +88 -0
- package/dist/services/multi-agent-sync.d.ts.map +1 -0
- package/dist/services/multi-agent-sync.js +316 -0
- package/dist/services/multi-agent-sync.js.map +1 -0
- package/dist/services/plugin-resolver.d.ts +80 -0
- package/dist/services/plugin-resolver.d.ts.map +1 -0
- package/dist/services/plugin-resolver.js +183 -0
- package/dist/services/plugin-resolver.js.map +1 -0
- package/dist/services/registry-client.d.ts +132 -5
- package/dist/services/registry-client.d.ts.map +1 -1
- package/dist/services/registry-client.js +239 -34
- package/dist/services/registry-client.js.map +1 -1
- package/dist/services/settings-manager.d.ts +151 -0
- package/dist/services/settings-manager.d.ts.map +1 -0
- package/dist/services/settings-manager.js +333 -0
- package/dist/services/settings-manager.js.map +1 -0
- package/dist/types/claude-settings.d.ts +155 -0
- package/dist/types/claude-settings.d.ts.map +1 -0
- package/dist/types/claude-settings.js +20 -0
- package/dist/types/claude-settings.js.map +1 -0
- package/dist/types/converter.d.ts +98 -0
- package/dist/types/converter.d.ts.map +1 -0
- package/dist/types/converter.js +6 -0
- package/dist/types/converter.js.map +1 -0
- package/dist/types/craftdesk-json.d.ts +76 -3
- package/dist/types/craftdesk-json.d.ts.map +1 -1
- package/dist/types/craftdesk-lock.d.ts +62 -1
- package/dist/types/craftdesk-lock.d.ts.map +1 -1
- package/dist/types/multi-agent.d.ts +85 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/types/multi-agent.js +6 -0
- package/dist/types/multi-agent.js.map +1 -0
- package/dist/utils/crypto.d.ts +23 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/crypto.js +52 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/file-system.d.ts +43 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +45 -2
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/logger.d.ts +75 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +76 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/version-utils.d.ts +63 -0
- package/dist/utils/version-utils.d.ts.map +1 -0
- package/dist/utils/version-utils.js +130 -0
- package/dist/utils/version-utils.js.map +1 -0
- package/package.json +36 -9
- package/.claude/settings.local.json +0 -19
- package/.github/workflows/ci.yml +0 -94
- package/API.md +0 -414
- package/TESTING.md +0 -263
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -56
- package/dist/commands/config.js.map +0 -1
- package/dist/types/config.d.ts +0 -17
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js +0 -3
- package/dist/types/config.js.map +0 -1
- package/docs/DEPENDENCY_RESOLUTION.md +0 -237
- package/examples/craftdesk-all-sources.json +0 -79
- package/examples/craftdesk-git-monorepo.json +0 -41
- package/examples/craftdesk-multi-registry.json +0 -40
- package/examples/craftdesk-with-registries.json +0 -49
- package/examples/simple-craftdesk.json +0 -10
- package/src/commands/add.ts +0 -314
- package/src/commands/init.ts +0 -55
- package/src/commands/install.ts +0 -126
- package/src/commands/list.ts +0 -126
- package/src/commands/remove.ts +0 -82
- package/src/index.ts +0 -56
- package/src/services/config-manager.ts +0 -150
- package/src/services/git-resolver.ts +0 -373
- package/src/services/installer.ts +0 -314
- package/src/services/registry-client.ts +0 -163
- package/src/types/craftdesk-json.ts +0 -53
- package/src/types/craftdesk-lock.ts +0 -38
- package/src/utils/file-system.ts +0 -55
- package/src/utils/logger.ts +0 -82
- package/tests/fixtures/craftdesk-git.json +0 -17
- package/tests/fixtures/craftdesk.json +0 -15
- package/tests/helpers/test-utils.ts +0 -60
- package/tests/integration/init-command.test.ts +0 -70
- package/tests/integration/list-command.test.ts +0 -77
- package/tests/unit/config-manager.test.ts +0 -228
- package/tests/unit/git-resolver.test.ts +0 -303
- package/tests/unit/installer.test.ts +0 -105
- package/tsconfig.json +0 -20
- package/vitest.config.ts +0 -29
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-settings.js","sourceRoot":"","sources":["../../src/types/claude-settings.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA8LH;;;GAGG;AACU,QAAA,uBAAuB,GAAmB;IACrD,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;IACnC,OAAO,EAAE,EAAE;CACZ,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for format conversion system
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Supported output formats for conversion
|
|
6
|
+
*/
|
|
7
|
+
export type SupportedFormat = 'claude' | 'cursor' | 'cursor-legacy' | 'continue';
|
|
8
|
+
/**
|
|
9
|
+
* Options for format conversion
|
|
10
|
+
*/
|
|
11
|
+
export interface ConversionOptions {
|
|
12
|
+
/** Target format to convert to */
|
|
13
|
+
format: SupportedFormat;
|
|
14
|
+
/** Output directory (optional, defaults based on format) */
|
|
15
|
+
outputDir?: string;
|
|
16
|
+
/** Whether to merge with existing files or overwrite */
|
|
17
|
+
mergeMode?: 'append' | 'overwrite' | 'skip';
|
|
18
|
+
/** Format-specific options */
|
|
19
|
+
formatOptions?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents converted file content
|
|
23
|
+
*/
|
|
24
|
+
export interface ConvertedContent {
|
|
25
|
+
/** Relative file path where content should be written */
|
|
26
|
+
filePath: string;
|
|
27
|
+
/** File content */
|
|
28
|
+
content: string;
|
|
29
|
+
/** File type */
|
|
30
|
+
type: 'rule' | 'prompt' | 'config';
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Represents craft content to be converted
|
|
34
|
+
*/
|
|
35
|
+
export interface CraftContent {
|
|
36
|
+
/** Craft name */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Craft type */
|
|
39
|
+
type: 'skill' | 'agent' | 'command' | 'hook' | 'plugin' | 'collection';
|
|
40
|
+
/** Craft description */
|
|
41
|
+
description?: string;
|
|
42
|
+
/** Main content (SKILL.md, AGENT.md, etc.) */
|
|
43
|
+
mainContent: string;
|
|
44
|
+
/** Parsed sections from markdown */
|
|
45
|
+
sections: {
|
|
46
|
+
title?: string;
|
|
47
|
+
instructions?: string;
|
|
48
|
+
quickStart?: string;
|
|
49
|
+
workflows?: string;
|
|
50
|
+
patterns?: string;
|
|
51
|
+
examples?: string;
|
|
52
|
+
bestPractices?: string;
|
|
53
|
+
pitfalls?: string;
|
|
54
|
+
references?: string;
|
|
55
|
+
[key: string]: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
/** Code examples extracted from content */
|
|
58
|
+
examples: Array<{
|
|
59
|
+
language?: string;
|
|
60
|
+
code: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
}>;
|
|
63
|
+
/** Additional files in craft directory */
|
|
64
|
+
additionalFiles?: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Result of a conversion operation
|
|
68
|
+
*/
|
|
69
|
+
export interface ConversionResult {
|
|
70
|
+
/** Whether conversion succeeded */
|
|
71
|
+
success: boolean;
|
|
72
|
+
/** Converted files */
|
|
73
|
+
files: ConvertedContent[];
|
|
74
|
+
/** Errors that occurred */
|
|
75
|
+
errors: string[];
|
|
76
|
+
/** Warnings */
|
|
77
|
+
warnings: string[];
|
|
78
|
+
/** Source format */
|
|
79
|
+
sourceFormat: SupportedFormat;
|
|
80
|
+
/** Target format */
|
|
81
|
+
targetFormat: SupportedFormat;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Metadata about a converter
|
|
85
|
+
*/
|
|
86
|
+
export interface ConverterMetadata {
|
|
87
|
+
/** Converter name */
|
|
88
|
+
name: string;
|
|
89
|
+
/** Target format */
|
|
90
|
+
targetFormat: SupportedFormat;
|
|
91
|
+
/** Description */
|
|
92
|
+
description: string;
|
|
93
|
+
/** Default output directory */
|
|
94
|
+
defaultOutputDir: string;
|
|
95
|
+
/** Supported source types */
|
|
96
|
+
supportedTypes: Array<'skill' | 'agent' | 'command' | 'hook' | 'plugin' | 'collection'>;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../src/types/converter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM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AAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;KACnC,CAAC;IAEF,2CAA2C;IAC3C,QAAQ,EAAE,KAAK,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC,CAAC;IAEH,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IAEjB,sBAAsB;IACtB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB,oBAAoB;IACpB,YAAY,EAAE,eAAe,CAAC;IAE9B,oBAAoB;IACpB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,oBAAoB;IACpB,YAAY,EAAE,eAAe,CAAC;IAE9B,kBAAkB;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,6BAA6B;IAC7B,cAAc,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC,CAAC;CACzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../src/types/converter.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1,42 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main configuration file for CraftDesk projects (craftdesk.json)
|
|
3
|
+
* Similar to package.json but for Claude skills, agents, commands, and plugins
|
|
4
|
+
*/
|
|
1
5
|
export interface CraftDeskJson {
|
|
6
|
+
/** Project name in author/name format */
|
|
2
7
|
name: string;
|
|
8
|
+
/** Semantic version of the project */
|
|
3
9
|
version: string;
|
|
4
|
-
|
|
10
|
+
/** Type of craft being defined */
|
|
11
|
+
type?: 'skill' | 'agent' | 'command' | 'hook' | 'plugin' | 'collection';
|
|
12
|
+
/** Human-readable description of the project */
|
|
5
13
|
description?: string;
|
|
14
|
+
/** Author name or identifier */
|
|
6
15
|
author?: string;
|
|
16
|
+
/** Software license (e.g., MIT, Apache-2.0) */
|
|
7
17
|
license?: string;
|
|
18
|
+
/** Homepage URL for the project */
|
|
8
19
|
homepage?: string;
|
|
20
|
+
/** Repository information */
|
|
9
21
|
repository?: {
|
|
22
|
+
/** Version control type (e.g., git) */
|
|
10
23
|
type: string;
|
|
24
|
+
/** Repository URL */
|
|
11
25
|
url: string;
|
|
12
26
|
};
|
|
27
|
+
/** Keywords for discovery and categorization */
|
|
13
28
|
keywords?: string[];
|
|
29
|
+
/** Production dependencies - can be simple version strings or detailed configuration objects */
|
|
14
30
|
dependencies?: Record<string, string | DependencyConfig>;
|
|
31
|
+
/** Development-only dependencies */
|
|
15
32
|
devDependencies?: Record<string, string | DependencyConfig>;
|
|
33
|
+
/** Dependencies that must be manually installed by the user */
|
|
16
34
|
peerDependencies?: Record<string, string | DependencyConfig>;
|
|
35
|
+
/** Dependencies that are not required for core functionality */
|
|
17
36
|
optionalDependencies?: Record<string, string | DependencyConfig>;
|
|
37
|
+
/** Registry configuration for dependency resolution */
|
|
18
38
|
registries?: Record<string, RegistryConfig>;
|
|
39
|
+
/** Command definitions */
|
|
19
40
|
commands?: Record<string, string | CommandConfig>;
|
|
41
|
+
/** Hook definitions mapping events to command arrays */
|
|
20
42
|
hooks?: Record<string, string[]>;
|
|
21
|
-
|
|
43
|
+
/** Multi-agent sync configuration */
|
|
44
|
+
multiAgent?: {
|
|
45
|
+
/** Enable multi-agent sync */
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
/** Canonical location for source of truth */
|
|
48
|
+
canonical: string;
|
|
49
|
+
/** Target directories to sync to */
|
|
50
|
+
targets: string[];
|
|
51
|
+
/** Auto-sync on install/update */
|
|
52
|
+
autoSync?: boolean;
|
|
53
|
+
};
|
|
54
|
+
/** Embedded (local) skills that are committed to git (not managed by craftdesk install) */
|
|
55
|
+
embedded?: string[];
|
|
56
|
+
/** Index signature to allow dynamic property access for future extensibility */
|
|
57
|
+
[key: string]: unknown;
|
|
22
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Configuration for a dependency with various resolution strategies
|
|
61
|
+
* Supports version ranges, git repositories, and registry-based resolution
|
|
62
|
+
*/
|
|
23
63
|
export interface DependencyConfig {
|
|
64
|
+
/** Semantic version or version range (optional for git dependencies) */
|
|
24
65
|
version?: string;
|
|
66
|
+
/** Registry name (from registries section) or direct URL */
|
|
25
67
|
registry?: string;
|
|
68
|
+
/** Git repository URL for git-based dependencies */
|
|
26
69
|
git?: string;
|
|
70
|
+
/** Git branch to use (defaults to main/master) */
|
|
27
71
|
branch?: string;
|
|
72
|
+
/** Git tag to checkout */
|
|
28
73
|
tag?: string;
|
|
74
|
+
/** Specific git commit hash */
|
|
29
75
|
commit?: string;
|
|
76
|
+
/** Subdirectory path within the repository */
|
|
30
77
|
path?: string;
|
|
78
|
+
/** Direct file path within the repository */
|
|
31
79
|
file?: string;
|
|
32
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Plugin-specific dependency configuration
|
|
83
|
+
* Extends DependencyConfig with plugin-specific options
|
|
84
|
+
*/
|
|
85
|
+
export interface PluginDependencyConfig extends DependencyConfig {
|
|
86
|
+
/** Expose plugin capabilities as tools */
|
|
87
|
+
exposeAsTools?: boolean;
|
|
88
|
+
/** Expose plugin via MCP server */
|
|
89
|
+
exposeAsMCP?: boolean;
|
|
90
|
+
/** Auto-wrap individual craft as plugin */
|
|
91
|
+
wrapAsPlugin?: boolean;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Configuration for a dependency registry
|
|
95
|
+
* Defines how to resolve dependencies from a specific source
|
|
96
|
+
*/
|
|
33
97
|
export interface RegistryConfig {
|
|
98
|
+
/** Base URL of the registry */
|
|
34
99
|
url: string;
|
|
100
|
+
/** Optional scope like "@company" for scoped packages */
|
|
35
101
|
scope?: string;
|
|
102
|
+
/** Optional auth token (should prefer ~/.craftrc for security) */
|
|
36
103
|
auth?: string;
|
|
37
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Configuration for a command
|
|
107
|
+
* Associates a command with a specific version and optional settings
|
|
108
|
+
*/
|
|
38
109
|
export interface CommandConfig {
|
|
110
|
+
/** Command version */
|
|
39
111
|
version: string;
|
|
40
|
-
|
|
112
|
+
/** Command-specific configuration options */
|
|
113
|
+
config?: Record<string, unknown>;
|
|
41
114
|
}
|
|
42
115
|
//# sourceMappingURL=craftdesk-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"craftdesk-json.d.ts","sourceRoot":"","sources":["../../src/types/craftdesk-json.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"craftdesk-json.d.ts","sourceRoot":"","sources":["../../src/types/craftdesk-json.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAEhB,kCAAkC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;IAExE,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mCA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AE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,0BAA0B;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D,0CAA0C;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IAEZ,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAEhB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
|
|
@@ -1,34 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lockfile format for CraftDesk (craftdesk.lock)
|
|
3
|
+
* Ensures reproducible installations by recording exact resolved versions
|
|
4
|
+
*/
|
|
1
5
|
export interface CraftDeskLock {
|
|
6
|
+
/** CraftDesk project version */
|
|
2
7
|
version: string;
|
|
8
|
+
/** Lockfile format version */
|
|
3
9
|
lockfileVersion: number;
|
|
10
|
+
/** ISO timestamp of when the lockfile was generated */
|
|
4
11
|
generatedAt: string;
|
|
12
|
+
/** Map of craft names to their resolved lock entries */
|
|
5
13
|
crafts: Record<string, LockEntry>;
|
|
14
|
+
/** Dependency tree showing parent-child relationships */
|
|
6
15
|
tree?: DependencyTree;
|
|
16
|
+
/** Plugin dependency tree showing plugin-specific relationships */
|
|
17
|
+
pluginTree?: PluginDependencyTree;
|
|
18
|
+
/** Installation metadata and statistics */
|
|
7
19
|
metadata?: {
|
|
20
|
+
/** Total number of crafts installed */
|
|
8
21
|
totalCrafts: number;
|
|
22
|
+
/** Total number of plugins installed */
|
|
23
|
+
totalPlugins?: number;
|
|
24
|
+
/** Total installation size as a human-readable string */
|
|
9
25
|
totalSize: string;
|
|
26
|
+
/** Path where crafts are installed */
|
|
10
27
|
installPath: string;
|
|
11
28
|
};
|
|
12
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Lockfile entry for a single craft
|
|
32
|
+
* Records the exact resolved version and source information
|
|
33
|
+
*/
|
|
13
34
|
export interface LockEntry {
|
|
35
|
+
/** Resolved semantic version */
|
|
14
36
|
version: string;
|
|
37
|
+
/** Download URL or git repository URL */
|
|
15
38
|
resolved: string;
|
|
39
|
+
/** SHA-256 hash for registry downloads or git commit hash */
|
|
16
40
|
integrity: string;
|
|
17
|
-
|
|
41
|
+
/** Type of craft */
|
|
42
|
+
type: 'skill' | 'agent' | 'command' | 'hook' | 'plugin' | 'collection';
|
|
43
|
+
/** Author identifier */
|
|
18
44
|
author?: string;
|
|
45
|
+
/** Registry URL where the craft was resolved */
|
|
19
46
|
registry?: string;
|
|
47
|
+
/** Scope if the craft is scoped */
|
|
20
48
|
scope?: string;
|
|
49
|
+
/** Dependencies of this craft mapped to their versions */
|
|
21
50
|
dependencies?: Record<string, string>;
|
|
51
|
+
/** Installation method */
|
|
52
|
+
installedAs?: 'plugin' | 'dependency' | 'direct' | 'wrapped';
|
|
53
|
+
/** Plugin that wraps this craft (if installedAs is 'wrapped') */
|
|
54
|
+
wrappedBy?: string;
|
|
55
|
+
/** Git repository URL for git-based installations */
|
|
22
56
|
git?: string;
|
|
57
|
+
/** Git branch used */
|
|
23
58
|
branch?: string;
|
|
59
|
+
/** Git tag used */
|
|
24
60
|
tag?: string;
|
|
61
|
+
/** Resolved git commit hash */
|
|
25
62
|
commit?: string;
|
|
63
|
+
/** Subdirectory path within repository */
|
|
26
64
|
path?: string;
|
|
65
|
+
/** Direct file path within repository */
|
|
27
66
|
file?: string;
|
|
28
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Recursive dependency tree structure
|
|
70
|
+
* Shows hierarchical relationships between crafts
|
|
71
|
+
*/
|
|
29
72
|
export interface DependencyTree {
|
|
73
|
+
/** Maps craft names to their dependencies or a "(shared)" marker */
|
|
30
74
|
[key: string]: {
|
|
75
|
+
/** Nested dependencies of this craft */
|
|
31
76
|
dependencies?: DependencyTree;
|
|
32
77
|
} | string;
|
|
33
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Plugin dependency tree
|
|
81
|
+
* Tracks which dependencies belong to which plugins
|
|
82
|
+
*/
|
|
83
|
+
export interface PluginDependencyTree {
|
|
84
|
+
[pluginName: string]: {
|
|
85
|
+
/** Plugin version */
|
|
86
|
+
version: string;
|
|
87
|
+
/** Dependencies of this plugin */
|
|
88
|
+
dependencies?: string[];
|
|
89
|
+
/** Whether this plugin was installed as a dependency of another plugin */
|
|
90
|
+
isDependency?: boolean;
|
|
91
|
+
/** Parent plugin (if this is a transitive dependency) */
|
|
92
|
+
requiredBy?: string[];
|
|
93
|
+
};
|
|
94
|
+
}
|
|
34
95
|
//# sourceMappingURL=craftdesk-lock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"craftdesk-lock.d.ts","sourceRoot":"","sources":["../../src/types/craftdesk-lock.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"craftdesk-lock.d.ts","sourceRoot":"","sources":["../../src/types/craftdesk-lock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAEhB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IAExB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IAEpB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAElC,yDAAyD;IACzD,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,mEAAmE;IACnE,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE;QACT,uCAAuC;QACvC,WAAW,EAAE,MAAM,CAAC;QACpB,wCAAwC;QACxC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,yDAAyD;QACzD,SAAS,EAAE,MAAM,CAAC;QAClB,sCAAsC;QACtC,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAEhB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IAEjB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAElB,oBAAoB;IACpB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;IAEvE,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEtC,0BAA0B;IAC1B,WAAW,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;IAE7D,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,mBAAmB;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,wCAAwC;QACxC,YAAY,CAAC,EAAE,cAAc,CAAC;KAC/B,GAAG,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,UAAU,EAAE,MAAM,GAAG;QACpB,qBAAqB;QACrB,OAAO,EAAE,MAAM,CAAC;QAEhB,kCAAkC;QAClC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QAExB,0EAA0E;QAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB,yDAAyD;QACzD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for multi-agent sync functionality
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for multi-agent sync in craftdesk.json
|
|
6
|
+
*/
|
|
7
|
+
export interface MultiAgentConfig {
|
|
8
|
+
/** Enable multi-agent sync */
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
/** Canonical location for source of truth */
|
|
11
|
+
canonical: string;
|
|
12
|
+
/** Target directories to sync to */
|
|
13
|
+
targets: string[];
|
|
14
|
+
/** Auto-sync on install/update */
|
|
15
|
+
autoSync?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Detected AI coding assistant configuration
|
|
19
|
+
*/
|
|
20
|
+
export interface AgentConfig {
|
|
21
|
+
/** Agent identifier (e.g., 'claude', 'cursor') */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Display name for user-facing messages */
|
|
24
|
+
displayName: string;
|
|
25
|
+
/** Directory where this agent stores crafts */
|
|
26
|
+
skillsDir: string;
|
|
27
|
+
/** Whether this agent is enabled for sync */
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
/** Whether this agent directory was auto-detected */
|
|
30
|
+
detected: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Sync status for a craft across multiple agent directories
|
|
34
|
+
*/
|
|
35
|
+
export interface SyncStatus {
|
|
36
|
+
/** Craft name */
|
|
37
|
+
craftName: string;
|
|
38
|
+
/** Whether all copies are in sync */
|
|
39
|
+
inSync: boolean;
|
|
40
|
+
/** Canonical location checksum */
|
|
41
|
+
canonicalChecksum: string;
|
|
42
|
+
/** Locations that are out of sync */
|
|
43
|
+
outOfSync: SyncLocation[];
|
|
44
|
+
/** Locations that are in sync */
|
|
45
|
+
inSyncLocations: string[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Location that is out of sync
|
|
49
|
+
*/
|
|
50
|
+
export interface SyncLocation {
|
|
51
|
+
/** Path to the location */
|
|
52
|
+
path: string;
|
|
53
|
+
/** Reason for being out of sync */
|
|
54
|
+
reason: 'missing' | 'modified' | 'checksum-mismatch';
|
|
55
|
+
/** Expected checksum */
|
|
56
|
+
expectedChecksum?: string;
|
|
57
|
+
/** Actual checksum */
|
|
58
|
+
actualChecksum?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Result of a sync operation
|
|
62
|
+
*/
|
|
63
|
+
export interface SyncResult {
|
|
64
|
+
/** Craft name that was synced */
|
|
65
|
+
craftName: string;
|
|
66
|
+
/** Locations successfully synced to */
|
|
67
|
+
synced: string[];
|
|
68
|
+
/** Locations that failed to sync */
|
|
69
|
+
failed: Array<{
|
|
70
|
+
path: string;
|
|
71
|
+
error: string;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Agent detection result
|
|
76
|
+
*/
|
|
77
|
+
export interface AgentDetectionResult {
|
|
78
|
+
/** All detected agents */
|
|
79
|
+
detected: AgentConfig[];
|
|
80
|
+
/** Currently enabled agents */
|
|
81
|
+
enabled: AgentConfig[];
|
|
82
|
+
/** Suggested agents to enable */
|
|
83
|
+
suggested: AgentConfig[];
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=multi-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-agent.d.ts","sourceRoot":"","sources":["../../src/types/multi-agent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IAEjB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAElB,oCAAoC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IAEb,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IAEpB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;IAEjB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAElB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAEhB,kCAAkC;IAClC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,SAAS,EAAE,YAAY,EAAE,CAAC;IAE1B,iCAAiC;IACjC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,mCAAmC;IACnC,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,mBAAmB,CAAC;IAErD,wBAAwB;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAElB,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,oCAAoC;IACpC,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,+BAA+B;IAC/B,OAAO,EAAE,WAAW,EAAE,CAAC;IAEvB,iCAAiC;IACjC,SAAS,EAAE,WAAW,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-agent.js","sourceRoot":"","sources":["../../src/types/multi-agent.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate SHA-256 checksum of a file
|
|
3
|
+
*
|
|
4
|
+
* @param filePath - Path to the file
|
|
5
|
+
* @returns Promise resolving to hex-encoded SHA-256 hash
|
|
6
|
+
*/
|
|
7
|
+
export declare function calculateFileChecksum(filePath: string): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Verify file checksum matches expected value
|
|
10
|
+
*
|
|
11
|
+
* @param filePath - Path to the file to verify
|
|
12
|
+
* @param expectedChecksum - Expected SHA-256 hash (hex-encoded)
|
|
13
|
+
* @returns Promise resolving to true if match, false otherwise
|
|
14
|
+
*/
|
|
15
|
+
export declare function verifyFileChecksum(filePath: string, expectedChecksum: string): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Format checksum for display (first 12 chars)
|
|
18
|
+
*
|
|
19
|
+
* @param checksum - Full checksum string
|
|
20
|
+
* @returns Shortened checksum for display
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatChecksum(checksum: string): string;
|
|
23
|
+
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/utils/crypto.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB7E;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGrG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.calculateFileChecksum = calculateFileChecksum;
|
|
7
|
+
exports.verifyFileChecksum = verifyFileChecksum;
|
|
8
|
+
exports.formatChecksum = formatChecksum;
|
|
9
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
10
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
+
/**
|
|
12
|
+
* Calculate SHA-256 checksum of a file
|
|
13
|
+
*
|
|
14
|
+
* @param filePath - Path to the file
|
|
15
|
+
* @returns Promise resolving to hex-encoded SHA-256 hash
|
|
16
|
+
*/
|
|
17
|
+
async function calculateFileChecksum(filePath) {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
const hash = crypto_1.default.createHash('sha256');
|
|
20
|
+
const stream = fs_extra_1.default.createReadStream(filePath);
|
|
21
|
+
stream.on('data', (data) => {
|
|
22
|
+
hash.update(data);
|
|
23
|
+
});
|
|
24
|
+
stream.on('end', () => {
|
|
25
|
+
resolve(hash.digest('hex'));
|
|
26
|
+
});
|
|
27
|
+
stream.on('error', (err) => {
|
|
28
|
+
reject(err);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Verify file checksum matches expected value
|
|
34
|
+
*
|
|
35
|
+
* @param filePath - Path to the file to verify
|
|
36
|
+
* @param expectedChecksum - Expected SHA-256 hash (hex-encoded)
|
|
37
|
+
* @returns Promise resolving to true if match, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
async function verifyFileChecksum(filePath, expectedChecksum) {
|
|
40
|
+
const actualChecksum = await calculateFileChecksum(filePath);
|
|
41
|
+
return actualChecksum.toLowerCase() === expectedChecksum.toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Format checksum for display (first 12 chars)
|
|
45
|
+
*
|
|
46
|
+
* @param checksum - Full checksum string
|
|
47
|
+
* @returns Shortened checksum for display
|
|
48
|
+
*/
|
|
49
|
+
function formatChecksum(checksum) {
|
|
50
|
+
return checksum.substring(0, 12);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=crypto.js.map
|
|
@@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
@@ -1,10 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File system utilities for reading and writing CraftDesk configuration files
|
|
3
|
+
*/
|
|
1
4
|
import { CraftDeskJson } from '../types/craftdesk-json';
|
|
2
5
|
import { CraftDeskLock } from '../types/craftdesk-lock';
|
|
6
|
+
/**
|
|
7
|
+
* Reads and parses a craftdesk.json file from the specified directory
|
|
8
|
+
*
|
|
9
|
+
* @param dir - Directory containing craftdesk.json (defaults to current working directory)
|
|
10
|
+
* @returns Parsed CraftDeskJson object or null if file doesn't exist or is invalid
|
|
11
|
+
*/
|
|
3
12
|
export declare function readCraftDeskJson(dir?: string): Promise<CraftDeskJson | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Writes a CraftDeskJson object to craftdesk.json with pretty formatting
|
|
15
|
+
*
|
|
16
|
+
* @param data - CraftDeskJson object to write
|
|
17
|
+
* @param dir - Directory to write craftdesk.json to (defaults to current working directory)
|
|
18
|
+
*/
|
|
4
19
|
export declare function writeCraftDeskJson(data: CraftDeskJson, dir?: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Reads and parses a craftdesk.lock file from the specified directory
|
|
22
|
+
*
|
|
23
|
+
* @param dir - Directory containing craftdesk.lock (defaults to current working directory)
|
|
24
|
+
* @returns Parsed CraftDeskLock object or null if file doesn't exist or is invalid
|
|
25
|
+
*/
|
|
5
26
|
export declare function readCraftDeskLock(dir?: string): Promise<CraftDeskLock | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Writes a CraftDeskLock object to craftdesk.lock with pretty formatting
|
|
29
|
+
*
|
|
30
|
+
* @param data - CraftDeskLock object to write
|
|
31
|
+
* @param dir - Directory to write craftdesk.lock to (defaults to current working directory)
|
|
32
|
+
*/
|
|
6
33
|
export declare function writeCraftDeskLock(data: CraftDeskLock, dir?: string): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Ensures a directory exists, creating it and any parent directories if needed
|
|
36
|
+
*
|
|
37
|
+
* @param dirPath - Path to the directory to ensure exists
|
|
38
|
+
*/
|
|
7
39
|
export declare function ensureDir(dirPath: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Recursively removes a directory and all its contents
|
|
42
|
+
*
|
|
43
|
+
* @param dirPath - Path to the directory to remove
|
|
44
|
+
*/
|
|
8
45
|
export declare function removeDir(dirPath: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if a file or directory exists at the specified path
|
|
48
|
+
*
|
|
49
|
+
* @param filePath - Path to check for existence
|
|
50
|
+
* @returns True if the path exists and is accessible, false otherwise
|
|
51
|
+
*/
|
|
9
52
|
export declare function exists(filePath: string): Promise<boolean>;
|
|
10
53
|
//# sourceMappingURL=file-system.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CASlG;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxG;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CASlG;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxG;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D"}
|