11/*
2- Copyright 2023-2024 API Testing Authors.
2+ Copyright 2023-2025 API Testing Authors.
33
44Licensed under the Apache License, Version 2.0 (the "License");
55you may not use this file except in compliance with the License.
@@ -28,6 +28,30 @@ export interface Store {
2828 params : Pair [ ] ;
2929}
3030
31+ const ExtensionKindGit = "atest-store-git"
32+ const ExtensionKindS3 = "atest-store-s3"
33+ const ExtensionKindORM = "atest-store-orm"
34+ const ExtensionKindIotDB = "atest-store-iotdb"
35+ const ExtensionKindCassandra = "atest-store-cassandra"
36+ const ExtensionKindEtcd = "atest-store-etcd"
37+ const ExtensionKindRedis = "atest-store-redis"
38+ const ExtensionKindMongoDB = "atest-store-mongodb"
39+ const ExtensionKindElasticsearch = "atest-store-elasticsearch"
40+ const ExtensionKindOpengeMini = "atest-store-opengemini"
41+
42+ export const ExtensionKind = {
43+ ExtensionKindGit,
44+ ExtensionKindS3,
45+ ExtensionKindORM,
46+ ExtensionKindIotDB,
47+ ExtensionKindCassandra,
48+ ExtensionKindEtcd,
49+ ExtensionKindRedis,
50+ ExtensionKindMongoDB,
51+ ExtensionKindElasticsearch,
52+ ExtensionKindOpengeMini
53+ }
54+
3155const MySQL = "mysql" ;
3256const Postgres = "postgres" ;
3357const SQLite = "sqlite" ;
@@ -50,10 +74,13 @@ export const Driver = {
5074
5175export async function SupportedExtensions ( ) {
5276 const kinds = await API . GetStoreKinds ( )
53- return kinds . data
77+ if ( kinds ) {
78+ return kinds . data
79+ }
80+ return [ ]
5481}
5582
5683export async function SupportedExtension ( name : string ) {
5784 const storeExtensions = await SupportedExtensions ( )
58- return storeExtensions . find ( e => e . name === name )
85+ return storeExtensions . find ( ( e : Store ) => e . name === name )
5986}
0 commit comments