@budibase/server 2.7.7-alpha.0 → 2.7.7-alpha.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/builder/assets/{index.933787a7.js → index.fbee8e8b.js} +321 -321
- package/builder/index.html +1 -1
- package/dist/automation.js +70 -10
- package/dist/automation.js.map +3 -3
- package/dist/index.js +70 -10
- package/dist/index.js.map +3 -3
- package/dist/query.js +3 -2
- package/dist/query.js.map +3 -3
- package/package.json +8 -8
- package/src/automations/steps/sendSmtpEmail.ts +55 -4
- package/src/automations/tests/sendSmtpEmail.spec.ts +74 -0
- package/src/utilities/workerRequests.ts +20 -9
- package/src/automations/tests/sendSmtpEmail.spec.js +0 -71
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.fbee8e8b.js"></script>
|
|
12
12
|
<link rel="stylesheet" href="/builder/assets/index.b33e8ad5.css">
|
|
13
13
|
</head>
|
|
14
14
|
|
package/dist/automation.js
CHANGED
|
@@ -946,6 +946,7 @@ var init_automation2 = __esm({
|
|
|
946
946
|
AutomationIOType2["NUMBER"] = "number";
|
|
947
947
|
AutomationIOType2["ARRAY"] = "array";
|
|
948
948
|
AutomationIOType2["JSON"] = "json";
|
|
949
|
+
AutomationIOType2["DATE"] = "date";
|
|
949
950
|
return AutomationIOType2;
|
|
950
951
|
})(AutomationIOType || {});
|
|
951
952
|
AutomationCustomIOType = /* @__PURE__ */ ((AutomationCustomIOType2) => {
|
|
@@ -9810,8 +9811,8 @@ async function postAuth(passport2, ctx, next) {
|
|
|
9810
9811
|
{ successRedirect: "/", failureRedirect: "/error" },
|
|
9811
9812
|
async (err, tokens) => {
|
|
9812
9813
|
const baseUrl = `/builder/app/${authStateCookie.appId}/data`;
|
|
9813
|
-
const id =
|
|
9814
|
-
await
|
|
9814
|
+
const id = newid();
|
|
9815
|
+
await store(
|
|
9815
9816
|
`datasource:creation:${authStateCookie.appId}:google:${id}`,
|
|
9816
9817
|
{
|
|
9817
9818
|
tokens
|
|
@@ -9826,10 +9827,10 @@ var init_google2 = __esm({
|
|
|
9826
9827
|
"../backend-core/src/middleware/passport/datasource/google.ts"() {
|
|
9827
9828
|
init_google();
|
|
9828
9829
|
init_constants2();
|
|
9829
|
-
init_utils5();
|
|
9830
9830
|
init_configs3();
|
|
9831
|
+
init_cache();
|
|
9832
|
+
init_utils5();
|
|
9831
9833
|
init_sso2();
|
|
9832
|
-
init_src2();
|
|
9833
9834
|
GoogleStrategy2 = require("passport-google-oauth").OAuth2Strategy;
|
|
9834
9835
|
}
|
|
9835
9836
|
});
|
|
@@ -27375,7 +27376,16 @@ async function checkResponse(response2, errorMsg, { ctx } = {}) {
|
|
|
27375
27376
|
}
|
|
27376
27377
|
return response2.json();
|
|
27377
27378
|
}
|
|
27378
|
-
async function sendSmtpEmail(
|
|
27379
|
+
async function sendSmtpEmail({
|
|
27380
|
+
to,
|
|
27381
|
+
from,
|
|
27382
|
+
subject,
|
|
27383
|
+
contents,
|
|
27384
|
+
cc,
|
|
27385
|
+
bcc,
|
|
27386
|
+
automation,
|
|
27387
|
+
invite
|
|
27388
|
+
}) {
|
|
27379
27389
|
const response2 = await (0, import_node_fetch10.default)(
|
|
27380
27390
|
checkSlashesInUrl2(environment_default.WORKER_URL + `/api/global/email/send`),
|
|
27381
27391
|
request(void 0, {
|
|
@@ -27388,7 +27398,8 @@ async function sendSmtpEmail(to, from, subject, contents, cc, bcc, automation) {
|
|
|
27388
27398
|
cc,
|
|
27389
27399
|
bcc,
|
|
27390
27400
|
purpose: "custom",
|
|
27391
|
-
automation
|
|
27401
|
+
automation,
|
|
27402
|
+
invite
|
|
27392
27403
|
}
|
|
27393
27404
|
})
|
|
27394
27405
|
);
|
|
@@ -27436,6 +27447,35 @@ var definition7 = {
|
|
|
27436
27447
|
contents: {
|
|
27437
27448
|
type: "string" /* STRING */,
|
|
27438
27449
|
title: "HTML Contents"
|
|
27450
|
+
},
|
|
27451
|
+
addInvite: {
|
|
27452
|
+
type: "boolean" /* BOOLEAN */,
|
|
27453
|
+
title: "Add calendar invite"
|
|
27454
|
+
},
|
|
27455
|
+
startTime: {
|
|
27456
|
+
type: "date" /* DATE */,
|
|
27457
|
+
title: "Start Time",
|
|
27458
|
+
dependsOn: "addInvite"
|
|
27459
|
+
},
|
|
27460
|
+
endTime: {
|
|
27461
|
+
type: "date" /* DATE */,
|
|
27462
|
+
title: "End Time",
|
|
27463
|
+
dependsOn: "addInvite"
|
|
27464
|
+
},
|
|
27465
|
+
summary: {
|
|
27466
|
+
type: "string" /* STRING */,
|
|
27467
|
+
title: "Meeting Summary",
|
|
27468
|
+
dependsOn: "addInvite"
|
|
27469
|
+
},
|
|
27470
|
+
location: {
|
|
27471
|
+
type: "string" /* STRING */,
|
|
27472
|
+
title: "Location",
|
|
27473
|
+
dependsOn: "addInvite"
|
|
27474
|
+
},
|
|
27475
|
+
url: {
|
|
27476
|
+
type: "string" /* STRING */,
|
|
27477
|
+
title: "URL",
|
|
27478
|
+
dependsOn: "addInvite"
|
|
27439
27479
|
}
|
|
27440
27480
|
},
|
|
27441
27481
|
required: ["to", "from", "subject", "contents"]
|
|
@@ -27456,21 +27496,41 @@ var definition7 = {
|
|
|
27456
27496
|
}
|
|
27457
27497
|
};
|
|
27458
27498
|
async function run3({ inputs }) {
|
|
27459
|
-
let {
|
|
27499
|
+
let {
|
|
27500
|
+
to,
|
|
27501
|
+
from,
|
|
27502
|
+
subject,
|
|
27503
|
+
contents,
|
|
27504
|
+
cc,
|
|
27505
|
+
bcc,
|
|
27506
|
+
addInvite,
|
|
27507
|
+
startTime,
|
|
27508
|
+
endTime,
|
|
27509
|
+
summary,
|
|
27510
|
+
location,
|
|
27511
|
+
url
|
|
27512
|
+
} = inputs;
|
|
27460
27513
|
if (!contents) {
|
|
27461
27514
|
contents = "<h1>No content</h1>";
|
|
27462
27515
|
}
|
|
27463
27516
|
to = to || void 0;
|
|
27464
27517
|
try {
|
|
27465
|
-
let response2 = await sendSmtpEmail(
|
|
27518
|
+
let response2 = await sendSmtpEmail({
|
|
27466
27519
|
to,
|
|
27467
27520
|
from,
|
|
27468
27521
|
subject,
|
|
27469
27522
|
contents,
|
|
27470
27523
|
cc,
|
|
27471
27524
|
bcc,
|
|
27472
|
-
true
|
|
27473
|
-
|
|
27525
|
+
automation: true,
|
|
27526
|
+
invite: addInvite ? {
|
|
27527
|
+
startTime,
|
|
27528
|
+
endTime,
|
|
27529
|
+
summary,
|
|
27530
|
+
location,
|
|
27531
|
+
url
|
|
27532
|
+
} : void 0
|
|
27533
|
+
});
|
|
27474
27534
|
return {
|
|
27475
27535
|
success: true,
|
|
27476
27536
|
response: response2
|