@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
54 lines (45 loc) • 1.83 kB
text/typescript
// SPDX-License-Identifier: Apache-2.0
import {Exclude, Expose, Type} from 'class-transformer';
import {DeploymentSchema} from './deployment-schema.js';
import {UserIdentitySchema} from '../common/user-identity-schema.js';
import {SemanticVersion} from '../../../../business/utils/semantic-version.js';
import {ApplicationVersionsSchema} from '../common/application-versions-schema.js';
import {type ClusterReferences} from '../../../../types/index.js';
()
export class LocalConfigSchema {
public static readonly SCHEMA_VERSION: SemanticVersion<number> = new SemanticVersion(1);
public static readonly EMPTY: LocalConfigSchema = new LocalConfigSchema(
LocalConfigSchema.SCHEMA_VERSION.major,
new ApplicationVersionsSchema(),
[],
new Map<string, string>(),
new UserIdentitySchema(),
);
()
public schemaVersion: number;
()
((): typeof ApplicationVersionsSchema => ApplicationVersionsSchema)
public versions: ApplicationVersionsSchema;
()
((): typeof UserIdentitySchema => UserIdentitySchema)
public userIdentity: UserIdentitySchema;
()
((): typeof DeploymentSchema => DeploymentSchema)
public deployments: DeploymentSchema[];
()
((): MapConstructor => Map)
public clusterRefs: ClusterReferences;
public constructor(
schemaVersion?: number,
versions?: ApplicationVersionsSchema,
deployments?: DeploymentSchema[],
clusterReferences?: ClusterReferences,
userIdentity?: UserIdentitySchema,
) {
this.schemaVersion = schemaVersion ?? 1;
this.versions = versions ?? new ApplicationVersionsSchema();
this.deployments = deployments ?? [];
this.clusterRefs = clusterReferences ?? new Map<string, string>();
this.userIdentity = userIdentity ?? new UserIdentitySchema();
}
}