ic-mops 1.10.0 → 1.11.0
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/CHANGELOG.md +8 -0
- package/api/actors.ts +1 -0
- package/bun.lock +32 -59
- package/bundle/cli.tgz +0 -0
- package/cli.ts +0 -6
- package/commands/bench/bench-canister.mo +2 -2
- package/commands/bench/user-bench.mo +0 -4
- package/commands/bench.ts +4 -0
- package/commands/test/test.ts +1 -1
- package/commands/watch/error-checker.ts +14 -8
- package/commands/watch/globMoFiles.ts +3 -2
- package/commands/watch/warning-checker.ts +14 -9
- package/declarations/bench/bench.did +3 -3
- package/declarations/main/main.did +78 -121
- package/declarations/main/main.did.d.ts +45 -95
- package/declarations/main/main.did.js +53 -107
- package/dist/api/actors.js +1 -0
- package/dist/cli.js +0 -5
- package/dist/commands/bench/bench-canister.mo +2 -2
- package/dist/commands/bench/user-bench.mo +0 -4
- package/dist/commands/bench.js +3 -0
- package/dist/commands/test/test.js +1 -1
- package/dist/commands/watch/error-checker.d.ts +2 -0
- package/dist/commands/watch/error-checker.js +13 -8
- package/dist/commands/watch/globMoFiles.js +3 -2
- package/dist/commands/watch/warning-checker.d.ts +2 -0
- package/dist/commands/watch/warning-checker.js +14 -9
- package/dist/declarations/bench/bench.did +3 -3
- package/dist/declarations/main/main.did +78 -121
- package/dist/declarations/main/main.did.d.ts +45 -95
- package/dist/declarations/main/main.did.js +53 -107
- package/dist/mops.js +7 -1
- package/dist/package.json +13 -6
- package/mops.ts +7 -1
- package/package.json +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Mops CLI Changelog
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
- Fix `mops bench` to work with moc >= 0.15.0
|
|
5
|
+
- `mops test` now detects persistent actor to run in replica mode
|
|
6
|
+
- `mops watch` now includes all *.mo files
|
|
7
|
+
- Update `@dfinity` packages to v3
|
|
8
|
+
- Create agent with `shouldSyncTime` flag
|
|
9
|
+
- Show user-friendly error message for invalid identity password
|
|
10
|
+
|
|
3
11
|
## 1.10.0
|
|
4
12
|
- Enable `memory64` for `wasi` testing (by @ggreif)
|
|
5
13
|
- Add support for arm64 `moc` binaries (for `moc` >= 0.14.6)
|
package/api/actors.ts
CHANGED
|
@@ -23,6 +23,7 @@ let getAgent = async (identity ?: Identity) : Promise<HttpAgent> => {
|
|
|
23
23
|
identity,
|
|
24
24
|
shouldFetchRootKey: network === 'local',
|
|
25
25
|
verifyQuerySignatures: process.env.MOPS_VERIFY_QUERY_SIGNATURES !== 'false',
|
|
26
|
+
shouldSyncTime: true,
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
agentPromiseByPrincipal.set(principal, agentPromise);
|
package/bun.lock
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"": {
|
|
5
5
|
"name": "ic-mops",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dfinity/agent": "
|
|
8
|
-
"@dfinity/candid": "
|
|
9
|
-
"@dfinity/identity": "
|
|
10
|
-
"@dfinity/identity-secp256k1": "
|
|
11
|
-
"@dfinity/principal": "
|
|
7
|
+
"@dfinity/agent": "3.1.0",
|
|
8
|
+
"@dfinity/candid": "3.1.0",
|
|
9
|
+
"@dfinity/identity": "3.1.0",
|
|
10
|
+
"@dfinity/identity-secp256k1": "3.1.0",
|
|
11
|
+
"@dfinity/principal": "3.1.0",
|
|
12
12
|
"@iarna/toml": "2.2.5",
|
|
13
13
|
"@noble/hashes": "1.8.0",
|
|
14
14
|
"as-table": "1.0.55",
|
|
@@ -72,6 +72,13 @@
|
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
|
+
"overrides": {
|
|
76
|
+
"@dfinity/agent": "3.1.0",
|
|
77
|
+
"@dfinity/candid": "3.1.0",
|
|
78
|
+
"@dfinity/identity": "3.1.0",
|
|
79
|
+
"@dfinity/identity-secp256k1": "3.1.0",
|
|
80
|
+
"@dfinity/principal": "3.1.0",
|
|
81
|
+
},
|
|
75
82
|
"packages": {
|
|
76
83
|
"@asamuzakjp/css-color": ["@asamuzakjp/css-color@3.2.0", "", { "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", "@csstools/css-parser-algorithms": "^3.0.4", "@csstools/css-tokenizer": "^3.0.3", "lru-cache": "^10.4.3" } }, "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw=="],
|
|
77
84
|
|
|
@@ -85,15 +92,17 @@
|
|
|
85
92
|
|
|
86
93
|
"@csstools/css-tokenizer": ["@csstools/css-tokenizer@3.0.4", "", {}, "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw=="],
|
|
87
94
|
|
|
88
|
-
"@dfinity/agent": ["@dfinity/agent@
|
|
95
|
+
"@dfinity/agent": ["@dfinity/agent@3.1.0", "", { "dependencies": { "@dfinity/cbor": "^0.2.2", "@noble/curves": "^1.9.2" }, "peerDependencies": { "@dfinity/candid": "3.1.0", "@dfinity/principal": "3.1.0", "@noble/hashes": "^1.8.0" } }, "sha512-4ktWU9KoB+Y0y84i0c2up9xmek2WjwSsbh4zGUK+o3VwZyqH8Cck4Fh4eiTa5jOve/vtfSVDbUVNFXsaS3Gttw=="],
|
|
96
|
+
|
|
97
|
+
"@dfinity/candid": ["@dfinity/candid@3.1.0", "", { "peerDependencies": { "@dfinity/principal": "3.1.0" } }, "sha512-YwZJROFmzPa4GCJJyGCoOYJ2pKmp9rboixGQSbLPekX0n0oU0mcEbuVKJFu6HY6CnoDoI8YKc9x+jlqh4n0u5A=="],
|
|
89
98
|
|
|
90
|
-
"@dfinity/
|
|
99
|
+
"@dfinity/cbor": ["@dfinity/cbor@0.2.2", "", {}, "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA=="],
|
|
91
100
|
|
|
92
|
-
"@dfinity/identity": ["@dfinity/identity@
|
|
101
|
+
"@dfinity/identity": ["@dfinity/identity@3.1.0", "", { "peerDependencies": { "@dfinity/agent": "3.1.0", "@dfinity/candid": "3.1.0", "@dfinity/principal": "3.1.0", "@noble/curves": "^1.9.2", "@noble/hashes": "^1.8.0" } }, "sha512-XI4UuzBaPh7BNaZBsQthvtrVk2S3tS24BYjKO//9+AdkNcxH3iZlzYkn6RejVaisnmztM7L0BMK3ECmGqy+OSw=="],
|
|
93
102
|
|
|
94
|
-
"@dfinity/identity-secp256k1": ["@dfinity/identity-secp256k1@
|
|
103
|
+
"@dfinity/identity-secp256k1": ["@dfinity/identity-secp256k1@3.1.0", "", { "dependencies": { "@dfinity/agent": "3.1.0", "@scure/bip32": "^1.7.0", "@scure/bip39": "^1.6.0", "asn1js": "^3.0.5" }, "peerDependencies": { "@dfinity/candid": "3.1.0", "@noble/curves": "^1.9.2", "@noble/hashes": "^1.8.0" } }, "sha512-A0Heh09bmaVm/87tnyzl+wkvCo1YHVn70SjiWUZQCElmfqHw3vvKm3ZP6w0BoY2/gbzgElmtpPVg0RKWHJISMA=="],
|
|
95
104
|
|
|
96
|
-
"@dfinity/principal": ["@dfinity/principal@
|
|
105
|
+
"@dfinity/principal": ["@dfinity/principal@3.1.0", "", { "dependencies": { "@noble/hashes": "^1.8.0" } }, "sha512-ef2JbgwQGtam0s19bH9CaR8ztpuoNx10eC6/kBjR/R8VC2eIBlaJHvD0lXDrBWGtOPZGzEy/XAugeBr3raxZ8A=="],
|
|
97
106
|
|
|
98
107
|
"@emnapi/core": ["@emnapi/core@1.2.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.1", "tslib": "^2.4.0" } }, "sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w=="],
|
|
99
108
|
|
|
@@ -201,7 +210,7 @@
|
|
|
201
210
|
|
|
202
211
|
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@0.2.4", "", { "dependencies": { "@emnapi/core": "^1.1.0", "@emnapi/runtime": "^1.1.0", "@tybys/wasm-util": "^0.9.0" } }, "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ=="],
|
|
203
212
|
|
|
204
|
-
"@noble/curves": ["@noble/curves@1.6
|
|
213
|
+
"@noble/curves": ["@noble/curves@1.9.6", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA=="],
|
|
205
214
|
|
|
206
215
|
"@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="],
|
|
207
216
|
|
|
@@ -263,11 +272,11 @@
|
|
|
263
272
|
|
|
264
273
|
"@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
|
|
265
274
|
|
|
266
|
-
"@scure/base": ["@scure/base@1.
|
|
275
|
+
"@scure/base": ["@scure/base@1.2.6", "", {}, "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg=="],
|
|
267
276
|
|
|
268
|
-
"@scure/bip32": ["@scure/bip32@1.
|
|
277
|
+
"@scure/bip32": ["@scure/bip32@1.7.0", "", { "dependencies": { "@noble/curves": "~1.9.0", "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw=="],
|
|
269
278
|
|
|
270
|
-
"@scure/bip39": ["@scure/bip39@1.
|
|
279
|
+
"@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="],
|
|
271
280
|
|
|
272
281
|
"@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
|
|
273
282
|
|
|
@@ -359,34 +368,22 @@
|
|
|
359
368
|
|
|
360
369
|
"bare-events": ["bare-events@2.4.2", "", {}, "sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q=="],
|
|
361
370
|
|
|
362
|
-
"base-x": ["base-x@4.0.0", "", {}, "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw=="],
|
|
363
|
-
|
|
364
|
-
"base64-arraybuffer": ["base64-arraybuffer@0.2.0", "", {}, "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="],
|
|
365
|
-
|
|
366
371
|
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
|
367
372
|
|
|
368
373
|
"before-after-hook": ["before-after-hook@2.2.3", "", {}, "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="],
|
|
369
374
|
|
|
370
|
-
"bignumber.js": ["bignumber.js@9.1.2", "", {}, "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="],
|
|
371
|
-
|
|
372
375
|
"binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="],
|
|
373
376
|
|
|
374
377
|
"bip39": ["bip39@3.1.0", "", { "dependencies": { "@noble/hashes": "^1.2.0" } }, "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A=="],
|
|
375
378
|
|
|
376
379
|
"bl": ["bl@1.2.3", "", { "dependencies": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" } }, "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww=="],
|
|
377
380
|
|
|
378
|
-
"borc": ["borc@2.1.2", "", { "dependencies": { "bignumber.js": "^9.0.0", "buffer": "^5.5.0", "commander": "^2.15.0", "ieee754": "^1.1.13", "iso-url": "~0.4.7", "json-text-sequence": "~0.1.0", "readable-stream": "^3.6.0" } }, "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w=="],
|
|
379
|
-
|
|
380
381
|
"bottleneck": ["bottleneck@2.19.5", "", {}, "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="],
|
|
381
382
|
|
|
382
383
|
"brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
|
383
384
|
|
|
384
385
|
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
|
|
385
386
|
|
|
386
|
-
"bs58": ["bs58@5.0.0", "", { "dependencies": { "base-x": "^4.0.0" } }, "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ=="],
|
|
387
|
-
|
|
388
|
-
"bs58check": ["bs58check@3.0.1", "", { "dependencies": { "@noble/hashes": "^1.2.0", "bs58": "^5.0.0" } }, "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ=="],
|
|
389
|
-
|
|
390
387
|
"btoa-lite": ["btoa-lite@1.0.0", "", {}, "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA=="],
|
|
391
388
|
|
|
392
389
|
"buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],
|
|
@@ -473,8 +470,6 @@
|
|
|
473
470
|
|
|
474
471
|
"del": ["del@8.0.0", "", { "dependencies": { "globby": "^14.0.2", "is-glob": "^4.0.3", "is-path-cwd": "^3.0.0", "is-path-inside": "^4.0.0", "p-map": "^7.0.2", "slash": "^5.1.0" } }, "sha512-R6ep6JJ+eOBZsBr9esiNN1gxFbZE4Q2cULkUSFumGYecAiS6qodDvcPx/sFuWHMNul7DWmrtoEOpYSm7o6tbSA=="],
|
|
475
472
|
|
|
476
|
-
"delimit-stream": ["delimit-stream@0.1.0", "", {}, "sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ=="],
|
|
477
|
-
|
|
478
473
|
"deprecation": ["deprecation@2.3.1", "", {}, "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="],
|
|
479
474
|
|
|
480
475
|
"dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="],
|
|
@@ -651,8 +646,6 @@
|
|
|
651
646
|
|
|
652
647
|
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
|
653
648
|
|
|
654
|
-
"iso-url": ["iso-url@0.4.7", "", {}, "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog=="],
|
|
655
|
-
|
|
656
649
|
"jackspeak": ["jackspeak@4.0.1", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog=="],
|
|
657
650
|
|
|
658
651
|
"js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": "bin/js-yaml.js" }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="],
|
|
@@ -665,8 +658,6 @@
|
|
|
665
658
|
|
|
666
659
|
"json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="],
|
|
667
660
|
|
|
668
|
-
"json-text-sequence": ["json-text-sequence@0.1.1", "", { "dependencies": { "delimit-stream": "0.1.0" } }, "sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w=="],
|
|
669
|
-
|
|
670
661
|
"jsonfile": ["jsonfile@6.1.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ=="],
|
|
671
662
|
|
|
672
663
|
"jsonwebtoken": ["jsonwebtoken@9.0.2", "", { "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ=="],
|
|
@@ -875,7 +866,7 @@
|
|
|
875
866
|
|
|
876
867
|
"quick-lru": ["quick-lru@5.1.1", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
|
|
877
868
|
|
|
878
|
-
"readable-stream": ["readable-stream@3.
|
|
869
|
+
"readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
|
879
870
|
|
|
880
871
|
"readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="],
|
|
881
872
|
|
|
@@ -901,7 +892,7 @@
|
|
|
901
892
|
|
|
902
893
|
"run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],
|
|
903
894
|
|
|
904
|
-
"safe-buffer": ["safe-buffer@5.2
|
|
895
|
+
"safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
|
|
905
896
|
|
|
906
897
|
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
|
907
898
|
|
|
@@ -917,8 +908,6 @@
|
|
|
917
908
|
|
|
918
909
|
"signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
|
|
919
910
|
|
|
920
|
-
"simple-cbor": ["simple-cbor@0.4.1", "", {}, "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w=="],
|
|
921
|
-
|
|
922
911
|
"sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
|
|
923
912
|
|
|
924
913
|
"slash": ["slash@5.1.0", "", {}, "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg=="],
|
|
@@ -935,7 +924,7 @@
|
|
|
935
924
|
|
|
936
925
|
"string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
|
937
926
|
|
|
938
|
-
"string_decoder": ["string_decoder@1.
|
|
927
|
+
"string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
|
939
928
|
|
|
940
929
|
"strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
|
941
930
|
|
|
@@ -1069,8 +1058,6 @@
|
|
|
1069
1058
|
|
|
1070
1059
|
"@isaacs/fs-minipass/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
|
|
1071
1060
|
|
|
1072
|
-
"@noble/curves/@noble/hashes": ["@noble/hashes@1.5.0", "", {}, "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA=="],
|
|
1073
|
-
|
|
1074
1061
|
"@octokit/auth-app/@octokit/types": ["@octokit/types@13.5.0", "", { "dependencies": { "@octokit/openapi-types": "^22.2.0" } }, "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ=="],
|
|
1075
1062
|
|
|
1076
1063
|
"@octokit/auth-app/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
|
|
@@ -1093,18 +1080,6 @@
|
|
|
1093
1080
|
|
|
1094
1081
|
"@octokit/request-error/@octokit/types": ["@octokit/types@13.5.0", "", { "dependencies": { "@octokit/openapi-types": "^22.2.0" } }, "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ=="],
|
|
1095
1082
|
|
|
1096
|
-
"@scure/bip32/@noble/hashes": ["@noble/hashes@1.5.0", "", {}, "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA=="],
|
|
1097
|
-
|
|
1098
|
-
"@scure/bip39/@noble/hashes": ["@noble/hashes@1.5.0", "", {}, "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA=="],
|
|
1099
|
-
|
|
1100
|
-
"bl/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
|
1101
|
-
|
|
1102
|
-
"bl/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
|
|
1103
|
-
|
|
1104
|
-
"borc/buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
|
1105
|
-
|
|
1106
|
-
"borc/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="],
|
|
1107
|
-
|
|
1108
1083
|
"chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
|
1109
1084
|
|
|
1110
1085
|
"cliui/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
|
@@ -1137,6 +1112,8 @@
|
|
|
1137
1112
|
|
|
1138
1113
|
"del/is-path-inside": ["is-path-inside@4.0.0", "", {}, "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA=="],
|
|
1139
1114
|
|
|
1115
|
+
"ecdsa-sig-formatter/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
|
1116
|
+
|
|
1140
1117
|
"eslint/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
|
1141
1118
|
|
|
1142
1119
|
"eslint/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
|
@@ -1157,6 +1134,10 @@
|
|
|
1157
1134
|
|
|
1158
1135
|
"globs/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
|
1159
1136
|
|
|
1137
|
+
"jwa/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
|
1138
|
+
|
|
1139
|
+
"jws/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
|
1140
|
+
|
|
1160
1141
|
"log-update/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
|
|
1161
1142
|
|
|
1162
1143
|
"make-dir/pify": ["pify@3.0.0", "", {}, "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg=="],
|
|
@@ -1223,14 +1204,10 @@
|
|
|
1223
1204
|
|
|
1224
1205
|
"@octokit/request/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@22.2.0", "", {}, "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="],
|
|
1225
1206
|
|
|
1226
|
-
"bl/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
|
1227
|
-
|
|
1228
1207
|
"cliui/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
|
1229
1208
|
|
|
1230
1209
|
"cliui/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
|
1231
1210
|
|
|
1232
|
-
"decompress-tar/tar-stream/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
|
|
1233
|
-
|
|
1234
1211
|
"eslint/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
|
1235
1212
|
|
|
1236
1213
|
"flat-cache/rimraf/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
|
@@ -1261,10 +1238,6 @@
|
|
|
1261
1238
|
|
|
1262
1239
|
"yargs/string-width/is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
|
1263
1240
|
|
|
1264
|
-
"decompress-tar/tar-stream/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
|
|
1265
|
-
|
|
1266
|
-
"decompress-tar/tar-stream/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
|
|
1267
|
-
|
|
1268
1241
|
"flat-cache/rimraf/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
|
1269
1242
|
|
|
1270
1243
|
"globs/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
package/bundle/cli.tgz
CHANGED
|
Binary file
|
package/cli.ts
CHANGED
|
@@ -2,7 +2,6 @@ import process from 'node:process';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import events from 'node:events';
|
|
4
4
|
import {Command, Argument, Option} from 'commander';
|
|
5
|
-
import chalk from 'chalk';
|
|
6
5
|
|
|
7
6
|
import {init} from './commands/init.js';
|
|
8
7
|
import {publish} from './commands/publish.js';
|
|
@@ -102,11 +101,6 @@ program
|
|
|
102
101
|
.option('--verbose')
|
|
103
102
|
.addOption(new Option('--lock <action>', 'Lockfile action').choices(['check', 'update', 'ignore']))
|
|
104
103
|
.action(async (options) => {
|
|
105
|
-
if (process.argv.at(-1) !== 'install' && process.argv.at(-1) !== 'i') {
|
|
106
|
-
console.log(`${chalk.red('Error:')} ${chalk.yellow('mops install')} command installs all dependencies.\nUse ${chalk.green(`mops add ${process.argv.at(-1)}`)} instead.`);
|
|
107
|
-
process.exit(1);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
104
|
if (!checkConfigFile()) {
|
|
111
105
|
process.exit(1);
|
|
112
106
|
}
|
|
@@ -10,7 +10,7 @@ import Bench "mo:bench";
|
|
|
10
10
|
|
|
11
11
|
import UserBench "./user-bench"; // file path will be replaced with the *.bench.mo file path
|
|
12
12
|
|
|
13
|
-
actor class() {
|
|
13
|
+
persistent actor class() {
|
|
14
14
|
type BenchResult = {
|
|
15
15
|
instructions : Int;
|
|
16
16
|
rts_mutator_instructions : Int;
|
|
@@ -24,7 +24,7 @@ actor class() {
|
|
|
24
24
|
rts_reclaimed : Int;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
var benchOpt : ?Bench.Bench = null;
|
|
27
|
+
transient var benchOpt : ?Bench.Bench = null;
|
|
28
28
|
|
|
29
29
|
public func init() : async Bench.BenchSchema {
|
|
30
30
|
let bench = UserBench.init();
|
package/commands/bench.ts
CHANGED
|
@@ -237,6 +237,10 @@ function computeDiffAll(
|
|
|
237
237
|
function getMocArgs(options : BenchOptions) : string {
|
|
238
238
|
let args = '';
|
|
239
239
|
|
|
240
|
+
if (options.compilerVersion && new SemVer(options.compilerVersion).compare('0.15.0') >= 0) {
|
|
241
|
+
args += ' --legacy-persistence';
|
|
242
|
+
}
|
|
243
|
+
|
|
240
244
|
if (options.forceGc) {
|
|
241
245
|
args += ' --force-gc';
|
|
242
246
|
}
|
package/commands/test/test.ts
CHANGED
|
@@ -234,7 +234,7 @@ export async function testWithReporter(reporterName : ReporterName | Reporter |
|
|
|
234
234
|
if (lines.includes('// @testmode wasi')) {
|
|
235
235
|
mode = 'wasi';
|
|
236
236
|
}
|
|
237
|
-
else if (lines.includes('
|
|
237
|
+
else if (lines.includes('// @testmode replica') || lines.find(line => line.match(/^(persistent )?actor( class)?/))) {
|
|
238
238
|
mode = 'replica';
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -14,6 +14,8 @@ export class ErrorChecker {
|
|
|
14
14
|
canisters : Record<string, string> = {};
|
|
15
15
|
status : 'pending' | 'running' | 'error' | 'success' = 'pending';
|
|
16
16
|
errors : string[] = [];
|
|
17
|
+
totalFiles = 0;
|
|
18
|
+
processedFiles = 0;
|
|
17
19
|
|
|
18
20
|
constructor({verbose, canisters} : {verbose : boolean, canisters : Record<string, string>}) {
|
|
19
21
|
this.verbose = verbose;
|
|
@@ -23,6 +25,8 @@ export class ErrorChecker {
|
|
|
23
25
|
reset() {
|
|
24
26
|
this.status = 'pending';
|
|
25
27
|
this.errors = [];
|
|
28
|
+
this.totalFiles = 0;
|
|
29
|
+
this.processedFiles = 0;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
async run(onProgress : () => void) {
|
|
@@ -35,10 +39,10 @@ export class ErrorChecker {
|
|
|
35
39
|
let mocPath = getMocPath();
|
|
36
40
|
let deps = await sources({cwd: rootDir});
|
|
37
41
|
|
|
38
|
-
let paths =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
let paths = globMoFiles(rootDir);
|
|
43
|
+
|
|
44
|
+
this.totalFiles = paths.length;
|
|
45
|
+
this.processedFiles = 0;
|
|
42
46
|
|
|
43
47
|
await parallel(os.cpus().length, paths, async (file) => {
|
|
44
48
|
try {
|
|
@@ -62,8 +66,9 @@ export class ErrorChecker {
|
|
|
62
66
|
// console.log('UNKNOWN ERROR', line);
|
|
63
67
|
}
|
|
64
68
|
});
|
|
65
|
-
onProgress();
|
|
66
69
|
}
|
|
70
|
+
this.processedFiles++;
|
|
71
|
+
onProgress();
|
|
67
72
|
});
|
|
68
73
|
|
|
69
74
|
this.status = this.errors.length ? 'error' : 'success';
|
|
@@ -75,12 +80,13 @@ export class ErrorChecker {
|
|
|
75
80
|
return `Errors: ${chalk.gray('(pending)')}`;
|
|
76
81
|
}
|
|
77
82
|
if (this.status === 'running') {
|
|
78
|
-
return `Errors: ${chalk.gray('(running)')}`;
|
|
83
|
+
return `Errors: ${this.processedFiles}/${this.totalFiles} ${chalk.gray('(running)')}`;
|
|
79
84
|
}
|
|
80
85
|
let output = '';
|
|
81
|
-
|
|
86
|
+
let uniqueErrors = [...new Set(this.errors)];
|
|
87
|
+
output += `Errors: ${chalk.bold[uniqueErrors.length ? 'redBright' : 'green'](uniqueErrors.length)}`;
|
|
82
88
|
if (this.verbose && this.errors.length) {
|
|
83
|
-
output += `\n ${
|
|
89
|
+
output += `\n ${uniqueErrors.join('\n ')}`;
|
|
84
90
|
}
|
|
85
91
|
return output;
|
|
86
92
|
}
|
|
@@ -7,10 +7,11 @@ let globConfig = {
|
|
|
7
7
|
'**/.mops/**',
|
|
8
8
|
'**/.vessel/**',
|
|
9
9
|
'**/.git/**',
|
|
10
|
+
'**/.dfx/**',
|
|
11
|
+
'**/{build,bundle,dist}/**',
|
|
10
12
|
],
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
export function globMoFiles(rootDir : string) {
|
|
14
|
-
|
|
15
|
-
return globSync('src/**/*.mo', {cwd: rootDir, ...globConfig});
|
|
16
|
+
return globSync('**/*.mo', {cwd: rootDir, ...globConfig});
|
|
16
17
|
}
|
|
@@ -19,6 +19,8 @@ export class WarningChecker {
|
|
|
19
19
|
aborted = false;
|
|
20
20
|
controllers = new Map<string, AbortController>();
|
|
21
21
|
currentRun : Promise<any> | undefined;
|
|
22
|
+
totalFiles = 0;
|
|
23
|
+
processedFiles = 0;
|
|
22
24
|
|
|
23
25
|
constructor({verbose, canisters, errorChecker} : {verbose : boolean, canisters : Record<string, string>, errorChecker : ErrorChecker}) {
|
|
24
26
|
this.verbose = verbose;
|
|
@@ -29,6 +31,8 @@ export class WarningChecker {
|
|
|
29
31
|
reset() {
|
|
30
32
|
this.status = 'pending';
|
|
31
33
|
this.warnings = [];
|
|
34
|
+
this.totalFiles = 0;
|
|
35
|
+
this.processedFiles = 0;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
async abortCurrent() {
|
|
@@ -57,11 +61,10 @@ export class WarningChecker {
|
|
|
57
61
|
let rootDir = getRootDir();
|
|
58
62
|
let mocPath = getMocPath();
|
|
59
63
|
let deps = await sources({cwd: rootDir});
|
|
64
|
+
let paths = globMoFiles(rootDir);
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
paths = globMoFiles(rootDir);
|
|
64
|
-
}
|
|
66
|
+
this.totalFiles = paths.length;
|
|
67
|
+
this.processedFiles = 0;
|
|
65
68
|
|
|
66
69
|
this.currentRun = parallel(os.cpus().length, paths, async (file) => {
|
|
67
70
|
let controller = new AbortController();
|
|
@@ -97,10 +100,11 @@ export class WarningChecker {
|
|
|
97
100
|
// console.log('UNKNOWN WARNING', line);
|
|
98
101
|
}
|
|
99
102
|
});
|
|
100
|
-
onProgress();
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
this.controllers.delete(file);
|
|
106
|
+
this.processedFiles++;
|
|
107
|
+
onProgress();
|
|
104
108
|
});
|
|
105
109
|
|
|
106
110
|
await this.currentRun;
|
|
@@ -117,16 +121,17 @@ export class WarningChecker {
|
|
|
117
121
|
return `Warnings: ${chalk.gray('(pending)')}`;
|
|
118
122
|
}
|
|
119
123
|
if (this.status === 'running') {
|
|
120
|
-
return `Warnings: ${chalk.gray('(running)')}`;
|
|
124
|
+
return `Warnings: ${this.processedFiles}/${this.totalFiles} ${chalk.gray('(running)')}`;
|
|
121
125
|
}
|
|
122
126
|
if (this.status === 'syntax-error') {
|
|
123
127
|
return `Warnings: ${chalk.gray('(errors)')}`;
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
let output = '';
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
let uniqueWarnings = [...new Set(this.warnings)];
|
|
132
|
+
output += `Warnings: ${chalk.bold[uniqueWarnings.length ? 'yellowBright' : 'green'](uniqueWarnings.length)}`;
|
|
133
|
+
if (this.verbose && uniqueWarnings.length) {
|
|
134
|
+
output += `\n ${uniqueWarnings.join('\n ')}`;
|
|
130
135
|
}
|
|
131
136
|
return output;
|
|
132
137
|
}
|
|
@@ -3,9 +3,9 @@ type _anon_class_13_1 =
|
|
|
3
3
|
getSchema: () -> (BenchSchema) query;
|
|
4
4
|
getStats: () -> (BenchResult) query;
|
|
5
5
|
init: () -> (BenchSchema);
|
|
6
|
-
runCellQuery: (nat, nat) -> (BenchResult) query;
|
|
7
|
-
runCellUpdate: (nat, nat) -> (BenchResult);
|
|
8
|
-
runCellUpdateAwait: (nat, nat) -> (BenchResult);
|
|
6
|
+
runCellQuery: (rowIndex: nat, colIndex: nat) -> (BenchResult) query;
|
|
7
|
+
runCellUpdate: (rowIndex: nat, colIndex: nat) -> (BenchResult);
|
|
8
|
+
runCellUpdateAwait: (rowIndex: nat, colIndex: nat) -> (BenchResult);
|
|
9
9
|
};
|
|
10
10
|
type BenchSchema =
|
|
11
11
|
record {
|