space-data-module-sdk 0.7.0 → 0.8.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 +16 -23
- package/bin/space-data-module.js +5 -3
- package/package.json +2 -2
- package/schemas/spacedatastandards/PLG.fbs +191 -0
- package/src/AGENTS.md +1 -1
- package/src/bundle/AGENTS.md +6 -5
- package/src/bundle/codec.js +163 -48
- package/src/bundle/constants.js +1 -1
- package/src/bundle/wasm.js +53 -32
- package/src/compiler/compileModule.js +9 -1
- package/src/compliance/index.js +4 -0
- package/src/compliance/pluginCompliance.js +158 -2
- package/src/embeddedManifest.js +25 -5
- package/src/generated/orbpro/invoke/plugin-invoke-request.js +2 -2
- package/src/generated/orbpro/invoke/plugin-invoke-response.js +2 -2
- package/src/generated/orbpro/stream/flat-buffer-type-ref.js +2 -2
- package/src/generated/orbpro/stream/typed-arena-buffer.js +2 -2
- package/src/generated/spacedatastandards/plg/entry-function.js +86 -0
- package/src/generated/spacedatastandards/plg/entry-function.ts +119 -0
- package/src/generated/spacedatastandards/plg/index.js +16 -0
- package/src/generated/spacedatastandards/plg/index.ts +11 -0
- package/src/generated/spacedatastandards/plg/plg.js +657 -0
- package/src/generated/spacedatastandards/plg/plg.ts +924 -0
- package/src/generated/spacedatastandards/plg/plugin-capability.js +66 -0
- package/src/generated/spacedatastandards/plg/plugin-capability.ts +84 -0
- package/src/generated/spacedatastandards/plg/plugin-category.js +15 -0
- package/src/generated/spacedatastandards/plg/plugin-category.ts +53 -0
- package/src/generated/spacedatastandards/plg/plugin-dependency.js +63 -0
- package/src/generated/spacedatastandards/plg/plugin-dependency.ts +86 -0
- package/src/generated/spacedatastandards/plg/publication-state.js +9 -0
- package/src/generated/spacedatastandards/plg/publication-state.ts +23 -0
- package/src/generated/spacedatastandards/plg/purchase-tier.js +9 -0
- package/src/generated/spacedatastandards/plg/purchase-tier.ts +23 -0
- package/src/index.d.ts +1 -1
- package/src/invoke/codec.js +1 -1
- package/src/manifest/browser.js +7 -0
- package/src/manifest/index.js +7 -0
- package/src/manifest/legacyToPlg.js +249 -0
- package/src/manifest/plgCodec.js +826 -0
- package/src/standards/sharedCatalog.js +132 -0
- package/src/transport/records.js +34 -3
- package/src/vendor/flatbuffers/LICENSE +202 -0
- package/src/vendor/flatbuffers/builder.js +534 -0
- package/src/vendor/flatbuffers/byte-buffer.js +253 -0
- package/src/vendor/flatbuffers/constants.js +4 -0
- package/src/vendor/flatbuffers/encoding.js +5 -0
- package/src/vendor/flatbuffers/flatbuffers.js +5 -0
- package/src/vendor/flatbuffers/utils.js +4 -0
- package/schemas/ModuleBundle.fbs +0 -108
- package/src/generated/orbpro/module/canonicalization-rule.d.ts +0 -48
- package/src/generated/orbpro/module/canonicalization-rule.js +0 -95
- package/src/generated/orbpro/module/canonicalization-rule.ts +0 -142
- package/src/generated/orbpro/module/module-bundle-entry-role.d.ts +0 -11
- package/src/generated/orbpro/module/module-bundle-entry-role.js +0 -14
- package/src/generated/orbpro/module/module-bundle-entry-role.ts +0 -15
- package/src/generated/orbpro/module/module-bundle-entry.d.ts +0 -97
- package/src/generated/orbpro/module/module-bundle-entry.js +0 -219
- package/src/generated/orbpro/module/module-bundle-entry.ts +0 -287
- package/src/generated/orbpro/module/module-bundle.d.ts +0 -86
- package/src/generated/orbpro/module/module-bundle.js +0 -213
- package/src/generated/orbpro/module/module-bundle.ts +0 -277
- package/src/generated/orbpro/module/module-payload-encoding.d.ts +0 -9
- package/src/generated/orbpro/module/module-payload-encoding.js +0 -12
- package/src/generated/orbpro/module/module-payload-encoding.ts +0 -13
- package/src/generated/orbpro/module.d.ts +0 -5
- package/src/generated/orbpro/module.js +0 -7
- package/src/generated/orbpro/module.ts +0 -9
|
@@ -0,0 +1,657 @@
|
|
|
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) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import * as flatbuffers from "flatbuffers";
|
|
8
|
+
import { EntryFunction } from "./entry-function.js";
|
|
9
|
+
import { PluginCapability } from "./plugin-capability.js";
|
|
10
|
+
import { PluginDependency } from "./plugin-dependency.js";
|
|
11
|
+
import { pluginCategory } from "./plugin-category.js";
|
|
12
|
+
import { publicationState } from "./publication-state.js";
|
|
13
|
+
import { purchaseTier } from "./purchase-tier.js";
|
|
14
|
+
class PLG {
|
|
15
|
+
constructor() {
|
|
16
|
+
__publicField(this, "bb", null);
|
|
17
|
+
__publicField(this, "bb_pos", 0);
|
|
18
|
+
}
|
|
19
|
+
__init(i, bb) {
|
|
20
|
+
this.bb_pos = i;
|
|
21
|
+
this.bb = bb;
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
static getRootAsPLG(bb, obj) {
|
|
25
|
+
return (obj || new PLG()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
26
|
+
}
|
|
27
|
+
static getSizePrefixedRootAsPLG(bb, obj) {
|
|
28
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
29
|
+
return (obj || new PLG()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
30
|
+
}
|
|
31
|
+
static bufferHasIdentifier(bb) {
|
|
32
|
+
return bb.__has_identifier("$PLG");
|
|
33
|
+
}
|
|
34
|
+
pluginId(optionalEncoding) {
|
|
35
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
36
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
37
|
+
}
|
|
38
|
+
name(optionalEncoding) {
|
|
39
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
40
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
41
|
+
}
|
|
42
|
+
version(optionalEncoding) {
|
|
43
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
44
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
45
|
+
}
|
|
46
|
+
description(optionalEncoding) {
|
|
47
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
48
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
49
|
+
}
|
|
50
|
+
tagline(optionalEncoding) {
|
|
51
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
52
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Type/category of the plugin
|
|
56
|
+
*/
|
|
57
|
+
pluginType() {
|
|
58
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
59
|
+
return offset ? this.bb.readInt8(this.bb_pos + offset) : pluginCategory.Sensor;
|
|
60
|
+
}
|
|
61
|
+
publisherName(optionalEncoding) {
|
|
62
|
+
const offset = this.bb.__offset(this.bb_pos, 16);
|
|
63
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
64
|
+
}
|
|
65
|
+
publisherHandle(optionalEncoding) {
|
|
66
|
+
const offset = this.bb.__offset(this.bb_pos, 18);
|
|
67
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
68
|
+
}
|
|
69
|
+
publisherUrl(optionalEncoding) {
|
|
70
|
+
const offset = this.bb.__offset(this.bb_pos, 20);
|
|
71
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
72
|
+
}
|
|
73
|
+
supportUrl(optionalEncoding) {
|
|
74
|
+
const offset = this.bb.__offset(this.bb_pos, 22);
|
|
75
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
76
|
+
}
|
|
77
|
+
tags(index, optionalEncoding) {
|
|
78
|
+
const offset = this.bb.__offset(this.bb_pos, 24);
|
|
79
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
80
|
+
}
|
|
81
|
+
tagsLength() {
|
|
82
|
+
const offset = this.bb.__offset(this.bb_pos, 24);
|
|
83
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
84
|
+
}
|
|
85
|
+
features(index, optionalEncoding) {
|
|
86
|
+
const offset = this.bb.__offset(this.bb_pos, 26);
|
|
87
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
88
|
+
}
|
|
89
|
+
featuresLength() {
|
|
90
|
+
const offset = this.bb.__offset(this.bb_pos, 26);
|
|
91
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
92
|
+
}
|
|
93
|
+
screenshotUrls(index, optionalEncoding) {
|
|
94
|
+
const offset = this.bb.__offset(this.bb_pos, 28);
|
|
95
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
96
|
+
}
|
|
97
|
+
screenshotUrlsLength() {
|
|
98
|
+
const offset = this.bb.__offset(this.bb_pos, 28);
|
|
99
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
100
|
+
}
|
|
101
|
+
bannerUrl(optionalEncoding) {
|
|
102
|
+
const offset = this.bb.__offset(this.bb_pos, 30);
|
|
103
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* ABI version for compatibility checking
|
|
107
|
+
*/
|
|
108
|
+
abiVersion() {
|
|
109
|
+
const offset = this.bb.__offset(this.bb_pos, 32);
|
|
110
|
+
return offset ? this.bb.readUint32(this.bb_pos + offset) : 1;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* SHA256 hash of the decrypted WASM binary
|
|
114
|
+
*/
|
|
115
|
+
wasmHash(index) {
|
|
116
|
+
const offset = this.bb.__offset(this.bb_pos, 34);
|
|
117
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
118
|
+
}
|
|
119
|
+
wasmHashLength() {
|
|
120
|
+
const offset = this.bb.__offset(this.bb_pos, 34);
|
|
121
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
122
|
+
}
|
|
123
|
+
wasmHashArray() {
|
|
124
|
+
const offset = this.bb.__offset(this.bb_pos, 34);
|
|
125
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Size of decrypted WASM binary in bytes
|
|
129
|
+
*/
|
|
130
|
+
wasmSize() {
|
|
131
|
+
const offset = this.bb.__offset(this.bb_pos, 36);
|
|
132
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
133
|
+
}
|
|
134
|
+
wasmCid(optionalEncoding) {
|
|
135
|
+
const offset = this.bb.__offset(this.bb_pos, 38);
|
|
136
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* SHA256 hash of the encrypted delivery artifact bytes
|
|
140
|
+
*/
|
|
141
|
+
encryptedWasmHash(index) {
|
|
142
|
+
const offset = this.bb.__offset(this.bb_pos, 40);
|
|
143
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
144
|
+
}
|
|
145
|
+
encryptedWasmHashLength() {
|
|
146
|
+
const offset = this.bb.__offset(this.bb_pos, 40);
|
|
147
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
148
|
+
}
|
|
149
|
+
encryptedWasmHashArray() {
|
|
150
|
+
const offset = this.bb.__offset(this.bb_pos, 40);
|
|
151
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Size of the encrypted delivery artifact in bytes
|
|
155
|
+
*/
|
|
156
|
+
encryptedWasmSize() {
|
|
157
|
+
const offset = this.bb.__offset(this.bb_pos, 42);
|
|
158
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Entry point functions exported by the plugin
|
|
162
|
+
*/
|
|
163
|
+
entryFunctions(index, obj) {
|
|
164
|
+
const offset = this.bb.__offset(this.bb_pos, 44);
|
|
165
|
+
return offset ? (obj || new EntryFunction()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
166
|
+
}
|
|
167
|
+
entryFunctionsLength() {
|
|
168
|
+
const offset = this.bb.__offset(this.bb_pos, 44);
|
|
169
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
170
|
+
}
|
|
171
|
+
requiredSchemas(index, optionalEncoding) {
|
|
172
|
+
const offset = this.bb.__offset(this.bb_pos, 46);
|
|
173
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
174
|
+
}
|
|
175
|
+
requiredSchemasLength() {
|
|
176
|
+
const offset = this.bb.__offset(this.bb_pos, 46);
|
|
177
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Other plugins this depends on
|
|
181
|
+
*/
|
|
182
|
+
dependencies(index, obj) {
|
|
183
|
+
const offset = this.bb.__offset(this.bb_pos, 48);
|
|
184
|
+
return offset ? (obj || new PluginDependency()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
185
|
+
}
|
|
186
|
+
dependenciesLength() {
|
|
187
|
+
const offset = this.bb.__offset(this.bb_pos, 48);
|
|
188
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Capabilities provided by this plugin
|
|
192
|
+
*/
|
|
193
|
+
capabilities(index, obj) {
|
|
194
|
+
const offset = this.bb.__offset(this.bb_pos, 50);
|
|
195
|
+
return offset ? (obj || new PluginCapability()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
196
|
+
}
|
|
197
|
+
capabilitiesLength() {
|
|
198
|
+
const offset = this.bb.__offset(this.bb_pos, 50);
|
|
199
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
200
|
+
}
|
|
201
|
+
providerPeerId(optionalEncoding) {
|
|
202
|
+
const offset = this.bb.__offset(this.bb_pos, 52);
|
|
203
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
204
|
+
}
|
|
205
|
+
providerEpmCid(optionalEncoding) {
|
|
206
|
+
const offset = this.bb.__offset(this.bb_pos, 54);
|
|
207
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Whether the WASM binary is encrypted
|
|
211
|
+
*/
|
|
212
|
+
encrypted() {
|
|
213
|
+
const offset = this.bb.__offset(this.bb_pos, 56);
|
|
214
|
+
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : true;
|
|
215
|
+
}
|
|
216
|
+
requiredScope(optionalEncoding) {
|
|
217
|
+
const offset = this.bb.__offset(this.bb_pos, 58);
|
|
218
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
219
|
+
}
|
|
220
|
+
keyId(optionalEncoding) {
|
|
221
|
+
const offset = this.bb.__offset(this.bb_pos, 60);
|
|
222
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
223
|
+
}
|
|
224
|
+
allowedDomains(index, optionalEncoding) {
|
|
225
|
+
const offset = this.bb.__offset(this.bb_pos, 62);
|
|
226
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
227
|
+
}
|
|
228
|
+
allowedDomainsLength() {
|
|
229
|
+
const offset = this.bb.__offset(this.bb_pos, 62);
|
|
230
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Maximum grant timeout allowed for this module publication
|
|
234
|
+
*/
|
|
235
|
+
maxGrantTimeoutMs() {
|
|
236
|
+
const offset = this.bb.__offset(this.bb_pos, 64);
|
|
237
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
238
|
+
}
|
|
239
|
+
minPermissions(index, optionalEncoding) {
|
|
240
|
+
const offset = this.bb.__offset(this.bb_pos, 66);
|
|
241
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
242
|
+
}
|
|
243
|
+
minPermissionsLength() {
|
|
244
|
+
const offset = this.bb.__offset(this.bb_pos, 66);
|
|
245
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Unix timestamp when plugin was created
|
|
249
|
+
*/
|
|
250
|
+
createdAt() {
|
|
251
|
+
const offset = this.bb.__offset(this.bb_pos, 68);
|
|
252
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Unix timestamp when plugin was last updated
|
|
256
|
+
*/
|
|
257
|
+
updatedAt() {
|
|
258
|
+
const offset = this.bb.__offset(this.bb_pos, 70);
|
|
259
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt("0");
|
|
260
|
+
}
|
|
261
|
+
documentationUrl(optionalEncoding) {
|
|
262
|
+
const offset = this.bb.__offset(this.bb_pos, 72);
|
|
263
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
264
|
+
}
|
|
265
|
+
changelogUrl(optionalEncoding) {
|
|
266
|
+
const offset = this.bb.__offset(this.bb_pos, 74);
|
|
267
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
268
|
+
}
|
|
269
|
+
iconUrl(optionalEncoding) {
|
|
270
|
+
const offset = this.bb.__offset(this.bb_pos, 76);
|
|
271
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
272
|
+
}
|
|
273
|
+
license(optionalEncoding) {
|
|
274
|
+
const offset = this.bb.__offset(this.bb_pos, 78);
|
|
275
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Commercial model used for storefront purchase flows
|
|
279
|
+
*/
|
|
280
|
+
paymentModel() {
|
|
281
|
+
const offset = this.bb.__offset(this.bb_pos, 80);
|
|
282
|
+
return offset ? this.bb.readInt8(this.bb_pos + offset) : purchaseTier.Free;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Price in USD cents for one-time purchase or subscription period
|
|
286
|
+
*/
|
|
287
|
+
priceUsdCents() {
|
|
288
|
+
const offset = this.bb.__offset(this.bb_pos, 82);
|
|
289
|
+
return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Subscription billing period length in days
|
|
293
|
+
*/
|
|
294
|
+
subscriptionPeriodDays() {
|
|
295
|
+
const offset = this.bb.__offset(this.bb_pos, 84);
|
|
296
|
+
return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
|
|
297
|
+
}
|
|
298
|
+
acceptedPaymentMethods(index, optionalEncoding) {
|
|
299
|
+
const offset = this.bb.__offset(this.bb_pos, 86);
|
|
300
|
+
return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
|
301
|
+
}
|
|
302
|
+
acceptedPaymentMethodsLength() {
|
|
303
|
+
const offset = this.bb.__offset(this.bb_pos, 86);
|
|
304
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Storefront publication state for this manifest version
|
|
308
|
+
*/
|
|
309
|
+
listingStatus() {
|
|
310
|
+
const offset = this.bb.__offset(this.bb_pos, 88);
|
|
311
|
+
return offset ? this.bb.readInt8(this.bb_pos + offset) : publicationState.Public;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Ed25519 signature from provider over manifest
|
|
315
|
+
*/
|
|
316
|
+
signature(index) {
|
|
317
|
+
const offset = this.bb.__offset(this.bb_pos, 90);
|
|
318
|
+
return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
|
|
319
|
+
}
|
|
320
|
+
signatureLength() {
|
|
321
|
+
const offset = this.bb.__offset(this.bb_pos, 90);
|
|
322
|
+
return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
|
|
323
|
+
}
|
|
324
|
+
signatureArray() {
|
|
325
|
+
const offset = this.bb.__offset(this.bb_pos, 90);
|
|
326
|
+
return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
|
|
327
|
+
}
|
|
328
|
+
static startPLG(builder) {
|
|
329
|
+
builder.startObject(44);
|
|
330
|
+
}
|
|
331
|
+
static addPluginId(builder, pluginIdOffset) {
|
|
332
|
+
builder.addFieldOffset(0, pluginIdOffset, 0);
|
|
333
|
+
}
|
|
334
|
+
static addName(builder, nameOffset) {
|
|
335
|
+
builder.addFieldOffset(1, nameOffset, 0);
|
|
336
|
+
}
|
|
337
|
+
static addVersion(builder, versionOffset) {
|
|
338
|
+
builder.addFieldOffset(2, versionOffset, 0);
|
|
339
|
+
}
|
|
340
|
+
static addDescription(builder, descriptionOffset) {
|
|
341
|
+
builder.addFieldOffset(3, descriptionOffset, 0);
|
|
342
|
+
}
|
|
343
|
+
static addTagline(builder, taglineOffset) {
|
|
344
|
+
builder.addFieldOffset(4, taglineOffset, 0);
|
|
345
|
+
}
|
|
346
|
+
static addPluginType(builder, pluginType) {
|
|
347
|
+
builder.addFieldInt8(5, pluginType, pluginCategory.Sensor);
|
|
348
|
+
}
|
|
349
|
+
static addPublisherName(builder, publisherNameOffset) {
|
|
350
|
+
builder.addFieldOffset(6, publisherNameOffset, 0);
|
|
351
|
+
}
|
|
352
|
+
static addPublisherHandle(builder, publisherHandleOffset) {
|
|
353
|
+
builder.addFieldOffset(7, publisherHandleOffset, 0);
|
|
354
|
+
}
|
|
355
|
+
static addPublisherUrl(builder, publisherUrlOffset) {
|
|
356
|
+
builder.addFieldOffset(8, publisherUrlOffset, 0);
|
|
357
|
+
}
|
|
358
|
+
static addSupportUrl(builder, supportUrlOffset) {
|
|
359
|
+
builder.addFieldOffset(9, supportUrlOffset, 0);
|
|
360
|
+
}
|
|
361
|
+
static addTags(builder, tagsOffset) {
|
|
362
|
+
builder.addFieldOffset(10, tagsOffset, 0);
|
|
363
|
+
}
|
|
364
|
+
static createTagsVector(builder, data) {
|
|
365
|
+
builder.startVector(4, data.length, 4);
|
|
366
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
367
|
+
builder.addOffset(data[i]);
|
|
368
|
+
}
|
|
369
|
+
return builder.endVector();
|
|
370
|
+
}
|
|
371
|
+
static startTagsVector(builder, numElems) {
|
|
372
|
+
builder.startVector(4, numElems, 4);
|
|
373
|
+
}
|
|
374
|
+
static addFeatures(builder, featuresOffset) {
|
|
375
|
+
builder.addFieldOffset(11, featuresOffset, 0);
|
|
376
|
+
}
|
|
377
|
+
static createFeaturesVector(builder, data) {
|
|
378
|
+
builder.startVector(4, data.length, 4);
|
|
379
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
380
|
+
builder.addOffset(data[i]);
|
|
381
|
+
}
|
|
382
|
+
return builder.endVector();
|
|
383
|
+
}
|
|
384
|
+
static startFeaturesVector(builder, numElems) {
|
|
385
|
+
builder.startVector(4, numElems, 4);
|
|
386
|
+
}
|
|
387
|
+
static addScreenshotUrls(builder, screenshotUrlsOffset) {
|
|
388
|
+
builder.addFieldOffset(12, screenshotUrlsOffset, 0);
|
|
389
|
+
}
|
|
390
|
+
static createScreenshotUrlsVector(builder, data) {
|
|
391
|
+
builder.startVector(4, data.length, 4);
|
|
392
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
393
|
+
builder.addOffset(data[i]);
|
|
394
|
+
}
|
|
395
|
+
return builder.endVector();
|
|
396
|
+
}
|
|
397
|
+
static startScreenshotUrlsVector(builder, numElems) {
|
|
398
|
+
builder.startVector(4, numElems, 4);
|
|
399
|
+
}
|
|
400
|
+
static addBannerUrl(builder, bannerUrlOffset) {
|
|
401
|
+
builder.addFieldOffset(13, bannerUrlOffset, 0);
|
|
402
|
+
}
|
|
403
|
+
static addAbiVersion(builder, abiVersion) {
|
|
404
|
+
builder.addFieldInt32(14, abiVersion, 1);
|
|
405
|
+
}
|
|
406
|
+
static addWasmHash(builder, wasmHashOffset) {
|
|
407
|
+
builder.addFieldOffset(15, wasmHashOffset, 0);
|
|
408
|
+
}
|
|
409
|
+
static createWasmHashVector(builder, data) {
|
|
410
|
+
builder.startVector(1, data.length, 1);
|
|
411
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
412
|
+
builder.addInt8(data[i]);
|
|
413
|
+
}
|
|
414
|
+
return builder.endVector();
|
|
415
|
+
}
|
|
416
|
+
static startWasmHashVector(builder, numElems) {
|
|
417
|
+
builder.startVector(1, numElems, 1);
|
|
418
|
+
}
|
|
419
|
+
static addWasmSize(builder, wasmSize) {
|
|
420
|
+
builder.addFieldInt64(16, wasmSize, BigInt("0"));
|
|
421
|
+
}
|
|
422
|
+
static addWasmCid(builder, wasmCidOffset) {
|
|
423
|
+
builder.addFieldOffset(17, wasmCidOffset, 0);
|
|
424
|
+
}
|
|
425
|
+
static addEncryptedWasmHash(builder, encryptedWasmHashOffset) {
|
|
426
|
+
builder.addFieldOffset(18, encryptedWasmHashOffset, 0);
|
|
427
|
+
}
|
|
428
|
+
static createEncryptedWasmHashVector(builder, data) {
|
|
429
|
+
builder.startVector(1, data.length, 1);
|
|
430
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
431
|
+
builder.addInt8(data[i]);
|
|
432
|
+
}
|
|
433
|
+
return builder.endVector();
|
|
434
|
+
}
|
|
435
|
+
static startEncryptedWasmHashVector(builder, numElems) {
|
|
436
|
+
builder.startVector(1, numElems, 1);
|
|
437
|
+
}
|
|
438
|
+
static addEncryptedWasmSize(builder, encryptedWasmSize) {
|
|
439
|
+
builder.addFieldInt64(19, encryptedWasmSize, BigInt("0"));
|
|
440
|
+
}
|
|
441
|
+
static addEntryFunctions(builder, entryFunctionsOffset) {
|
|
442
|
+
builder.addFieldOffset(20, entryFunctionsOffset, 0);
|
|
443
|
+
}
|
|
444
|
+
static createEntryFunctionsVector(builder, data) {
|
|
445
|
+
builder.startVector(4, data.length, 4);
|
|
446
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
447
|
+
builder.addOffset(data[i]);
|
|
448
|
+
}
|
|
449
|
+
return builder.endVector();
|
|
450
|
+
}
|
|
451
|
+
static startEntryFunctionsVector(builder, numElems) {
|
|
452
|
+
builder.startVector(4, numElems, 4);
|
|
453
|
+
}
|
|
454
|
+
static addRequiredSchemas(builder, requiredSchemasOffset) {
|
|
455
|
+
builder.addFieldOffset(21, requiredSchemasOffset, 0);
|
|
456
|
+
}
|
|
457
|
+
static createRequiredSchemasVector(builder, data) {
|
|
458
|
+
builder.startVector(4, data.length, 4);
|
|
459
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
460
|
+
builder.addOffset(data[i]);
|
|
461
|
+
}
|
|
462
|
+
return builder.endVector();
|
|
463
|
+
}
|
|
464
|
+
static startRequiredSchemasVector(builder, numElems) {
|
|
465
|
+
builder.startVector(4, numElems, 4);
|
|
466
|
+
}
|
|
467
|
+
static addDependencies(builder, dependenciesOffset) {
|
|
468
|
+
builder.addFieldOffset(22, dependenciesOffset, 0);
|
|
469
|
+
}
|
|
470
|
+
static createDependenciesVector(builder, data) {
|
|
471
|
+
builder.startVector(4, data.length, 4);
|
|
472
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
473
|
+
builder.addOffset(data[i]);
|
|
474
|
+
}
|
|
475
|
+
return builder.endVector();
|
|
476
|
+
}
|
|
477
|
+
static startDependenciesVector(builder, numElems) {
|
|
478
|
+
builder.startVector(4, numElems, 4);
|
|
479
|
+
}
|
|
480
|
+
static addCapabilities(builder, capabilitiesOffset) {
|
|
481
|
+
builder.addFieldOffset(23, capabilitiesOffset, 0);
|
|
482
|
+
}
|
|
483
|
+
static createCapabilitiesVector(builder, data) {
|
|
484
|
+
builder.startVector(4, data.length, 4);
|
|
485
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
486
|
+
builder.addOffset(data[i]);
|
|
487
|
+
}
|
|
488
|
+
return builder.endVector();
|
|
489
|
+
}
|
|
490
|
+
static startCapabilitiesVector(builder, numElems) {
|
|
491
|
+
builder.startVector(4, numElems, 4);
|
|
492
|
+
}
|
|
493
|
+
static addProviderPeerId(builder, providerPeerIdOffset) {
|
|
494
|
+
builder.addFieldOffset(24, providerPeerIdOffset, 0);
|
|
495
|
+
}
|
|
496
|
+
static addProviderEpmCid(builder, providerEpmCidOffset) {
|
|
497
|
+
builder.addFieldOffset(25, providerEpmCidOffset, 0);
|
|
498
|
+
}
|
|
499
|
+
static addEncrypted(builder, encrypted) {
|
|
500
|
+
builder.addFieldInt8(26, +encrypted, 1);
|
|
501
|
+
}
|
|
502
|
+
static addRequiredScope(builder, requiredScopeOffset) {
|
|
503
|
+
builder.addFieldOffset(27, requiredScopeOffset, 0);
|
|
504
|
+
}
|
|
505
|
+
static addKeyId(builder, keyIdOffset) {
|
|
506
|
+
builder.addFieldOffset(28, keyIdOffset, 0);
|
|
507
|
+
}
|
|
508
|
+
static addAllowedDomains(builder, allowedDomainsOffset) {
|
|
509
|
+
builder.addFieldOffset(29, allowedDomainsOffset, 0);
|
|
510
|
+
}
|
|
511
|
+
static createAllowedDomainsVector(builder, data) {
|
|
512
|
+
builder.startVector(4, data.length, 4);
|
|
513
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
514
|
+
builder.addOffset(data[i]);
|
|
515
|
+
}
|
|
516
|
+
return builder.endVector();
|
|
517
|
+
}
|
|
518
|
+
static startAllowedDomainsVector(builder, numElems) {
|
|
519
|
+
builder.startVector(4, numElems, 4);
|
|
520
|
+
}
|
|
521
|
+
static addMaxGrantTimeoutMs(builder, maxGrantTimeoutMs) {
|
|
522
|
+
builder.addFieldInt64(30, maxGrantTimeoutMs, BigInt("0"));
|
|
523
|
+
}
|
|
524
|
+
static addMinPermissions(builder, minPermissionsOffset) {
|
|
525
|
+
builder.addFieldOffset(31, minPermissionsOffset, 0);
|
|
526
|
+
}
|
|
527
|
+
static createMinPermissionsVector(builder, data) {
|
|
528
|
+
builder.startVector(4, data.length, 4);
|
|
529
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
530
|
+
builder.addOffset(data[i]);
|
|
531
|
+
}
|
|
532
|
+
return builder.endVector();
|
|
533
|
+
}
|
|
534
|
+
static startMinPermissionsVector(builder, numElems) {
|
|
535
|
+
builder.startVector(4, numElems, 4);
|
|
536
|
+
}
|
|
537
|
+
static addCreatedAt(builder, createdAt) {
|
|
538
|
+
builder.addFieldInt64(32, createdAt, BigInt("0"));
|
|
539
|
+
}
|
|
540
|
+
static addUpdatedAt(builder, updatedAt) {
|
|
541
|
+
builder.addFieldInt64(33, updatedAt, BigInt("0"));
|
|
542
|
+
}
|
|
543
|
+
static addDocumentationUrl(builder, documentationUrlOffset) {
|
|
544
|
+
builder.addFieldOffset(34, documentationUrlOffset, 0);
|
|
545
|
+
}
|
|
546
|
+
static addChangelogUrl(builder, changelogUrlOffset) {
|
|
547
|
+
builder.addFieldOffset(35, changelogUrlOffset, 0);
|
|
548
|
+
}
|
|
549
|
+
static addIconUrl(builder, iconUrlOffset) {
|
|
550
|
+
builder.addFieldOffset(36, iconUrlOffset, 0);
|
|
551
|
+
}
|
|
552
|
+
static addLicense(builder, licenseOffset) {
|
|
553
|
+
builder.addFieldOffset(37, licenseOffset, 0);
|
|
554
|
+
}
|
|
555
|
+
static addPaymentModel(builder, paymentModel) {
|
|
556
|
+
builder.addFieldInt8(38, paymentModel, purchaseTier.Free);
|
|
557
|
+
}
|
|
558
|
+
static addPriceUsdCents(builder, priceUsdCents) {
|
|
559
|
+
builder.addFieldInt32(39, priceUsdCents, 0);
|
|
560
|
+
}
|
|
561
|
+
static addSubscriptionPeriodDays(builder, subscriptionPeriodDays) {
|
|
562
|
+
builder.addFieldInt32(40, subscriptionPeriodDays, 0);
|
|
563
|
+
}
|
|
564
|
+
static addAcceptedPaymentMethods(builder, acceptedPaymentMethodsOffset) {
|
|
565
|
+
builder.addFieldOffset(41, acceptedPaymentMethodsOffset, 0);
|
|
566
|
+
}
|
|
567
|
+
static createAcceptedPaymentMethodsVector(builder, data) {
|
|
568
|
+
builder.startVector(4, data.length, 4);
|
|
569
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
570
|
+
builder.addOffset(data[i]);
|
|
571
|
+
}
|
|
572
|
+
return builder.endVector();
|
|
573
|
+
}
|
|
574
|
+
static startAcceptedPaymentMethodsVector(builder, numElems) {
|
|
575
|
+
builder.startVector(4, numElems, 4);
|
|
576
|
+
}
|
|
577
|
+
static addListingStatus(builder, listingStatus) {
|
|
578
|
+
builder.addFieldInt8(42, listingStatus, publicationState.Public);
|
|
579
|
+
}
|
|
580
|
+
static addSignature(builder, signatureOffset) {
|
|
581
|
+
builder.addFieldOffset(43, signatureOffset, 0);
|
|
582
|
+
}
|
|
583
|
+
static createSignatureVector(builder, data) {
|
|
584
|
+
builder.startVector(1, data.length, 1);
|
|
585
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
586
|
+
builder.addInt8(data[i]);
|
|
587
|
+
}
|
|
588
|
+
return builder.endVector();
|
|
589
|
+
}
|
|
590
|
+
static startSignatureVector(builder, numElems) {
|
|
591
|
+
builder.startVector(1, numElems, 1);
|
|
592
|
+
}
|
|
593
|
+
static endPLG(builder) {
|
|
594
|
+
const offset = builder.endObject();
|
|
595
|
+
builder.requiredField(offset, 4);
|
|
596
|
+
builder.requiredField(offset, 6);
|
|
597
|
+
builder.requiredField(offset, 8);
|
|
598
|
+
return offset;
|
|
599
|
+
}
|
|
600
|
+
static finishPLGBuffer(builder, offset) {
|
|
601
|
+
builder.finish(offset, "$PLG");
|
|
602
|
+
}
|
|
603
|
+
static finishSizePrefixedPLGBuffer(builder, offset) {
|
|
604
|
+
builder.finish(offset, "$PLG", true);
|
|
605
|
+
}
|
|
606
|
+
static createPLG(builder, pluginIdOffset, nameOffset, versionOffset, descriptionOffset, taglineOffset, pluginType, publisherNameOffset, publisherHandleOffset, publisherUrlOffset, supportUrlOffset, tagsOffset, featuresOffset, screenshotUrlsOffset, bannerUrlOffset, abiVersion, wasmHashOffset, wasmSize, wasmCidOffset, encryptedWasmHashOffset, encryptedWasmSize, entryFunctionsOffset, requiredSchemasOffset, dependenciesOffset, capabilitiesOffset, providerPeerIdOffset, providerEpmCidOffset, encrypted, requiredScopeOffset, keyIdOffset, allowedDomainsOffset, maxGrantTimeoutMs, minPermissionsOffset, createdAt, updatedAt, documentationUrlOffset, changelogUrlOffset, iconUrlOffset, licenseOffset, paymentModel, priceUsdCents, subscriptionPeriodDays, acceptedPaymentMethodsOffset, listingStatus, signatureOffset) {
|
|
607
|
+
PLG.startPLG(builder);
|
|
608
|
+
PLG.addPluginId(builder, pluginIdOffset);
|
|
609
|
+
PLG.addName(builder, nameOffset);
|
|
610
|
+
PLG.addVersion(builder, versionOffset);
|
|
611
|
+
PLG.addDescription(builder, descriptionOffset);
|
|
612
|
+
PLG.addTagline(builder, taglineOffset);
|
|
613
|
+
PLG.addPluginType(builder, pluginType);
|
|
614
|
+
PLG.addPublisherName(builder, publisherNameOffset);
|
|
615
|
+
PLG.addPublisherHandle(builder, publisherHandleOffset);
|
|
616
|
+
PLG.addPublisherUrl(builder, publisherUrlOffset);
|
|
617
|
+
PLG.addSupportUrl(builder, supportUrlOffset);
|
|
618
|
+
PLG.addTags(builder, tagsOffset);
|
|
619
|
+
PLG.addFeatures(builder, featuresOffset);
|
|
620
|
+
PLG.addScreenshotUrls(builder, screenshotUrlsOffset);
|
|
621
|
+
PLG.addBannerUrl(builder, bannerUrlOffset);
|
|
622
|
+
PLG.addAbiVersion(builder, abiVersion);
|
|
623
|
+
PLG.addWasmHash(builder, wasmHashOffset);
|
|
624
|
+
PLG.addWasmSize(builder, wasmSize);
|
|
625
|
+
PLG.addWasmCid(builder, wasmCidOffset);
|
|
626
|
+
PLG.addEncryptedWasmHash(builder, encryptedWasmHashOffset);
|
|
627
|
+
PLG.addEncryptedWasmSize(builder, encryptedWasmSize);
|
|
628
|
+
PLG.addEntryFunctions(builder, entryFunctionsOffset);
|
|
629
|
+
PLG.addRequiredSchemas(builder, requiredSchemasOffset);
|
|
630
|
+
PLG.addDependencies(builder, dependenciesOffset);
|
|
631
|
+
PLG.addCapabilities(builder, capabilitiesOffset);
|
|
632
|
+
PLG.addProviderPeerId(builder, providerPeerIdOffset);
|
|
633
|
+
PLG.addProviderEpmCid(builder, providerEpmCidOffset);
|
|
634
|
+
PLG.addEncrypted(builder, encrypted);
|
|
635
|
+
PLG.addRequiredScope(builder, requiredScopeOffset);
|
|
636
|
+
PLG.addKeyId(builder, keyIdOffset);
|
|
637
|
+
PLG.addAllowedDomains(builder, allowedDomainsOffset);
|
|
638
|
+
PLG.addMaxGrantTimeoutMs(builder, maxGrantTimeoutMs);
|
|
639
|
+
PLG.addMinPermissions(builder, minPermissionsOffset);
|
|
640
|
+
PLG.addCreatedAt(builder, createdAt);
|
|
641
|
+
PLG.addUpdatedAt(builder, updatedAt);
|
|
642
|
+
PLG.addDocumentationUrl(builder, documentationUrlOffset);
|
|
643
|
+
PLG.addChangelogUrl(builder, changelogUrlOffset);
|
|
644
|
+
PLG.addIconUrl(builder, iconUrlOffset);
|
|
645
|
+
PLG.addLicense(builder, licenseOffset);
|
|
646
|
+
PLG.addPaymentModel(builder, paymentModel);
|
|
647
|
+
PLG.addPriceUsdCents(builder, priceUsdCents);
|
|
648
|
+
PLG.addSubscriptionPeriodDays(builder, subscriptionPeriodDays);
|
|
649
|
+
PLG.addAcceptedPaymentMethods(builder, acceptedPaymentMethodsOffset);
|
|
650
|
+
PLG.addListingStatus(builder, listingStatus);
|
|
651
|
+
PLG.addSignature(builder, signatureOffset);
|
|
652
|
+
return PLG.endPLG(builder);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
export {
|
|
656
|
+
PLG
|
|
657
|
+
};
|