@ponceca/storage-sdk 0.1.0
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/README.md +242 -0
- package/dist/src/angular/fire/storage.d.ts +2 -0
- package/dist/src/angular/fire/storage.d.ts.map +1 -0
- package/dist/src/angular/fire/storage.js +18 -0
- package/dist/src/angular/fire/storage.js.map +1 -0
- package/dist/src/angular-wrapper/index.d.ts +19 -0
- package/dist/src/angular-wrapper/index.d.ts.map +1 -0
- package/dist/src/angular-wrapper/index.js +136 -0
- package/dist/src/angular-wrapper/index.js.map +1 -0
- package/dist/src/firebase/storage.d.ts +2 -0
- package/dist/src/firebase/storage.d.ts.map +1 -0
- package/dist/src/firebase/storage.js +18 -0
- package/dist/src/firebase/storage.js.map +1 -0
- package/dist/src/index.d.ts +115 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +625 -0
- package/dist/src/index.js.map +1 -0
- package/package.json +99 -0
package/README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Firebase Storage Clone SDK
|
|
2
|
+
|
|
3
|
+
Clon 100% compatible con Firebase Storage v9+, con funcionalidades extendidas.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ponceca/storage-sdk
|
|
9
|
+
# o
|
|
10
|
+
yarn add @ponceca/storage-sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Uso Básico
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
initializeStorage,
|
|
18
|
+
ref,
|
|
19
|
+
uploadBytesResumable,
|
|
20
|
+
getDownloadURL,
|
|
21
|
+
getMetadata,
|
|
22
|
+
deleteObject,
|
|
23
|
+
listAll
|
|
24
|
+
} from '@ponceca/storage-sdk';
|
|
25
|
+
|
|
26
|
+
// Inicializar (igual que Firebase)
|
|
27
|
+
const storage = initializeStorage({
|
|
28
|
+
authEndpoint: 'http://localhost:8080/api',
|
|
29
|
+
tokenGetter: async () => localStorage.getItem('token')
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Subir archivo
|
|
33
|
+
const fileRef = ref(storage, 'users/photo.jpg');
|
|
34
|
+
const task = uploadBytesResumable(fileRef, file, { contentType: 'image/jpeg' });
|
|
35
|
+
|
|
36
|
+
task.on('state_changed',
|
|
37
|
+
(snapshot) => console.log(snapshot.bytesTransferred),
|
|
38
|
+
(error) => console.error(error),
|
|
39
|
+
() => console.log('¡Completado!')
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
// Obtener URL de descarga
|
|
43
|
+
const url = await getDownloadURL(fileRef);
|
|
44
|
+
|
|
45
|
+
// Metadata
|
|
46
|
+
const metadata = await getMetadata(fileRef);
|
|
47
|
+
|
|
48
|
+
// Eliminar
|
|
49
|
+
await deleteObject(fileRef);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Funciones Disponibles
|
|
53
|
+
|
|
54
|
+
### Upload
|
|
55
|
+
| Función | Descripción |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `uploadBytesResumable(ref, data, metadata)` | Subida resumible con progreso |
|
|
58
|
+
| `uploadBytes(ref, data, metadata)` | Subida simple (Promise) |
|
|
59
|
+
| `uploadString(ref, value, format, metadata)` | Subir string (raw/base64/data_url) |
|
|
60
|
+
|
|
61
|
+
### Download
|
|
62
|
+
| Función | Descripción |
|
|
63
|
+
|---------|-------------|
|
|
64
|
+
| `getDownloadURL(ref)` | URL firmada para descargar |
|
|
65
|
+
| `getBytes(ref, maxSize?)` | Descargar como ArrayBuffer |
|
|
66
|
+
| `getBlob(ref, maxSize?)` | Descargar como Blob |
|
|
67
|
+
| `getStream(ref, maxSize?)` | Descargar como ReadableStream |
|
|
68
|
+
|
|
69
|
+
### Metadata
|
|
70
|
+
| Función | Descripción |
|
|
71
|
+
|---------|-------------|
|
|
72
|
+
| `getMetadata(ref)` | Obtener metadata del archivo |
|
|
73
|
+
| `updateMetadata(ref, metadata)` | Actualizar metadata |
|
|
74
|
+
|
|
75
|
+
### Listado
|
|
76
|
+
| Función | Descripción |
|
|
77
|
+
|---------|-------------|
|
|
78
|
+
| `listAll(ref)` | Listar todos los archivos |
|
|
79
|
+
| `list(ref, options)` | Listar con paginación |
|
|
80
|
+
|
|
81
|
+
### Eliminación
|
|
82
|
+
| Función | Descripción |
|
|
83
|
+
|---------|-------------|
|
|
84
|
+
| `deleteObject(ref)` | Eliminar archivo |
|
|
85
|
+
|
|
86
|
+
## Integración Angular (wrapper delgado)
|
|
87
|
+
|
|
88
|
+
El SDK incluye un wrapper Angular con provider + inyección + helpers reactivos.
|
|
89
|
+
|
|
90
|
+
Guía completa (Angular + integración con Firestore clone):
|
|
91
|
+
|
|
92
|
+
- `ANGULAR_FIRESTORE_INTEGRACION.md`
|
|
93
|
+
|
|
94
|
+
### Imports disponibles
|
|
95
|
+
|
|
96
|
+
- `@ponceca/storage-sdk/angular/storage`
|
|
97
|
+
- `@ponceca/storage-sdk/angular/fire/storage` (compat con sintaxis tipo AngularFire)
|
|
98
|
+
|
|
99
|
+
### Configuración en `app.config.ts`
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { ApplicationConfig } from '@angular/core';
|
|
103
|
+
import { getStorage } from '@ponceca/storage-sdk/storage';
|
|
104
|
+
import { provideStorage } from '@ponceca/storage-sdk/angular/storage';
|
|
105
|
+
|
|
106
|
+
export const appConfig: ApplicationConfig = {
|
|
107
|
+
providers: [
|
|
108
|
+
...provideStorage(() => getStorage({
|
|
109
|
+
authEndpoint: 'http://localhost:8080/api',
|
|
110
|
+
tokenGetter: async () => localStorage.getItem('token'),
|
|
111
|
+
project: 'mi-proyecto',
|
|
112
|
+
bucket: 'mi-bucket'
|
|
113
|
+
}))
|
|
114
|
+
]
|
|
115
|
+
};
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Uso en servicio Angular
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
import { injectStorage, ref, uploadBytes, getDownloadURL } from '@ponceca/storage-sdk/angular/storage';
|
|
122
|
+
|
|
123
|
+
const storage = injectStorage();
|
|
124
|
+
const fileRef = ref(storage, 'uploads/foto.png');
|
|
125
|
+
await uploadBytes(fileRef, archivo);
|
|
126
|
+
const url = await getDownloadURL(fileRef);
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Multi-instancia (opcional)
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
providers: [
|
|
133
|
+
...provideStorage(() => getStorage(mainConfig)),
|
|
134
|
+
...provideStorage(() => getStorage(backupConfig), { name: 'backup' })
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
const backupStorage = injectStorage('backup');
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Helpers reactivos
|
|
141
|
+
|
|
142
|
+
- `uploadTaskObservable(task)`
|
|
143
|
+
- `uploadTaskSignal(task)`
|
|
144
|
+
- `downloadUrlSignal(ref)`
|
|
145
|
+
|
|
146
|
+
> Nota: `uploadTaskObservable` requiere `rxjs` en la app Angular.
|
|
147
|
+
|
|
148
|
+
## Compatibilidad de imports (IA / código legado)
|
|
149
|
+
|
|
150
|
+
Se añadieron subpaths para facilitar aliases:
|
|
151
|
+
|
|
152
|
+
- `@ponceca/storage-sdk/firebase/storage` -> core storage
|
|
153
|
+
- `@ponceca/storage-sdk/angular/fire/storage` -> wrapper Angular
|
|
154
|
+
|
|
155
|
+
Para soportar código que importa `firebase/storage`, configura alias en la app consumidora (`tsconfig` + bundler) hacia `@ponceca/storage-sdk/firebase/storage`.
|
|
156
|
+
|
|
157
|
+
## Funciones Exclusivas (Super-Firebase)
|
|
158
|
+
|
|
159
|
+
### Thumbnails Automáticos
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
import { getThumbnailURL } from '@ponceca/storage-sdk';
|
|
163
|
+
|
|
164
|
+
// Thumbnail de 320px (por defecto)
|
|
165
|
+
const thumbUrl = await getThumbnailURL(fileRef);
|
|
166
|
+
|
|
167
|
+
// Thumbnail de tamaño específico
|
|
168
|
+
const thumb500 = await getThumbnailURL(fileRef, 500);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Video Streaming HLS
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import { getHLSStreamURL } from '@ponceca/storage-sdk';
|
|
175
|
+
|
|
176
|
+
// Obtiene URL del manifest HLS (.m3u8)
|
|
177
|
+
const hlsUrl = await getHLSStreamURL(fileRef);
|
|
178
|
+
|
|
179
|
+
// Usar con video.js, hls.js, etc.
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Configuración del Backend
|
|
183
|
+
|
|
184
|
+
Variables de entorno requeridas:
|
|
185
|
+
|
|
186
|
+
```env
|
|
187
|
+
DATABASE_URL=postgres://user:pass@localhost:5432/storage_db
|
|
188
|
+
MINIO_ENDPOINT=localhost:9000
|
|
189
|
+
MINIO_ACCESS_KEY=minioadmin
|
|
190
|
+
MINIO_SECRET_KEY=minioadmin123
|
|
191
|
+
JWT_SECRET=tu-secreto-jwt
|
|
192
|
+
RATE_LIMIT_REQUESTS=10000
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Diferencias con Firebase Original
|
|
196
|
+
|
|
197
|
+
| Característica | Firebase | Este Clon |
|
|
198
|
+
|----------------|----------|-----------|
|
|
199
|
+
| Thumbnails automáticos | ❌ | ✅ |
|
|
200
|
+
| Video streaming HLS | ❌ | ✅ |
|
|
201
|
+
| Self-hosted | ❌ | ✅ |
|
|
202
|
+
| Rate limit configurable | Fijo | ✅ 10k/min |
|
|
203
|
+
| Sin límites de egreso | ❌ (costoso) | ✅ |
|
|
204
|
+
|
|
205
|
+
## Tests
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
cd productiontest
|
|
209
|
+
node firebase_sdk_test.js
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Tests E2E reales del wrapper Angular (SDK compilado)
|
|
213
|
+
|
|
214
|
+
La suite `tests/angular.wrapper.compat.test.ts` ejecuta operaciones reales contra backend usando `dist/src/angular-wrapper/index.js`.
|
|
215
|
+
|
|
216
|
+
Variables requeridas:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
set STORAGE_E2E_ENDPOINT=http://localhost:8080/api
|
|
220
|
+
set STORAGE_E2E_TOKEN=tu_jwt_valido
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Opcionales:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
set STORAGE_E2E_API_KEY=tu_api_key
|
|
227
|
+
set STORAGE_E2E_PROJECT=default
|
|
228
|
+
set STORAGE_E2E_BUCKET=default
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Ejecución:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm run build:ts
|
|
235
|
+
npm test -- tests/angular.wrapper.compat.test.ts --runInBand
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Si faltan `STORAGE_E2E_ENDPOINT` o `STORAGE_E2E_TOKEN`, la suite se omite (`skip`) intencionalmente.
|
|
239
|
+
|
|
240
|
+
## Licencia
|
|
241
|
+
|
|
242
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/angular/fire/storage.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../../angular-wrapper"), exports);
|
|
18
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../src/angular/fire/storage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FirebaseStorage, StorageReference, UploadTask } from '../index';
|
|
2
|
+
export * from '../index';
|
|
3
|
+
export interface StorageProviderOptions {
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UploadTaskSignals {
|
|
7
|
+
snapshot: any;
|
|
8
|
+
error: any;
|
|
9
|
+
state: any;
|
|
10
|
+
isDone: any;
|
|
11
|
+
isError: any;
|
|
12
|
+
}
|
|
13
|
+
export declare function getStorageToken(name?: string): any;
|
|
14
|
+
export declare function provideStorage(factory: () => FirebaseStorage, options?: StorageProviderOptions): any[];
|
|
15
|
+
export declare function injectStorage(name?: string): FirebaseStorage;
|
|
16
|
+
export declare function uploadTaskObservable(task: UploadTask): any;
|
|
17
|
+
export declare function uploadTaskSignal(task: UploadTask): UploadTaskSignals;
|
|
18
|
+
export declare function downloadUrlSignal(storageRef: StorageReference): any;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/angular-wrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EAEf,gBAAgB,EAChB,UAAU,EAGb,MAAM,UAAU,CAAC;AAElB,cAAc,UAAU,CAAC;AAKzB,MAAM,WAAW,sBAAsB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;CAChB;AAqBD,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CASlD;AAED,wBAAgB,cAAc,CAC1B,OAAO,EAAE,MAAM,eAAe,EAC9B,OAAO,CAAC,EAAE,sBAAsB,GACjC,GAAG,EAAE,CAGP;AAED,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,eAAe,CAW5D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,GAAG,CAkB1D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAwBpE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,GAAG,GAAG,CA8BnE"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getStorageToken = getStorageToken;
|
|
27
|
+
exports.provideStorage = provideStorage;
|
|
28
|
+
exports.injectStorage = injectStorage;
|
|
29
|
+
exports.uploadTaskObservable = uploadTaskObservable;
|
|
30
|
+
exports.uploadTaskSignal = uploadTaskSignal;
|
|
31
|
+
exports.downloadUrlSignal = downloadUrlSignal;
|
|
32
|
+
const index_1 = require("../index");
|
|
33
|
+
__exportStar(require("../index"), exports);
|
|
34
|
+
const DEFAULT_STORAGE_INSTANCE = 'default';
|
|
35
|
+
const STORAGE_TOKEN_CACHE = new Map();
|
|
36
|
+
function _normalizeName(name) {
|
|
37
|
+
const value = (name || DEFAULT_STORAGE_INSTANCE).trim();
|
|
38
|
+
return value.length > 0 ? value : DEFAULT_STORAGE_INSTANCE;
|
|
39
|
+
}
|
|
40
|
+
function _loadAngularCore() {
|
|
41
|
+
try {
|
|
42
|
+
const core = require('@angular/core');
|
|
43
|
+
if (!core || !core.InjectionToken || !core.inject) {
|
|
44
|
+
throw new Error('Missing Angular DI symbols.');
|
|
45
|
+
}
|
|
46
|
+
return core;
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
throw new Error('[@ponceca/storage-sdk/angular] Angular no disponible. Instala @angular/core y configura providers en app.config.ts.');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function getStorageToken(name) {
|
|
53
|
+
const instanceName = _normalizeName(name);
|
|
54
|
+
const cached = STORAGE_TOKEN_CACHE.get(instanceName);
|
|
55
|
+
if (cached)
|
|
56
|
+
return cached;
|
|
57
|
+
const core = _loadAngularCore();
|
|
58
|
+
const token = new core.InjectionToken(`PONCECA_STORAGE_${instanceName}`);
|
|
59
|
+
STORAGE_TOKEN_CACHE.set(instanceName, token);
|
|
60
|
+
return token;
|
|
61
|
+
}
|
|
62
|
+
function provideStorage(factory, options) {
|
|
63
|
+
const token = getStorageToken(options === null || options === void 0 ? void 0 : options.name);
|
|
64
|
+
return [{ provide: token, useFactory: factory }];
|
|
65
|
+
}
|
|
66
|
+
function injectStorage(name) {
|
|
67
|
+
const core = _loadAngularCore();
|
|
68
|
+
const token = getStorageToken(name);
|
|
69
|
+
try {
|
|
70
|
+
return core.inject(token);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
throw new Error(`[@ponceca/storage-sdk/angular] No se encontró provider para storage instance "${_normalizeName(name)}". Usa provideStorage(...) en app.config.ts.`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function uploadTaskObservable(task) {
|
|
77
|
+
try {
|
|
78
|
+
const { Observable } = require('rxjs');
|
|
79
|
+
return new Observable((subscriber) => {
|
|
80
|
+
const unsubscribe = task.on('state_changed', (snapshot) => subscriber.next(snapshot), (error) => subscriber.error(error), () => subscriber.complete());
|
|
81
|
+
return () => {
|
|
82
|
+
if (typeof unsubscribe === 'function')
|
|
83
|
+
unsubscribe();
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
throw new Error('[@ponceca/storage-sdk/angular] rxjs no disponible. Instala rxjs para usar uploadTaskObservable.');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function uploadTaskSignal(task) {
|
|
92
|
+
const core = _loadAngularCore();
|
|
93
|
+
if (typeof core.signal !== 'function') {
|
|
94
|
+
throw new Error('[@ponceca/storage-sdk/angular] signal() no disponible. Requiere una versión moderna de Angular.');
|
|
95
|
+
}
|
|
96
|
+
const snapshot = core.signal(task.snapshot);
|
|
97
|
+
const error = core.signal(null);
|
|
98
|
+
const state = core.computed(() => { var _a; return ((_a = snapshot()) === null || _a === void 0 ? void 0 : _a.state) || 'running'; });
|
|
99
|
+
const isDone = core.computed(() => state() === 'success' || state() === 'canceled');
|
|
100
|
+
const isError = core.computed(() => state() === 'error');
|
|
101
|
+
task.on('state_changed', (nextSnapshot) => {
|
|
102
|
+
snapshot.set(nextSnapshot);
|
|
103
|
+
}, (nextError) => {
|
|
104
|
+
error.set(nextError);
|
|
105
|
+
});
|
|
106
|
+
return { snapshot, error, state, isDone, isError };
|
|
107
|
+
}
|
|
108
|
+
function downloadUrlSignal(storageRef) {
|
|
109
|
+
const core = _loadAngularCore();
|
|
110
|
+
if (typeof core.signal !== 'function' || typeof core.effect !== 'function') {
|
|
111
|
+
throw new Error('[@ponceca/storage-sdk/angular] signal/effect no disponible. Requiere una versión moderna de Angular.');
|
|
112
|
+
}
|
|
113
|
+
const url = core.signal(null);
|
|
114
|
+
const loading = core.signal(true);
|
|
115
|
+
const error = core.signal(null);
|
|
116
|
+
const refresh = () => __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
loading.set(true);
|
|
118
|
+
error.set(null);
|
|
119
|
+
try {
|
|
120
|
+
const value = yield (0, index_1.getDownloadURL)(storageRef);
|
|
121
|
+
url.set(value);
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
error.set(err instanceof index_1.StorageError ? err : new index_1.StorageError('storage/unknown', (err === null || err === void 0 ? void 0 : err.message) || 'Unknown error'));
|
|
125
|
+
url.set(null);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
loading.set(false);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
queueMicrotask(() => {
|
|
132
|
+
refresh();
|
|
133
|
+
});
|
|
134
|
+
return { url, loading, error, refresh };
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular-wrapper/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,0CASC;AAED,wCAMC;AAED,sCAWC;AAED,oDAkBC;AAED,4CAwBC;AAED,8CA8BC;AAzJD,oCAOkB;AAElB,2CAAyB;AAEzB,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAC3C,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAe,CAAC;AAcnD,SAAS,cAAc,CAAC,IAAa;IACjC,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,wBAAwB,CAAC,CAAC,IAAI,EAAE,CAAC;IACxD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAC/D,CAAC;AAED,SAAS,gBAAgB;IACrB,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACX,qHAAqH,CACxH,CAAC;IACN,CAAC;AACL,CAAC;AAED,SAAgB,eAAe,CAAC,IAAa;IACzC,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,CA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BAAS,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACL,CAAC,CAAA,CAAC;IAEF,cAAc,CAAC,GAAG,EAAE;QAChB,OAAO,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/firebase/storage.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../index"), exports);
|
|
18
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/firebase/storage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK compatible con Firebase Storage v9 Modular.
|
|
3
|
+
* Clon fidedigno: misma API, mismos códigos de error, misma semántica de seguridad.
|
|
4
|
+
*
|
|
5
|
+
* Códigos de error idénticos a Firebase:
|
|
6
|
+
* storage/unauthenticated → No hay token (user no autenticado)
|
|
7
|
+
* storage/unauthorized → Token válido pero security rules deniegan (403)
|
|
8
|
+
* storage/object-not-found → Archivo no existe (404)
|
|
9
|
+
* storage/canceled → Operación cancelada por el usuario
|
|
10
|
+
* storage/retry-limit-exceeded → Reintentos agotados
|
|
11
|
+
* storage/unknown → Error genérico del servidor
|
|
12
|
+
*/
|
|
13
|
+
export declare class StorageError extends Error {
|
|
14
|
+
readonly code: string;
|
|
15
|
+
readonly serverResponse: string | null;
|
|
16
|
+
constructor(code: string, message: string, serverResponse?: string | null);
|
|
17
|
+
}
|
|
18
|
+
export declare class AcmeStorageError extends StorageError {
|
|
19
|
+
constructor(code: string, message: string, serverResponse?: string | null);
|
|
20
|
+
}
|
|
21
|
+
export interface FirebaseStorage {
|
|
22
|
+
app: any;
|
|
23
|
+
config: {
|
|
24
|
+
authEndpoint: string;
|
|
25
|
+
tokenGetter: () => Promise<string | null>;
|
|
26
|
+
apiKey?: string;
|
|
27
|
+
project?: string;
|
|
28
|
+
bucket?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface StorageReference {
|
|
32
|
+
storage: FirebaseStorage;
|
|
33
|
+
fullPath: string;
|
|
34
|
+
name: string;
|
|
35
|
+
bucket: string;
|
|
36
|
+
parent: StorageReference | null;
|
|
37
|
+
root: StorageReference;
|
|
38
|
+
_location: {
|
|
39
|
+
project: string;
|
|
40
|
+
bucket: string;
|
|
41
|
+
path: string;
|
|
42
|
+
};
|
|
43
|
+
_cachedMetadata?: any;
|
|
44
|
+
}
|
|
45
|
+
export type StorageObserver<T> = {
|
|
46
|
+
next?: (snapshot: T) => void;
|
|
47
|
+
error?: (error: StorageError) => void;
|
|
48
|
+
complete?: () => void;
|
|
49
|
+
};
|
|
50
|
+
export interface UploadTaskSnapshot {
|
|
51
|
+
bytesTransferred: number;
|
|
52
|
+
totalBytes: number;
|
|
53
|
+
state: 'running' | 'paused' | 'success' | 'error' | 'canceled';
|
|
54
|
+
metadata: any;
|
|
55
|
+
ref: StorageReference;
|
|
56
|
+
task: UploadTask;
|
|
57
|
+
}
|
|
58
|
+
export interface UploadTask {
|
|
59
|
+
snapshot: UploadTaskSnapshot;
|
|
60
|
+
on(event: 'state_changed', next?: (snapshot: UploadTaskSnapshot) => void, error?: (error: StorageError) => void, complete?: () => void): Function;
|
|
61
|
+
then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => any) | null, onRejected?: ((error: any) => any) | null): Promise<any>;
|
|
62
|
+
cancel(): boolean;
|
|
63
|
+
pause(): boolean;
|
|
64
|
+
resume(): boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface SettableMetadata {
|
|
67
|
+
cacheControl?: string;
|
|
68
|
+
contentDisposition?: string;
|
|
69
|
+
contentEncoding?: string;
|
|
70
|
+
contentLanguage?: string;
|
|
71
|
+
contentType?: string;
|
|
72
|
+
customMetadata?: {
|
|
73
|
+
[key: string]: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface ListOptions {
|
|
77
|
+
maxResults?: number;
|
|
78
|
+
pageToken?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ListResult {
|
|
81
|
+
items: StorageReference[];
|
|
82
|
+
prefixes: StorageReference[];
|
|
83
|
+
nextPageToken?: string;
|
|
84
|
+
}
|
|
85
|
+
export type StringFormat = 'raw' | 'base64' | 'base64url' | 'data_url';
|
|
86
|
+
export declare function getStorage(config: {
|
|
87
|
+
authEndpoint: string;
|
|
88
|
+
tokenGetter: () => Promise<string | null>;
|
|
89
|
+
apiKey?: string;
|
|
90
|
+
project?: string;
|
|
91
|
+
bucket?: string;
|
|
92
|
+
}): FirebaseStorage;
|
|
93
|
+
export declare function connectStorageEmulator(storage: FirebaseStorage, host: string, port: number): void;
|
|
94
|
+
export declare function ref(storage: FirebaseStorage, path?: string): StorageReference;
|
|
95
|
+
export declare function ref(reference: StorageReference, path?: string): StorageReference;
|
|
96
|
+
export declare function child(parent: StorageReference, childPath: string): StorageReference;
|
|
97
|
+
export declare function getParent(reference: StorageReference): StorageReference | null;
|
|
98
|
+
export declare function getRoot(reference: StorageReference): StorageReference;
|
|
99
|
+
export declare function getDownloadURL(storageRef: StorageReference): Promise<string>;
|
|
100
|
+
export declare function getMetadata(storageRef: StorageReference): Promise<any>;
|
|
101
|
+
export declare function updateMetadata(storageRef: StorageReference, metadata: SettableMetadata): Promise<any>;
|
|
102
|
+
export declare function listAll(reference: StorageReference): Promise<{
|
|
103
|
+
items: StorageReference[];
|
|
104
|
+
prefixes: StorageReference[];
|
|
105
|
+
}>;
|
|
106
|
+
export declare function list(reference: StorageReference, options?: ListOptions): Promise<ListResult>;
|
|
107
|
+
export declare function getBlob(storageRef: StorageReference, maxDownloadSizeBytes?: number): Promise<Blob>;
|
|
108
|
+
export declare function getBytes(storageRef: StorageReference, maxDownloadSizeBytes?: number): Promise<ArrayBuffer>;
|
|
109
|
+
export declare function getStream(storageRef: StorageReference, maxDownloadSizeBytes?: number): Promise<ReadableStream>;
|
|
110
|
+
export declare function deleteObject(storageRef: StorageReference): Promise<void>;
|
|
111
|
+
export declare function uploadBytesResumable(storageRef: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: any): UploadTask;
|
|
112
|
+
export declare function uploadBytes(storageRef: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: any): Promise<UploadTaskSnapshot>;
|
|
113
|
+
export declare function uploadString(storageRef: StorageReference, value: string, format?: StringFormat, metadata?: any): Promise<UploadTaskSnapshot>;
|
|
114
|
+
export declare function getThumbnailURL(storageRef: StorageReference, width?: number): Promise<string>;
|
|
115
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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