@toon-protocol/townhouse 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SXKZUTGE.js → chunk-IXG4IYTG.js} +119 -23
- package/dist/chunk-IXG4IYTG.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +16 -3
- package/dist/cli.js.map +1 -1
- package/dist/compose/townhouse-hs.yml +8 -8
- package/dist/image-manifest.json +10 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{manager-D9Y_iWHo.d.ts → manager-DSkD9Td1.d.ts} +14 -1
- package/package.json +2 -2
- package/dist/chunk-SXKZUTGE.js.map +0 -1
package/dist/cli.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import Docker from 'dockerode';
|
|
3
|
-
import { C as ComposeLoaderOptions, T as TownhouseConfig, W as WalletManager, N as NodeType } from './manager-
|
|
3
|
+
import { C as ComposeLoaderOptions, T as TownhouseConfig, W as WalletManager, N as NodeType } from './manager-DSkD9Td1.js';
|
|
4
4
|
import '@toon-protocol/core';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
tailContainerLogs,
|
|
30
30
|
writeHsConnectorConfig,
|
|
31
31
|
writeHsNodeEnvFile
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-IXG4IYTG.js";
|
|
33
33
|
import "./chunk-5O4SBV5O.js";
|
|
34
34
|
import {
|
|
35
35
|
CONTAINER_PREFIX
|
|
@@ -2029,6 +2029,7 @@ Flags:
|
|
|
2029
2029
|
--port Override the API port (setup command, default 9400)
|
|
2030
2030
|
--preset Init from a named preset (init only). Supported: demo
|
|
2031
2031
|
--network Chain network for apex + nodes (init only): mainnet (default), testnet, devnet, custom
|
|
2032
|
+
--evm-url / --sol-url RPC URLs for --network custom (the project's dev chains; or EVM_URL/SOL_URL env)
|
|
2032
2033
|
--yes Non-interactive (init only); with --preset=demo uses demo password if --password absent
|
|
2033
2034
|
--json Machine-readable JSON output (node commands; NDJSON for \`logs\`)
|
|
2034
2035
|
--lines Number of historical log lines to fetch on attach (logs command, default 50)
|
|
@@ -2048,7 +2049,7 @@ function printInitNextStep(dir) {
|
|
|
2048
2049
|
);
|
|
2049
2050
|
console.log("It can take a few minutes; progress is shown throughout.");
|
|
2050
2051
|
}
|
|
2051
|
-
async function handleInit(force, configDir, password, preset, yes, network) {
|
|
2052
|
+
async function handleInit(force, configDir, password, preset, yes, network, endpoints) {
|
|
2052
2053
|
const dir = resolve(configDir ?? DEFAULT_CONFIG_DIR);
|
|
2053
2054
|
const configPath = join(dir, "config.yaml");
|
|
2054
2055
|
if (existsSync(configPath) && !force) {
|
|
@@ -2076,6 +2077,9 @@ async function handleInit(force, configDir, password, preset, yes, network) {
|
|
|
2076
2077
|
if (network !== void 0) {
|
|
2077
2078
|
configToWrite.network = network;
|
|
2078
2079
|
}
|
|
2080
|
+
if (endpoints && (endpoints.evmUrl || endpoints.solUrl)) {
|
|
2081
|
+
configToWrite.endpoints = endpoints;
|
|
2082
|
+
}
|
|
2079
2083
|
const yamlContent = stringify(configToWrite);
|
|
2080
2084
|
writeFileSync(configPath, yamlContent, {
|
|
2081
2085
|
encoding: "utf-8",
|
|
@@ -3610,6 +3614,8 @@ async function main(argv, dockerInstance, browserOpener, hsOverrides, nodeComman
|
|
|
3610
3614
|
port: { type: "string" },
|
|
3611
3615
|
preset: { type: "string" },
|
|
3612
3616
|
network: { type: "string" },
|
|
3617
|
+
"evm-url": { type: "string" },
|
|
3618
|
+
"sol-url": { type: "string" },
|
|
3613
3619
|
yes: { type: "boolean" },
|
|
3614
3620
|
"rotate-keys": { type: "boolean" },
|
|
3615
3621
|
"skip-preflight": { type: "boolean" },
|
|
@@ -3693,13 +3699,20 @@ async function main(argv, dockerInstance, browserOpener, hsOverrides, nodeComman
|
|
|
3693
3699
|
process.exitCode = 1;
|
|
3694
3700
|
break;
|
|
3695
3701
|
}
|
|
3702
|
+
const evmUrl = values["evm-url"] ?? process.env["EVM_URL"];
|
|
3703
|
+
const solUrl = values["sol-url"] ?? process.env["SOL_URL"];
|
|
3704
|
+
const endpoints = evmUrl || solUrl ? {
|
|
3705
|
+
...evmUrl ? { evmUrl } : {},
|
|
3706
|
+
...solUrl ? { solUrl } : {}
|
|
3707
|
+
} : void 0;
|
|
3696
3708
|
await handleInit(
|
|
3697
3709
|
values.force === true,
|
|
3698
3710
|
values["config-dir"],
|
|
3699
3711
|
values.password,
|
|
3700
3712
|
presetVal,
|
|
3701
3713
|
values.yes === true,
|
|
3702
|
-
networkVal
|
|
3714
|
+
networkVal,
|
|
3715
|
+
endpoints
|
|
3703
3716
|
);
|
|
3704
3717
|
break;
|
|
3705
3718
|
}
|