@cleocode/contracts 2026.3.37 → 2026.3.39
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/LICENSE +21 -0
- package/README.md +491 -0
- package/dist/adapter.d.ts +0 -0
- package/dist/adapter.d.ts.map +0 -0
- package/dist/adapter.js +0 -0
- package/dist/adapter.js.map +0 -0
- package/dist/archive.d.ts +0 -0
- package/dist/archive.d.ts.map +0 -0
- package/dist/archive.js +0 -0
- package/dist/archive.js.map +0 -0
- package/dist/brain.d.ts +0 -0
- package/dist/brain.d.ts.map +0 -0
- package/dist/brain.js +0 -0
- package/dist/brain.js.map +0 -0
- package/dist/capabilities.d.ts +0 -0
- package/dist/capabilities.d.ts.map +0 -0
- package/dist/capabilities.js +0 -0
- package/dist/capabilities.js.map +0 -0
- package/dist/config.d.ts +0 -0
- package/dist/config.d.ts.map +0 -0
- package/dist/config.js +0 -0
- package/dist/config.js.map +0 -0
- package/dist/context-monitor.d.ts +0 -0
- package/dist/context-monitor.d.ts.map +0 -0
- package/dist/context-monitor.js +0 -0
- package/dist/context-monitor.js.map +0 -0
- package/dist/data-accessor.d.ts +0 -0
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js +0 -0
- package/dist/data-accessor.js.map +1 -1
- package/dist/discovery.d.ts +0 -0
- package/dist/discovery.d.ts.map +0 -0
- package/dist/discovery.js +0 -0
- package/dist/discovery.js.map +0 -0
- package/dist/errors.d.ts +135 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +180 -0
- package/dist/errors.js.map +1 -0
- package/dist/exit-codes.d.ts +0 -0
- package/dist/exit-codes.d.ts.map +0 -0
- package/dist/exit-codes.js +0 -0
- package/dist/exit-codes.js.map +0 -0
- package/dist/hooks.d.ts +0 -0
- package/dist/hooks.d.ts.map +0 -0
- package/dist/hooks.js +0 -0
- package/dist/hooks.js.map +0 -0
- package/dist/index.d.ts +25 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +0 -0
- package/dist/install.d.ts.map +0 -0
- package/dist/install.js +0 -0
- package/dist/install.js.map +0 -0
- package/dist/lafs.d.ts +0 -0
- package/dist/lafs.d.ts.map +0 -0
- package/dist/lafs.js +0 -0
- package/dist/lafs.js.map +0 -0
- package/dist/memory.d.ts +0 -0
- package/dist/memory.d.ts.map +0 -0
- package/dist/memory.js +0 -0
- package/dist/memory.js.map +0 -0
- package/dist/operations/index.d.ts +0 -0
- package/dist/operations/index.d.ts.map +0 -0
- package/dist/operations/index.js +0 -0
- package/dist/operations/index.js.map +0 -0
- package/dist/operations/issues.d.ts +0 -0
- package/dist/operations/issues.d.ts.map +0 -0
- package/dist/operations/issues.js +0 -0
- package/dist/operations/issues.js.map +0 -0
- package/dist/operations/lifecycle.d.ts +0 -0
- package/dist/operations/lifecycle.d.ts.map +1 -1
- package/dist/operations/lifecycle.js +0 -0
- package/dist/operations/lifecycle.js.map +0 -0
- package/dist/operations/orchestrate.d.ts +0 -0
- package/dist/operations/orchestrate.d.ts.map +0 -0
- package/dist/operations/orchestrate.js +0 -0
- package/dist/operations/orchestrate.js.map +0 -0
- package/dist/operations/release.d.ts +0 -0
- package/dist/operations/release.d.ts.map +0 -0
- package/dist/operations/release.js +0 -0
- package/dist/operations/release.js.map +0 -0
- package/dist/operations/research.d.ts +0 -0
- package/dist/operations/research.d.ts.map +0 -0
- package/dist/operations/research.js +0 -0
- package/dist/operations/research.js.map +0 -0
- package/dist/operations/session.d.ts +0 -0
- package/dist/operations/session.d.ts.map +0 -0
- package/dist/operations/session.js +0 -0
- package/dist/operations/session.js.map +0 -0
- package/dist/operations/skills.d.ts +0 -0
- package/dist/operations/skills.d.ts.map +0 -0
- package/dist/operations/skills.js +0 -0
- package/dist/operations/skills.js.map +0 -0
- package/dist/operations/system.d.ts +0 -0
- package/dist/operations/system.d.ts.map +0 -0
- package/dist/operations/system.js +0 -0
- package/dist/operations/system.js.map +0 -0
- package/dist/operations/tasks.d.ts +0 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js +0 -0
- package/dist/operations/tasks.js.map +0 -0
- package/dist/operations/validate.d.ts +0 -0
- package/dist/operations/validate.d.ts.map +0 -0
- package/dist/operations/validate.js +0 -0
- package/dist/operations/validate.js.map +0 -0
- package/dist/provider-paths.d.ts +0 -0
- package/dist/provider-paths.d.ts.map +0 -0
- package/dist/provider-paths.js +0 -0
- package/dist/provider-paths.js.map +0 -0
- package/dist/results.d.ts +0 -0
- package/dist/results.d.ts.map +0 -0
- package/dist/results.js +0 -0
- package/dist/results.js.map +0 -0
- package/dist/session.d.ts +0 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +0 -0
- package/dist/session.js.map +1 -1
- package/dist/spawn-types.d.ts +0 -0
- package/dist/spawn-types.d.ts.map +0 -0
- package/dist/spawn-types.js +0 -0
- package/dist/spawn-types.js.map +0 -0
- package/dist/spawn.d.ts +2 -0
- package/dist/spawn.d.ts.map +1 -1
- package/dist/spawn.js +0 -0
- package/dist/spawn.js.map +0 -0
- package/dist/status-registry.d.ts +0 -0
- package/dist/status-registry.d.ts.map +0 -0
- package/dist/status-registry.js +0 -0
- package/dist/status-registry.js.map +0 -0
- package/dist/task-record.d.ts +0 -0
- package/dist/task-record.d.ts.map +0 -0
- package/dist/task-record.js +0 -0
- package/dist/task-record.js.map +0 -0
- package/dist/task-sync.d.ts +0 -0
- package/dist/task-sync.d.ts.map +1 -1
- package/dist/task-sync.js +0 -0
- package/dist/task-sync.js.map +0 -0
- package/dist/task.d.ts +0 -0
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +0 -0
- package/dist/task.js.map +0 -0
- package/dist/tessera.d.ts +0 -0
- package/dist/tessera.d.ts.map +0 -0
- package/dist/tessera.js +0 -0
- package/dist/tessera.js.map +0 -0
- package/dist/todowrite.d.ts +0 -0
- package/dist/todowrite.d.ts.map +0 -0
- package/dist/todowrite.js +0 -0
- package/dist/todowrite.js.map +0 -0
- package/dist/transport.d.ts +0 -0
- package/dist/transport.d.ts.map +0 -0
- package/dist/transport.js +0 -0
- package/dist/transport.js.map +0 -0
- package/dist/warp-chain.d.ts +0 -0
- package/dist/warp-chain.d.ts.map +0 -0
- package/dist/warp-chain.js +0 -0
- package/dist/warp-chain.js.map +0 -0
- package/package.json +12 -7
- package/src/adapter.ts +0 -0
- package/src/archive.ts +0 -0
- package/src/brain.ts +0 -0
- package/src/capabilities.ts +0 -0
- package/src/config.ts +0 -0
- package/src/context-monitor.ts +0 -0
- package/src/data-accessor.ts +1 -7
- package/src/discovery.ts +0 -0
- package/src/errors.ts +204 -0
- package/src/exit-codes.ts +0 -0
- package/src/hooks.ts +0 -0
- package/src/index.ts +233 -242
- package/src/install.ts +0 -0
- package/src/lafs.ts +0 -0
- package/src/memory.ts +0 -0
- package/src/operations/index.ts +0 -0
- package/src/operations/issues.ts +0 -0
- package/src/operations/lifecycle.ts +1 -0
- package/src/operations/orchestrate.ts +0 -0
- package/src/operations/release.ts +0 -0
- package/src/operations/research.ts +0 -0
- package/src/operations/session.ts +0 -0
- package/src/operations/skills.ts +0 -0
- package/src/operations/system.ts +0 -0
- package/src/operations/tasks.ts +1 -0
- package/src/operations/validate.ts +0 -0
- package/src/provider-paths.ts +0 -0
- package/src/results.ts +0 -0
- package/src/session.ts +1 -0
- package/src/spawn-types.ts +0 -0
- package/src/spawn.ts +2 -0
- package/src/status-registry.ts +0 -0
- package/src/task-record.ts +0 -0
- package/src/task-sync.ts +11 -2
- package/src/task.ts +1 -0
- package/src/tessera.ts +0 -0
- package/src/todowrite.ts +0 -0
- package/src/transport.ts +0 -0
- package/src/warp-chain.ts +0 -0
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central error utilities for CLEO.
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent error handling patterns across the codebase.
|
|
5
|
+
* DRY error formatting, normalization, and transformation utilities.
|
|
6
|
+
*
|
|
7
|
+
* @task T5702
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Normalize any thrown value into a standardized error object.
|
|
11
|
+
*
|
|
12
|
+
* Handles:
|
|
13
|
+
* - Error instances (preserves stack trace info)
|
|
14
|
+
* - Strings (wraps in Error)
|
|
15
|
+
* - Objects with message property
|
|
16
|
+
* - null/undefined (provides fallback)
|
|
17
|
+
*
|
|
18
|
+
* @param error - The thrown value to normalize
|
|
19
|
+
* @param fallbackMessage - Message to use if error provides none
|
|
20
|
+
* @returns Normalized error with consistent shape
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* try {
|
|
25
|
+
* await riskyOperation();
|
|
26
|
+
* } catch (err) {
|
|
27
|
+
* const error = normalizeError(err, 'Operation failed');
|
|
28
|
+
* console.error(error.message);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function normalizeError(error: unknown, fallbackMessage?: string): Error;
|
|
33
|
+
/**
|
|
34
|
+
* Extract a human-readable message from any error value.
|
|
35
|
+
*
|
|
36
|
+
* Safe to use on unknown thrown values without type guards.
|
|
37
|
+
*
|
|
38
|
+
* @param error - The error value
|
|
39
|
+
* @param fallback - Fallback message if extraction fails
|
|
40
|
+
* @returns The error message string
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const message = getErrorMessage(err, 'Unknown error');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function getErrorMessage(error: unknown, fallback?: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Format error details for logging or display.
|
|
50
|
+
*
|
|
51
|
+
* Includes stack trace for Error instances when includeStack is true.
|
|
52
|
+
*
|
|
53
|
+
* @param error - The error to format
|
|
54
|
+
* @param context - Optional context to prepend
|
|
55
|
+
* @param includeStack - Whether to include stack traces (default: false)
|
|
56
|
+
* @returns Formatted error string
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* console.error(formatError(err, 'Database connection'));
|
|
61
|
+
* // Output: [Database connection] Connection refused
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatError(error: unknown, context?: string, includeStack?: boolean): string;
|
|
65
|
+
/**
|
|
66
|
+
* Check if an error represents a specific error type by code or name.
|
|
67
|
+
*
|
|
68
|
+
* Useful for conditional error handling based on error types.
|
|
69
|
+
*
|
|
70
|
+
* @param error - The error to check
|
|
71
|
+
* @param codeOrName - The error code or name to match
|
|
72
|
+
* @returns True if the error matches
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* if (isErrorType(err, 'E_NOT_FOUND')) {
|
|
77
|
+
* // Handle not found specifically
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function isErrorType(error: unknown, codeOrName: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Create a standardized error result object.
|
|
84
|
+
*
|
|
85
|
+
* Common pattern for operations that return { success: boolean, error?: string }
|
|
86
|
+
*
|
|
87
|
+
* @param error - The error value
|
|
88
|
+
* @returns Error result object
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* return createErrorResult(err);
|
|
93
|
+
* // Returns: { success: false, error: "Something went wrong" }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare function createErrorResult(error: unknown): {
|
|
97
|
+
success: false;
|
|
98
|
+
error: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Create a standardized success result object.
|
|
102
|
+
*
|
|
103
|
+
* @returns Success result object
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* return createSuccessResult();
|
|
108
|
+
* // Returns: { success: true }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare function createSuccessResult(): {
|
|
112
|
+
success: true;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Type guard for error results.
|
|
116
|
+
*
|
|
117
|
+
* @param result - The result to check
|
|
118
|
+
* @returns True if the result is an error result
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const result = await someOperation();
|
|
123
|
+
* if (isErrorResult(result)) {
|
|
124
|
+
* console.error(result.error);
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
export declare function isErrorResult(result: {
|
|
129
|
+
success: boolean;
|
|
130
|
+
error?: string;
|
|
131
|
+
}): result is {
|
|
132
|
+
success: false;
|
|
133
|
+
error: string;
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,eAAe,SAAiC,GAC/C,KAAK,CAmBP;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,SAAkB,GAAG,MAAM,CAmBlF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,MAAM,CAU1F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAWvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAKnF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,IAAI;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAEvD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,IAAI;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAE9C"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central error utilities for CLEO.
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent error handling patterns across the codebase.
|
|
5
|
+
* DRY error formatting, normalization, and transformation utilities.
|
|
6
|
+
*
|
|
7
|
+
* @task T5702
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Normalize any thrown value into a standardized error object.
|
|
11
|
+
*
|
|
12
|
+
* Handles:
|
|
13
|
+
* - Error instances (preserves stack trace info)
|
|
14
|
+
* - Strings (wraps in Error)
|
|
15
|
+
* - Objects with message property
|
|
16
|
+
* - null/undefined (provides fallback)
|
|
17
|
+
*
|
|
18
|
+
* @param error - The thrown value to normalize
|
|
19
|
+
* @param fallbackMessage - Message to use if error provides none
|
|
20
|
+
* @returns Normalized error with consistent shape
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* try {
|
|
25
|
+
* await riskyOperation();
|
|
26
|
+
* } catch (err) {
|
|
27
|
+
* const error = normalizeError(err, 'Operation failed');
|
|
28
|
+
* console.error(error.message);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function normalizeError(error, fallbackMessage = 'An unexpected error occurred') {
|
|
33
|
+
if (error instanceof Error) {
|
|
34
|
+
return error;
|
|
35
|
+
}
|
|
36
|
+
if (typeof error === 'string') {
|
|
37
|
+
return new Error(error);
|
|
38
|
+
}
|
|
39
|
+
if (error !== null &&
|
|
40
|
+
typeof error === 'object' &&
|
|
41
|
+
'message' in error &&
|
|
42
|
+
typeof error.message === 'string') {
|
|
43
|
+
return new Error(error.message);
|
|
44
|
+
}
|
|
45
|
+
return new Error(fallbackMessage);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Extract a human-readable message from any error value.
|
|
49
|
+
*
|
|
50
|
+
* Safe to use on unknown thrown values without type guards.
|
|
51
|
+
*
|
|
52
|
+
* @param error - The error value
|
|
53
|
+
* @param fallback - Fallback message if extraction fails
|
|
54
|
+
* @returns The error message string
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const message = getErrorMessage(err, 'Unknown error');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function getErrorMessage(error, fallback = 'Unknown error') {
|
|
62
|
+
if (error instanceof Error) {
|
|
63
|
+
return error.message;
|
|
64
|
+
}
|
|
65
|
+
if (typeof error === 'string') {
|
|
66
|
+
return error;
|
|
67
|
+
}
|
|
68
|
+
if (error !== null &&
|
|
69
|
+
typeof error === 'object' &&
|
|
70
|
+
'message' in error &&
|
|
71
|
+
typeof error.message === 'string') {
|
|
72
|
+
return error.message;
|
|
73
|
+
}
|
|
74
|
+
return fallback;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Format error details for logging or display.
|
|
78
|
+
*
|
|
79
|
+
* Includes stack trace for Error instances when includeStack is true.
|
|
80
|
+
*
|
|
81
|
+
* @param error - The error to format
|
|
82
|
+
* @param context - Optional context to prepend
|
|
83
|
+
* @param includeStack - Whether to include stack traces (default: false)
|
|
84
|
+
* @returns Formatted error string
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* console.error(formatError(err, 'Database connection'));
|
|
89
|
+
* // Output: [Database connection] Connection refused
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export function formatError(error, context, includeStack = false) {
|
|
93
|
+
const message = getErrorMessage(error);
|
|
94
|
+
const prefix = context ? `[${context}] ` : '';
|
|
95
|
+
let result = `${prefix}${message}`;
|
|
96
|
+
if (includeStack && error instanceof Error && error.stack) {
|
|
97
|
+
result += `\n${error.stack}`;
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Check if an error represents a specific error type by code or name.
|
|
103
|
+
*
|
|
104
|
+
* Useful for conditional error handling based on error types.
|
|
105
|
+
*
|
|
106
|
+
* @param error - The error to check
|
|
107
|
+
* @param codeOrName - The error code or name to match
|
|
108
|
+
* @returns True if the error matches
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* if (isErrorType(err, 'E_NOT_FOUND')) {
|
|
113
|
+
* // Handle not found specifically
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export function isErrorType(error, codeOrName) {
|
|
118
|
+
if (error instanceof Error) {
|
|
119
|
+
if (error.name === codeOrName) {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
// Check for custom code property
|
|
123
|
+
if ('code' in error && error.code === codeOrName) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Create a standardized error result object.
|
|
131
|
+
*
|
|
132
|
+
* Common pattern for operations that return { success: boolean, error?: string }
|
|
133
|
+
*
|
|
134
|
+
* @param error - The error value
|
|
135
|
+
* @returns Error result object
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* return createErrorResult(err);
|
|
140
|
+
* // Returns: { success: false, error: "Something went wrong" }
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
export function createErrorResult(error) {
|
|
144
|
+
return {
|
|
145
|
+
success: false,
|
|
146
|
+
error: getErrorMessage(error),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create a standardized success result object.
|
|
151
|
+
*
|
|
152
|
+
* @returns Success result object
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```typescript
|
|
156
|
+
* return createSuccessResult();
|
|
157
|
+
* // Returns: { success: true }
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export function createSuccessResult() {
|
|
161
|
+
return { success: true };
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Type guard for error results.
|
|
165
|
+
*
|
|
166
|
+
* @param result - The result to check
|
|
167
|
+
* @returns True if the result is an error result
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const result = await someOperation();
|
|
172
|
+
* if (isErrorResult(result)) {
|
|
173
|
+
* console.error(result.error);
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
export function isErrorResult(result) {
|
|
178
|
+
return !result.success;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAc,EACd,eAAe,GAAG,8BAA8B;IAEhD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,IACE,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,SAAS,IAAI,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AE,UAAkB;IAC5D,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,iCAAiC;QACjC,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC;KAC9B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,MAG7B;IACC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;AACzB,CAAC"}
|
package/dist/exit-codes.d.ts
CHANGED
|
File without changes
|
package/dist/exit-codes.d.ts.map
CHANGED
|
File without changes
|
package/dist/exit-codes.js
CHANGED
|
File without changes
|
package/dist/exit-codes.js.map
CHANGED
|
File without changes
|
package/dist/hooks.d.ts
CHANGED
|
File without changes
|
package/dist/hooks.d.ts.map
CHANGED
|
File without changes
|
package/dist/hooks.js
CHANGED
|
File without changes
|
package/dist/hooks.js.map
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -5,35 +5,35 @@
|
|
|
5
5
|
* All domain types (Task, Session, DataAccessor, etc.) are defined here.
|
|
6
6
|
* Implementation packages (@cleocode/core, @cleocode/cleo) import from here.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
export type {
|
|
10
|
-
export {
|
|
11
|
-
export type { SessionScope, SessionStats, SessionTaskWork, Session, } from './session.js';
|
|
12
|
-
export { ExitCode, isErrorCode, isSuccessCode, isNoChangeCode, isRecoverableCode, getExitCodeName, } from './exit-codes.js';
|
|
13
|
-
export type { OutputFormat, DateFormat, OutputConfig, BackupConfig, EnforcementProfile, HierarchyConfig, SessionConfig, LogLevel, LoggingConfig, LifecycleEnforcementMode, LifecycleConfig, SharingMode, SharingConfig, SignalDockMode, SignalDockConfig, CleoConfig, ConfigSource, ResolvedValue, } from './config.js';
|
|
14
|
-
export { isLafsSuccess, isLafsError, isGatewayEnvelope, } from './lafs.js';
|
|
15
|
-
export type { LAFSErrorCategory, LAFSError, Warning, LAFSTransport, MVILevel, LAFSPageNone, LAFSPageOffset, LAFSPage, LAFSMeta, LAFSEnvelope, FlagInput, ConformanceReport, LafsAlternative, LafsErrorDetail, LafsSuccess, LafsError, LafsEnvelope, GatewayMeta, GatewaySuccess, GatewayError, GatewayEnvelope, CleoResponse, } from './lafs.js';
|
|
16
|
-
export type { ArchiveFields, ArchiveFile, TaskQueryFilters, QueryTasksResult, TaskFieldUpdates, TransactionAccessor, DataAccessor, } from './data-accessor.js';
|
|
17
|
-
export type { CLEOProviderAdapter, AdapterHealthStatus } from './adapter.js';
|
|
8
|
+
export type { AdapterHealthStatus, CLEOProviderAdapter } from './adapter.js';
|
|
9
|
+
export type { ArchiveCycleTimesReport, ArchiveDailyTrend, ArchivedTask, ArchiveLabelEntry, ArchiveMetadata, ArchiveMonthlyTrend, ArchivePhaseEntry, ArchivePriorityEntry, ArchiveReportType, ArchiveStatsEnvelope, ArchiveSummaryReport, ArchiveTrendsReport, CycleTimeDistribution, CycleTimePercentiles, } from './archive.js';
|
|
10
|
+
export type { BrainEntryRef, BrainEntrySummary, ContradictionDetail, SupersededEntry, } from './brain.js';
|
|
18
11
|
export type { AdapterCapabilities } from './capabilities.js';
|
|
12
|
+
export type { BackupConfig, CleoConfig, ConfigSource, DateFormat, EnforcementProfile, HierarchyConfig, LifecycleConfig, LifecycleEnforcementMode, LoggingConfig, LogLevel, OutputConfig, OutputFormat, ResolvedValue, SessionConfig, SharingConfig, SharingMode, SignalDockConfig, SignalDockMode, } from './config.js';
|
|
13
|
+
export type { AdapterContextMonitorProvider } from './context-monitor.js';
|
|
14
|
+
export type { ArchiveFields, ArchiveFile, DataAccessor, QueryTasksResult, TaskFieldUpdates, TaskQueryFilters, TransactionAccessor, } from './data-accessor.js';
|
|
19
15
|
export type { AdapterManifest, DetectionPattern } from './discovery.js';
|
|
16
|
+
export { createErrorResult, createSuccessResult, formatError, getErrorMessage, isErrorResult, isErrorType, normalizeError, } from './errors.js';
|
|
17
|
+
export { ExitCode, getExitCodeName, isErrorCode, isNoChangeCode, isRecoverableCode, isSuccessCode, } from './exit-codes.js';
|
|
20
18
|
export type { AdapterHookProvider } from './hooks.js';
|
|
21
19
|
export type { AdapterInstallProvider, InstallOptions, InstallResult } from './install.js';
|
|
22
|
-
export type {
|
|
23
|
-
export
|
|
24
|
-
export type {
|
|
25
|
-
export type { AdapterContextMonitorProvider } from './context-monitor.js';
|
|
26
|
-
export type { AdapterTransportProvider } from './transport.js';
|
|
27
|
-
export type { Provider, CAAMPSpawnOptions, CAAMPSpawnResult, CLEOSpawnContext, CLEOSpawnResult, CLEOSpawnAdapter, TokenResolution, SpawnStatus, } from './spawn-types.js';
|
|
28
|
-
export type { ProtocolType, GateName, WarpStage, WarpLink, ChainShape, GateCheck, GateContract, WarpChain, ChainValidation, WarpChainInstance, GateResult, WarpChainExecution, } from './warp-chain.js';
|
|
29
|
-
export type { TesseraVariable, TesseraTemplate, TesseraInstantiationInput, } from './tessera.js';
|
|
30
|
-
export type { ArchiveMetadata, ArchivedTask, ArchiveReportType, ArchiveSummaryReport, ArchivePhaseEntry, ArchiveLabelEntry, ArchivePriorityEntry, CycleTimeDistribution, CycleTimePercentiles, ArchiveCycleTimesReport, ArchiveDailyTrend, ArchiveMonthlyTrend, ArchiveTrendsReport, ArchiveStatsEnvelope, } from './archive.js';
|
|
31
|
-
export type { TodoWriteItemStatus, TodoWriteItem, TodoWriteState, TodoWriteSyncSessionState, TodoWriteChangeSet, TodoWriteChangeAction, TodoWriteChange, TodoWriteMergeResult, } from './todowrite.js';
|
|
32
|
-
export type { ExternalTaskStatus, ExternalTask, SyncSessionState, ConflictPolicy, ReconcileOptions, ReconcileActionType, ReconcileAction, ReconcileResult, AdapterTaskSyncProvider, } from './task-sync.js';
|
|
33
|
-
export type { TaskSummary, LabelCount, DashboardResult, StatsCurrentState, StatsCompletionMetrics, StatsActivityMetrics, StatsAllTime, StatsCycleTimes, StatsResult, LogQueryResult, ContextResult, SequenceResult, TaskRef, TaskRefPriority, LeveragedTask, BottleneckTask, TaskAnalysisResult, TaskDepsResult, CompleteTaskUnblocked, } from './results.js';
|
|
34
|
-
export type { BrainEntryRef, BrainEntrySummary, ContradictionDetail, SupersededEntry, } from './brain.js';
|
|
35
|
-
export type { TaskRecordRelation, ValidationHistoryEntry, TaskRecord, MinimalTaskRecord, } from './task-record.js';
|
|
36
|
-
export type { SessionStartResult } from './session.js';
|
|
20
|
+
export type { CleoResponse, ConformanceReport, FlagInput, GatewayEnvelope, GatewayError, GatewayMeta, GatewaySuccess, LAFSEnvelope, LAFSError, LAFSErrorCategory, LAFSMeta, LAFSPage, LAFSPageNone, LAFSPageOffset, LAFSTransport, LafsAlternative, LafsEnvelope, LafsError, LafsErrorDetail, LafsSuccess, MVILevel, Warning, } from './lafs.js';
|
|
21
|
+
export { isGatewayEnvelope, isLafsError, isLafsSuccess, } from './lafs.js';
|
|
22
|
+
export type { BridgeDecision, BridgeLearning, BridgeObservation, BridgePattern, MemoryBridgeConfig, MemoryBridgeContent, SessionSummary, } from './memory.js';
|
|
37
23
|
export * as ops from './operations/index.js';
|
|
38
24
|
export type { BrainState } from './operations/orchestrate.js';
|
|
25
|
+
export type { AdapterPathProvider } from './provider-paths.js';
|
|
26
|
+
export type { BottleneckTask, CompleteTaskUnblocked, ContextResult, DashboardResult, LabelCount, LeveragedTask, LogQueryResult, SequenceResult, StatsActivityMetrics, StatsAllTime, StatsCompletionMetrics, StatsCurrentState, StatsCycleTimes, StatsResult, TaskAnalysisResult, TaskDepsResult, TaskRef, TaskRefPriority, TaskSummary, } from './results.js';
|
|
27
|
+
export type { Session, SessionScope, SessionStartResult, SessionStats, SessionTaskWork, } from './session.js';
|
|
28
|
+
export { SessionView } from './session.js';
|
|
29
|
+
export type { AdapterSpawnProvider, SpawnContext, SpawnResult } from './spawn.js';
|
|
30
|
+
export type { CAAMPSpawnOptions, CAAMPSpawnResult, CLEOSpawnAdapter, CLEOSpawnContext, CLEOSpawnResult, Provider, SpawnStatus, TokenResolution, } from './spawn-types.js';
|
|
31
|
+
export { ADR_STATUSES, type AdrStatus, type EntityType, GATE_STATUSES, type GateStatus, isValidStatus, LIFECYCLE_PIPELINE_STATUSES, LIFECYCLE_STAGE_STATUSES, MANIFEST_STATUSES, type ManifestStatus, PIPELINE_STATUS_ICONS, type PipelineStatus, SESSION_STATUSES, type SessionStatus, STAGE_STATUS_ICONS, STATUS_REGISTRY, type StageStatus, TASK_STATUS_SYMBOLS_ASCII, TASK_STATUS_SYMBOLS_UNICODE, TASK_STATUSES, type TaskStatus, TERMINAL_PIPELINE_STATUSES, TERMINAL_STAGE_STATUSES, TERMINAL_TASK_STATUSES, } from './status-registry.js';
|
|
32
|
+
export type { CancelledTask, CompletedTask, EpicLifecycle, FileMeta, Phase, PhaseStatus, PhaseTransition, ProjectMeta, Release, ReleaseStatus, SessionNote, Task, TaskCreate, TaskFile, TaskOrigin, TaskPriority, TaskProvenance, TaskRelation, TaskSize, TaskType, TaskVerification, TaskWorkState, VerificationAgent, VerificationFailure, VerificationGate, } from './task.js';
|
|
33
|
+
export type { MinimalTaskRecord, TaskRecord, TaskRecordRelation, ValidationHistoryEntry, } from './task-record.js';
|
|
34
|
+
export type { AdapterTaskSyncProvider, ConflictPolicy, ExternalTask, ExternalTaskStatus, ReconcileAction, ReconcileActionType, ReconcileOptions, ReconcileResult, SyncSessionState, } from './task-sync.js';
|
|
35
|
+
export type { TesseraInstantiationInput, TesseraTemplate, TesseraVariable, } from './tessera.js';
|
|
36
|
+
export type { TodoWriteChange, TodoWriteChangeAction, TodoWriteChangeSet, TodoWriteItem, TodoWriteItemStatus, TodoWriteMergeResult, TodoWriteState, TodoWriteSyncSessionState, } from './todowrite.js';
|
|
37
|
+
export type { AdapterTransportProvider } from './transport.js';
|
|
38
|
+
export type { ChainShape, ChainValidation, GateCheck, GateContract, GateName, GateResult, ProtocolType, WarpChain, WarpChainExecution, WarpChainInstance, WarpLink, WarpStage, } from './warp-chain.js';
|
|
39
39
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7E,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,YAAY,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,YAAY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O,EACP,aAAa,EACb,WAAW,EACX,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,YAAY,EACV,UAAU,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,SAAS,GACV,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,20 +5,22 @@
|
|
|
5
5
|
* All domain types (Task, Session, DataAccessor, etc.) are defined here.
|
|
6
6
|
* Implementation packages (@cleocode/core, @cleocode/cleo) import from here.
|
|
7
7
|
*/
|
|
8
|
-
// ===
|
|
9
|
-
export {
|
|
10
|
-
// Constants
|
|
11
|
-
TASK_STATUSES, SESSION_STATUSES, LIFECYCLE_PIPELINE_STATUSES, LIFECYCLE_STAGE_STATUSES, ADR_STATUSES, GATE_STATUSES, MANIFEST_STATUSES,
|
|
12
|
-
// Terminal state sets
|
|
13
|
-
TERMINAL_TASK_STATUSES, TERMINAL_PIPELINE_STATUSES, TERMINAL_STAGE_STATUSES, STATUS_REGISTRY, isValidStatus,
|
|
14
|
-
// Display icons
|
|
15
|
-
PIPELINE_STATUS_ICONS, STAGE_STATUS_ICONS, TASK_STATUS_SYMBOLS_UNICODE, TASK_STATUS_SYMBOLS_ASCII, } from './status-registry.js';
|
|
16
|
-
// === Session Types ===
|
|
17
|
-
export { SessionView } from './session.js';
|
|
8
|
+
// === Error Utilities ===
|
|
9
|
+
export { createErrorResult, createSuccessResult, formatError, getErrorMessage, isErrorResult, isErrorType, normalizeError, } from './errors.js';
|
|
18
10
|
// === Exit Codes ===
|
|
19
|
-
export { ExitCode,
|
|
11
|
+
export { ExitCode, getExitCodeName, isErrorCode, isNoChangeCode, isRecoverableCode, isSuccessCode, } from './exit-codes.js';
|
|
20
12
|
// === LAFS Envelope Types ===
|
|
21
|
-
export {
|
|
13
|
+
export { isGatewayEnvelope, isLafsError, isLafsSuccess, } from './lafs.js';
|
|
22
14
|
// === Operations Types (API wire format, namespaced to avoid collision with domain types) ===
|
|
23
15
|
export * as ops from './operations/index.js';
|
|
16
|
+
// === Session Types ===
|
|
17
|
+
export { SessionView } from './session.js';
|
|
18
|
+
// === Status Registry (MUST be first — everything depends on this) ===
|
|
19
|
+
export { ADR_STATUSES, GATE_STATUSES, isValidStatus, LIFECYCLE_PIPELINE_STATUSES, LIFECYCLE_STAGE_STATUSES, MANIFEST_STATUSES,
|
|
20
|
+
// Display icons
|
|
21
|
+
PIPELINE_STATUS_ICONS, SESSION_STATUSES, STAGE_STATUS_ICONS, STATUS_REGISTRY, TASK_STATUS_SYMBOLS_ASCII, TASK_STATUS_SYMBOLS_UNICODE,
|
|
22
|
+
// Constants
|
|
23
|
+
TASK_STATUSES, TERMINAL_PIPELINE_STATUSES, TERMINAL_STAGE_STATUSES,
|
|
24
|
+
// Terminal state sets
|
|
25
|
+
TERMINAL_TASK_STATUSES, } from './status-registry.js';
|
|
24
26
|
//# 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;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8DH,0BAA0B;AAC1B,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,qBAAqB;AACrB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,iBAAiB,CAAC;AA2BzB,8BAA8B;AAC9B,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,WAAW,CAAC;AAUnB,8FAA8F;AAC9F,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAkC7C,wBAAwB;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAa3C,uEAAuE;AACvE,OAAO,EACL,YAAY,EAIZ,aAAa,EAEb,aAAa,EACb,2BAA2B,EAC3B,wBAAwB,EACxB,iBAAiB;AAEjB,gBAAgB;AAChB,qBAAqB,EAErB,gBAAgB,EAEhB,kBAAkB,EAClB,eAAe,EAEf,yBAAyB,EACzB,2BAA2B;AAC3B,YAAY;AACZ,aAAa,EAGb,0BAA0B,EAC1B,uBAAuB;AACvB,sBAAsB;AACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
|
package/dist/install.d.ts
CHANGED
|
File without changes
|
package/dist/install.d.ts.map
CHANGED
|
File without changes
|
package/dist/install.js
CHANGED
|
File without changes
|
package/dist/install.js.map
CHANGED
|
File without changes
|
package/dist/lafs.d.ts
CHANGED
|
File without changes
|
package/dist/lafs.d.ts.map
CHANGED
|
File without changes
|
package/dist/lafs.js
CHANGED
|
File without changes
|
package/dist/lafs.js.map
CHANGED
|
File without changes
|
package/dist/memory.d.ts
CHANGED
|
File without changes
|
package/dist/memory.d.ts.map
CHANGED
|
File without changes
|
package/dist/memory.js
CHANGED
|
File without changes
|
package/dist/memory.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/operations/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/operations/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/operations/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,WAAW,GACX,uBAAuB,GACvB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,YAAY,GACZ,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WA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,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|