Mohammad Shahid commited on
Commit
f0a0636
·
1 Parent(s): 32780d6

Refactor: Remove static modifiers from AsyncContext methods and add saveFile and signDownloadUrl methods to FirebaseStorageBucketControl

Browse files
src/shared/services/async-context.ts CHANGED
@@ -1,15 +1,15 @@
1
  // HF-compatible stub for Async Context
2
  export class AsyncContext {
3
- static get<T>(key: string): T | undefined {
4
  // Stub implementation
5
  return undefined;
6
  }
7
 
8
- static set<T>(key: string, value: T): void {
9
  // Stub implementation
10
  }
11
 
12
- static run<T>(fn: () => T): T {
13
  // Stub implementation
14
  return fn();
15
  }
 
1
  // HF-compatible stub for Async Context
2
  export class AsyncContext {
3
+ get<T>(key: string): T | undefined {
4
  // Stub implementation
5
  return undefined;
6
  }
7
 
8
+ set<T>(key: string, value: T): void {
9
  // Stub implementation
10
  }
11
 
12
+ run<T>(fn: () => T): T {
13
  // Stub implementation
14
  return fn();
15
  }
src/shared/services/firebase-storage-bucket.ts CHANGED
@@ -13,4 +13,14 @@ export class FirebaseStorageBucketControl {
13
  static async delete(path: string): Promise<void> {
14
  // Stub implementation
15
  }
 
 
 
 
 
 
 
 
 
 
16
  }
 
13
  static async delete(path: string): Promise<void> {
14
  // Stub implementation
15
  }
16
+
17
+ async saveFile(fid: string, data: any, options?: any): Promise<string> {
18
+ // Stub implementation - just return the fid as URL
19
+ return `stub://file/${fid}`;
20
+ }
21
+
22
+ async signDownloadUrl(fid: string, expiresAt?: number): Promise<string> {
23
+ // Stub implementation - return a dummy URL
24
+ return `stub://download/${fid}`;
25
+ }
26
  }
tsconfig.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "compilerOptions": {
3
  "module": "node16",
 
 
4
 
5
  "noImplicitReturns": true,
6
  "noUnusedLocals": true,
@@ -9,7 +11,7 @@
9
  "strict": true,
10
  "allowJs": true,
11
  "target": "es2022",
12
- "lib": ["es2022"],
13
  "skipLibCheck": true,
14
  "useDefineForClassFields": false,
15
  "experimentalDecorators": true,
 
1
  {
2
  "compilerOptions": {
3
  "module": "node16",
4
+ "moduleResolution": "node16",
5
+ "types": ["node"],
6
 
7
  "noImplicitReturns": true,
8
  "noUnusedLocals": true,
 
11
  "strict": true,
12
  "allowJs": true,
13
  "target": "es2022",
14
+ "lib": ["es2022", "dom"],
15
  "skipLibCheck": true,
16
  "useDefineForClassFields": false,
17
  "experimentalDecorators": true,