space-data-module-sdk 0.8.27 → 0.9.1

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.
Files changed (121) hide show
  1. package/README.md +5 -4
  2. package/docs/assembly.js +0 -18
  3. package/docs/assets/ai-credits/ai-credits.js +116 -0
  4. package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
  5. package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
  6. package/docs/browser-wasmedge-isomorphic.html +29 -41
  7. package/docs/byo-wasm-quickstart.html +29 -41
  8. package/docs/conformance.html +29 -41
  9. package/docs/events-abi.html +29 -41
  10. package/docs/families/analytics.html +29 -41
  11. package/docs/families/attitude.html +29 -41
  12. package/docs/families/behavior.html +29 -41
  13. package/docs/families/breakup.html +29 -41
  14. package/docs/families/conjunction.html +29 -41
  15. package/docs/families/data-source.html +29 -41
  16. package/docs/families/effects.html +29 -41
  17. package/docs/families/environment.html +29 -41
  18. package/docs/families/estimation.html +29 -41
  19. package/docs/families/gnc.html +29 -41
  20. package/docs/families/maneuver.html +29 -41
  21. package/docs/families/obstruction.html +29 -41
  22. package/docs/families/propagator.html +29 -41
  23. package/docs/families/propulsion.html +29 -41
  24. package/docs/families/reentry.html +29 -41
  25. package/docs/families/rf.html +29 -41
  26. package/docs/families/scheduler.html +29 -41
  27. package/docs/families/sensor.html +29 -41
  28. package/docs/families/signature.html +29 -41
  29. package/docs/flatsql-host-contract.html +29 -41
  30. package/docs/flatsql-streaming-standard.html +29 -41
  31. package/docs/gpu-module-abi.html +29 -41
  32. package/docs/index.html +43 -47
  33. package/docs/isomorphic-pthreads.html +29 -41
  34. package/docs/isomorphic-sdn-runtime-plan.html +29 -41
  35. package/docs/language-runtime-matrix.html +29 -41
  36. package/docs/media/module-sdk-reel-poster.webp +0 -0
  37. package/docs/media/module-sdk-reel.mp4 +0 -0
  38. package/docs/media/module-sdk-reel.webm +0 -0
  39. package/docs/media/reel/reel.css +53 -0
  40. package/docs/media/reel/reel.js +272 -0
  41. package/docs/module-bundle-runtime-plan.html +29 -41
  42. package/docs/module-publication-standard.html +29 -41
  43. package/docs/node-red-default-node-parity.html +29 -41
  44. package/docs/protect-and-sign.html +29 -41
  45. package/docs/protocol-installation.html +29 -41
  46. package/docs/publication-submission.html +29 -41
  47. package/docs/secrets-capability.html +29 -41
  48. package/docs/styles.css +89 -157
  49. package/docs/testing-harness.html +29 -41
  50. package/docs/tri-runtime-parity-gate.html +29 -41
  51. package/docs/tri-runtime-parity.html +29 -41
  52. package/package.json +5 -3
  53. package/schemas/runtime/FlowNotice.fbs +39 -0
  54. package/schemas/runtime/HostOps.fbs +455 -0
  55. package/schemas/runtime/HttpRequest.fbs +25 -0
  56. package/schemas/runtime/HttpResponse.fbs +24 -0
  57. package/schemas/runtime/IngestRequest.fbs +61 -0
  58. package/schemas/runtime/IngestResult.fbs +23 -0
  59. package/schemas/runtime/ModuleConfig.fbs +41 -0
  60. package/schemas/runtime/RuntimeCommon.fbs +33 -0
  61. package/schemas/runtime/TimerTick.fbs +18 -0
  62. package/src/capabilities.js +3 -0
  63. package/src/compiler/compileModule.js +20 -2
  64. package/src/generated/runtime/aligned/HostOps_aligned.js +3913 -0
  65. package/src/generated/runtime/aligned/HostOps_aligned.ts +4605 -0
  66. package/src/generated/runtime/aligned/HostOps_enums.js +12 -0
  67. package/src/generated/runtime/aligned/HostOps_enums.ts +6 -0
  68. package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
  69. package/src/generated/runtime/cpp/HostOps_aligned.h +3540 -0
  70. package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
  71. package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
  72. package/src/generated/runtime/cpp/IngestRequest_generated.h +829 -0
  73. package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
  74. package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
  75. package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
  76. package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
  77. package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
  78. package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
  79. package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
  80. package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
  81. package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
  82. package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
  83. package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
  84. package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
  85. package/src/generated/runtime/sdn/runtime/Header.js +79 -0
  86. package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
  87. package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
  88. package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
  89. package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
  90. package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
  91. package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
  92. package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
  93. package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
  94. package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
  95. package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
  96. package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
  97. package/src/generated/runtime/sdn/runtime/Provenance.js +320 -0
  98. package/src/generated/runtime/sdn/runtime/Provenance.ts +405 -0
  99. package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
  100. package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
  101. package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
  102. package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
  103. package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
  104. package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
  105. package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
  106. package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
  107. package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
  108. package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
  109. package/src/generated/runtime/sdn/runtime.js +16 -0
  110. package/src/generated/runtime/sdn/runtime.ts +17 -0
  111. package/src/host/abi.js +32 -6
  112. package/src/host/adapterOperations.js +79 -0
  113. package/src/host/browserHost.js +65 -2
  114. package/src/host/cpp/typedHostcall.hpp +252 -0
  115. package/src/host/hostWorkerBundleSources.js +3 -3
  116. package/src/host/nodeHost.js +50 -0
  117. package/src/host/typedDispatch.js +582 -0
  118. package/src/index.d.ts +25 -2
  119. package/src/invoke/codec.js +3 -2
  120. package/src/standards/runtimeContracts.js +596 -0
  121. package/src/standards/sharedCatalog.js +27 -0
@@ -0,0 +1,78 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import * as flatbuffers from "flatbuffers";
5
+ class ArchiveTarget {
6
+ constructor() {
7
+ __publicField(this, "bb", null);
8
+ __publicField(this, "bb_pos", 0);
9
+ }
10
+ __init(i, bb) {
11
+ this.bb_pos = i;
12
+ this.bb = bb;
13
+ return this;
14
+ }
15
+ static getRootAsArchiveTarget(bb, obj) {
16
+ return (obj || new ArchiveTarget()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
17
+ }
18
+ static getSizePrefixedRootAsArchiveTarget(bb, obj) {
19
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
20
+ return (obj || new ArchiveTarget()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
21
+ }
22
+ SOURCE(optionalEncoding) {
23
+ const offset = this.bb.__offset(this.bb_pos, 4);
24
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
25
+ }
26
+ NAME(optionalEncoding) {
27
+ const offset = this.bb.__offset(this.bb_pos, 6);
28
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
29
+ }
30
+ static startArchiveTarget(builder) {
31
+ builder.startObject(2);
32
+ }
33
+ static addSource(builder, SOURCEOffset) {
34
+ builder.addFieldOffset(0, SOURCEOffset, 0);
35
+ }
36
+ static addName(builder, NAMEOffset) {
37
+ builder.addFieldOffset(1, NAMEOffset, 0);
38
+ }
39
+ static endArchiveTarget(builder) {
40
+ const offset = builder.endObject();
41
+ return offset;
42
+ }
43
+ static createArchiveTarget(builder, SOURCEOffset, NAMEOffset) {
44
+ ArchiveTarget.startArchiveTarget(builder);
45
+ ArchiveTarget.addSource(builder, SOURCEOffset);
46
+ ArchiveTarget.addName(builder, NAMEOffset);
47
+ return ArchiveTarget.endArchiveTarget(builder);
48
+ }
49
+ unpack() {
50
+ return new ArchiveTargetT(
51
+ this.SOURCE(),
52
+ this.NAME()
53
+ );
54
+ }
55
+ unpackTo(_o) {
56
+ _o.SOURCE = this.SOURCE();
57
+ _o.NAME = this.NAME();
58
+ }
59
+ }
60
+ class ArchiveTargetT {
61
+ constructor(SOURCE = null, NAME = null) {
62
+ __publicField(this, "SOURCE", SOURCE);
63
+ __publicField(this, "NAME", NAME);
64
+ }
65
+ pack(builder) {
66
+ const SOURCE = this.SOURCE !== null ? builder.createString(this.SOURCE) : 0;
67
+ const NAME = this.NAME !== null ? builder.createString(this.NAME) : 0;
68
+ return ArchiveTarget.createArchiveTarget(
69
+ builder,
70
+ SOURCE,
71
+ NAME
72
+ );
73
+ }
74
+ }
75
+ export {
76
+ ArchiveTarget,
77
+ ArchiveTargetT
78
+ };
@@ -0,0 +1,104 @@
1
+ // automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
4
+
5
+ import * as flatbuffers from 'flatbuffers';
6
+
7
+
8
+
9
+ /**
10
+ * The raw document a batch was made from, kept by the host when it has an archive root.
11
+ */
12
+ export class ArchiveTarget implements flatbuffers.IUnpackableObject<ArchiveTargetT> {
13
+ bb: flatbuffers.ByteBuffer|null = null;
14
+ bb_pos = 0;
15
+ __init(i:number, bb:flatbuffers.ByteBuffer):ArchiveTarget {
16
+ this.bb_pos = i;
17
+ this.bb = bb;
18
+ return this;
19
+ }
20
+
21
+ static getRootAsArchiveTarget(bb:flatbuffers.ByteBuffer, obj?:ArchiveTarget):ArchiveTarget {
22
+ return (obj || new ArchiveTarget()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
23
+ }
24
+
25
+ static getSizePrefixedRootAsArchiveTarget(bb:flatbuffers.ByteBuffer, obj?:ArchiveTarget):ArchiveTarget {
26
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
27
+ return (obj || new ArchiveTarget()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
28
+ }
29
+
30
+ /**
31
+ * Archive folder (normally the provider).
32
+ */
33
+ SOURCE():string|null
34
+ SOURCE(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
35
+ SOURCE(optionalEncoding?:any):string|Uint8Array|null {
36
+ const offset = this.bb!.__offset(this.bb_pos, 4);
37
+ return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
38
+ }
39
+
40
+ /**
41
+ * File name within it.
42
+ */
43
+ NAME():string|null
44
+ NAME(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
45
+ NAME(optionalEncoding?:any):string|Uint8Array|null {
46
+ const offset = this.bb!.__offset(this.bb_pos, 6);
47
+ return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
48
+ }
49
+
50
+ static startArchiveTarget(builder:flatbuffers.Builder) {
51
+ builder.startObject(2);
52
+ }
53
+
54
+ static addSource(builder:flatbuffers.Builder, SOURCEOffset:flatbuffers.Offset) {
55
+ builder.addFieldOffset(0, SOURCEOffset, 0);
56
+ }
57
+
58
+ static addName(builder:flatbuffers.Builder, NAMEOffset:flatbuffers.Offset) {
59
+ builder.addFieldOffset(1, NAMEOffset, 0);
60
+ }
61
+
62
+ static endArchiveTarget(builder:flatbuffers.Builder):flatbuffers.Offset {
63
+ const offset = builder.endObject();
64
+ return offset;
65
+ }
66
+
67
+ static createArchiveTarget(builder:flatbuffers.Builder, SOURCEOffset:flatbuffers.Offset, NAMEOffset:flatbuffers.Offset):flatbuffers.Offset {
68
+ ArchiveTarget.startArchiveTarget(builder);
69
+ ArchiveTarget.addSource(builder, SOURCEOffset);
70
+ ArchiveTarget.addName(builder, NAMEOffset);
71
+ return ArchiveTarget.endArchiveTarget(builder);
72
+ }
73
+
74
+ unpack(): ArchiveTargetT {
75
+ return new ArchiveTargetT(
76
+ this.SOURCE(),
77
+ this.NAME()
78
+ );
79
+ }
80
+
81
+
82
+ unpackTo(_o: ArchiveTargetT): void {
83
+ _o.SOURCE = this.SOURCE();
84
+ _o.NAME = this.NAME();
85
+ }
86
+ }
87
+
88
+ export class ArchiveTargetT implements flatbuffers.IGeneratedObject {
89
+ constructor(
90
+ public SOURCE: string|Uint8Array|null = null,
91
+ public NAME: string|Uint8Array|null = null
92
+ ){}
93
+
94
+
95
+ pack(builder:flatbuffers.Builder): flatbuffers.Offset {
96
+ const SOURCE = (this.SOURCE !== null ? builder.createString(this.SOURCE!) : 0);
97
+ const NAME = (this.NAME !== null ? builder.createString(this.NAME!) : 0);
98
+
99
+ return ArchiveTarget.createArchiveTarget(builder,
100
+ SOURCE,
101
+ NAME
102
+ );
103
+ }
104
+ }
@@ -0,0 +1,202 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import * as flatbuffers from "flatbuffers";
5
+ import { ConfigTable } from "./ConfigTable.js";
6
+ import { configValueKind } from "./configValueKind.js";
7
+ class ConfigEntry {
8
+ constructor() {
9
+ __publicField(this, "bb", null);
10
+ __publicField(this, "bb_pos", 0);
11
+ }
12
+ __init(i, bb) {
13
+ this.bb_pos = i;
14
+ this.bb = bb;
15
+ return this;
16
+ }
17
+ static getRootAsConfigEntry(bb, obj) {
18
+ return (obj || new ConfigEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
19
+ }
20
+ static getSizePrefixedRootAsConfigEntry(bb, obj) {
21
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
22
+ return (obj || new ConfigEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
23
+ }
24
+ KEY(optionalEncoding) {
25
+ const offset = this.bb.__offset(this.bb_pos, 4);
26
+ return this.bb.__string(this.bb_pos + offset, optionalEncoding);
27
+ }
28
+ KIND() {
29
+ const offset = this.bb.__offset(this.bb_pos, 6);
30
+ return offset ? this.bb.readUint8(this.bb_pos + offset) : configValueKind.String;
31
+ }
32
+ STRING_VALUE(optionalEncoding) {
33
+ const offset = this.bb.__offset(this.bb_pos, 8);
34
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
35
+ }
36
+ NUMBER_VALUE() {
37
+ const offset = this.bb.__offset(this.bb_pos, 10);
38
+ return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0;
39
+ }
40
+ BOOL_VALUE() {
41
+ const offset = this.bb.__offset(this.bb_pos, 12);
42
+ return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
43
+ }
44
+ STRINGS(index, optionalEncoding) {
45
+ const offset = this.bb.__offset(this.bb_pos, 14);
46
+ return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
47
+ }
48
+ stringsLength() {
49
+ const offset = this.bb.__offset(this.bb_pos, 14);
50
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
51
+ }
52
+ NUMBERS(index) {
53
+ const offset = this.bb.__offset(this.bb_pos, 16);
54
+ return offset ? this.bb.readFloat64(this.bb.__vector(this.bb_pos + offset) + index * 8) : 0;
55
+ }
56
+ numbersLength() {
57
+ const offset = this.bb.__offset(this.bb_pos, 16);
58
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
59
+ }
60
+ numbersArray() {
61
+ const offset = this.bb.__offset(this.bb_pos, 16);
62
+ return offset ? new Float64Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
63
+ }
64
+ TABLES(index, obj) {
65
+ const offset = this.bb.__offset(this.bb_pos, 18);
66
+ return offset ? (obj || new ConfigTable()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
67
+ }
68
+ tablesLength() {
69
+ const offset = this.bb.__offset(this.bb_pos, 18);
70
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
71
+ }
72
+ static startConfigEntry(builder) {
73
+ builder.startObject(8);
74
+ }
75
+ static addKey(builder, KEYOffset) {
76
+ builder.addFieldOffset(0, KEYOffset, 0);
77
+ }
78
+ static addKind(builder, KIND) {
79
+ builder.addFieldInt8(1, KIND, configValueKind.String);
80
+ }
81
+ static addStringValue(builder, STRING_VALUEOffset) {
82
+ builder.addFieldOffset(2, STRING_VALUEOffset, 0);
83
+ }
84
+ static addNumberValue(builder, NUMBER_VALUE) {
85
+ builder.addFieldFloat64(3, NUMBER_VALUE, 0);
86
+ }
87
+ static addBoolValue(builder, BOOL_VALUE) {
88
+ builder.addFieldInt8(4, +BOOL_VALUE, 0);
89
+ }
90
+ static addStrings(builder, STRINGSOffset) {
91
+ builder.addFieldOffset(5, STRINGSOffset, 0);
92
+ }
93
+ static createStringsVector(builder, data) {
94
+ builder.startVector(4, data.length, 4);
95
+ for (let i = data.length - 1; i >= 0; i--) {
96
+ builder.addOffset(data[i]);
97
+ }
98
+ return builder.endVector();
99
+ }
100
+ static startStringsVector(builder, numElems) {
101
+ builder.startVector(4, numElems, 4);
102
+ }
103
+ static addNumbers(builder, NUMBERSOffset) {
104
+ builder.addFieldOffset(6, NUMBERSOffset, 0);
105
+ }
106
+ static createNumbersVector(builder, data) {
107
+ builder.startVector(8, data.length, 8);
108
+ for (let i = data.length - 1; i >= 0; i--) {
109
+ builder.addFloat64(data[i]);
110
+ }
111
+ return builder.endVector();
112
+ }
113
+ static startNumbersVector(builder, numElems) {
114
+ builder.startVector(8, numElems, 8);
115
+ }
116
+ static addTables(builder, TABLESOffset) {
117
+ builder.addFieldOffset(7, TABLESOffset, 0);
118
+ }
119
+ static createTablesVector(builder, data) {
120
+ builder.startVector(4, data.length, 4);
121
+ for (let i = data.length - 1; i >= 0; i--) {
122
+ builder.addOffset(data[i]);
123
+ }
124
+ return builder.endVector();
125
+ }
126
+ static startTablesVector(builder, numElems) {
127
+ builder.startVector(4, numElems, 4);
128
+ }
129
+ static endConfigEntry(builder) {
130
+ const offset = builder.endObject();
131
+ builder.requiredField(offset, 4);
132
+ return offset;
133
+ }
134
+ static createConfigEntry(builder, KEYOffset, KIND, STRING_VALUEOffset, NUMBER_VALUE, BOOL_VALUE, STRINGSOffset, NUMBERSOffset, TABLESOffset) {
135
+ ConfigEntry.startConfigEntry(builder);
136
+ ConfigEntry.addKey(builder, KEYOffset);
137
+ ConfigEntry.addKind(builder, KIND);
138
+ ConfigEntry.addStringValue(builder, STRING_VALUEOffset);
139
+ ConfigEntry.addNumberValue(builder, NUMBER_VALUE);
140
+ ConfigEntry.addBoolValue(builder, BOOL_VALUE);
141
+ ConfigEntry.addStrings(builder, STRINGSOffset);
142
+ ConfigEntry.addNumbers(builder, NUMBERSOffset);
143
+ ConfigEntry.addTables(builder, TABLESOffset);
144
+ return ConfigEntry.endConfigEntry(builder);
145
+ }
146
+ unpack() {
147
+ return new ConfigEntryT(
148
+ this.KEY(),
149
+ this.KIND(),
150
+ this.STRING_VALUE(),
151
+ this.NUMBER_VALUE(),
152
+ this.BOOL_VALUE(),
153
+ this.bb.createScalarList(this.STRINGS.bind(this), this.stringsLength()),
154
+ this.bb.createScalarList(this.NUMBERS.bind(this), this.numbersLength()),
155
+ this.bb.createObjList(this.TABLES.bind(this), this.tablesLength())
156
+ );
157
+ }
158
+ unpackTo(_o) {
159
+ _o.KEY = this.KEY();
160
+ _o.KIND = this.KIND();
161
+ _o.STRING_VALUE = this.STRING_VALUE();
162
+ _o.NUMBER_VALUE = this.NUMBER_VALUE();
163
+ _o.BOOL_VALUE = this.BOOL_VALUE();
164
+ _o.STRINGS = this.bb.createScalarList(this.STRINGS.bind(this), this.stringsLength());
165
+ _o.NUMBERS = this.bb.createScalarList(this.NUMBERS.bind(this), this.numbersLength());
166
+ _o.TABLES = this.bb.createObjList(this.TABLES.bind(this), this.tablesLength());
167
+ }
168
+ }
169
+ class ConfigEntryT {
170
+ constructor(KEY = null, KIND = configValueKind.String, STRING_VALUE = null, NUMBER_VALUE = 0, BOOL_VALUE = false, STRINGS = [], NUMBERS = [], TABLES = []) {
171
+ __publicField(this, "KEY", KEY);
172
+ __publicField(this, "KIND", KIND);
173
+ __publicField(this, "STRING_VALUE", STRING_VALUE);
174
+ __publicField(this, "NUMBER_VALUE", NUMBER_VALUE);
175
+ __publicField(this, "BOOL_VALUE", BOOL_VALUE);
176
+ __publicField(this, "STRINGS", STRINGS);
177
+ __publicField(this, "NUMBERS", NUMBERS);
178
+ __publicField(this, "TABLES", TABLES);
179
+ }
180
+ pack(builder) {
181
+ const KEY = this.KEY !== null ? builder.createString(this.KEY) : 0;
182
+ const STRING_VALUE = this.STRING_VALUE !== null ? builder.createString(this.STRING_VALUE) : 0;
183
+ const STRINGS = ConfigEntry.createStringsVector(builder, builder.createObjectOffsetList(this.STRINGS));
184
+ const NUMBERS = ConfigEntry.createNumbersVector(builder, this.NUMBERS);
185
+ const TABLES = ConfigEntry.createTablesVector(builder, builder.createObjectOffsetList(this.TABLES));
186
+ return ConfigEntry.createConfigEntry(
187
+ builder,
188
+ KEY,
189
+ this.KIND,
190
+ STRING_VALUE,
191
+ this.NUMBER_VALUE,
192
+ this.BOOL_VALUE,
193
+ STRINGS,
194
+ NUMBERS,
195
+ TABLES
196
+ );
197
+ }
198
+ }
199
+ export {
200
+ ConfigEntry,
201
+ ConfigEntryT
202
+ };
@@ -0,0 +1,251 @@
1
+ // automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
4
+
5
+ import * as flatbuffers from 'flatbuffers';
6
+
7
+ import { ConfigTable, ConfigTableT } from './ConfigTable.js';
8
+ import { configValueKind } from './configValueKind.js';
9
+
10
+
11
+ /**
12
+ * One configured value, typed. Readers check KIND and read the matching field.
13
+ */
14
+ export class ConfigEntry implements flatbuffers.IUnpackableObject<ConfigEntryT> {
15
+ bb: flatbuffers.ByteBuffer|null = null;
16
+ bb_pos = 0;
17
+ __init(i:number, bb:flatbuffers.ByteBuffer):ConfigEntry {
18
+ this.bb_pos = i;
19
+ this.bb = bb;
20
+ return this;
21
+ }
22
+
23
+ static getRootAsConfigEntry(bb:flatbuffers.ByteBuffer, obj?:ConfigEntry):ConfigEntry {
24
+ return (obj || new ConfigEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
25
+ }
26
+
27
+ static getSizePrefixedRootAsConfigEntry(bb:flatbuffers.ByteBuffer, obj?:ConfigEntry):ConfigEntry {
28
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
29
+ return (obj || new ConfigEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
30
+ }
31
+
32
+ KEY():string
33
+ KEY(optionalEncoding:flatbuffers.Encoding):string|Uint8Array
34
+ KEY(optionalEncoding?:any):string|Uint8Array {
35
+ const offset = this.bb!.__offset(this.bb_pos, 4);
36
+ return this.bb!.__string(this.bb_pos + offset, optionalEncoding);
37
+ }
38
+
39
+ KIND():configValueKind {
40
+ const offset = this.bb!.__offset(this.bb_pos, 6);
41
+ return offset ? this.bb!.readUint8(this.bb_pos + offset) : configValueKind.String;
42
+ }
43
+
44
+ STRING_VALUE():string|null
45
+ STRING_VALUE(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
46
+ STRING_VALUE(optionalEncoding?:any):string|Uint8Array|null {
47
+ const offset = this.bb!.__offset(this.bb_pos, 8);
48
+ return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
49
+ }
50
+
51
+ NUMBER_VALUE():number {
52
+ const offset = this.bb!.__offset(this.bb_pos, 10);
53
+ return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
54
+ }
55
+
56
+ BOOL_VALUE():boolean {
57
+ const offset = this.bb!.__offset(this.bb_pos, 12);
58
+ return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
59
+ }
60
+
61
+ STRINGS(index: number):string
62
+ STRINGS(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
63
+ STRINGS(index: number,optionalEncoding?:any):string|Uint8Array|null {
64
+ const offset = this.bb!.__offset(this.bb_pos, 14);
65
+ return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
66
+ }
67
+
68
+ stringsLength():number {
69
+ const offset = this.bb!.__offset(this.bb_pos, 14);
70
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
71
+ }
72
+
73
+ NUMBERS(index: number):number|null {
74
+ const offset = this.bb!.__offset(this.bb_pos, 16);
75
+ return offset ? this.bb!.readFloat64(this.bb!.__vector(this.bb_pos + offset) + index * 8) : 0;
76
+ }
77
+
78
+ numbersLength():number {
79
+ const offset = this.bb!.__offset(this.bb_pos, 16);
80
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
81
+ }
82
+
83
+ numbersArray():Float64Array|null {
84
+ const offset = this.bb!.__offset(this.bb_pos, 16);
85
+ return offset ? new Float64Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
86
+ }
87
+
88
+ TABLES(index: number, obj?:ConfigTable):ConfigTable|null {
89
+ const offset = this.bb!.__offset(this.bb_pos, 18);
90
+ return offset ? (obj || new ConfigTable()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
91
+ }
92
+
93
+ tablesLength():number {
94
+ const offset = this.bb!.__offset(this.bb_pos, 18);
95
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
96
+ }
97
+
98
+ static startConfigEntry(builder:flatbuffers.Builder) {
99
+ builder.startObject(8);
100
+ }
101
+
102
+ static addKey(builder:flatbuffers.Builder, KEYOffset:flatbuffers.Offset) {
103
+ builder.addFieldOffset(0, KEYOffset, 0);
104
+ }
105
+
106
+ static addKind(builder:flatbuffers.Builder, KIND:configValueKind) {
107
+ builder.addFieldInt8(1, KIND, configValueKind.String);
108
+ }
109
+
110
+ static addStringValue(builder:flatbuffers.Builder, STRING_VALUEOffset:flatbuffers.Offset) {
111
+ builder.addFieldOffset(2, STRING_VALUEOffset, 0);
112
+ }
113
+
114
+ static addNumberValue(builder:flatbuffers.Builder, NUMBER_VALUE:number) {
115
+ builder.addFieldFloat64(3, NUMBER_VALUE, 0.0);
116
+ }
117
+
118
+ static addBoolValue(builder:flatbuffers.Builder, BOOL_VALUE:boolean) {
119
+ builder.addFieldInt8(4, +BOOL_VALUE, +false);
120
+ }
121
+
122
+ static addStrings(builder:flatbuffers.Builder, STRINGSOffset:flatbuffers.Offset) {
123
+ builder.addFieldOffset(5, STRINGSOffset, 0);
124
+ }
125
+
126
+ static createStringsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
127
+ builder.startVector(4, data.length, 4);
128
+ for (let i = data.length - 1; i >= 0; i--) {
129
+ builder.addOffset(data[i]!);
130
+ }
131
+ return builder.endVector();
132
+ }
133
+
134
+ static startStringsVector(builder:flatbuffers.Builder, numElems:number) {
135
+ builder.startVector(4, numElems, 4);
136
+ }
137
+
138
+ static addNumbers(builder:flatbuffers.Builder, NUMBERSOffset:flatbuffers.Offset) {
139
+ builder.addFieldOffset(6, NUMBERSOffset, 0);
140
+ }
141
+
142
+ static createNumbersVector(builder:flatbuffers.Builder, data:number[]|Float64Array):flatbuffers.Offset;
143
+ /**
144
+ * @deprecated This Uint8Array overload will be removed in the future.
145
+ */
146
+ static createNumbersVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset;
147
+ static createNumbersVector(builder:flatbuffers.Builder, data:number[]|Float64Array|Uint8Array):flatbuffers.Offset {
148
+ builder.startVector(8, data.length, 8);
149
+ for (let i = data.length - 1; i >= 0; i--) {
150
+ builder.addFloat64(data[i]!);
151
+ }
152
+ return builder.endVector();
153
+ }
154
+
155
+ static startNumbersVector(builder:flatbuffers.Builder, numElems:number) {
156
+ builder.startVector(8, numElems, 8);
157
+ }
158
+
159
+ static addTables(builder:flatbuffers.Builder, TABLESOffset:flatbuffers.Offset) {
160
+ builder.addFieldOffset(7, TABLESOffset, 0);
161
+ }
162
+
163
+ static createTablesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
164
+ builder.startVector(4, data.length, 4);
165
+ for (let i = data.length - 1; i >= 0; i--) {
166
+ builder.addOffset(data[i]!);
167
+ }
168
+ return builder.endVector();
169
+ }
170
+
171
+ static startTablesVector(builder:flatbuffers.Builder, numElems:number) {
172
+ builder.startVector(4, numElems, 4);
173
+ }
174
+
175
+ static endConfigEntry(builder:flatbuffers.Builder):flatbuffers.Offset {
176
+ const offset = builder.endObject();
177
+ builder.requiredField(offset, 4) // KEY
178
+ return offset;
179
+ }
180
+
181
+ static createConfigEntry(builder:flatbuffers.Builder, KEYOffset:flatbuffers.Offset, KIND:configValueKind, STRING_VALUEOffset:flatbuffers.Offset, NUMBER_VALUE:number, BOOL_VALUE:boolean, STRINGSOffset:flatbuffers.Offset, NUMBERSOffset:flatbuffers.Offset, TABLESOffset:flatbuffers.Offset):flatbuffers.Offset {
182
+ ConfigEntry.startConfigEntry(builder);
183
+ ConfigEntry.addKey(builder, KEYOffset);
184
+ ConfigEntry.addKind(builder, KIND);
185
+ ConfigEntry.addStringValue(builder, STRING_VALUEOffset);
186
+ ConfigEntry.addNumberValue(builder, NUMBER_VALUE);
187
+ ConfigEntry.addBoolValue(builder, BOOL_VALUE);
188
+ ConfigEntry.addStrings(builder, STRINGSOffset);
189
+ ConfigEntry.addNumbers(builder, NUMBERSOffset);
190
+ ConfigEntry.addTables(builder, TABLESOffset);
191
+ return ConfigEntry.endConfigEntry(builder);
192
+ }
193
+
194
+ unpack(): ConfigEntryT {
195
+ return new ConfigEntryT(
196
+ this.KEY(),
197
+ this.KIND(),
198
+ this.STRING_VALUE(),
199
+ this.NUMBER_VALUE(),
200
+ this.BOOL_VALUE(),
201
+ this.bb!.createScalarList<string>(this.STRINGS.bind(this), this.stringsLength()),
202
+ this.bb!.createScalarList<number>(this.NUMBERS.bind(this), this.numbersLength()),
203
+ this.bb!.createObjList<ConfigTable, ConfigTableT>(this.TABLES.bind(this), this.tablesLength())
204
+ );
205
+ }
206
+
207
+
208
+ unpackTo(_o: ConfigEntryT): void {
209
+ _o.KEY = this.KEY();
210
+ _o.KIND = this.KIND();
211
+ _o.STRING_VALUE = this.STRING_VALUE();
212
+ _o.NUMBER_VALUE = this.NUMBER_VALUE();
213
+ _o.BOOL_VALUE = this.BOOL_VALUE();
214
+ _o.STRINGS = this.bb!.createScalarList<string>(this.STRINGS.bind(this), this.stringsLength());
215
+ _o.NUMBERS = this.bb!.createScalarList<number>(this.NUMBERS.bind(this), this.numbersLength());
216
+ _o.TABLES = this.bb!.createObjList<ConfigTable, ConfigTableT>(this.TABLES.bind(this), this.tablesLength());
217
+ }
218
+ }
219
+
220
+ export class ConfigEntryT implements flatbuffers.IGeneratedObject {
221
+ constructor(
222
+ public KEY: string|Uint8Array|null = null,
223
+ public KIND: configValueKind = configValueKind.String,
224
+ public STRING_VALUE: string|Uint8Array|null = null,
225
+ public NUMBER_VALUE: number = 0.0,
226
+ public BOOL_VALUE: boolean = false,
227
+ public STRINGS: (string)[] = [],
228
+ public NUMBERS: (number)[] = [],
229
+ public TABLES: (ConfigTableT)[] = []
230
+ ){}
231
+
232
+
233
+ pack(builder:flatbuffers.Builder): flatbuffers.Offset {
234
+ const KEY = (this.KEY !== null ? builder.createString(this.KEY!) : 0);
235
+ const STRING_VALUE = (this.STRING_VALUE !== null ? builder.createString(this.STRING_VALUE!) : 0);
236
+ const STRINGS = ConfigEntry.createStringsVector(builder, builder.createObjectOffsetList(this.STRINGS));
237
+ const NUMBERS = ConfigEntry.createNumbersVector(builder, this.NUMBERS);
238
+ const TABLES = ConfigEntry.createTablesVector(builder, builder.createObjectOffsetList(this.TABLES));
239
+
240
+ return ConfigEntry.createConfigEntry(builder,
241
+ KEY,
242
+ this.KIND,
243
+ STRING_VALUE,
244
+ this.NUMBER_VALUE,
245
+ this.BOOL_VALUE,
246
+ STRINGS,
247
+ NUMBERS,
248
+ TABLES
249
+ );
250
+ }
251
+ }