@lssm/lib.files 0.0.0-canary-20251219202229 → 0.0.0-canary-20251220002821

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 (64) hide show
  1. package/README.md +1 -0
  2. package/dist/contracts/dist/capabilities/openbanking.js.map +1 -1
  3. package/dist/contracts/dist/contract-registry/schemas.js.map +1 -1
  4. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -1
  5. package/dist/contracts/dist/docs/meta.docs.js.map +1 -1
  6. package/dist/contracts/dist/docs/presentations.js.map +1 -1
  7. package/dist/contracts/dist/docs/registry.js.map +1 -1
  8. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -1
  9. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -1
  10. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -1
  11. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -1
  12. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -1
  13. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -1
  14. package/dist/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -1
  15. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -1
  16. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -1
  17. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -1
  18. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -1
  19. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -1
  20. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -1
  21. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -1
  22. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -1
  23. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -1
  24. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -1
  25. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -1
  26. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -1
  27. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -1
  28. package/dist/contracts/dist/docs/tech-contracts.docs.js.map +1 -1
  29. package/dist/contracts/dist/events.js.map +1 -1
  30. package/dist/contracts/dist/integrations/contracts.js.map +1 -1
  31. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
  32. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
  33. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
  34. package/dist/contracts/dist/integrations/openbanking/models.js.map +1 -1
  35. package/dist/contracts/dist/integrations/openbanking/telemetry.js.map +1 -1
  36. package/dist/contracts/dist/integrations/providers/elevenlabs.js.map +1 -1
  37. package/dist/contracts/dist/integrations/providers/gcs-storage.js.map +1 -1
  38. package/dist/contracts/dist/integrations/providers/gmail.js.map +1 -1
  39. package/dist/contracts/dist/integrations/providers/google-calendar.js.map +1 -1
  40. package/dist/contracts/dist/integrations/providers/mistral.js.map +1 -1
  41. package/dist/contracts/dist/integrations/providers/postmark.js.map +1 -1
  42. package/dist/contracts/dist/integrations/providers/powens.js.map +1 -1
  43. package/dist/contracts/dist/integrations/providers/qdrant.js.map +1 -1
  44. package/dist/contracts/dist/integrations/providers/stripe.js.map +1 -1
  45. package/dist/contracts/dist/integrations/providers/twilio-sms.js.map +1 -1
  46. package/dist/contracts/dist/knowledge/contracts.js.map +1 -1
  47. package/dist/contracts/dist/knowledge/spaces/email-threads.js.map +1 -1
  48. package/dist/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -1
  49. package/dist/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -1
  50. package/dist/contracts/dist/knowledge/spaces/product-canon.js.map +1 -1
  51. package/dist/contracts/dist/knowledge/spaces/support-faq.js.map +1 -1
  52. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -1
  53. package/dist/contracts/dist/llm/exporters.js.map +1 -1
  54. package/dist/contracts/dist/onboarding-base.js.map +1 -1
  55. package/dist/contracts/dist/ownership.js.map +1 -1
  56. package/dist/contracts/dist/presentations.v2.js.map +1 -1
  57. package/dist/contracts/dist/regenerator/service.js.map +1 -1
  58. package/dist/contracts/dist/schema/dist/index.js.map +1 -1
  59. package/dist/contracts/dist/spec.js.map +1 -1
  60. package/dist/storage/index.d.ts +9 -9
  61. package/dist/storage/index.d.ts.map +1 -1
  62. package/dist/storage/index.js +9 -9
  63. package/dist/storage/index.js.map +1 -1
  64. package/package.json +13 -7
@@ -1 +1 @@
1
- {"version":3,"file":"spec.js","names":[],"sources":["../../../../contracts/dist/spec.js"],"sourcesContent":["//#region src/spec.ts\nconst isEmitDeclRef = (e) => \"ref\" in e;\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery, isEmitDeclRef };\n//# sourceMappingURL=spec.js.map"],"mappings":";;;;;AAMA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
1
+ {"version":3,"file":"spec.js","names":[],"sources":["../../../../contracts/dist/spec.js"],"sourcesContent":["//#region src/spec.ts\nconst isEmitDeclRef = (e) => \"ref\" in e;\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery, isEmitDeclRef };"],"mappings":";;;;;AAMA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
@@ -158,16 +158,16 @@ declare class S3StorageAdapter implements StorageAdapter {
158
158
  readonly provider: StorageProvider;
159
159
  private config;
160
160
  constructor(options: S3StorageOptions);
161
- upload(options: UploadOptions): Promise<StorageFile>;
162
- download(filePath: string): Promise<Buffer>;
163
- delete(filePath: string): Promise<void>;
164
- exists(filePath: string): Promise<boolean>;
165
- getMetadata(filePath: string): Promise<StorageFile | null>;
166
- list(options?: ListOptions): Promise<ListResult>;
167
- createPresignedUpload(options: PresignedUploadOptions): Promise<PresignedUrl>;
168
- createPresignedDownload(options: PresignedDownloadOptions): Promise<PresignedUrl>;
161
+ upload(_options: UploadOptions): Promise<StorageFile>;
162
+ download(_filePath: string): Promise<Buffer>;
163
+ delete(_filePath: string): Promise<void>;
164
+ exists(_filePath: string): Promise<boolean>;
165
+ getMetadata(_filePath: string): Promise<StorageFile | null>;
166
+ list(_options?: ListOptions): Promise<ListResult>;
167
+ createPresignedUpload(_options: PresignedUploadOptions): Promise<PresignedUrl>;
168
+ createPresignedDownload(_options: PresignedDownloadOptions): Promise<PresignedUrl>;
169
169
  getPublicUrl(filePath: string): string | null;
170
- copy(sourcePath: string, destinationPath: string): Promise<StorageFile>;
170
+ copy(_sourcePath: string, _destinationPath: string): Promise<StorageFile>;
171
171
  }
172
172
  /**
173
173
  * In-memory storage adapter for testing.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/storage/index.ts"],"sourcesContent":[],"mappings":";;AAMA;AAEA;AASiB,KAXL,eAAA,GAWkB,OAInB,GAIE,IAAA,GAAM,KAAA,GAAA,OAAA,GAAA,YAAA;AAKF,UAtBA,WAAA,CAsBsB;EAatB,IAAA,EAAA,MAAA;EASA,IAAA,EAAA,MAAA;EAMA,QAAA,EAAA,MAAW;EASX,QAAA,CAAA,EAAA,MAAU;EAQV,IAAA,CAAA,EAAA,MAAA;EAEI,QAAA,CAAA,EA/DR,MA+DQ,CAAA,MAAA,EAAA,MAAA,CAAA;;AAKqB,UAjEzB,aAAA,CAiEyB;EAAR;EAKA,IAAA,EAAA,MAAA;EAAR;EAKF,OAAA,EAvEb,MAuEa,GAAA,MAAA;EAKA;EAKa,QAAA,EAAA,MAAA;EAAR;EAKZ,QAAA,CAAA,EAlFJ,MAkFI,CAAA,MAAA,EAAA,MAAA,CAAA;EAA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,CAAA,UAAA,EAAA,MAAA,EAAA,eAAA,EAAA,MAAA,CAAA,EA/XwC,OA+XxC,CA/XgD,WA+XhD,CAAA;;AA1FkC,UA5R9B,mBAAA,CA4R8B;EAAc;EAgH5C,QAAA,EAAA,MAAa;EAClB;EACF,OAAA,CAAA,EAAA,MAAA;;;AAOV;;;cA1Ya,mBAAA,YAA+B;qBACvB;;;uBAIE;kBAKC,gBAAgB,QAAQ;8BA2BZ,QAAQ;4BAKV;4BAKA;iCAUK,QAAQ;iBAcxB,cAAc,QAAQ;iCAkChC,yBACR,QAAQ;mCAmBA,2BACR,QAAQ;;qDAoBR,QAAQ;;UAmBI,gBAAA;;;;;;;;;;;;;;;;;;;;;;;cAwBJ,gBAAA,YAA4B;qBACpB;;uBAGE;mBAIE,gBAAgB,QAAQ;+BAOZ,QAAQ;6BAMV;6BAMA;kCAMK,QAAQ;kBAMxB,cAAc,QAAQ;kCAOhC,yBACT,QAAQ;oCAOC,2BACT,QAAQ;;uDAiBR,QAAQ;;;;;cAYA,sBAAA,YAAkC;qBAC1B;;kBAGG,gBAAgB,QAAQ;8BAoBZ,QAAQ;4BAQV;4BAIA;iCAIK,QAAQ;iBAKxB,cAAc,QAAQ;iCAkBhC,yBACR,QAAQ;mCAUA,2BACR,QAAQ;;qDAeR,QAAQ;;;UAsBI,aAAA;YACL;UACF;OACH;;;;;iBAMS,oBAAA,SAA6B,gBAAgB"}
@@ -135,28 +135,28 @@ var S3StorageAdapter = class {
135
135
  constructor(options) {
136
136
  this.config = options;
137
137
  }
138
- async upload(options) {
138
+ async upload(_options) {
139
139
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the upload method.");
140
140
  }
141
- async download(filePath) {
141
+ async download(_filePath) {
142
142
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the download method.");
143
143
  }
144
- async delete(filePath) {
144
+ async delete(_filePath) {
145
145
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the delete method.");
146
146
  }
147
- async exists(filePath) {
147
+ async exists(_filePath) {
148
148
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the exists method.");
149
149
  }
150
- async getMetadata(filePath) {
150
+ async getMetadata(_filePath) {
151
151
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the getMetadata method.");
152
152
  }
153
- async list(options) {
153
+ async list(_options) {
154
154
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the list method.");
155
155
  }
156
- async createPresignedUpload(options) {
156
+ async createPresignedUpload(_options) {
157
157
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedUpload method.");
158
158
  }
159
- async createPresignedDownload(options) {
159
+ async createPresignedDownload(_options) {
160
160
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedDownload method.");
161
161
  }
162
162
  getPublicUrl(filePath) {
@@ -164,7 +164,7 @@ var S3StorageAdapter = class {
164
164
  if (endpoint) return `${endpoint}/${bucket}/${filePath}`;
165
165
  return `https://${bucket}.s3.${region}.amazonaws.com/${filePath}`;
166
166
  }
167
- async copy(sourcePath, destinationPath) {
167
+ async copy(_sourcePath, _destinationPath) {
168
168
  throw new Error("S3 adapter requires @aws-sdk/client-s3. Install it and implement the copy method.");
169
169
  }
170
170
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["files: StorageFile[]","metadata: StorageFile","path"],"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * File storage adapters for different backends.\n */\n\n// ============ Types ============\n\nexport type StorageProvider = 'LOCAL' | 'S3' | 'GCS' | 'AZURE' | 'CLOUDFLARE';\n\nexport interface StorageFile {\n path: string;\n size: number;\n mimeType: string;\n checksum?: string;\n etag?: string;\n metadata?: Record<string, string>;\n}\n\nexport interface UploadOptions {\n /** Target path in storage */\n path: string;\n /** File content */\n content: Buffer | string;\n /** MIME type */\n mimeType: string;\n /** Additional metadata */\n metadata?: Record<string, string>;\n /** Whether file should be publicly accessible */\n isPublic?: boolean;\n}\n\nexport interface PresignedUploadOptions {\n /** Target path in storage */\n path: string;\n /** MIME type */\n mimeType: string;\n /** File size in bytes */\n size: number;\n /** Expiration time in seconds */\n expiresIn?: number;\n /** Additional conditions */\n conditions?: Record<string, unknown>[];\n}\n\nexport interface PresignedDownloadOptions {\n /** File path in storage */\n path: string;\n /** Expiration time in seconds */\n expiresIn?: number;\n /** Response content disposition */\n contentDisposition?: string;\n}\n\nexport interface PresignedUrl {\n url: string;\n fields?: Record<string, string>;\n expiresAt: Date;\n}\n\nexport interface ListOptions {\n /** Path prefix */\n prefix?: string;\n /** Maximum results */\n limit?: number;\n /** Continuation token */\n cursor?: string;\n}\n\nexport interface ListResult {\n files: StorageFile[];\n cursor?: string;\n hasMore: boolean;\n}\n\n// ============ Storage Adapter Interface ============\n\nexport interface StorageAdapter {\n /** Storage provider type */\n readonly provider: StorageProvider;\n\n /**\n * Upload a file to storage.\n */\n upload(options: UploadOptions): Promise<StorageFile>;\n\n /**\n * Download a file from storage.\n */\n download(path: string): Promise<Buffer>;\n\n /**\n * Delete a file from storage.\n */\n delete(path: string): Promise<void>;\n\n /**\n * Check if a file exists.\n */\n exists(path: string): Promise<boolean>;\n\n /**\n * Get file metadata.\n */\n getMetadata(path: string): Promise<StorageFile | null>;\n\n /**\n * List files in a directory.\n */\n list(options?: ListOptions): Promise<ListResult>;\n\n /**\n * Generate a presigned URL for uploading.\n */\n createPresignedUpload(options: PresignedUploadOptions): Promise<PresignedUrl>;\n\n /**\n * Generate a presigned URL for downloading.\n */\n createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl>;\n\n /**\n * Get public URL for a file (if applicable).\n */\n getPublicUrl(path: string): string | null;\n\n /**\n * Copy a file within storage.\n */\n copy(sourcePath: string, destinationPath: string): Promise<StorageFile>;\n}\n\n// ============ Local Storage Adapter ============\n\nimport * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport * as crypto from 'node:crypto';\n\nexport interface LocalStorageOptions {\n /** Base directory for file storage */\n basePath: string;\n /** Base URL for serving files (optional) */\n baseUrl?: string;\n}\n\n/**\n * Local filesystem storage adapter.\n * For development and testing purposes.\n */\nexport class LocalStorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'LOCAL';\n private basePath: string;\n private baseUrl?: string;\n\n constructor(options: LocalStorageOptions) {\n this.basePath = options.basePath;\n this.baseUrl = options.baseUrl;\n }\n\n async upload(options: UploadOptions): Promise<StorageFile> {\n const fullPath = path.join(this.basePath, options.path);\n const dir = path.dirname(fullPath);\n\n // Ensure directory exists\n await fs.mkdir(dir, { recursive: true });\n\n // Write file\n const content =\n typeof options.content === 'string'\n ? Buffer.from(options.content, 'base64')\n : options.content;\n\n await fs.writeFile(fullPath, content);\n\n // Calculate checksum\n const checksum = crypto.createHash('sha256').update(content).digest('hex');\n\n return {\n path: options.path,\n size: content.length,\n mimeType: options.mimeType,\n checksum,\n metadata: options.metadata,\n };\n }\n\n async download(filePath: string): Promise<Buffer> {\n const fullPath = path.join(this.basePath, filePath);\n return fs.readFile(fullPath);\n }\n\n async delete(filePath: string): Promise<void> {\n const fullPath = path.join(this.basePath, filePath);\n await fs.unlink(fullPath);\n }\n\n async exists(filePath: string): Promise<boolean> {\n const fullPath = path.join(this.basePath, filePath);\n try {\n await fs.access(fullPath);\n return true;\n } catch {\n return false;\n }\n }\n\n async getMetadata(filePath: string): Promise<StorageFile | null> {\n const fullPath = path.join(this.basePath, filePath);\n try {\n const stat = await fs.stat(fullPath);\n return {\n path: filePath,\n size: stat.size,\n mimeType: 'application/octet-stream', // Would need mime type detection\n };\n } catch {\n return null;\n }\n }\n\n async list(options?: ListOptions): Promise<ListResult> {\n const dir = options?.prefix\n ? path.join(this.basePath, options.prefix)\n : this.basePath;\n\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n const files: StorageFile[] = [];\n\n for (const entry of entries) {\n if (entry.isFile()) {\n const filePath = options?.prefix\n ? path.join(options.prefix, entry.name)\n : entry.name;\n const stat = await fs.stat(path.join(dir, entry.name));\n files.push({\n path: filePath,\n size: stat.size,\n mimeType: 'application/octet-stream',\n });\n }\n }\n\n const limit = options?.limit || files.length;\n return {\n files: files.slice(0, limit),\n hasMore: files.length > limit,\n };\n } catch {\n return { files: [], hasMore: false };\n }\n }\n\n async createPresignedUpload(\n options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n // Local storage doesn't support real presigned URLs\n // Return a placeholder that would work with a local upload endpoint\n const expiresIn = options.expiresIn || 3600;\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n return {\n url: this.baseUrl\n ? `${this.baseUrl}/upload?path=${encodeURIComponent(options.path)}`\n : `/upload?path=${encodeURIComponent(options.path)}`,\n fields: {\n path: options.path,\n mimeType: options.mimeType,\n },\n expiresAt,\n };\n }\n\n async createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n const expiresIn = options.expiresIn || 3600;\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n return {\n url: this.baseUrl\n ? `${this.baseUrl}/download/${options.path}`\n : `/download/${options.path}`,\n expiresAt,\n };\n }\n\n getPublicUrl(filePath: string): string | null {\n if (!this.baseUrl) return null;\n return `${this.baseUrl}/${filePath}`;\n }\n\n async copy(\n sourcePath: string,\n destinationPath: string\n ): Promise<StorageFile> {\n const sourceFullPath = path.join(this.basePath, sourcePath);\n const destFullPath = path.join(this.basePath, destinationPath);\n const destDir = path.dirname(destFullPath);\n\n await fs.mkdir(destDir, { recursive: true });\n await fs.copyFile(sourceFullPath, destFullPath);\n\n const stat = await fs.stat(destFullPath);\n return {\n path: destinationPath,\n size: stat.size,\n mimeType: 'application/octet-stream',\n };\n }\n}\n\n// ============ S3 Storage Adapter Interface ============\n\nexport interface S3StorageOptions {\n /** S3 bucket name */\n bucket: string;\n /** AWS region */\n region: string;\n /** AWS access key ID */\n accessKeyId?: string;\n /** AWS secret access key */\n secretAccessKey?: string;\n /** Endpoint URL (for S3-compatible services) */\n endpoint?: string;\n /** Force path style (for S3-compatible services) */\n forcePathStyle?: boolean;\n /** Default ACL for uploads */\n defaultAcl?: 'private' | 'public-read';\n}\n\n/**\n * S3 storage adapter interface.\n * Implementation would use AWS SDK or compatible client.\n *\n * This is a placeholder that defines the interface.\n * Actual implementation would require @aws-sdk/client-s3 dependency.\n */\nexport class S3StorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'S3';\n private config: S3StorageOptions;\n\n constructor(options: S3StorageOptions) {\n this.config = options;\n }\n\n async upload(options: UploadOptions): Promise<StorageFile> {\n // Placeholder - actual implementation would use S3 SDK\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the upload method.'\n );\n }\n\n async download(filePath: string): Promise<Buffer> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the download method.'\n );\n }\n\n async delete(filePath: string): Promise<void> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the delete method.'\n );\n }\n\n async exists(filePath: string): Promise<boolean> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the exists method.'\n );\n }\n\n async getMetadata(filePath: string): Promise<StorageFile | null> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the getMetadata method.'\n );\n }\n\n async list(options?: ListOptions): Promise<ListResult> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the list method.'\n );\n }\n\n async createPresignedUpload(\n options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedUpload method.'\n );\n }\n\n async createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedDownload method.'\n );\n }\n\n getPublicUrl(filePath: string): string | null {\n const { bucket, region, endpoint } = this.config;\n if (endpoint) {\n return `${endpoint}/${bucket}/${filePath}`;\n }\n return `https://${bucket}.s3.${region}.amazonaws.com/${filePath}`;\n }\n\n async copy(\n sourcePath: string,\n destinationPath: string\n ): Promise<StorageFile> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the copy method.'\n );\n }\n}\n\n// ============ In-Memory Storage Adapter ============\n\n/**\n * In-memory storage adapter for testing.\n */\nexport class InMemoryStorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'LOCAL';\n private files = new Map<string, { content: Buffer; metadata: StorageFile }>();\n\n async upload(options: UploadOptions): Promise<StorageFile> {\n const content =\n typeof options.content === 'string'\n ? Buffer.from(options.content, 'base64')\n : options.content;\n\n const checksum = crypto.createHash('sha256').update(content).digest('hex');\n\n const metadata: StorageFile = {\n path: options.path,\n size: content.length,\n mimeType: options.mimeType,\n checksum,\n metadata: options.metadata,\n };\n\n this.files.set(options.path, { content, metadata });\n return metadata;\n }\n\n async download(filePath: string): Promise<Buffer> {\n const file = this.files.get(filePath);\n if (!file) {\n throw new Error(`File not found: ${filePath}`);\n }\n return file.content;\n }\n\n async delete(filePath: string): Promise<void> {\n this.files.delete(filePath);\n }\n\n async exists(filePath: string): Promise<boolean> {\n return this.files.has(filePath);\n }\n\n async getMetadata(filePath: string): Promise<StorageFile | null> {\n const file = this.files.get(filePath);\n return file?.metadata || null;\n }\n\n async list(options?: ListOptions): Promise<ListResult> {\n const prefix = options?.prefix || '';\n const files: StorageFile[] = [];\n\n for (const [path, file] of this.files) {\n if (path.startsWith(prefix)) {\n files.push(file.metadata);\n }\n }\n\n const limit = options?.limit || files.length;\n return {\n files: files.slice(0, limit),\n hasMore: files.length > limit,\n };\n }\n\n async createPresignedUpload(\n options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n const expiresAt = new Date(Date.now() + (options.expiresIn || 3600) * 1000);\n return {\n url: `/upload?path=${encodeURIComponent(options.path)}`,\n fields: { path: options.path },\n expiresAt,\n };\n }\n\n async createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n const expiresAt = new Date(Date.now() + (options.expiresIn || 3600) * 1000);\n return {\n url: `/download/${options.path}`,\n expiresAt,\n };\n }\n\n getPublicUrl(filePath: string): string | null {\n return `/files/${filePath}`;\n }\n\n async copy(\n sourcePath: string,\n destinationPath: string\n ): Promise<StorageFile> {\n const source = this.files.get(sourcePath);\n if (!source) {\n throw new Error(`Source file not found: ${sourcePath}`);\n }\n\n const metadata: StorageFile = {\n ...source.metadata,\n path: destinationPath,\n };\n\n this.files.set(destinationPath, { content: source.content, metadata });\n return metadata;\n }\n\n clear(): void {\n this.files.clear();\n }\n}\n\n// ============ Factory ============\n\nexport interface StorageConfig {\n provider: StorageProvider;\n local?: LocalStorageOptions;\n s3?: S3StorageOptions;\n}\n\n/**\n * Create a storage adapter based on configuration.\n */\nexport function createStorageAdapter(config: StorageConfig): StorageAdapter {\n switch (config.provider) {\n case 'LOCAL':\n if (!config.local) {\n throw new Error('Local storage configuration required');\n }\n return new LocalStorageAdapter(config.local);\n\n case 'S3':\n if (!config.s3) {\n throw new Error('S3 storage configuration required');\n }\n return new S3StorageAdapter(config.s3);\n\n default:\n throw new Error(`Unsupported storage provider: ${config.provider}`);\n }\n}\n"],"mappings":";;;;;;;;;AAqJA,IAAa,sBAAb,MAA2D;CACzD,AAAS,WAA4B;CACrC,AAAQ;CACR,AAAQ;CAER,YAAY,SAA8B;AACxC,OAAK,WAAW,QAAQ;AACxB,OAAK,UAAU,QAAQ;;CAGzB,MAAM,OAAO,SAA8C;EACzD,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU,QAAQ,KAAK;EACvD,MAAM,MAAM,KAAK,QAAQ,SAAS;AAGlC,QAAM,GAAG,MAAM,KAAK,EAAE,WAAW,MAAM,CAAC;EAGxC,MAAM,UACJ,OAAO,QAAQ,YAAY,WACvB,OAAO,KAAK,QAAQ,SAAS,SAAS,GACtC,QAAQ;AAEd,QAAM,GAAG,UAAU,UAAU,QAAQ;EAGrC,MAAM,WAAW,OAAO,WAAW,SAAS,CAAC,O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AAO,UAAf;EACE,KAAK;AACH,OAAI,CAAC,OAAO,MACV,OAAM,IAAI,MAAM,uCAAuC;AAEzD,UAAO,IAAI,oBAAoB,OAAO,MAAM;EAE9C,KAAK;AACH,OAAI,CAAC,OAAO,GACV,OAAM,IAAI,MAAM,oCAAoC;AAEtD,UAAO,IAAI,iBAAiB,OAAO,GAAG;EAExC,QACE,OAAM,IAAI,MAAM,iCAAiC,OAAO,WAAW"}
1
+ {"version":3,"file":"index.js","names":["files: StorageFile[]","metadata: StorageFile","path"],"sources":["../../src/storage/index.ts"],"sourcesContent":["/**\n * File storage adapters for different backends.\n */\n\n// ============ Types ============\n\nexport type StorageProvider = 'LOCAL' | 'S3' | 'GCS' | 'AZURE' | 'CLOUDFLARE';\n\nexport interface StorageFile {\n path: string;\n size: number;\n mimeType: string;\n checksum?: string;\n etag?: string;\n metadata?: Record<string, string>;\n}\n\nexport interface UploadOptions {\n /** Target path in storage */\n path: string;\n /** File content */\n content: Buffer | string;\n /** MIME type */\n mimeType: string;\n /** Additional metadata */\n metadata?: Record<string, string>;\n /** Whether file should be publicly accessible */\n isPublic?: boolean;\n}\n\nexport interface PresignedUploadOptions {\n /** Target path in storage */\n path: string;\n /** MIME type */\n mimeType: string;\n /** File size in bytes */\n size: number;\n /** Expiration time in seconds */\n expiresIn?: number;\n /** Additional conditions */\n conditions?: Record<string, unknown>[];\n}\n\nexport interface PresignedDownloadOptions {\n /** File path in storage */\n path: string;\n /** Expiration time in seconds */\n expiresIn?: number;\n /** Response content disposition */\n contentDisposition?: string;\n}\n\nexport interface PresignedUrl {\n url: string;\n fields?: Record<string, string>;\n expiresAt: Date;\n}\n\nexport interface ListOptions {\n /** Path prefix */\n prefix?: string;\n /** Maximum results */\n limit?: number;\n /** Continuation token */\n cursor?: string;\n}\n\nexport interface ListResult {\n files: StorageFile[];\n cursor?: string;\n hasMore: boolean;\n}\n\n// ============ Storage Adapter Interface ============\n\nexport interface StorageAdapter {\n /** Storage provider type */\n readonly provider: StorageProvider;\n\n /**\n * Upload a file to storage.\n */\n upload(options: UploadOptions): Promise<StorageFile>;\n\n /**\n * Download a file from storage.\n */\n download(path: string): Promise<Buffer>;\n\n /**\n * Delete a file from storage.\n */\n delete(path: string): Promise<void>;\n\n /**\n * Check if a file exists.\n */\n exists(path: string): Promise<boolean>;\n\n /**\n * Get file metadata.\n */\n getMetadata(path: string): Promise<StorageFile | null>;\n\n /**\n * List files in a directory.\n */\n list(options?: ListOptions): Promise<ListResult>;\n\n /**\n * Generate a presigned URL for uploading.\n */\n createPresignedUpload(options: PresignedUploadOptions): Promise<PresignedUrl>;\n\n /**\n * Generate a presigned URL for downloading.\n */\n createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl>;\n\n /**\n * Get public URL for a file (if applicable).\n */\n getPublicUrl(path: string): string | null;\n\n /**\n * Copy a file within storage.\n */\n copy(sourcePath: string, destinationPath: string): Promise<StorageFile>;\n}\n\n// ============ Local Storage Adapter ============\n\nimport * as fs from 'node:fs/promises';\nimport * as path from 'node:path';\nimport * as crypto from 'node:crypto';\n\nexport interface LocalStorageOptions {\n /** Base directory for file storage */\n basePath: string;\n /** Base URL for serving files (optional) */\n baseUrl?: string;\n}\n\n/**\n * Local filesystem storage adapter.\n * For development and testing purposes.\n */\nexport class LocalStorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'LOCAL';\n private basePath: string;\n private baseUrl?: string;\n\n constructor(options: LocalStorageOptions) {\n this.basePath = options.basePath;\n this.baseUrl = options.baseUrl;\n }\n\n async upload(options: UploadOptions): Promise<StorageFile> {\n const fullPath = path.join(this.basePath, options.path);\n const dir = path.dirname(fullPath);\n\n // Ensure directory exists\n await fs.mkdir(dir, { recursive: true });\n\n // Write file\n const content =\n typeof options.content === 'string'\n ? Buffer.from(options.content, 'base64')\n : options.content;\n\n await fs.writeFile(fullPath, content);\n\n // Calculate checksum\n const checksum = crypto.createHash('sha256').update(content).digest('hex');\n\n return {\n path: options.path,\n size: content.length,\n mimeType: options.mimeType,\n checksum,\n metadata: options.metadata,\n };\n }\n\n async download(filePath: string): Promise<Buffer> {\n const fullPath = path.join(this.basePath, filePath);\n return fs.readFile(fullPath);\n }\n\n async delete(filePath: string): Promise<void> {\n const fullPath = path.join(this.basePath, filePath);\n await fs.unlink(fullPath);\n }\n\n async exists(filePath: string): Promise<boolean> {\n const fullPath = path.join(this.basePath, filePath);\n try {\n await fs.access(fullPath);\n return true;\n } catch {\n return false;\n }\n }\n\n async getMetadata(filePath: string): Promise<StorageFile | null> {\n const fullPath = path.join(this.basePath, filePath);\n try {\n const stat = await fs.stat(fullPath);\n return {\n path: filePath,\n size: stat.size,\n mimeType: 'application/octet-stream', // Would need mime type detection\n };\n } catch {\n return null;\n }\n }\n\n async list(options?: ListOptions): Promise<ListResult> {\n const dir = options?.prefix\n ? path.join(this.basePath, options.prefix)\n : this.basePath;\n\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n const files: StorageFile[] = [];\n\n for (const entry of entries) {\n if (entry.isFile()) {\n const filePath = options?.prefix\n ? path.join(options.prefix, entry.name)\n : entry.name;\n const stat = await fs.stat(path.join(dir, entry.name));\n files.push({\n path: filePath,\n size: stat.size,\n mimeType: 'application/octet-stream',\n });\n }\n }\n\n const limit = options?.limit || files.length;\n return {\n files: files.slice(0, limit),\n hasMore: files.length > limit,\n };\n } catch {\n return { files: [], hasMore: false };\n }\n }\n\n async createPresignedUpload(\n options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n // Local storage doesn't support real presigned URLs\n // Return a placeholder that would work with a local upload endpoint\n const expiresIn = options.expiresIn || 3600;\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n return {\n url: this.baseUrl\n ? `${this.baseUrl}/upload?path=${encodeURIComponent(options.path)}`\n : `/upload?path=${encodeURIComponent(options.path)}`,\n fields: {\n path: options.path,\n mimeType: options.mimeType,\n },\n expiresAt,\n };\n }\n\n async createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n const expiresIn = options.expiresIn || 3600;\n const expiresAt = new Date(Date.now() + expiresIn * 1000);\n\n return {\n url: this.baseUrl\n ? `${this.baseUrl}/download/${options.path}`\n : `/download/${options.path}`,\n expiresAt,\n };\n }\n\n getPublicUrl(filePath: string): string | null {\n if (!this.baseUrl) return null;\n return `${this.baseUrl}/${filePath}`;\n }\n\n async copy(\n sourcePath: string,\n destinationPath: string\n ): Promise<StorageFile> {\n const sourceFullPath = path.join(this.basePath, sourcePath);\n const destFullPath = path.join(this.basePath, destinationPath);\n const destDir = path.dirname(destFullPath);\n\n await fs.mkdir(destDir, { recursive: true });\n await fs.copyFile(sourceFullPath, destFullPath);\n\n const stat = await fs.stat(destFullPath);\n return {\n path: destinationPath,\n size: stat.size,\n mimeType: 'application/octet-stream',\n };\n }\n}\n\n// ============ S3 Storage Adapter Interface ============\n\nexport interface S3StorageOptions {\n /** S3 bucket name */\n bucket: string;\n /** AWS region */\n region: string;\n /** AWS access key ID */\n accessKeyId?: string;\n /** AWS secret access key */\n secretAccessKey?: string;\n /** Endpoint URL (for S3-compatible services) */\n endpoint?: string;\n /** Force path style (for S3-compatible services) */\n forcePathStyle?: boolean;\n /** Default ACL for uploads */\n defaultAcl?: 'private' | 'public-read';\n}\n\n/**\n * S3 storage adapter interface.\n * Implementation would use AWS SDK or compatible client.\n *\n * This is a placeholder that defines the interface.\n * Actual implementation would require @aws-sdk/client-s3 dependency.\n */\nexport class S3StorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'S3';\n private config: S3StorageOptions;\n\n constructor(options: S3StorageOptions) {\n this.config = options;\n }\n\n async upload(_options: UploadOptions): Promise<StorageFile> {\n // Placeholder - actual implementation would use S3 SDK\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the upload method.'\n );\n }\n\n async download(_filePath: string): Promise<Buffer> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the download method.'\n );\n }\n\n async delete(_filePath: string): Promise<void> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the delete method.'\n );\n }\n\n async exists(_filePath: string): Promise<boolean> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the exists method.'\n );\n }\n\n async getMetadata(_filePath: string): Promise<StorageFile | null> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the getMetadata method.'\n );\n }\n\n async list(_options?: ListOptions): Promise<ListResult> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the list method.'\n );\n }\n\n async createPresignedUpload(\n _options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedUpload method.'\n );\n }\n\n async createPresignedDownload(\n _options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the createPresignedDownload method.'\n );\n }\n\n getPublicUrl(filePath: string): string | null {\n const { bucket, region, endpoint } = this.config;\n if (endpoint) {\n return `${endpoint}/${bucket}/${filePath}`;\n }\n return `https://${bucket}.s3.${region}.amazonaws.com/${filePath}`;\n }\n\n async copy(\n _sourcePath: string,\n _destinationPath: string\n ): Promise<StorageFile> {\n throw new Error(\n 'S3 adapter requires @aws-sdk/client-s3. Install it and implement the copy method.'\n );\n }\n}\n\n// ============ In-Memory Storage Adapter ============\n\n/**\n * In-memory storage adapter for testing.\n */\nexport class InMemoryStorageAdapter implements StorageAdapter {\n readonly provider: StorageProvider = 'LOCAL';\n private files = new Map<string, { content: Buffer; metadata: StorageFile }>();\n\n async upload(options: UploadOptions): Promise<StorageFile> {\n const content =\n typeof options.content === 'string'\n ? Buffer.from(options.content, 'base64')\n : options.content;\n\n const checksum = crypto.createHash('sha256').update(content).digest('hex');\n\n const metadata: StorageFile = {\n path: options.path,\n size: content.length,\n mimeType: options.mimeType,\n checksum,\n metadata: options.metadata,\n };\n\n this.files.set(options.path, { content, metadata });\n return metadata;\n }\n\n async download(filePath: string): Promise<Buffer> {\n const file = this.files.get(filePath);\n if (!file) {\n throw new Error(`File not found: ${filePath}`);\n }\n return file.content;\n }\n\n async delete(filePath: string): Promise<void> {\n this.files.delete(filePath);\n }\n\n async exists(filePath: string): Promise<boolean> {\n return this.files.has(filePath);\n }\n\n async getMetadata(filePath: string): Promise<StorageFile | null> {\n const file = this.files.get(filePath);\n return file?.metadata || null;\n }\n\n async list(options?: ListOptions): Promise<ListResult> {\n const prefix = options?.prefix || '';\n const files: StorageFile[] = [];\n\n for (const [path, file] of this.files) {\n if (path.startsWith(prefix)) {\n files.push(file.metadata);\n }\n }\n\n const limit = options?.limit || files.length;\n return {\n files: files.slice(0, limit),\n hasMore: files.length > limit,\n };\n }\n\n async createPresignedUpload(\n options: PresignedUploadOptions\n ): Promise<PresignedUrl> {\n const expiresAt = new Date(Date.now() + (options.expiresIn || 3600) * 1000);\n return {\n url: `/upload?path=${encodeURIComponent(options.path)}`,\n fields: { path: options.path },\n expiresAt,\n };\n }\n\n async createPresignedDownload(\n options: PresignedDownloadOptions\n ): Promise<PresignedUrl> {\n const expiresAt = new Date(Date.now() + (options.expiresIn || 3600) * 1000);\n return {\n url: `/download/${options.path}`,\n expiresAt,\n };\n }\n\n getPublicUrl(filePath: string): string | null {\n return `/files/${filePath}`;\n }\n\n async copy(\n sourcePath: string,\n destinationPath: string\n ): Promise<StorageFile> {\n const source = this.files.get(sourcePath);\n if (!source) {\n throw new Error(`Source file not found: ${sourcePath}`);\n }\n\n const metadata: StorageFile = {\n ...source.metadata,\n path: destinationPath,\n };\n\n this.files.set(destinationPath, { content: source.content, metadata });\n return metadata;\n }\n\n clear(): void {\n this.files.clear();\n }\n}\n\n// ============ Factory ============\n\nexport interface StorageConfig {\n provider: StorageProvider;\n local?: LocalStorageOptions;\n s3?: S3StorageOptions;\n}\n\n/**\n * Create a storage adapter based on configuration.\n */\nexport function createStorageAdapter(config: StorageConfig): StorageAdapter {\n switch (config.provider) {\n case 'LOCAL':\n if (!config.local) {\n throw new Error('Local storage configuration required');\n }\n return new LocalStorageAdapter(config.local);\n\n case 'S3':\n if (!config.s3) {\n throw new Error('S3 storage configuration required');\n }\n return new S3StorageAdapter(config.s3);\n\n default:\n throw new Error(`Unsupported storage provider: ${config.provider}`);\n }\n}\n"],"mappings":";;;;;;;;;AAqJA,IAAa,sBAAb,MAA2D;CACzD,AAAS,WAA4B;CACrC,AAAQ;CACR,AAAQ;CAER,YAAY,SAA8B;AACxC,OAAK,WAAW,QAAQ;AACxB,OAAK,UAAU,QAAQ;;CAGzB,MAAM,OAAO,SAA8C;EACzD,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU,QAAQ,KAAK;EACvD,MAAM,MAAM,KAAK,QAAQ,SAAS;AAGlC,QAAM,GAAG,MAAM,KAAK,EAAE,WAAW,MAAM,CAAC;EAGxC,MAAM,UACJ,OAAO,QAAQ,YAAY,WACvB,OAAO,KAAK,QAAQ,SAAS,SAAS,GACtC,QAAQ;AAEd,QAAM,GAAG,UAAU,UAAU,QAAQ;EAGrC,MAAM,WAAW,OAAO,WAAW,SAAS,CAAC,OAAO,QAAQ,CAAC,OAAO,MAAM;AAE1E,SAAO;GACL,MAAM,QAAQ;GACd,MAAM,QAAQ;GACd,UAAU,QAAQ;GAClB;GACA,UAAU,QAAQ;GACnB;;CAGH,MAAM,SAAS,UAAmC;EAChD,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU,SAAS;AACnD,SAAO,GAAG,SAAS,SAAS;;CAG9B,MAAM,OAAO,UAAiC;EAC5C,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU,SAAS;AACnD,QAAM,GAAG,OAAO,SAAS;;CAG3B,MAAM,OAAO,UAAoC;EAC/C,MAAM,WAAW,KAAK,KAAK,KAAK,UAAU,SAAS;AACnD,MAAI;AACF,SAAM,GAAG,OAAO,SAAS;AACzB,UAAO;UACD;AACN,UAAO;;;CAIX,MAAM,YAAY,UAA+C;EAC/D,MAAM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IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ,aAAa,QAAQ,IAAK;AAC3E,SAAO;GACL,KAAK,gBAAgB,mBAAmB,QAAQ,KAAK;GACrD,QAAQ,EAAE,MAAM,QAAQ,MAAM;GAC9B;GACD;;CAGH,MAAM,wBACJ,SACuB;EACvB,MAAM,YAAY,IAAI,KAAK,KAAK,KAAK,IAAI,QAAQ,aAAa,QAAQ,IAAK;AAC3E,SAAO;GACL,KAAK,aAAa,QAAQ;GAC1B;GACD;;CAGH,aAAa,UAAiC;AAC5C,SAAO,UAAU;;CAGnB,MAAM,KACJ,YACA,iBACsB;EACtB,MAAM,SAAS,KAAK,MAAM,IAAI,WAAW;AACzC,MAAI,CAAC,OACH,OAAM,IAAI,MAAM,0BAA0B,aAAa;EAGzD,MAAMD,WAAwB;GAC5B,GAAG,OAAO;GACV,MAAM;GACP;AAED,OAAK,MAAM,IAAI,iBAAiB;GAAE,SAAS,OAAO;GAAS;GAAU,CAAC;AACtE,SAAO;;CAGT,QAAc;AACZ,OAAK,MAAM,OAAO;;;;;;AAetB,SAAgB,qBAAqB,QAAuC;AAC1E,SAAQ,OAAO,UAAf;EACE,KAAK;AACH,OAAI,CAAC,OAAO,MACV,OAAM,IAAI,MAAM,uCAAuC;AAEzD,UAAO,IAAI,oBAAoB,OAAO,MAAM;EAE9C,KAAK;AACH,OAAI,CAAC,OAAO,GACV,OAAM,IAAI,MAAM,oCAAoC;AAEtD,UAAO,IAAI,iBAAiB,OAAO,GAAG;EAExC,QACE,OAAM,IAAI,MAAM,iCAAiC,OAAO,WAAW"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.files",
3
- "version": "0.0.0-canary-20251219202229",
3
+ "version": "0.0.0-canary-20251220002821",
4
4
  "description": "Files, documents and attachments module for ContractSpec applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,13 +18,13 @@
18
18
  "lint:check": "eslint src"
19
19
  },
20
20
  "dependencies": {
21
- "@lssm/lib.schema": "0.0.0-canary-20251219202229",
22
- "@lssm/lib.contracts": "0.0.0-canary-20251219202229",
21
+ "@lssm/lib.schema": "0.0.0-canary-20251220002821",
22
+ "@lssm/lib.contracts": "0.0.0-canary-20251220002821",
23
23
  "zod": "^4.1.13"
24
24
  },
25
25
  "devDependencies": {
26
- "@lssm/tool.typescript": "0.0.0-canary-20251219202229",
27
- "@lssm/tool.tsdown": "0.0.0-canary-20251219202229",
26
+ "@lssm/tool.typescript": "0.0.0-canary-20251220002821",
27
+ "@lssm/tool.tsdown": "0.0.0-canary-20251220002821",
28
28
  "typescript": "^5.9.3"
29
29
  },
30
30
  "exports": {
@@ -55,7 +55,13 @@
55
55
  "./files.feature": "./dist/files.feature.js",
56
56
  "./storage": "./dist/storage/index.js",
57
57
  "./*": "./*"
58
- }
58
+ },
59
+ "registry": "https://registry.npmjs.org/"
59
60
  },
60
- "license": "MIT"
61
+ "license": "MIT",
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "https://github.com/lssm-tech/contractspec.git",
65
+ "directory": "packages/libs/files"
66
+ }
61
67
  }