@gooddata/sdk-backend-base 11.64.0-alpha.1 → 11.64.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cachingBackend/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAGH,KAAK,kBAAkB,EAuD1B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cachingBackend/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAGH,KAAK,kBAAkB,EAuD1B,MAAM,2BAA2B,CAAC;AAqpGnC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC;;OAEG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,IAAI,CAAC;IAEnC;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IAEjC;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;OAEG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B;;;;;;;;;;;;;;OAcG;IAC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AAC;IAEhC;;;;;;;;;;OAUG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IAEtC;;;;;;;;;;;OAWG;IACH,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAE9C;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;;;;;;;;;;OAYG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;;;;;;;;;;;OAYG;IACH,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAE5C;;;;;;;;;;;;;OAaG;IACH,sCAAsC,CAAC,EAAE,MAAM,CAAC;IAEhD;;;;;;;;;;;;;OAaG;IACH,qCAAqC,CAAC,EAAE,MAAM,CAAC;IAE/C;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AASF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,oBA4B7C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACvB,WAAW,EAAE,kBAAkB,EAC/B,MAAM,EAAE,oBAAoB,GAC7B,kBAAkB,CAoHpB"}
|
|
@@ -5,7 +5,7 @@ import { LRUCache } from "lru-cache";
|
|
|
5
5
|
import SparkMD5 from "spark-md5";
|
|
6
6
|
import { invariant } from "ts-invariant";
|
|
7
7
|
import { isAbortError, } from "@gooddata/sdk-backend-spi";
|
|
8
|
-
import { areObjRefsEqual, geoFeatureId, idRef, isIdentifierRef, isUriRef,
|
|
8
|
+
import { areObjRefsEqual, geoFeatureId, idRef, isIdentifierRef, isUriRef, serializeObjRef, uriRef, } from "@gooddata/sdk-model";
|
|
9
9
|
import { DecoratedWorkspaceAttributesService } from "../decoratedBackend/attributes.js";
|
|
10
10
|
import { DecoratedAutomationsQuery, DecoratedWorkspaceAutomationsService, } from "../decoratedBackend/automations.js";
|
|
11
11
|
import { DecoratedWorkspaceCatalogFactory } from "../decoratedBackend/catalog.js";
|
|
@@ -679,7 +679,9 @@ function firstDefined(arr) {
|
|
|
679
679
|
}
|
|
680
680
|
function elementsCacheKey(ref, settings) {
|
|
681
681
|
const fingerprint = stringify(settings) || "undefined";
|
|
682
|
-
|
|
682
|
+
// The ref is serialized rather than reduced to its identifier: a computed attribute's display form
|
|
683
|
+
// and a label may share an id, and their element lists must not be conflated.
|
|
684
|
+
return new SparkMD5().append(serializeObjRef(ref)).append(fingerprint).end();
|
|
683
685
|
}
|
|
684
686
|
/**
|
|
685
687
|
* Cache key of the complete element list a search over the same elements can be answered from. Paging and the
|
|
@@ -737,7 +739,8 @@ function refCacheKeys(ref) {
|
|
|
737
739
|
* so callers requesting the same set in a different order share the same cache entry.
|
|
738
740
|
*/
|
|
739
741
|
function refSetCacheKey(refs) {
|
|
740
|
-
|
|
742
|
+
// serialized, not reduced to identifiers, so refs of different types sharing an id stay distinct
|
|
743
|
+
const serialized = refs.map(serializeObjRef).sort();
|
|
741
744
|
return new SparkMD5().append(stringify(serialized) || "undefined").end();
|
|
742
745
|
}
|
|
743
746
|
function getOrCreateAttributeCache(ctx, workspace) {
|
|
@@ -1599,7 +1602,7 @@ class WithAutomationsCaching extends DecoratedWorkspaceAutomationsService {
|
|
|
1599
1602
|
//
|
|
1600
1603
|
function insightCacheKey(ref, options) {
|
|
1601
1604
|
const fingerprint = stringify(options ?? {}) || "undefined";
|
|
1602
|
-
return new SparkMD5().append(
|
|
1605
|
+
return new SparkMD5().append(serializeObjRef(ref)).append(fingerprint).end();
|
|
1603
1606
|
}
|
|
1604
1607
|
function getOrCreateInsightsCache(ctx, workspace) {
|
|
1605
1608
|
const cache = ctx.caches.workspaceInsights;
|
|
@@ -74,7 +74,7 @@ export function dummyBackend(config = defaultDummyBackendConfig) {
|
|
|
74
74
|
throw new NotSupported("not supported");
|
|
75
75
|
},
|
|
76
76
|
dataSources() {
|
|
77
|
-
|
|
77
|
+
return dummyDataSourcesService();
|
|
78
78
|
},
|
|
79
79
|
geo() {
|
|
80
80
|
return {
|
|
@@ -352,6 +352,31 @@ function dummyWorkspace(workspace, config, publisherService) {
|
|
|
352
352
|
},
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
+
function dummyDataSourcesService() {
|
|
356
|
+
return {
|
|
357
|
+
getDataSourceIdentifiers: () => Promise.resolve([]),
|
|
358
|
+
getDataSources: () => Promise.resolve([]),
|
|
359
|
+
hasDataSources: () => Promise.resolve(false),
|
|
360
|
+
getDataSource: () => Promise.reject(new NotSupported("not supported")),
|
|
361
|
+
createDataSource: ({ id, name, schema, type }) => Promise.resolve({ id, name, schema, type }),
|
|
362
|
+
updateDataSource: (_id, { id, name, schema, type }) => Promise.resolve({ id, name, schema, type }),
|
|
363
|
+
patchDataSource: () => Promise.reject(new NotSupported("not supported")),
|
|
364
|
+
deleteDataSource: () => Promise.resolve(),
|
|
365
|
+
testConnection: () => Promise.resolve({ successful: true }),
|
|
366
|
+
getSchemata: () => Promise.resolve([]),
|
|
367
|
+
registerUploadNotification: () => Promise.resolve(),
|
|
368
|
+
files: () => ({
|
|
369
|
+
upload: () => Promise.resolve(""),
|
|
370
|
+
analyzeCsv: () => Promise.resolve([]),
|
|
371
|
+
importCsv: () => Promise.resolve([]),
|
|
372
|
+
analyzeSav: () => Promise.resolve([]),
|
|
373
|
+
importSav: () => Promise.resolve([]),
|
|
374
|
+
getFiles: () => Promise.resolve([]),
|
|
375
|
+
deleteFiles: () => Promise.resolve(),
|
|
376
|
+
getCsvManifests: () => Promise.resolve([]),
|
|
377
|
+
}),
|
|
378
|
+
};
|
|
379
|
+
}
|
|
355
380
|
function dummyLocalizationService() {
|
|
356
381
|
return {
|
|
357
382
|
getUsage: () => Promise.resolve({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-base",
|
|
3
|
-
"version": "11.64.0-alpha.
|
|
3
|
+
"version": "11.64.0-alpha.2",
|
|
4
4
|
"description": "GoodData.UI SDK - Base for backend implementations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"ts-invariant": "0.10.3",
|
|
30
30
|
"tslib": "2.8.1",
|
|
31
31
|
"uuid": "11.1.1",
|
|
32
|
-
"@gooddata/sdk-
|
|
33
|
-
"@gooddata/
|
|
34
|
-
"@gooddata/
|
|
32
|
+
"@gooddata/sdk-backend-spi": "11.64.0-alpha.2",
|
|
33
|
+
"@gooddata/sdk-model": "11.64.0-alpha.2",
|
|
34
|
+
"@gooddata/util": "11.64.0-alpha.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@microsoft/api-documenter": "7.30.16",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"oxlint-tsgolint": "7.0.2001",
|
|
55
55
|
"typescript": "7.0.2",
|
|
56
56
|
"vitest": "5.0.4",
|
|
57
|
-
"@gooddata/
|
|
58
|
-
"@gooddata/
|
|
59
|
-
"@gooddata/
|
|
57
|
+
"@gooddata/eslint-config": "11.64.0-alpha.2",
|
|
58
|
+
"@gooddata/reference-workspace": "11.64.0-alpha.2",
|
|
59
|
+
"@gooddata/oxlint-config": "11.64.0-alpha.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"_phase:build": "npm run build",
|