@openfn/ws-worker 1.13.5 → 1.14.0
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/CHANGELOG.md +18 -0
- package/dist/index.js +5 -1
- package/dist/start.js +5 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# ws-worker
|
|
2
2
|
|
|
3
|
+
## 1.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9d4ece3: Add support for global functions in execution plan
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [9d4ece3]
|
|
12
|
+
- @openfn/runtime@1.7.0
|
|
13
|
+
- @openfn/engine-multi@1.6.7
|
|
14
|
+
|
|
15
|
+
## 1.13.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 284d10a: Add 5s of clock tolerance to run token validation
|
|
20
|
+
|
|
3
21
|
## 1.13.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -118,7 +118,9 @@ var mockLogger = createMockLogger();
|
|
|
118
118
|
var verifyToken = async (token, publicKey) => {
|
|
119
119
|
const key = crypto.createPublicKey(publicKey);
|
|
120
120
|
const { payload } = await jose.jwtVerify(token, key, {
|
|
121
|
-
issuer: "Lightning"
|
|
121
|
+
issuer: "Lightning",
|
|
122
|
+
clockTolerance: "5s"
|
|
123
|
+
// Allow 5 seconds of clock skew
|
|
122
124
|
});
|
|
123
125
|
if (payload) {
|
|
124
126
|
return true;
|
|
@@ -372,6 +374,8 @@ var convert_lightning_plan_default = (run, options = {}) => {
|
|
|
372
374
|
plan.workflow = {
|
|
373
375
|
steps: Object.values(nodes)
|
|
374
376
|
};
|
|
377
|
+
if (run.globals && typeof run.globals === "string")
|
|
378
|
+
plan.workflow.globals = run.globals;
|
|
375
379
|
if (run.name) {
|
|
376
380
|
plan.workflow.name = run.name;
|
|
377
381
|
}
|
package/dist/start.js
CHANGED
|
@@ -258,7 +258,9 @@ var mockLogger = createMockLogger();
|
|
|
258
258
|
var verifyToken = async (token, publicKey) => {
|
|
259
259
|
const key = crypto2.createPublicKey(publicKey);
|
|
260
260
|
const { payload } = await jose.jwtVerify(token, key, {
|
|
261
|
-
issuer: "Lightning"
|
|
261
|
+
issuer: "Lightning",
|
|
262
|
+
clockTolerance: "5s"
|
|
263
|
+
// Allow 5 seconds of clock skew
|
|
262
264
|
});
|
|
263
265
|
if (payload) {
|
|
264
266
|
return true;
|
|
@@ -512,6 +514,8 @@ var convert_lightning_plan_default = (run2, options = {}) => {
|
|
|
512
514
|
plan.workflow = {
|
|
513
515
|
steps: Object.values(nodes)
|
|
514
516
|
};
|
|
517
|
+
if (run2.globals && typeof run2.globals === "string")
|
|
518
|
+
plan.workflow.globals = run2.globals;
|
|
515
519
|
if (run2.name) {
|
|
516
520
|
plan.workflow.name = run2.name;
|
|
517
521
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/ws-worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "A Websocket Worker to connect Lightning to a Runtime Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"koa-logger": "^3.2.1",
|
|
24
24
|
"phoenix": "1.7.10",
|
|
25
25
|
"ws": "^8.18.0",
|
|
26
|
-
"@openfn/engine-multi": "1.6.
|
|
27
|
-
"@openfn/
|
|
28
|
-
"@openfn/runtime": "1.
|
|
29
|
-
"@openfn/
|
|
26
|
+
"@openfn/engine-multi": "1.6.7",
|
|
27
|
+
"@openfn/lexicon": "^1.2.2",
|
|
28
|
+
"@openfn/runtime": "1.7.0",
|
|
29
|
+
"@openfn/logger": "1.0.5"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/koa": "^2.13.5",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsup": "^6.2.3",
|
|
44
44
|
"typescript": "^4.6.4",
|
|
45
45
|
"yargs": "^17.6.2",
|
|
46
|
-
"@openfn/lightning-mock": "2.1
|
|
46
|
+
"@openfn/lightning-mock": "2.2.1"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|