movehat 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -1
- package/dist/commands/compile.d.ts +0 -1
- package/dist/commands/compile.js +0 -1
- package/dist/commands/fork/create.d.ts +1 -1
- package/dist/commands/fork/create.js +18 -3
- package/dist/commands/fork/fund.d.ts +0 -1
- package/dist/commands/fork/fund.js +0 -1
- package/dist/commands/fork/list.d.ts +0 -1
- package/dist/commands/fork/list.js +0 -1
- package/dist/commands/fork/serve.d.ts +0 -1
- package/dist/commands/fork/serve.js +0 -1
- package/dist/commands/fork/view-resource.d.ts +0 -1
- package/dist/commands/fork/view-resource.js +0 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +0 -1
- package/dist/commands/run.d.ts +17 -1
- package/dist/commands/run.js +46 -33
- package/dist/commands/test-move.d.ts +0 -1
- package/dist/commands/test-move.js +0 -1
- package/dist/commands/test.d.ts +0 -1
- package/dist/commands/test.js +8 -1
- package/dist/commands/update.d.ts +0 -1
- package/dist/commands/update.js +0 -1
- package/dist/core/AccountManager.d.ts +15 -2
- package/dist/core/AccountManager.js +32 -20
- package/dist/core/Publisher.d.ts +0 -1
- package/dist/core/Publisher.js +0 -1
- package/dist/core/config.d.ts +0 -1
- package/dist/core/config.js +109 -28
- package/dist/core/contract.d.ts +0 -1
- package/dist/core/contract.js +0 -1
- package/dist/core/deployments.d.ts +0 -1
- package/dist/core/deployments.js +0 -1
- package/dist/core/movementProfile.d.ts +0 -1
- package/dist/core/movementProfile.js +0 -1
- package/dist/core/shell.d.ts +0 -1
- package/dist/core/shell.js +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/fork/api.d.ts +24 -1
- package/dist/fork/api.js +95 -1
- package/dist/fork/manager.d.ts +14 -1
- package/dist/fork/manager.js +19 -1
- package/dist/fork/server.d.ts +19 -1
- package/dist/fork/server.js +188 -8
- package/dist/fork/storage.d.ts +0 -1
- package/dist/fork/storage.js +50 -32
- package/dist/fork/test.d.ts +0 -1
- package/dist/fork/test.js +0 -1
- package/dist/harness/Harness.d.ts +0 -1
- package/dist/harness/Harness.js +6 -2
- package/dist/harness/codeObject.d.ts +0 -1
- package/dist/harness/codeObject.js +0 -1
- package/dist/harness/errors.d.ts +0 -1
- package/dist/harness/errors.js +0 -1
- package/dist/harness/index.d.ts +0 -1
- package/dist/harness/index.js +0 -1
- package/dist/harness/proxy.d.ts +12 -1
- package/dist/harness/proxy.js +23 -1
- package/dist/harness/script.d.ts +0 -1
- package/dist/harness/script.js +0 -1
- package/dist/harness/view.d.ts +0 -1
- package/dist/harness/view.js +0 -1
- package/dist/helpers/assertions.d.ts +0 -1
- package/dist/helpers/assertions.js +0 -1
- package/dist/helpers/banner.d.ts +0 -1
- package/dist/helpers/banner.js +0 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/move-tests.d.ts +0 -1
- package/dist/helpers/move-tests.js +0 -1
- package/dist/helpers/npm-registry.d.ts +0 -1
- package/dist/helpers/npm-registry.js +0 -1
- package/dist/helpers/semver-utils.d.ts +0 -1
- package/dist/helpers/semver-utils.js +0 -1
- package/dist/helpers/setup.d.ts +0 -1
- package/dist/helpers/setup.js +0 -1
- package/dist/helpers/setupLocalTesting.d.ts +2 -5
- package/dist/helpers/setupLocalTesting.js +0 -1
- package/dist/helpers/testFixtures.d.ts +0 -1
- package/dist/helpers/testFixtures.js +0 -1
- package/dist/helpers/version-check.d.ts +0 -1
- package/dist/helpers/version-check.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/node/LocalNodeManager.d.ts +0 -1
- package/dist/node/LocalNodeManager.js +4 -2
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +0 -1
- package/dist/types/config.d.ts +0 -1
- package/dist/types/config.js +0 -1
- package/dist/types/fork.d.ts +0 -1
- package/dist/types/fork.js +0 -1
- package/dist/types/harness.d.ts +0 -1
- package/dist/types/harness.js +0 -1
- package/dist/types/runtime.d.ts +0 -1
- package/dist/types/runtime.js +0 -1
- package/dist/ui/colors.d.ts +0 -1
- package/dist/ui/colors.js +0 -1
- package/dist/ui/formatters.d.ts +0 -1
- package/dist/ui/formatters.js +0 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/logger.d.ts +0 -1
- package/dist/ui/logger.js +0 -1
- package/dist/ui/spinner.d.ts +0 -1
- package/dist/ui/spinner.js +0 -1
- package/dist/ui/symbols.d.ts +0 -1
- package/dist/ui/symbols.js +0 -1
- package/dist/ui/table.d.ts +0 -1
- package/dist/ui/table.js +0 -1
- package/dist/utils/address.d.ts +0 -1
- package/dist/utils/address.js +0 -1
- package/dist/utils/childProcessAdapter.d.ts +0 -1
- package/dist/utils/childProcessAdapter.js +46 -20
- package/dist/utils/movementCli.d.ts +5 -0
- package/dist/utils/movementCli.js +91 -0
- package/dist/utils/parseCliOutput.d.ts +6 -4
- package/dist/utils/parseCliOutput.js +10 -6
- package/dist/utils/redact.d.ts +3 -3
- package/dist/utils/redact.js +6 -5
- package/dist/utils/runCli.d.ts +0 -1
- package/dist/utils/runCli.js +10 -2
- package/package.json +4 -4
- package/dist/__tests__/deployContract.test.d.ts +0 -2
- package/dist/__tests__/deployContract.test.d.ts.map +0 -1
- package/dist/__tests__/deployContract.test.js +0 -377
- package/dist/__tests__/deployContract.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -46
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/exports.test.d.ts +0 -2
- package/dist/__tests__/exports.test.d.ts.map +0 -1
- package/dist/__tests__/exports.test.js +0 -30
- package/dist/__tests__/exports.test.js.map +0 -1
- package/dist/__tests__/fixtures/sigint-deploy-harness.d.ts +0 -25
- package/dist/__tests__/fixtures/sigint-deploy-harness.d.ts.map +0 -1
- package/dist/__tests__/fixtures/sigint-deploy-harness.js +0 -83
- package/dist/__tests__/fixtures/sigint-deploy-harness.js.map +0 -1
- package/dist/__tests__/fork/api.test.d.ts +0 -2
- package/dist/__tests__/fork/api.test.d.ts.map +0 -1
- package/dist/__tests__/fork/api.test.js +0 -115
- package/dist/__tests__/fork/api.test.js.map +0 -1
- package/dist/__tests__/fork/api.timeout.test.d.ts +0 -2
- package/dist/__tests__/fork/api.timeout.test.d.ts.map +0 -1
- package/dist/__tests__/fork/api.timeout.test.js +0 -98
- package/dist/__tests__/fork/api.timeout.test.js.map +0 -1
- package/dist/__tests__/harness/Harness.createLive.test.d.ts +0 -2
- package/dist/__tests__/harness/Harness.createLive.test.d.ts.map +0 -1
- package/dist/__tests__/harness/Harness.createLive.test.js +0 -53
- package/dist/__tests__/harness/Harness.createLive.test.js.map +0 -1
- package/dist/__tests__/harness/Harness.proxy.test.d.ts +0 -2
- package/dist/__tests__/harness/Harness.proxy.test.d.ts.map +0 -1
- package/dist/__tests__/harness/Harness.proxy.test.js +0 -89
- package/dist/__tests__/harness/Harness.proxy.test.js.map +0 -1
- package/dist/__tests__/harness/_fixture.d.ts +0 -54
- package/dist/__tests__/harness/_fixture.d.ts.map +0 -1
- package/dist/__tests__/harness/_fixture.js +0 -69
- package/dist/__tests__/harness/_fixture.js.map +0 -1
- package/dist/__tests__/harness/codeObject.deploy.test.d.ts +0 -2
- package/dist/__tests__/harness/codeObject.deploy.test.d.ts.map +0 -1
- package/dist/__tests__/harness/codeObject.deploy.test.js +0 -288
- package/dist/__tests__/harness/codeObject.deploy.test.js.map +0 -1
- package/dist/__tests__/harness/codeObject.upgrade.test.d.ts +0 -2
- package/dist/__tests__/harness/codeObject.upgrade.test.d.ts.map +0 -1
- package/dist/__tests__/harness/codeObject.upgrade.test.js +0 -138
- package/dist/__tests__/harness/codeObject.upgrade.test.js.map +0 -1
- package/dist/__tests__/harness/script.test.d.ts +0 -2
- package/dist/__tests__/harness/script.test.d.ts.map +0 -1
- package/dist/__tests__/harness/script.test.js +0 -219
- package/dist/__tests__/harness/script.test.js.map +0 -1
- package/dist/__tests__/harness/view.test.d.ts +0 -2
- package/dist/__tests__/harness/view.test.d.ts.map +0 -1
- package/dist/__tests__/harness/view.test.js +0 -92
- package/dist/__tests__/harness/view.test.js.map +0 -1
- package/dist/__tests__/runtime.test.d.ts +0 -2
- package/dist/__tests__/runtime.test.d.ts.map +0 -1
- package/dist/__tests__/runtime.test.js +0 -141
- package/dist/__tests__/runtime.test.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/__tests__/compile.test.d.ts +0 -2
- package/dist/commands/__tests__/compile.test.d.ts.map +0 -1
- package/dist/commands/__tests__/compile.test.js +0 -351
- package/dist/commands/__tests__/compile.test.js.map +0 -1
- package/dist/commands/__tests__/compile.toml-mutation.test.d.ts +0 -2
- package/dist/commands/__tests__/compile.toml-mutation.test.d.ts.map +0 -1
- package/dist/commands/__tests__/compile.toml-mutation.test.js +0 -69
- package/dist/commands/__tests__/compile.toml-mutation.test.js.map +0 -1
- package/dist/commands/__tests__/init.test.d.ts +0 -2
- package/dist/commands/__tests__/init.test.d.ts.map +0 -1
- package/dist/commands/__tests__/init.test.js +0 -163
- package/dist/commands/__tests__/init.test.js.map +0 -1
- package/dist/commands/__tests__/run.test.d.ts +0 -2
- package/dist/commands/__tests__/run.test.d.ts.map +0 -1
- package/dist/commands/__tests__/run.test.js +0 -166
- package/dist/commands/__tests__/run.test.js.map +0 -1
- package/dist/commands/__tests__/test-move.test.d.ts +0 -2
- package/dist/commands/__tests__/test-move.test.d.ts.map +0 -1
- package/dist/commands/__tests__/test-move.test.js +0 -59
- package/dist/commands/__tests__/test-move.test.js.map +0 -1
- package/dist/commands/__tests__/test.test.d.ts +0 -2
- package/dist/commands/__tests__/test.test.d.ts.map +0 -1
- package/dist/commands/__tests__/test.test.js +0 -168
- package/dist/commands/__tests__/test.test.js.map +0 -1
- package/dist/commands/__tests__/update.test.d.ts +0 -2
- package/dist/commands/__tests__/update.test.d.ts.map +0 -1
- package/dist/commands/__tests__/update.test.js +0 -176
- package/dist/commands/__tests__/update.test.js.map +0 -1
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/fork/__tests__/create.test.d.ts +0 -2
- package/dist/commands/fork/__tests__/create.test.d.ts.map +0 -1
- package/dist/commands/fork/__tests__/create.test.js +0 -108
- package/dist/commands/fork/__tests__/create.test.js.map +0 -1
- package/dist/commands/fork/__tests__/fund.test.d.ts +0 -2
- package/dist/commands/fork/__tests__/fund.test.d.ts.map +0 -1
- package/dist/commands/fork/__tests__/fund.test.js +0 -72
- package/dist/commands/fork/__tests__/fund.test.js.map +0 -1
- package/dist/commands/fork/__tests__/list.test.d.ts +0 -2
- package/dist/commands/fork/__tests__/list.test.d.ts.map +0 -1
- package/dist/commands/fork/__tests__/list.test.js +0 -119
- package/dist/commands/fork/__tests__/list.test.js.map +0 -1
- package/dist/commands/fork/__tests__/serve.test.d.ts +0 -2
- package/dist/commands/fork/__tests__/serve.test.d.ts.map +0 -1
- package/dist/commands/fork/__tests__/serve.test.js +0 -97
- package/dist/commands/fork/__tests__/serve.test.js.map +0 -1
- package/dist/commands/fork/__tests__/view-resource.test.d.ts +0 -2
- package/dist/commands/fork/__tests__/view-resource.test.d.ts.map +0 -1
- package/dist/commands/fork/__tests__/view-resource.test.js +0 -77
- package/dist/commands/fork/__tests__/view-resource.test.js.map +0 -1
- package/dist/commands/fork/create.d.ts.map +0 -1
- package/dist/commands/fork/create.js.map +0 -1
- package/dist/commands/fork/fund.d.ts.map +0 -1
- package/dist/commands/fork/fund.js.map +0 -1
- package/dist/commands/fork/list.d.ts.map +0 -1
- package/dist/commands/fork/list.js.map +0 -1
- package/dist/commands/fork/serve.d.ts.map +0 -1
- package/dist/commands/fork/serve.js.map +0 -1
- package/dist/commands/fork/view-resource.d.ts.map +0 -1
- package/dist/commands/fork/view-resource.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/test-move.d.ts.map +0 -1
- package/dist/commands/test-move.js.map +0 -1
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js.map +0 -1
- package/dist/core/AccountManager.d.ts.map +0 -1
- package/dist/core/AccountManager.js.map +0 -1
- package/dist/core/Publisher.d.ts.map +0 -1
- package/dist/core/Publisher.js.map +0 -1
- package/dist/core/__tests__/AccountManager.global-state.test.d.ts +0 -2
- package/dist/core/__tests__/AccountManager.global-state.test.d.ts.map +0 -1
- package/dist/core/__tests__/AccountManager.global-state.test.js +0 -69
- package/dist/core/__tests__/AccountManager.global-state.test.js.map +0 -1
- package/dist/core/__tests__/AccountManager.test.d.ts +0 -2
- package/dist/core/__tests__/AccountManager.test.d.ts.map +0 -1
- package/dist/core/__tests__/AccountManager.test.js +0 -239
- package/dist/core/__tests__/AccountManager.test.js.map +0 -1
- package/dist/core/__tests__/config.test.d.ts +0 -2
- package/dist/core/__tests__/config.test.d.ts.map +0 -1
- package/dist/core/__tests__/config.test.js +0 -311
- package/dist/core/__tests__/config.test.js.map +0 -1
- package/dist/core/__tests__/deployments.test.d.ts +0 -2
- package/dist/core/__tests__/deployments.test.d.ts.map +0 -1
- package/dist/core/__tests__/deployments.test.js +0 -201
- package/dist/core/__tests__/deployments.test.js.map +0 -1
- package/dist/core/__tests__/movementProfile.test.d.ts +0 -2
- package/dist/core/__tests__/movementProfile.test.d.ts.map +0 -1
- package/dist/core/__tests__/movementProfile.test.js +0 -112
- package/dist/core/__tests__/movementProfile.test.js.map +0 -1
- package/dist/core/__tests__/shell.test.d.ts +0 -2
- package/dist/core/__tests__/shell.test.d.ts.map +0 -1
- package/dist/core/__tests__/shell.test.js +0 -107
- package/dist/core/__tests__/shell.test.js.map +0 -1
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js.map +0 -1
- package/dist/core/contract.d.ts.map +0 -1
- package/dist/core/contract.js.map +0 -1
- package/dist/core/deployments.d.ts.map +0 -1
- package/dist/core/deployments.js.map +0 -1
- package/dist/core/movementProfile.d.ts.map +0 -1
- package/dist/core/movementProfile.js.map +0 -1
- package/dist/core/shell.d.ts.map +0 -1
- package/dist/core/shell.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/fork/__tests__/manager.test.d.ts +0 -2
- package/dist/fork/__tests__/manager.test.d.ts.map +0 -1
- package/dist/fork/__tests__/manager.test.js +0 -309
- package/dist/fork/__tests__/manager.test.js.map +0 -1
- package/dist/fork/__tests__/server.cors.test.d.ts +0 -2
- package/dist/fork/__tests__/server.cors.test.d.ts.map +0 -1
- package/dist/fork/__tests__/server.cors.test.js +0 -79
- package/dist/fork/__tests__/server.cors.test.js.map +0 -1
- package/dist/fork/__tests__/server.test.d.ts +0 -2
- package/dist/fork/__tests__/server.test.d.ts.map +0 -1
- package/dist/fork/__tests__/server.test.js +0 -54
- package/dist/fork/__tests__/server.test.js.map +0 -1
- package/dist/fork/__tests__/storage.test.d.ts +0 -2
- package/dist/fork/__tests__/storage.test.d.ts.map +0 -1
- package/dist/fork/__tests__/storage.test.js +0 -222
- package/dist/fork/__tests__/storage.test.js.map +0 -1
- package/dist/fork/__tests__/test.test.d.ts +0 -2
- package/dist/fork/__tests__/test.test.d.ts.map +0 -1
- package/dist/fork/__tests__/test.test.js +0 -81
- package/dist/fork/__tests__/test.test.js.map +0 -1
- package/dist/fork/api.d.ts.map +0 -1
- package/dist/fork/api.js.map +0 -1
- package/dist/fork/manager.d.ts.map +0 -1
- package/dist/fork/manager.js.map +0 -1
- package/dist/fork/server.d.ts.map +0 -1
- package/dist/fork/server.js.map +0 -1
- package/dist/fork/storage.d.ts.map +0 -1
- package/dist/fork/storage.js.map +0 -1
- package/dist/fork/test.d.ts.map +0 -1
- package/dist/fork/test.js.map +0 -1
- package/dist/harness/Harness.d.ts.map +0 -1
- package/dist/harness/Harness.js.map +0 -1
- package/dist/harness/codeObject.d.ts.map +0 -1
- package/dist/harness/codeObject.js.map +0 -1
- package/dist/harness/errors.d.ts.map +0 -1
- package/dist/harness/errors.js.map +0 -1
- package/dist/harness/index.d.ts.map +0 -1
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/proxy.d.ts.map +0 -1
- package/dist/harness/proxy.js.map +0 -1
- package/dist/harness/script.d.ts.map +0 -1
- package/dist/harness/script.js.map +0 -1
- package/dist/harness/view.d.ts.map +0 -1
- package/dist/harness/view.js.map +0 -1
- package/dist/helpers/__tests__/semver-utils.test.d.ts +0 -2
- package/dist/helpers/__tests__/semver-utils.test.d.ts.map +0 -1
- package/dist/helpers/__tests__/semver-utils.test.js +0 -103
- package/dist/helpers/__tests__/semver-utils.test.js.map +0 -1
- package/dist/helpers/__tests__/setupLocalTesting.fork-network.test.d.ts +0 -2
- package/dist/helpers/__tests__/setupLocalTesting.fork-network.test.d.ts.map +0 -1
- package/dist/helpers/__tests__/setupLocalTesting.fork-network.test.js +0 -172
- package/dist/helpers/__tests__/setupLocalTesting.fork-network.test.js.map +0 -1
- package/dist/helpers/assertions.d.ts.map +0 -1
- package/dist/helpers/assertions.js.map +0 -1
- package/dist/helpers/banner.d.ts.map +0 -1
- package/dist/helpers/banner.js.map +0 -1
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/move-tests.d.ts.map +0 -1
- package/dist/helpers/move-tests.js.map +0 -1
- package/dist/helpers/npm-registry.d.ts.map +0 -1
- package/dist/helpers/npm-registry.js.map +0 -1
- package/dist/helpers/semver-utils.d.ts.map +0 -1
- package/dist/helpers/semver-utils.js.map +0 -1
- package/dist/helpers/setup.d.ts.map +0 -1
- package/dist/helpers/setup.js.map +0 -1
- package/dist/helpers/setupLocalTesting.d.ts.map +0 -1
- package/dist/helpers/setupLocalTesting.js.map +0 -1
- package/dist/helpers/testFixtures.d.ts.map +0 -1
- package/dist/helpers/testFixtures.js.map +0 -1
- package/dist/helpers/version-check.d.ts.map +0 -1
- package/dist/helpers/version-check.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/node/LocalNodeManager.d.ts.map +0 -1
- package/dist/node/LocalNodeManager.js.map +0 -1
- package/dist/node/__tests__/LocalNodeManager.api-port.test.d.ts +0 -2
- package/dist/node/__tests__/LocalNodeManager.api-port.test.d.ts.map +0 -1
- package/dist/node/__tests__/LocalNodeManager.api-port.test.js +0 -55
- package/dist/node/__tests__/LocalNodeManager.api-port.test.js.map +0 -1
- package/dist/node/__tests__/LocalNodeManager.test.d.ts +0 -2
- package/dist/node/__tests__/LocalNodeManager.test.d.ts.map +0 -1
- package/dist/node/__tests__/LocalNodeManager.test.js +0 -449
- package/dist/node/__tests__/LocalNodeManager.test.js.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js.map +0 -1
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js.map +0 -1
- package/dist/types/fork.d.ts.map +0 -1
- package/dist/types/fork.js.map +0 -1
- package/dist/types/harness.d.ts.map +0 -1
- package/dist/types/harness.js.map +0 -1
- package/dist/types/runtime.d.ts.map +0 -1
- package/dist/types/runtime.js.map +0 -1
- package/dist/ui/__tests__/colors.test.d.ts +0 -2
- package/dist/ui/__tests__/colors.test.d.ts.map +0 -1
- package/dist/ui/__tests__/colors.test.js +0 -127
- package/dist/ui/__tests__/colors.test.js.map +0 -1
- package/dist/ui/__tests__/logger.test.d.ts +0 -2
- package/dist/ui/__tests__/logger.test.d.ts.map +0 -1
- package/dist/ui/__tests__/logger.test.js +0 -75
- package/dist/ui/__tests__/logger.test.js.map +0 -1
- package/dist/ui/colors.d.ts.map +0 -1
- package/dist/ui/colors.js.map +0 -1
- package/dist/ui/formatters.d.ts.map +0 -1
- package/dist/ui/formatters.js.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/logger.d.ts.map +0 -1
- package/dist/ui/logger.js.map +0 -1
- package/dist/ui/spinner.d.ts.map +0 -1
- package/dist/ui/spinner.js.map +0 -1
- package/dist/ui/symbols.d.ts.map +0 -1
- package/dist/ui/symbols.js.map +0 -1
- package/dist/ui/table.d.ts.map +0 -1
- package/dist/ui/table.js.map +0 -1
- package/dist/utils/__tests__/address.test.d.ts +0 -2
- package/dist/utils/__tests__/address.test.d.ts.map +0 -1
- package/dist/utils/__tests__/address.test.js +0 -70
- package/dist/utils/__tests__/address.test.js.map +0 -1
- package/dist/utils/__tests__/childProcessAdapter.maxBuffer.test.d.ts +0 -2
- package/dist/utils/__tests__/childProcessAdapter.maxBuffer.test.d.ts.map +0 -1
- package/dist/utils/__tests__/childProcessAdapter.maxBuffer.test.js +0 -43
- package/dist/utils/__tests__/childProcessAdapter.maxBuffer.test.js.map +0 -1
- package/dist/utils/__tests__/childProcessAdapter.test.d.ts +0 -2
- package/dist/utils/__tests__/childProcessAdapter.test.d.ts.map +0 -1
- package/dist/utils/__tests__/childProcessAdapter.test.js +0 -217
- package/dist/utils/__tests__/childProcessAdapter.test.js.map +0 -1
- package/dist/utils/__tests__/runCli.test.d.ts +0 -2
- package/dist/utils/__tests__/runCli.test.d.ts.map +0 -1
- package/dist/utils/__tests__/runCli.test.js +0 -187
- package/dist/utils/__tests__/runCli.test.js.map +0 -1
- package/dist/utils/address.d.ts.map +0 -1
- package/dist/utils/address.js.map +0 -1
- package/dist/utils/childProcessAdapter.d.ts.map +0 -1
- package/dist/utils/childProcessAdapter.js.map +0 -1
- package/dist/utils/parseCliOutput.d.ts.map +0 -1
- package/dist/utils/parseCliOutput.js.map +0 -1
- package/dist/utils/redact.d.ts.map +0 -1
- package/dist/utils/redact.js.map +0 -1
- package/dist/utils/runCli.d.ts.map +0 -1
- package/dist/utils/runCli.js.map +0 -1
- package/src/__tests__/deployContract.test.ts +0 -438
- package/src/__tests__/errors.test.ts +0 -84
- package/src/__tests__/exports.test.ts +0 -32
- package/src/__tests__/fixtures/sigint-deploy-harness.ts +0 -96
- package/src/__tests__/fork/api.test.ts +0 -148
- package/src/__tests__/fork/api.timeout.test.ts +0 -150
- package/src/__tests__/harness/Harness.createLive.test.ts +0 -57
- package/src/__tests__/harness/Harness.proxy.test.ts +0 -111
- package/src/__tests__/harness/_fixture.ts +0 -131
- package/src/__tests__/harness/codeObject.deploy.test.ts +0 -319
- package/src/__tests__/harness/codeObject.upgrade.test.ts +0 -156
- package/src/__tests__/harness/script.test.ts +0 -245
- package/src/__tests__/harness/view.test.ts +0 -104
- package/src/__tests__/runtime.test.ts +0 -182
- package/src/cli.ts +0 -164
- package/src/commands/__tests__/compile.test.ts +0 -407
- package/src/commands/__tests__/compile.toml-mutation.test.ts +0 -77
- package/src/commands/__tests__/init.test.ts +0 -210
- package/src/commands/__tests__/run.test.ts +0 -192
- package/src/commands/__tests__/test-move.test.ts +0 -81
- package/src/commands/__tests__/test.test.ts +0 -204
- package/src/commands/__tests__/update.test.ts +0 -223
- package/src/commands/compile.ts +0 -339
- package/src/commands/fork/__tests__/create.test.ts +0 -132
- package/src/commands/fork/__tests__/fund.test.ts +0 -104
- package/src/commands/fork/__tests__/list.test.ts +0 -139
- package/src/commands/fork/__tests__/serve.test.ts +0 -121
- package/src/commands/fork/__tests__/view-resource.test.ts +0 -101
- package/src/commands/fork/create.ts +0 -110
- package/src/commands/fork/fund.ts +0 -64
- package/src/commands/fork/list.ts +0 -98
- package/src/commands/fork/serve.ts +0 -80
- package/src/commands/fork/view-resource.ts +0 -51
- package/src/commands/init.ts +0 -264
- package/src/commands/run.ts +0 -125
- package/src/commands/test-move.ts +0 -27
- package/src/commands/test.ts +0 -255
- package/src/commands/update.ts +0 -201
- package/src/core/AccountManager.ts +0 -457
- package/src/core/Publisher.ts +0 -310
- package/src/core/__tests__/AccountManager.global-state.test.ts +0 -83
- package/src/core/__tests__/AccountManager.test.ts +0 -290
- package/src/core/__tests__/config.test.ts +0 -377
- package/src/core/__tests__/deployments.test.ts +0 -247
- package/src/core/__tests__/movementProfile.test.ts +0 -131
- package/src/core/__tests__/shell.test.ts +0 -138
- package/src/core/config.ts +0 -286
- package/src/core/contract.ts +0 -103
- package/src/core/deployments.ts +0 -155
- package/src/core/movementProfile.ts +0 -127
- package/src/core/shell.ts +0 -86
- package/src/errors.ts +0 -81
- package/src/fork/__tests__/manager.test.ts +0 -385
- package/src/fork/__tests__/server.cors.test.ts +0 -101
- package/src/fork/__tests__/server.test.ts +0 -65
- package/src/fork/__tests__/storage.test.ts +0 -281
- package/src/fork/__tests__/test.test.ts +0 -97
- package/src/fork/api.ts +0 -190
- package/src/fork/manager.ts +0 -343
- package/src/fork/server.ts +0 -380
- package/src/fork/storage.ts +0 -253
- package/src/fork/test.ts +0 -221
- package/src/harness/Harness.ts +0 -231
- package/src/harness/codeObject.ts +0 -381
- package/src/harness/errors.ts +0 -22
- package/src/harness/index.ts +0 -3
- package/src/harness/proxy.ts +0 -40
- package/src/harness/script.ts +0 -200
- package/src/harness/view.ts +0 -34
- package/src/helpers/__tests__/semver-utils.test.ts +0 -121
- package/src/helpers/__tests__/setupLocalTesting.fork-network.test.ts +0 -212
- package/src/helpers/assertions.ts +0 -29
- package/src/helpers/banner.ts +0 -63
- package/src/helpers/index.ts +0 -37
- package/src/helpers/move-tests.ts +0 -72
- package/src/helpers/npm-registry.ts +0 -72
- package/src/helpers/semver-utils.ts +0 -54
- package/src/helpers/setup.ts +0 -54
- package/src/helpers/setupLocalTesting.ts +0 -387
- package/src/helpers/testFixtures.ts +0 -210
- package/src/helpers/version-check.ts +0 -114
- package/src/index.ts +0 -30
- package/src/node/LocalNodeManager.ts +0 -383
- package/src/node/__tests__/LocalNodeManager.api-port.test.ts +0 -62
- package/src/node/__tests__/LocalNodeManager.test.ts +0 -579
- package/src/runtime.ts +0 -157
- package/src/templates/.env.example +0 -9
- package/src/templates/.mocharc.json +0 -8
- package/src/templates/.vscode/settings.json +0 -11
- package/src/templates/README.md +0 -146
- package/src/templates/gitignore +0 -22
- package/src/templates/move/Move.toml +0 -19
- package/src/templates/move/sources/Counter.move +0 -96
- package/src/templates/movehat.config.ts +0 -57
- package/src/templates/package.json +0 -27
- package/src/templates/scripts/deploy-counter.ts +0 -66
- package/src/templates/tests/Counter.test.ts +0 -113
- package/src/templates/tsconfig.json +0 -15
- package/src/templates/types/movehat.d.ts +0 -101
- package/src/types/config.ts +0 -83
- package/src/types/fork.ts +0 -47
- package/src/types/harness.ts +0 -182
- package/src/types/runtime.ts +0 -57
- package/src/ui/__tests__/colors.test.ts +0 -156
- package/src/ui/__tests__/logger.test.ts +0 -89
- package/src/ui/colors.ts +0 -144
- package/src/ui/formatters.ts +0 -246
- package/src/ui/index.ts +0 -62
- package/src/ui/logger.ts +0 -310
- package/src/ui/spinner.ts +0 -218
- package/src/ui/symbols.ts +0 -80
- package/src/ui/table.ts +0 -191
- package/src/utils/__tests__/address.test.ts +0 -93
- package/src/utils/__tests__/childProcessAdapter.maxBuffer.test.ts +0 -51
- package/src/utils/__tests__/childProcessAdapter.test.ts +0 -266
- package/src/utils/__tests__/runCli.test.ts +0 -240
- package/src/utils/address.ts +0 -52
- package/src/utils/childProcessAdapter.ts +0 -244
- package/src/utils/parseCliOutput.ts +0 -27
- package/src/utils/redact.ts +0 -24
- package/src/utils/runCli.ts +0 -64
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck - This is a template file, dependencies are installed in user projects
|
|
2
|
-
import { describe, it, before, after } from "mocha";
|
|
3
|
-
import { expect } from "chai";
|
|
4
|
-
import { Harness, AccountManager } from "movehat";
|
|
5
|
-
|
|
6
|
-
describe("Counter Contract", () => {
|
|
7
|
-
let harness;
|
|
8
|
-
let counter;
|
|
9
|
-
let deployer, alice, bob;
|
|
10
|
-
|
|
11
|
-
before(async function () {
|
|
12
|
-
this.timeout(60000); // Allow time for local node startup + deployment
|
|
13
|
-
|
|
14
|
-
// Hardhat-style Harness — the primary public API.
|
|
15
|
-
// createLocal spins up a Movement local node, funds the labeled
|
|
16
|
-
// accounts from the local faucet, and (via autoDeploy) builds +
|
|
17
|
-
// publishes the named modules so they're ready to use.
|
|
18
|
-
//
|
|
19
|
-
// The setupTestFixture helper still works if you prefer the older
|
|
20
|
-
// pattern; see `import { setupTestFixture } from "movehat/helpers"`.
|
|
21
|
-
harness = await Harness.createLocal({
|
|
22
|
-
accountLabels: ["deployer", "alice", "bob"],
|
|
23
|
-
autoDeploy: ["counter"],
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const labeled = AccountManager.getLabeledAccounts();
|
|
27
|
-
deployer = labeled.deployer;
|
|
28
|
-
alice = labeled.alice;
|
|
29
|
-
bob = labeled.bob;
|
|
30
|
-
|
|
31
|
-
const counterAddr = harness.runtime.getDeploymentAddress("counter");
|
|
32
|
-
counter = harness.runtime.getContract(counterAddr, "counter");
|
|
33
|
-
|
|
34
|
-
console.log(`\n✅ Testing on local blockchain`);
|
|
35
|
-
console.log(` Deployer: ${deployer.accountAddress.toString()}`);
|
|
36
|
-
console.log(` Alice: ${alice.accountAddress.toString()}`);
|
|
37
|
-
console.log(` Bob: ${bob.accountAddress.toString()}\n`);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
describe("Counter functionality", () => {
|
|
41
|
-
it("should initialize counter for deployer", async () => {
|
|
42
|
-
// Initialize counter for deployer (required before get/increment)
|
|
43
|
-
const tx = await counter.call(deployer, "init", []);
|
|
44
|
-
console.log(` Init transaction: ${tx.hash}`);
|
|
45
|
-
|
|
46
|
-
// Read counter value via harness.runViewFunction
|
|
47
|
-
const [value] = await harness.runViewFunction({
|
|
48
|
-
function: `${counter.moduleAddress}::counter::get`,
|
|
49
|
-
functionArguments: [deployer.accountAddress.toString()],
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
console.log(` Counter value: ${value}`);
|
|
53
|
-
expect(parseInt(value)).to.equal(0);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("should increment counter", async () => {
|
|
57
|
-
const tx = await counter.call(deployer, "increment", []);
|
|
58
|
-
console.log(` Transaction: ${tx.hash}`);
|
|
59
|
-
|
|
60
|
-
// counter.view is the shorter form when you already have the contract.
|
|
61
|
-
const value = await counter.view<string>("get", [
|
|
62
|
-
deployer.accountAddress.toString(),
|
|
63
|
-
]);
|
|
64
|
-
|
|
65
|
-
console.log(` New counter value: ${value}`);
|
|
66
|
-
expect(parseInt(value)).to.equal(1);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("alice can initialize and increment her counter", async () => {
|
|
70
|
-
const initTx = await counter.call(alice, "init", []);
|
|
71
|
-
console.log(` Alice init transaction: ${initTx.hash}`);
|
|
72
|
-
|
|
73
|
-
const tx = await counter.call(alice, "increment", []);
|
|
74
|
-
console.log(` Alice's increment transaction: ${tx.hash}`);
|
|
75
|
-
|
|
76
|
-
const aliceValue = await counter.view<string>("get", [
|
|
77
|
-
alice.accountAddress.toString(),
|
|
78
|
-
]);
|
|
79
|
-
|
|
80
|
-
console.log(` Alice's counter value: ${aliceValue}`);
|
|
81
|
-
expect(parseInt(aliceValue)).to.equal(1);
|
|
82
|
-
|
|
83
|
-
const deployerValue = await counter.view<string>("get", [
|
|
84
|
-
deployer.accountAddress.toString(),
|
|
85
|
-
]);
|
|
86
|
-
|
|
87
|
-
console.log(` Deployer's counter value: ${deployerValue}`);
|
|
88
|
-
expect(parseInt(deployerValue)).to.equal(1);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("bob can initialize and increment his counter", async () => {
|
|
92
|
-
const initTx = await counter.call(bob, "init", []);
|
|
93
|
-
console.log(` Bob init transaction: ${initTx.hash}`);
|
|
94
|
-
|
|
95
|
-
const tx = await counter.call(bob, "increment", []);
|
|
96
|
-
console.log(` Bob's increment transaction: ${tx.hash}`);
|
|
97
|
-
|
|
98
|
-
const bobValue = await counter.view<string>("get", [
|
|
99
|
-
bob.accountAddress.toString(),
|
|
100
|
-
]);
|
|
101
|
-
|
|
102
|
-
console.log(` Bob's counter value: ${bobValue}`);
|
|
103
|
-
expect(parseInt(bobValue)).to.equal(1);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
after(async () => {
|
|
108
|
-
// harness.cleanup() stops the local node and poisons the harness —
|
|
109
|
-
// any further method call (other than cleanup itself) throws
|
|
110
|
-
// HarnessDisposedError synchronously.
|
|
111
|
-
await harness.cleanup();
|
|
112
|
-
});
|
|
113
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"lib": ["ES2022"],
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"outDir": "./dist"
|
|
12
|
-
},
|
|
13
|
-
"include": ["tests/**/*", "scripts/**/*", "movehat.config.ts"],
|
|
14
|
-
"exclude": ["node_modules", "dist", "move"]
|
|
15
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// Type declarations for movehat package
|
|
2
|
-
// This file is only for IDE support during template development
|
|
3
|
-
// It will NOT be copied to user projects
|
|
4
|
-
|
|
5
|
-
declare module 'movehat' {
|
|
6
|
-
import { Aptos, Account } from '@aptos-labs/ts-sdk';
|
|
7
|
-
|
|
8
|
-
export interface NetworkInfo {
|
|
9
|
-
name: string;
|
|
10
|
-
rpc: string;
|
|
11
|
-
chainId?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface MovehatConfig {
|
|
15
|
-
network: string;
|
|
16
|
-
rpc: string;
|
|
17
|
-
privateKey: string;
|
|
18
|
-
profile: string;
|
|
19
|
-
moveDir: string;
|
|
20
|
-
account: string;
|
|
21
|
-
namedAddresses?: Record<string, string>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface DeploymentInfo {
|
|
25
|
-
address: string;
|
|
26
|
-
moduleName: string;
|
|
27
|
-
network: string;
|
|
28
|
-
deployer: string;
|
|
29
|
-
timestamp: number;
|
|
30
|
-
txHash?: string;
|
|
31
|
-
blockNumber?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface MovehatRuntime {
|
|
35
|
-
config: MovehatConfig;
|
|
36
|
-
network: NetworkInfo;
|
|
37
|
-
aptos: Aptos;
|
|
38
|
-
account: Account;
|
|
39
|
-
accounts: Account[];
|
|
40
|
-
getContract: (address: string, moduleName: string) => any;
|
|
41
|
-
deployContract: (
|
|
42
|
-
moduleName: string,
|
|
43
|
-
options?: {
|
|
44
|
-
packageDir?: string;
|
|
45
|
-
}
|
|
46
|
-
) => Promise<DeploymentInfo>;
|
|
47
|
-
getDeployment: (moduleName: string) => DeploymentInfo | null;
|
|
48
|
-
getDeployments: () => Record<string, DeploymentInfo>;
|
|
49
|
-
getDeploymentAddress: (moduleName: string) => string | null;
|
|
50
|
-
createAccount: () => Account;
|
|
51
|
-
getAccount: (privateKey: string) => Account;
|
|
52
|
-
getAccountByIndex: (index: number) => Account;
|
|
53
|
-
switchNetwork: (networkName: string) => Promise<MovehatRuntime>;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function initRuntime(configOverride?: Partial<MovehatConfig>): Promise<MovehatRuntime>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
declare module 'movehat/helpers' {
|
|
60
|
-
import { Account, Aptos } from '@aptos-labs/ts-sdk';
|
|
61
|
-
|
|
62
|
-
export interface TestEnvironment {
|
|
63
|
-
aptos: Aptos;
|
|
64
|
-
account: Account;
|
|
65
|
-
config: import('movehat').MovehatConfig;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export class MoveContract {
|
|
69
|
-
constructor(aptos: Aptos, address: string, moduleName: string);
|
|
70
|
-
// args: any[] mirrors the runtime declaration — Move entry-function
|
|
71
|
-
// arguments are heterogeneous primitives validated by the Aptos SDK
|
|
72
|
-
// at submit time.
|
|
73
|
-
call(sender: Account, functionName: string, args: any[]): Promise<TransactionResult>;
|
|
74
|
-
view<T>(functionName: string, args: any[]): Promise<T>;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface TransactionResult {
|
|
78
|
-
hash: string;
|
|
79
|
-
success: boolean;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface DeploymentInfo {
|
|
83
|
-
address: string;
|
|
84
|
-
moduleName: string;
|
|
85
|
-
network: string;
|
|
86
|
-
deployer: string;
|
|
87
|
-
timestamp: number;
|
|
88
|
-
txHash?: string;
|
|
89
|
-
blockNumber?: string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export function setupTestEnvironment(): Promise<TestEnvironment>;
|
|
93
|
-
export function createTestAccount(): Account;
|
|
94
|
-
export function getContract(aptos: Aptos, address: string, moduleName: string): MoveContract;
|
|
95
|
-
export function assertTransactionSuccess(result: TransactionResult): void;
|
|
96
|
-
export function assertTransactionFailed(result: TransactionResult): void;
|
|
97
|
-
export function saveDeployment(deployment: DeploymentInfo): void;
|
|
98
|
-
export function loadDeployment(network: string, moduleName: string): DeploymentInfo | null;
|
|
99
|
-
export function getAllDeployments(network: string): Record<string, DeploymentInfo>;
|
|
100
|
-
export function getDeployedAddress(network: string, moduleName: string): string | null;
|
|
101
|
-
}
|
package/src/types/config.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for a single network
|
|
3
|
-
*/
|
|
4
|
-
export interface NetworkConfig {
|
|
5
|
-
url: string;
|
|
6
|
-
accounts?: string[]; // Optional: if not provided, uses global accounts
|
|
7
|
-
chainId?: string;
|
|
8
|
-
profile?: string;
|
|
9
|
-
namedAddresses?: Record<string, string>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* User configuration (what users write in movehat.config.ts)
|
|
14
|
-
*/
|
|
15
|
-
export interface MovehatUserConfig {
|
|
16
|
-
defaultNetwork?: string;
|
|
17
|
-
networks: Record<string, NetworkConfig>;
|
|
18
|
-
accounts?: string[]; // Global accounts (Hardhat-style)
|
|
19
|
-
moveDir?: string;
|
|
20
|
-
namedAddresses?: Record<string, string>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Resolved configuration (internal use - what runtime uses)
|
|
25
|
-
*/
|
|
26
|
-
export interface MovehatConfig {
|
|
27
|
-
network: string; // Active network name
|
|
28
|
-
rpc: string; // RPC endpoint
|
|
29
|
-
privateKey: string; // Primary account (accounts[0])
|
|
30
|
-
allAccounts: string[]; // All accounts for this network
|
|
31
|
-
profile: string; // Movement CLI profile
|
|
32
|
-
moveDir: string; // Move source directory
|
|
33
|
-
account: string; // Account address (derived from privateKey)
|
|
34
|
-
namedAddresses: Record<string, string>; // Merged named addresses
|
|
35
|
-
networkConfig: NetworkConfig; // Full network configuration
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Testing mode for local environment
|
|
40
|
-
*/
|
|
41
|
-
export type LocalTestingMode = 'local-node' | 'fork';
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Options for setting up local testing environment
|
|
45
|
-
*/
|
|
46
|
-
export interface LocalTestOptions {
|
|
47
|
-
mode?: LocalTestingMode; // Testing mode: 'local-node' (full blockchain) or 'fork' (read-only snapshot) (default: 'local-node')
|
|
48
|
-
|
|
49
|
-
// Local Node options (when mode='local-node')
|
|
50
|
-
nodeTestDir?: string; // Directory for node data (default: .movehat/local-node)
|
|
51
|
-
nodeForceRestart?: boolean; // Clean node state and start fresh (default: true)
|
|
52
|
-
nodeFaucetPort?: number; // Faucet port for local node (default: 8081)
|
|
53
|
-
nodeApiPort?: number; // API/RPC port for local node (default: 8080)
|
|
54
|
-
nodeReadyPort?: number; // Ready server port (default: 8070)
|
|
55
|
-
nodeSilent?: boolean; // Suppress node output (default: false)
|
|
56
|
-
|
|
57
|
-
// Fork options (when mode='fork')
|
|
58
|
-
forkNetwork?: 'testnet' | 'mainnet' | string; // Network to fork from (default: 'testnet')
|
|
59
|
-
/**
|
|
60
|
-
* RPC URL override used when forking a non-built-in network.
|
|
61
|
-
* Required when `forkNetwork` is not one of the built-in names
|
|
62
|
-
* (`'testnet'`, `'mainnet'`). Ignored when a fork already exists
|
|
63
|
-
* on disk (the saved metadata's nodeUrl is reused).
|
|
64
|
-
*/
|
|
65
|
-
forkRpcUrl?: string;
|
|
66
|
-
forkName?: string; // Name for the fork (default: 'test-local')
|
|
67
|
-
forkPort?: number; // Fork server port (default: 8080)
|
|
68
|
-
forkResetState?: boolean; // Clear fork state before tests (default: true)
|
|
69
|
-
/**
|
|
70
|
-
* Optional API key sent as `Authorization: Bearer <key>` on every
|
|
71
|
-
* outgoing Movement API request made by the fork's
|
|
72
|
-
* `MovementApiClient`. Use for rate-limited public endpoints or
|
|
73
|
-
* auth-gated nodes. The key stays in process memory only — not
|
|
74
|
-
* persisted to the fork's on-disk metadata.
|
|
75
|
-
*/
|
|
76
|
-
forkApiKey?: string;
|
|
77
|
-
|
|
78
|
-
// Common options (both modes)
|
|
79
|
-
autoFund?: boolean; // Auto-fund accounts (default: true)
|
|
80
|
-
defaultBalance?: number; // Default balance in octas (default: 100_000_000 = 1 MOVE)
|
|
81
|
-
autoDeploy?: readonly string[]; // Modules to auto-deploy (accepts readonly arrays)
|
|
82
|
-
accountLabels?: readonly string[]; // Labels for pre-generated accounts (default: ['deployer', 'alice', 'bob'])
|
|
83
|
-
}
|
package/src/types/fork.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fork system types for MoveHat
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface ForkMetadata {
|
|
6
|
-
network: string;
|
|
7
|
-
nodeUrl: string;
|
|
8
|
-
chainId: number;
|
|
9
|
-
ledgerVersion: string;
|
|
10
|
-
timestamp: string;
|
|
11
|
-
epoch: string;
|
|
12
|
-
blockHeight: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface AccountState {
|
|
17
|
-
sequenceNumber: string;
|
|
18
|
-
authenticationKey: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface LedgerInfo {
|
|
22
|
-
chain_id: number;
|
|
23
|
-
epoch: string;
|
|
24
|
-
ledger_version: string;
|
|
25
|
-
oldest_ledger_version: string;
|
|
26
|
-
ledger_timestamp: string;
|
|
27
|
-
node_role: string;
|
|
28
|
-
oldest_block_height: string;
|
|
29
|
-
block_height: string;
|
|
30
|
-
git_hash?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface AccountData {
|
|
34
|
-
sequence_number: string;
|
|
35
|
-
authentication_key: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface AccountResource {
|
|
39
|
-
type: string;
|
|
40
|
-
/**
|
|
41
|
-
* Move resource payload — structurally a JSON-shaped object whose
|
|
42
|
-
* schema depends on the resource type (CoinStore, AggregatorSnapshot, etc).
|
|
43
|
-
* unknown forces callers to narrow before access; the boundary-validation
|
|
44
|
-
* follow-up of #57 will add per-resource type guards.
|
|
45
|
-
*/
|
|
46
|
-
data: unknown;
|
|
47
|
-
}
|
package/src/types/harness.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { DeploymentInfo } from "../core/deployments.js";
|
|
2
|
-
import type { ChildProcessAdapter } from "../utils/childProcessAdapter.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Options for `harness.deployCodeObject(options)`.
|
|
6
|
-
*
|
|
7
|
-
* Wraps `movement move deploy-object`. The Movement CLI derives the
|
|
8
|
-
* destination object address from the signing account; that address is
|
|
9
|
-
* bound to `moduleName` (passed as `--address-name`) at compile time.
|
|
10
|
-
* Callers retrieve the resulting object address via the returned
|
|
11
|
-
* `CodeObjectInfo.address`.
|
|
12
|
-
*/
|
|
13
|
-
export interface DeployCodeObjectOptions {
|
|
14
|
-
/**
|
|
15
|
-
* Logical module identifier (the `name` part of `module addr::name`).
|
|
16
|
-
* Used as the persistence key (`deployments/{network}/{moduleName}.json`)
|
|
17
|
-
* and as the `name` arg you'd pass to `runtime.getContract(addr, name)`
|
|
18
|
-
* after deployment.
|
|
19
|
-
*
|
|
20
|
-
* If `addressName` is omitted, `moduleName` is also used as the CLI's
|
|
21
|
-
* `--address-name` flag (correct when the Move.toml's named address
|
|
22
|
-
* matches the module identifier). For packages where they differ —
|
|
23
|
-
* e.g. `module hello_blockchain::counter` (named address
|
|
24
|
-
* `hello_blockchain`, module `counter`) — set `addressName` explicitly.
|
|
25
|
-
*/
|
|
26
|
-
moduleName: string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Move.toml named address that the derived object address binds to
|
|
30
|
-
* at compile time (the `--address-name` flag of `move deploy-object`).
|
|
31
|
-
*
|
|
32
|
-
* Defaults to `moduleName`. Set this when the Move.toml's named
|
|
33
|
-
* address differs from the on-chain module identifier:
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* // Move source: `module hello_blockchain::counter`
|
|
37
|
-
* // Move.toml: `[addresses] hello_blockchain = "_"`
|
|
38
|
-
* await harness.deployCodeObject({
|
|
39
|
-
* moduleName: "counter", // for getContract + save key
|
|
40
|
-
* addressName: "hello_blockchain", // for --address-name
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
addressName?: string;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Extra named-address overrides merged on top of the addresses
|
|
48
|
-
* auto-detected from `<packageDir>/sources/**.move`. Values here win
|
|
49
|
-
* for the matching keys; auto-detected names not present here are
|
|
50
|
-
* still pinned to the deployer address (Publisher convention).
|
|
51
|
-
*/
|
|
52
|
-
namedAddresses?: Record<string, string>;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Path to the Move package. Defaults to `config.moveDir` from the
|
|
56
|
-
* harness's runtime config (usually `./move`).
|
|
57
|
-
*/
|
|
58
|
-
packageDir?: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Artifact set written into the on-chain package. Mirrors the CLI
|
|
62
|
-
* flag. Defaults to `'sparse'` (the Movement CLI default).
|
|
63
|
-
*/
|
|
64
|
-
includedArtifacts?: "none" | "sparse" | "all";
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Test-only override for the child-process adapter. Production callers
|
|
68
|
-
* leave this undefined so the default spawn-based adapter is used.
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
adapter?: ChildProcessAdapter;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Options for `harness.upgradeCodeObject(options)`.
|
|
76
|
-
*
|
|
77
|
-
* Wraps `movement move upgrade-object`. The object must already exist
|
|
78
|
-
* on-chain at `objectAddress` and have been deployed previously (typically
|
|
79
|
-
* via `deployCodeObject`).
|
|
80
|
-
*/
|
|
81
|
-
export interface UpgradeCodeObjectOptions extends DeployCodeObjectOptions {
|
|
82
|
-
/** Address of the existing code object to upgrade. Required. */
|
|
83
|
-
objectAddress: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Result of `deployCodeObject` / `upgradeCodeObject`.
|
|
88
|
-
*
|
|
89
|
-
* Today this is structurally identical to {@link DeploymentInfo} — the
|
|
90
|
-
* `address` field holds the derived **object address** (the value
|
|
91
|
-
* callers pass to `runtime.getContract(...)` to interact with the
|
|
92
|
-
* modules), and `deployer` is the signing account.
|
|
93
|
-
*
|
|
94
|
-
* The alias exists so future iterations can layer additional fields
|
|
95
|
-
* (e.g. an explicit `kind: 'code-object' | 'publish'` discriminator)
|
|
96
|
-
* without churning every callsite.
|
|
97
|
-
*/
|
|
98
|
-
export type CodeObjectInfo = DeploymentInfo;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Options for `harness.runViewFunction(options)`.
|
|
102
|
-
*
|
|
103
|
-
* Delegates to the Aptos SDK's `aptos.view(...)` — no CLI invocation,
|
|
104
|
-
* no profile management. Works on `createLocal`, `createFork`, and
|
|
105
|
-
* `createLive` harnesses (view functions are read-only).
|
|
106
|
-
*/
|
|
107
|
-
export interface RunViewFunctionOptions {
|
|
108
|
-
/**
|
|
109
|
-
* Fully qualified Move function id, e.g. `0xCAFE::counter::get`.
|
|
110
|
-
*/
|
|
111
|
-
function: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Move type-tag arguments, e.g. `['0x1::aptos_coin::AptosCoin']`.
|
|
115
|
-
*/
|
|
116
|
-
typeArguments?: string[];
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Move function arguments. SDK-validated at the boundary; pass values
|
|
120
|
-
* matching the Move function signature (strings for `address`,
|
|
121
|
-
* numbers / bigints for `u8`-`u256`, booleans, etc.).
|
|
122
|
-
*/
|
|
123
|
-
functionArguments?: unknown[];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Options for `harness.runMoveScript(options)`.
|
|
128
|
-
*
|
|
129
|
-
* Wraps `movement move run-script`. The CLI handles compilation
|
|
130
|
-
* inline when given a `.move` source; the user can also pass a
|
|
131
|
-
* pre-compiled `.mv` bytecode file.
|
|
132
|
-
*
|
|
133
|
-
* Not available on fork-mode harnesses (forks are read-only).
|
|
134
|
-
*/
|
|
135
|
-
export interface RunMoveScriptOptions {
|
|
136
|
-
/**
|
|
137
|
-
* Path to the Move script. Extension determines the CLI flag:
|
|
138
|
-
* - `.move` → `--script-path` (CLI auto-compiles)
|
|
139
|
-
* - `.mv` → `--compiled-script-path` (user pre-compiled)
|
|
140
|
-
* Other extensions throw synchronously before any CLI call.
|
|
141
|
-
*/
|
|
142
|
-
scriptPath: string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* CLI-formatted typed arguments. Movement CLI expects each arg
|
|
146
|
-
* prefixed by its Move type, e.g. `'address:0x1'`, `'u8:42'`,
|
|
147
|
-
* `'bool:true'`, `'string:hello'`. See
|
|
148
|
-
* `movement move run-script --help` for the full grammar.
|
|
149
|
-
*/
|
|
150
|
-
args?: string[];
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Type-tag arguments for generic scripts, e.g.
|
|
154
|
-
* `['0x1::aptos_coin::AptosCoin']`.
|
|
155
|
-
*/
|
|
156
|
-
typeArgs?: string[];
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Optional working directory for compilation. Most callers leave
|
|
160
|
-
* this undefined — the CLI uses the script's parent directory.
|
|
161
|
-
*/
|
|
162
|
-
packageDir?: string;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Test-only override for the child-process adapter.
|
|
166
|
-
* @internal
|
|
167
|
-
*/
|
|
168
|
-
adapter?: ChildProcessAdapter;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Result of `harness.runMoveScript`.
|
|
173
|
-
*
|
|
174
|
-
* Always carries `txHash` (parser throws if it can't extract one).
|
|
175
|
-
* `success` and `vmStatus` are best-effort: parsed from the CLI's
|
|
176
|
-
* JSON `Result` block when present, `undefined` if the parser misses.
|
|
177
|
-
*/
|
|
178
|
-
export interface MoveScriptResult {
|
|
179
|
-
txHash: string;
|
|
180
|
-
success?: boolean;
|
|
181
|
-
vmStatus?: string;
|
|
182
|
-
}
|
package/src/types/runtime.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Aptos, Account } from "@aptos-labs/ts-sdk";
|
|
2
|
-
import { MovehatConfig } from "./config.js";
|
|
3
|
-
import { MoveContract } from "../core/contract.js";
|
|
4
|
-
import { DeploymentInfo } from "../core/deployments.js";
|
|
5
|
-
import type { ChildProcessAdapter } from "../utils/childProcessAdapter.js";
|
|
6
|
-
|
|
7
|
-
export interface NetworkInfo {
|
|
8
|
-
name: string;
|
|
9
|
-
rpc: string;
|
|
10
|
-
chainId?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface MovehatRuntime {
|
|
14
|
-
// Core configuration
|
|
15
|
-
config: MovehatConfig;
|
|
16
|
-
|
|
17
|
-
// Network information
|
|
18
|
-
network: NetworkInfo;
|
|
19
|
-
|
|
20
|
-
// Movement TypeScript SDK client instance
|
|
21
|
-
aptos: Aptos;
|
|
22
|
-
|
|
23
|
-
// Default account from config (accounts[0])
|
|
24
|
-
account: Account;
|
|
25
|
-
|
|
26
|
-
// All accounts for this network
|
|
27
|
-
accounts: Account[];
|
|
28
|
-
|
|
29
|
-
// Helper functions
|
|
30
|
-
getContract: (address: string, moduleName: string) => MoveContract;
|
|
31
|
-
|
|
32
|
-
// Deployment functions
|
|
33
|
-
deployContract: (
|
|
34
|
-
moduleName: string,
|
|
35
|
-
options?: {
|
|
36
|
-
packageDir?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Override the child-process adapter. Test-only: production callers
|
|
39
|
-
* leave this undefined so the default spawn-based adapter is used.
|
|
40
|
-
*/
|
|
41
|
-
adapter?: ChildProcessAdapter;
|
|
42
|
-
}
|
|
43
|
-
) => Promise<DeploymentInfo>;
|
|
44
|
-
getDeployment: (moduleName: string) => DeploymentInfo | null;
|
|
45
|
-
getDeployments: () => Record<string, DeploymentInfo>;
|
|
46
|
-
getDeploymentAddress: (moduleName: string) => string | null;
|
|
47
|
-
|
|
48
|
-
// Account management
|
|
49
|
-
createAccount: () => Account;
|
|
50
|
-
getAccount: (privateKey: string) => Account;
|
|
51
|
-
getAccountByIndex: (index: number) => Account;
|
|
52
|
-
|
|
53
|
-
// Network switching — returns a new runtime bound to the requested
|
|
54
|
-
// network. There is no module-cached runtime, so callers must capture
|
|
55
|
-
// and use the returned instance.
|
|
56
|
-
switchNetwork: (networkName: string) => Promise<MovehatRuntime>;
|
|
57
|
-
}
|