@budibase/frontend-core 2.8.22-alpha.0 → 2.8.22-alpha.2
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/package.json +4 -4
- package/src/api/licensing.js +44 -17
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.8.22-alpha.
|
|
3
|
+
"version": "2.8.22-alpha.2",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "2.8.22-alpha.
|
|
10
|
-
"@budibase/shared-core": "2.8.22-alpha.
|
|
9
|
+
"@budibase/bbui": "2.8.22-alpha.2",
|
|
10
|
+
"@budibase/shared-core": "2.8.22-alpha.2",
|
|
11
11
|
"dayjs": "^1.11.7",
|
|
12
12
|
"lodash": "^4.17.21",
|
|
13
13
|
"socket.io-client": "^4.6.1",
|
|
14
14
|
"svelte": "^3.46.2"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "79d65782cd33fc931a3581efd99dd07c7e89b22b"
|
|
17
17
|
}
|
package/src/api/licensing.js
CHANGED
|
@@ -1,30 +1,58 @@
|
|
|
1
1
|
export const buildLicensingEndpoints = API => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
2
|
+
// LICENSE KEY
|
|
3
|
+
|
|
5
4
|
activateLicenseKey: async data => {
|
|
6
5
|
return API.post({
|
|
7
|
-
url: `/api/global/license/
|
|
6
|
+
url: `/api/global/license/key`,
|
|
8
7
|
body: data,
|
|
9
8
|
})
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Delete a self hosted license key
|
|
14
|
-
*/
|
|
15
10
|
deleteLicenseKey: async () => {
|
|
16
11
|
return API.delete({
|
|
17
|
-
url: `/api/global/license/
|
|
12
|
+
url: `/api/global/license/key`,
|
|
18
13
|
})
|
|
19
14
|
},
|
|
15
|
+
getLicenseKey: async () => {
|
|
16
|
+
try {
|
|
17
|
+
return await API.get({
|
|
18
|
+
url: "/api/global/license/key",
|
|
19
|
+
})
|
|
20
|
+
} catch (e) {
|
|
21
|
+
if (e.status !== 404) {
|
|
22
|
+
throw e
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
// OFFLINE LICENSE
|
|
28
|
+
|
|
29
|
+
activateOfflineLicense: async ({ offlineLicenseToken }) => {
|
|
30
|
+
return API.post({
|
|
31
|
+
url: "/api/global/license/offline",
|
|
32
|
+
body: {
|
|
33
|
+
offlineLicenseToken,
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
},
|
|
37
|
+
deleteOfflineLicense: async () => {
|
|
38
|
+
return API.delete({
|
|
39
|
+
url: "/api/global/license/offline",
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
getOfflineLicense: async () => {
|
|
43
|
+
try {
|
|
44
|
+
return await API.get({
|
|
45
|
+
url: "/api/global/license/offline",
|
|
46
|
+
})
|
|
47
|
+
} catch (e) {
|
|
48
|
+
if (e.status !== 404) {
|
|
49
|
+
throw e
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
getOfflineLicenseIdentifier: async () => {
|
|
54
|
+
return await API.get({
|
|
55
|
+
url: "/api/global/license/offline/identifier",
|
|
28
56
|
})
|
|
29
57
|
},
|
|
30
58
|
|
|
@@ -36,7 +64,6 @@ export const buildLicensingEndpoints = API => ({
|
|
|
36
64
|
url: "/api/global/license/refresh",
|
|
37
65
|
})
|
|
38
66
|
},
|
|
39
|
-
|
|
40
67
|
/**
|
|
41
68
|
* Retrieve the usage information for the tenant
|
|
42
69
|
*/
|