@xeplr/actions 1.4.0 → 1.4.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/README.md +15 -3
- package/lib/builtins/data-operation.js +7 -2
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -207,10 +207,18 @@ email.
|
|
|
207
207
|
formulas and workflow's conditions, with the same functions. `where` and a
|
|
208
208
|
computed column are the same language.
|
|
209
209
|
|
|
210
|
-
**What
|
|
211
|
-
`
|
|
210
|
+
**What "today" means comes from the run's context**, not from the action:
|
|
211
|
+
`system.formula` carries `today` and `fiscalYearStart`, so a workspace that
|
|
212
212
|
reckons days elsewhere and a run replayed from history agree on what
|
|
213
|
-
`
|
|
213
|
+
`ytd()` filtered. The action never calls `new Date()`.
|
|
214
|
+
|
|
215
|
+
> `today()` and `yesterday()` are **not yet functions of
|
|
216
|
+
> `@xeplr/expression-handler`**: a formula using them is refused, naming the
|
|
217
|
+
> function. The example above shows where they will go.
|
|
218
|
+
|
|
219
|
+
**It is called like every other action**: `execute({ input, system })`.
|
|
220
|
+
Before 1.4.2 it took `(input, context)`, so through `runAction` (and so in
|
|
221
|
+
every workflow step) `from` was undefined and the step returned no rows.
|
|
214
222
|
|
|
215
223
|
**Only visible columns are rendered.** A column kept for the next step but
|
|
216
224
|
marked `hidden` stays in `rows` and never reaches the table — an id the flow
|
|
@@ -470,6 +478,10 @@ await driver.query(pool, userSql, params) // reads only
|
|
|
470
478
|
| The system mail sender refuses `text`, `bcc`, `from`, `replyTo` rather than dropping them. | A silently lost bcc is a compliance problem found a year later. |
|
|
471
479
|
| `email-send` returns both `accepted` and `rejected`. | SMTP accepts per recipient; a "success" can drop half of them. |
|
|
472
480
|
|
|
481
|
+
## Dev-only overrides
|
|
482
|
+
|
|
483
|
+
`package.json` overrides `@azure/msal-node` to `^7.1.0` for this repo's own install. `mssql` (a dev dependency here, for the SQL Server driver tests) pulls it in through `tedious` → `@azure/identity`, which still asks for `^6` — and every 6.x has GHSA-xcx6-jx8p-x3h5 (high). Overrides apply only to this repo's own install; an app using `@xeplr/actions` resolves its own `mssql` and should add the same override until `@azure/identity` moves to msal-node 7. Remove it once it does.
|
|
484
|
+
|
|
473
485
|
## Tests
|
|
474
486
|
|
|
475
487
|
There is no `npm test` script. The tests use `node:test`; run a file directly:
|
|
@@ -109,7 +109,12 @@ module.exports = {
|
|
|
109
109
|
{ name: 'text', type: 'string', description: 'The same, as plain text, for a mail client that refuses HTML.' }
|
|
110
110
|
],
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
// The same call every action gets from runAction: { input, system }. It
|
|
113
|
+
// once took (input, context) — the runner's object landed in `input`,
|
|
114
|
+
// `from` was undefined, and every workflow step returned no rows.
|
|
115
|
+
execute: async function(call) {
|
|
116
|
+
var input = (call && call.input) || {};
|
|
117
|
+
var system = (call && call.system) || {};
|
|
113
118
|
var given = input.from;
|
|
114
119
|
// A list, always — one object is a list of one, and nothing is an empty
|
|
115
120
|
// list rather than an error. The step after this one should not have to
|
|
@@ -120,7 +125,7 @@ module.exports = {
|
|
|
120
125
|
|
|
121
126
|
// The run's own context decides what today is — and therefore what
|
|
122
127
|
// yesterday is. See the note at the top.
|
|
123
|
-
var ctx =
|
|
128
|
+
var ctx = system.formula || {};
|
|
124
129
|
|
|
125
130
|
var keep = null;
|
|
126
131
|
if (input.where && String(input.where).trim()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xeplr/actions",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Named-action registry with typed inputs and safe invocation — plus built-in actions for HTTP, DB, files, email, spawn",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -130,5 +130,8 @@
|
|
|
130
130
|
"pg": "^8.0.0",
|
|
131
131
|
"saxes": "^6.0.0",
|
|
132
132
|
"unzipper": "^0.12.0"
|
|
133
|
+
},
|
|
134
|
+
"overrides": {
|
|
135
|
+
"@azure/msal-node": "^7.1.0"
|
|
133
136
|
}
|
|
134
137
|
}
|