@budibase/backend-core 3.1.0 → 3.1.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/dist/index.js +29 -3
- package/dist/index.js.map +3 -3
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/src/features/features.d.ts +1 -1
- package/dist/src/features/features.js +3 -3
- package/dist/src/features/features.js.map +1 -1
- package/package.json +4 -4
- package/src/features/features.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -62143,9 +62143,11 @@ __export(helpers_exports, {
|
|
|
62143
62143
|
getUserLabel: () => getUserLabel,
|
|
62144
62144
|
isGoogleSheets: () => isGoogleSheets,
|
|
62145
62145
|
isSQL: () => isSQL,
|
|
62146
|
+
retry: () => retry,
|
|
62146
62147
|
roles: () => roles_exports,
|
|
62147
62148
|
schema: () => schema_exports,
|
|
62148
62149
|
views: () => views_exports,
|
|
62150
|
+
wait: () => wait,
|
|
62149
62151
|
withTimeout: () => withTimeout
|
|
62150
62152
|
});
|
|
62151
62153
|
|
|
@@ -62243,6 +62245,30 @@ function isSQL(datasource2) {
|
|
|
62243
62245
|
return SQL.indexOf(datasource2.source) !== -1 || datasource2.isSQL === true;
|
|
62244
62246
|
}
|
|
62245
62247
|
|
|
62248
|
+
// ../shared-core/src/helpers/async.ts
|
|
62249
|
+
async function wait(ms) {
|
|
62250
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
62251
|
+
}
|
|
62252
|
+
|
|
62253
|
+
// ../shared-core/src/helpers/retry.ts
|
|
62254
|
+
async function retry(fn, opts) {
|
|
62255
|
+
const { times = 3 } = opts || {};
|
|
62256
|
+
if (times < 1) {
|
|
62257
|
+
throw new Error(`invalid retry count: ${times}`);
|
|
62258
|
+
}
|
|
62259
|
+
let lastError;
|
|
62260
|
+
for (let i = 0; i < times; i++) {
|
|
62261
|
+
const backoff = 1.5 ** i * 1e3 * (Math.random() + 0.5);
|
|
62262
|
+
await wait(backoff);
|
|
62263
|
+
try {
|
|
62264
|
+
return await fn();
|
|
62265
|
+
} catch (e) {
|
|
62266
|
+
lastError = e;
|
|
62267
|
+
}
|
|
62268
|
+
}
|
|
62269
|
+
throw lastError;
|
|
62270
|
+
}
|
|
62271
|
+
|
|
62246
62272
|
// ../shared-core/src/helpers/cron.ts
|
|
62247
62273
|
var cron_exports = {};
|
|
62248
62274
|
__export(cron_exports, {
|
|
@@ -67717,11 +67743,11 @@ var FlagSet = class {
|
|
|
67717
67743
|
}
|
|
67718
67744
|
};
|
|
67719
67745
|
var flags = new FlagSet({
|
|
67720
|
-
["DEFAULT_VALUES" /* DEFAULT_VALUES */]: Flag.boolean(
|
|
67721
|
-
["AUTOMATION_BRANCHING" /* AUTOMATION_BRANCHING */]: Flag.boolean(
|
|
67746
|
+
["DEFAULT_VALUES" /* DEFAULT_VALUES */]: Flag.boolean(true),
|
|
67747
|
+
["AUTOMATION_BRANCHING" /* AUTOMATION_BRANCHING */]: Flag.boolean(true),
|
|
67722
67748
|
["SQS" /* SQS */]: Flag.boolean(true),
|
|
67749
|
+
["ENRICHED_RELATIONSHIPS" /* ENRICHED_RELATIONSHIPS */]: Flag.boolean(true),
|
|
67723
67750
|
["AI_CUSTOM_CONFIGS" /* AI_CUSTOM_CONFIGS */]: Flag.boolean(environment_default.isDev()),
|
|
67724
|
-
["ENRICHED_RELATIONSHIPS" /* ENRICHED_RELATIONSHIPS */]: Flag.boolean(environment_default.isDev()),
|
|
67725
67751
|
["BUDIBASE_AI" /* BUDIBASE_AI */]: Flag.boolean(environment_default.isDev())
|
|
67726
67752
|
});
|
|
67727
67753
|
|