@ic-reactor/core 1.6.0-beta.4 → 1.6.0-beta.6

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.
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -56,9 +33,10 @@ class CandidAdapter {
56
33
  }
57
34
  initializeParser() {
58
35
  return __awaiter(this, void 0, void 0, function* () {
36
+ var _a;
59
37
  try {
60
- this.parserModule = yield Promise.resolve().then(() => __importStar(require("@ic-reactor/parser")));
61
- yield this.parserModule.default();
38
+ this.parserModule = require("@ic-reactor/parser");
39
+ yield ((_a = this.parserModule) === null || _a === void 0 ? void 0 : _a.default());
62
40
  }
63
41
  catch (error) {
64
42
  throw new Error(`Error initializing parser: ${error}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/core",
3
- "version": "1.6.0-beta.4",
3
+ "version": "1.6.0-beta.6",
4
4
  "description": "A library for intracting with the Internet Computer canisters",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,9 +41,7 @@
41
41
  "zustand": "^4.5"
42
42
  },
43
43
  "devDependencies": {
44
- "@ic-reactor/parser": "^0.1.0-beta.1",
45
- "@types/copyfiles": "^2",
46
- "copyfiles": "^2.4.1"
44
+ "@ic-reactor/parser": "^0.1.0-beta.1"
47
45
  },
48
46
  "scripts": {
49
47
  "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest",
@@ -51,12 +49,11 @@
51
49
  "bundle": "npm run bundle:dev && npm run bundle:prod",
52
50
  "bundle:dev": "npx webpack --mode development",
53
51
  "bundle:prod": "npx webpack --mode production",
54
- "build": "npx tsc && npm run bundle && npm run copy",
55
- "copy": "copyfiles -u 1 \"src/**/*.d.ts\" dist",
52
+ "build": "npx tsc && npm run bundle",
56
53
  "clean": "npx rimraf dist && npx rimraf umd && npx rimraf node_modules"
57
54
  },
58
55
  "engines": {
59
56
  "node": ">=10"
60
57
  },
61
- "gitHead": "4978f08d28121ef2d037cfc305a8402f28376460"
58
+ "gitHead": "0ea67535c619645638ccac472f10fb94d043acf6"
62
59
  }
@@ -1,48 +0,0 @@
1
- declare module '@ic-reactor/parser' {
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * @param {string} prog
6
- * @returns {string}
7
- */
8
- export function did_to_js(prog: string): string;
9
- /**
10
- * @param {string} prog
11
- * @returns {string}
12
- */
13
- export function did_to_ts(prog: string): string;
14
-
15
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
16
-
17
- export interface InitOutput {
18
- readonly memory: WebAssembly.Memory;
19
- readonly did_to_js: (a: number, b: number, c: number) => void;
20
- readonly did_to_ts: (a: number, b: number, c: number) => void;
21
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
22
- readonly __wbindgen_malloc: (a: number, b: number) => number;
23
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
24
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
25
- }
26
-
27
- export type SyncInitInput = BufferSource | WebAssembly.Module;
28
- /**
29
- * Instantiates the given `module`, which can either be bytes or
30
- * a precompiled `WebAssembly.Module`.
31
- *
32
- * @param {SyncInitInput} module
33
- *
34
- * @returns {InitOutput}
35
- */
36
- export function initSync(module: SyncInitInput): InitOutput;
37
-
38
- /**
39
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
40
- * for everything else, calls `WebAssembly.instantiate` directly.
41
- *
42
- * @param {InitInput | Promise<InitInput>} module_or_path
43
- *
44
- * @returns {Promise<InitOutput>}
45
- */
46
- export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
47
-
48
- }