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.
- package/README.md +5 -4
- package/docs/assembly.js +0 -18
- package/docs/assets/ai-credits/ai-credits.js +116 -0
- package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
- package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
- package/docs/browser-wasmedge-isomorphic.html +29 -41
- package/docs/byo-wasm-quickstart.html +29 -41
- package/docs/conformance.html +29 -41
- package/docs/events-abi.html +29 -41
- package/docs/families/analytics.html +29 -41
- package/docs/families/attitude.html +29 -41
- package/docs/families/behavior.html +29 -41
- package/docs/families/breakup.html +29 -41
- package/docs/families/conjunction.html +29 -41
- package/docs/families/data-source.html +29 -41
- package/docs/families/effects.html +29 -41
- package/docs/families/environment.html +29 -41
- package/docs/families/estimation.html +29 -41
- package/docs/families/gnc.html +29 -41
- package/docs/families/maneuver.html +29 -41
- package/docs/families/obstruction.html +29 -41
- package/docs/families/propagator.html +29 -41
- package/docs/families/propulsion.html +29 -41
- package/docs/families/reentry.html +29 -41
- package/docs/families/rf.html +29 -41
- package/docs/families/scheduler.html +29 -41
- package/docs/families/sensor.html +29 -41
- package/docs/families/signature.html +29 -41
- package/docs/flatsql-host-contract.html +29 -41
- package/docs/flatsql-streaming-standard.html +29 -41
- package/docs/gpu-module-abi.html +29 -41
- package/docs/index.html +43 -47
- package/docs/isomorphic-pthreads.html +29 -41
- package/docs/isomorphic-sdn-runtime-plan.html +29 -41
- package/docs/language-runtime-matrix.html +29 -41
- package/docs/media/module-sdk-reel-poster.webp +0 -0
- package/docs/media/module-sdk-reel.mp4 +0 -0
- package/docs/media/module-sdk-reel.webm +0 -0
- package/docs/media/reel/reel.css +53 -0
- package/docs/media/reel/reel.js +272 -0
- package/docs/module-bundle-runtime-plan.html +29 -41
- package/docs/module-publication-standard.html +29 -41
- package/docs/node-red-default-node-parity.html +29 -41
- package/docs/protect-and-sign.html +29 -41
- package/docs/protocol-installation.html +29 -41
- package/docs/publication-submission.html +29 -41
- package/docs/secrets-capability.html +29 -41
- package/docs/styles.css +89 -157
- package/docs/testing-harness.html +29 -41
- package/docs/tri-runtime-parity-gate.html +29 -41
- package/docs/tri-runtime-parity.html +29 -41
- package/package.json +5 -3
- package/schemas/runtime/FlowNotice.fbs +39 -0
- package/schemas/runtime/HostOps.fbs +455 -0
- package/schemas/runtime/HttpRequest.fbs +25 -0
- package/schemas/runtime/HttpResponse.fbs +24 -0
- package/schemas/runtime/IngestRequest.fbs +61 -0
- package/schemas/runtime/IngestResult.fbs +23 -0
- package/schemas/runtime/ModuleConfig.fbs +41 -0
- package/schemas/runtime/RuntimeCommon.fbs +33 -0
- package/schemas/runtime/TimerTick.fbs +18 -0
- package/src/capabilities.js +3 -0
- package/src/compiler/compileModule.js +20 -2
- package/src/generated/runtime/aligned/HostOps_aligned.js +3913 -0
- package/src/generated/runtime/aligned/HostOps_aligned.ts +4605 -0
- package/src/generated/runtime/aligned/HostOps_enums.js +12 -0
- package/src/generated/runtime/aligned/HostOps_enums.ts +6 -0
- package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
- package/src/generated/runtime/cpp/HostOps_aligned.h +3540 -0
- package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
- package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
- package/src/generated/runtime/cpp/IngestRequest_generated.h +829 -0
- package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
- package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
- package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
- package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
- package/src/generated/runtime/sdn/runtime/Header.js +79 -0
- package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
- package/src/generated/runtime/sdn/runtime/Provenance.js +320 -0
- package/src/generated/runtime/sdn/runtime/Provenance.ts +405 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
- package/src/generated/runtime/sdn/runtime.js +16 -0
- package/src/generated/runtime/sdn/runtime.ts +17 -0
- package/src/host/abi.js +32 -6
- package/src/host/adapterOperations.js +79 -0
- package/src/host/browserHost.js +65 -2
- package/src/host/cpp/typedHostcall.hpp +252 -0
- package/src/host/hostWorkerBundleSources.js +3 -3
- package/src/host/nodeHost.js +50 -0
- package/src/host/typedDispatch.js +582 -0
- package/src/index.d.ts +25 -2
- package/src/invoke/codec.js +3 -2
- package/src/standards/runtimeContracts.js +596 -0
- package/src/standards/sharedCatalog.js +27 -0
|
@@ -0,0 +1,155 @@
|
|
|
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 { ArchiveTarget, ArchiveTargetT } from './ArchiveTarget.js';
|
|
8
|
+
import { Provenance, ProvenanceT } from './Provenance.js';
|
|
9
|
+
import { SourceTags, SourceTagsT } from './SourceTags.js';
|
|
10
|
+
import { reconcileMode } from './reconcileMode.js';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A request to store one batch of records with its source tags (the storage-ingest host connector). The records
|
|
15
|
+
* themselves travel beside it as the size-prefixed FlatBuffer record stream, the raw document (when archived) as
|
|
16
|
+
* raw bytes. Replaces the storage.ingest_with_source meta JSON.
|
|
17
|
+
*/
|
|
18
|
+
export class IngestRequest implements flatbuffers.IUnpackableObject<IngestRequestT> {
|
|
19
|
+
bb: flatbuffers.ByteBuffer|null = null;
|
|
20
|
+
bb_pos = 0;
|
|
21
|
+
__init(i:number, bb:flatbuffers.ByteBuffer):IngestRequest {
|
|
22
|
+
this.bb_pos = i;
|
|
23
|
+
this.bb = bb;
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getRootAsIngestRequest(bb:flatbuffers.ByteBuffer, obj?:IngestRequest):IngestRequest {
|
|
28
|
+
return (obj || new IngestRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static getSizePrefixedRootAsIngestRequest(bb:flatbuffers.ByteBuffer, obj?:IngestRequest):IngestRequest {
|
|
32
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
33
|
+
return (obj || new IngestRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
|
|
37
|
+
return bb.__has_identifier('INGQ');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The records' standard, e.g. "WXF.fbs".
|
|
42
|
+
*/
|
|
43
|
+
SCHEMA():string
|
|
44
|
+
SCHEMA(optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
|
45
|
+
SCHEMA(optionalEncoding?:any):string|Uint8Array {
|
|
46
|
+
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
47
|
+
return this.bb!.__string(this.bb_pos + offset, optionalEncoding);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
TAGS(obj?:SourceTags):SourceTags|null {
|
|
51
|
+
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
52
|
+
return offset ? (obj || new SourceTags()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
RECONCILE():reconcileMode {
|
|
56
|
+
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
57
|
+
return offset ? this.bb!.readUint8(this.bb_pos + offset) : reconcileMode.Duplicates;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
ARCHIVE(obj?:ArchiveTarget):ArchiveTarget|null {
|
|
61
|
+
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
62
|
+
return offset ? (obj || new ArchiveTarget()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
PROVENANCE(obj?:Provenance):Provenance|null {
|
|
66
|
+
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
67
|
+
return offset ? (obj || new Provenance()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static startIngestRequest(builder:flatbuffers.Builder) {
|
|
71
|
+
builder.startObject(5);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static addSchema(builder:flatbuffers.Builder, SCHEMAOffset:flatbuffers.Offset) {
|
|
75
|
+
builder.addFieldOffset(0, SCHEMAOffset, 0);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static addTags(builder:flatbuffers.Builder, TAGSOffset:flatbuffers.Offset) {
|
|
79
|
+
builder.addFieldOffset(1, TAGSOffset, 0);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static addReconcile(builder:flatbuffers.Builder, RECONCILE:reconcileMode) {
|
|
83
|
+
builder.addFieldInt8(2, RECONCILE, reconcileMode.Duplicates);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static addArchive(builder:flatbuffers.Builder, ARCHIVEOffset:flatbuffers.Offset) {
|
|
87
|
+
builder.addFieldOffset(3, ARCHIVEOffset, 0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static addProvenance(builder:flatbuffers.Builder, PROVENANCEOffset:flatbuffers.Offset) {
|
|
91
|
+
builder.addFieldOffset(4, PROVENANCEOffset, 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static endIngestRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
95
|
+
const offset = builder.endObject();
|
|
96
|
+
builder.requiredField(offset, 4) // SCHEMA
|
|
97
|
+
builder.requiredField(offset, 6) // TAGS
|
|
98
|
+
return offset;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
static finishIngestRequestBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
102
|
+
builder.finish(offset, 'INGQ');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static finishSizePrefixedIngestRequestBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
106
|
+
builder.finish(offset, 'INGQ', true);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
unpack(): IngestRequestT {
|
|
111
|
+
return new IngestRequestT(
|
|
112
|
+
this.SCHEMA(),
|
|
113
|
+
(this.TAGS() !== null ? this.TAGS()!.unpack() : null),
|
|
114
|
+
this.RECONCILE(),
|
|
115
|
+
(this.ARCHIVE() !== null ? this.ARCHIVE()!.unpack() : null),
|
|
116
|
+
(this.PROVENANCE() !== null ? this.PROVENANCE()!.unpack() : null)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
unpackTo(_o: IngestRequestT): void {
|
|
122
|
+
_o.SCHEMA = this.SCHEMA();
|
|
123
|
+
_o.TAGS = (this.TAGS() !== null ? this.TAGS()!.unpack() : null);
|
|
124
|
+
_o.RECONCILE = this.RECONCILE();
|
|
125
|
+
_o.ARCHIVE = (this.ARCHIVE() !== null ? this.ARCHIVE()!.unpack() : null);
|
|
126
|
+
_o.PROVENANCE = (this.PROVENANCE() !== null ? this.PROVENANCE()!.unpack() : null);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export class IngestRequestT implements flatbuffers.IGeneratedObject {
|
|
131
|
+
constructor(
|
|
132
|
+
public SCHEMA: string|Uint8Array|null = null,
|
|
133
|
+
public TAGS: SourceTagsT|null = null,
|
|
134
|
+
public RECONCILE: reconcileMode = reconcileMode.Duplicates,
|
|
135
|
+
public ARCHIVE: ArchiveTargetT|null = null,
|
|
136
|
+
public PROVENANCE: ProvenanceT|null = null
|
|
137
|
+
){}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
141
|
+
const SCHEMA = (this.SCHEMA !== null ? builder.createString(this.SCHEMA!) : 0);
|
|
142
|
+
const TAGS = (this.TAGS !== null ? this.TAGS!.pack(builder) : 0);
|
|
143
|
+
const ARCHIVE = (this.ARCHIVE !== null ? this.ARCHIVE!.pack(builder) : 0);
|
|
144
|
+
const PROVENANCE = (this.PROVENANCE !== null ? this.PROVENANCE!.pack(builder) : 0);
|
|
145
|
+
|
|
146
|
+
IngestRequest.startIngestRequest(builder);
|
|
147
|
+
IngestRequest.addSchema(builder, SCHEMA);
|
|
148
|
+
IngestRequest.addTags(builder, TAGS);
|
|
149
|
+
IngestRequest.addReconcile(builder, this.RECONCILE);
|
|
150
|
+
IngestRequest.addArchive(builder, ARCHIVE);
|
|
151
|
+
IngestRequest.addProvenance(builder, PROVENANCE);
|
|
152
|
+
|
|
153
|
+
return IngestRequest.endIngestRequest(builder);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
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 IngestResult {
|
|
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 getRootAsIngestResult(bb, obj) {
|
|
16
|
+
return (obj || new IngestResult()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
+
}
|
|
18
|
+
static getSizePrefixedRootAsIngestResult(bb, obj) {
|
|
19
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
+
return (obj || new IngestResult()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
+
}
|
|
22
|
+
static bufferHasIdentifier(bb) {
|
|
23
|
+
return bb.__has_identifier("INGR");
|
|
24
|
+
}
|
|
25
|
+
SCHEMA(optionalEncoding) {
|
|
26
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
27
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
28
|
+
}
|
|
29
|
+
PROVIDER_ID(optionalEncoding) {
|
|
30
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
31
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
32
|
+
}
|
|
33
|
+
SOURCE_NAME(optionalEncoding) {
|
|
34
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
35
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
36
|
+
}
|
|
37
|
+
BATCH_ID(optionalEncoding) {
|
|
38
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
39
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Records newly stored.
|
|
43
|
+
*/
|
|
44
|
+
INSERTED() {
|
|
45
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
46
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Records already held, dropped (reconcile Duplicates).
|
|
50
|
+
*/
|
|
51
|
+
RECONCILED_DUPLICATES() {
|
|
52
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
53
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Older records of the lane retired (reconcile Current).
|
|
57
|
+
*/
|
|
58
|
+
RECONCILED_OLD_BATCHES() {
|
|
59
|
+
const offset = this.bb.__offset(this.bb_pos, 16);
|
|
60
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
61
|
+
}
|
|
62
|
+
ARCHIVED(optionalEncoding) {
|
|
63
|
+
const offset = this.bb.__offset(this.bb_pos, 18);
|
|
64
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
65
|
+
}
|
|
66
|
+
REFUSED(optionalEncoding) {
|
|
67
|
+
const offset = this.bb.__offset(this.bb_pos, 20);
|
|
68
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
69
|
+
}
|
|
70
|
+
static startIngestResult(builder) {
|
|
71
|
+
builder.startObject(9);
|
|
72
|
+
}
|
|
73
|
+
static addSchema(builder, SCHEMAOffset) {
|
|
74
|
+
builder.addFieldOffset(0, SCHEMAOffset, 0);
|
|
75
|
+
}
|
|
76
|
+
static addProviderId(builder, PROVIDER_IDOffset) {
|
|
77
|
+
builder.addFieldOffset(1, PROVIDER_IDOffset, 0);
|
|
78
|
+
}
|
|
79
|
+
static addSourceName(builder, SOURCE_NAMEOffset) {
|
|
80
|
+
builder.addFieldOffset(2, SOURCE_NAMEOffset, 0);
|
|
81
|
+
}
|
|
82
|
+
static addBatchId(builder, BATCH_IDOffset) {
|
|
83
|
+
builder.addFieldOffset(3, BATCH_IDOffset, 0);
|
|
84
|
+
}
|
|
85
|
+
static addInserted(builder, INSERTED) {
|
|
86
|
+
builder.addFieldInt64(4, INSERTED, BigInt("0"));
|
|
87
|
+
}
|
|
88
|
+
static addReconciledDuplicates(builder, RECONCILED_DUPLICATES) {
|
|
89
|
+
builder.addFieldInt64(5, RECONCILED_DUPLICATES, BigInt("0"));
|
|
90
|
+
}
|
|
91
|
+
static addReconciledOldBatches(builder, RECONCILED_OLD_BATCHES) {
|
|
92
|
+
builder.addFieldInt64(6, RECONCILED_OLD_BATCHES, BigInt("0"));
|
|
93
|
+
}
|
|
94
|
+
static addArchived(builder, ARCHIVEDOffset) {
|
|
95
|
+
builder.addFieldOffset(7, ARCHIVEDOffset, 0);
|
|
96
|
+
}
|
|
97
|
+
static addRefused(builder, REFUSEDOffset) {
|
|
98
|
+
builder.addFieldOffset(8, REFUSEDOffset, 0);
|
|
99
|
+
}
|
|
100
|
+
static endIngestResult(builder) {
|
|
101
|
+
const offset = builder.endObject();
|
|
102
|
+
return offset;
|
|
103
|
+
}
|
|
104
|
+
static finishIngestResultBuffer(builder, offset) {
|
|
105
|
+
builder.finish(offset, "INGR");
|
|
106
|
+
}
|
|
107
|
+
static finishSizePrefixedIngestResultBuffer(builder, offset) {
|
|
108
|
+
builder.finish(offset, "INGR", true);
|
|
109
|
+
}
|
|
110
|
+
static createIngestResult(builder, SCHEMAOffset, PROVIDER_IDOffset, SOURCE_NAMEOffset, BATCH_IDOffset, INSERTED, RECONCILED_DUPLICATES, RECONCILED_OLD_BATCHES, ARCHIVEDOffset, REFUSEDOffset) {
|
|
111
|
+
IngestResult.startIngestResult(builder);
|
|
112
|
+
IngestResult.addSchema(builder, SCHEMAOffset);
|
|
113
|
+
IngestResult.addProviderId(builder, PROVIDER_IDOffset);
|
|
114
|
+
IngestResult.addSourceName(builder, SOURCE_NAMEOffset);
|
|
115
|
+
IngestResult.addBatchId(builder, BATCH_IDOffset);
|
|
116
|
+
IngestResult.addInserted(builder, INSERTED);
|
|
117
|
+
IngestResult.addReconciledDuplicates(builder, RECONCILED_DUPLICATES);
|
|
118
|
+
IngestResult.addReconciledOldBatches(builder, RECONCILED_OLD_BATCHES);
|
|
119
|
+
IngestResult.addArchived(builder, ARCHIVEDOffset);
|
|
120
|
+
IngestResult.addRefused(builder, REFUSEDOffset);
|
|
121
|
+
return IngestResult.endIngestResult(builder);
|
|
122
|
+
}
|
|
123
|
+
unpack() {
|
|
124
|
+
return new IngestResultT(
|
|
125
|
+
this.SCHEMA(),
|
|
126
|
+
this.PROVIDER_ID(),
|
|
127
|
+
this.SOURCE_NAME(),
|
|
128
|
+
this.BATCH_ID(),
|
|
129
|
+
this.INSERTED(),
|
|
130
|
+
this.RECONCILED_DUPLICATES(),
|
|
131
|
+
this.RECONCILED_OLD_BATCHES(),
|
|
132
|
+
this.ARCHIVED(),
|
|
133
|
+
this.REFUSED()
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
unpackTo(_o) {
|
|
137
|
+
_o.SCHEMA = this.SCHEMA();
|
|
138
|
+
_o.PROVIDER_ID = this.PROVIDER_ID();
|
|
139
|
+
_o.SOURCE_NAME = this.SOURCE_NAME();
|
|
140
|
+
_o.BATCH_ID = this.BATCH_ID();
|
|
141
|
+
_o.INSERTED = this.INSERTED();
|
|
142
|
+
_o.RECONCILED_DUPLICATES = this.RECONCILED_DUPLICATES();
|
|
143
|
+
_o.RECONCILED_OLD_BATCHES = this.RECONCILED_OLD_BATCHES();
|
|
144
|
+
_o.ARCHIVED = this.ARCHIVED();
|
|
145
|
+
_o.REFUSED = this.REFUSED();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
class IngestResultT {
|
|
149
|
+
constructor(SCHEMA = null, PROVIDER_ID = null, SOURCE_NAME = null, BATCH_ID = null, INSERTED = BigInt("0"), RECONCILED_DUPLICATES = BigInt("0"), RECONCILED_OLD_BATCHES = BigInt("0"), ARCHIVED = null, REFUSED = null) {
|
|
150
|
+
__publicField(this, "SCHEMA", SCHEMA);
|
|
151
|
+
__publicField(this, "PROVIDER_ID", PROVIDER_ID);
|
|
152
|
+
__publicField(this, "SOURCE_NAME", SOURCE_NAME);
|
|
153
|
+
__publicField(this, "BATCH_ID", BATCH_ID);
|
|
154
|
+
__publicField(this, "INSERTED", INSERTED);
|
|
155
|
+
__publicField(this, "RECONCILED_DUPLICATES", RECONCILED_DUPLICATES);
|
|
156
|
+
__publicField(this, "RECONCILED_OLD_BATCHES", RECONCILED_OLD_BATCHES);
|
|
157
|
+
__publicField(this, "ARCHIVED", ARCHIVED);
|
|
158
|
+
__publicField(this, "REFUSED", REFUSED);
|
|
159
|
+
}
|
|
160
|
+
pack(builder) {
|
|
161
|
+
const SCHEMA = this.SCHEMA !== null ? builder.createString(this.SCHEMA) : 0;
|
|
162
|
+
const PROVIDER_ID = this.PROVIDER_ID !== null ? builder.createString(this.PROVIDER_ID) : 0;
|
|
163
|
+
const SOURCE_NAME = this.SOURCE_NAME !== null ? builder.createString(this.SOURCE_NAME) : 0;
|
|
164
|
+
const BATCH_ID = this.BATCH_ID !== null ? builder.createString(this.BATCH_ID) : 0;
|
|
165
|
+
const ARCHIVED = this.ARCHIVED !== null ? builder.createString(this.ARCHIVED) : 0;
|
|
166
|
+
const REFUSED = this.REFUSED !== null ? builder.createString(this.REFUSED) : 0;
|
|
167
|
+
return IngestResult.createIngestResult(
|
|
168
|
+
builder,
|
|
169
|
+
SCHEMA,
|
|
170
|
+
PROVIDER_ID,
|
|
171
|
+
SOURCE_NAME,
|
|
172
|
+
BATCH_ID,
|
|
173
|
+
this.INSERTED,
|
|
174
|
+
this.RECONCILED_DUPLICATES,
|
|
175
|
+
this.RECONCILED_OLD_BATCHES,
|
|
176
|
+
ARCHIVED,
|
|
177
|
+
REFUSED
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export {
|
|
182
|
+
IngestResult,
|
|
183
|
+
IngestResultT
|
|
184
|
+
};
|
|
@@ -0,0 +1,235 @@
|
|
|
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
|
+
* What the host did with one IngestRequest. Replaces the storage.ingest_with_source result JSON.
|
|
11
|
+
*/
|
|
12
|
+
export class IngestResult implements flatbuffers.IUnpackableObject<IngestResultT> {
|
|
13
|
+
bb: flatbuffers.ByteBuffer|null = null;
|
|
14
|
+
bb_pos = 0;
|
|
15
|
+
__init(i:number, bb:flatbuffers.ByteBuffer):IngestResult {
|
|
16
|
+
this.bb_pos = i;
|
|
17
|
+
this.bb = bb;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static getRootAsIngestResult(bb:flatbuffers.ByteBuffer, obj?:IngestResult):IngestResult {
|
|
22
|
+
return (obj || new IngestResult()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static getSizePrefixedRootAsIngestResult(bb:flatbuffers.ByteBuffer, obj?:IngestResult):IngestResult {
|
|
26
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
27
|
+
return (obj || new IngestResult()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static bufferHasIdentifier(bb:flatbuffers.ByteBuffer):boolean {
|
|
31
|
+
return bb.__has_identifier('INGR');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SCHEMA():string|null
|
|
35
|
+
SCHEMA(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
36
|
+
SCHEMA(optionalEncoding?:any):string|Uint8Array|null {
|
|
37
|
+
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
38
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
PROVIDER_ID():string|null
|
|
42
|
+
PROVIDER_ID(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
43
|
+
PROVIDER_ID(optionalEncoding?:any):string|Uint8Array|null {
|
|
44
|
+
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
45
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
SOURCE_NAME():string|null
|
|
49
|
+
SOURCE_NAME(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
50
|
+
SOURCE_NAME(optionalEncoding?:any):string|Uint8Array|null {
|
|
51
|
+
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
52
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
BATCH_ID():string|null
|
|
56
|
+
BATCH_ID(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
57
|
+
BATCH_ID(optionalEncoding?:any):string|Uint8Array|null {
|
|
58
|
+
const offset = this.bb!.__offset(this.bb_pos, 10);
|
|
59
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Records newly stored.
|
|
64
|
+
*/
|
|
65
|
+
INSERTED():bigint {
|
|
66
|
+
const offset = this.bb!.__offset(this.bb_pos, 12);
|
|
67
|
+
return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Records already held, dropped (reconcile Duplicates).
|
|
72
|
+
*/
|
|
73
|
+
RECONCILED_DUPLICATES():bigint {
|
|
74
|
+
const offset = this.bb!.__offset(this.bb_pos, 14);
|
|
75
|
+
return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Older records of the lane retired (reconcile Current).
|
|
80
|
+
*/
|
|
81
|
+
RECONCILED_OLD_BATCHES():bigint {
|
|
82
|
+
const offset = this.bb!.__offset(this.bb_pos, 16);
|
|
83
|
+
return offset ? this.bb!.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Where the raw document was archived; empty when it was not.
|
|
88
|
+
*/
|
|
89
|
+
ARCHIVED():string|null
|
|
90
|
+
ARCHIVED(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
91
|
+
ARCHIVED(optionalEncoding?:any):string|Uint8Array|null {
|
|
92
|
+
const offset = this.bb!.__offset(this.bb_pos, 18);
|
|
93
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Why the batch was refused (quota, licence, policy); empty when it was stored.
|
|
98
|
+
*/
|
|
99
|
+
REFUSED():string|null
|
|
100
|
+
REFUSED(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
101
|
+
REFUSED(optionalEncoding?:any):string|Uint8Array|null {
|
|
102
|
+
const offset = this.bb!.__offset(this.bb_pos, 20);
|
|
103
|
+
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static startIngestResult(builder:flatbuffers.Builder) {
|
|
107
|
+
builder.startObject(9);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static addSchema(builder:flatbuffers.Builder, SCHEMAOffset:flatbuffers.Offset) {
|
|
111
|
+
builder.addFieldOffset(0, SCHEMAOffset, 0);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static addProviderId(builder:flatbuffers.Builder, PROVIDER_IDOffset:flatbuffers.Offset) {
|
|
115
|
+
builder.addFieldOffset(1, PROVIDER_IDOffset, 0);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static addSourceName(builder:flatbuffers.Builder, SOURCE_NAMEOffset:flatbuffers.Offset) {
|
|
119
|
+
builder.addFieldOffset(2, SOURCE_NAMEOffset, 0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static addBatchId(builder:flatbuffers.Builder, BATCH_IDOffset:flatbuffers.Offset) {
|
|
123
|
+
builder.addFieldOffset(3, BATCH_IDOffset, 0);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static addInserted(builder:flatbuffers.Builder, INSERTED:bigint) {
|
|
127
|
+
builder.addFieldInt64(4, INSERTED, BigInt('0'));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static addReconciledDuplicates(builder:flatbuffers.Builder, RECONCILED_DUPLICATES:bigint) {
|
|
131
|
+
builder.addFieldInt64(5, RECONCILED_DUPLICATES, BigInt('0'));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static addReconciledOldBatches(builder:flatbuffers.Builder, RECONCILED_OLD_BATCHES:bigint) {
|
|
135
|
+
builder.addFieldInt64(6, RECONCILED_OLD_BATCHES, BigInt('0'));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static addArchived(builder:flatbuffers.Builder, ARCHIVEDOffset:flatbuffers.Offset) {
|
|
139
|
+
builder.addFieldOffset(7, ARCHIVEDOffset, 0);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static addRefused(builder:flatbuffers.Builder, REFUSEDOffset:flatbuffers.Offset) {
|
|
143
|
+
builder.addFieldOffset(8, REFUSEDOffset, 0);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static endIngestResult(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
147
|
+
const offset = builder.endObject();
|
|
148
|
+
return offset;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static finishIngestResultBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
152
|
+
builder.finish(offset, 'INGR');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static finishSizePrefixedIngestResultBuffer(builder:flatbuffers.Builder, offset:flatbuffers.Offset) {
|
|
156
|
+
builder.finish(offset, 'INGR', true);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static createIngestResult(builder:flatbuffers.Builder, SCHEMAOffset:flatbuffers.Offset, PROVIDER_IDOffset:flatbuffers.Offset, SOURCE_NAMEOffset:flatbuffers.Offset, BATCH_IDOffset:flatbuffers.Offset, INSERTED:bigint, RECONCILED_DUPLICATES:bigint, RECONCILED_OLD_BATCHES:bigint, ARCHIVEDOffset:flatbuffers.Offset, REFUSEDOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
160
|
+
IngestResult.startIngestResult(builder);
|
|
161
|
+
IngestResult.addSchema(builder, SCHEMAOffset);
|
|
162
|
+
IngestResult.addProviderId(builder, PROVIDER_IDOffset);
|
|
163
|
+
IngestResult.addSourceName(builder, SOURCE_NAMEOffset);
|
|
164
|
+
IngestResult.addBatchId(builder, BATCH_IDOffset);
|
|
165
|
+
IngestResult.addInserted(builder, INSERTED);
|
|
166
|
+
IngestResult.addReconciledDuplicates(builder, RECONCILED_DUPLICATES);
|
|
167
|
+
IngestResult.addReconciledOldBatches(builder, RECONCILED_OLD_BATCHES);
|
|
168
|
+
IngestResult.addArchived(builder, ARCHIVEDOffset);
|
|
169
|
+
IngestResult.addRefused(builder, REFUSEDOffset);
|
|
170
|
+
return IngestResult.endIngestResult(builder);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
unpack(): IngestResultT {
|
|
174
|
+
return new IngestResultT(
|
|
175
|
+
this.SCHEMA(),
|
|
176
|
+
this.PROVIDER_ID(),
|
|
177
|
+
this.SOURCE_NAME(),
|
|
178
|
+
this.BATCH_ID(),
|
|
179
|
+
this.INSERTED(),
|
|
180
|
+
this.RECONCILED_DUPLICATES(),
|
|
181
|
+
this.RECONCILED_OLD_BATCHES(),
|
|
182
|
+
this.ARCHIVED(),
|
|
183
|
+
this.REFUSED()
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
unpackTo(_o: IngestResultT): void {
|
|
189
|
+
_o.SCHEMA = this.SCHEMA();
|
|
190
|
+
_o.PROVIDER_ID = this.PROVIDER_ID();
|
|
191
|
+
_o.SOURCE_NAME = this.SOURCE_NAME();
|
|
192
|
+
_o.BATCH_ID = this.BATCH_ID();
|
|
193
|
+
_o.INSERTED = this.INSERTED();
|
|
194
|
+
_o.RECONCILED_DUPLICATES = this.RECONCILED_DUPLICATES();
|
|
195
|
+
_o.RECONCILED_OLD_BATCHES = this.RECONCILED_OLD_BATCHES();
|
|
196
|
+
_o.ARCHIVED = this.ARCHIVED();
|
|
197
|
+
_o.REFUSED = this.REFUSED();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export class IngestResultT implements flatbuffers.IGeneratedObject {
|
|
202
|
+
constructor(
|
|
203
|
+
public SCHEMA: string|Uint8Array|null = null,
|
|
204
|
+
public PROVIDER_ID: string|Uint8Array|null = null,
|
|
205
|
+
public SOURCE_NAME: string|Uint8Array|null = null,
|
|
206
|
+
public BATCH_ID: string|Uint8Array|null = null,
|
|
207
|
+
public INSERTED: bigint = BigInt('0'),
|
|
208
|
+
public RECONCILED_DUPLICATES: bigint = BigInt('0'),
|
|
209
|
+
public RECONCILED_OLD_BATCHES: bigint = BigInt('0'),
|
|
210
|
+
public ARCHIVED: string|Uint8Array|null = null,
|
|
211
|
+
public REFUSED: string|Uint8Array|null = null
|
|
212
|
+
){}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
216
|
+
const SCHEMA = (this.SCHEMA !== null ? builder.createString(this.SCHEMA!) : 0);
|
|
217
|
+
const PROVIDER_ID = (this.PROVIDER_ID !== null ? builder.createString(this.PROVIDER_ID!) : 0);
|
|
218
|
+
const SOURCE_NAME = (this.SOURCE_NAME !== null ? builder.createString(this.SOURCE_NAME!) : 0);
|
|
219
|
+
const BATCH_ID = (this.BATCH_ID !== null ? builder.createString(this.BATCH_ID!) : 0);
|
|
220
|
+
const ARCHIVED = (this.ARCHIVED !== null ? builder.createString(this.ARCHIVED!) : 0);
|
|
221
|
+
const REFUSED = (this.REFUSED !== null ? builder.createString(this.REFUSED!) : 0);
|
|
222
|
+
|
|
223
|
+
return IngestResult.createIngestResult(builder,
|
|
224
|
+
SCHEMA,
|
|
225
|
+
PROVIDER_ID,
|
|
226
|
+
SOURCE_NAME,
|
|
227
|
+
BATCH_ID,
|
|
228
|
+
this.INSERTED,
|
|
229
|
+
this.RECONCILED_DUPLICATES,
|
|
230
|
+
this.RECONCILED_OLD_BATCHES,
|
|
231
|
+
ARCHIVED,
|
|
232
|
+
REFUSED
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { ConfigEntry } from "./ConfigEntry.js";
|
|
6
|
+
class ModuleConfig {
|
|
7
|
+
constructor() {
|
|
8
|
+
__publicField(this, "bb", null);
|
|
9
|
+
__publicField(this, "bb_pos", 0);
|
|
10
|
+
}
|
|
11
|
+
__init(i, bb) {
|
|
12
|
+
this.bb_pos = i;
|
|
13
|
+
this.bb = bb;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
static getRootAsModuleConfig(bb, obj) {
|
|
17
|
+
return (obj || new ModuleConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
18
|
+
}
|
|
19
|
+
static getSizePrefixedRootAsModuleConfig(bb, obj) {
|
|
20
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
|
+
return (obj || new ModuleConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
|
+
}
|
|
23
|
+
static bufferHasIdentifier(bb) {
|
|
24
|
+
return bb.__has_identifier("MCFG");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Entries sorted by KEY.
|
|
28
|
+
*/
|
|
29
|
+
ENTRIES(index, obj) {
|
|
30
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
31
|
+
return offset ? (obj || new ConfigEntry()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
32
|
+
}
|
|
33
|
+
entriesLength() {
|
|
34
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
35
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
36
|
+
}
|
|
37
|
+
static startModuleConfig(builder) {
|
|
38
|
+
builder.startObject(1);
|
|
39
|
+
}
|
|
40
|
+
static addEntries(builder, ENTRIESOffset) {
|
|
41
|
+
builder.addFieldOffset(0, ENTRIESOffset, 0);
|
|
42
|
+
}
|
|
43
|
+
static createEntriesVector(builder, data) {
|
|
44
|
+
builder.startVector(4, data.length, 4);
|
|
45
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
46
|
+
builder.addOffset(data[i]);
|
|
47
|
+
}
|
|
48
|
+
return builder.endVector();
|
|
49
|
+
}
|
|
50
|
+
static startEntriesVector(builder, numElems) {
|
|
51
|
+
builder.startVector(4, numElems, 4);
|
|
52
|
+
}
|
|
53
|
+
static endModuleConfig(builder) {
|
|
54
|
+
const offset = builder.endObject();
|
|
55
|
+
return offset;
|
|
56
|
+
}
|
|
57
|
+
static finishModuleConfigBuffer(builder, offset) {
|
|
58
|
+
builder.finish(offset, "MCFG");
|
|
59
|
+
}
|
|
60
|
+
static finishSizePrefixedModuleConfigBuffer(builder, offset) {
|
|
61
|
+
builder.finish(offset, "MCFG", true);
|
|
62
|
+
}
|
|
63
|
+
static createModuleConfig(builder, ENTRIESOffset) {
|
|
64
|
+
ModuleConfig.startModuleConfig(builder);
|
|
65
|
+
ModuleConfig.addEntries(builder, ENTRIESOffset);
|
|
66
|
+
return ModuleConfig.endModuleConfig(builder);
|
|
67
|
+
}
|
|
68
|
+
unpack() {
|
|
69
|
+
return new ModuleConfigT(
|
|
70
|
+
this.bb.createObjList(this.ENTRIES.bind(this), this.entriesLength())
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
unpackTo(_o) {
|
|
74
|
+
_o.ENTRIES = this.bb.createObjList(this.ENTRIES.bind(this), this.entriesLength());
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
class ModuleConfigT {
|
|
78
|
+
constructor(ENTRIES = []) {
|
|
79
|
+
__publicField(this, "ENTRIES", ENTRIES);
|
|
80
|
+
}
|
|
81
|
+
pack(builder) {
|
|
82
|
+
const ENTRIES = ModuleConfig.createEntriesVector(builder, builder.createObjectOffsetList(this.ENTRIES));
|
|
83
|
+
return ModuleConfig.createModuleConfig(
|
|
84
|
+
builder,
|
|
85
|
+
ENTRIES
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
ModuleConfig,
|
|
91
|
+
ModuleConfigT
|
|
92
|
+
};
|