@budibase/server 2.7.7-alpha.5 → 2.7.7-alpha.7
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/builder/assets/{index.4afe46bb.js → index.494fe793.js} +268 -268
- package/builder/assets/{index.3c336b18.css → index.ff9c71fb.css} +1 -1
- package/builder/index.html +2 -2
- package/dist/index.js +7 -14
- package/dist/index.js.map +3 -3
- package/package.json +8 -8
- package/src/api/controllers/backup.ts +14 -6
- package/src/api/routes/backup.ts +1 -1
- package/src/api/routes/tests/backup.spec.ts +18 -2
package/builder/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
10
10
|
rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
12
|
-
<link rel="stylesheet" href="/builder/assets/index.
|
|
11
|
+
<script type="module" crossorigin src="/builder/assets/index.494fe793.js"></script>
|
|
12
|
+
<link rel="stylesheet" href="/builder/assets/index.ff9c71fb.css">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body id="app">
|
package/dist/index.js
CHANGED
|
@@ -24302,13 +24302,6 @@ function convertBookmark(bookmark) {
|
|
|
24302
24302
|
}
|
|
24303
24303
|
return bookmark;
|
|
24304
24304
|
}
|
|
24305
|
-
function isQsTrue(param) {
|
|
24306
|
-
if (typeof param === "string") {
|
|
24307
|
-
return param.toLowerCase() === "true";
|
|
24308
|
-
} else {
|
|
24309
|
-
return param === true;
|
|
24310
|
-
}
|
|
24311
|
-
}
|
|
24312
24305
|
var import_stream2, Readable, isDev3, NUMBER_REGEX;
|
|
24313
24306
|
var init_utilities2 = __esm({
|
|
24314
24307
|
"src/utilities/index.ts"() {
|
|
@@ -41718,17 +41711,18 @@ var init_query6 = __esm({
|
|
|
41718
41711
|
|
|
41719
41712
|
// src/api/controllers/backup.ts
|
|
41720
41713
|
async function exportAppDump(ctx) {
|
|
41721
|
-
|
|
41714
|
+
const { appId } = ctx.query;
|
|
41715
|
+
const { excludeRows } = ctx.request.body;
|
|
41716
|
+
const [app2] = await db_exports.getAppsByIDs([appId]);
|
|
41717
|
+
const appName = app2.name;
|
|
41722
41718
|
ctx.req.setTimeout(0);
|
|
41723
|
-
const appName = decodeURI(ctx.query.appname);
|
|
41724
|
-
excludeRows = isQsTrue(excludeRows);
|
|
41725
41719
|
const backupIdentifier = `${appName}-export-${(/* @__PURE__ */ new Date()).getTime()}.tar.gz`;
|
|
41726
41720
|
ctx.attachment(backupIdentifier);
|
|
41727
41721
|
ctx.body = await sdk_default.backups.streamExportApp(appId, excludeRows);
|
|
41728
41722
|
await context_exports.doInAppContext(appId, async () => {
|
|
41729
41723
|
const appDb = context_exports.getAppDB();
|
|
41730
|
-
const
|
|
41731
|
-
await events_exports.app.exported(
|
|
41724
|
+
const app3 = await appDb.get(DocumentType2.APP_METADATA);
|
|
41725
|
+
await events_exports.app.exported(app3);
|
|
41732
41726
|
});
|
|
41733
41727
|
}
|
|
41734
41728
|
var init_backup6 = __esm({
|
|
@@ -41736,7 +41730,6 @@ var init_backup6 = __esm({
|
|
|
41736
41730
|
init_sdk3();
|
|
41737
41731
|
init_src2();
|
|
41738
41732
|
init_utils9();
|
|
41739
|
-
init_utilities2();
|
|
41740
41733
|
}
|
|
41741
41734
|
});
|
|
41742
41735
|
|
|
@@ -41749,7 +41742,7 @@ var init_backup7 = __esm({
|
|
|
41749
41742
|
init_authorized();
|
|
41750
41743
|
init_src2();
|
|
41751
41744
|
router28 = new import_router28.default();
|
|
41752
|
-
router28.
|
|
41745
|
+
router28.post(
|
|
41753
41746
|
"/api/backups/export",
|
|
41754
41747
|
authorized_default(permissions_exports.BUILDER),
|
|
41755
41748
|
exportAppDump
|