@budibase/frontend-core 2.10.12-alpha.10 → 2.10.12-alpha.12
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/app.js +18 -0
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.10.12-alpha.
|
|
3
|
+
"version": "2.10.12-alpha.12",
|
|
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.10.12-alpha.
|
|
10
|
-
"@budibase/shared-core": "2.10.12-alpha.
|
|
9
|
+
"@budibase/bbui": "2.10.12-alpha.12",
|
|
10
|
+
"@budibase/shared-core": "2.10.12-alpha.12",
|
|
11
11
|
"dayjs": "^1.10.8",
|
|
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": "d4d0ed167b347982b3d87bba2cd833ff2840f16c"
|
|
17
17
|
}
|
package/src/api/app.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { sdk } from "@budibase/shared-core"
|
|
2
|
+
|
|
1
3
|
export const buildAppEndpoints = API => ({
|
|
2
4
|
/**
|
|
3
5
|
* Fetches screen definition for an app.
|
|
@@ -81,6 +83,22 @@ export const buildAppEndpoints = API => ({
|
|
|
81
83
|
})
|
|
82
84
|
},
|
|
83
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Update an application using an export - the body
|
|
88
|
+
* should be of type FormData, with a "file" and a "password" if encrypted.
|
|
89
|
+
* @param appId The ID of the app to update - this will always be
|
|
90
|
+
* converted to development ID.
|
|
91
|
+
* @param body a FormData body with a file and password.
|
|
92
|
+
*/
|
|
93
|
+
updateAppFromExport: async (appId, body) => {
|
|
94
|
+
const devId = sdk.applications.getDevAppID(appId)
|
|
95
|
+
return await API.post({
|
|
96
|
+
url: `/api/applications/${devId}/import`,
|
|
97
|
+
body,
|
|
98
|
+
json: false,
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
|
|
84
102
|
/**
|
|
85
103
|
* Imports an export of all apps.
|
|
86
104
|
* @param apps the FormData containing the apps to import
|