movehat 0.1.9 → 0.2.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/README.md +2 -2
- package/dist/__tests__/deployContract.test.d.ts +2 -0
- package/dist/__tests__/deployContract.test.d.ts.map +1 -0
- package/dist/__tests__/deployContract.test.js +368 -0
- package/dist/__tests__/deployContract.test.js.map +1 -0
- package/dist/__tests__/errors.test.d.ts +2 -0
- package/dist/__tests__/errors.test.d.ts.map +1 -0
- package/dist/__tests__/errors.test.js +46 -0
- package/dist/__tests__/errors.test.js.map +1 -0
- package/dist/__tests__/fixtures/sigint-deploy-harness.d.ts +24 -0
- package/dist/__tests__/fixtures/sigint-deploy-harness.d.ts.map +1 -0
- package/dist/__tests__/fixtures/sigint-deploy-harness.js +82 -0
- package/dist/__tests__/fixtures/sigint-deploy-harness.js.map +1 -0
- package/dist/__tests__/fork/api.test.d.ts +2 -0
- package/dist/__tests__/fork/api.test.d.ts.map +1 -0
- package/dist/__tests__/fork/api.test.js +110 -0
- package/dist/__tests__/fork/api.test.js.map +1 -0
- package/dist/__tests__/harness/Harness.createLive.test.d.ts +2 -0
- package/dist/__tests__/harness/Harness.createLive.test.d.ts.map +1 -0
- package/dist/__tests__/harness/Harness.createLive.test.js +53 -0
- package/dist/__tests__/harness/Harness.createLive.test.js.map +1 -0
- package/dist/__tests__/harness/Harness.proxy.test.d.ts +2 -0
- package/dist/__tests__/harness/Harness.proxy.test.d.ts.map +1 -0
- package/dist/__tests__/harness/Harness.proxy.test.js +93 -0
- package/dist/__tests__/harness/Harness.proxy.test.js.map +1 -0
- package/dist/__tests__/harness/_fixture.d.ts +54 -0
- package/dist/__tests__/harness/_fixture.d.ts.map +1 -0
- package/dist/__tests__/harness/_fixture.js +69 -0
- package/dist/__tests__/harness/_fixture.js.map +1 -0
- package/dist/__tests__/harness/codeObject.deploy.test.d.ts +2 -0
- package/dist/__tests__/harness/codeObject.deploy.test.d.ts.map +1 -0
- package/dist/__tests__/harness/codeObject.deploy.test.js +288 -0
- package/dist/__tests__/harness/codeObject.deploy.test.js.map +1 -0
- package/dist/__tests__/harness/codeObject.upgrade.test.d.ts +2 -0
- package/dist/__tests__/harness/codeObject.upgrade.test.d.ts.map +1 -0
- package/dist/__tests__/harness/codeObject.upgrade.test.js +138 -0
- package/dist/__tests__/harness/codeObject.upgrade.test.js.map +1 -0
- package/dist/__tests__/harness/script.test.d.ts +2 -0
- package/dist/__tests__/harness/script.test.d.ts.map +1 -0
- package/dist/__tests__/harness/script.test.js +219 -0
- package/dist/__tests__/harness/script.test.js.map +1 -0
- package/dist/__tests__/harness/view.test.d.ts +2 -0
- package/dist/__tests__/harness/view.test.d.ts.map +1 -0
- package/dist/__tests__/harness/view.test.js +92 -0
- package/dist/__tests__/harness/view.test.js.map +1 -0
- package/dist/__tests__/runtime.test.d.ts +2 -0
- package/dist/__tests__/runtime.test.d.ts.map +1 -0
- package/dist/__tests__/runtime.test.js +141 -0
- package/dist/__tests__/runtime.test.js.map +1 -0
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/__tests__/compile.test.d.ts +2 -0
- package/dist/commands/__tests__/compile.test.d.ts.map +1 -0
- package/dist/commands/__tests__/compile.test.js +351 -0
- package/dist/commands/__tests__/compile.test.js.map +1 -0
- package/dist/commands/__tests__/init.test.d.ts +2 -0
- package/dist/commands/__tests__/init.test.d.ts.map +1 -0
- package/dist/commands/__tests__/init.test.js +101 -0
- package/dist/commands/__tests__/init.test.js.map +1 -0
- package/dist/commands/__tests__/run.test.d.ts +2 -0
- package/dist/commands/__tests__/run.test.d.ts.map +1 -0
- package/dist/commands/__tests__/run.test.js +166 -0
- package/dist/commands/__tests__/run.test.js.map +1 -0
- package/dist/commands/__tests__/test-move.test.d.ts +2 -0
- package/dist/commands/__tests__/test-move.test.d.ts.map +1 -0
- package/dist/commands/__tests__/test-move.test.js +59 -0
- package/dist/commands/__tests__/test-move.test.js.map +1 -0
- package/dist/commands/__tests__/test.test.d.ts +2 -0
- package/dist/commands/__tests__/test.test.d.ts.map +1 -0
- package/dist/commands/__tests__/test.test.js +168 -0
- package/dist/commands/__tests__/test.test.js.map +1 -0
- package/dist/commands/__tests__/update.test.d.ts +2 -0
- package/dist/commands/__tests__/update.test.d.ts.map +1 -0
- package/dist/commands/__tests__/update.test.js +176 -0
- package/dist/commands/__tests__/update.test.js.map +1 -0
- package/dist/commands/compile.d.ts +7 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +150 -33
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/fork/__tests__/create.test.d.ts +2 -0
- package/dist/commands/fork/__tests__/create.test.d.ts.map +1 -0
- package/dist/commands/fork/__tests__/create.test.js +108 -0
- package/dist/commands/fork/__tests__/create.test.js.map +1 -0
- package/dist/commands/fork/__tests__/fund.test.d.ts +2 -0
- package/dist/commands/fork/__tests__/fund.test.d.ts.map +1 -0
- package/dist/commands/fork/__tests__/fund.test.js +72 -0
- package/dist/commands/fork/__tests__/fund.test.js.map +1 -0
- package/dist/commands/fork/__tests__/list.test.d.ts +2 -0
- package/dist/commands/fork/__tests__/list.test.d.ts.map +1 -0
- package/dist/commands/fork/__tests__/list.test.js +119 -0
- package/dist/commands/fork/__tests__/list.test.js.map +1 -0
- package/dist/commands/fork/__tests__/serve.test.d.ts +2 -0
- package/dist/commands/fork/__tests__/serve.test.d.ts.map +1 -0
- package/dist/commands/fork/__tests__/serve.test.js +97 -0
- package/dist/commands/fork/__tests__/serve.test.js.map +1 -0
- package/dist/commands/fork/__tests__/view-resource.test.d.ts +2 -0
- package/dist/commands/fork/__tests__/view-resource.test.d.ts.map +1 -0
- package/dist/commands/fork/__tests__/view-resource.test.js +77 -0
- package/dist/commands/fork/__tests__/view-resource.test.js.map +1 -0
- package/dist/commands/fork/create.d.ts +1 -1
- package/dist/commands/fork/create.d.ts.map +1 -1
- package/dist/commands/fork/create.js +3 -2
- package/dist/commands/fork/create.js.map +1 -1
- package/dist/commands/fork/fund.d.ts.map +1 -1
- package/dist/commands/fork/fund.js +15 -8
- package/dist/commands/fork/fund.js.map +1 -1
- package/dist/commands/fork/list.d.ts.map +1 -1
- package/dist/commands/fork/list.js +2 -1
- package/dist/commands/fork/list.js.map +1 -1
- package/dist/commands/fork/serve.d.ts +1 -0
- package/dist/commands/fork/serve.d.ts.map +1 -1
- package/dist/commands/fork/serve.js +4 -2
- package/dist/commands/fork/serve.js.map +1 -1
- package/dist/commands/fork/view-resource.d.ts.map +1 -1
- package/dist/commands/fork/view-resource.js +10 -5
- package/dist/commands/fork/view-resource.js.map +1 -1
- package/dist/commands/run.d.ts +15 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +50 -27
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/test-move.d.ts.map +1 -1
- package/dist/commands/test-move.js +3 -2
- package/dist/commands/test-move.js.map +1 -1
- package/dist/commands/test.js +52 -46
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +15 -13
- package/dist/commands/update.js.map +1 -1
- package/dist/core/AccountManager.d.ts +1 -1
- package/dist/core/AccountManager.d.ts.map +1 -1
- package/dist/core/AccountManager.js +20 -7
- package/dist/core/AccountManager.js.map +1 -1
- package/dist/core/Publisher.d.ts +31 -0
- package/dist/core/Publisher.d.ts.map +1 -0
- package/dist/core/Publisher.js +248 -0
- package/dist/core/Publisher.js.map +1 -0
- package/dist/core/__tests__/AccountManager.test.d.ts +2 -0
- package/dist/core/__tests__/AccountManager.test.d.ts.map +1 -0
- package/dist/core/__tests__/AccountManager.test.js +239 -0
- package/dist/core/__tests__/AccountManager.test.js.map +1 -0
- package/dist/core/__tests__/config.test.d.ts +2 -0
- package/dist/core/__tests__/config.test.d.ts.map +1 -0
- package/dist/core/__tests__/config.test.js +311 -0
- package/dist/core/__tests__/config.test.js.map +1 -0
- package/dist/core/__tests__/deployments.test.d.ts +2 -0
- package/dist/core/__tests__/deployments.test.d.ts.map +1 -0
- package/dist/core/__tests__/deployments.test.js +201 -0
- package/dist/core/__tests__/deployments.test.js.map +1 -0
- package/dist/core/__tests__/shell.test.d.ts +2 -0
- package/dist/core/__tests__/shell.test.d.ts.map +1 -0
- package/dist/core/__tests__/shell.test.js +107 -0
- package/dist/core/__tests__/shell.test.js.map +1 -0
- package/dist/core/config.d.ts +13 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +80 -11
- package/dist/core/config.js.map +1 -1
- package/dist/core/contract.d.ts +1 -1
- package/dist/core/contract.d.ts.map +1 -1
- package/dist/core/contract.js +15 -4
- package/dist/core/contract.js.map +1 -1
- package/dist/core/deployments.d.ts +2 -2
- package/dist/core/deployments.d.ts.map +1 -1
- package/dist/core/deployments.js +8 -6
- package/dist/core/deployments.js.map +1 -1
- package/dist/core/movementProfile.d.ts +34 -0
- package/dist/core/movementProfile.d.ts.map +1 -0
- package/dist/core/movementProfile.js +150 -0
- package/dist/core/movementProfile.js.map +1 -0
- package/dist/core/shell.d.ts +23 -7
- package/dist/core/shell.d.ts.map +1 -1
- package/dist/core/shell.js +32 -14
- package/dist/core/shell.js.map +1 -1
- package/dist/errors.d.ts +35 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +54 -0
- package/dist/errors.js.map +1 -1
- package/dist/fork/__tests__/manager.test.d.ts +2 -0
- package/dist/fork/__tests__/manager.test.d.ts.map +1 -0
- package/dist/fork/__tests__/manager.test.js +309 -0
- package/dist/fork/__tests__/manager.test.js.map +1 -0
- package/dist/fork/__tests__/server.test.d.ts +2 -0
- package/dist/fork/__tests__/server.test.d.ts.map +1 -0
- package/dist/fork/__tests__/server.test.js +54 -0
- package/dist/fork/__tests__/server.test.js.map +1 -0
- package/dist/fork/__tests__/storage.test.d.ts +2 -0
- package/dist/fork/__tests__/storage.test.d.ts.map +1 -0
- package/dist/fork/__tests__/storage.test.js +222 -0
- package/dist/fork/__tests__/storage.test.js.map +1 -0
- package/dist/fork/__tests__/test.test.d.ts +2 -0
- package/dist/fork/__tests__/test.test.d.ts.map +1 -0
- package/dist/fork/__tests__/test.test.js +81 -0
- package/dist/fork/__tests__/test.test.js.map +1 -0
- package/dist/fork/api.d.ts +14 -3
- package/dist/fork/api.d.ts.map +1 -1
- package/dist/fork/api.js +25 -14
- package/dist/fork/api.js.map +1 -1
- package/dist/fork/manager.d.ts +23 -9
- package/dist/fork/manager.d.ts.map +1 -1
- package/dist/fork/manager.js +79 -36
- package/dist/fork/manager.js.map +1 -1
- package/dist/fork/server.d.ts +11 -3
- package/dist/fork/server.d.ts.map +1 -1
- package/dist/fork/server.js +45 -13
- package/dist/fork/server.js.map +1 -1
- package/dist/fork/storage.d.ts +4 -4
- package/dist/fork/storage.d.ts.map +1 -1
- package/dist/fork/storage.js +7 -9
- package/dist/fork/storage.js.map +1 -1
- package/dist/fork/test.d.ts +13 -4
- package/dist/fork/test.d.ts.map +1 -1
- package/dist/fork/test.js +36 -27
- package/dist/fork/test.js.map +1 -1
- package/dist/harness/Harness.d.ts +124 -0
- package/dist/harness/Harness.d.ts.map +1 -0
- package/dist/harness/Harness.js +193 -0
- package/dist/harness/Harness.js.map +1 -0
- package/dist/harness/codeObject.d.ts +31 -0
- package/dist/harness/codeObject.d.ts.map +1 -0
- package/dist/harness/codeObject.js +271 -0
- package/dist/harness/codeObject.js.map +1 -0
- package/dist/harness/errors.d.ts +14 -0
- package/dist/harness/errors.d.ts.map +1 -0
- package/dist/harness/errors.js +22 -0
- package/dist/harness/errors.js.map +1 -0
- package/dist/harness/index.d.ts +4 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +3 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/proxy.d.ts +7 -0
- package/dist/harness/proxy.d.ts.map +1 -0
- package/dist/harness/proxy.js +36 -0
- package/dist/harness/proxy.js.map +1 -0
- package/dist/harness/script.d.ts +21 -0
- package/dist/harness/script.d.ts.map +1 -0
- package/dist/harness/script.js +155 -0
- package/dist/harness/script.js.map +1 -0
- package/dist/harness/view.d.ts +22 -0
- package/dist/harness/view.d.ts.map +1 -0
- package/dist/harness/view.js +28 -0
- package/dist/harness/view.js.map +1 -0
- package/dist/helpers/__tests__/semver-utils.test.d.ts +2 -0
- package/dist/helpers/__tests__/semver-utils.test.d.ts.map +1 -0
- package/dist/helpers/__tests__/semver-utils.test.js +103 -0
- package/dist/helpers/__tests__/semver-utils.test.js.map +1 -0
- package/dist/helpers/index.d.ts +3 -2
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +2 -2
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/move-tests.d.ts +3 -3
- package/dist/helpers/move-tests.d.ts.map +1 -1
- package/dist/helpers/move-tests.js +21 -20
- package/dist/helpers/move-tests.js.map +1 -1
- package/dist/helpers/npm-registry.d.ts.map +1 -1
- package/dist/helpers/npm-registry.js +1 -3
- package/dist/helpers/npm-registry.js.map +1 -1
- package/dist/helpers/semver-utils.d.ts.map +1 -1
- package/dist/helpers/semver-utils.js +4 -3
- package/dist/helpers/semver-utils.js.map +1 -1
- package/dist/helpers/setup.d.ts.map +1 -1
- package/dist/helpers/setup.js +6 -4
- package/dist/helpers/setup.js.map +1 -1
- package/dist/helpers/setupLocalTesting.d.ts +32 -27
- package/dist/helpers/setupLocalTesting.d.ts.map +1 -1
- package/dist/helpers/setupLocalTesting.js +179 -180
- package/dist/helpers/setupLocalTesting.js.map +1 -1
- package/dist/helpers/testFixtures.d.ts +19 -53
- package/dist/helpers/testFixtures.d.ts.map +1 -1
- package/dist/helpers/testFixtures.js +89 -107
- package/dist/helpers/testFixtures.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/node/LocalNodeManager.d.ts +9 -1
- package/dist/node/LocalNodeManager.d.ts.map +1 -1
- package/dist/node/LocalNodeManager.js +75 -58
- package/dist/node/LocalNodeManager.js.map +1 -1
- package/dist/node/__tests__/LocalNodeManager.test.d.ts +2 -0
- package/dist/node/__tests__/LocalNodeManager.test.d.ts.map +1 -0
- package/dist/node/__tests__/LocalNodeManager.test.js +349 -0
- package/dist/node/__tests__/LocalNodeManager.test.js.map +1 -0
- package/dist/runtime.d.ts +12 -15
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +28 -239
- package/dist/runtime.js.map +1 -1
- package/dist/templates/README.md +1 -1
- package/dist/templates/movehat.config.ts +10 -0
- package/dist/templates/package.json +2 -1
- package/dist/templates/scripts/deploy-counter.ts +46 -38
- package/dist/templates/tests/Counter.test.ts +39 -51
- package/dist/templates/types/movehat.d.ts +6 -9
- package/dist/types/config.d.ts +8 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/fork.d.ts +7 -1
- package/dist/types/fork.d.ts.map +1 -1
- package/dist/types/harness.d.ts +166 -0
- package/dist/types/harness.d.ts.map +1 -0
- package/dist/types/harness.js +2 -0
- package/dist/types/harness.js.map +1 -0
- package/dist/types/runtime.d.ts +7 -1
- package/dist/types/runtime.d.ts.map +1 -1
- package/dist/ui/__tests__/colors.test.d.ts +2 -0
- package/dist/ui/__tests__/colors.test.d.ts.map +1 -0
- package/dist/ui/__tests__/colors.test.js +127 -0
- package/dist/ui/__tests__/colors.test.js.map +1 -0
- package/dist/ui/colors.d.ts.map +1 -1
- package/dist/ui/colors.js +6 -2
- package/dist/ui/colors.js.map +1 -1
- package/dist/ui/logger.d.ts +17 -0
- package/dist/ui/logger.d.ts.map +1 -1
- package/dist/ui/logger.js +22 -0
- package/dist/ui/logger.js.map +1 -1
- package/dist/ui/symbols.d.ts +1 -0
- package/dist/ui/symbols.d.ts.map +1 -1
- package/dist/ui/symbols.js +7 -1
- package/dist/ui/symbols.js.map +1 -1
- package/dist/utils/__tests__/address.test.d.ts +2 -0
- package/dist/utils/__tests__/address.test.d.ts.map +1 -0
- package/dist/utils/__tests__/address.test.js +70 -0
- package/dist/utils/__tests__/address.test.js.map +1 -0
- package/dist/utils/__tests__/childProcessAdapter.test.d.ts +2 -0
- package/dist/utils/__tests__/childProcessAdapter.test.d.ts.map +1 -0
- package/dist/utils/__tests__/childProcessAdapter.test.js +217 -0
- package/dist/utils/__tests__/childProcessAdapter.test.js.map +1 -0
- package/dist/utils/__tests__/runCli.test.d.ts +2 -0
- package/dist/utils/__tests__/runCli.test.d.ts.map +1 -0
- package/dist/utils/__tests__/runCli.test.js +187 -0
- package/dist/utils/__tests__/runCli.test.js.map +1 -0
- package/dist/utils/address.d.ts +33 -0
- package/dist/utils/address.d.ts.map +1 -0
- package/dist/utils/address.js +52 -0
- package/dist/utils/address.js.map +1 -0
- package/dist/utils/childProcessAdapter.d.ts +93 -0
- package/dist/utils/childProcessAdapter.d.ts.map +1 -0
- package/dist/utils/childProcessAdapter.js +109 -0
- package/dist/utils/childProcessAdapter.js.map +1 -0
- package/dist/utils/parseCliOutput.d.ts +20 -0
- package/dist/utils/parseCliOutput.d.ts.map +1 -0
- package/dist/utils/parseCliOutput.js +26 -0
- package/dist/utils/parseCliOutput.js.map +1 -0
- package/dist/utils/redact.d.ts +15 -0
- package/dist/utils/redact.d.ts.map +1 -0
- package/dist/utils/redact.js +24 -0
- package/dist/utils/redact.js.map +1 -0
- package/dist/utils/runCli.d.ts +24 -0
- package/dist/utils/runCli.d.ts.map +1 -0
- package/dist/utils/runCli.js +37 -0
- package/dist/utils/runCli.js.map +1 -0
- package/package.json +14 -4
- package/src/__tests__/deployContract.test.ts +429 -0
- package/src/__tests__/errors.test.ts +84 -0
- package/src/__tests__/fixtures/sigint-deploy-harness.ts +95 -0
- package/src/__tests__/fork/api.test.ts +143 -0
- package/src/__tests__/harness/Harness.createLive.test.ts +57 -0
- package/src/__tests__/harness/Harness.proxy.test.ts +115 -0
- package/src/__tests__/harness/_fixture.ts +131 -0
- package/src/__tests__/harness/codeObject.deploy.test.ts +319 -0
- package/src/__tests__/harness/codeObject.upgrade.test.ts +156 -0
- package/src/__tests__/harness/script.test.ts +245 -0
- package/src/__tests__/harness/view.test.ts +104 -0
- package/src/__tests__/runtime.test.ts +182 -0
- package/src/cli.ts +2 -1
- package/src/commands/__tests__/compile.test.ts +407 -0
- package/src/commands/__tests__/init.test.ts +125 -0
- package/src/commands/__tests__/run.test.ts +192 -0
- package/src/commands/__tests__/test-move.test.ts +81 -0
- package/src/commands/__tests__/test.test.ts +204 -0
- package/src/commands/__tests__/update.test.ts +223 -0
- package/src/commands/compile.ts +168 -32
- package/src/commands/fork/__tests__/create.test.ts +132 -0
- package/src/commands/fork/__tests__/fund.test.ts +104 -0
- package/src/commands/fork/__tests__/list.test.ts +139 -0
- package/src/commands/fork/__tests__/serve.test.ts +121 -0
- package/src/commands/fork/__tests__/view-resource.test.ts +101 -0
- package/src/commands/fork/create.ts +4 -3
- package/src/commands/fork/fund.ts +16 -9
- package/src/commands/fork/list.ts +3 -2
- package/src/commands/fork/serve.ts +6 -3
- package/src/commands/fork/view-resource.ts +11 -6
- package/src/commands/run.ts +54 -28
- package/src/commands/test-move.ts +4 -3
- package/src/commands/test.ts +56 -44
- package/src/commands/update.ts +19 -16
- package/src/core/AccountManager.ts +23 -10
- package/src/core/Publisher.ts +322 -0
- package/src/core/__tests__/AccountManager.test.ts +290 -0
- package/src/core/__tests__/config.test.ts +377 -0
- package/src/core/__tests__/deployments.test.ts +247 -0
- package/src/core/__tests__/shell.test.ts +138 -0
- package/src/core/config.ts +96 -12
- package/src/core/contract.ts +13 -4
- package/src/core/deployments.ts +13 -11
- package/src/core/movementProfile.ts +179 -0
- package/src/core/shell.ts +34 -14
- package/src/errors.ts +60 -0
- package/src/fork/__tests__/manager.test.ts +385 -0
- package/src/fork/__tests__/server.test.ts +65 -0
- package/src/fork/__tests__/storage.test.ts +281 -0
- package/src/fork/__tests__/test.test.ts +97 -0
- package/src/fork/api.ts +28 -14
- package/src/fork/manager.ts +88 -43
- package/src/fork/server.ts +53 -19
- package/src/fork/storage.ts +12 -15
- package/src/fork/test.ts +58 -32
- package/src/harness/Harness.ts +228 -0
- package/src/harness/codeObject.ts +388 -0
- package/src/harness/errors.ts +22 -0
- package/src/harness/index.ts +3 -0
- package/src/harness/proxy.ts +40 -0
- package/src/harness/script.ts +196 -0
- package/src/harness/view.ts +34 -0
- package/src/helpers/__tests__/semver-utils.test.ts +121 -0
- package/src/helpers/index.ts +2 -8
- package/src/helpers/move-tests.ts +27 -23
- package/src/helpers/npm-registry.ts +4 -3
- package/src/helpers/semver-utils.ts +4 -3
- package/src/helpers/setup.ts +6 -4
- package/src/helpers/setupLocalTesting.ts +219 -200
- package/src/helpers/testFixtures.ts +106 -118
- package/src/index.ts +9 -3
- package/src/node/LocalNodeManager.ts +87 -62
- package/src/node/__tests__/LocalNodeManager.test.ts +452 -0
- package/src/runtime.ts +30 -288
- package/src/templates/README.md +1 -1
- package/src/templates/movehat.config.ts +10 -0
- package/src/templates/package.json +2 -1
- package/src/templates/scripts/deploy-counter.ts +46 -38
- package/src/templates/tests/Counter.test.ts +39 -51
- package/src/templates/types/movehat.d.ts +6 -9
- package/src/types/config.ts +8 -0
- package/src/types/fork.ts +7 -1
- package/src/types/harness.ts +182 -0
- package/src/types/runtime.ts +11 -3
- package/src/ui/__tests__/colors.test.ts +156 -0
- package/src/ui/colors.ts +5 -2
- package/src/ui/logger.ts +22 -0
- package/src/ui/symbols.ts +7 -1
- package/src/utils/__tests__/address.test.ts +93 -0
- package/src/utils/__tests__/childProcessAdapter.test.ts +266 -0
- package/src/utils/__tests__/runCli.test.ts +240 -0
- package/src/utils/address.ts +56 -0
- package/src/utils/childProcessAdapter.ts +215 -0
- package/src/utils/parseCliOutput.ts +27 -0
- package/src/utils/redact.ts +24 -0
- package/src/utils/runCli.ts +64 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Movehat
|
|
2
2
|
|
|
3
|
-
> Hardhat-like development framework for Movement L1
|
|
3
|
+
> Hardhat-like development framework for Movement L1 smart contracts
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/movehat)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -357,5 +357,5 @@ MIT ©
|
|
|
357
357
|
## Links
|
|
358
358
|
|
|
359
359
|
- [Movement Network](https://movementnetwork.xyz)
|
|
360
|
-
- [
|
|
360
|
+
- [Move Language Book](https://move-language.github.io/move/)
|
|
361
361
|
- [GitHub Issues](https://github.com/gilbertsahumada/movehat/issues)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployContract.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/deployContract.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync, } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import * as yaml from "js-yaml";
|
|
9
|
+
import { CliExecutionError } from "../errors.js";
|
|
10
|
+
import { initRuntime } from "../runtime.js";
|
|
11
|
+
import { Publisher } from "../core/Publisher.js";
|
|
12
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
/**
|
|
15
|
+
* Guards against the bug-#43 leak path: when `movement move publish`
|
|
16
|
+
* echoes `ed25519-priv-…` material in stdout/stderr, neither the
|
|
17
|
+
* thrown error nor anything reaching `console.error` may carry the
|
|
18
|
+
* raw key. The redaction is structurally guaranteed by runCli today
|
|
19
|
+
* — these tests make the guarantee *directly* asserted so a future
|
|
20
|
+
* PR adding a non-runCli code path can't silently re-leak.
|
|
21
|
+
*/
|
|
22
|
+
describe("runtime.deployContract — secret redaction", () => {
|
|
23
|
+
let tmpHome;
|
|
24
|
+
let tmpCwd;
|
|
25
|
+
let origHome;
|
|
26
|
+
let origCwd;
|
|
27
|
+
beforeEach(() => {
|
|
28
|
+
tmpHome = mkdtempSync(join(tmpdir(), "movehat-test-home-"));
|
|
29
|
+
tmpCwd = mkdtempSync(join(tmpdir(), "movehat-test-cwd-"));
|
|
30
|
+
// Minimal movehat.config.js — testnet with no `accounts` means the
|
|
31
|
+
// auto-generated deterministic test key is used (config.ts:147-155).
|
|
32
|
+
writeFileSync(join(tmpCwd, "movehat.config.js"), `export default {
|
|
33
|
+
defaultNetwork: "testnet",
|
|
34
|
+
networks: {
|
|
35
|
+
testnet: {
|
|
36
|
+
url: "https://testnet.movementnetwork.xyz/v1",
|
|
37
|
+
chainId: "testnet"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
`);
|
|
42
|
+
// Minimal Move package layout. `extractNamedAddresses` reads
|
|
43
|
+
// <moveDir>/sources/*.move; the empty file produces an empty Set.
|
|
44
|
+
const moveDir = join(tmpCwd, "move");
|
|
45
|
+
mkdirSync(join(moveDir, "sources"), { recursive: true });
|
|
46
|
+
writeFileSync(join(moveDir, "Move.toml"), `[package]
|
|
47
|
+
name = "dummy"
|
|
48
|
+
version = "0.0.1"
|
|
49
|
+
|
|
50
|
+
[addresses]
|
|
51
|
+
`);
|
|
52
|
+
writeFileSync(join(moveDir, "sources", "dummy.move"), "// intentionally empty\n");
|
|
53
|
+
origHome = process.env.HOME;
|
|
54
|
+
process.env.HOME = tmpHome;
|
|
55
|
+
origCwd = process.cwd();
|
|
56
|
+
process.chdir(tmpCwd);
|
|
57
|
+
});
|
|
58
|
+
afterEach(() => {
|
|
59
|
+
try {
|
|
60
|
+
process.chdir(origCwd);
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
if (origHome === undefined)
|
|
64
|
+
delete process.env.HOME;
|
|
65
|
+
else
|
|
66
|
+
process.env.HOME = origHome;
|
|
67
|
+
if (existsSync(tmpHome))
|
|
68
|
+
rmSync(tmpHome, { recursive: true, force: true });
|
|
69
|
+
if (existsSync(tmpCwd))
|
|
70
|
+
rmSync(tmpCwd, { recursive: true, force: true });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
function makeAdapter(steps) {
|
|
74
|
+
const calls = [];
|
|
75
|
+
const adapter = {
|
|
76
|
+
async run(input) {
|
|
77
|
+
calls.push(input);
|
|
78
|
+
// The args layout is `["move", "build" | "publish", ...rest]`.
|
|
79
|
+
if (input.args[1] === "build")
|
|
80
|
+
return steps.build;
|
|
81
|
+
if (input.args[1] === "publish")
|
|
82
|
+
return steps.publish;
|
|
83
|
+
throw new Error(`unexpected movement subcommand: ${input.args[1]}`);
|
|
84
|
+
},
|
|
85
|
+
spawn() {
|
|
86
|
+
throw new Error("spawn not used in deployContract tests");
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
return { adapter, calls };
|
|
90
|
+
}
|
|
91
|
+
it("leak path #2 — rethrown error has redacted stderr (no raw ed25519-priv-)", async () => {
|
|
92
|
+
const rawKey = "ed25519-priv-0x" + "a".repeat(64);
|
|
93
|
+
const { adapter, calls } = makeAdapter({
|
|
94
|
+
build: { exitCode: 0, stdout: "build ok", stderr: "" },
|
|
95
|
+
publish: { exitCode: 1, stdout: "", stderr: `Movement publish failed: ${rawKey}` },
|
|
96
|
+
});
|
|
97
|
+
const runtime = await initRuntime();
|
|
98
|
+
let captured;
|
|
99
|
+
try {
|
|
100
|
+
await runtime.deployContract("mymodule", { adapter });
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
captured = err;
|
|
104
|
+
}
|
|
105
|
+
expect(captured).toBeInstanceOf(CliExecutionError);
|
|
106
|
+
const err = captured;
|
|
107
|
+
expect(err.stderr).toContain("***REDACTED***");
|
|
108
|
+
expect(err.stderr).not.toContain("ed25519-priv-");
|
|
109
|
+
expect(err.stderr).not.toContain(rawKey);
|
|
110
|
+
// Pin the call shape: build then publish, args reach the adapter un-quoted.
|
|
111
|
+
// A previous regression (shell-escape mismatch fixed in 511fd95) survived
|
|
112
|
+
// unit tests because no assertion checked what landed in `args`.
|
|
113
|
+
expect(calls).toHaveLength(2);
|
|
114
|
+
const [build, publish] = calls;
|
|
115
|
+
if (!build || !publish)
|
|
116
|
+
throw new Error("expected 2 captured calls");
|
|
117
|
+
expect(build.command).toBe("movement");
|
|
118
|
+
expect(build.args.slice(0, 2)).toEqual(["move", "build"]);
|
|
119
|
+
expect(publish.args.slice(0, 2)).toEqual(["move", "publish"]);
|
|
120
|
+
for (const arg of [...build.args, ...publish.args]) {
|
|
121
|
+
expect(arg.startsWith("'")).toBe(false);
|
|
122
|
+
expect(arg.endsWith("'")).toBe(false);
|
|
123
|
+
}
|
|
124
|
+
// Bonus: deployContract's finally block must have restored / removed the
|
|
125
|
+
// movement config file. If a future refactor breaks the finally, this
|
|
126
|
+
// assertion fires before any real damage.
|
|
127
|
+
expect(existsSync(join(tmpHome, ".aptos", "config.yaml"))).toBe(false);
|
|
128
|
+
});
|
|
129
|
+
it("two concurrent deploys do not corrupt ~/.aptos/config.yaml (#37)", async () => {
|
|
130
|
+
// Pre-fix #37: both deploys overwrote ~/.aptos/config.yaml with the
|
|
131
|
+
// SAME profile name ("default" by default), then both restored
|
|
132
|
+
// independently. The second deploy's restore would overwrite the
|
|
133
|
+
// first's profile mid-publish → potential cross-contamination of
|
|
134
|
+
// private keys / accounts. Post-fix: each deploy uses a unique
|
|
135
|
+
// movehat-deploy-<uuid> profile name and only deletes its own key
|
|
136
|
+
// on cleanup. The user's other profiles never get touched.
|
|
137
|
+
//
|
|
138
|
+
// The mutex is what makes this safe — without it, the
|
|
139
|
+
// read-modify-write cycles would race and silently drop a profile.
|
|
140
|
+
// Seed the yaml with an unrelated user profile that MUST survive.
|
|
141
|
+
const aptosDir = join(tmpHome, ".aptos");
|
|
142
|
+
mkdirSync(aptosDir, { recursive: true });
|
|
143
|
+
const preExisting = {
|
|
144
|
+
profiles: {
|
|
145
|
+
user_main: {
|
|
146
|
+
private_key: "0x" + "1".repeat(64),
|
|
147
|
+
public_key: "0x" + "2".repeat(64),
|
|
148
|
+
account: "0x" + "3".repeat(64),
|
|
149
|
+
rest_url: "https://example.invalid/v1",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
const configPath = join(aptosDir, "config.yaml");
|
|
154
|
+
writeFileSync(configPath, yaml.dump(preExisting), { mode: 0o600 });
|
|
155
|
+
// Set up two Publisher instances with fake adapters that record their
|
|
156
|
+
// own --profile argument and inject a small delay on publish so the
|
|
157
|
+
// critical sections overlap.
|
|
158
|
+
function makeDelayedAdapter(label) {
|
|
159
|
+
const captured = {};
|
|
160
|
+
const adapter = {
|
|
161
|
+
async run(input) {
|
|
162
|
+
if (input.args[1] === "build") {
|
|
163
|
+
return { exitCode: 0, stdout: `built ${label}`, stderr: "" };
|
|
164
|
+
}
|
|
165
|
+
if (input.args[1] === "publish") {
|
|
166
|
+
captured.publishCall = input;
|
|
167
|
+
// Hold the lock-protected critical section open long enough
|
|
168
|
+
// for the other deploy's addProfile to compete.
|
|
169
|
+
await new Promise((r) => setTimeout(r, 30));
|
|
170
|
+
return {
|
|
171
|
+
exitCode: 0,
|
|
172
|
+
stdout: `Transaction hash: 0x${"d".repeat(64)}`,
|
|
173
|
+
stderr: "",
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
throw new Error(`unexpected: ${input.args[1]}`);
|
|
177
|
+
},
|
|
178
|
+
spawn() {
|
|
179
|
+
throw new Error("spawn not used");
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
return { adapter, captured };
|
|
183
|
+
}
|
|
184
|
+
const a = makeDelayedAdapter("A");
|
|
185
|
+
const b = makeDelayedAdapter("B");
|
|
186
|
+
// Build a minimal config + account once via initRuntime, then call
|
|
187
|
+
// Publisher directly (bypasses the loadDeployment cache that would
|
|
188
|
+
// throw on the second deploy if both used moduleName "test").
|
|
189
|
+
const runtime = await initRuntime();
|
|
190
|
+
const { config, account } = runtime;
|
|
191
|
+
await Promise.all([
|
|
192
|
+
new Publisher({ adapter: a.adapter }).deploy({
|
|
193
|
+
moduleName: "concurrent_a",
|
|
194
|
+
config,
|
|
195
|
+
account,
|
|
196
|
+
packageDir: join(tmpCwd, "move"),
|
|
197
|
+
}),
|
|
198
|
+
new Publisher({ adapter: b.adapter }).deploy({
|
|
199
|
+
moduleName: "concurrent_b",
|
|
200
|
+
config,
|
|
201
|
+
account,
|
|
202
|
+
packageDir: join(tmpCwd, "move"),
|
|
203
|
+
}),
|
|
204
|
+
]);
|
|
205
|
+
// Both publish calls captured distinct --profile args.
|
|
206
|
+
const argsA = a.captured.publishCall.args;
|
|
207
|
+
const argsB = b.captured.publishCall.args;
|
|
208
|
+
const profileArgA = argsA[argsA.indexOf("--profile") + 1];
|
|
209
|
+
const profileArgB = argsB[argsB.indexOf("--profile") + 1];
|
|
210
|
+
expect(profileArgA).toMatch(/^movehat-deploy-/);
|
|
211
|
+
expect(profileArgB).toMatch(/^movehat-deploy-/);
|
|
212
|
+
expect(profileArgA).not.toBe(profileArgB);
|
|
213
|
+
// After both deploys finish, ~/.aptos/config.yaml contains the
|
|
214
|
+
// user's original profile and zero movehat-deploy-* profiles.
|
|
215
|
+
const finalYaml = yaml.load(readFileSync(configPath, "utf8"));
|
|
216
|
+
expect(finalYaml.profiles).toBeDefined();
|
|
217
|
+
expect(Object.keys(finalYaml.profiles)).toEqual(["user_main"]);
|
|
218
|
+
expect(finalYaml.profiles.user_main.private_key).toBe(preExisting.profiles.user_main.private_key);
|
|
219
|
+
});
|
|
220
|
+
it("SIGINT mid-deploy cleans the profile from ~/.aptos/config.yaml (#36)", async () => {
|
|
221
|
+
// Pre-fix #36: between the yaml write (private key persisted) and the
|
|
222
|
+
// finally block, a SIGINT would skip cleanup and leave the user's
|
|
223
|
+
// private key sitting in ~/.aptos/config.yaml at mode 0o600.
|
|
224
|
+
// Post-fix: a sync signal handler runs synchronously before exit,
|
|
225
|
+
// removing the deploy's unique profile from the yaml.
|
|
226
|
+
//
|
|
227
|
+
// This test spawns a child process running a harness that drives
|
|
228
|
+
// Publisher.deploy() with a 3-second-delayed publish, then sends
|
|
229
|
+
// SIGINT mid-flight. Vitest's own process is unaffected because
|
|
230
|
+
// the SIGINT goes to the child.
|
|
231
|
+
// Seed an unrelated user profile that MUST survive.
|
|
232
|
+
const aptosDir = join(tmpHome, ".aptos");
|
|
233
|
+
mkdirSync(aptosDir, { recursive: true });
|
|
234
|
+
const configPath = join(aptosDir, "config.yaml");
|
|
235
|
+
writeFileSync(configPath, yaml.dump({
|
|
236
|
+
profiles: {
|
|
237
|
+
user_main: {
|
|
238
|
+
private_key: "0x" + "a".repeat(64),
|
|
239
|
+
public_key: "0x" + "b".repeat(64),
|
|
240
|
+
account: "0x" + "c".repeat(64),
|
|
241
|
+
rest_url: "https://example.invalid/v1",
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
}), { mode: 0o600 });
|
|
245
|
+
const harnessPath = join(__dirname, "fixtures", "sigint-deploy-harness.ts");
|
|
246
|
+
// Resolve tsx's CLI binary by absolute path — the test's tmp cwd has
|
|
247
|
+
// no node_modules, so a bare `tsx` import would fail to resolve.
|
|
248
|
+
// `require.resolve("tsx")` returns the package's main (dist/loader.mjs);
|
|
249
|
+
// the binary is two levels up from there, in `<root>/dist/cli.mjs`
|
|
250
|
+
// (same trick `commands/run.ts:49-53` uses).
|
|
251
|
+
const tsxMain = require.resolve("tsx");
|
|
252
|
+
const tsxCliPath = join(dirname(dirname(tsxMain)), "dist", "cli.mjs");
|
|
253
|
+
const child = spawn(process.execPath, [tsxCliPath, harnessPath], {
|
|
254
|
+
env: { ...process.env, HOME: tmpHome },
|
|
255
|
+
cwd: tmpCwd,
|
|
256
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
257
|
+
});
|
|
258
|
+
// Wait for the harness to announce its unique profile name via stdout
|
|
259
|
+
// (it writes a JSON line `{"profile":"movehat-deploy-XXXX"}` just
|
|
260
|
+
// before entering the slow publish step).
|
|
261
|
+
let announced;
|
|
262
|
+
let stdoutBuf = "";
|
|
263
|
+
let stderrBuf = "";
|
|
264
|
+
child.stdout?.on("data", (chunk) => {
|
|
265
|
+
stdoutBuf += chunk.toString();
|
|
266
|
+
for (const line of stdoutBuf.split("\n")) {
|
|
267
|
+
const trimmed = line.trim();
|
|
268
|
+
if (!trimmed.startsWith("{"))
|
|
269
|
+
continue;
|
|
270
|
+
try {
|
|
271
|
+
const parsed = JSON.parse(trimmed);
|
|
272
|
+
if (typeof parsed.profile === "string")
|
|
273
|
+
announced = parsed.profile;
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
/* not a JSON line we care about */
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
child.stderr?.on("data", (c) => (stderrBuf += c.toString()));
|
|
281
|
+
// Poll until the harness has announced OR 8s timeout (the import +
|
|
282
|
+
// SDK initialization can take a few seconds in CI/cold-start).
|
|
283
|
+
const start = Date.now();
|
|
284
|
+
while (!announced && Date.now() - start < 8000) {
|
|
285
|
+
await new Promise((r) => setTimeout(r, 100));
|
|
286
|
+
}
|
|
287
|
+
if (!announced) {
|
|
288
|
+
child.kill("SIGKILL");
|
|
289
|
+
throw new Error(`harness never announced profile in 8s.\n` +
|
|
290
|
+
`stdout so far:\n${stdoutBuf}\n---\nstderr so far:\n${stderrBuf}`);
|
|
291
|
+
}
|
|
292
|
+
expect(announced).toMatch(/^movehat-deploy-/);
|
|
293
|
+
// Deliver SIGINT mid-publish and wait for the harness to exit.
|
|
294
|
+
child.kill("SIGINT");
|
|
295
|
+
const exitCode = await new Promise((resolve) => {
|
|
296
|
+
child.on("exit", (code) => resolve(code));
|
|
297
|
+
});
|
|
298
|
+
expect(exitCode).toBe(130);
|
|
299
|
+
// The yaml on disk contains the user's original profile and NO
|
|
300
|
+
// movehat-deploy-* leftovers.
|
|
301
|
+
expect(existsSync(configPath)).toBe(true);
|
|
302
|
+
const finalYaml = yaml.load(readFileSync(configPath, "utf8"));
|
|
303
|
+
expect(finalYaml.profiles).toBeDefined();
|
|
304
|
+
expect(Object.keys(finalYaml.profiles).sort()).toEqual(["user_main"]);
|
|
305
|
+
expect(finalYaml.profiles.user_main.private_key).toBe("0x" + "a".repeat(64));
|
|
306
|
+
}, 15000);
|
|
307
|
+
it("does not mutate Move.toml during deploy (#38)", async () => {
|
|
308
|
+
// Pre-fix #38: deployContract overwrote every entry under [addresses]
|
|
309
|
+
// with the deployer address, then relied on `finally` to restore.
|
|
310
|
+
// Post-fix: Move.toml is never touched — `--named-addresses` carries
|
|
311
|
+
// the overrides on the CLI line for both build and publish.
|
|
312
|
+
const moveTomlPath = join(tmpCwd, "move", "Move.toml");
|
|
313
|
+
const moveTomlContent = `[package]
|
|
314
|
+
name = "dummy"
|
|
315
|
+
version = "0.0.1"
|
|
316
|
+
|
|
317
|
+
[addresses]
|
|
318
|
+
counter = "0x42"
|
|
319
|
+
greeting = "0xcafe"
|
|
320
|
+
`;
|
|
321
|
+
writeFileSync(moveTomlPath, moveTomlContent);
|
|
322
|
+
// Move source that references "counter" so extractNamedAddresses picks
|
|
323
|
+
// it up — otherwise the --named-addresses arg is empty and the test
|
|
324
|
+
// is uninteresting.
|
|
325
|
+
writeFileSync(join(tmpCwd, "move", "sources", "dummy.move"), "module counter::dummy { }\n");
|
|
326
|
+
const { adapter } = makeAdapter({
|
|
327
|
+
build: { exitCode: 0, stdout: "build ok", stderr: "" },
|
|
328
|
+
publish: {
|
|
329
|
+
exitCode: 0,
|
|
330
|
+
stdout: "Transaction hash: 0x" + "c".repeat(64),
|
|
331
|
+
stderr: "",
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
const runtime = await initRuntime();
|
|
335
|
+
await runtime.deployContract("counter", { adapter });
|
|
336
|
+
const after = readFileSync(moveTomlPath, "utf8");
|
|
337
|
+
expect(after).toBe(moveTomlContent);
|
|
338
|
+
});
|
|
339
|
+
it("leak path #1 — console.error on a noisy-but-successful publish never sees raw key", async () => {
|
|
340
|
+
const rawKey = "ed25519-priv-0x" + "a".repeat(64);
|
|
341
|
+
const { adapter } = makeAdapter({
|
|
342
|
+
build: { exitCode: 0, stdout: "build ok", stderr: "" },
|
|
343
|
+
// Publish succeeds (exitCode 0) but emits a stderr line containing the key.
|
|
344
|
+
publish: {
|
|
345
|
+
exitCode: 0,
|
|
346
|
+
stdout: "Transaction hash: 0x" + "b".repeat(64),
|
|
347
|
+
stderr: `warning: ${rawKey}`,
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
const errSpy = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
351
|
+
const logSpy = vi.spyOn(console, "log").mockImplementation(() => { });
|
|
352
|
+
try {
|
|
353
|
+
const runtime = await initRuntime();
|
|
354
|
+
await runtime.deployContract("mymodule", { adapter });
|
|
355
|
+
const allErr = errSpy.mock.calls.flat().join("\n");
|
|
356
|
+
const allLog = logSpy.mock.calls.flat().join("\n");
|
|
357
|
+
expect(allErr).not.toContain("ed25519-priv-");
|
|
358
|
+
expect(allErr).not.toContain(rawKey);
|
|
359
|
+
expect(allLog).not.toContain("ed25519-priv-");
|
|
360
|
+
expect(allLog).not.toContain(rawKey);
|
|
361
|
+
}
|
|
362
|
+
finally {
|
|
363
|
+
errSpy.mockRestore();
|
|
364
|
+
logSpy.mockRestore();
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
//# sourceMappingURL=deployContract.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployContract.test.js","sourceRoot":"","sources":["../../src/__tests__/deployContract.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SA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C,eAAe,CAAC,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YAC9C,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { ModuleAlreadyDeployedError } from '../errors.js';
|
|
3
|
+
describe('ModuleAlreadyDeployedError', () => {
|
|
4
|
+
it('should create error with all properties', () => {
|
|
5
|
+
const error = new ModuleAlreadyDeployedError('Module "counter" is already deployed', 'counter', 'testnet', '0x1234', 1704985623564, '0xabcd');
|
|
6
|
+
expect(error).toBeInstanceOf(Error);
|
|
7
|
+
expect(error).toBeInstanceOf(ModuleAlreadyDeployedError);
|
|
8
|
+
expect(error.name).toBe('ModuleAlreadyDeployedError');
|
|
9
|
+
expect(error.message).toBe('Module "counter" is already deployed');
|
|
10
|
+
expect(error.moduleName).toBe('counter');
|
|
11
|
+
expect(error.network).toBe('testnet');
|
|
12
|
+
expect(error.address).toBe('0x1234');
|
|
13
|
+
expect(error.timestamp).toBe(1704985623564);
|
|
14
|
+
expect(error.txHash).toBe('0xabcd');
|
|
15
|
+
});
|
|
16
|
+
it('should work without optional txHash', () => {
|
|
17
|
+
const error = new ModuleAlreadyDeployedError('Module already deployed', 'token', 'mainnet', '0x5678', 1704985623564);
|
|
18
|
+
expect(error.moduleName).toBe('token');
|
|
19
|
+
expect(error.network).toBe('mainnet');
|
|
20
|
+
expect(error.txHash).toBeUndefined();
|
|
21
|
+
});
|
|
22
|
+
it('should have proper stack trace', () => {
|
|
23
|
+
const error = new ModuleAlreadyDeployedError('Test error', 'test', 'local', '0x0', Date.now());
|
|
24
|
+
expect(error.stack).toBeDefined();
|
|
25
|
+
expect(error.stack).toContain('ModuleAlreadyDeployedError');
|
|
26
|
+
});
|
|
27
|
+
it('should be catchable as Error', () => {
|
|
28
|
+
const throwError = () => {
|
|
29
|
+
throw new ModuleAlreadyDeployedError('Test', 'module', 'testnet', '0x1', Date.now());
|
|
30
|
+
};
|
|
31
|
+
expect(throwError).toThrow(Error);
|
|
32
|
+
expect(throwError).toThrow(ModuleAlreadyDeployedError);
|
|
33
|
+
});
|
|
34
|
+
it('should allow instanceof checks', () => {
|
|
35
|
+
try {
|
|
36
|
+
throw new ModuleAlreadyDeployedError('Test', 'module', 'testnet', '0x1', Date.now());
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
expect(e instanceof ModuleAlreadyDeployedError).toBe(true);
|
|
40
|
+
if (e instanceof ModuleAlreadyDeployedError) {
|
|
41
|
+
expect(e.moduleName).toBe('module');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=errors.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.js","sourceRoot":"","sources":["../../src/__tests__/errors.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,KAA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
+
/**
|
|
2
|
+
* Stand-alone child-process harness for the SIGINT-cleanup test in
|
|
3
|
+
* `deployContract.test.ts`. Run via tsx by the parent test; never picked
|
|
4
|
+
* up by vitest's test glob (default matches `*.{test,spec}.?(c|m)[jt]s`).
|
|
5
|
+
*
|
|
6
|
+
* Behavior:
|
|
7
|
+
* 1. Build a fake ChildProcessAdapter whose `publish` step awaits a
|
|
8
|
+
* long delay (3 seconds) — gives the parent test plenty of time to
|
|
9
|
+
* send SIGINT mid-flight.
|
|
10
|
+
* 2. Drive `Publisher.deploy()` against the fake adapter using a
|
|
11
|
+
* synthetic MovehatConfig + Account read from env vars.
|
|
12
|
+
* 3. Write the chosen `movehat-deploy-<uuid>` profile name to stdout
|
|
13
|
+
* as JSON (`{"profile": "..."}`) before the slow publish so the
|
|
14
|
+
* parent test knows which key to look for after SIGINT.
|
|
15
|
+
* 4. If the deploy completes naturally (test failure case), exit 0.
|
|
16
|
+
* 5. When SIGINT arrives, Publisher's signal handler runs synchronous
|
|
17
|
+
* cleanup and `setImmediate(() => process.exit(130))`.
|
|
18
|
+
*
|
|
19
|
+
* The parent test does NOT import this file — it spawns it via
|
|
20
|
+
* `child_process.spawn(node, [tsx, harness, ...])` so the harness runs
|
|
21
|
+
* in its own process with its own signal-handler installation.
|
|
22
|
+
*/
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=sigint-deploy-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sigint-deploy-harness.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/sigint-deploy-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stand-alone child-process harness for the SIGINT-cleanup test in
|
|
3
|
+
* `deployContract.test.ts`. Run via tsx by the parent test; never picked
|
|
4
|
+
* up by vitest's test glob (default matches `*.{test,spec}.?(c|m)[jt]s`).
|
|
5
|
+
*
|
|
6
|
+
* Behavior:
|
|
7
|
+
* 1. Build a fake ChildProcessAdapter whose `publish` step awaits a
|
|
8
|
+
* long delay (3 seconds) — gives the parent test plenty of time to
|
|
9
|
+
* send SIGINT mid-flight.
|
|
10
|
+
* 2. Drive `Publisher.deploy()` against the fake adapter using a
|
|
11
|
+
* synthetic MovehatConfig + Account read from env vars.
|
|
12
|
+
* 3. Write the chosen `movehat-deploy-<uuid>` profile name to stdout
|
|
13
|
+
* as JSON (`{"profile": "..."}`) before the slow publish so the
|
|
14
|
+
* parent test knows which key to look for after SIGINT.
|
|
15
|
+
* 4. If the deploy completes naturally (test failure case), exit 0.
|
|
16
|
+
* 5. When SIGINT arrives, Publisher's signal handler runs synchronous
|
|
17
|
+
* cleanup and `setImmediate(() => process.exit(130))`.
|
|
18
|
+
*
|
|
19
|
+
* The parent test does NOT import this file — it spawns it via
|
|
20
|
+
* `child_process.spawn(node, [tsx, harness, ...])` so the harness runs
|
|
21
|
+
* in its own process with its own signal-handler installation.
|
|
22
|
+
*/
|
|
23
|
+
import { Account, Ed25519PrivateKey } from "@aptos-labs/ts-sdk";
|
|
24
|
+
import { Publisher } from "../../core/Publisher.js";
|
|
25
|
+
// Deterministic test key — must satisfy the Movement TypeScript SDK's Ed25519 parser.
|
|
26
|
+
// Same key the testnet auto-config uses in `core/config.ts:147-155`.
|
|
27
|
+
const TEST_PRIVATE_KEY = "0x0000000000000000000000000000000000000000000000000000000000000001";
|
|
28
|
+
async function main() {
|
|
29
|
+
const account = Account.fromPrivateKey({
|
|
30
|
+
privateKey: new Ed25519PrivateKey(TEST_PRIVATE_KEY),
|
|
31
|
+
});
|
|
32
|
+
const config = {
|
|
33
|
+
network: "testnet",
|
|
34
|
+
rpc: "https://testnet.invalid/v1",
|
|
35
|
+
privateKey: TEST_PRIVATE_KEY,
|
|
36
|
+
allAccounts: [TEST_PRIVATE_KEY],
|
|
37
|
+
profile: "default",
|
|
38
|
+
moveDir: "./move",
|
|
39
|
+
account: account.accountAddress.toString(),
|
|
40
|
+
namedAddresses: {},
|
|
41
|
+
networkConfig: {
|
|
42
|
+
url: "https://testnet.invalid/v1",
|
|
43
|
+
chainId: "testnet",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
const slowPublishAdapter = {
|
|
47
|
+
async run(input) {
|
|
48
|
+
if (input.args[1] === "build") {
|
|
49
|
+
return { exitCode: 0, stdout: "built", stderr: "" };
|
|
50
|
+
}
|
|
51
|
+
if (input.args[1] === "publish") {
|
|
52
|
+
// Surface the unique profile name to the parent BEFORE blocking.
|
|
53
|
+
const profileIdx = input.args.indexOf("--profile");
|
|
54
|
+
const profile = profileIdx >= 0 ? input.args[profileIdx + 1] : "";
|
|
55
|
+
process.stdout.write(JSON.stringify({ profile }) + "\n");
|
|
56
|
+
// Hold long enough for the parent to deliver SIGINT.
|
|
57
|
+
await new Promise((r) => setTimeout(r, 3000));
|
|
58
|
+
return {
|
|
59
|
+
exitCode: 0,
|
|
60
|
+
stdout: "Transaction hash: 0x" + "f".repeat(64),
|
|
61
|
+
stderr: "",
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
throw new Error(`unexpected subcommand: ${input.args[1]}`);
|
|
65
|
+
},
|
|
66
|
+
spawn() {
|
|
67
|
+
throw new Error("spawn not used");
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
const publisher = new Publisher({ adapter: slowPublishAdapter });
|
|
71
|
+
await publisher.deploy({
|
|
72
|
+
moduleName: "sigint_harness",
|
|
73
|
+
config,
|
|
74
|
+
account,
|
|
75
|
+
packageDir: process.cwd(),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
main().catch((err) => {
|
|
79
|
+
process.stderr.write(`harness error: ${err.message}\n`);
|
|
80
|
+
process.exit(2);
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=sigint-deploy-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sigint-deploy-harness.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