@lightdash/common 3.268.3 → 3.268.5
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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/ee/apps/consumerAccess.d.ts +4 -3
- package/dist/cjs/ee/apps/consumerAccess.d.ts.map +1 -1
- package/dist/cjs/ee/apps/consumerAccess.js +9 -4
- package/dist/cjs/ee/apps/consumerAccess.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/ee/apps/consumerAccess.d.ts +4 -3
- package/dist/esm/ee/apps/consumerAccess.d.ts.map +1 -1
- package/dist/esm/ee/apps/consumerAccess.js +7 -3
- package/dist/esm/ee/apps/consumerAccess.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/ee/apps/consumerAccess.d.ts +4 -3
- package/dist/types/ee/apps/consumerAccess.d.ts.map +1 -1
- package/dist/types/ee/apps/consumerAccess.js +7 -3
- package/dist/types/ee/apps/consumerAccess.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DataReferenceLocation, type GlobalFilterReferenceUnresolvedPart, type PersistedDataAppDataReferences, type QueryReferenceUnresolvedPart } from './dataReferences';
|
|
1
|
+
import { type DataReferenceLocation, type ExtractedQueryReference, type GlobalFilterReferenceUnresolvedPart, type PersistedDataAppDataReferences, type QueryReferenceUnresolvedPart } from './dataReferences';
|
|
2
2
|
/**
|
|
3
3
|
* A place in the app's source whose data access could not be fully read, so
|
|
4
4
|
* users without Explore access cannot run it.
|
|
@@ -15,6 +15,8 @@ export type DataAppConsumerAccessIssue = {
|
|
|
15
15
|
unresolved: GlobalFilterReferenceUnresolvedPart[];
|
|
16
16
|
location: DataReferenceLocation;
|
|
17
17
|
};
|
|
18
|
+
/** Whether a query's fields count towards what consumers may run. */
|
|
19
|
+
export declare const isConsumerRunnableQueryReference: (ref: Pick<ExtractedQueryReference, 'unresolved'>) => boolean;
|
|
18
20
|
export type DataAppConsumerAccessStatus =
|
|
19
21
|
/** Every query in the version can run for consumers. */
|
|
20
22
|
'available'
|
|
@@ -31,8 +33,7 @@ export type DataAppConsumerAccess = {
|
|
|
31
33
|
/**
|
|
32
34
|
* What users without Explore access get from an app version, from the same
|
|
33
35
|
* frozen references their queries are checked against at run time. A
|
|
34
|
-
* reference
|
|
35
|
-
* reported here.
|
|
36
|
+
* reference the allowlist leaves out is reported here.
|
|
36
37
|
*/
|
|
37
38
|
export declare const getDataAppConsumerAccess: (consumerDataReferences: PersistedDataAppDataReferences | null) => DataAppConsumerAccess;
|
|
38
39
|
//# sourceMappingURL=consumerAccess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumerAccess.d.ts","sourceRoot":"","sources":["../../../../src/ee/apps/consumerAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACpC,MAAM,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAChC;IACI,IAAI,EAAE,OAAO,CAAC;IACd,sDAAsD;IACtD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,4BAA4B,EAAE,CAAC;IAC3C,QAAQ,EAAE,qBAAqB,CAAC;CACnC,GACD;IACI,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,mCAAmC,EAAE,CAAC;IAClD,QAAQ,EAAE,qBAAqB,CAAC;CACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"consumerAccess.d.ts","sourceRoot":"","sources":["../../../../src/ee/apps/consumerAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACpC,MAAM,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAChC;IACI,IAAI,EAAE,OAAO,CAAC;IACd,sDAAsD;IACtD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,4BAA4B,EAAE,CAAC;IAC3C,QAAQ,EAAE,qBAAqB,CAAC;CACnC,GACD;IACI,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,mCAAmC,EAAE,CAAC;IAClD,QAAQ,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAOR,qEAAqE;AACrE,eAAO,MAAM,gCAAgC,QACpC,IAAI,CAAC,uBAAuB,EAAE,YAAY,CAAC,KACjD,OACyE,CAAC;AAE7E,MAAM,MAAM,2BAA2B;AACnC,wDAAwD;AACtD,WAAW;AACb,gEAAgE;GAC9D,SAAS;AACX,kEAAkE;GAChE,aAAa,CAAC;AAEpB,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,EAAE,2BAA2B,CAAC;IACpC,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,2BACT,8BAA8B,GAAG,IAAI,KAC9D,qBAwCF,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
// Run-time filter fields are checked against the allowlist one by one, so
|
|
2
|
+
// unread filters grant nothing; every other part must be read in full.
|
|
3
|
+
const UNREAD_PARTS_CONSUMERS_CAN_RUN = new Set(['filters', 'metricFilters']);
|
|
4
|
+
/** Whether a query's fields count towards what consumers may run. */
|
|
5
|
+
export const isConsumerRunnableQueryReference = (ref) => ref.unresolved.every((part) => UNREAD_PARTS_CONSUMERS_CAN_RUN.has(part));
|
|
1
6
|
/**
|
|
2
7
|
* What users without Explore access get from an app version, from the same
|
|
3
8
|
* frozen references their queries are checked against at run time. A
|
|
4
|
-
* reference
|
|
5
|
-
* reported here.
|
|
9
|
+
* reference the allowlist leaves out is reported here.
|
|
6
10
|
*/
|
|
7
11
|
export const getDataAppConsumerAccess = (consumerDataReferences) => {
|
|
8
12
|
if (consumerDataReferences === null) {
|
|
@@ -14,7 +18,7 @@ export const getDataAppConsumerAccess = (consumerDataReferences) => {
|
|
|
14
18
|
for (const ref of consumerDataReferences.references) {
|
|
15
19
|
if (ref.kind === 'query') {
|
|
16
20
|
queryCount += 1;
|
|
17
|
-
if (ref
|
|
21
|
+
if (isConsumerRunnableQueryReference(ref)) {
|
|
18
22
|
runnableQueryCount += 1;
|
|
19
23
|
}
|
|
20
24
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumerAccess.js","sourceRoot":"","sources":["../../../../src/ee/apps/consumerAccess.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consumerAccess.js","sourceRoot":"","sources":["../../../../src/ee/apps/consumerAccess.ts"],"names":[],"mappings":"AA2BA,0EAA0E;AAC1E,uEAAuE;AACvE,MAAM,8BAA8B,GAChC,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;AAE1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC5C,GAAgD,EACzC,EAAE,CACT,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,8BAA8B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAiB7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,sBAA6D,EACxC,EAAE;IACvB,IAAI,sBAAsB,KAAK,IAAI,EAAE,CAAC;QAClC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAChE,CAAC;IACD,MAAM,M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