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
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
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import type { RunResult } from "../utils/childProcessAdapter.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the tsx CLI entrypoint (`<tsx-pkg>/dist/cli.mjs`) used by
|
|
4
|
+
* `movehat run` to execute user scripts. Prefers movehat's bundled tsx
|
|
5
|
+
* by default; falls back to the cwd's tsx only if bundled is missing
|
|
6
|
+
* (defensive — should not happen for normal installs). Set
|
|
7
|
+
* `MOVEHAT_TSX_FROM_CWD=1` or pass `preferCwd: true` to flip the
|
|
8
|
+
* order — power-users who pinned a different tsx in their project.
|
|
9
|
+
*
|
|
10
|
+
* Security: the default order closes #52 (untrusted cwd could ship a
|
|
11
|
+
* malicious `node_modules/tsx/dist/cli.mjs`).
|
|
12
|
+
*
|
|
13
|
+
* Exported so the resolution logic can be unit-tested without
|
|
14
|
+
* spawning a real process.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveTsxCliPath(opts?: {
|
|
17
|
+
preferCwd?: boolean;
|
|
18
|
+
}): string | null;
|
|
2
19
|
/**
|
|
3
20
|
* Apply the exit policy for a child whose output was inherited by the
|
|
4
21
|
* parent. When the child dies via signal, re-raise it on the parent so
|
|
@@ -14,4 +31,3 @@ import type { RunResult } from "../utils/childProcessAdapter.js";
|
|
|
14
31
|
*/
|
|
15
32
|
export declare function propagateRunResultExit(result: RunResult): void;
|
|
16
33
|
export default function runCommand(scriptPath: string): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=run.d.ts.map
|
package/dist/commands/run.js
CHANGED
|
@@ -4,6 +4,45 @@ import { fileURLToPath } from "url";
|
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { runCli } from "../utils/runCli.js";
|
|
6
6
|
import { logger } from "../ui/index.js";
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const requireFromHere = createRequire(import.meta.url);
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the tsx CLI entrypoint (`<tsx-pkg>/dist/cli.mjs`) used by
|
|
11
|
+
* `movehat run` to execute user scripts. Prefers movehat's bundled tsx
|
|
12
|
+
* by default; falls back to the cwd's tsx only if bundled is missing
|
|
13
|
+
* (defensive — should not happen for normal installs). Set
|
|
14
|
+
* `MOVEHAT_TSX_FROM_CWD=1` or pass `preferCwd: true` to flip the
|
|
15
|
+
* order — power-users who pinned a different tsx in their project.
|
|
16
|
+
*
|
|
17
|
+
* Security: the default order closes #52 (untrusted cwd could ship a
|
|
18
|
+
* malicious `node_modules/tsx/dist/cli.mjs`).
|
|
19
|
+
*
|
|
20
|
+
* Exported so the resolution logic can be unit-tested without
|
|
21
|
+
* spawning a real process.
|
|
22
|
+
*/
|
|
23
|
+
export function resolveTsxCliPath(opts) {
|
|
24
|
+
const preferCwd = opts?.preferCwd ?? process.env.MOVEHAT_TSX_FROM_CWD === "1";
|
|
25
|
+
const bundledRoot = __dirname;
|
|
26
|
+
const cwdRoot = process.cwd();
|
|
27
|
+
const lookupOrder = preferCwd
|
|
28
|
+
? [cwdRoot, bundledRoot]
|
|
29
|
+
: [bundledRoot, cwdRoot];
|
|
30
|
+
for (const root of lookupOrder) {
|
|
31
|
+
try {
|
|
32
|
+
const tsxEntry = requireFromHere.resolve("tsx", { paths: [root] });
|
|
33
|
+
// require.resolve("tsx") returns .../tsx/dist/loader.mjs; walk up
|
|
34
|
+
// to the package root and into dist/cli.mjs.
|
|
35
|
+
const packageRoot = dirname(dirname(tsxEntry));
|
|
36
|
+
const cliPath = join(packageRoot, "dist", "cli.mjs");
|
|
37
|
+
if (existsSync(cliPath))
|
|
38
|
+
return cliPath;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// Lookup failed at this root; try the next one.
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
7
46
|
/**
|
|
8
47
|
* Apply the exit policy for a child whose output was inherited by the
|
|
9
48
|
* parent. When the child dies via signal, re-raise it on the parent so
|
|
@@ -50,39 +89,14 @@ export default async function runCommand(scriptPath) {
|
|
|
50
89
|
logger.plain(` Network: ${network}`);
|
|
51
90
|
}
|
|
52
91
|
logger.newline();
|
|
53
|
-
// Find tsx binary -
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
let tsxPath;
|
|
60
|
-
try {
|
|
61
|
-
// Try to resolve tsx package from user's project first
|
|
62
|
-
const tsxPackagePath = require.resolve("tsx", { paths: [process.cwd()] });
|
|
63
|
-
// require.resolve("tsx") returns .../tsx/dist/loader.mjs
|
|
64
|
-
// We need to go up to the tsx package root, then into dist/cli.mjs
|
|
65
|
-
const tsxPackageRoot = dirname(dirname(tsxPackagePath));
|
|
66
|
-
tsxPath = join(tsxPackageRoot, "dist", "cli.mjs");
|
|
67
|
-
// Verify the file exists
|
|
68
|
-
if (!existsSync(tsxPath)) {
|
|
69
|
-
throw new Error("cli.mjs not found");
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
try {
|
|
74
|
-
// Fallback to movehat's own tsx
|
|
75
|
-
const tsxPackagePath = require.resolve("tsx", { paths: [__dirname] });
|
|
76
|
-
const tsxPackageRoot = dirname(dirname(tsxPackagePath));
|
|
77
|
-
tsxPath = join(tsxPackageRoot, "dist", "cli.mjs");
|
|
78
|
-
if (!existsSync(tsxPath)) {
|
|
79
|
-
throw new Error("cli.mjs not found");
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch {
|
|
83
|
-
tsxPath = "";
|
|
84
|
-
}
|
|
92
|
+
// Find tsx binary — bundled-first per #52 (supply-chain hardening).
|
|
93
|
+
// Cwd resolution stays available behind an opt-in env var for users
|
|
94
|
+
// who pinned a different tsx in their project.
|
|
95
|
+
if (process.env.MOVEHAT_TSX_FROM_CWD === "1") {
|
|
96
|
+
logger.warning("MOVEHAT_TSX_FROM_CWD=1: resolving tsx from cwd first. " +
|
|
97
|
+
"Only use this in trusted project directories.");
|
|
85
98
|
}
|
|
99
|
+
const tsxPath = resolveTsxCliPath();
|
|
86
100
|
if (!tsxPath) {
|
|
87
101
|
logger.error("tsx binary not found");
|
|
88
102
|
logger.plain(" Make sure 'tsx' is installed in your project:");
|
|
@@ -108,4 +122,3 @@ export default async function runCommand(scriptPath) {
|
|
|
108
122
|
process.exit(1);
|
|
109
123
|
}
|
|
110
124
|
}
|
|
111
|
-
//# sourceMappingURL=run.js.map
|
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
|