@finos/legend-server-depot
Advanced tools
Comparing version 0.0.9 to 0.0.10
# @finos/legend-server-depot | ||
## 0.0.10 | ||
## 0.0.9 | ||
@@ -4,0 +6,0 @@ |
@@ -24,4 +24,6 @@ /** | ||
serverUrl: string; | ||
TEMP__useLegacyDepotServerAPIRoutes?: boolean | undefined; | ||
} | ||
export declare class DepotServerClient extends AbstractServerClient { | ||
private TEMP__useLegacyDepotServerAPIRoutes; | ||
constructor(config: DepotServerClientConfig); | ||
@@ -28,0 +30,0 @@ private _projects; |
@@ -18,2 +18,3 @@ /** | ||
export class DepotServerClient extends AbstractServerClient { | ||
TEMP__useLegacyDepotServerAPIRoutes = false; | ||
constructor(config) { | ||
@@ -23,2 +24,3 @@ super({ | ||
}); | ||
this.TEMP__useLegacyDepotServerAPIRoutes = Boolean(config.TEMP__useLegacyDepotServerAPIRoutes); | ||
} | ||
@@ -39,6 +41,8 @@ // ------------------------------------------- Projects ------------------------------------------- | ||
// NOTE: this is experimental API to get elements by classifier path | ||
getEntitiesByClassifierPath = (classifierPath, options) => this.get(`${this.networkClient.baseUrl}/entitiesByClassifierPath/${encodeURIComponent(classifierPath)}`, undefined, undefined, { | ||
search: options?.search, | ||
limit: options?.limit, | ||
}); | ||
getEntitiesByClassifierPath = (classifierPath, options) => this.TEMP__useLegacyDepotServerAPIRoutes | ||
? this.get(`${this.networkClient.baseUrl}/classifiers/${encodeURIComponent(classifierPath)}`, undefined, undefined) | ||
: this.get(`${this.networkClient.baseUrl}/entitiesByClassifierPath/${encodeURIComponent(classifierPath)}`, undefined, undefined, { | ||
search: options?.search, | ||
limit: options?.limit, | ||
}); | ||
// ------------------------------------------- Dependencies ------------------------------------------- | ||
@@ -45,0 +49,0 @@ getDependencyEntities = (groupId, artifactId, versionId, |
{ | ||
"name": "@finos/legend-server-depot", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Legend Depot server client", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@finos/legend-dev-utils": "0.1.0", | ||
"@finos/legend-dev-utils": "0.1.1", | ||
"cross-env": "7.0.3", | ||
@@ -49,0 +49,0 @@ "eslint": "8.1.0", |
@@ -29,5 +29,8 @@ /** | ||
serverUrl: string; | ||
TEMP__useLegacyDepotServerAPIRoutes?: boolean | undefined; | ||
} | ||
export class DepotServerClient extends AbstractServerClient { | ||
private TEMP__useLegacyDepotServerAPIRoutes = false; | ||
constructor(config: DepotServerClientConfig) { | ||
@@ -37,2 +40,5 @@ super({ | ||
}); | ||
this.TEMP__useLegacyDepotServerAPIRoutes = Boolean( | ||
config.TEMP__useLegacyDepotServerAPIRoutes, | ||
); | ||
} | ||
@@ -94,13 +100,21 @@ | ||
): Promise<PlainObject<StoredEntity>[]> => | ||
this.get( | ||
`${ | ||
this.networkClient.baseUrl | ||
}/entitiesByClassifierPath/${encodeURIComponent(classifierPath)}`, | ||
undefined, | ||
undefined, | ||
{ | ||
search: options?.search, | ||
limit: options?.limit, | ||
}, | ||
); | ||
this.TEMP__useLegacyDepotServerAPIRoutes | ||
? this.get( | ||
`${this.networkClient.baseUrl}/classifiers/${encodeURIComponent( | ||
classifierPath, | ||
)}`, | ||
undefined, | ||
undefined, | ||
) | ||
: this.get( | ||
`${ | ||
this.networkClient.baseUrl | ||
}/entitiesByClassifierPath/${encodeURIComponent(classifierPath)}`, | ||
undefined, | ||
undefined, | ||
{ | ||
search: options?.search, | ||
limit: options?.limit, | ||
}, | ||
); | ||
@@ -107,0 +121,0 @@ // ------------------------------------------- Dependencies ------------------------------------------- |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
63012
951