@budibase/backend-core 2.19.5 → 2.20.0
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/dist/index.js +31 -19
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/plugins.js.meta.json +1 -1
- package/dist/src/events/publishers/query.d.ts +2 -2
- package/dist/src/events/publishers/query.js +1 -1
- package/dist/src/events/publishers/query.js.map +1 -1
- package/dist/src/installation.js +29 -17
- package/dist/src/installation.js.map +1 -1
- package/package.json +4 -4
- package/src/events/publishers/query.ts +3 -2
- package/src/installation.ts +27 -18
package/dist/index.js
CHANGED
|
@@ -54783,6 +54783,7 @@ var NoEmptyFilterStrings = [
|
|
|
54783
54783
|
var utils_exports = {};
|
|
54784
54784
|
__export(utils_exports, {
|
|
54785
54785
|
filterValueToLabel: () => filterValueToLabel,
|
|
54786
|
+
hasSchema: () => hasSchema,
|
|
54786
54787
|
parallelForeach: () => parallelForeach,
|
|
54787
54788
|
unreachable: () => unreachable
|
|
54788
54789
|
});
|
|
@@ -54827,6 +54828,9 @@ function filterValueToLabel() {
|
|
|
54827
54828
|
{}
|
|
54828
54829
|
);
|
|
54829
54830
|
}
|
|
54831
|
+
function hasSchema(test) {
|
|
54832
|
+
return typeof test === "object" && !Array.isArray(test) && test !== null && !(test instanceof Date) && Object.keys(test).length > 0;
|
|
54833
|
+
}
|
|
54830
54834
|
|
|
54831
54835
|
// ../shared-core/src/sdk/index.ts
|
|
54832
54836
|
var sdk_exports = {};
|
|
@@ -61259,25 +61263,33 @@ var checkInstallVersion = async () => {
|
|
|
61259
61263
|
const install = await getInstall();
|
|
61260
61264
|
const currentVersion = install.version;
|
|
61261
61265
|
const newVersion = environment_default.VERSION;
|
|
61262
|
-
|
|
61263
|
-
|
|
61264
|
-
|
|
61265
|
-
|
|
61266
|
-
|
|
61267
|
-
|
|
61268
|
-
|
|
61269
|
-
|
|
61270
|
-
|
|
61271
|
-
|
|
61272
|
-
|
|
61273
|
-
|
|
61274
|
-
|
|
61275
|
-
|
|
61276
|
-
|
|
61266
|
+
try {
|
|
61267
|
+
if (currentVersion !== newVersion) {
|
|
61268
|
+
const isUpgrade = import_semver.default.gt(newVersion, currentVersion);
|
|
61269
|
+
const isDowngrade = import_semver.default.lt(newVersion, currentVersion);
|
|
61270
|
+
const success = await updateVersion(newVersion);
|
|
61271
|
+
if (success) {
|
|
61272
|
+
await doInIdentityContext(
|
|
61273
|
+
{
|
|
61274
|
+
_id: install.installId,
|
|
61275
|
+
type: "installation" /* INSTALLATION */
|
|
61276
|
+
},
|
|
61277
|
+
async () => {
|
|
61278
|
+
if (isUpgrade) {
|
|
61279
|
+
await installation_default.upgraded(currentVersion, newVersion);
|
|
61280
|
+
} else if (isDowngrade) {
|
|
61281
|
+
await installation_default.downgraded(currentVersion, newVersion);
|
|
61282
|
+
}
|
|
61277
61283
|
}
|
|
61278
|
-
|
|
61279
|
-
|
|
61280
|
-
|
|
61284
|
+
);
|
|
61285
|
+
await identification_default.identifyInstallationGroup(install.installId);
|
|
61286
|
+
}
|
|
61287
|
+
}
|
|
61288
|
+
} catch (err) {
|
|
61289
|
+
if (err?.message?.includes("Invalid Version")) {
|
|
61290
|
+
logAlert(`Invalid version "${newVersion}" - is it semver?`);
|
|
61291
|
+
} else {
|
|
61292
|
+
logAlert("Failed to retrieve version", err);
|
|
61281
61293
|
}
|
|
61282
61294
|
}
|
|
61283
61295
|
};
|
|
@@ -62170,7 +62182,7 @@ var run2 = async (count, timestamp) => {
|
|
|
62170
62182
|
};
|
|
62171
62183
|
var previewed = async (datasource2, query) => {
|
|
62172
62184
|
const properties = {
|
|
62173
|
-
queryId: query.
|
|
62185
|
+
queryId: query.queryId,
|
|
62174
62186
|
datasourceId: datasource2._id,
|
|
62175
62187
|
source: datasource2.source,
|
|
62176
62188
|
queryVerb: query.queryVerb
|