@laboratoria/sdk-js 3.0.0-alpha.1 → 3.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/laboratoria-sdk-esm.js +1 -1
- package/dist/laboratoria-sdk-umd.js +1 -1
- package/lib/core.js +12 -3
- package/package.json +5 -5
package/lib/core.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import md5 from 'blueimp-md5';
|
2
2
|
import { createModels, extendSchemaDefinitions } from './model';
|
3
|
+
import { createClient } from './client.js';
|
3
4
|
import schema from '../schemas/core.json';
|
4
5
|
|
5
6
|
const extended = {
|
@@ -208,7 +209,15 @@ const extended = {
|
|
208
209
|
},
|
209
210
|
};
|
210
211
|
|
211
|
-
export const createAPI = (url, state) =>
|
212
|
-
...
|
213
|
-
|
212
|
+
export const createAPI = (url, state) => ({
|
213
|
+
...createModels(url, state, {
|
214
|
+
...schema,
|
215
|
+
definitions: extendSchemaDefinitions(schema, extended),
|
216
|
+
}),
|
217
|
+
gcpLog: {
|
218
|
+
getEntries: async (q) => {
|
219
|
+
const req = createClient(url, state.authUser);
|
220
|
+
return await req(`/gcp-logs?q=${JSON.stringify(q)}`);
|
221
|
+
},
|
222
|
+
},
|
214
223
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@laboratoria/sdk-js",
|
3
|
-
"version": "3.0.0-
|
3
|
+
"version": "3.0.0-beta.0",
|
4
4
|
"description": "Laboratoria JavaScript (browser) SDK",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -11,16 +11,16 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"blueimp-md5": "^2.19.0",
|
14
|
-
"firebase": "^9.
|
14
|
+
"firebase": "^9.15.0"
|
15
15
|
},
|
16
16
|
"devDependencies": {
|
17
|
-
"@babel/core": "^7.20.
|
17
|
+
"@babel/core": "^7.20.5",
|
18
18
|
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
|
19
19
|
"babel-jest": "^29.3.1",
|
20
20
|
"jest": "^29.3.1",
|
21
21
|
"jest-environment-jsdom": "^29.3.1",
|
22
22
|
"webpack": "^5.75.0",
|
23
|
-
"webpack-cli": "^
|
23
|
+
"webpack-cli": "^5.0.1"
|
24
24
|
},
|
25
25
|
"jest": {
|
26
26
|
"testEnvironment": "jsdom",
|
@@ -33,4 +33,4 @@
|
|
33
33
|
}
|
34
34
|
}
|
35
35
|
}
|
36
|
-
}
|
36
|
+
}
|