modality-kit 0.2.0 → 0.2.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.
package/dist/index.js CHANGED
@@ -226,9 +226,12 @@ var getLoggerInstance = ModalityLogger.getInstance.bind(ModalityLogger);
226
226
  var logger = getLoggerInstance("General Error");
227
227
 
228
228
  class ErrorCode extends Error {
229
- constructor(message) {
229
+ constructor(message, originalError) {
230
230
  super(message);
231
231
  this.name = this.constructor.name;
232
+ if (originalError) {
233
+ this.cause = originalError;
234
+ }
232
235
  }
233
236
  }
234
237
  function withErrorHandling(fn, operation) {
@@ -4274,7 +4277,7 @@ var rangeSchema = exports_external.object({
4274
4277
  var fileEntrySchema = exports_external.object({
4275
4278
  path: exports_external.string().describe("Relative path from workspace root"),
4276
4279
  type: exports_external.enum(["file", "directory"]).describe("Entry type"),
4277
- lastModified: exports_external.number().describe("Last modified timestamp in milliseconds since epoch")
4280
+ lastModified: exports_external.number().optional().nullable().describe("Last modified timestamp in milliseconds since epoch")
4278
4281
  });
4279
4282
  export {
4280
4283
  withErrorHandling,
@@ -85,15 +85,15 @@ export interface VSCodeSymbol extends SymbolBase {
85
85
  declare const fileEntrySchema: z.ZodObject<{
86
86
  path: z.ZodString;
87
87
  type: z.ZodEnum<["file", "directory"]>;
88
- lastModified: z.ZodNumber;
88
+ lastModified: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  type: "file" | "directory";
91
91
  path: string;
92
- lastModified: number;
92
+ lastModified?: number | null | undefined;
93
93
  }, {
94
94
  type: "file" | "directory";
95
95
  path: string;
96
- lastModified: number;
96
+ lastModified?: number | null | undefined;
97
97
  }>;
98
98
  export type FileEntryType = z.infer<typeof fileEntrySchema>;
99
99
  export {};
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare abstract class ErrorCode extends Error {
5
5
  abstract readonly code: string;
6
- constructor(message: string);
6
+ constructor(message: string, originalError?: Error);
7
7
  }
8
8
  /**
9
9
  * Wrapper for any functions that adds consistent error handling
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.0",
2
+ "version": "0.2.2",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",