@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.
@@ -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
- { name: 'dbType', type: 'string', required: true, default: 'postgres', order: 1,
37
- description: 'postgres | mysql | mssql' },
38
- { name: 'connection', type: 'object', required: true, order: 2,
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