@ton/blueprint 0.36.0-dev.20250613120259.84ad783 → 0.36.0-dev.20250613120550.bcdedf4
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/package.json +5 -2
- package/dist/cli/rename.spec.d.ts +0 -1
- package/dist/cli/rename.spec.js +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ton/blueprint",
|
|
3
|
-
"version": "0.36.0-dev.
|
|
3
|
+
"version": "0.36.0-dev.20250613120550.bcdedf4",
|
|
4
4
|
"description": "Framework for development of TON smart contracts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": "./dist/cli/cli.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rm -rf dist && tsc && cp -r src/templates dist/",
|
|
18
|
-
"test": "
|
|
18
|
+
"test": "jest src",
|
|
19
19
|
"release": "yarn build && yarn publish --access public",
|
|
20
20
|
"lint": "eslint . --max-warnings 0",
|
|
21
21
|
"lint:fix": "eslint . --max-warnings 0 --fix"
|
|
@@ -30,9 +30,12 @@
|
|
|
30
30
|
"@ton/ton": "^15.2.1",
|
|
31
31
|
"@ton/toolchain": "the-ton-tech/toolchain#v1.4.0",
|
|
32
32
|
"@types/inquirer": "^8.2.6",
|
|
33
|
+
"@types/jest": "^29.5.14",
|
|
33
34
|
"@types/node": "^20.2.5",
|
|
34
35
|
"@types/qrcode-terminal": "^0.12.0",
|
|
35
36
|
"eslint": "^9.28.0",
|
|
37
|
+
"jest": "^30.0.0",
|
|
38
|
+
"ts-jest": "^29.3.4",
|
|
36
39
|
"typescript": "^5.8.3"
|
|
37
40
|
},
|
|
38
41
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/cli/rename.spec.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const node_test_1 = require("node:test");
|
|
7
|
-
const node_assert_1 = __importDefault(require("node:assert"));
|
|
8
|
-
const rename_1 = require("./rename");
|
|
9
|
-
(0, node_test_1.describe)('Rename', function () {
|
|
10
|
-
(0, node_test_1.it)('It should rename exact match', function () {
|
|
11
|
-
const replaces = {
|
|
12
|
-
a: 'b',
|
|
13
|
-
};
|
|
14
|
-
const result = (0, rename_1.renameExactIfRequired)('a a', replaces);
|
|
15
|
-
node_assert_1.default.strictEqual(result.isRenamed, true);
|
|
16
|
-
node_assert_1.default.strictEqual(result.newValue, 'b b');
|
|
17
|
-
});
|
|
18
|
-
(0, node_test_1.it)('It should not rename not exact match', function () {
|
|
19
|
-
const replaces = {
|
|
20
|
-
a: 'b',
|
|
21
|
-
};
|
|
22
|
-
const result = (0, rename_1.renameExactIfRequired)('and', replaces);
|
|
23
|
-
node_assert_1.default.strictEqual(result.isRenamed, false);
|
|
24
|
-
node_assert_1.default.strictEqual(result.newValue, 'and');
|
|
25
|
-
});
|
|
26
|
-
(0, node_test_1.it)('It should not rename another case', function () {
|
|
27
|
-
const replaces = {
|
|
28
|
-
a: 'b',
|
|
29
|
-
};
|
|
30
|
-
const result = (0, rename_1.renameExactIfRequired)('A', replaces);
|
|
31
|
-
node_assert_1.default.strictEqual(result.isRenamed, false);
|
|
32
|
-
node_assert_1.default.strictEqual(result.newValue, 'A');
|
|
33
|
-
});
|
|
34
|
-
(0, node_test_1.it)('It should rename contract name in brackets', function () {
|
|
35
|
-
const replaces = {
|
|
36
|
-
['MyContract']: 'NotMyContract',
|
|
37
|
-
};
|
|
38
|
-
const result = (0, rename_1.renameExactIfRequired)(`compile('MyContract')`, replaces);
|
|
39
|
-
node_assert_1.default.strictEqual(result.isRenamed, true);
|
|
40
|
-
node_assert_1.default.strictEqual(result.newValue, `compile('NotMyContract')`);
|
|
41
|
-
});
|
|
42
|
-
(0, node_test_1.it)('It should not rename contract name if not exact match', function () {
|
|
43
|
-
const replaces = {
|
|
44
|
-
['MyContract']: 'NotMyContract',
|
|
45
|
-
};
|
|
46
|
-
const result = (0, rename_1.renameExactIfRequired)(`compile('MyContract2')`, replaces);
|
|
47
|
-
node_assert_1.default.strictEqual(result.isRenamed, false);
|
|
48
|
-
node_assert_1.default.strictEqual(result.newValue, `compile('MyContract2')`);
|
|
49
|
-
});
|
|
50
|
-
(0, node_test_1.it)('It should do multiple replaces', function () {
|
|
51
|
-
const replaces = {
|
|
52
|
-
['myContract']: 'notMyContract',
|
|
53
|
-
['MyContract']: 'NotMyContract',
|
|
54
|
-
};
|
|
55
|
-
const result = (0, rename_1.renameExactIfRequired)(`let myContract: MyContract;`, replaces);
|
|
56
|
-
node_assert_1.default.strictEqual(result.isRenamed, true);
|
|
57
|
-
node_assert_1.default.strictEqual(result.newValue, `let notMyContract: NotMyContract;`);
|
|
58
|
-
});
|
|
59
|
-
});
|