@agpm/core 0.0.2 → 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/dist/git.js CHANGED
@@ -2,63 +2,115 @@ import { simpleGit } from "simple-git";
2
2
  import { join } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  import { mkdir } from "node:fs/promises";
5
+ import { cacheRepo, isCached, getCachedRepoPath } from "./cache.js";
5
6
  // ============================================================================
6
7
  // Source Parsing
7
8
  // ============================================================================
8
9
  /**
9
- * Parse a source string into its components.
10
- *
11
- * Supported formats:
12
- * - owner/repo
13
- * - owner/repo#subpath
14
- * - https://github.com/owner/repo
15
- * - https://github.com/owner/repo#subpath
16
- * - ./local/path
10
+ * Check if a string looks like a git URL.
17
11
  */
18
- export function parseSource(source) {
19
- const original = source;
20
- // Local path
21
- if (source.startsWith("./") || source.startsWith("/") || source.startsWith("~")) {
12
+ function isGitUrl(str) {
13
+ return (str.startsWith("https://") ||
14
+ str.startsWith("http://") ||
15
+ str.startsWith("git://") ||
16
+ str.startsWith("git+ssh://") ||
17
+ str.startsWith("git+https://") ||
18
+ str.startsWith("ssh://") ||
19
+ str.startsWith("git@"));
20
+ }
21
+ /**
22
+ * Extract owner/repo from a GitHub-like URL.
23
+ * Works with github.com, gitlab.com, bitbucket.org, etc.
24
+ */
25
+ function extractRepoInfo(url) {
26
+ // Handle git@host:owner/repo.git format
27
+ const sshMatch = url.match(/git@[\w.-]+:([\w.-]+)\/([\w.-]+)/);
28
+ if (sshMatch) {
29
+ return {
30
+ owner: sshMatch[1],
31
+ repo: sshMatch[2].replace(/\.git$/, ""),
32
+ };
33
+ }
34
+ // Handle URL formats (https://, git://, ssh://, etc.)
35
+ const urlMatch = url.match(/(?:github\.com|gitlab\.com|bitbucket\.org)[/:]+([\w.-]+)\/([\w.-]+)/);
36
+ if (urlMatch) {
22
37
  return {
23
- url: source,
24
- original,
38
+ owner: urlMatch[1],
39
+ repo: urlMatch[2].replace(/\.git$/, ""),
25
40
  };
26
41
  }
27
- // Split on # for subpath
28
- let subpath;
42
+ return null;
43
+ }
44
+ /**
45
+ * Ensure URL ends with .git for consistency.
46
+ */
47
+ function normalizeGitUrl(url) {
48
+ // Remove git+ prefix for storage (git+ssh:// -> ssh://)
49
+ let normalized = url.replace(/^git\+(ssh|https):\/\//, "$1://");
50
+ // Add .git suffix if missing
51
+ if (!normalized.endsWith(".git")) {
52
+ normalized = `${normalized}.git`;
53
+ }
54
+ return normalized;
55
+ }
56
+ /**
57
+ * Parse a CLI source shorthand string into a normalized Source object.
58
+ *
59
+ * Supported formats:
60
+ * - owner/repo (GitHub shorthand)
61
+ * - owner/repo#subdir
62
+ * - https://github.com/owner/repo
63
+ * - git://github.com/owner/repo
64
+ * - git+ssh://git@github.com/owner/repo
65
+ * - git@github.com:owner/repo
66
+ * - Any of the above with #subdir suffix
67
+ *
68
+ * Returns a Source object suitable for storing in agpm.json.
69
+ */
70
+ export function parseSourceString(input) {
71
+ // Split on # for subdir
72
+ let subdir;
73
+ let source = input;
29
74
  const hashIndex = source.indexOf("#");
30
75
  if (hashIndex !== -1) {
31
- subpath = source.slice(hashIndex + 1);
76
+ subdir = source.slice(hashIndex + 1);
32
77
  source = source.slice(0, hashIndex);
33
78
  }
34
- // Full URL
35
- if (source.startsWith("https://") || source.startsWith("git@")) {
36
- const match = source.match(/github\.com[/:]([\w.-]+)\/([\w.-]+)/);
37
- if (match) {
79
+ // Full URL (various git protocols)
80
+ if (isGitUrl(source)) {
81
+ const repoInfo = extractRepoInfo(source);
82
+ const url = normalizeGitUrl(source);
83
+ if (repoInfo) {
38
84
  return {
39
- url: source.endsWith(".git") ? source : `${source}.git`,
40
- owner: match[1],
41
- repo: match[2].replace(/\.git$/, ""),
42
- subpath,
43
- original,
85
+ name: `${repoInfo.owner}/${repoInfo.repo}`,
86
+ url,
87
+ ...(subdir && { subdir }),
44
88
  };
45
89
  }
46
- return { url: source, subpath, original };
90
+ // Non-standard URL - use sanitized version as name
91
+ const name = source
92
+ .replace(/^(git\+)?(https?|git|ssh):\/\//, "")
93
+ .replace(/^git@/, "")
94
+ .replace(/\.git$/, "")
95
+ .replace(":", "/");
96
+ return {
97
+ name,
98
+ url,
99
+ ...(subdir && { subdir }),
100
+ };
47
101
  }
48
- // owner/repo shorthand
102
+ // owner/repo shorthand (assumes GitHub)
49
103
  const parts = source.split("/");
50
104
  if (parts.length >= 2) {
51
105
  const owner = parts[0];
52
106
  const repo = parts[1];
53
107
  return {
108
+ name: `${owner}/${repo}`,
54
109
  url: `https://github.com/${owner}/${repo}.git`,
55
- owner,
56
- repo,
57
- subpath,
58
- original,
110
+ ...(subdir && { subdir }),
59
111
  };
60
112
  }
61
- throw new Error(`Invalid source format: ${original}`);
113
+ throw new Error(`Invalid source format: ${input}`);
62
114
  }
63
115
  // ============================================================================
64
116
  // Repository Management
@@ -70,19 +122,35 @@ export function getAgpmDir() {
70
122
  return join(homedir(), ".agpm");
71
123
  }
72
124
  /**
73
- * Get the path where a repo should be stored.
125
+ * Get the path where a repo should be stored based on its URL.
74
126
  */
75
127
  export function getRepoPath(source) {
76
- const apmDir = getAgpmDir();
77
- if (source.owner && source.repo) {
78
- return join(apmDir, "repos", "github.com", source.owner, source.repo);
128
+ const agpmDir = getAgpmDir();
129
+ // Parse the URL to extract host and path
130
+ const url = source.url;
131
+ // Handle git@host:path format
132
+ const sshMatch = url.match(/git@([\w.-]+):([\w.-]+)\/([\w.-]+)/);
133
+ if (sshMatch) {
134
+ const host = sshMatch[1];
135
+ const owner = sshMatch[2];
136
+ const repo = sshMatch[3].replace(/\.git$/, "");
137
+ return join(agpmDir, "repos", host, owner, repo);
138
+ }
139
+ // Handle URL formats
140
+ const urlMatch = url.match(/(?:https?|git|ssh):\/\/([\w.-]+)\/([\w.-]+)\/([\w.-]+)/);
141
+ if (urlMatch) {
142
+ const host = urlMatch[1];
143
+ const owner = urlMatch[2];
144
+ const repo = urlMatch[3].replace(/\.git$/, "");
145
+ return join(agpmDir, "repos", host, owner, repo);
79
146
  }
80
- // For non-GitHub URLs, use a sanitized version
81
- const sanitized = source.url
82
- .replace(/^https?:\/\//, "")
147
+ // Fallback: sanitize the whole URL
148
+ const sanitized = url
149
+ .replace(/^(git\+)?(https?|git|ssh):\/\//, "")
150
+ .replace(/^git@/, "")
83
151
  .replace(/\.git$/, "")
84
- .replace(/[^a-zA-Z0-9.-]/g, "_");
85
- return join(apmDir, "repos", sanitized);
152
+ .replace(/[^a-zA-Z0-9./-]/g, "_");
153
+ return join(agpmDir, "repos", sanitized);
86
154
  }
87
155
  /**
88
156
  * Clone or fetch a repository.
@@ -127,4 +195,24 @@ export async function resolveRef(repoPath, ref = "HEAD") {
127
195
  const result = await git.revparse([ref]);
128
196
  return result.trim();
129
197
  }
198
+ /**
199
+ * Checkout a ref and cache the repo at that SHA.
200
+ *
201
+ * 1. Resolves the ref to a full SHA
202
+ * 2. If not already cached, checkouts the repo at that SHA and caches it
203
+ * 3. Returns the SHA and path to the cached repo
204
+ */
205
+ export async function checkoutToCache(repoPath, ref = "HEAD") {
206
+ // Resolve ref to full SHA
207
+ const sha = await resolveRef(repoPath, ref);
208
+ // Check if already cached
209
+ if (await isCached(sha)) {
210
+ return { sha, cachePath: getCachedRepoPath(sha) };
211
+ }
212
+ // Checkout the specific SHA
213
+ await checkoutRef(repoPath, sha);
214
+ // Cache the repo at this SHA
215
+ const cachePath = await cacheRepo(repoPath, sha);
216
+ return { sha, cachePath };
217
+ }
130
218
  //# sourceMappingURL=git.js.map
package/dist/git.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AA4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_URL, LOCK_SCHEMA_URL, loadConfig, saveConfig, loadLock, saveLock, } from "./config.js";
1
+ export { type AgpmConfig, type AgpmLock, type TargetConfig, type LockedArtifact, type Source, type SourceFormat, type ArtifactRef, DEFAULT_CONFIG, DEFAULT_LOCK, CONFIG_SCHEMA_URL, LOCK_SCHEMA_URL, loadConfig, saveConfig, loadLock, saveLock, parseArtifactRef, } from "./config.js";
2
2
  export { type ValidationError, type ValidationResult, validateConfig, validateLock, formatValidationErrors, } from "./validate.js";
3
- export { type ParsedSource, type RepoInfo, parseSource, getAgpmDir, getRepoPath, ensureRepo, checkoutRef, resolveRef, } from "./git.js";
4
- export { type DiscoveredArtifact, type ClaudePluginManifest, type SkillMetadata, type RepoFormat, detectFormat, discoverArtifacts, } from "./discovery.js";
3
+ export { type RepoInfo, parseSourceString, getAgpmDir, getRepoPath, ensureRepo, checkoutRef, resolveRef, checkoutToCache, } from "./git.js";
4
+ export { getAgpmCacheDir, getCachedRepoPath, isCached, cacheRepo, hashDirectory, verifyIntegrity, } from "./cache.js";
5
+ export { type DiscoveredArtifact, type DiscoveredCollection, type DiscoveryResult, type PluginEntry, type ClaudeMarketplaceManifest, type ClaudePluginManifest, type SkillMetadata, type RepoFormat, detectFormat, discover, discoverArtifacts, } from "./discovery.js";
6
+ export { type TargetDefinition, type ArtifactType, BUILT_IN_TARGETS, getTargetPath, getEnabledTargetPaths, isValidTarget, getValidTargetNames, } from "./targets.js";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,GACT,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,YAAY,EACZ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,QAAQ,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,GAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,YAAY,EACZ,QAAQ,EACR,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,13 @@
1
1
  // Config types and I/O
2
- export { DEFAULT_CONFIG, DEFAULT_LOCK, CONFIG_SCHEMA_URL, LOCK_SCHEMA_URL, loadConfig, saveConfig, loadLock, saveLock, } from "./config.js";
2
+ export { DEFAULT_CONFIG, DEFAULT_LOCK, CONFIG_SCHEMA_URL, LOCK_SCHEMA_URL, loadConfig, saveConfig, loadLock, saveLock, parseArtifactRef, } from "./config.js";
3
3
  // Validation
4
4
  export { validateConfig, validateLock, formatValidationErrors, } from "./validate.js";
5
5
  // Git operations
6
- export { parseSource, getAgpmDir, getRepoPath, ensureRepo, checkoutRef, resolveRef, } from "./git.js";
6
+ export { parseSourceString, getAgpmDir, getRepoPath, ensureRepo, checkoutRef, resolveRef, checkoutToCache, } from "./git.js";
7
+ // Cache operations
8
+ export { getAgpmCacheDir, getCachedRepoPath, isCached, cacheRepo, hashDirectory, verifyIntegrity, } from "./cache.js";
7
9
  // Discovery
8
- export { detectFormat, discoverArtifacts, } from "./discovery.js";
10
+ export { detectFormat, discover, discoverArtifacts, } from "./discovery.js";
11
+ // Targets
12
+ export { BUILT_IN_TARGETS, getTargetPath, getEnabledTargetPaths, isValidTarget, getValidTargetNames, } from "./targets.js";
9
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EAKL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,GACT,MAAM,aAAa,CAAC;AAErB,aAAa;AACb,OAAO,EAGL,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,iBAAiB;AACjB,OAAO,EAGL,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,UAAU,CAAC;AAElB,YAAY;AACZ,OAAO,EAKL,YAAY,EACZ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EAQL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,aAAa;AACb,OAAO,EAGL,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,iBAAiB;AACjB,OAAO,EAEL,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,GAChB,MAAM,UAAU,CAAC;AAElB,mBAAmB;AACnB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,YAAY;AACZ,OAAO,EASL,YAAY,EACZ,QAAQ,EACR,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,UAAU;AACV,OAAO,EAGL,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Definition of a target tool's directory structure.
3
+ */
4
+ export interface TargetDefinition {
5
+ /** Base directory for this target (e.g., ".claude") */
6
+ basePath: string;
7
+ /** Subdirectory for skills (relative to basePath) */
8
+ skillsDir: string;
9
+ /** Subdirectory for commands (relative to basePath), undefined if not supported */
10
+ commandsDir?: string;
11
+ /** Subdirectory for hooks (relative to basePath), undefined if not supported */
12
+ hooksDir?: string;
13
+ }
14
+ /**
15
+ * Built-in target definitions.
16
+ * Only these targets are supported.
17
+ */
18
+ export declare const BUILT_IN_TARGETS: Record<string, TargetDefinition>;
19
+ /**
20
+ * Artifact types that can be installed.
21
+ */
22
+ export type ArtifactType = "skill" | "command" | "hook";
23
+ /**
24
+ * Get the target path for a specific artifact type.
25
+ * Returns null if the target doesn't exist or doesn't support the artifact type.
26
+ */
27
+ export declare function getTargetPath(targetName: string, artifactType: ArtifactType): string | null;
28
+ /**
29
+ * Get all target paths for enabled targets.
30
+ * Only returns paths for targets that support the given artifact type.
31
+ *
32
+ * Target config can be:
33
+ * - `true` (simplified form): target is enabled with defaults
34
+ * - `{}` (object form): target is enabled, allows future options
35
+ * - `false` or missing: target is disabled
36
+ */
37
+ export declare function getEnabledTargetPaths(targets: Record<string, unknown>, artifactType: ArtifactType): string[];
38
+ /**
39
+ * Check if a target name is valid (built-in).
40
+ */
41
+ export declare function isValidTarget(targetName: string): boolean;
42
+ /**
43
+ * Get list of all valid target names.
44
+ */
45
+ export declare function getValidTargetNames(): string[];
46
+ //# sourceMappingURL=targets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../src/targets.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAgB7D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAMxD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,YAAY,GACzB,MAAM,GAAG,IAAI,CAkBf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,YAAY,EAAE,YAAY,GACzB,MAAM,EAAE,CAcV;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C"}
@@ -0,0 +1,84 @@
1
+ // ============================================================================
2
+ // Target Definitions
3
+ // ============================================================================
4
+ /**
5
+ * Built-in target definitions.
6
+ * Only these targets are supported.
7
+ */
8
+ export const BUILT_IN_TARGETS = {
9
+ "claude-code": {
10
+ basePath: ".claude",
11
+ skillsDir: "skills",
12
+ commandsDir: "commands",
13
+ hooksDir: "hooks",
14
+ },
15
+ opencode: {
16
+ basePath: ".opencode",
17
+ skillsDir: "skills",
18
+ hooksDir: "hooks",
19
+ },
20
+ codex: {
21
+ basePath: ".codex",
22
+ skillsDir: "skills",
23
+ },
24
+ };
25
+ // ============================================================================
26
+ // Helper Functions
27
+ // ============================================================================
28
+ /**
29
+ * Get the target path for a specific artifact type.
30
+ * Returns null if the target doesn't exist or doesn't support the artifact type.
31
+ */
32
+ export function getTargetPath(targetName, artifactType) {
33
+ const target = BUILT_IN_TARGETS[targetName];
34
+ if (!target)
35
+ return null;
36
+ let subdir;
37
+ switch (artifactType) {
38
+ case "skill":
39
+ subdir = target.skillsDir;
40
+ break;
41
+ case "command":
42
+ subdir = target.commandsDir;
43
+ break;
44
+ case "hook":
45
+ subdir = target.hooksDir;
46
+ break;
47
+ }
48
+ return subdir ? `${target.basePath}/${subdir}` : null;
49
+ }
50
+ /**
51
+ * Get all target paths for enabled targets.
52
+ * Only returns paths for targets that support the given artifact type.
53
+ *
54
+ * Target config can be:
55
+ * - `true` (simplified form): target is enabled with defaults
56
+ * - `{}` (object form): target is enabled, allows future options
57
+ * - `false` or missing: target is disabled
58
+ */
59
+ export function getEnabledTargetPaths(targets, artifactType) {
60
+ const paths = [];
61
+ for (const [targetName, config] of Object.entries(targets)) {
62
+ // Skip disabled targets (false or falsy, but not empty object)
63
+ if (config === false)
64
+ continue;
65
+ const path = getTargetPath(targetName, artifactType);
66
+ if (path) {
67
+ paths.push(path);
68
+ }
69
+ }
70
+ return paths;
71
+ }
72
+ /**
73
+ * Check if a target name is valid (built-in).
74
+ */
75
+ export function isValidTarget(targetName) {
76
+ return targetName in BUILT_IN_TARGETS;
77
+ }
78
+ /**
79
+ * Get list of all valid target names.
80
+ */
81
+ export function getValidTargetNames() {
82
+ return Object.keys(BUILT_IN_TARGETS);
83
+ }
84
+ //# sourceMappingURL=targets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"targets.js","sourceRoot":"","sources":["../src/targets.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAgB/E;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqC;IAChE,aAAa,EAAE;QACb,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,UAAU;QACvB,QAAQ,EAAE,OAAO;KAClB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,OAAO;KAClB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC;AAOF,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,UAAkB,EAClB,YAA0B;IAE1B,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5C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": "Core library for AGPM - config, git, discovery, caching, validation",
4
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/kepler16/agpm.git",
9
+ "directory": "cli/packages/core"
10
+ },
11
+ "homepage": "https://agpm.dev",
12
+ "bugs": {
13
+ "url": "https://github.com/kepler16/agpm/issues"
14
+ },
5
15
  "exports": {
6
16
  ".": {
7
17
  "types": "./dist/index.d.ts",