@budibase/server 2.5.6-alpha.14 → 2.5.6-alpha.15
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.b2935042.js → index.34051f6c.js} +285 -286
- package/builder/index.html +1 -1
- package/dist/api/routes/index.js +0 -2
- package/dist/package.json +7 -7
- package/dist/sdk/app/backups/exports.js +1 -35
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/api/index.ts +0 -1
- package/src/api/routes/index.ts +0 -2
- package/src/sdk/app/backups/exports.ts +0 -35
- package/dist/api/controllers/cloud.js +0 -130
- package/dist/api/routes/cloud.js +0 -39
- package/src/api/controllers/cloud.ts +0 -119
- package/src/api/routes/cloud.ts +0 -18
- package/src/api/routes/tests/cloud.spec.ts +0 -54
package/builder/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
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.
|
|
11
|
+
<script type="module" crossorigin src="/builder/assets/index.34051f6c.js"></script>
|
|
12
12
|
<link rel="stylesheet" href="/builder/assets/index.c0265b74.css">
|
|
13
13
|
</head>
|
|
14
14
|
|
package/dist/api/routes/index.js
CHANGED
|
@@ -28,7 +28,6 @@ const query_1 = __importDefault(require("./query"));
|
|
|
28
28
|
const backup_1 = __importDefault(require("./backup"));
|
|
29
29
|
const metadata_1 = __importDefault(require("./metadata"));
|
|
30
30
|
const dev_1 = __importDefault(require("./dev"));
|
|
31
|
-
const cloud_1 = __importDefault(require("./cloud"));
|
|
32
31
|
const migrations_1 = __importDefault(require("./migrations"));
|
|
33
32
|
const plugin_1 = __importDefault(require("./plugin"));
|
|
34
33
|
const ops_1 = __importDefault(require("./ops"));
|
|
@@ -64,7 +63,6 @@ exports.mainRoutes = [
|
|
|
64
63
|
query_1.default,
|
|
65
64
|
metadata_1.default,
|
|
66
65
|
dev_1.default,
|
|
67
|
-
cloud_1.default,
|
|
68
66
|
row_1.default,
|
|
69
67
|
migrations_1.default,
|
|
70
68
|
plugin_1.default,
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.5.6-alpha.
|
|
4
|
+
"version": "2.5.6-alpha.14",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "GPL-3.0",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@budibase/backend-core": "2.5.6-alpha.
|
|
49
|
-
"@budibase/client": "2.5.6-alpha.
|
|
50
|
-
"@budibase/pro": "2.5.6-alpha.
|
|
51
|
-
"@budibase/shared-core": "2.5.6-alpha.
|
|
52
|
-
"@budibase/string-templates": "2.5.6-alpha.
|
|
53
|
-
"@budibase/types": "2.5.6-alpha.
|
|
48
|
+
"@budibase/backend-core": "2.5.6-alpha.14",
|
|
49
|
+
"@budibase/client": "2.5.6-alpha.14",
|
|
50
|
+
"@budibase/pro": "2.5.6-alpha.14",
|
|
51
|
+
"@budibase/shared-core": "2.5.6-alpha.14",
|
|
52
|
+
"@budibase/string-templates": "2.5.6-alpha.14",
|
|
53
|
+
"@budibase/types": "2.5.6-alpha.14",
|
|
54
54
|
"@bull-board/api": "3.7.0",
|
|
55
55
|
"@bull-board/koa": "3.9.4",
|
|
56
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.streamExportApp = exports.
|
|
15
|
+
exports.streamExportApp = exports.exportApp = exports.exportDB = void 0;
|
|
16
16
|
const backend_core_1 = require("@budibase/backend-core");
|
|
17
17
|
const budibaseDir_1 = require("../../../utilities/budibaseDir");
|
|
18
18
|
const fileSystem_1 = require("../../../utilities/fileSystem");
|
|
@@ -135,40 +135,6 @@ function exportApp(appId, config) {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
exports.exportApp = exportApp;
|
|
138
|
-
/**
|
|
139
|
-
* Export all apps + global DB (if supplied) to a single tarball, this includes
|
|
140
|
-
* the attachments for each app as well.
|
|
141
|
-
* @param {object[]} appMetadata The IDs and names of apps to export.
|
|
142
|
-
* @param {string} globalDbContents The contents of the global DB to export as well.
|
|
143
|
-
* @return {string} The path to the tarball.
|
|
144
|
-
*/
|
|
145
|
-
function exportMultipleApps(appMetadata, globalDbContents) {
|
|
146
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
const tmpPath = (0, path_1.join)((0, budibaseDir_1.budibaseTempDir)(), uuid());
|
|
148
|
-
fs_1.default.mkdirSync(tmpPath);
|
|
149
|
-
let exportPromises = [];
|
|
150
|
-
// export each app to a directory, then move it into the complete export
|
|
151
|
-
const exportAndMove = (appId, appName) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
const path = yield exportApp(appId);
|
|
153
|
-
yield fs_1.default.promises.rename(path, (0, path_1.join)(tmpPath, appName));
|
|
154
|
-
});
|
|
155
|
-
for (let metadata of appMetadata) {
|
|
156
|
-
exportPromises.push(exportAndMove(metadata.appId, metadata.name));
|
|
157
|
-
}
|
|
158
|
-
// wait for all exports to finish
|
|
159
|
-
yield Promise.all(exportPromises);
|
|
160
|
-
// add the global DB contents
|
|
161
|
-
if (globalDbContents) {
|
|
162
|
-
fs_1.default.writeFileSync((0, path_1.join)(tmpPath, constants_2.GLOBAL_DB_EXPORT_FILE), globalDbContents);
|
|
163
|
-
}
|
|
164
|
-
const appNames = appMetadata.map(metadata => metadata.name);
|
|
165
|
-
const tarPath = tarFilesToTmp(tmpPath, [...appNames, constants_2.GLOBAL_DB_EXPORT_FILE]);
|
|
166
|
-
// clear up the tmp path now tarball generated
|
|
167
|
-
fs_1.default.rmSync(tmpPath, { recursive: true, force: true });
|
|
168
|
-
return tarPath;
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
exports.exportMultipleApps = exportMultipleApps;
|
|
172
138
|
/**
|
|
173
139
|
* Streams a backup of the database state for an app
|
|
174
140
|
* @param {string} appId The ID of the app which is to be backed up.
|