refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
60
dev/env/node_modules/ethers/src.ts/utils/properties.ts
generated
vendored
Executable file
60
dev/env/node_modules/ethers/src.ts/utils/properties.ts
generated
vendored
Executable file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Property helper functions.
|
||||
*
|
||||
* @_subsection api/utils:Properties [about-properties]
|
||||
*/
|
||||
|
||||
function checkType(value: any, type: string, name: string): void {
|
||||
const types = type.split("|").map(t => t.trim());
|
||||
for (let i = 0; i < types.length; i++) {
|
||||
switch (type) {
|
||||
case "any":
|
||||
return;
|
||||
case "bigint":
|
||||
case "boolean":
|
||||
case "number":
|
||||
case "string":
|
||||
if (typeof(value) === type) { return; }
|
||||
}
|
||||
}
|
||||
|
||||
const error: any = new Error(`invalid value for type ${ type }`);
|
||||
error.code = "INVALID_ARGUMENT";
|
||||
error.argument = `value.${ name }`;
|
||||
error.value = value;
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves to a new object that is a copy of %%value%%, but with all
|
||||
* values resolved.
|
||||
*/
|
||||
export async function resolveProperties<T>(value: { [ P in keyof T ]: T[P] | Promise<T[P]>}): Promise<T> {
|
||||
const keys = Object.keys(value);
|
||||
const results = await Promise.all(keys.map((k) => Promise.resolve(value[<keyof T>k])));
|
||||
return results.reduce((accum: any, v, index) => {
|
||||
accum[keys[index]] = v;
|
||||
return accum;
|
||||
}, <{ [ P in keyof T]: T[P] }>{ });
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns the %%values%% to %%target%% as read-only values.
|
||||
*
|
||||
* It %%types%% is specified, the values are checked.
|
||||
*/
|
||||
export function defineProperties<T>(
|
||||
target: T,
|
||||
values: { [ K in keyof T ]?: T[K] },
|
||||
types?: { [ K in keyof T ]?: string }): void {
|
||||
|
||||
for (let key in values) {
|
||||
let value = values[key];
|
||||
|
||||
const type = (types ? types[key]: null);
|
||||
if (type) { checkType(value, type, key); }
|
||||
|
||||
Object.defineProperty(target, key, { enumerable: true, value, writable: false });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user