@ton/sandbox 0.21.0-debugger.1 → 0.21.0-debugger.3

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/dist/index.d.ts CHANGED
@@ -10,4 +10,4 @@ export { Treasury, TreasuryContract, } from './treasury/Treasury';
10
10
  export { prettyLogTransaction, prettyLogTransactions, } from './utils/prettyLogTransaction';
11
11
  export { printTransactionFees, } from './utils/printTransactionFees';
12
12
  export { internal, } from './utils/message';
13
- export { registerCompiledContract, } from './debugger/SourceMapCache';
13
+ export { registerCompiledContract, } from './debugger/DebugInfoCache';
package/dist/index.js CHANGED
@@ -33,5 +33,5 @@ var printTransactionFees_1 = require("./utils/printTransactionFees");
33
33
  Object.defineProperty(exports, "printTransactionFees", { enumerable: true, get: function () { return printTransactionFees_1.printTransactionFees; } });
34
34
  var message_1 = require("./utils/message");
35
35
  Object.defineProperty(exports, "internal", { enumerable: true, get: function () { return message_1.internal; } });
36
- var SourceMapCache_1 = require("./debugger/SourceMapCache");
37
- Object.defineProperty(exports, "registerCompiledContract", { enumerable: true, get: function () { return SourceMapCache_1.registerCompiledContract; } });
36
+ var DebugInfoCache_1 = require("./debugger/DebugInfoCache");
37
+ Object.defineProperty(exports, "registerCompiledContract", { enumerable: true, get: function () { return DebugInfoCache_1.registerCompiledContract; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton/sandbox",
3
- "version": "0.21.0-debugger.1",
3
+ "version": "0.21.0-debugger.3",
4
4
  "description": "TON transaction emulator",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/ton-org/sandbox"
14
14
  },
15
15
  "devDependencies": {
16
- "@ton/blueprint": "0.23.0-debugger.0",
16
+ "@ton/blueprint": "0.23.0-debugger.2",
17
17
  "@ton/core": "^0.56.0",
18
18
  "@ton/crypto": "3.2.0",
19
19
  "@ton/test-utils": "^0.3.1",
@@ -35,6 +35,7 @@
35
35
  "wasm:copy": "cp src/executor/emulator-emscripten.js src/executor/emulator-emscripten.wasm.js ./dist/executor",
36
36
  "test": "yarn wasm:pack && yarn jest src",
37
37
  "build": "rm -rf dist && yarn wasm:pack && yarn test && tsc && yarn wasm:copy",
38
+ "build:notest": "rm -rf dist && yarn wasm:pack && tsc && yarn wasm:copy",
38
39
  "config:pack": "ts-node ./scripts/pack-config.ts"
39
40
  },
40
41
  "packageManager": "yarn@3.6.1",
@@ -1,5 +0,0 @@
1
- import { SourceMap } from "./Debuggee";
2
- import { CompileResult } from '@ton/blueprint';
3
- export type SourceMapCache = Map<string, SourceMap>;
4
- export declare const defaultSourceMapCache: SourceMapCache;
5
- export declare function registerCompiledContract(c: CompileResult): import("@ton/core").Cell;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerCompiledContract = exports.defaultSourceMapCache = void 0;
4
- const node_path_1 = require("node:path");
5
- exports.defaultSourceMapCache = new Map();
6
- function registerCompiledContract(c) {
7
- if (c.lang !== 'func') {
8
- throw new Error('Can only register func contracts');
9
- }
10
- if (c.debugInfo === undefined) {
11
- throw new Error('No debug info');
12
- }
13
- const sm = {};
14
- for (let i = 0; i < c.debugInfo.length; i++) {
15
- const di = c.debugInfo[i];
16
- if (di.ret || di.vars === undefined)
17
- continue;
18
- sm[i] = {
19
- path: (0, node_path_1.resolve)(di.file),
20
- line: di.line,
21
- variables: di.vars ?? [],
22
- };
23
- }
24
- exports.defaultSourceMapCache.set(c.code.hash().toString('base64'), sm);
25
- return c.code;
26
- }
27
- exports.registerCompiledContract = registerCompiledContract;