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.
Files changed (67) hide show
  1. package/README.md +16 -23
  2. package/bin/space-data-module.js +5 -3
  3. package/package.json +2 -2
  4. package/schemas/spacedatastandards/PLG.fbs +191 -0
  5. package/src/AGENTS.md +1 -1
  6. package/src/bundle/AGENTS.md +6 -5
  7. package/src/bundle/codec.js +163 -48
  8. package/src/bundle/constants.js +1 -1
  9. package/src/bundle/wasm.js +53 -32
  10. package/src/compiler/compileModule.js +9 -1
  11. package/src/compliance/index.js +4 -0
  12. package/src/compliance/pluginCompliance.js +158 -2
  13. package/src/embeddedManifest.js +25 -5
  14. package/src/generated/orbpro/invoke/plugin-invoke-request.js +2 -2
  15. package/src/generated/orbpro/invoke/plugin-invoke-response.js +2 -2
  16. package/src/generated/orbpro/stream/flat-buffer-type-ref.js +2 -2
  17. package/src/generated/orbpro/stream/typed-arena-buffer.js +2 -2
  18. package/src/generated/spacedatastandards/plg/entry-function.js +86 -0
  19. package/src/generated/spacedatastandards/plg/entry-function.ts +119 -0
  20. package/src/generated/spacedatastandards/plg/index.js +16 -0
  21. package/src/generated/spacedatastandards/plg/index.ts +11 -0
  22. package/src/generated/spacedatastandards/plg/plg.js +657 -0
  23. package/src/generated/spacedatastandards/plg/plg.ts +924 -0
  24. package/src/generated/spacedatastandards/plg/plugin-capability.js +66 -0
  25. package/src/generated/spacedatastandards/plg/plugin-capability.ts +84 -0
  26. package/src/generated/spacedatastandards/plg/plugin-category.js +15 -0
  27. package/src/generated/spacedatastandards/plg/plugin-category.ts +53 -0
  28. package/src/generated/spacedatastandards/plg/plugin-dependency.js +63 -0
  29. package/src/generated/spacedatastandards/plg/plugin-dependency.ts +86 -0
  30. package/src/generated/spacedatastandards/plg/publication-state.js +9 -0
  31. package/src/generated/spacedatastandards/plg/publication-state.ts +23 -0
  32. package/src/generated/spacedatastandards/plg/purchase-tier.js +9 -0
  33. package/src/generated/spacedatastandards/plg/purchase-tier.ts +23 -0
  34. package/src/index.d.ts +1 -1
  35. package/src/invoke/codec.js +1 -1
  36. package/src/manifest/browser.js +7 -0
  37. package/src/manifest/index.js +7 -0
  38. package/src/manifest/legacyToPlg.js +249 -0
  39. package/src/manifest/plgCodec.js +826 -0
  40. package/src/standards/sharedCatalog.js +132 -0
  41. package/src/transport/records.js +34 -3
  42. package/src/vendor/flatbuffers/LICENSE +202 -0
  43. package/src/vendor/flatbuffers/builder.js +534 -0
  44. package/src/vendor/flatbuffers/byte-buffer.js +253 -0
  45. package/src/vendor/flatbuffers/constants.js +4 -0
  46. package/src/vendor/flatbuffers/encoding.js +5 -0
  47. package/src/vendor/flatbuffers/flatbuffers.js +5 -0
  48. package/src/vendor/flatbuffers/utils.js +4 -0
  49. package/schemas/ModuleBundle.fbs +0 -108
  50. package/src/generated/orbpro/module/canonicalization-rule.d.ts +0 -48
  51. package/src/generated/orbpro/module/canonicalization-rule.js +0 -95
  52. package/src/generated/orbpro/module/canonicalization-rule.ts +0 -142
  53. package/src/generated/orbpro/module/module-bundle-entry-role.d.ts +0 -11
  54. package/src/generated/orbpro/module/module-bundle-entry-role.js +0 -14
  55. package/src/generated/orbpro/module/module-bundle-entry-role.ts +0 -15
  56. package/src/generated/orbpro/module/module-bundle-entry.d.ts +0 -97
  57. package/src/generated/orbpro/module/module-bundle-entry.js +0 -219
  58. package/src/generated/orbpro/module/module-bundle-entry.ts +0 -287
  59. package/src/generated/orbpro/module/module-bundle.d.ts +0 -86
  60. package/src/generated/orbpro/module/module-bundle.js +0 -213
  61. package/src/generated/orbpro/module/module-bundle.ts +0 -277
  62. package/src/generated/orbpro/module/module-payload-encoding.d.ts +0 -9
  63. package/src/generated/orbpro/module/module-payload-encoding.js +0 -12
  64. package/src/generated/orbpro/module/module-payload-encoding.ts +0 -13
  65. package/src/generated/orbpro/module.d.ts +0 -5
  66. package/src/generated/orbpro/module.js +0 -7
  67. package/src/generated/orbpro/module.ts +0 -9
@@ -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';