@xeplr/actions 1.1.1 → 1.1.6
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/lib/builtins/db/fetch.js +34 -5
- package/lib/builtins/db/move.js +691 -0
- package/lib/builtins/db/procedure.js +210 -0
- package/lib/builtins/db/push.js +16 -6
- package/lib/builtins/email/delete.js +42 -0
- package/lib/builtins/email/download-attachments.js +52 -0
- package/lib/builtins/email/download-email.js +45 -0
- package/lib/builtins/email/move.js +45 -0
- package/lib/builtins/email/read.js +128 -0
- package/lib/builtins/file/upload.js +6 -6
- package/lib/builtins/index.js +24 -1
- package/lib/builtins/send-email.js +114 -5
- package/lib/drivers/db/duckdb.js +646 -0
- package/lib/drivers/db/index.js +4 -1
- package/lib/drivers/db/mssql.js +32 -3
- package/lib/drivers/db/mysql.js +64 -4
- package/lib/drivers/db/postgres.js +35 -2
- package/lib/drivers/db/procedure.js +222 -0
- package/lib/drivers/email/config.js +122 -0
- package/lib/drivers/email/files.js +76 -0
- package/lib/drivers/email/imap.js +395 -0
- package/lib/drivers/email/index.js +45 -0
- package/lib/drivers/email/smtp.js +214 -0
- package/lib/runner.js +46 -1
- package/lib/streaming/spool.js +62 -2
- package/lib/uploader/attach.js +53 -7
- package/lib/uploader/index.js +84 -10
- package/lib/uploader/meta-store-knex.js +34 -5
- package/lib/uploader/meta-store-noop.js +1 -0
- package/lib/uploader/reconcile.js +12 -1
- package/package.json +22 -1
package/lib/builtins/db/fetch.js
CHANGED
|
@@ -33,9 +33,38 @@ module.exports = {
|
|
|
33
33
|
requires: [], // per-driver requires checked at runtime once dbType is known
|
|
34
34
|
|
|
35
35
|
inputSchema: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
// ── WHICH DATABASE ──────────────────────────────────────────────────
|
|
37
|
+
//
|
|
38
|
+
// Two routes in, and only one of them is fit for a UI.
|
|
39
|
+
//
|
|
40
|
+
// connectionInfoId + dbInfoId — pick a SAVED connection. The ids are all
|
|
41
|
+
// that is ever stored or sent to a browser; the host swaps them for real
|
|
42
|
+
// credentials server-side, immediately before this runs (see @xeplr/jobs'
|
|
43
|
+
// resolveInputs). dbType comes from the connection too, because the
|
|
44
|
+
// connection already knows what it is.
|
|
45
|
+
//
|
|
46
|
+
// connection + dbType — pass the login literally. Kept because this
|
|
47
|
+
// package must work with no host at all: a script, a test, a standalone
|
|
48
|
+
// worker. NOT for the job editor — a job's inputs are fetched by the
|
|
49
|
+
// browser on every list load and snapshotted into every occurrence row,
|
|
50
|
+
// so a password there is a password everywhere, forever.
|
|
51
|
+
{ name: 'connectionInfoId', type: 'string', order: 1,
|
|
52
|
+
optionsFrom: 'connections',
|
|
53
|
+
description: 'A saved connection. Resolved to credentials server-side.' },
|
|
54
|
+
{ name: 'dbInfoId', type: 'string', order: 2,
|
|
55
|
+
optionsFrom: 'databases', dependsOn: 'connectionInfoId',
|
|
56
|
+
description: 'Which database on that connection.' },
|
|
57
|
+
|
|
58
|
+
// Filled by the host from the two ids above, or supplied literally by a
|
|
59
|
+
// caller with no host. `system` keeps them out of the form either way —
|
|
60
|
+
// they must stay DECLARED, because @xeplr/schema-handler drops any field
|
|
61
|
+
// a schema does not mention, which would strip the resolved connection on
|
|
62
|
+
// its way to execute().
|
|
63
|
+
{ name: 'dbType', type: 'string', required: true, default: 'postgres', order: 3,
|
|
64
|
+
system: true, options: ['postgres', 'mysql', 'mssql'],
|
|
65
|
+
description: 'Taken from the connection when one is chosen.' },
|
|
66
|
+
{ name: 'connection', type: 'object', required: true, order: 4,
|
|
67
|
+
system: true,
|
|
39
68
|
description: 'Connection config: { host, port, user, password, database }' },
|
|
40
69
|
{ name: 'mode', type: 'string', default: 'table', order: 3,
|
|
41
70
|
description: '"table" (SELECT * FROM input.table) or "query" (raw input.sql)' },
|
|
@@ -45,9 +74,9 @@ module.exports = {
|
|
|
45
74
|
description: 'Raw SQL to stream (mode="query").' },
|
|
46
75
|
{ name: 'params', type: 'array', order: 6,
|
|
47
76
|
description: 'Bind params for mode="query".' },
|
|
48
|
-
{ name: 'streaming_mode', type: 'boolean', default: true, order: 7,
|
|
77
|
+
{ name: 'streaming_mode', type: 'boolean', default: true, order: 7, group: 'Performance',
|
|
49
78
|
description: 'Default TRUE → spool to NDJSON file. false → inline output.rows (small reads only).' },
|
|
50
|
-
{ name: 'batchSize', type: 'number', default: 1000, order: 8,
|
|
79
|
+
{ name: 'batchSize', type: 'number', default: 1000, order: 8, group: 'Performance',
|
|
51
80
|
description: 'Rows pulled per cursor round-trip / stream highWaterMark.' }
|
|
52
81
|
],
|
|
53
82
|
|