@subql/common-algorand
Advanced tools
Comparing version 4.0.0 to 4.0.1-0
@@ -8,3 +8,8 @@ # Changelog | ||
## [Unreleased] | ||
### Removed | ||
- `apiKey` option from network config, please use endpoint config and specify the `X-Indexer-API-Token` header instead (#130) | ||
### Added | ||
- Suport for network endpoint config providing the ability to set headers (#130) | ||
## [4.0.0] - 2024-07-03 | ||
@@ -11,0 +16,0 @@ ### Added |
@@ -5,2 +5,1 @@ import { AlgorandDataSource } from '@subql/types-algorand'; | ||
export type IAlgorandProjectManifest = IProjectManifest<AlgorandDataSource>; | ||
export type TokenHeader = Record<string, string>; |
@@ -1,5 +0,5 @@ | ||
import { SecondLayerHandlerProcessor, AlgorandCustomDataSource, AlgorandDataSource, AlgorandHandlerKind, AlgorandRuntimeDataSource } from '@subql/types-algorand'; | ||
export declare function isBlockHandlerProcessor<F extends Record<string, unknown>, E>(hp: SecondLayerHandlerProcessor<AlgorandHandlerKind, F, unknown>): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Block, F, E>; | ||
export declare function isTransactionHandlerProcessor<F extends Record<string, unknown>, E>(hp: SecondLayerHandlerProcessor<AlgorandHandlerKind, F, unknown>): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Transaction, F, E>; | ||
import { SecondLayerHandlerProcessorArray, SecondLayerHandlerProcessor, AlgorandCustomDataSource, AlgorandDataSource, AlgorandHandlerKind, AlgorandRuntimeDataSource } from '@subql/types-algorand'; | ||
export declare function isBlockHandlerProcessor<F extends Record<string, unknown>, E>(hp: SecondLayerHandlerProcessorArray<AlgorandHandlerKind, F, unknown>): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Block, F, E>; | ||
export declare function isTransactionHandlerProcessor<F extends Record<string, unknown>, E>(hp: SecondLayerHandlerProcessorArray<AlgorandHandlerKind, F, unknown>): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Transaction, F, E>; | ||
export declare function isCustomDs(ds: AlgorandDataSource): ds is AlgorandCustomDataSource<string>; | ||
export declare function isRuntimeDs(ds: AlgorandDataSource): ds is AlgorandRuntimeDataSource; |
@@ -19,3 +19,3 @@ import { AlgorandDataSource } from '@subql/types-algorand'; | ||
get asV1_0_0(): ProjectManifestV1_0_0Impl; | ||
toDeployment(): string | undefined; | ||
toDeployment(): string; | ||
validate(): void; | ||
@@ -25,5 +25,5 @@ get dataSources(): AlgorandDataSource[]; | ||
get specVersion(): string; | ||
get description(): string; | ||
get repository(): string; | ||
get description(): string | undefined; | ||
get repository(): string | undefined; | ||
} | ||
export {}; |
@@ -5,3 +5,2 @@ import { BaseDeploymentV1_0_0, FileType, ProjectManifestBaseImpl, CommonProjectNetworkV1_0_0 } from '@subql/common'; | ||
import { CustomDataSourceBase, RuntimeDataSourceBase } from '../../models'; | ||
import { TokenHeader } from '../../types'; | ||
export declare class AlgorandRunnerNodeImpl implements NodeSpec { | ||
@@ -20,3 +19,2 @@ name: string; | ||
export declare class ProjectNetworkV1_0_0 extends CommonProjectNetworkV1_0_0<FileType> { | ||
apiKey?: string | TokenHeader; | ||
} | ||
@@ -23,0 +21,0 @@ export declare class AlgorandRuntimeDataSourceV1_0_0Impl extends RuntimeDataSourceBase { |
@@ -23,3 +23,2 @@ "use strict"; | ||
const models_1 = require("../../models"); | ||
const is_string_or_object_validation_1 = require("../../validation/is-string-or-object.validation"); | ||
const ALGORAND_NODE_NAME = `@subql/node-algorand`; | ||
@@ -72,9 +71,3 @@ class AlgorandRunnerNodeImpl { | ||
class ProjectNetworkV1_0_0 extends common_1.CommonProjectNetworkV1_0_0 { | ||
apiKey; | ||
} | ||
__decorate([ | ||
(0, is_string_or_object_validation_1.IsStringOrObject)(), | ||
(0, class_validator_1.IsOptional)(), | ||
__metadata("design:type", Object) | ||
], ProjectNetworkV1_0_0.prototype, "apiKey", void 0); | ||
exports.ProjectNetworkV1_0_0 = ProjectNetworkV1_0_0; | ||
@@ -81,0 +74,0 @@ class AlgorandRuntimeDataSourceV1_0_0Impl extends models_1.RuntimeDataSourceBase { |
{ | ||
"name": "@subql/common-algorand", | ||
"version": "4.0.0", | ||
"version": "4.0.1-0", | ||
"description": "", | ||
@@ -17,4 +17,4 @@ "scripts": { | ||
"dependencies": { | ||
"@subql/common": "^4.0.0", | ||
"@subql/types-algorand": "3.4.0" | ||
"@subql/common": "^5.0.0", | ||
"@subql/types-algorand": "3.4.1-0" | ||
}, | ||
@@ -32,3 +32,4 @@ "peerDependencies": { | ||
"@types/semver": "^7" | ||
} | ||
}, | ||
"stableVersion": "4.0.0" | ||
} |
@@ -98,6 +98,6 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
@IsEnum(AlgorandHandlerKind, {groups: [AlgorandHandlerKind.Block]}) | ||
kind: AlgorandHandlerKind.Block; | ||
kind!: AlgorandHandlerKind.Block; | ||
@IsString() | ||
handler: string; | ||
handler!: string; | ||
@@ -117,6 +117,6 @@ @IsOptional() | ||
@IsEnum(AlgorandHandlerKind, {groups: [AlgorandHandlerKind.Block]}) | ||
kind: AlgorandHandlerKind.Transaction; | ||
kind!: AlgorandHandlerKind.Transaction; | ||
@IsString() | ||
handler: string; | ||
handler!: string; | ||
} | ||
@@ -126,6 +126,6 @@ | ||
@IsString() | ||
kind: string; | ||
kind!: string; | ||
@IsString() | ||
handler: string; | ||
handler!: string; | ||
@@ -153,6 +153,6 @@ @IsObject() | ||
@ValidateNested() | ||
handlers: AlgorandRuntimeHandler[]; | ||
handlers!: AlgorandRuntimeHandler[]; | ||
@IsString() | ||
file: string; | ||
file!: string; | ||
} | ||
@@ -164,6 +164,6 @@ | ||
@ValidateNested() | ||
handlers: CustomHandler[]; | ||
handlers!: CustomHandler[]; | ||
@IsString() | ||
file: string; | ||
file!: string; | ||
} | ||
@@ -173,7 +173,7 @@ | ||
@IsEnum(AlgorandDataSourceKind, {groups: [AlgorandDataSourceKind.Runtime]}) | ||
kind: AlgorandDataSourceKind.Runtime; | ||
kind!: AlgorandDataSourceKind.Runtime; | ||
@Type(() => RuntimeMapping) | ||
@ValidateNested() | ||
mapping: RuntimeMapping; | ||
mapping!: RuntimeMapping; | ||
} | ||
@@ -183,3 +183,3 @@ | ||
@IsString() | ||
file: string; | ||
file!: string; | ||
} | ||
@@ -192,15 +192,15 @@ | ||
@IsString() | ||
kind: K; | ||
kind!: K; | ||
@Type(() => CustomMapping) | ||
@ValidateNested() | ||
mapping: M; | ||
mapping!: M; | ||
@Type(() => FileReferenceImpl) | ||
@ValidateNested({each: true}) | ||
assets: Map<string, AlgorandCustomDataSourceAsset>; | ||
assets!: Map<string, AlgorandCustomDataSourceAsset>; | ||
@Type(() => ProcessorImpl) | ||
@IsObject() | ||
processor: Processor<O>; | ||
processor!: Processor<O>; | ||
} |
@@ -23,2 +23,1 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
export type IAlgorandProjectManifest = IProjectManifest<AlgorandDataSource>; | ||
export type TokenHeader = Record<string, string>; |
@@ -5,2 +5,3 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
import { | ||
SecondLayerHandlerProcessorArray, | ||
SecondLayerHandlerProcessor, | ||
@@ -15,3 +16,3 @@ AlgorandCustomDataSource, | ||
export function isBlockHandlerProcessor<F extends Record<string, unknown>, E>( | ||
hp: SecondLayerHandlerProcessor<AlgorandHandlerKind, F, unknown> | ||
hp: SecondLayerHandlerProcessorArray<AlgorandHandlerKind, F, unknown> | ||
): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Block, F, E> { | ||
@@ -22,3 +23,3 @@ return hp.baseHandlerKind === AlgorandHandlerKind.Block; | ||
export function isTransactionHandlerProcessor<F extends Record<string, unknown>, E>( | ||
hp: SecondLayerHandlerProcessor<AlgorandHandlerKind, F, unknown> | ||
hp: SecondLayerHandlerProcessorArray<AlgorandHandlerKind, F, unknown> | ||
): hp is SecondLayerHandlerProcessor<AlgorandHandlerKind.Transaction, F, E> { | ||
@@ -25,0 +26,0 @@ return hp.baseHandlerKind === AlgorandHandlerKind.Transaction; |
@@ -45,3 +45,3 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
toDeployment(): string | undefined { | ||
toDeployment(): string { | ||
return this._impl.deployment.toYaml(); | ||
@@ -66,9 +66,9 @@ } | ||
get description(): string { | ||
get description(): string | undefined { | ||
return this._impl.description; | ||
} | ||
get repository(): string { | ||
get repository(): string | undefined { | ||
return this._impl.repository; | ||
} | ||
} |
@@ -26,4 +26,2 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors | ||
import {CustomDataSourceBase, RuntimeDataSourceBase} from '../../models'; | ||
import {TokenHeader} from '../../types'; | ||
import {IsStringOrObject} from '../../validation/is-string-or-object.validation'; | ||
const ALGORAND_NODE_NAME = `@subql/node-algorand`; | ||
@@ -33,3 +31,3 @@ | ||
@Equals(ALGORAND_NODE_NAME, {message: `Runner algorand node name incorrect, suppose be '${ALGORAND_NODE_NAME}'`}) | ||
name: string; | ||
name!: string; | ||
@@ -45,3 +43,3 @@ @IsString() | ||
@Type(() => AlgorandRunnerNodeImpl) | ||
node: NodeSpec; | ||
node!: NodeSpec; | ||
@@ -51,3 +49,3 @@ @IsObject() | ||
@Type(() => RunnerQueryBaseModel) | ||
query: QuerySpec; | ||
query!: QuerySpec; | ||
} | ||
@@ -57,3 +55,3 @@ | ||
@IsString() | ||
chainId: string; | ||
chainId!: string; | ||
@IsOptional() | ||
@@ -64,7 +62,3 @@ @IsArray() | ||
export class ProjectNetworkV1_0_0 extends CommonProjectNetworkV1_0_0<FileType> { | ||
@IsStringOrObject() | ||
@IsOptional() | ||
apiKey?: string | TokenHeader; | ||
} | ||
export class ProjectNetworkV1_0_0 extends CommonProjectNetworkV1_0_0<FileType> {} | ||
@@ -94,3 +88,3 @@ export class AlgorandRuntimeDataSourceV1_0_0Impl extends RuntimeDataSourceBase { | ||
@IsString() | ||
name: string; | ||
name!: string; | ||
} | ||
@@ -103,3 +97,3 @@ | ||
@IsString() | ||
name: string; | ||
name!: string; | ||
} | ||
@@ -116,7 +110,7 @@ | ||
@Type(() => ProjectNetworkDeploymentV1_0_0) | ||
network: ProjectNetworkDeploymentV1_0_0; | ||
network!: ProjectNetworkDeploymentV1_0_0; | ||
@IsObject() | ||
@ValidateNested() | ||
@Type(() => AlgorandRunnerSpecsImpl) | ||
runner: RunnerSpecs; | ||
runner!: RunnerSpecs; | ||
@@ -132,3 +126,3 @@ @IsArray() | ||
}) | ||
dataSources: (AlgorandCustomDataSource | AlgorandRuntimeDataSource)[]; | ||
dataSources!: (AlgorandCustomDataSource | AlgorandRuntimeDataSource)[]; | ||
@IsOptional() | ||
@@ -159,6 +153,6 @@ @IsArray() | ||
@IsString() | ||
name: string; | ||
name!: string; | ||
@IsString() | ||
version: string; | ||
version!: string; | ||
@@ -168,7 +162,7 @@ @IsObject() | ||
@Type(() => ProjectNetworkV1_0_0) | ||
network: ProjectNetworkV1_0_0; | ||
network!: ProjectNetworkV1_0_0; | ||
@ValidateNested() | ||
@Type(() => FileType) | ||
schema: FileType; | ||
schema!: FileType; | ||
@@ -184,3 +178,3 @@ @IsArray() | ||
}) | ||
dataSources: (AlgorandRuntimeDataSource | AlgorandCustomDataSource)[]; | ||
dataSources!: (AlgorandRuntimeDataSource | AlgorandCustomDataSource)[]; | ||
@@ -202,3 +196,3 @@ @IsOptional() | ||
@Type(() => AlgorandRunnerSpecsImpl) | ||
runner: RunnerSpecs; | ||
runner!: RunnerSpecs; | ||
@@ -205,0 +199,0 @@ @IsOptional() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
239548
1391
2
+ Added@subql/common@5.3.1(transitive)
+ Added@subql/types-algorand@3.4.1-0(transitive)
+ Added@subql/types-core@1.1.12.0.1(transitive)
- Removed@subql/common@4.1.1(transitive)
- Removed@subql/types-algorand@3.4.0(transitive)
- Removed@subql/types-core@0.10.00.9.1(transitive)
- Removedfs-extra@10.1.0(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedpackage-json-type@1.0.3(transitive)
- Removeduniversalify@2.0.1(transitive)
Updated@subql/common@^5.0.0