@steerprotocol/app-loader 0.0.3 → 0.0.5

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/lib/index.d.ts CHANGED
@@ -19,11 +19,13 @@ declare function config(): string;
19
19
  * @returns `i32`
20
20
  */
21
21
  declare function version(): number;
22
+ export declare function transform(): string;
22
23
  export type WasmModule = {
23
24
  initialize: typeof initialize;
24
25
  execute: typeof execute;
25
26
  config: typeof config;
26
27
  version: typeof version;
28
+ transform: typeof transform;
27
29
  memory: WebAssembly.Memory;
28
30
  };
29
31
  export declare const loadWasm: (input: string | ArrayBuffer, imports?: {}) => Promise<WasmModule>;
package/lib/index.js CHANGED
@@ -78,6 +78,15 @@ function instantiate(module, imports = {}) {
78
78
  // assembly/index/config() => ~lib/string/String
79
79
  return __liftString(exports.config() >>> 0);
80
80
  },
81
+ transform() {
82
+ try {
83
+ // assembly/index/transform() => ~lib/string/String
84
+ return __liftString(exports.transform() >>> 0);
85
+ }
86
+ catch (e) {
87
+ throw new Error('Unable to call .transform on wasm module. Are you sure this is a data connector?');
88
+ }
89
+ },
81
90
  }, exports);
82
91
  function __liftString(pointer) {
83
92
  if (!pointer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerprotocol/app-loader",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "App Loader for Steer Protocol",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",