@versori/run 0.4.22 → 0.4.24

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.
@@ -0,0 +1,146 @@
1
+ /**
2
+ * An abstract interface which when implemented provides an interface to read
3
+ * bytes into an array buffer asynchronously.
4
+ */
5
+ export interface Reader {
6
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
7
+ * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
8
+ * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
9
+ * use all of `p` as scratch space during the call. If some data is
10
+ * available but not `p.byteLength` bytes, `read()` conventionally resolves
11
+ * to what is available instead of waiting for more.
12
+ *
13
+ * When `read()` encounters end-of-file condition, it resolves to EOF
14
+ * (`null`).
15
+ *
16
+ * When `read()` encounters an error, it rejects with an error.
17
+ *
18
+ * Callers should always process the `n` > `0` bytes returned before
19
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
20
+ * happen after reading some bytes and also both of the allowed EOF
21
+ * behaviors.
22
+ *
23
+ * Implementations should not retain a reference to `p`.
24
+ *
25
+ * Use
26
+ * {@linkcode @std/io/to-iterator.ts?s=toIterator}
27
+ * to turn a {@linkcode Reader} into an {@linkcode AsyncIterableIterator}.
28
+ */
29
+ read(p: Uint8Array): Promise<number | null>;
30
+ }
31
+ /**
32
+ * An abstract interface which when implemented provides an interface to read
33
+ * bytes into an array buffer synchronously.
34
+ */
35
+ export interface ReaderSync {
36
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
37
+ * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
38
+ * encountered. Even if `read()` returns `n` < `p.byteLength`, it may use
39
+ * all of `p` as scratch space during the call. If some data is available
40
+ * but not `p.byteLength` bytes, `read()` conventionally returns what is
41
+ * available instead of waiting for more.
42
+ *
43
+ * When `readSync()` encounters end-of-file condition, it returns EOF
44
+ * (`null`).
45
+ *
46
+ * When `readSync()` encounters an error, it throws with an error.
47
+ *
48
+ * Callers should always process the `n` > `0` bytes returned before
49
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that happen
50
+ * after reading some bytes and also both of the allowed EOF behaviors.
51
+ *
52
+ * Implementations should not retain a reference to `p`.
53
+ *
54
+ * Use
55
+ * {@linkcode @std/io/to-iterator.ts?s=toIteratorSync}
56
+ * to turn a {@linkcode ReaderSync} into an {@linkcode IterableIterator}.
57
+ */
58
+ readSync(p: Uint8Array): number | null;
59
+ }
60
+ /**
61
+ * An abstract interface which when implemented provides an interface to write
62
+ * bytes from an array buffer to a file/resource asynchronously.
63
+ */
64
+ export interface Writer {
65
+ /** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
66
+ * resolves to the number of bytes written from `p` (`0` <= `n` <=
67
+ * `p.byteLength`) or reject with the error encountered that caused the
68
+ * write to stop early. `write()` must reject with a non-null error if
69
+ * would resolve to `n` < `p.byteLength`. `write()` must not modify the
70
+ * slice data, even temporarily.
71
+ *
72
+ * Implementations should not retain a reference to `p`.
73
+ */
74
+ write(p: Uint8Array): Promise<number>;
75
+ }
76
+ /**
77
+ * An abstract interface which when implemented provides an interface to write
78
+ * bytes from an array buffer to a file/resource synchronously.
79
+ */
80
+ export interface WriterSync {
81
+ /** Writes `p.byteLength` bytes from `p` to the underlying data
82
+ * stream. It returns the number of bytes written from `p` (`0` <= `n`
83
+ * <= `p.byteLength`) and any error encountered that caused the write to
84
+ * stop early. `writeSync()` must throw a non-null error if it returns `n` <
85
+ * `p.byteLength`. `writeSync()` must not modify the slice data, even
86
+ * temporarily.
87
+ *
88
+ * Implementations should not retain a reference to `p`.
89
+ */
90
+ writeSync(p: Uint8Array): number;
91
+ }
92
+ /**
93
+ * An abstract interface which when implemented provides an interface to close
94
+ * files/resources that were previously opened.
95
+ */
96
+ export interface Closer {
97
+ /** Closes the resource, "freeing" the backing file/resource. */
98
+ close(): void;
99
+ }
100
+ /**
101
+ * A enum which defines the seek mode for IO related APIs that support
102
+ * seeking.
103
+ */
104
+ export declare enum SeekMode {
105
+ Start = 0,
106
+ Current = 1,
107
+ End = 2
108
+ }
109
+ /**
110
+ * An abstract interface which when implemented provides an interface to seek
111
+ * within an open file/resource asynchronously.
112
+ */
113
+ export interface Seeker {
114
+ /** Seek sets the offset for the next `read()` or `write()` to offset,
115
+ * interpreted according to `whence`: `Start` means relative to the
116
+ * start of the file, `Current` means relative to the current offset,
117
+ * and `End` means relative to the end. Seek resolves to the new offset
118
+ * relative to the start of the file.
119
+ *
120
+ * Seeking to an offset before the start of the file is an error. Seeking to
121
+ * any positive offset is legal, but the behavior of subsequent I/O
122
+ * operations on the underlying object is implementation-dependent.
123
+ *
124
+ * It resolves with the updated offset.
125
+ */
126
+ seek(offset: number | bigint, whence: SeekMode): Promise<number>;
127
+ }
128
+ /**
129
+ * An abstract interface which when implemented provides an interface to seek
130
+ * within an open file/resource synchronously.
131
+ */
132
+ export interface SeekerSync {
133
+ /** Seek sets the offset for the next `readSync()` or `writeSync()` to
134
+ * offset, interpreted according to `whence`: `Start` means relative
135
+ * to the start of the file, `Current` means relative to the current
136
+ * offset, and `End` means relative to the end.
137
+ *
138
+ * Seeking to an offset before the start of the file is an error. Seeking to
139
+ * any positive offset is legal, but the behavior of subsequent I/O
140
+ * operations on the underlying object is implementation-dependent.
141
+ *
142
+ * It returns the updated offset.
143
+ */
144
+ seekSync(offset: number | bigint, whence: SeekMode): number;
145
+ }
146
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.3/types.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;OAQG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AACD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;OAQG;IACH,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,oBAAY,QAAQ;IAElB,KAAK,IAAI;IAET,OAAO,IAAI;IAEX,GAAG,IAAI;CACR;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC7D"}
@@ -0,0 +1,15 @@
1
+ // Copyright 2018-2026 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * A enum which defines the seek mode for IO related APIs that support
5
+ * seeking.
6
+ */
7
+ export var SeekMode;
8
+ (function (SeekMode) {
9
+ /* Seek from the start of the file/resource. */
10
+ SeekMode[SeekMode["Start"] = 0] = "Start";
11
+ /* Seek from the current position within the file/resource. */
12
+ SeekMode[SeekMode["Current"] = 1] = "Current";
13
+ /* Seek from the end of the current file/resource. */
14
+ SeekMode[SeekMode["End"] = 2] = "End";
15
+ })(SeekMode || (SeekMode = {}));
@@ -0,0 +1,52 @@
1
+ import type { Writer, WriterSync } from "./types.js";
2
+ export type { Writer, WriterSync } from "./types.js";
3
+ /**
4
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
5
+ *
6
+ * @example Writing to stdout
7
+ * ```ts no-assert
8
+ * import { writeAll } from "@std/io/write-all";
9
+ *
10
+ * const contentBytes = new TextEncoder().encode("Hello World");
11
+ * await writeAll(Deno.stdout, contentBytes);
12
+ * ```
13
+ *
14
+ * @example Writing to file
15
+ * ```ts ignore no-assert
16
+ * import { writeAll } from "@std/io/write-all";
17
+ *
18
+ * const contentBytes = new TextEncoder().encode("Hello World");
19
+ * using file = await Deno.open('test.file', { write: true });
20
+ * await writeAll(file, contentBytes);
21
+ * ```
22
+ *
23
+ * @param writer The writer to write to
24
+ * @param data The data to write
25
+ */
26
+ export declare function writeAll(writer: Writer, data: Uint8Array): Promise<void>;
27
+ /**
28
+ * Synchronously write all the content of the array buffer (`arr`) to the
29
+ * writer (`w`).
30
+ *
31
+ * @example "riting to stdout
32
+ * ```ts no-assert
33
+ * import { writeAllSync } from "@std/io/write-all";
34
+ *
35
+ * const contentBytes = new TextEncoder().encode("Hello World");
36
+ * writeAllSync(Deno.stdout, contentBytes);
37
+ * ```
38
+ *
39
+ * @example Writing to file
40
+ * ```ts ignore no-assert
41
+ * import { writeAllSync } from "@std/io/write-all";
42
+ *
43
+ * const contentBytes = new TextEncoder().encode("Hello World");
44
+ * using file = Deno.openSync("test.file", { write: true });
45
+ * writeAllSync(file, contentBytes);
46
+ * ```
47
+ *
48
+ * @param writer The writer to write to
49
+ * @param data The data to write
50
+ */
51
+ export declare function writeAllSync(writer: WriterSync, data: Uint8Array): void;
52
+ //# sourceMappingURL=write_all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write_all.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.3/write_all.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,iBAK9D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,QAKhE"}
@@ -0,0 +1,61 @@
1
+ // Copyright 2018-2026 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
5
+ *
6
+ * @example Writing to stdout
7
+ * ```ts no-assert
8
+ * import { writeAll } from "@std/io/write-all";
9
+ *
10
+ * const contentBytes = new TextEncoder().encode("Hello World");
11
+ * await writeAll(Deno.stdout, contentBytes);
12
+ * ```
13
+ *
14
+ * @example Writing to file
15
+ * ```ts ignore no-assert
16
+ * import { writeAll } from "@std/io/write-all";
17
+ *
18
+ * const contentBytes = new TextEncoder().encode("Hello World");
19
+ * using file = await Deno.open('test.file', { write: true });
20
+ * await writeAll(file, contentBytes);
21
+ * ```
22
+ *
23
+ * @param writer The writer to write to
24
+ * @param data The data to write
25
+ */
26
+ export async function writeAll(writer, data) {
27
+ let nwritten = 0;
28
+ while (nwritten < data.length) {
29
+ nwritten += await writer.write(data.subarray(nwritten));
30
+ }
31
+ }
32
+ /**
33
+ * Synchronously write all the content of the array buffer (`arr`) to the
34
+ * writer (`w`).
35
+ *
36
+ * @example "riting to stdout
37
+ * ```ts no-assert
38
+ * import { writeAllSync } from "@std/io/write-all";
39
+ *
40
+ * const contentBytes = new TextEncoder().encode("Hello World");
41
+ * writeAllSync(Deno.stdout, contentBytes);
42
+ * ```
43
+ *
44
+ * @example Writing to file
45
+ * ```ts ignore no-assert
46
+ * import { writeAllSync } from "@std/io/write-all";
47
+ *
48
+ * const contentBytes = new TextEncoder().encode("Hello World");
49
+ * using file = Deno.openSync("test.file", { write: true });
50
+ * writeAllSync(file, contentBytes);
51
+ * ```
52
+ *
53
+ * @param writer The writer to write to
54
+ * @param data The data to write
55
+ */
56
+ export function writeAllSync(writer, data) {
57
+ let nwritten = 0;
58
+ while (nwritten < data.length) {
59
+ nwritten += writer.writeSync(data.subarray(nwritten));
60
+ }
61
+ }
@@ -7,7 +7,7 @@ var _FileHandler_instances, _FileHandler_unloadCallback, _FileHandler_resetBuffe
7
7
  // Copyright 2018-2025 the Deno authors. MIT license.
8
8
  import { LogLevels } from "./levels.js";
9
9
  import { BaseHandler } from "./base_handler.js";
10
- import { writeAllSync } from "../../io/0.225.2/write_all.js";
10
+ import { writeAllSync } from "../../io/0.225.3/write_all.js";
11
11
  import { bufSymbol, encoderSymbol, filenameSymbol, fileSymbol, modeSymbol, openOptionsSymbol, pointerSymbol, } from "./_file_handler_symbols.js";
12
12
  /**
13
13
  * A file-based log handler that writes log messages to a specified file with buffering and optional modes.
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA2SxE,CAAC"}
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA0SxE,CAAC"}
@@ -12,12 +12,12 @@
12
12
  */
13
13
  import cors from 'cors';
14
14
  import express from 'express';
15
+ import xmlparser from 'express-xml-bodyparser';
15
16
  import { pipeline } from 'node:stream/promises';
16
17
  import { Observable } from 'rxjs';
17
18
  import { createActIdDynamicWebhookMiddleware, createStaticWebhookMiddleware, createUserIdDynamicWebhookMiddleware, } from '../../../dsl/http/versori/webhookmiddleware.js';
18
19
  import { WebhookTrigger } from '../../../dsl/triggers/WebhookTrigger.js';
19
20
  import { envVarEnvId } from '../../../internal/constants.js';
20
- import xmlparser from 'express-xml-bodyparser';
21
21
  const xml2jsDefaults = {
22
22
  explicitArray: false,
23
23
  normalize: false,
@@ -97,7 +97,7 @@ export const webhookCompiler = {
97
97
  request: req,
98
98
  });
99
99
  if (!trigger.options.request?.rawBody) {
100
- ctx.webhookRouter.use(express.json({ limit: '50mb' }));
100
+ ctx.webhookRouter.use(express.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
101
101
  ctx.webhookRouter.use(xmlparser(xml2jsDefaults));
102
102
  }
103
103
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA4SxE,CAAC"}
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA2SxE,CAAC"}
@@ -12,12 +12,12 @@
12
12
  */
13
13
  import cors from 'cors';
14
14
  import express from 'express';
15
+ import xmlparser from 'express-xml-bodyparser';
15
16
  import { pipeline } from 'node:stream/promises';
16
17
  import { Observable } from 'rxjs';
17
18
  import { createActIdDynamicWebhookMiddleware, createStaticWebhookMiddleware, createUserIdDynamicWebhookMiddleware, } from '../../../dsl/http/versori/webhookmiddleware.js';
18
19
  import { WebhookTrigger } from '../../../dsl/triggers/WebhookTrigger.js';
19
20
  import { envVarEnvId } from '../../../internal/constants.js';
20
- import xmlparser from 'express-xml-bodyparser';
21
21
  const xml2jsDefaults = {
22
22
  explicitArray: false,
23
23
  normalize: false,
@@ -97,7 +97,7 @@ export const webhookCompiler = {
97
97
  request: req,
98
98
  });
99
99
  if (!trigger.options.request?.rawBody) {
100
- ctx.webhookRouter.use(express.json({ limit: '50mb' }));
100
+ ctx.webhookRouter.use(express.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
101
101
  ctx.webhookRouter.use(xmlparser(xml2jsDefaults));
102
102
  }
103
103
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versori/run",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
4
4
  "description": "Versori Run",
5
5
  "homepage": "https://github.com/versori/versori-run#readme",
6
6
  "repository": {
@@ -0,0 +1,146 @@
1
+ /**
2
+ * An abstract interface which when implemented provides an interface to read
3
+ * bytes into an array buffer asynchronously.
4
+ */
5
+ export interface Reader {
6
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
7
+ * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
8
+ * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
9
+ * use all of `p` as scratch space during the call. If some data is
10
+ * available but not `p.byteLength` bytes, `read()` conventionally resolves
11
+ * to what is available instead of waiting for more.
12
+ *
13
+ * When `read()` encounters end-of-file condition, it resolves to EOF
14
+ * (`null`).
15
+ *
16
+ * When `read()` encounters an error, it rejects with an error.
17
+ *
18
+ * Callers should always process the `n` > `0` bytes returned before
19
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
20
+ * happen after reading some bytes and also both of the allowed EOF
21
+ * behaviors.
22
+ *
23
+ * Implementations should not retain a reference to `p`.
24
+ *
25
+ * Use
26
+ * {@linkcode @std/io/to-iterator.ts?s=toIterator}
27
+ * to turn a {@linkcode Reader} into an {@linkcode AsyncIterableIterator}.
28
+ */
29
+ read(p: Uint8Array): Promise<number | null>;
30
+ }
31
+ /**
32
+ * An abstract interface which when implemented provides an interface to read
33
+ * bytes into an array buffer synchronously.
34
+ */
35
+ export interface ReaderSync {
36
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
37
+ * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
38
+ * encountered. Even if `read()` returns `n` < `p.byteLength`, it may use
39
+ * all of `p` as scratch space during the call. If some data is available
40
+ * but not `p.byteLength` bytes, `read()` conventionally returns what is
41
+ * available instead of waiting for more.
42
+ *
43
+ * When `readSync()` encounters end-of-file condition, it returns EOF
44
+ * (`null`).
45
+ *
46
+ * When `readSync()` encounters an error, it throws with an error.
47
+ *
48
+ * Callers should always process the `n` > `0` bytes returned before
49
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that happen
50
+ * after reading some bytes and also both of the allowed EOF behaviors.
51
+ *
52
+ * Implementations should not retain a reference to `p`.
53
+ *
54
+ * Use
55
+ * {@linkcode @std/io/to-iterator.ts?s=toIteratorSync}
56
+ * to turn a {@linkcode ReaderSync} into an {@linkcode IterableIterator}.
57
+ */
58
+ readSync(p: Uint8Array): number | null;
59
+ }
60
+ /**
61
+ * An abstract interface which when implemented provides an interface to write
62
+ * bytes from an array buffer to a file/resource asynchronously.
63
+ */
64
+ export interface Writer {
65
+ /** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
66
+ * resolves to the number of bytes written from `p` (`0` <= `n` <=
67
+ * `p.byteLength`) or reject with the error encountered that caused the
68
+ * write to stop early. `write()` must reject with a non-null error if
69
+ * would resolve to `n` < `p.byteLength`. `write()` must not modify the
70
+ * slice data, even temporarily.
71
+ *
72
+ * Implementations should not retain a reference to `p`.
73
+ */
74
+ write(p: Uint8Array): Promise<number>;
75
+ }
76
+ /**
77
+ * An abstract interface which when implemented provides an interface to write
78
+ * bytes from an array buffer to a file/resource synchronously.
79
+ */
80
+ export interface WriterSync {
81
+ /** Writes `p.byteLength` bytes from `p` to the underlying data
82
+ * stream. It returns the number of bytes written from `p` (`0` <= `n`
83
+ * <= `p.byteLength`) and any error encountered that caused the write to
84
+ * stop early. `writeSync()` must throw a non-null error if it returns `n` <
85
+ * `p.byteLength`. `writeSync()` must not modify the slice data, even
86
+ * temporarily.
87
+ *
88
+ * Implementations should not retain a reference to `p`.
89
+ */
90
+ writeSync(p: Uint8Array): number;
91
+ }
92
+ /**
93
+ * An abstract interface which when implemented provides an interface to close
94
+ * files/resources that were previously opened.
95
+ */
96
+ export interface Closer {
97
+ /** Closes the resource, "freeing" the backing file/resource. */
98
+ close(): void;
99
+ }
100
+ /**
101
+ * A enum which defines the seek mode for IO related APIs that support
102
+ * seeking.
103
+ */
104
+ export declare enum SeekMode {
105
+ Start = 0,
106
+ Current = 1,
107
+ End = 2
108
+ }
109
+ /**
110
+ * An abstract interface which when implemented provides an interface to seek
111
+ * within an open file/resource asynchronously.
112
+ */
113
+ export interface Seeker {
114
+ /** Seek sets the offset for the next `read()` or `write()` to offset,
115
+ * interpreted according to `whence`: `Start` means relative to the
116
+ * start of the file, `Current` means relative to the current offset,
117
+ * and `End` means relative to the end. Seek resolves to the new offset
118
+ * relative to the start of the file.
119
+ *
120
+ * Seeking to an offset before the start of the file is an error. Seeking to
121
+ * any positive offset is legal, but the behavior of subsequent I/O
122
+ * operations on the underlying object is implementation-dependent.
123
+ *
124
+ * It resolves with the updated offset.
125
+ */
126
+ seek(offset: number | bigint, whence: SeekMode): Promise<number>;
127
+ }
128
+ /**
129
+ * An abstract interface which when implemented provides an interface to seek
130
+ * within an open file/resource synchronously.
131
+ */
132
+ export interface SeekerSync {
133
+ /** Seek sets the offset for the next `readSync()` or `writeSync()` to
134
+ * offset, interpreted according to `whence`: `Start` means relative
135
+ * to the start of the file, `Current` means relative to the current
136
+ * offset, and `End` means relative to the end.
137
+ *
138
+ * Seeking to an offset before the start of the file is an error. Seeking to
139
+ * any positive offset is legal, but the behavior of subsequent I/O
140
+ * operations on the underlying object is implementation-dependent.
141
+ *
142
+ * It returns the updated offset.
143
+ */
144
+ seekSync(offset: number | bigint, whence: SeekMode): number;
145
+ }
146
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.3/types.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;OAQG;IACH,KAAK,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AACD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;OAQG;IACH,SAAS,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,oBAAY,QAAQ;IAElB,KAAK,IAAI;IAET,OAAO,IAAI;IAEX,GAAG,IAAI;CACR;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC7D"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // Copyright 2018-2026 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.SeekMode = void 0;
6
+ /**
7
+ * A enum which defines the seek mode for IO related APIs that support
8
+ * seeking.
9
+ */
10
+ var SeekMode;
11
+ (function (SeekMode) {
12
+ /* Seek from the start of the file/resource. */
13
+ SeekMode[SeekMode["Start"] = 0] = "Start";
14
+ /* Seek from the current position within the file/resource. */
15
+ SeekMode[SeekMode["Current"] = 1] = "Current";
16
+ /* Seek from the end of the current file/resource. */
17
+ SeekMode[SeekMode["End"] = 2] = "End";
18
+ })(SeekMode || (exports.SeekMode = SeekMode = {}));
@@ -0,0 +1,52 @@
1
+ import type { Writer, WriterSync } from "./types.js";
2
+ export type { Writer, WriterSync } from "./types.js";
3
+ /**
4
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
5
+ *
6
+ * @example Writing to stdout
7
+ * ```ts no-assert
8
+ * import { writeAll } from "@std/io/write-all";
9
+ *
10
+ * const contentBytes = new TextEncoder().encode("Hello World");
11
+ * await writeAll(Deno.stdout, contentBytes);
12
+ * ```
13
+ *
14
+ * @example Writing to file
15
+ * ```ts ignore no-assert
16
+ * import { writeAll } from "@std/io/write-all";
17
+ *
18
+ * const contentBytes = new TextEncoder().encode("Hello World");
19
+ * using file = await Deno.open('test.file', { write: true });
20
+ * await writeAll(file, contentBytes);
21
+ * ```
22
+ *
23
+ * @param writer The writer to write to
24
+ * @param data The data to write
25
+ */
26
+ export declare function writeAll(writer: Writer, data: Uint8Array): Promise<void>;
27
+ /**
28
+ * Synchronously write all the content of the array buffer (`arr`) to the
29
+ * writer (`w`).
30
+ *
31
+ * @example "riting to stdout
32
+ * ```ts no-assert
33
+ * import { writeAllSync } from "@std/io/write-all";
34
+ *
35
+ * const contentBytes = new TextEncoder().encode("Hello World");
36
+ * writeAllSync(Deno.stdout, contentBytes);
37
+ * ```
38
+ *
39
+ * @example Writing to file
40
+ * ```ts ignore no-assert
41
+ * import { writeAllSync } from "@std/io/write-all";
42
+ *
43
+ * const contentBytes = new TextEncoder().encode("Hello World");
44
+ * using file = Deno.openSync("test.file", { write: true });
45
+ * writeAllSync(file, contentBytes);
46
+ * ```
47
+ *
48
+ * @param writer The writer to write to
49
+ * @param data The data to write
50
+ */
51
+ export declare function writeAllSync(writer: WriterSync, data: Uint8Array): void;
52
+ //# sourceMappingURL=write_all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write_all.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/io/0.225.3/write_all.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,iBAK9D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,QAKhE"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ // Copyright 2018-2026 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.writeAll = writeAll;
6
+ exports.writeAllSync = writeAllSync;
7
+ /**
8
+ * Write all the content of the array buffer (`arr`) to the writer (`w`).
9
+ *
10
+ * @example Writing to stdout
11
+ * ```ts no-assert
12
+ * import { writeAll } from "@std/io/write-all";
13
+ *
14
+ * const contentBytes = new TextEncoder().encode("Hello World");
15
+ * await writeAll(Deno.stdout, contentBytes);
16
+ * ```
17
+ *
18
+ * @example Writing to file
19
+ * ```ts ignore no-assert
20
+ * import { writeAll } from "@std/io/write-all";
21
+ *
22
+ * const contentBytes = new TextEncoder().encode("Hello World");
23
+ * using file = await Deno.open('test.file', { write: true });
24
+ * await writeAll(file, contentBytes);
25
+ * ```
26
+ *
27
+ * @param writer The writer to write to
28
+ * @param data The data to write
29
+ */
30
+ async function writeAll(writer, data) {
31
+ let nwritten = 0;
32
+ while (nwritten < data.length) {
33
+ nwritten += await writer.write(data.subarray(nwritten));
34
+ }
35
+ }
36
+ /**
37
+ * Synchronously write all the content of the array buffer (`arr`) to the
38
+ * writer (`w`).
39
+ *
40
+ * @example "riting to stdout
41
+ * ```ts no-assert
42
+ * import { writeAllSync } from "@std/io/write-all";
43
+ *
44
+ * const contentBytes = new TextEncoder().encode("Hello World");
45
+ * writeAllSync(Deno.stdout, contentBytes);
46
+ * ```
47
+ *
48
+ * @example Writing to file
49
+ * ```ts ignore no-assert
50
+ * import { writeAllSync } from "@std/io/write-all";
51
+ *
52
+ * const contentBytes = new TextEncoder().encode("Hello World");
53
+ * using file = Deno.openSync("test.file", { write: true });
54
+ * writeAllSync(file, contentBytes);
55
+ * ```
56
+ *
57
+ * @param writer The writer to write to
58
+ * @param data The data to write
59
+ */
60
+ function writeAllSync(writer, data) {
61
+ let nwritten = 0;
62
+ while (nwritten < data.length) {
63
+ nwritten += writer.writeSync(data.subarray(nwritten));
64
+ }
65
+ }
@@ -10,7 +10,7 @@ exports.FileHandler = void 0;
10
10
  // Copyright 2018-2025 the Deno authors. MIT license.
11
11
  const levels_js_1 = require("./levels.js");
12
12
  const base_handler_js_1 = require("./base_handler.js");
13
- const write_all_js_1 = require("../../io/0.225.2/write_all.js");
13
+ const write_all_js_1 = require("../../io/0.225.3/write_all.js");
14
14
  const _file_handler_symbols_js_1 = require("./_file_handler_symbols.js");
15
15
  /**
16
16
  * A file-based log handler that writes log messages to a specified file with buffering and optional modes.
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA2SxE,CAAC"}
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/durable/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA0SxE,CAAC"}
@@ -18,12 +18,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.webhookCompiler = void 0;
19
19
  const cors_1 = __importDefault(require("cors"));
20
20
  const express_1 = __importDefault(require("express"));
21
+ const express_xml_bodyparser_1 = __importDefault(require("express-xml-bodyparser"));
21
22
  const promises_1 = require("node:stream/promises");
22
23
  const rxjs_1 = require("rxjs");
23
24
  const webhookmiddleware_js_1 = require("../../../dsl/http/versori/webhookmiddleware.js");
24
25
  const WebhookTrigger_js_1 = require("../../../dsl/triggers/WebhookTrigger.js");
25
26
  const constants_js_1 = require("../../../internal/constants.js");
26
- const express_xml_bodyparser_1 = __importDefault(require("express-xml-bodyparser"));
27
27
  const xml2jsDefaults = {
28
28
  explicitArray: false,
29
29
  normalize: false,
@@ -103,7 +103,7 @@ exports.webhookCompiler = {
103
103
  request: req,
104
104
  });
105
105
  if (!trigger.options.request?.rawBody) {
106
- ctx.webhookRouter.use(express_1.default.json({ limit: '50mb' }));
106
+ ctx.webhookRouter.use(express_1.default.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
107
107
  ctx.webhookRouter.use((0, express_xml_bodyparser_1.default)(xml2jsDefaults));
108
108
  }
109
109
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA4SxE,CAAC"}
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/src/interpreter/memory/compilers/webhook.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuD7C,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE,cAAc,CA2SxE,CAAC"}
@@ -18,12 +18,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.webhookCompiler = void 0;
19
19
  const cors_1 = __importDefault(require("cors"));
20
20
  const express_1 = __importDefault(require("express"));
21
+ const express_xml_bodyparser_1 = __importDefault(require("express-xml-bodyparser"));
21
22
  const promises_1 = require("node:stream/promises");
22
23
  const rxjs_1 = require("rxjs");
23
24
  const webhookmiddleware_js_1 = require("../../../dsl/http/versori/webhookmiddleware.js");
24
25
  const WebhookTrigger_js_1 = require("../../../dsl/triggers/WebhookTrigger.js");
25
26
  const constants_js_1 = require("../../../internal/constants.js");
26
- const express_xml_bodyparser_1 = __importDefault(require("express-xml-bodyparser"));
27
27
  const xml2jsDefaults = {
28
28
  explicitArray: false,
29
29
  normalize: false,
@@ -103,7 +103,7 @@ exports.webhookCompiler = {
103
103
  request: req,
104
104
  });
105
105
  if (!trigger.options.request?.rawBody) {
106
- ctx.webhookRouter.use(express_1.default.json({ limit: '50mb' }));
106
+ ctx.webhookRouter.use(express_1.default.json({ limit: '50mb', type: ['application/json', '*/*+json'] }));
107
107
  ctx.webhookRouter.use((0, express_xml_bodyparser_1.default)(xml2jsDefaults));
108
108
  }
109
109
  else {