space-data-module-sdk 0.8.0 → 0.8.2

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 (43) hide show
  1. package/README.md +17 -3
  2. package/bin/space-data-module.js +8 -6
  3. package/package.json +2 -2
  4. package/schemas/spacedatastandards/PLG.fbs +191 -0
  5. package/src/bundle/wasm.js +31 -9
  6. package/src/compliance/index.js +4 -0
  7. package/src/compliance/pluginCompliance.js +158 -2
  8. package/src/embeddedManifest.js +25 -5
  9. package/src/generated/orbpro/invoke/plugin-invoke-request.js +2 -2
  10. package/src/generated/orbpro/invoke/plugin-invoke-response.js +2 -2
  11. package/src/generated/orbpro/stream/flat-buffer-type-ref.js +2 -2
  12. package/src/generated/orbpro/stream/typed-arena-buffer.js +2 -2
  13. package/src/generated/spacedatastandards/plg/entry-function.js +86 -0
  14. package/src/generated/spacedatastandards/plg/entry-function.ts +119 -0
  15. package/src/generated/spacedatastandards/plg/index.js +16 -0
  16. package/src/generated/spacedatastandards/plg/index.ts +11 -0
  17. package/src/generated/spacedatastandards/plg/plg.js +657 -0
  18. package/src/generated/spacedatastandards/plg/plg.ts +924 -0
  19. package/src/generated/spacedatastandards/plg/plugin-capability.js +66 -0
  20. package/src/generated/spacedatastandards/plg/plugin-capability.ts +84 -0
  21. package/src/generated/spacedatastandards/plg/plugin-category.js +15 -0
  22. package/src/generated/spacedatastandards/plg/plugin-category.ts +53 -0
  23. package/src/generated/spacedatastandards/plg/plugin-dependency.js +63 -0
  24. package/src/generated/spacedatastandards/plg/plugin-dependency.ts +86 -0
  25. package/src/generated/spacedatastandards/plg/publication-state.js +9 -0
  26. package/src/generated/spacedatastandards/plg/publication-state.ts +23 -0
  27. package/src/generated/spacedatastandards/plg/purchase-tier.js +9 -0
  28. package/src/generated/spacedatastandards/plg/purchase-tier.ts +23 -0
  29. package/src/invoke/codec.js +1 -1
  30. package/src/manifest/browser.js +7 -0
  31. package/src/manifest/codec.js +73 -0
  32. package/src/manifest/index.js +7 -0
  33. package/src/manifest/legacyToPlg.js +249 -0
  34. package/src/manifest/plgCodec.js +826 -0
  35. package/src/standards/sharedCatalog.js +132 -0
  36. package/src/testing/native/wasmedge_emscripten_pthread_runner.c +17 -3
  37. package/src/vendor/flatbuffers/LICENSE +202 -0
  38. package/src/vendor/flatbuffers/builder.js +534 -0
  39. package/src/vendor/flatbuffers/byte-buffer.js +253 -0
  40. package/src/vendor/flatbuffers/constants.js +4 -0
  41. package/src/vendor/flatbuffers/encoding.js +5 -0
  42. package/src/vendor/flatbuffers/flatbuffers.js +5 -0
  43. package/src/vendor/flatbuffers/utils.js +4 -0
@@ -1,6 +1,6 @@
1
1
  // automatically generated by the FlatBuffers compiler, do not modify
2
2
  /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
3
- import * as flatbuffers from "flatbuffers/mjs/flatbuffers.js";
3
+ import * as flatbuffers from "../../../vendor/flatbuffers/flatbuffers.js";
4
4
  import { PayloadWireFormat } from "../../orbpro/stream/payload-wire-format.js";
5
5
  function normalizePayloadWireFormat(value) {
6
6
  if (value === PayloadWireFormat.ALIGNED_BINARY) {
@@ -202,4 +202,4 @@ export class FlatBufferTypeRefT {
202
202
  return FlatBufferTypeRef.createFlatBufferTypeRef(builder, schemaName, fileIdentifier, schemaHash, this.acceptsAnyFlatbuffer, normalizePayloadWireFormat(this.wireFormat), rootTypeName, this.fixedStringLength, this.byteLength, this.requiredAlignment);
203
203
  }
204
204
  }
205
- //# sourceMappingURL=flat-buffer-type-ref.js.map
205
+ //# sourceMappingURL=flat-buffer-type-ref.js.map
@@ -1,6 +1,6 @@
1
1
  // automatically generated by the FlatBuffers compiler, do not modify
2
2
  /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
3
- import * as flatbuffers from "flatbuffers/mjs/flatbuffers.js";
3
+ import * as flatbuffers from "../../../vendor/flatbuffers/flatbuffers.js";
4
4
  import { BufferMutability } from "../../orbpro/stream/buffer-mutability.js";
5
5
  import { BufferOwnership } from "../../orbpro/stream/buffer-ownership.js";
6
6
  import { FlatBufferTypeRef, } from "../../orbpro/stream/flat-buffer-type-ref.js";
@@ -230,4 +230,4 @@ export class TypedArenaBufferT {
230
230
  return TypedArenaBuffer.createTypedArenaBuffer(builder, typeRef, portId, this.alignment, this.offset, this.size, this.ownership, this.generation, this.mutability, this.traceId, this.streamId, this.sequence, this.endOfStream);
231
231
  }
232
232
  }
233
- //# sourceMappingURL=typed-arena-buffer.js.map
233
+ //# sourceMappingURL=typed-arena-buffer.js.map
@@ -0,0 +1,86 @@
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
+ class EntryFunction {
9
+ constructor() {
10
+ __publicField(this, "bb", null);
11
+ __publicField(this, "bb_pos", 0);
12
+ }
13
+ __init(i, bb) {
14
+ this.bb_pos = i;
15
+ this.bb = bb;
16
+ return this;
17
+ }
18
+ static getRootAsEntryFunction(bb, obj) {
19
+ return (obj || new EntryFunction()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
20
+ }
21
+ static getSizePrefixedRootAsEntryFunction(bb, obj) {
22
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
23
+ return (obj || new EntryFunction()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
24
+ }
25
+ name(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
+ description(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
+ inputSchemas(index, optionalEncoding) {
34
+ const offset = this.bb.__offset(this.bb_pos, 8);
35
+ return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
36
+ }
37
+ inputSchemasLength() {
38
+ const offset = this.bb.__offset(this.bb_pos, 8);
39
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
40
+ }
41
+ outputSchema(optionalEncoding) {
42
+ const offset = this.bb.__offset(this.bb_pos, 10);
43
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
44
+ }
45
+ static startEntryFunction(builder) {
46
+ builder.startObject(4);
47
+ }
48
+ static addName(builder, nameOffset) {
49
+ builder.addFieldOffset(0, nameOffset, 0);
50
+ }
51
+ static addDescription(builder, descriptionOffset) {
52
+ builder.addFieldOffset(1, descriptionOffset, 0);
53
+ }
54
+ static addInputSchemas(builder, inputSchemasOffset) {
55
+ builder.addFieldOffset(2, inputSchemasOffset, 0);
56
+ }
57
+ static createInputSchemasVector(builder, data) {
58
+ builder.startVector(4, data.length, 4);
59
+ for (let i = data.length - 1; i >= 0; i--) {
60
+ builder.addOffset(data[i]);
61
+ }
62
+ return builder.endVector();
63
+ }
64
+ static startInputSchemasVector(builder, numElems) {
65
+ builder.startVector(4, numElems, 4);
66
+ }
67
+ static addOutputSchema(builder, outputSchemaOffset) {
68
+ builder.addFieldOffset(3, outputSchemaOffset, 0);
69
+ }
70
+ static endEntryFunction(builder) {
71
+ const offset = builder.endObject();
72
+ builder.requiredField(offset, 4);
73
+ return offset;
74
+ }
75
+ static createEntryFunction(builder, nameOffset, descriptionOffset, inputSchemasOffset, outputSchemaOffset) {
76
+ EntryFunction.startEntryFunction(builder);
77
+ EntryFunction.addName(builder, nameOffset);
78
+ EntryFunction.addDescription(builder, descriptionOffset);
79
+ EntryFunction.addInputSchemas(builder, inputSchemasOffset);
80
+ EntryFunction.addOutputSchema(builder, outputSchemaOffset);
81
+ return EntryFunction.endEntryFunction(builder);
82
+ }
83
+ }
84
+ export {
85
+ EntryFunction
86
+ };
@@ -0,0 +1,119 @@
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
+ * Plugin entry point function definition
9
+ */
10
+ export class EntryFunction {
11
+ bb: flatbuffers.ByteBuffer|null = null;
12
+ bb_pos = 0;
13
+ __init(i:number, bb:flatbuffers.ByteBuffer):EntryFunction {
14
+ this.bb_pos = i;
15
+ this.bb = bb;
16
+ return this;
17
+ }
18
+
19
+ static getRootAsEntryFunction(bb:flatbuffers.ByteBuffer, obj?:EntryFunction):EntryFunction {
20
+ return (obj || new EntryFunction()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
21
+ }
22
+
23
+ static getSizePrefixedRootAsEntryFunction(bb:flatbuffers.ByteBuffer, obj?:EntryFunction):EntryFunction {
24
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
25
+ return (obj || new EntryFunction()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
26
+ }
27
+
28
+ /**
29
+ * Function name as exported from WASM
30
+ */
31
+ name():string|null
32
+ name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
33
+ name(optionalEncoding?:any):string|Uint8Array|null {
34
+ const offset = this.bb!.__offset(this.bb_pos, 4);
35
+ return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
36
+ }
37
+
38
+ /**
39
+ * Human-readable description
40
+ */
41
+ description():string|null
42
+ description(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
43
+ description(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
+ /**
49
+ * Input parameter types (FlatBuffer schema names)
50
+ */
51
+ inputSchemas(index: number):string
52
+ inputSchemas(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
53
+ inputSchemas(index: number,optionalEncoding?:any):string|Uint8Array|null {
54
+ const offset = this.bb!.__offset(this.bb_pos, 8);
55
+ return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
56
+ }
57
+
58
+ inputSchemasLength():number {
59
+ const offset = this.bb!.__offset(this.bb_pos, 8);
60
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
61
+ }
62
+
63
+ /**
64
+ * Output type (FlatBuffer schema name)
65
+ */
66
+ outputSchema():string|null
67
+ outputSchema(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
68
+ outputSchema(optionalEncoding?:any):string|Uint8Array|null {
69
+ const offset = this.bb!.__offset(this.bb_pos, 10);
70
+ return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
71
+ }
72
+
73
+ static startEntryFunction(builder:flatbuffers.Builder) {
74
+ builder.startObject(4);
75
+ }
76
+
77
+ static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
78
+ builder.addFieldOffset(0, nameOffset, 0);
79
+ }
80
+
81
+ static addDescription(builder:flatbuffers.Builder, descriptionOffset:flatbuffers.Offset) {
82
+ builder.addFieldOffset(1, descriptionOffset, 0);
83
+ }
84
+
85
+ static addInputSchemas(builder:flatbuffers.Builder, inputSchemasOffset:flatbuffers.Offset) {
86
+ builder.addFieldOffset(2, inputSchemasOffset, 0);
87
+ }
88
+
89
+ static createInputSchemasVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
90
+ builder.startVector(4, data.length, 4);
91
+ for (let i = data.length - 1; i >= 0; i--) {
92
+ builder.addOffset(data[i]!);
93
+ }
94
+ return builder.endVector();
95
+ }
96
+
97
+ static startInputSchemasVector(builder:flatbuffers.Builder, numElems:number) {
98
+ builder.startVector(4, numElems, 4);
99
+ }
100
+
101
+ static addOutputSchema(builder:flatbuffers.Builder, outputSchemaOffset:flatbuffers.Offset) {
102
+ builder.addFieldOffset(3, outputSchemaOffset, 0);
103
+ }
104
+
105
+ static endEntryFunction(builder:flatbuffers.Builder):flatbuffers.Offset {
106
+ const offset = builder.endObject();
107
+ builder.requiredField(offset, 4) // NAME
108
+ return offset;
109
+ }
110
+
111
+ static createEntryFunction(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, descriptionOffset:flatbuffers.Offset, inputSchemasOffset:flatbuffers.Offset, outputSchemaOffset:flatbuffers.Offset):flatbuffers.Offset {
112
+ EntryFunction.startEntryFunction(builder);
113
+ EntryFunction.addName(builder, nameOffset);
114
+ EntryFunction.addDescription(builder, descriptionOffset);
115
+ EntryFunction.addInputSchemas(builder, inputSchemasOffset);
116
+ EntryFunction.addOutputSchema(builder, outputSchemaOffset);
117
+ return EntryFunction.endEntryFunction(builder);
118
+ }
119
+ }
@@ -0,0 +1,16 @@
1
+ import { EntryFunction } from "./entry-function.js";
2
+ import { PLG } from "./plg.js";
3
+ import { PluginCapability } from "./plugin-capability.js";
4
+ import { PluginDependency } from "./plugin-dependency.js";
5
+ import { pluginCategory } from "./plugin-category.js";
6
+ import { publicationState } from "./publication-state.js";
7
+ import { purchaseTier } from "./purchase-tier.js";
8
+ export {
9
+ EntryFunction,
10
+ PLG,
11
+ PluginCapability,
12
+ PluginDependency,
13
+ pluginCategory,
14
+ publicationState,
15
+ purchaseTier
16
+ };
@@ -0,0 +1,11 @@
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
+ export { EntryFunction } from './entry-function.js';
6
+ export { PLG } from './plg.js';
7
+ export { PluginCapability } from './plugin-capability.js';
8
+ export { PluginDependency } from './plugin-dependency.js';
9
+ export { pluginCategory } from './plugin-category.js';
10
+ export { publicationState } from './publication-state.js';
11
+ export { purchaseTier } from './purchase-tier.js';