@aether-baas/core 3.5.1 → 3.6.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.
|
@@ -4,14 +4,20 @@ import type { InvokeFunctionOptions } from '../types/index.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Módulo de functions serverless do Aether.
|
|
6
6
|
*
|
|
7
|
+
* Compatível com Firebase Cloud Functions API.
|
|
8
|
+
*
|
|
7
9
|
* @example
|
|
8
10
|
* ```typescript
|
|
9
|
-
* // Invocar função
|
|
11
|
+
* // Invocar função diretamente
|
|
10
12
|
* const result = await aether.functions.invoke('send-email', {
|
|
11
13
|
* to: 'user@email.com',
|
|
12
14
|
* subject: 'Olá!',
|
|
13
15
|
* body: 'Bem-vindo!'
|
|
14
16
|
* });
|
|
17
|
+
*
|
|
18
|
+
* // Usar httpsCallable (estilo Firebase)
|
|
19
|
+
* const sendEmail = aether.functions.httpsCallable('send-email');
|
|
20
|
+
* const { data } = await sendEmail({ to: 'user@email.com' });
|
|
15
21
|
* ```
|
|
16
22
|
*/
|
|
17
23
|
export declare class FunctionsModule {
|
|
@@ -19,11 +25,22 @@ export declare class FunctionsModule {
|
|
|
19
25
|
private http;
|
|
20
26
|
constructor(client: PlataformaClient, http: AxiosInstance);
|
|
21
27
|
/**
|
|
22
|
-
* Invoca uma function serverless.
|
|
28
|
+
* Invoca uma function serverless HTTP.
|
|
23
29
|
*
|
|
24
|
-
* @param functionName Nome da função
|
|
30
|
+
* @param functionName Nome da função (deve estar deployada como type="http")
|
|
25
31
|
* @param payload Dados a enviar para a função
|
|
26
|
-
* @param options Opções adicionais
|
|
32
|
+
* @param options Opções adicionais (timeout, headers, method)
|
|
33
|
+
* @returns Result pattern com data ou error
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const result = await functions.invoke('calculate-shipping', { weight: 10 });
|
|
38
|
+
* if (result.error) {
|
|
39
|
+
* console.error('Erro:', result.error);
|
|
40
|
+
* } else {
|
|
41
|
+
* console.log('Resultado:', result.data);
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
27
44
|
*/
|
|
28
45
|
invoke<T = unknown>(functionName: string, payload?: unknown, options?: InvokeFunctionOptions): Promise<{
|
|
29
46
|
data: T;
|
|
@@ -34,16 +51,28 @@ export declare class FunctionsModule {
|
|
|
34
51
|
}>;
|
|
35
52
|
/**
|
|
36
53
|
* Atalho para invoke com POST.
|
|
54
|
+
* Lança exceção em caso de erro (para uso com try/catch).
|
|
55
|
+
*
|
|
56
|
+
* @throws Error se a função falhar
|
|
37
57
|
*/
|
|
38
58
|
call<T = unknown>(functionName: string, payload?: unknown): Promise<T>;
|
|
39
59
|
/**
|
|
40
60
|
* Retorna uma referência para uma função "Callable" (estilo Firebase).
|
|
41
61
|
*
|
|
62
|
+
* @param name Nome da função
|
|
63
|
+
* @param options Opções (timeout)
|
|
64
|
+
* @returns Função callable que pode ser invocada com dados tipados
|
|
65
|
+
*
|
|
42
66
|
* @example
|
|
43
67
|
* ```typescript
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
68
|
+
* interface SendEmailRequest { to: string; subject: string }
|
|
69
|
+
* interface SendEmailResponse { messageId: string }
|
|
70
|
+
*
|
|
71
|
+
* const sendEmail = aether.functions
|
|
72
|
+
* .httpsCallable<SendEmailRequest, SendEmailResponse>('send-email');
|
|
73
|
+
*
|
|
74
|
+
* const { data } = await sendEmail({ to: 'user@email.com', subject: 'Olá' });
|
|
75
|
+
* console.log('Message ID:', data.messageId);
|
|
47
76
|
* ```
|
|
48
77
|
*/
|
|
49
78
|
httpsCallable<RequestData = unknown, ResponseData = unknown>(name: string, options?: {
|
|
@@ -53,11 +82,17 @@ export declare class FunctionsModule {
|
|
|
53
82
|
}>;
|
|
54
83
|
/**
|
|
55
84
|
* Lista functions disponíveis no projeto.
|
|
85
|
+
* Requer permissão de admin/owner.
|
|
56
86
|
*/
|
|
57
87
|
list(): Promise<Array<{
|
|
58
88
|
name: string;
|
|
59
89
|
description?: string;
|
|
60
90
|
createdAt: string;
|
|
61
91
|
}>>;
|
|
92
|
+
/**
|
|
93
|
+
* Processa erros de invocação com mensagens detalhadas.
|
|
94
|
+
* [ENTERPRISE] Ajuda desenvolvedores a debugar problemas comuns.
|
|
95
|
+
*/
|
|
96
|
+
private _handleInvokeError;
|
|
62
97
|
}
|
|
63
98
|
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/modules/functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/modules/functions.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAc/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,IAAI,CAAgB;gBAEhB,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa;IASzD;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CAAC,CAAC,GAAG,OAAO,EACtB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IA6BpE;;;;;OAKG;IACG,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAU5E;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,WAAW,GAAG,OAAO,EAAE,YAAY,GAAG,OAAO,EACzD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;IAmB1D;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAevF;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAuE3B"}
|
|
@@ -2,21 +2,36 @@
|
|
|
2
2
|
// @aether/core - Functions Module
|
|
3
3
|
// =============================================================================
|
|
4
4
|
// Módulo para invocar serverless functions.
|
|
5
|
+
//
|
|
6
|
+
// [FIREBASE-LEVEL] Usa rotas compartilhadas do aether-shared para garantir
|
|
7
|
+
// single source of truth entre SDK e Backend.
|
|
5
8
|
// =============================================================================
|
|
9
|
+
import { routes } from '@aether-baas/shared';
|
|
10
|
+
// =============================================================================
|
|
11
|
+
// CONSTANTS
|
|
12
|
+
// =============================================================================
|
|
13
|
+
const DEFAULT_TIMEOUT = 30000; // 30 seconds
|
|
14
|
+
const LOG_PREFIX = '[Aether Functions]';
|
|
6
15
|
// =============================================================================
|
|
7
16
|
// FUNCTIONS MODULE
|
|
8
17
|
// =============================================================================
|
|
9
18
|
/**
|
|
10
19
|
* Módulo de functions serverless do Aether.
|
|
11
20
|
*
|
|
21
|
+
* Compatível com Firebase Cloud Functions API.
|
|
22
|
+
*
|
|
12
23
|
* @example
|
|
13
24
|
* ```typescript
|
|
14
|
-
* // Invocar função
|
|
25
|
+
* // Invocar função diretamente
|
|
15
26
|
* const result = await aether.functions.invoke('send-email', {
|
|
16
27
|
* to: 'user@email.com',
|
|
17
28
|
* subject: 'Olá!',
|
|
18
29
|
* body: 'Bem-vindo!'
|
|
19
30
|
* });
|
|
31
|
+
*
|
|
32
|
+
* // Usar httpsCallable (estilo Firebase)
|
|
33
|
+
* const sendEmail = aether.functions.httpsCallable('send-email');
|
|
34
|
+
* const { data } = await sendEmail({ to: 'user@email.com' });
|
|
20
35
|
* ```
|
|
21
36
|
*/
|
|
22
37
|
export class FunctionsModule {
|
|
@@ -26,27 +41,43 @@ export class FunctionsModule {
|
|
|
26
41
|
this.client = client;
|
|
27
42
|
this.http = http;
|
|
28
43
|
}
|
|
44
|
+
// ===========================================================================
|
|
45
|
+
// CORE METHODS
|
|
46
|
+
// ===========================================================================
|
|
29
47
|
/**
|
|
30
|
-
* Invoca uma function serverless.
|
|
48
|
+
* Invoca uma function serverless HTTP.
|
|
31
49
|
*
|
|
32
|
-
* @param functionName Nome da função
|
|
50
|
+
* @param functionName Nome da função (deve estar deployada como type="http")
|
|
33
51
|
* @param payload Dados a enviar para a função
|
|
34
|
-
* @param options Opções adicionais
|
|
52
|
+
* @param options Opções adicionais (timeout, headers, method)
|
|
53
|
+
* @returns Result pattern com data ou error
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const result = await functions.invoke('calculate-shipping', { weight: 10 });
|
|
58
|
+
* if (result.error) {
|
|
59
|
+
* console.error('Erro:', result.error);
|
|
60
|
+
* } else {
|
|
61
|
+
* console.log('Resultado:', result.data);
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
35
64
|
*/
|
|
36
65
|
async invoke(functionName, payload, options) {
|
|
37
66
|
const projectId = this.client.projectId;
|
|
38
67
|
const method = options?.method ?? (payload ? 'POST' : 'GET');
|
|
39
|
-
const timeout = options?.timeout ??
|
|
68
|
+
const timeout = options?.timeout ?? DEFAULT_TIMEOUT;
|
|
69
|
+
// [SINGLE SOURCE OF TRUTH] Usa rota definida em aether-shared
|
|
70
|
+
const url = routes.functions.invoke.build(projectId, functionName);
|
|
40
71
|
try {
|
|
41
72
|
let response;
|
|
42
73
|
if (method === 'GET') {
|
|
43
|
-
response = await this.http.get(
|
|
74
|
+
response = await this.http.get(url, {
|
|
44
75
|
timeout,
|
|
45
76
|
headers: options?.headers,
|
|
46
77
|
});
|
|
47
78
|
}
|
|
48
79
|
else {
|
|
49
|
-
response = await this.http.post(
|
|
80
|
+
response = await this.http.post(url, payload, {
|
|
50
81
|
timeout,
|
|
51
82
|
headers: options?.headers,
|
|
52
83
|
});
|
|
@@ -54,15 +85,14 @@ export class FunctionsModule {
|
|
|
54
85
|
return { data: response.data.data, error: null };
|
|
55
86
|
}
|
|
56
87
|
catch (err) {
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
data: null,
|
|
60
|
-
error: error.response?.data?.message || error.message || 'Erro ao invocar função',
|
|
61
|
-
};
|
|
88
|
+
return this._handleInvokeError(err, functionName);
|
|
62
89
|
}
|
|
63
90
|
}
|
|
64
91
|
/**
|
|
65
92
|
* Atalho para invoke com POST.
|
|
93
|
+
* Lança exceção em caso de erro (para uso com try/catch).
|
|
94
|
+
*
|
|
95
|
+
* @throws Error se a função falhar
|
|
66
96
|
*/
|
|
67
97
|
async call(functionName, payload) {
|
|
68
98
|
const result = await this.invoke(functionName, payload, { method: 'POST' });
|
|
@@ -74,16 +104,25 @@ export class FunctionsModule {
|
|
|
74
104
|
/**
|
|
75
105
|
* Retorna uma referência para uma função "Callable" (estilo Firebase).
|
|
76
106
|
*
|
|
107
|
+
* @param name Nome da função
|
|
108
|
+
* @param options Opções (timeout)
|
|
109
|
+
* @returns Função callable que pode ser invocada com dados tipados
|
|
110
|
+
*
|
|
77
111
|
* @example
|
|
78
112
|
* ```typescript
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
113
|
+
* interface SendEmailRequest { to: string; subject: string }
|
|
114
|
+
* interface SendEmailResponse { messageId: string }
|
|
115
|
+
*
|
|
116
|
+
* const sendEmail = aether.functions
|
|
117
|
+
* .httpsCallable<SendEmailRequest, SendEmailResponse>('send-email');
|
|
118
|
+
*
|
|
119
|
+
* const { data } = await sendEmail({ to: 'user@email.com', subject: 'Olá' });
|
|
120
|
+
* console.log('Message ID:', data.messageId);
|
|
82
121
|
* ```
|
|
83
122
|
*/
|
|
84
123
|
httpsCallable(name, options) {
|
|
85
124
|
return async (data) => {
|
|
86
|
-
const result = await this.invoke(name, data
|
|
125
|
+
const result = await this.invoke(name, data ?? {}, {
|
|
87
126
|
method: 'POST',
|
|
88
127
|
timeout: options?.timeout,
|
|
89
128
|
});
|
|
@@ -93,13 +132,65 @@ export class FunctionsModule {
|
|
|
93
132
|
return { data: result.data };
|
|
94
133
|
};
|
|
95
134
|
}
|
|
135
|
+
// ===========================================================================
|
|
136
|
+
// ADMIN METHODS
|
|
137
|
+
// ===========================================================================
|
|
96
138
|
/**
|
|
97
139
|
* Lista functions disponíveis no projeto.
|
|
140
|
+
* Requer permissão de admin/owner.
|
|
98
141
|
*/
|
|
99
142
|
async list() {
|
|
100
143
|
const projectId = this.client.projectId;
|
|
101
|
-
const
|
|
144
|
+
const url = routes.functions.base.build(projectId);
|
|
145
|
+
const { data } = await this.http.get(url);
|
|
102
146
|
return data.data;
|
|
103
147
|
}
|
|
148
|
+
// ===========================================================================
|
|
149
|
+
// PRIVATE HELPERS
|
|
150
|
+
// ===========================================================================
|
|
151
|
+
/**
|
|
152
|
+
* Processa erros de invocação com mensagens detalhadas.
|
|
153
|
+
* [ENTERPRISE] Ajuda desenvolvedores a debugar problemas comuns.
|
|
154
|
+
*/
|
|
155
|
+
_handleInvokeError(err, functionName) {
|
|
156
|
+
const error = err;
|
|
157
|
+
const status = error.response?.status;
|
|
158
|
+
const serverMessage = error.response?.data?.message ||
|
|
159
|
+
error.response?.data?.error ||
|
|
160
|
+
error.message;
|
|
161
|
+
// [ENTERPRISE] Mensagens de erro específicas para problemas comuns
|
|
162
|
+
let userMessage;
|
|
163
|
+
switch (status) {
|
|
164
|
+
case 404:
|
|
165
|
+
userMessage = `Function "${functionName}" not found. Ensure it's deployed with type="http".`;
|
|
166
|
+
console.error(`${LOG_PREFIX} 404 Error: Function "${functionName}" not found.`, '\n → Verify the function is deployed in the Aether dashboard.', '\n → Ensure the function type is "http" (not "cron" or "db").', '\n → Check the function name matches exactly (case-sensitive).');
|
|
167
|
+
break;
|
|
168
|
+
case 401:
|
|
169
|
+
userMessage = 'Authentication required. Please sign in.';
|
|
170
|
+
console.error(`${LOG_PREFIX} 401 Error: User not authenticated.`);
|
|
171
|
+
break;
|
|
172
|
+
case 403:
|
|
173
|
+
userMessage = 'Access denied. Insufficient permissions.';
|
|
174
|
+
console.error(`${LOG_PREFIX} 403 Error: Permission denied for function "${functionName}".`);
|
|
175
|
+
break;
|
|
176
|
+
case 500:
|
|
177
|
+
userMessage = `Function "${functionName}" threw an error: ${serverMessage}`;
|
|
178
|
+
console.error(`${LOG_PREFIX} 500 Error: Function "${functionName}" failed.`, '\n → Check function logs in the Aether dashboard.', '\n → Server message:', serverMessage);
|
|
179
|
+
break;
|
|
180
|
+
case 504:
|
|
181
|
+
userMessage = `Function "${functionName}" timed out. Consider increasing timeout.`;
|
|
182
|
+
console.warn(`${LOG_PREFIX} 504 Timeout for function "${functionName}".`);
|
|
183
|
+
break;
|
|
184
|
+
default:
|
|
185
|
+
userMessage = serverMessage || 'Function invocation failed';
|
|
186
|
+
if (error.code === 'ECONNABORTED') {
|
|
187
|
+
userMessage = `Request timeout for function "${functionName}"`;
|
|
188
|
+
}
|
|
189
|
+
else if (error.code === 'ERR_NETWORK') {
|
|
190
|
+
userMessage = 'Network error. Check your internet connection.';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return { data: null, error: userMessage };
|
|
194
|
+
}
|
|
104
195
|
}
|
|
105
196
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/modules/functions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAChF,4CAA4C;AAC5C,gFAAgF;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/modules/functions.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,kCAAkC;AAClC,gFAAgF;AAChF,4CAA4C;AAC5C,GAAG;AACH,2EAA2E;AAC3E,8CAA8C;AAC9C,gFAAgF;AAKhF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,aAAa;AAC5C,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,eAAe;IAClB,MAAM,CAAmB;IACzB,IAAI,CAAgB;IAE5B,YAAY,MAAwB,EAAE,IAAmB;QACvD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,8EAA8E;IAC9E,eAAe;IACf,8EAA8E;IAE9E;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,MAAM,CACV,YAAoB,EACpB,OAAiB,EACjB,OAA+B;QAE/B,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QACxC,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,eAAe,CAAC;QAEpD,8DAA8D;QAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CA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,gEAAgE,EAChE,iEAAiE,CAClE,CAAC;gBACF,MAAM;YAER,KAAK,GAAG;gBACN,WAAW,GAAG,0CAA0C,CAAC;gBACzD,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,qCAAqC,CAAC,CAAC;gBAClE,MAAM;YAER,KAAK,GAAG;gBACN,WAAW,GAAG,0CAA0C,CAAC;gBACzD,OAAO,CAAC,KAAK,CACX,GAAG,UAAU,+CAA+C,YAAY,IAAI,CAC7E,CAAC;gBACF,MAAM;YAER,KAAK,GAAG;gBACN,WAAW,GAAG,aAAa,YAAY,qBAAqB,aAAa,EAAE,CAAC;gBAC5E,OAAO,CAAC,KAAK,CACX,GAAG,UAAU,yBAAyB,YAAY,WAAW,EAC7D,oDAAoD,EACpD,uBAAuB,EACvB,aAAa,CACd,CAAC;gBACF,MAAM;YAER,KAAK,GAAG;gBACN,WAAW,GAAG,aAAa,YAAY,2CAA2C,CAAC;gBACnF,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,8BAA8B,YAAY,IAAI,CAAC,CAAC;gBAC1E,MAAM;YAER;gBACE,WAAW,GAAG,aAAa,IAAI,4BAA4B,CAAC;gBAC5D,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;oBAClC,WAAW,GAAG,iCAAiC,YAAY,GAAG,CAAC;gBACjE,CAAC;qBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;oBACxC,WAAW,GAAG,gDAAgD,CAAC;gBACjE,CAAC;QACL,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAC5C,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aether-baas/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Aether SDK Core - Firebase-like namespace pattern with aether.auth, aether.db, aether.functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"prepublishOnly": "npm run build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@aether-baas/shared": "^1.0.0",
|
|
40
41
|
"axios": "^1.6.0"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|