movehat 0.2.3 → 0.2.5
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 +0 -1
- package/dist/commands/run.js +0 -1
- 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 +0 -1
- 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 +15 -2
- package/dist/fork/manager.js +20 -2
- 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 +2 -3
- 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 +1 -2
- package/dist/node/LocalNodeManager.js +6 -4
- 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 +0 -1
- package/dist/utils/parseCliOutput.js +0 -1
- 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
package/README.md
CHANGED
|
@@ -190,7 +190,7 @@ For anything not on this list, open an issue on [GitHub](https://github.com/gilb
|
|
|
190
190
|
|
|
191
191
|
## Contributing
|
|
192
192
|
|
|
193
|
-
See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for development setup, the dual-tier test infrastructure, and the PR workflow.
|
|
193
|
+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for development setup, the dual-tier test infrastructure, and the PR workflow. See [`MAINTENANCE.md`](./MAINTENANCE.md) for release cadence, triage SLA, versioning, and deprecation policy.
|
|
194
194
|
|
|
195
195
|
## License
|
|
196
196
|
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
package/dist/commands/compile.js
CHANGED
|
@@ -3,6 +3,7 @@ interface ForkCreateOptions {
|
|
|
3
3
|
path?: string;
|
|
4
4
|
name?: string;
|
|
5
5
|
}
|
|
6
|
+
export declare function validateForkName(name: string): string;
|
|
6
7
|
/**
|
|
7
8
|
* Create a local fork of a Movement network
|
|
8
9
|
*
|
|
@@ -27,4 +28,3 @@ interface ForkCreateOptions {
|
|
|
27
28
|
*/
|
|
28
29
|
export default function forkCreateCommand(options?: ForkCreateOptions): Promise<void>;
|
|
29
30
|
export {};
|
|
30
|
-
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import { join } from 'path';
|
|
1
|
+
import { basename, join } from 'path';
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import prompts from 'prompts';
|
|
4
4
|
import { loadUserConfig, resolveNetworkConfig } from '../../core/config.js';
|
|
5
5
|
import { ForkManager } from '../../fork/manager.js';
|
|
6
6
|
import { logger, withSpinner, createKVTable, formatCommand } from '../../ui/index.js';
|
|
7
|
+
const SAFE_FORK_NAME_RE = /^[A-Za-z0-9._-]+$/;
|
|
8
|
+
const RESERVED_FORK_NAMES = new Set(['.', '..']);
|
|
9
|
+
export function validateForkName(name) {
|
|
10
|
+
if (name.length === 0) {
|
|
11
|
+
throw new Error('Invalid fork name: name must not be empty');
|
|
12
|
+
}
|
|
13
|
+
if (RESERVED_FORK_NAMES.has(name) ||
|
|
14
|
+
basename(name) !== name ||
|
|
15
|
+
name.includes('/') ||
|
|
16
|
+
name.includes('\\') ||
|
|
17
|
+
name.includes('..') ||
|
|
18
|
+
!SAFE_FORK_NAME_RE.test(name)) {
|
|
19
|
+
throw new Error('Invalid fork name: use only letters, numbers, dot, underscore, and dash; path separators and traversal are not allowed');
|
|
20
|
+
}
|
|
21
|
+
return name;
|
|
22
|
+
}
|
|
7
23
|
/**
|
|
8
24
|
* Create a local fork of a Movement network
|
|
9
25
|
*
|
|
@@ -33,7 +49,7 @@ export default async function forkCreateCommand(options = {}) {
|
|
|
33
49
|
const networkName = options.network || process.env.MH_CLI_NETWORK || userConfig.defaultNetwork || 'testnet';
|
|
34
50
|
const networkConfig = await resolveNetworkConfig(userConfig, networkName);
|
|
35
51
|
// Determine fork name and path
|
|
36
|
-
const forkName = options.name || `${networkName}-fork
|
|
52
|
+
const forkName = validateForkName(options.name || `${networkName}-fork`);
|
|
37
53
|
const forkPath = options.path || join(process.cwd(), '.movehat', 'forks', forkName);
|
|
38
54
|
logger.newline();
|
|
39
55
|
logger.info(`Creating fork of ${networkName}`);
|
|
@@ -88,4 +104,3 @@ export default async function forkCreateCommand(options = {}) {
|
|
|
88
104
|
process.exit(1);
|
|
89
105
|
}
|
|
90
106
|
}
|
|
91
|
-
//# sourceMappingURL=create.js.map
|
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
package/dist/commands/run.d.ts
CHANGED
package/dist/commands/run.js
CHANGED
package/dist/commands/test.d.ts
CHANGED
package/dist/commands/test.js
CHANGED
|
@@ -183,6 +183,9 @@ async function runTypeScriptTests(watch = false) {
|
|
|
183
183
|
// terminal until the user Ctrl+Cs the parent (which kills the child via
|
|
184
184
|
// inherited stdio). Attach .catch so a spawn-time failure doesn't become
|
|
185
185
|
// an unhandled rejection.
|
|
186
|
+
/* c8 ignore start -- watch mode launches a long-running mocha process and
|
|
187
|
+
never returns; not testable as a unit. Behaviour is covered by the
|
|
188
|
+
integration suite and by manual smoke. */
|
|
186
189
|
if (watch) {
|
|
187
190
|
runCli({
|
|
188
191
|
command: mochaPath,
|
|
@@ -197,6 +200,7 @@ async function runTypeScriptTests(watch = false) {
|
|
|
197
200
|
logger.newline();
|
|
198
201
|
return;
|
|
199
202
|
}
|
|
203
|
+
/* c8 ignore stop */
|
|
200
204
|
// Non-watch mode: await the run, surface the exit code as a thrown error
|
|
201
205
|
// so the orchestrator above can summarize the failure.
|
|
202
206
|
let result;
|
|
@@ -207,14 +211,17 @@ async function runTypeScriptTests(watch = false) {
|
|
|
207
211
|
env: { ...process.env },
|
|
208
212
|
inheritStdio: true,
|
|
209
213
|
}, { throwOnNonZeroExit: false });
|
|
214
|
+
/* c8 ignore start -- runCli with throwOnNonZeroExit:false only throws on
|
|
215
|
+
spawn-time failure (ENOENT, etc.), which is blocked upstream by the
|
|
216
|
+
existsSync(mochaPath) check at line 192. Defense in depth. */
|
|
210
217
|
}
|
|
211
218
|
catch (error) {
|
|
212
219
|
logger.error(`Failed to run TypeScript tests: ${error.message}`);
|
|
213
220
|
throw error;
|
|
214
221
|
}
|
|
222
|
+
/* c8 ignore stop */
|
|
215
223
|
if (result.exitCode === 0) {
|
|
216
224
|
return;
|
|
217
225
|
}
|
|
218
226
|
throw new Error(`TypeScript tests failed with exit code ${result.exitCode}`);
|
|
219
227
|
}
|
|
220
|
-
//# sourceMappingURL=test.js.map
|
package/dist/commands/update.js
CHANGED
|
@@ -6,6 +6,14 @@ export interface StoredAccount {
|
|
|
6
6
|
address: string;
|
|
7
7
|
createdAt: number;
|
|
8
8
|
}
|
|
9
|
+
export interface SaveAccountPoolOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Persist accounts loaded from a private key, environment variable, or
|
|
12
|
+
* config. Defaults to false so imported live keys are not written to disk
|
|
13
|
+
* accidentally when callers only intend to save generated test accounts.
|
|
14
|
+
*/
|
|
15
|
+
includeImported?: boolean | undefined;
|
|
16
|
+
}
|
|
9
17
|
/**
|
|
10
18
|
* Centralized Account Manager for movehat
|
|
11
19
|
*
|
|
@@ -16,6 +24,7 @@ export declare class AccountManager {
|
|
|
16
24
|
private static pool;
|
|
17
25
|
private static privateKeys;
|
|
18
26
|
private static labelMap;
|
|
27
|
+
private static generatedAccountAddresses;
|
|
19
28
|
private static poolLoaded;
|
|
20
29
|
private static defaultPoolPath;
|
|
21
30
|
/**
|
|
@@ -105,7 +114,10 @@ export declare class AccountManager {
|
|
|
105
114
|
* @example
|
|
106
115
|
* AccountManager.saveAccountPool();
|
|
107
116
|
*/
|
|
108
|
-
static saveAccountPool(
|
|
117
|
+
static saveAccountPool(): void;
|
|
118
|
+
static saveAccountPool(poolPath: string): void;
|
|
119
|
+
static saveAccountPool(options: SaveAccountPoolOptions): void;
|
|
120
|
+
static saveAccountPool(poolPath: string, options: SaveAccountPoolOptions): void;
|
|
109
121
|
/**
|
|
110
122
|
* Load account pool from disk
|
|
111
123
|
*
|
|
@@ -179,5 +191,6 @@ export declare class AccountManager {
|
|
|
179
191
|
* @returns Record of label/address to private key hex string
|
|
180
192
|
*/
|
|
181
193
|
static exportPrivateKeys(labels?: string[]): Record<string, string>;
|
|
194
|
+
private static accountFromPrivateKey;
|
|
195
|
+
private static trackAccount;
|
|
182
196
|
}
|
|
183
|
-
//# sourceMappingURL=AccountManager.d.ts.map
|
|
@@ -15,6 +15,7 @@ export class AccountManager {
|
|
|
15
15
|
static pool = new Map(); // address → Account
|
|
16
16
|
static privateKeys = new Map(); // address → privateKey hex
|
|
17
17
|
static labelMap = new Map(); // label → address
|
|
18
|
+
static generatedAccountAddresses = new Set();
|
|
18
19
|
static poolLoaded = false;
|
|
19
20
|
// `defaultPoolPath` is captured ONCE at module-import time. A later
|
|
20
21
|
// `process.chdir(...)` does NOT redirect the save destination — pass
|
|
@@ -57,6 +58,7 @@ export class AccountManager {
|
|
|
57
58
|
const address = account.accountAddress.toString();
|
|
58
59
|
this.pool.set(address, account);
|
|
59
60
|
this.privateKeys.set(address, account.privateKey.toString());
|
|
61
|
+
this.generatedAccountAddresses.add(address);
|
|
60
62
|
if (label) {
|
|
61
63
|
this.labelMap.set(label, address);
|
|
62
64
|
}
|
|
@@ -112,14 +114,8 @@ export class AccountManager {
|
|
|
112
114
|
// Format into AIP-80 shape (`ed25519-priv-0x…`) before constructing
|
|
113
115
|
// the SDK type. Without this, raw-hex inputs trigger a noisy
|
|
114
116
|
// deprecation warning from `@aptos-labs/ts-sdk` on every call.
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const account = Account.fromPrivateKey({ privateKey });
|
|
118
|
-
const address = account.accountAddress.toString();
|
|
119
|
-
// Add to pool for tracking
|
|
120
|
-
this.pool.set(address, account);
|
|
121
|
-
// Store private key
|
|
122
|
-
this.privateKeys.set(address, privateKeyHex);
|
|
117
|
+
const account = this.accountFromPrivateKey(privateKeyHex);
|
|
118
|
+
this.trackAccount(account, privateKeyHex, "imported");
|
|
123
119
|
return account;
|
|
124
120
|
}
|
|
125
121
|
/**
|
|
@@ -165,15 +161,12 @@ export class AccountManager {
|
|
|
165
161
|
}
|
|
166
162
|
return result;
|
|
167
163
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
* AccountManager.saveAccountPool();
|
|
175
|
-
*/
|
|
176
|
-
static saveAccountPool(poolPath) {
|
|
164
|
+
static saveAccountPool(poolPathOrOptions, options = {}) {
|
|
165
|
+
const poolPath = typeof poolPathOrOptions === "string" ? poolPathOrOptions : undefined;
|
|
166
|
+
const effectiveOptions = typeof poolPathOrOptions === "object" && poolPathOrOptions !== null
|
|
167
|
+
? poolPathOrOptions
|
|
168
|
+
: options;
|
|
169
|
+
const includeImported = effectiveOptions.includeImported ?? false;
|
|
177
170
|
const basePath = poolPath || this.defaultPoolPath;
|
|
178
171
|
// Ensure directory exists with restrictive perms (the pool file holds
|
|
179
172
|
// plaintext private keys, so the directory must not be world-readable).
|
|
@@ -187,6 +180,9 @@ export class AccountManager {
|
|
|
187
180
|
const storedAccounts = [];
|
|
188
181
|
const labelMapObject = {};
|
|
189
182
|
for (const [address, account] of this.pool.entries()) {
|
|
183
|
+
if (!includeImported && !this.generatedAccountAddresses.has(address)) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
190
186
|
// Find label for this address (if any)
|
|
191
187
|
let label;
|
|
192
188
|
for (const [lbl, addr] of this.labelMap.entries()) {
|
|
@@ -250,8 +246,8 @@ export class AccountManager {
|
|
|
250
246
|
this.labelMap.clear();
|
|
251
247
|
// Restore accounts
|
|
252
248
|
for (const stored of poolData.accounts) {
|
|
253
|
-
const account = this.
|
|
254
|
-
this.
|
|
249
|
+
const account = this.accountFromPrivateKey(stored.privateKey);
|
|
250
|
+
this.trackAccount(account, stored.privateKey, "generated");
|
|
255
251
|
if (stored.label) {
|
|
256
252
|
this.labelMap.set(stored.label, stored.address);
|
|
257
253
|
}
|
|
@@ -284,6 +280,7 @@ export class AccountManager {
|
|
|
284
280
|
this.pool.clear();
|
|
285
281
|
this.privateKeys.clear();
|
|
286
282
|
this.labelMap.clear();
|
|
283
|
+
this.generatedAccountAddresses.clear();
|
|
287
284
|
this.poolLoaded = false;
|
|
288
285
|
}
|
|
289
286
|
/**
|
|
@@ -379,5 +376,20 @@ export class AccountManager {
|
|
|
379
376
|
}
|
|
380
377
|
return result;
|
|
381
378
|
}
|
|
379
|
+
static accountFromPrivateKey(privateKeyHex) {
|
|
380
|
+
const formatted = PrivateKey.formatPrivateKey(privateKeyHex, PrivateKeyVariants.Ed25519);
|
|
381
|
+
const privateKey = new Ed25519PrivateKey(formatted);
|
|
382
|
+
return Account.fromPrivateKey({ privateKey });
|
|
383
|
+
}
|
|
384
|
+
static trackAccount(account, privateKeyHex, source) {
|
|
385
|
+
const address = account.accountAddress.toString();
|
|
386
|
+
this.pool.set(address, account);
|
|
387
|
+
this.privateKeys.set(address, privateKeyHex);
|
|
388
|
+
if (source === "generated") {
|
|
389
|
+
this.generatedAccountAddresses.add(address);
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
this.generatedAccountAddresses.delete(address);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
382
395
|
}
|
|
383
|
-
//# sourceMappingURL=AccountManager.js.map
|
package/dist/core/Publisher.d.ts
CHANGED
package/dist/core/Publisher.js
CHANGED
package/dist/core/config.d.ts
CHANGED
|
@@ -24,4 +24,3 @@ export declare function _resetConfigCache(): void;
|
|
|
24
24
|
* Merges global settings with network-specific settings
|
|
25
25
|
*/
|
|
26
26
|
export declare function resolveNetworkConfig(userConfig: MovehatUserConfig, networkName?: string): Promise<MovehatConfig>;
|
|
27
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dist/core/config.js
CHANGED
package/dist/core/contract.d.ts
CHANGED
package/dist/core/contract.js
CHANGED
package/dist/core/deployments.js
CHANGED
package/dist/core/shell.d.ts
CHANGED
package/dist/core/shell.js
CHANGED
package/dist/errors.d.ts
CHANGED
package/dist/errors.js
CHANGED
package/dist/fork/api.d.ts
CHANGED
|
@@ -28,6 +28,18 @@ export declare class MovementApiClient {
|
|
|
28
28
|
* public endpoints.
|
|
29
29
|
*/
|
|
30
30
|
private get;
|
|
31
|
+
/**
|
|
32
|
+
* Make a POST request to the API with a JSON body.
|
|
33
|
+
*
|
|
34
|
+
* Mirrors `get<T>` for TLS/timeout/maxBytes/error-wrapping; differs
|
|
35
|
+
* only in `method: 'POST'`, the `Content-Type: application/json`
|
|
36
|
+
* header, and writing `body` to the request stream before `end()`.
|
|
37
|
+
*
|
|
38
|
+
* `extraHeaders` are merged in last and override defaults — used by
|
|
39
|
+
* the fork-server view proxy to forward client headers like
|
|
40
|
+
* `Accept` or `X-Aptos-Client` through to the upstream node.
|
|
41
|
+
*/
|
|
42
|
+
private post;
|
|
31
43
|
/**
|
|
32
44
|
* Build API path with proper prefix
|
|
33
45
|
*/
|
|
@@ -48,5 +60,16 @@ export declare class MovementApiClient {
|
|
|
48
60
|
* Get all resources for an account
|
|
49
61
|
*/
|
|
50
62
|
getAccountResources(address: string): Promise<AccountResource[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Execute a Move view function via the upstream node's POST /v1/view.
|
|
65
|
+
*
|
|
66
|
+
* Stateless passthrough — view results are not cached. Returns the raw
|
|
67
|
+
* array the upstream API returns (single-value views still come back as
|
|
68
|
+
* a one-element tuple).
|
|
69
|
+
*
|
|
70
|
+
* `extraHeaders` are forwarded to upstream — used by the fork server's
|
|
71
|
+
* view proxy to relay client headers (`Accept`, `X-Aptos-Client`, …)
|
|
72
|
+
* so downstream behavior such as BCS-encoded responses is preserved.
|
|
73
|
+
*/
|
|
74
|
+
view(payload: unknown, extraHeaders?: Record<string, string>): Promise<unknown[]>;
|
|
51
75
|
}
|
|
52
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/fork/api.js
CHANGED
|
@@ -98,6 +98,87 @@ export class MovementApiClient {
|
|
|
98
98
|
req.end();
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Make a POST request to the API with a JSON body.
|
|
103
|
+
*
|
|
104
|
+
* Mirrors `get<T>` for TLS/timeout/maxBytes/error-wrapping; differs
|
|
105
|
+
* only in `method: 'POST'`, the `Content-Type: application/json`
|
|
106
|
+
* header, and writing `body` to the request stream before `end()`.
|
|
107
|
+
*
|
|
108
|
+
* `extraHeaders` are merged in last and override defaults — used by
|
|
109
|
+
* the fork-server view proxy to forward client headers like
|
|
110
|
+
* `Accept` or `X-Aptos-Client` through to the upstream node.
|
|
111
|
+
*/
|
|
112
|
+
async post(path, body, extraHeaders = {}) {
|
|
113
|
+
const fullUrl = `${this.nodeUrl}${path}`;
|
|
114
|
+
const parsedUrl = new URL(fullUrl);
|
|
115
|
+
const isHttps = parsedUrl.protocol === 'https:';
|
|
116
|
+
const client = isHttps ? https : http;
|
|
117
|
+
const payload = JSON.stringify(body);
|
|
118
|
+
const headers = {
|
|
119
|
+
'Content-Type': 'application/json',
|
|
120
|
+
'Content-Length': Buffer.byteLength(payload).toString(),
|
|
121
|
+
};
|
|
122
|
+
if (this.apiKey !== undefined) {
|
|
123
|
+
headers.Authorization = `Bearer ${this.apiKey}`;
|
|
124
|
+
}
|
|
125
|
+
for (const [k, v] of Object.entries(extraHeaders)) {
|
|
126
|
+
// Don't let callers override Content-Length — we just computed it.
|
|
127
|
+
if (k.toLowerCase() === 'content-length')
|
|
128
|
+
continue;
|
|
129
|
+
headers[k] = v;
|
|
130
|
+
}
|
|
131
|
+
const timeoutMs = this.timeoutMs;
|
|
132
|
+
const maxBytes = this.maxBytes;
|
|
133
|
+
return new Promise((resolve, reject) => {
|
|
134
|
+
let settled = false;
|
|
135
|
+
const settle = (fn) => {
|
|
136
|
+
if (settled)
|
|
137
|
+
return;
|
|
138
|
+
settled = true;
|
|
139
|
+
fn();
|
|
140
|
+
};
|
|
141
|
+
const req = client.request(fullUrl, { method: 'POST', headers }, (res) => {
|
|
142
|
+
const chunks = [];
|
|
143
|
+
let totalBytes = 0;
|
|
144
|
+
res.on('data', (chunk) => {
|
|
145
|
+
const buf = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
146
|
+
totalBytes += buf.length;
|
|
147
|
+
if (totalBytes > maxBytes) {
|
|
148
|
+
req.destroy();
|
|
149
|
+
settle(() => reject(new Error(`Response exceeded maxBytes (${maxBytes}); ${totalBytes} bytes received before abort`)));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
chunks.push(buf);
|
|
153
|
+
});
|
|
154
|
+
res.on('end', () => {
|
|
155
|
+
if (settled)
|
|
156
|
+
return;
|
|
157
|
+
const data = Buffer.concat(chunks).toString('utf8');
|
|
158
|
+
if (res.statusCode !== 200) {
|
|
159
|
+
settle(() => reject(new Error(`API request failed with status ${res.statusCode}: ${data}`)));
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
const parsed = JSON.parse(data);
|
|
164
|
+
settle(() => resolve(parsed));
|
|
165
|
+
}
|
|
166
|
+
catch (err) {
|
|
167
|
+
settle(() => reject(new Error(`Failed to parse JSON response: ${err}`)));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
req.setTimeout(timeoutMs, () => {
|
|
172
|
+
req.destroy();
|
|
173
|
+
settle(() => reject(new Error(`API request timed out after ${timeoutMs}ms`)));
|
|
174
|
+
});
|
|
175
|
+
req.on('error', (err) => {
|
|
176
|
+
settle(() => reject(new Error(`API request failed: ${err.message}`)));
|
|
177
|
+
});
|
|
178
|
+
req.write(payload);
|
|
179
|
+
req.end();
|
|
180
|
+
});
|
|
181
|
+
}
|
|
101
182
|
/**
|
|
102
183
|
* Build API path with proper prefix
|
|
103
184
|
*/
|
|
@@ -135,5 +216,18 @@ export class MovementApiClient {
|
|
|
135
216
|
const normalizedAddress = normalizeAddressShort(address);
|
|
136
217
|
return this.get(this.apiPath(`/accounts/${normalizedAddress}/resources`));
|
|
137
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* Execute a Move view function via the upstream node's POST /v1/view.
|
|
221
|
+
*
|
|
222
|
+
* Stateless passthrough — view results are not cached. Returns the raw
|
|
223
|
+
* array the upstream API returns (single-value views still come back as
|
|
224
|
+
* a one-element tuple).
|
|
225
|
+
*
|
|
226
|
+
* `extraHeaders` are forwarded to upstream — used by the fork server's
|
|
227
|
+
* view proxy to relay client headers (`Accept`, `X-Aptos-Client`, …)
|
|
228
|
+
* so downstream behavior such as BCS-encoded responses is preserved.
|
|
229
|
+
*/
|
|
230
|
+
async view(payload, extraHeaders = {}) {
|
|
231
|
+
return this.post(this.apiPath('/view'), payload, extraHeaders);
|
|
232
|
+
}
|
|
138
233
|
}
|
|
139
|
-
//# sourceMappingURL=api.js.map
|
package/dist/fork/manager.d.ts
CHANGED
|
@@ -38,6 +38,20 @@ export declare class ForkManager {
|
|
|
38
38
|
getAccount(address: string): Promise<AccountState>;
|
|
39
39
|
getResource(address: string, resourceType: string): Promise<any>;
|
|
40
40
|
getAllResources(address: string): Promise<Record<string, any>>;
|
|
41
|
+
/**
|
|
42
|
+
* Stateless passthrough of `POST /v1/view` to the upstream RPC.
|
|
43
|
+
*
|
|
44
|
+
* View results are not cached — they depend on ledger version and
|
|
45
|
+
* arguments, so any caching layer would need version-aware
|
|
46
|
+
* invalidation that the fork system does not implement today. The
|
|
47
|
+
* payload is forwarded verbatim and the upstream response array is
|
|
48
|
+
* returned unchanged.
|
|
49
|
+
*
|
|
50
|
+
* `extraHeaders` are forwarded to upstream so that client headers
|
|
51
|
+
* such as `Accept: application/x-bcs` (for BCS-encoded view results)
|
|
52
|
+
* or `X-Aptos-Client` round-trip through the proxy.
|
|
53
|
+
*/
|
|
54
|
+
forwardView(payload: unknown, extraHeaders?: Record<string, string>): Promise<unknown[]>;
|
|
41
55
|
setResource(address: string, resourceType: string, data: unknown): Promise<void>;
|
|
42
56
|
/** Adds to the existing balance rather than replacing it. */
|
|
43
57
|
fundAccount(address: string, amount: number, coinType?: string): Promise<void>;
|
|
@@ -52,7 +66,7 @@ export declare class ForkManager {
|
|
|
52
66
|
* @example
|
|
53
67
|
* await forkManager.fundMultipleAccounts(
|
|
54
68
|
* ["0x123...", "0x456..."],
|
|
55
|
-
* 100_000_000 //
|
|
69
|
+
* 100_000_000 // 1 MOVE
|
|
56
70
|
* );
|
|
57
71
|
*/
|
|
58
72
|
fundMultipleAccounts(addresses: string[], amount: number, coinType?: string): Promise<void>;
|
|
@@ -76,4 +90,3 @@ export declare class ForkManager {
|
|
|
76
90
|
*/
|
|
77
91
|
getOrCreateAccount(address: string): Promise<AccountState>;
|
|
78
92
|
}
|
|
79
|
-
//# sourceMappingURL=manager.d.ts.map
|