@naylence/runtime 0.3.9 → 0.3.10

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.
@@ -100,12 +100,12 @@ installProcessEnvShim();
100
100
  // --- END ENV SHIM ---
101
101
 
102
102
  // This file is auto-generated during build - do not edit manually
103
- // Generated from package.json version: 0.3.9
103
+ // Generated from package.json version: 0.3.10
104
104
  /**
105
105
  * The package version, injected at build time.
106
106
  * @internal
107
107
  */
108
- const VERSION = '0.3.9';
108
+ const VERSION = '0.3.10';
109
109
 
110
110
  /**
111
111
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -4538,13 +4538,18 @@ class NodeEnvelopeFactory {
4538
4538
  this.sidFn = sidFn;
4539
4539
  }
4540
4540
  createEnvelope(options) {
4541
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4541
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4542
4542
  const optionsRecord = isPlainRecord$8(options)
4543
4543
  ? options
4544
4544
  : {};
4545
4545
  validateFrame(frame);
4546
4546
  const sidValue = this.sidFn();
4547
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4547
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4548
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
4549
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
4550
+ typeof sidInput === 'string') {
4551
+ sanitizedSid = sidInput.trim();
4552
+ }
4548
4553
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
4549
4554
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
4550
4555
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -98,12 +98,12 @@ installProcessEnvShim();
98
98
  // --- END ENV SHIM ---
99
99
 
100
100
  // This file is auto-generated during build - do not edit manually
101
- // Generated from package.json version: 0.3.9
101
+ // Generated from package.json version: 0.3.10
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.9';
106
+ const VERSION = '0.3.10';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -4536,13 +4536,18 @@ class NodeEnvelopeFactory {
4536
4536
  this.sidFn = sidFn;
4537
4537
  }
4538
4538
  createEnvelope(options) {
4539
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4539
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4540
4540
  const optionsRecord = isPlainRecord$8(options)
4541
4541
  ? options
4542
4542
  : {};
4543
4543
  validateFrame(frame);
4544
4544
  const sidValue = this.sidFn();
4545
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4545
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4546
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
4547
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
4548
+ typeof sidInput === 'string') {
4549
+ sanitizedSid = sidInput.trim();
4550
+ }
4546
4551
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
4547
4552
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
4548
4553
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -8,13 +8,18 @@ class NodeEnvelopeFactory {
8
8
  this.sidFn = sidFn;
9
9
  }
10
10
  createEnvelope(options) {
11
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
11
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
12
12
  const optionsRecord = isPlainRecord(options)
13
13
  ? options
14
14
  : {};
15
15
  validateFrame(frame);
16
16
  const sidValue = this.sidFn();
17
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
17
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
18
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
19
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
20
+ typeof sidInput === 'string') {
21
+ sanitizedSid = sidInput.trim();
22
+ }
18
23
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
19
24
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
20
25
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // This file is auto-generated during build - do not edit manually
3
- // Generated from package.json version: 0.3.9
3
+ // Generated from package.json version: 0.3.10
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VERSION = void 0;
6
6
  /**
7
7
  * The package version, injected at build time.
8
8
  * @internal
9
9
  */
10
- exports.VERSION = '0.3.9';
10
+ exports.VERSION = '0.3.10';
@@ -5,13 +5,18 @@ export class NodeEnvelopeFactory {
5
5
  this.sidFn = sidFn;
6
6
  }
7
7
  createEnvelope(options) {
8
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
8
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
9
9
  const optionsRecord = isPlainRecord(options)
10
10
  ? options
11
11
  : {};
12
12
  validateFrame(frame);
13
13
  const sidValue = this.sidFn();
14
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
14
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
15
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
16
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
17
+ typeof sidInput === 'string') {
18
+ sanitizedSid = sidInput.trim();
19
+ }
15
20
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
16
21
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
17
22
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated during build - do not edit manually
2
- // Generated from package.json version: 0.3.9
2
+ // Generated from package.json version: 0.3.10
3
3
  /**
4
4
  * The package version, injected at build time.
5
5
  * @internal
6
6
  */
7
- export const VERSION = '0.3.9';
7
+ export const VERSION = '0.3.10';
@@ -14,12 +14,12 @@ var fastify = require('fastify');
14
14
  var websocketPlugin = require('@fastify/websocket');
15
15
 
16
16
  // This file is auto-generated during build - do not edit manually
17
- // Generated from package.json version: 0.3.9
17
+ // Generated from package.json version: 0.3.10
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.9';
22
+ const VERSION = '0.3.10';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -4452,13 +4452,18 @@ class NodeEnvelopeFactory {
4452
4452
  this.sidFn = sidFn;
4453
4453
  }
4454
4454
  createEnvelope(options) {
4455
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4455
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4456
4456
  const optionsRecord = isPlainRecord$8(options)
4457
4457
  ? options
4458
4458
  : {};
4459
4459
  validateFrame(frame);
4460
4460
  const sidValue = this.sidFn();
4461
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4461
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4462
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
4463
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
4464
+ typeof sidInput === 'string') {
4465
+ sanitizedSid = sidInput.trim();
4466
+ }
4462
4467
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
4463
4468
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
4464
4469
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -13,12 +13,12 @@ import fastify from 'fastify';
13
13
  import websocketPlugin from '@fastify/websocket';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.9
16
+ // Generated from package.json version: 0.3.10
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.9';
21
+ const VERSION = '0.3.10';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -4451,13 +4451,18 @@ class NodeEnvelopeFactory {
4451
4451
  this.sidFn = sidFn;
4452
4452
  }
4453
4453
  createEnvelope(options) {
4454
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4454
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
4455
4455
  const optionsRecord = isPlainRecord$8(options)
4456
4456
  ? options
4457
4457
  : {};
4458
4458
  validateFrame(frame);
4459
4459
  const sidValue = this.sidFn();
4460
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4460
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
4461
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
4462
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
4463
+ typeof sidInput === 'string') {
4464
+ sanitizedSid = sidInput.trim();
4465
+ }
4461
4466
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
4462
4467
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
4463
4468
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -5563,12 +5563,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5563
5563
  }
5564
5564
 
5565
5565
  // This file is auto-generated during build - do not edit manually
5566
- // Generated from package.json version: 0.3.9
5566
+ // Generated from package.json version: 0.3.10
5567
5567
  /**
5568
5568
  * The package version, injected at build time.
5569
5569
  * @internal
5570
5570
  */
5571
- const VERSION = '0.3.9';
5571
+ const VERSION = '0.3.10';
5572
5572
 
5573
5573
  /**
5574
5574
  * Fame errors module - Fame protocol specific error classes
@@ -7088,13 +7088,18 @@ class NodeEnvelopeFactory {
7088
7088
  this.sidFn = sidFn;
7089
7089
  }
7090
7090
  createEnvelope(options) {
7091
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
7091
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
7092
7092
  const optionsRecord = isPlainRecord$8(options)
7093
7093
  ? options
7094
7094
  : {};
7095
7095
  validateFrame(frame);
7096
7096
  const sidValue = this.sidFn();
7097
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
7097
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
7098
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
7099
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
7100
+ typeof sidInput === 'string') {
7101
+ sanitizedSid = sidInput.trim();
7102
+ }
7098
7103
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
7099
7104
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
7100
7105
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -5562,12 +5562,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5562
5562
  }
5563
5563
 
5564
5564
  // This file is auto-generated during build - do not edit manually
5565
- // Generated from package.json version: 0.3.9
5565
+ // Generated from package.json version: 0.3.10
5566
5566
  /**
5567
5567
  * The package version, injected at build time.
5568
5568
  * @internal
5569
5569
  */
5570
- const VERSION = '0.3.9';
5570
+ const VERSION = '0.3.10';
5571
5571
 
5572
5572
  /**
5573
5573
  * Fame errors module - Fame protocol specific error classes
@@ -7087,13 +7087,18 @@ class NodeEnvelopeFactory {
7087
7087
  this.sidFn = sidFn;
7088
7088
  }
7089
7089
  createEnvelope(options) {
7090
- const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
7090
+ const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
7091
7091
  const optionsRecord = isPlainRecord$8(options)
7092
7092
  ? options
7093
7093
  : {};
7094
7094
  validateFrame(frame);
7095
7095
  const sidValue = this.sidFn();
7096
- const sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
7096
+ let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
7097
+ const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
7098
+ if ((!sanitizedSid || sanitizedSid.length === 0) &&
7099
+ typeof sidInput === 'string') {
7100
+ sanitizedSid = sidInput.trim();
7101
+ }
7097
7102
  const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
7098
7103
  const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
7099
7104
  const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
@@ -6,6 +6,7 @@ export declare class NodeEnvelopeFactory implements EnvelopeFactory {
6
6
  createEnvelope(options: {
7
7
  frame: AllFramesUnion;
8
8
  id?: string;
9
+ sid?: string | null;
9
10
  traceId?: string;
10
11
  to?: FameEnvelope['to'] | string | null;
11
12
  capabilities?: string[] | null;
@@ -2,4 +2,4 @@
2
2
  * The package version, injected at build time.
3
3
  * @internal
4
4
  */
5
- export declare const VERSION = "0.3.9";
5
+ export declare const VERSION = "0.3.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naylence/runtime",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "description": "Naylence Runtime - Complete TypeScript runtime",
6
6
  "author": "Naylence Dev <naylencedev@gmail.com>",