@enactprotocol/cli 2.0.0 → 2.0.2

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.
Files changed (119) hide show
  1. package/dist/commands/auth/index.d.ts +12 -0
  2. package/dist/commands/auth/index.d.ts.map +1 -0
  3. package/dist/commands/auth/index.js +743 -0
  4. package/dist/commands/auth/index.js.map +1 -0
  5. package/dist/commands/cache/index.d.ts +11 -0
  6. package/dist/commands/cache/index.d.ts.map +1 -0
  7. package/dist/commands/cache/index.js +304 -0
  8. package/dist/commands/cache/index.js.map +1 -0
  9. package/dist/commands/config/index.d.ts +11 -0
  10. package/dist/commands/config/index.d.ts.map +1 -0
  11. package/dist/commands/config/index.js +138 -0
  12. package/dist/commands/config/index.js.map +1 -0
  13. package/dist/commands/env/index.d.ts +11 -0
  14. package/dist/commands/env/index.d.ts.map +1 -0
  15. package/dist/commands/env/index.js +303 -0
  16. package/dist/commands/env/index.js.map +1 -0
  17. package/dist/commands/exec/index.d.ts +12 -0
  18. package/dist/commands/exec/index.d.ts.map +1 -0
  19. package/dist/commands/exec/index.js +154 -0
  20. package/dist/commands/exec/index.js.map +1 -0
  21. package/dist/commands/get/index.d.ts +11 -0
  22. package/dist/commands/get/index.d.ts.map +1 -0
  23. package/dist/commands/get/index.js +151 -0
  24. package/dist/commands/get/index.js.map +1 -0
  25. package/dist/commands/index.d.ts +25 -0
  26. package/dist/commands/index.d.ts.map +1 -0
  27. package/dist/commands/index.js +28 -0
  28. package/dist/commands/index.js.map +1 -0
  29. package/dist/commands/init/index.d.ts +11 -0
  30. package/dist/commands/init/index.d.ts.map +1 -0
  31. package/dist/commands/init/index.js +192 -0
  32. package/dist/commands/init/index.js.map +1 -0
  33. package/dist/commands/inspect/index.d.ts +13 -0
  34. package/dist/commands/inspect/index.d.ts.map +1 -0
  35. package/dist/commands/inspect/index.js +199 -0
  36. package/dist/commands/inspect/index.js.map +1 -0
  37. package/dist/commands/install/index.d.ts +16 -0
  38. package/dist/commands/install/index.d.ts.map +1 -0
  39. package/dist/commands/install/index.js +520 -0
  40. package/dist/commands/install/index.js.map +1 -0
  41. package/dist/commands/list/index.d.ts +15 -0
  42. package/dist/commands/list/index.d.ts.map +1 -0
  43. package/dist/commands/list/index.js +103 -0
  44. package/dist/commands/list/index.js.map +1 -0
  45. package/dist/commands/publish/index.d.ts +11 -0
  46. package/dist/commands/publish/index.d.ts.map +1 -0
  47. package/dist/commands/publish/index.js +274 -0
  48. package/dist/commands/publish/index.js.map +1 -0
  49. package/dist/commands/report/index.d.ts +12 -0
  50. package/dist/commands/report/index.d.ts.map +1 -0
  51. package/dist/commands/report/index.js +279 -0
  52. package/dist/commands/report/index.js.map +1 -0
  53. package/dist/commands/run/index.d.ts +16 -0
  54. package/dist/commands/run/index.d.ts.map +1 -0
  55. package/dist/commands/run/index.js +525 -0
  56. package/dist/commands/run/index.js.map +1 -0
  57. package/dist/commands/search/index.d.ts +12 -0
  58. package/dist/commands/search/index.d.ts.map +1 -0
  59. package/dist/commands/search/index.js +275 -0
  60. package/dist/commands/search/index.js.map +1 -0
  61. package/dist/commands/setup/index.d.ts +11 -0
  62. package/dist/commands/setup/index.d.ts.map +1 -0
  63. package/dist/commands/setup/index.js +241 -0
  64. package/dist/commands/setup/index.js.map +1 -0
  65. package/dist/commands/sign/index.d.ts +17 -0
  66. package/dist/commands/sign/index.d.ts.map +1 -0
  67. package/dist/commands/sign/index.js +507 -0
  68. package/dist/commands/sign/index.js.map +1 -0
  69. package/dist/commands/trust/index.d.ts +13 -0
  70. package/dist/commands/trust/index.d.ts.map +1 -0
  71. package/dist/commands/trust/index.js +366 -0
  72. package/dist/commands/trust/index.js.map +1 -0
  73. package/dist/commands/unyank/index.d.ts +11 -0
  74. package/dist/commands/unyank/index.d.ts.map +1 -0
  75. package/dist/commands/unyank/index.js +87 -0
  76. package/dist/commands/unyank/index.js.map +1 -0
  77. package/dist/commands/yank/index.d.ts +13 -0
  78. package/dist/commands/yank/index.d.ts.map +1 -0
  79. package/dist/commands/yank/index.js +109 -0
  80. package/dist/commands/yank/index.js.map +1 -0
  81. package/dist/index.d.ts +10 -0
  82. package/dist/index.d.ts.map +1 -0
  83. package/dist/index.js +68 -0
  84. package/dist/index.js.map +1 -0
  85. package/dist/types.d.ts +69 -0
  86. package/dist/types.d.ts.map +1 -0
  87. package/dist/types.js +15 -0
  88. package/dist/types.js.map +1 -0
  89. package/dist/utils/errors.d.ts +159 -0
  90. package/dist/utils/errors.d.ts.map +1 -0
  91. package/dist/utils/errors.js +321 -0
  92. package/dist/utils/errors.js.map +1 -0
  93. package/dist/utils/exit-codes.d.ts +83 -0
  94. package/dist/utils/exit-codes.d.ts.map +1 -0
  95. package/dist/utils/exit-codes.js +126 -0
  96. package/dist/utils/exit-codes.js.map +1 -0
  97. package/dist/utils/ignore.d.ts +25 -0
  98. package/dist/utils/ignore.d.ts.map +1 -0
  99. package/dist/utils/ignore.js +123 -0
  100. package/dist/utils/ignore.js.map +1 -0
  101. package/dist/utils/index.d.ts +8 -0
  102. package/dist/utils/index.d.ts.map +1 -0
  103. package/dist/utils/index.js +12 -0
  104. package/dist/utils/index.js.map +1 -0
  105. package/dist/utils/output.d.ts +103 -0
  106. package/dist/utils/output.d.ts.map +1 -0
  107. package/dist/utils/output.js +201 -0
  108. package/dist/utils/output.js.map +1 -0
  109. package/dist/utils/spinner.d.ts +83 -0
  110. package/dist/utils/spinner.d.ts.map +1 -0
  111. package/dist/utils/spinner.js +162 -0
  112. package/dist/utils/spinner.js.map +1 -0
  113. package/package.json +5 -5
  114. package/src/commands/index.ts +1 -0
  115. package/src/commands/init/index.ts +231 -0
  116. package/src/index.ts +7 -1
  117. package/tests/index.test.ts +1 -1
  118. package/tsconfig.json +1 -0
  119. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Exit codes for CLI commands
3
+ *
4
+ * Standardized exit codes following Unix conventions:
5
+ * - 0: Success
6
+ * - 1: General error
7
+ * - 2: Misuse of shell command (invalid args)
8
+ * - 64-78: BSD sysexits.h codes
9
+ * - 128+: Signal-based exits
10
+ *
11
+ * @see https://www.freebsd.org/cgi/man.cgi?query=sysexits
12
+ */
13
+ /** Success - command completed successfully */
14
+ export declare const EXIT_SUCCESS = 0;
15
+ /** General error - unspecified failure */
16
+ export declare const EXIT_FAILURE = 1;
17
+ /** Usage error - invalid command line arguments */
18
+ export declare const EXIT_USAGE = 2;
19
+ /** Data error - input data was incorrect */
20
+ export declare const EXIT_DATAERR = 65;
21
+ /** No input - input file did not exist or was not readable */
22
+ export declare const EXIT_NOINPUT = 66;
23
+ /** No user - user does not exist */
24
+ export declare const EXIT_NOUSER = 67;
25
+ /** No host - host does not exist */
26
+ export declare const EXIT_NOHOST = 68;
27
+ /** Service unavailable - a required service is unavailable */
28
+ export declare const EXIT_UNAVAILABLE = 69;
29
+ /** Software error - internal error */
30
+ export declare const EXIT_SOFTWARE = 70;
31
+ /** OS error - system error */
32
+ export declare const EXIT_OSERR = 71;
33
+ /** OS file - system file missing or not creatable */
34
+ export declare const EXIT_OSFILE = 72;
35
+ /** Can't create - output file cannot be created */
36
+ export declare const EXIT_CANTCREAT = 73;
37
+ /** I/O error - input/output error */
38
+ export declare const EXIT_IOERR = 74;
39
+ /** Temp failure - temporary failure, try again */
40
+ export declare const EXIT_TEMPFAIL = 75;
41
+ /** Protocol error - remote error in protocol */
42
+ export declare const EXIT_PROTOCOL = 76;
43
+ /** No permission - permission denied */
44
+ export declare const EXIT_NOPERM = 77;
45
+ /** Configuration error - configuration error */
46
+ export declare const EXIT_CONFIG = 78;
47
+ /** Tool not found */
48
+ export declare const EXIT_TOOL_NOT_FOUND = 100;
49
+ /** Manifest error - invalid or missing manifest */
50
+ export declare const EXIT_MANIFEST_ERROR = 101;
51
+ /** Execution error - tool execution failed */
52
+ export declare const EXIT_EXECUTION_ERROR = 102;
53
+ /** Timeout error - operation timed out */
54
+ export declare const EXIT_TIMEOUT = 103;
55
+ /** Trust error - trust verification failed */
56
+ export declare const EXIT_TRUST_ERROR = 104;
57
+ /** Registry error - registry communication failed */
58
+ export declare const EXIT_REGISTRY_ERROR = 105;
59
+ /** Authentication error - not authenticated or token expired */
60
+ export declare const EXIT_AUTH_ERROR = 106;
61
+ /** Validation error - input validation failed */
62
+ export declare const EXIT_VALIDATION_ERROR = 107;
63
+ /** Network error - network communication failed */
64
+ export declare const EXIT_NETWORK_ERROR = 108;
65
+ /** Container error - container runtime error */
66
+ export declare const EXIT_CONTAINER_ERROR = 109;
67
+ /**
68
+ * Get description for an exit code
69
+ */
70
+ export declare function getExitCodeDescription(code: number): string;
71
+ /**
72
+ * Exit with a specific code
73
+ */
74
+ export declare function exit(code: number): never;
75
+ /**
76
+ * Exit with success
77
+ */
78
+ export declare function exitSuccess(): never;
79
+ /**
80
+ * Exit with failure
81
+ */
82
+ export declare function exitFailure(): never;
83
+ //# sourceMappingURL=exit-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../../src/utils/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,+CAA+C;AAC/C,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,0CAA0C;AAC1C,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,mDAAmD;AACnD,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,4CAA4C;AAC5C,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,8DAA8D;AAC9D,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,oCAAoC;AACpC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,oCAAoC;AACpC,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,sCAAsC;AACtC,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,8BAA8B;AAC9B,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,q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5
+ * - 0: Success
6
+ * - 1: General error
7
+ * - 2: Misuse of shell command (invalid args)
8
+ * - 64-78: BSD sysexits.h codes
9
+ * - 128+: Signal-based exits
10
+ *
11
+ * @see https://www.freebsd.org/cgi/man.cgi?query=sysexits
12
+ */
13
+ /** Success - command completed successfully */
14
+ export const EXIT_SUCCESS = 0;
15
+ /** General error - unspecified failure */
16
+ export const EXIT_FAILURE = 1;
17
+ /** Usage error - invalid command line arguments */
18
+ export const EXIT_USAGE = 2;
19
+ /** Data error - input data was incorrect */
20
+ export const EXIT_DATAERR = 65;
21
+ /** No input - input file did not exist or was not readable */
22
+ export const EXIT_NOINPUT = 66;
23
+ /** No user - user does not exist */
24
+ export const EXIT_NOUSER = 67;
25
+ /** No host - host does not exist */
26
+ export const EXIT_NOHOST = 68;
27
+ /** Service unavailable - a required service is unavailable */
28
+ export const EXIT_UNAVAILABLE = 69;
29
+ /** Software error - internal error */
30
+ export const EXIT_SOFTWARE = 70;
31
+ /** OS error - system error */
32
+ export const EXIT_OSERR = 71;
33
+ /** OS file - system file missing or not creatable */
34
+ export const EXIT_OSFILE = 72;
35
+ /** Can't create - output file cannot be created */
36
+ export const EXIT_CANTCREAT = 73;
37
+ /** I/O error - input/output error */
38
+ export const EXIT_IOERR = 74;
39
+ /** Temp failure - temporary failure, try again */
40
+ export const EXIT_TEMPFAIL = 75;
41
+ /** Protocol error - remote error in protocol */
42
+ export const EXIT_PROTOCOL = 76;
43
+ /** No permission - permission denied */
44
+ export const EXIT_NOPERM = 77;
45
+ /** Configuration error - configuration error */
46
+ export const EXIT_CONFIG = 78;
47
+ // ============================================================================
48
+ // Enact-specific exit codes (100-119)
49
+ // ============================================================================
50
+ /** Tool not found */
51
+ export const EXIT_TOOL_NOT_FOUND = 100;
52
+ /** Manifest error - invalid or missing manifest */
53
+ export const EXIT_MANIFEST_ERROR = 101;
54
+ /** Execution error - tool execution failed */
55
+ export const EXIT_EXECUTION_ERROR = 102;
56
+ /** Timeout error - operation timed out */
57
+ export const EXIT_TIMEOUT = 103;
58
+ /** Trust error - trust verification failed */
59
+ export const EXIT_TRUST_ERROR = 104;
60
+ /** Registry error - registry communication failed */
61
+ export const EXIT_REGISTRY_ERROR = 105;
62
+ /** Authentication error - not authenticated or token expired */
63
+ export const EXIT_AUTH_ERROR = 106;
64
+ /** Validation error - input validation failed */
65
+ export const EXIT_VALIDATION_ERROR = 107;
66
+ /** Network error - network communication failed */
67
+ export const EXIT_NETWORK_ERROR = 108;
68
+ /** Container error - container runtime error */
69
+ export const EXIT_CONTAINER_ERROR = 109;
70
+ // ============================================================================
71
+ // Exit code descriptions
72
+ // ============================================================================
73
+ const EXIT_CODE_DESCRIPTIONS = {
74
+ [EXIT_SUCCESS]: "Success",
75
+ [EXIT_FAILURE]: "General error",
76
+ [EXIT_USAGE]: "Invalid command line arguments",
77
+ [EXIT_DATAERR]: "Input data was incorrect",
78
+ [EXIT_NOINPUT]: "Input file not found or not readable",
79
+ [EXIT_NOUSER]: "User not found",
80
+ [EXIT_NOHOST]: "Host not found",
81
+ [EXIT_UNAVAILABLE]: "Service unavailable",
82
+ [EXIT_SOFTWARE]: "Internal software error",
83
+ [EXIT_OSERR]: "System error",
84
+ [EXIT_OSFILE]: "System file missing",
85
+ [EXIT_CANTCREAT]: "Cannot create output file",
86
+ [EXIT_IOERR]: "I/O error",
87
+ [EXIT_TEMPFAIL]: "Temporary failure, try again",
88
+ [EXIT_PROTOCOL]: "Protocol error",
89
+ [EXIT_NOPERM]: "Permission denied",
90
+ [EXIT_CONFIG]: "Configuration error",
91
+ [EXIT_TOOL_NOT_FOUND]: "Tool not found",
92
+ [EXIT_MANIFEST_ERROR]: "Manifest error",
93
+ [EXIT_EXECUTION_ERROR]: "Tool execution failed",
94
+ [EXIT_TIMEOUT]: "Operation timed out",
95
+ [EXIT_TRUST_ERROR]: "Trust verification failed",
96
+ [EXIT_REGISTRY_ERROR]: "Registry error",
97
+ [EXIT_AUTH_ERROR]: "Authentication error",
98
+ [EXIT_VALIDATION_ERROR]: "Validation error",
99
+ [EXIT_NETWORK_ERROR]: "Network error",
100
+ [EXIT_CONTAINER_ERROR]: "Container runtime error",
101
+ };
102
+ /**
103
+ * Get description for an exit code
104
+ */
105
+ export function getExitCodeDescription(code) {
106
+ return EXIT_CODE_DESCRIPTIONS[code] ?? `Unknown error (code ${code})`;
107
+ }
108
+ /**
109
+ * Exit with a specific code
110
+ */
111
+ export function exit(code) {
112
+ process.exit(code);
113
+ }
114
+ /**
115
+ * Exit with success
116
+ */
117
+ export function exitSuccess() {
118
+ process.exit(EXIT_SUCCESS);
119
+ }
120
+ /**
121
+ * Exit with failure
122
+ */
123
+ export function exitFailure() {
124
+ process.exit(EXIT_FAILURE);
125
+ }
126
+ //# sourceMappingURL=exit-codes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../../src/utils/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B,0CAA0C;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B,mDAAmD;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAE5B,4CAA4C;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,8DAA8D;AAC9D,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,oCAAoC;AACpC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,oCAAoC;AACpC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,sCAAsC;AACtC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,8BAA8B;AAC9B,MAAM,CAAC,MAAM,UAAU,GAAG,EA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M,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * File ignore utilities for bundling
3
+ *
4
+ * Provides gitignore-style pattern matching and default ignore lists
5
+ * to prevent sensitive files from being included in tool bundles.
6
+ */
7
+ /** Files/patterns that should never be included in bundles */
8
+ export declare const ALWAYS_IGNORE: string[];
9
+ /**
10
+ * Load and parse a .gitignore file from a directory
11
+ */
12
+ export declare function loadGitignore(toolDir: string): string[];
13
+ /**
14
+ * Parse gitignore content string into patterns
15
+ */
16
+ export declare function parseGitignoreContent(content: string): string[];
17
+ /**
18
+ * Check if a path matches a gitignore-style pattern
19
+ */
20
+ export declare function matchesPattern(relativePath: string, pattern: string): boolean;
21
+ /**
22
+ * Check if a file should be ignored based on patterns
23
+ */
24
+ export declare function shouldIgnore(relativePath: string, fileName: string, ignorePatterns?: string[]): boolean;
25
+ //# sourceMappingURL=ignore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/utils/ignore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,8DAA8D;AAC9D,eAAO,MAAM,aAAa,UA2CzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAQvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAK/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAkC7E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,cAAc,GAAE,MAAM,EAAO,GAC5B,OAAO,CAqBT"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * File ignore utilities for bundling
3
+ *
4
+ * Provides gitignore-style pattern matching and default ignore lists
5
+ * to prevent sensitive files from being included in tool bundles.
6
+ */
7
+ import { existsSync, readFileSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ /** Files/patterns that should never be included in bundles */
10
+ export const ALWAYS_IGNORE = [
11
+ // Environment and secrets
12
+ ".env",
13
+ ".env.local",
14
+ ".env.development",
15
+ ".env.production",
16
+ ".env.*.local",
17
+ "*.pem",
18
+ "*.key",
19
+ "*.p12",
20
+ "*.pfx",
21
+ // Version control
22
+ ".git",
23
+ ".gitignore",
24
+ ".gitattributes",
25
+ // IDE/Editor
26
+ ".vscode",
27
+ ".idea",
28
+ "*.swp",
29
+ "*.swo",
30
+ "*~",
31
+ // OS files
32
+ ".DS_Store",
33
+ "Thumbs.db",
34
+ "desktop.ini",
35
+ // Dependencies
36
+ "node_modules",
37
+ "vendor",
38
+ "__pycache__",
39
+ "*.pyc",
40
+ ".venv",
41
+ "venv",
42
+ // Build artifacts
43
+ "dist",
44
+ "build",
45
+ "out",
46
+ "target",
47
+ "*.log",
48
+ ];
49
+ /**
50
+ * Load and parse a .gitignore file from a directory
51
+ */
52
+ export function loadGitignore(toolDir) {
53
+ const gitignorePath = join(toolDir, ".gitignore");
54
+ if (!existsSync(gitignorePath)) {
55
+ return [];
56
+ }
57
+ const content = readFileSync(gitignorePath, "utf-8");
58
+ return parseGitignoreContent(content);
59
+ }
60
+ /**
61
+ * Parse gitignore content string into patterns
62
+ */
63
+ export function parseGitignoreContent(content) {
64
+ return content
65
+ .split("\n")
66
+ .map((line) => line.trim())
67
+ .filter((line) => line && !line.startsWith("#"));
68
+ }
69
+ /**
70
+ * Check if a path matches a gitignore-style pattern
71
+ */
72
+ export function matchesPattern(relativePath, pattern) {
73
+ // Handle negation patterns (we don't support re-including for now)
74
+ if (pattern.startsWith("!")) {
75
+ return false;
76
+ }
77
+ // Normalize pattern
78
+ let normalizedPattern = pattern;
79
+ // Handle directory-specific patterns (ending with /)
80
+ const isDirPattern = pattern.endsWith("/");
81
+ if (isDirPattern) {
82
+ normalizedPattern = pattern.slice(0, -1);
83
+ }
84
+ // Handle patterns starting with /
85
+ const isRooted = pattern.startsWith("/");
86
+ if (isRooted) {
87
+ normalizedPattern = normalizedPattern.slice(1);
88
+ }
89
+ // Simple glob matching
90
+ const regexPattern = normalizedPattern
91
+ .replace(/\./g, "\\.")
92
+ .replace(/\*\*/g, "<<<GLOBSTAR>>>")
93
+ .replace(/\*/g, "[^/]*")
94
+ .replace(/<<<GLOBSTAR>>>/g, ".*")
95
+ .replace(/\?/g, ".");
96
+ const regex = isRooted
97
+ ? new RegExp(`^${regexPattern}($|/)`)
98
+ : new RegExp(`(^|/)${regexPattern}($|/)`);
99
+ return regex.test(relativePath);
100
+ }
101
+ /**
102
+ * Check if a file should be ignored based on patterns
103
+ */
104
+ export function shouldIgnore(relativePath, fileName, ignorePatterns = []) {
105
+ // Always skip hidden files (starting with .)
106
+ if (fileName.startsWith(".")) {
107
+ return true;
108
+ }
109
+ // Check against always-ignore list
110
+ for (const pattern of ALWAYS_IGNORE) {
111
+ if (matchesPattern(relativePath, pattern) || matchesPattern(fileName, pattern)) {
112
+ return true;
113
+ }
114
+ }
115
+ // Check against gitignore patterns
116
+ for (const pattern of ignorePatterns) {
117
+ if (matchesPattern(relativePath, pattern)) {
118
+ return true;
119
+ }
120
+ }
121
+ return false;
122
+ }
123
+ //# sourceMappingURL=ignore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/utils/ignore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MA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AAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mCAAmC;IACnC,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;QACpC,IAAI,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC;YAC/E,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,mCAAmC;IACnC,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE,CAAC;QACrC,IAAI,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI utilities
3
+ */
4
+ export { colors, symbols, success, error, warning, info, dim, newline, header, keyValue, listItem, table, json, jsonCompact, formatError, errorWithDetails, suggest, status, clearLine, type TableColumn, } from "./output";
5
+ export { createSpinner, withSpinner, intro, outro, confirm, text, password, select, isCancel, cancel, log, logInfo, logSuccess, logWarning, logError, logStep, type SpinnerInstance, } from "./spinner";
6
+ export { EXIT_SUCCESS, EXIT_FAILURE, EXIT_USAGE, EXIT_DATAERR, EXIT_NOINPUT, EXIT_NOUSER, EXIT_NOHOST, EXIT_UNAVAILABLE, EXIT_SOFTWARE, EXIT_OSERR, EXIT_OSFILE, EXIT_CANTCREAT, EXIT_IOERR, EXIT_TEMPFAIL, EXIT_PROTOCOL, EXIT_NOPERM, EXIT_CONFIG, EXIT_TOOL_NOT_FOUND, EXIT_MANIFEST_ERROR, EXIT_EXECUTION_ERROR, EXIT_TIMEOUT, EXIT_TRUST_ERROR, EXIT_REGISTRY_ERROR, EXIT_AUTH_ERROR, EXIT_VALIDATION_ERROR, EXIT_NETWORK_ERROR, EXIT_CONTAINER_ERROR, getExitCodeDescription, exit, exitSuccess, exitFailure, } from "./exit-codes";
7
+ export { CliError, ToolNotFoundError, ManifestError, ValidationError, AuthError, NetworkError, RegistryError, TrustError, TimeoutError, ExecutionError, ContainerError, FileNotFoundError, PermissionError, ConfigError, UsageError, handleError, withErrorHandling, categorizeError, ErrorMessages, printErrorWithSuggestions, } from "./errors";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,GAAG,EACH,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,IAAI,EACJ,WAAW,EACX,WAAW,GACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,yBAAyB,GAC1B,MAAM,UAAU,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * CLI utilities
3
+ */
4
+ // Output formatting
5
+ export { colors, symbols, success, error, warning, info, dim, newline, header, keyValue, listItem, table, json, jsonCompact, formatError, errorWithDetails, suggest, status, clearLine, } from "./output";
6
+ // Spinner and prompts
7
+ export { createSpinner, withSpinner, intro, outro, confirm, text, password, select, isCancel, cancel, log, logInfo, logSuccess, logWarning, logError, logStep, } from "./spinner";
8
+ // Exit codes
9
+ export { EXIT_SUCCESS, EXIT_FAILURE, EXIT_USAGE, EXIT_DATAERR, EXIT_NOINPUT, EXIT_NOUSER, EXIT_NOHOST, EXIT_UNAVAILABLE, EXIT_SOFTWARE, EXIT_OSERR, EXIT_OSFILE, EXIT_CANTCREAT, EXIT_IOERR, EXIT_TEMPFAIL, EXIT_PROTOCOL, EXIT_NOPERM, EXIT_CONFIG, EXIT_TOOL_NOT_FOUND, EXIT_MANIFEST_ERROR, EXIT_EXECUTION_ERROR, EXIT_TIMEOUT, EXIT_TRUST_ERROR, EXIT_REGISTRY_ERROR, EXIT_AUTH_ERROR, EXIT_VALIDATION_ERROR, EXIT_NETWORK_ERROR, EXIT_CONTAINER_ERROR, getExitCodeDescription, exit, exitSuccess, exitFailure, } from "./exit-codes";
10
+ // Error handling
11
+ export { CliError, ToolNotFoundError, ManifestError, ValidationError, AuthError, NetworkError, RegistryError, TrustError, TimeoutError, ExecutionError, ContainerError, FileNotFoundError, PermissionError, ConfigError, UsageError, handleError, withErrorHandling, categorizeError, ErrorMessages, printErrorWithSuggestions, } from "./errors";
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oBAAoB;AACpB,OAAO,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,GAAG,EACH,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,MAAM,EACN,SAAS,GAEV,MAAM,UAAU,CAAC;AAElB,sBAAsB;AACtB,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,GAAG,EACH,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,GAER,MAAM,WAAW,CAAC;AAEnB,aAAa;AACb,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,IAAI,EACJ,WAAW,EACX,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,iBAAiB;AACjB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,SAAS,EACT,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,yBAAyB,GAC1B,MAAM,UAAU,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Output utilities for CLI
3
+ *
4
+ * Provides consistent formatting, colors, and output helpers
5
+ */
6
+ export declare const colors: {
7
+ success: import("picocolors/types").Formatter;
8
+ error: import("picocolors/types").Formatter;
9
+ warning: import("picocolors/types").Formatter;
10
+ info: import("picocolors/types").Formatter;
11
+ dim: import("picocolors/types").Formatter;
12
+ bold: import("picocolors/types").Formatter;
13
+ command: import("picocolors/types").Formatter;
14
+ path: import("picocolors/types").Formatter;
15
+ value: import("picocolors/types").Formatter;
16
+ key: import("picocolors/types").Formatter;
17
+ version: import("picocolors/types").Formatter;
18
+ };
19
+ export declare const symbols: {
20
+ success: string;
21
+ error: string;
22
+ warning: string;
23
+ info: string;
24
+ arrow: string;
25
+ bullet: string;
26
+ check: string;
27
+ cross: string;
28
+ };
29
+ /**
30
+ * Print a success message
31
+ */
32
+ export declare function success(message: string): void;
33
+ /**
34
+ * Print an error message
35
+ */
36
+ export declare function error(message: string): void;
37
+ /**
38
+ * Print a warning message
39
+ */
40
+ export declare function warning(message: string): void;
41
+ /**
42
+ * Print an info message
43
+ */
44
+ export declare function info(message: string): void;
45
+ /**
46
+ * Print a dim/subtle message
47
+ */
48
+ export declare function dim(message: string): void;
49
+ /**
50
+ * Print a newline
51
+ */
52
+ export declare function newline(): void;
53
+ /**
54
+ * Print a header
55
+ */
56
+ export declare function header(text: string): void;
57
+ /**
58
+ * Print a key-value pair
59
+ */
60
+ export declare function keyValue(key: string, value: string, indent?: number): void;
61
+ /**
62
+ * Print a list item
63
+ */
64
+ export declare function listItem(text: string, indent?: number): void;
65
+ export interface TableColumn {
66
+ key: string;
67
+ header: string;
68
+ width?: number;
69
+ align?: "left" | "right" | "center";
70
+ }
71
+ /**
72
+ * Print a simple table
73
+ */
74
+ export declare function table<T extends Record<string, unknown>>(data: T[], columns: TableColumn[]): void;
75
+ /**
76
+ * Print data as JSON (for --json flag)
77
+ */
78
+ export declare function json(data: unknown): void;
79
+ /**
80
+ * Print data as compact JSON
81
+ */
82
+ export declare function jsonCompact(data: unknown): void;
83
+ /**
84
+ * Format an error for display
85
+ */
86
+ export declare function formatError(err: unknown): string;
87
+ /**
88
+ * Print an error with details
89
+ */
90
+ export declare function errorWithDetails(message: string, details?: string): void;
91
+ /**
92
+ * Print a suggestion after an error
93
+ */
94
+ export declare function suggest(message: string): void;
95
+ /**
96
+ * Print a status line that can be updated
97
+ */
98
+ export declare function status(message: string): void;
99
+ /**
100
+ * Clear the current line
101
+ */
102
+ export declare function clearLine(): void;
103
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,eAAO,MAAM,MAAM;;;;;;;;;;;;CAelB,CAAC;AAMF,eAAO,MAAM,OAAO;;;;;;;;;CASnB,CAAC;AAMF;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAE9B;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIzC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,IAAI,CAGrE;AAED;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