@toon-protocol/townhouse 0.1.0-rc5
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/LICENSE +190 -0
- package/README.md +386 -0
- package/dist/chunk-IB6TNCUQ.js +8274 -0
- package/dist/chunk-IB6TNCUQ.js.map +1 -0
- package/dist/chunk-UTFWPLTB.js +59 -0
- package/dist/chunk-UTFWPLTB.js.map +1 -0
- package/dist/cli.d.ts +38 -0
- package/dist/cli.js +684 -0
- package/dist/cli.js.map +1 -0
- package/dist/compose/townhouse-dev.yml +406 -0
- package/dist/compose/townhouse-hs.yml +276 -0
- package/dist/demo-MJR47QHZ.js +117 -0
- package/dist/demo-MJR47QHZ.js.map +1 -0
- package/dist/image-manifest.json +32 -0
- package/dist/index.d.ts +1410 -0
- package/dist/index.js +180 -0
- package/dist/index.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
// src/constants.ts
|
|
35
|
+
var CONTAINER_PREFIX = "townhouse-";
|
|
36
|
+
var NODE_BTP_PORT = 3e3;
|
|
37
|
+
var DEFAULT_CONNECTOR_IMAGE = "ghcr.io/toon-protocol/connector@sha256:4a24ccb0997d7b025997e670546032f6a84cd18a77c490509016b85e181a344e";
|
|
38
|
+
var ACCOUNT_INDEX_TOWN = 0;
|
|
39
|
+
var ACCOUNT_INDEX_MILL = 1;
|
|
40
|
+
var ACCOUNT_INDEX_DVM = 2;
|
|
41
|
+
var TOWN_HEALTH_PORT = 3100;
|
|
42
|
+
var MILL_HEALTH_PORT = 3200;
|
|
43
|
+
var DVM_HEALTH_PORT = 3400;
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
__require,
|
|
47
|
+
__commonJS,
|
|
48
|
+
__toESM,
|
|
49
|
+
CONTAINER_PREFIX,
|
|
50
|
+
NODE_BTP_PORT,
|
|
51
|
+
DEFAULT_CONNECTOR_IMAGE,
|
|
52
|
+
ACCOUNT_INDEX_TOWN,
|
|
53
|
+
ACCOUNT_INDEX_MILL,
|
|
54
|
+
ACCOUNT_INDEX_DVM,
|
|
55
|
+
TOWN_HEALTH_PORT,
|
|
56
|
+
MILL_HEALTH_PORT,
|
|
57
|
+
DVM_HEALTH_PORT
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-UTFWPLTB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["/**\n * Shared constants for Townhouse package.\n *\n * Single source of truth for values used across multiple modules\n * (orchestrator, config-generator, CLI).\n */\n\n/** Container name prefix for all Townhouse-managed Docker containers */\nexport const CONTAINER_PREFIX = 'townhouse-';\n\n/** Internal BTP port exposed by node containers (Docker-internal only) */\nexport const NODE_BTP_PORT = 3000;\n\n/**\n * Default connector Docker image — digest-pinned per CONNECTOR_RELEASE_CONTRACT.md.\n *\n * To bump: capture a new digest by running the Story 45.1 publish workflow\n * against the desired connector tag, copy the resulting image-manifest.json\n * connector entry's digest, and update this constant + the contract canary\n * fixture. See packages/sdk/CONNECTOR_RELEASE_CONTRACT.md for the full bump\n * checklist + breaking-changes history.\n *\n * To read the human-readable tag for log output, consult dist/image-manifest.json:\n * manifest.images.connector.tag\n */\nexport const DEFAULT_CONNECTOR_IMAGE =\n 'ghcr.io/toon-protocol/connector@sha256:4a24ccb0997d7b025997e670546032f6a84cd18a77c490509016b85e181a344e';\n\n/**\n * HD wallet account indices per node type (Story 21.4, D21-008).\n * BIP-44 paths: m/44'/{coin}'/ACCOUNT'/0/0\n */\nexport const ACCOUNT_INDEX_TOWN = 0;\nexport const ACCOUNT_INDEX_MILL = 1;\nexport const ACCOUNT_INDEX_DVM = 2;\n\n/** BLS health port exposed by each node container type (internal Docker port). */\nexport const TOWN_HEALTH_PORT = 3100;\nexport const MILL_HEALTH_PORT = 3200;\nexport const DVM_HEALTH_PORT = 3400;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAAM,mBAAmB;AAGzB,IAAM,gBAAgB;AActB,IAAM,0BACX;AAMK,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB;AAG1B,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;","names":[]}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import Docker from 'dockerode';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cross-platform browser opener for the wizard CLI command.
|
|
6
|
+
* Uses platform-native launchers; errors are non-fatal.
|
|
7
|
+
*/
|
|
8
|
+
interface BrowserOpener {
|
|
9
|
+
open(url: string): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CLI entrypoint for `@toon-protocol/townhouse` (Story 21.1).
|
|
14
|
+
*
|
|
15
|
+
* Subcommands: init, up, down, status, --help
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* townhouse init [--force]
|
|
19
|
+
* townhouse up
|
|
20
|
+
* townhouse down
|
|
21
|
+
* townhouse status
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Error thrown when `main()` is invoked with `--help`. Callers (tests) can
|
|
26
|
+
* distinguish this from genuine failures; the top-level entrypoint catches
|
|
27
|
+
* it and exits 0.
|
|
28
|
+
*/
|
|
29
|
+
declare class CliHelpRequested extends Error {
|
|
30
|
+
constructor();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Main CLI entry — exported for testability (same pattern as Mill CLI).
|
|
34
|
+
* Accepts optional dockerode instance for dependency injection in tests.
|
|
35
|
+
*/
|
|
36
|
+
declare function main(argv: string[], dockerInstance?: Docker, browserOpener?: BrowserOpener): Promise<void>;
|
|
37
|
+
|
|
38
|
+
export { CliHelpRequested, main };
|