@lionden/plugin-network 0.1.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/LICENSE +201 -0
- package/README.md +23 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +252 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @lionden/plugin-network
|
|
2
|
+
|
|
3
|
+
LionDen plugin registering the `node` and `run` tasks and injecting network services into the LionDen Runtime Environment.
|
|
4
|
+
|
|
5
|
+
Part of [LionDen](https://github.com/sealance-io/lionden), a Hardhat-inspired development framework for Aleo and Leo.
|
|
6
|
+
|
|
7
|
+
> **Pre-v1 notice:** LionDen is in active early development. All APIs are unstable and may change
|
|
8
|
+
> without notice between 0.x releases.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install --save-dev @lionden/plugin-network
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
Documentation, examples, and the issue tracker live in the
|
|
19
|
+
[LionDen repository](https://github.com/sealance-io/lionden).
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
[Apache-2.0](./LICENSE)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AA0QvB,QAAA,MAAM,aAAa,EAAE,aAmBpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { ArgumentType, logAction, task, } from "@lionden/core";
|
|
3
|
+
import { DevnodeManager, NetworkManagerImpl, preflightDevnode, resolveDevnodeBackend, } from "@lionden/network";
|
|
4
|
+
/**
|
|
5
|
+
* Whether the Leo devnode for `leoVersion` no longer accepts the
|
|
6
|
+
* `--consensus-heights` / `--network` flags (Leo >= 4.3). An unparseable/unset
|
|
7
|
+
* version is treated as modern (>= 4.3) — the resolved default is 4.3.2 — so
|
|
8
|
+
* config that would be silently dropped is rejected rather than ignored. This
|
|
9
|
+
* is the inverse of `DevnodeManager`'s `devnodeEmitsLegacyFlags` gate.
|
|
10
|
+
*/
|
|
11
|
+
function leoDevnodeDropsConsensusFlags(leoVersion) {
|
|
12
|
+
const match = /^(\d+)\.(\d+)\./.exec(leoVersion);
|
|
13
|
+
if (!match)
|
|
14
|
+
return true;
|
|
15
|
+
const major = Number(match[1]);
|
|
16
|
+
const minor = Number(match[2]);
|
|
17
|
+
return major > 4 || (major === 4 && minor >= 3);
|
|
18
|
+
}
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Config hooks
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
const configHooks = {
|
|
23
|
+
validateResolvedConfig(config) {
|
|
24
|
+
const errors = [];
|
|
25
|
+
// Validate that the default network exists
|
|
26
|
+
if (!config.networks[config.defaultNetwork]) {
|
|
27
|
+
errors.push({
|
|
28
|
+
path: "defaultNetwork",
|
|
29
|
+
message: `Default network "${config.defaultNetwork}" is not defined in networks config`,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// Validate HTTP networks have required fields
|
|
33
|
+
for (const [name, net] of Object.entries(config.networks)) {
|
|
34
|
+
if (net.type === "http") {
|
|
35
|
+
if (!net.endpoint) {
|
|
36
|
+
errors.push({
|
|
37
|
+
path: `networks.${name}.endpoint`,
|
|
38
|
+
message: `HTTP network "${name}" must specify an endpoint URL`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (net.type === "devnode") {
|
|
43
|
+
// --clear-storage requires --storage on every backend.
|
|
44
|
+
if (net.clearStorageOnStart && !net.storagePath) {
|
|
45
|
+
errors.push({
|
|
46
|
+
path: `networks.${name}.clearStorageOnStart`,
|
|
47
|
+
message: `Devnode network "${name}" sets clearStorageOnStart but no storagePath; clearing storage requires a storage directory.`,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
// Standalone is TestnetV0-only and has consensus heights compiled in.
|
|
51
|
+
// Auto-detected standalone (provider undefined) is checked at start time.
|
|
52
|
+
if (net.provider === "standalone") {
|
|
53
|
+
if (net.network !== "testnet") {
|
|
54
|
+
errors.push({
|
|
55
|
+
path: `networks.${name}.network`,
|
|
56
|
+
message: `Devnode network "${name}" uses provider "standalone", which only supports network "testnet" (got "${net.network}").`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (net.consensusHeights !== undefined) {
|
|
60
|
+
errors.push({
|
|
61
|
+
path: `networks.${name}.consensusHeights`,
|
|
62
|
+
message: `Devnode network "${name}" uses provider "standalone", which does not support consensusHeights (they are compiled into aleo-devnode).`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else if (leoDevnodeDropsConsensusFlags(config.leoVersion)) {
|
|
67
|
+
// Leo 4.3 removed --consensus-heights / --network from `devnode start`.
|
|
68
|
+
// The Leo devnode is TestnetV0-only and auto-activates the latest
|
|
69
|
+
// consensus version (incl. V16/V17). Reject inputs that would
|
|
70
|
+
// otherwise be silently dropped, mirroring the standalone rejection.
|
|
71
|
+
if (net.consensusHeights !== undefined) {
|
|
72
|
+
errors.push({
|
|
73
|
+
path: `networks.${name}.consensusHeights`,
|
|
74
|
+
message: `Devnode network "${name}" sets consensusHeights, but the Leo ${config.leoVersion} devnode is TestnetV0-only and auto-activates the latest consensus version (incl. V16/V17). Remove consensusHeights, or set leoVersion to a line below 4.3 (only the Leo < 4.3 devnode accepts explicit consensus heights; the standalone backend has them compiled in).`,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (net.network !== undefined && net.network !== "testnet") {
|
|
78
|
+
errors.push({
|
|
79
|
+
path: `networks.${name}.network`,
|
|
80
|
+
message: `Devnode network "${name}" requests network "${net.network}", but the Leo ${config.leoVersion} devnode is TestnetV0-only (as is the standalone backend). Use network "testnet", or target a real network via an "http" network entry.`,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return errors;
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// Tasks
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
const nodeTask = task("node", "Start a local Aleo devnode")
|
|
93
|
+
.addOption({
|
|
94
|
+
name: "port",
|
|
95
|
+
type: "number",
|
|
96
|
+
description: "REST API port",
|
|
97
|
+
})
|
|
98
|
+
.addFlag({ name: "manualBlocks", description: "Disable automatic block creation" })
|
|
99
|
+
.addFlag({ name: "quiet", description: "Suppress devnode log output" })
|
|
100
|
+
.addOption({
|
|
101
|
+
name: "persist",
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Persist the ledger to this directory (standalone aleo-devnode only)",
|
|
104
|
+
})
|
|
105
|
+
.addFlag({
|
|
106
|
+
name: "clearStorage",
|
|
107
|
+
description: "Clear the persist directory before starting (requires --persist)",
|
|
108
|
+
})
|
|
109
|
+
.setAction(async (args, lre) => {
|
|
110
|
+
const port = args.port;
|
|
111
|
+
const manualBlocks = args.manualBlocks;
|
|
112
|
+
const quiet = args.quiet;
|
|
113
|
+
const persist = args.persist;
|
|
114
|
+
const clearStorage = args.clearStorage;
|
|
115
|
+
if (clearStorage && !persist) {
|
|
116
|
+
throw new Error("--clear-storage requires --persist <dir>.");
|
|
117
|
+
}
|
|
118
|
+
// Resolve the devnode network config: prefer default network if devnode,
|
|
119
|
+
// else first devnode found.
|
|
120
|
+
const defaultNet = lre.config.networks[lre.config.defaultNetwork];
|
|
121
|
+
const devnodeNet = defaultNet?.type === "devnode"
|
|
122
|
+
? defaultNet
|
|
123
|
+
: Object.values(lre.config.networks).find((n) => n.type === "devnode");
|
|
124
|
+
const socketAddr = port !== undefined ? `127.0.0.1:${port}` : devnodeNet?.socketAddr || `127.0.0.1:3030`;
|
|
125
|
+
const network = devnodeNet?.network;
|
|
126
|
+
const consensusHeights = devnodeNet?.consensusHeights;
|
|
127
|
+
const storagePath = persist ?? devnodeNet?.storagePath;
|
|
128
|
+
const clearStorageOnStart = clearStorage || (devnodeNet?.clearStorageOnStart ?? false);
|
|
129
|
+
const backend = await resolveDevnodeBackend({
|
|
130
|
+
provider: devnodeNet?.provider,
|
|
131
|
+
leoBinary: lre.config.leoBinary,
|
|
132
|
+
binary: devnodeNet?.binary,
|
|
133
|
+
network,
|
|
134
|
+
consensusHeights,
|
|
135
|
+
requiresPersistence: storagePath !== undefined,
|
|
136
|
+
});
|
|
137
|
+
await preflightDevnode(lre.config, backend);
|
|
138
|
+
const devnode = new DevnodeManager();
|
|
139
|
+
// Handle graceful shutdown
|
|
140
|
+
let shuttingDown = false;
|
|
141
|
+
const shutdown = async () => {
|
|
142
|
+
if (shuttingDown)
|
|
143
|
+
return;
|
|
144
|
+
shuttingDown = true;
|
|
145
|
+
console.log("\nStopping devnode...");
|
|
146
|
+
await devnode.stop();
|
|
147
|
+
process.exit(0);
|
|
148
|
+
};
|
|
149
|
+
const onSigint = () => void shutdown();
|
|
150
|
+
const onSigterm = () => void shutdown();
|
|
151
|
+
process.on("SIGINT", onSigint);
|
|
152
|
+
process.on("SIGTERM", onSigterm);
|
|
153
|
+
console.log(`Starting ${backend.provider} devnode at http://${socketAddr}...` +
|
|
154
|
+
(storagePath ? ` (persisting to ${storagePath})` : ""));
|
|
155
|
+
try {
|
|
156
|
+
await devnode.start({
|
|
157
|
+
socketAddr,
|
|
158
|
+
autoBlock: !manualBlocks,
|
|
159
|
+
network,
|
|
160
|
+
provider: backend.provider,
|
|
161
|
+
leoBinary: lre.config.leoBinary,
|
|
162
|
+
leoVersion: lre.config.leoVersion,
|
|
163
|
+
devnodeBinary: backend.command,
|
|
164
|
+
// consensusHeights is leo-only; resolveDevnodeBackend already rejected it
|
|
165
|
+
// for standalone, so it's safe to forward unconditionally. buildLeoArgs
|
|
166
|
+
// version-gates it (emitted only for Leo < 4.3).
|
|
167
|
+
consensusHeights,
|
|
168
|
+
...(storagePath ? { storagePath } : {}),
|
|
169
|
+
...(clearStorageOnStart ? { clearStorage: true } : {}),
|
|
170
|
+
logMode: quiet ? "quiet-buffered" : "inherit",
|
|
171
|
+
});
|
|
172
|
+
console.log(`Devnode running at ${devnode.endpoint}`);
|
|
173
|
+
if (manualBlocks) {
|
|
174
|
+
const advanceHint = backend.provider === "standalone" ? "aleo-devnode advance" : "leo devnode advance";
|
|
175
|
+
console.log(`Manual block mode: use \`${advanceHint}\` to create blocks`);
|
|
176
|
+
}
|
|
177
|
+
console.log("Press Ctrl-C to stop\n");
|
|
178
|
+
const exit = await devnode.waitForExit();
|
|
179
|
+
// The SIGINT/SIGTERM shutdown handler calls process.exit(0) before we
|
|
180
|
+
// reach here, so this branch only runs on an unexpected devnode exit.
|
|
181
|
+
// Treat both non-zero codes and signal-only exits (e.g. SIGKILL →
|
|
182
|
+
// { code: null, signal: "SIGKILL" }) as failure.
|
|
183
|
+
const cleanExit = exit.code === 0 && exit.signal === null;
|
|
184
|
+
process.exit(cleanExit ? 0 : 1);
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
process.off("SIGINT", onSigint);
|
|
188
|
+
process.off("SIGTERM", onSigterm);
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
.build();
|
|
192
|
+
const runTask = task("run", "Execute a TypeScript script with LRE context")
|
|
193
|
+
.addPositionalArgument({
|
|
194
|
+
name: "script",
|
|
195
|
+
type: ArgumentType.FILE,
|
|
196
|
+
description: "Path to the script file",
|
|
197
|
+
required: true,
|
|
198
|
+
})
|
|
199
|
+
.setAction(async (args, lre) => {
|
|
200
|
+
// Positional arg is passed via _positional array from CLI parser
|
|
201
|
+
const positionals = args._positional;
|
|
202
|
+
const scriptPath = positionals?.[0] ?? args.script;
|
|
203
|
+
if (!scriptPath) {
|
|
204
|
+
throw new Error("Script path is required. Usage: lionden run <script>");
|
|
205
|
+
}
|
|
206
|
+
const networkName = args.network ?? lre.config.defaultNetwork;
|
|
207
|
+
// Connect to the specified or default network
|
|
208
|
+
const manager = lre.network;
|
|
209
|
+
if (manager && typeof manager.connect === "function") {
|
|
210
|
+
await manager.connect(networkName);
|
|
211
|
+
}
|
|
212
|
+
// Resolve the script path relative to project root
|
|
213
|
+
const absolutePath = path.isAbsolute(scriptPath)
|
|
214
|
+
? scriptPath
|
|
215
|
+
: path.resolve(lre.config.paths.root, scriptPath);
|
|
216
|
+
console.log(`${logAction("Running script")} ${absolutePath} on network "${networkName}"`);
|
|
217
|
+
// Import and execute the script.
|
|
218
|
+
// The CLI must be invoked via tsx (or node --import tsx) for .ts support.
|
|
219
|
+
const scriptModule = (await import(absolutePath));
|
|
220
|
+
if (typeof scriptModule["default"] === "function") {
|
|
221
|
+
return await scriptModule["default"](lre);
|
|
222
|
+
}
|
|
223
|
+
else if (typeof scriptModule["main"] === "function") {
|
|
224
|
+
return await scriptModule["main"](lre);
|
|
225
|
+
}
|
|
226
|
+
// Script ran via side effects on import
|
|
227
|
+
})
|
|
228
|
+
.build();
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// Plugin definition
|
|
231
|
+
// ---------------------------------------------------------------------------
|
|
232
|
+
const pluginNetwork = {
|
|
233
|
+
id: "@lionden/plugin-network",
|
|
234
|
+
name: "Network Plugin",
|
|
235
|
+
hookHandlers: {
|
|
236
|
+
config: configHooks,
|
|
237
|
+
},
|
|
238
|
+
tasks: [nodeTask, runTask],
|
|
239
|
+
extendLre(lre) {
|
|
240
|
+
const manager = new NetworkManagerImpl(lre.config);
|
|
241
|
+
lre["network"] = manager;
|
|
242
|
+
// Override the stub namedAccounts: {} with a live getter backed by the manager.
|
|
243
|
+
// This ensures lre.namedAccounts always reflects the current active network.
|
|
244
|
+
Object.defineProperty(lre, "namedAccounts", {
|
|
245
|
+
get: () => manager.getNamedAccounts(),
|
|
246
|
+
enumerable: true,
|
|
247
|
+
configurable: true,
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
export default pluginNetwork;
|
|
252
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,YAAY,EAIZ,SAAS,EACT,IAAI,GACL,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AACH,SAAS,6BAA6B,CAAC,UAAkB;IACvD,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/B,OAAO,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,IA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;QACjE,gFAAgF;QAChF,6EAA6E;QAC7E,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,eAAe,EAAE;YAC1C,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE;YACrC,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lionden/plugin-network",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/sealance-io/lionden.git",
|
|
9
|
+
"directory": "packages/plugin-network"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"!dist/**/*.test.*"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc --build"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@lionden/config": "^0.1.0",
|
|
32
|
+
"@lionden/core": "^0.1.0",
|
|
33
|
+
"@lionden/network": "^0.1.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@lionden/test-internals": "*"
|
|
37
|
+
}
|
|
38
|
+
}
|