@gooddata/code-cli 0.50.0-alpha.4 → 0.50.0-alpha.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/index.js +126 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37370,7 +37370,7 @@ function isPromise(value) {
|
|
|
37370
37370
|
//#endregion
|
|
37371
37371
|
//#region package.json
|
|
37372
37372
|
var name$1 = "@gooddata/code-cli";
|
|
37373
|
-
var version$1 = "0.50.0-alpha.
|
|
37373
|
+
var version$1 = "0.50.0-alpha.5";
|
|
37374
37374
|
//#endregion
|
|
37375
37375
|
//#region ../../../common/temp/aac/node_modules/.pnpm/vscode-languageserver@8.1.0/node_modules/vscode-languageserver/lib/common/utils/is.js
|
|
37376
37376
|
var require_is$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -102913,6 +102913,7 @@ var CoreErrorCode;
|
|
|
102913
102913
|
CoreErrorCode["MultipleCommonDateFilters"] = "core.multipleCommonDateFilters";
|
|
102914
102914
|
CoreErrorCode["DuplicateFilterLocalIdentifier"] = "core.duplicateFilterLocalIdentifier";
|
|
102915
102915
|
CoreErrorCode["DuplicateTabIdentifier"] = "core.duplicateTabIdentifier";
|
|
102916
|
+
CoreErrorCode["InvalidIanaTimezoneId"] = "core.invalidIanaTimezoneId";
|
|
102916
102917
|
CoreErrorCode["MissingDataSourceId"] = "core.missingDataSourceId";
|
|
102917
102918
|
CoreErrorCode["NonExistingRemoteReference"] = "core.nonExistingRemoteReference";
|
|
102918
102919
|
CoreErrorCode["NonExistingRemoteReferences"] = "core.nonExistingRemoteReferences";
|
|
@@ -103006,6 +103007,7 @@ const CoreErrorMessages$1 = {
|
|
|
103006
103007
|
[CoreErrorCode.MultipleCommonDateFilters]: `Multiple usage of common date filters in dashboard. Define exactly one date filter that has no date dataset defined.`,
|
|
103007
103008
|
[CoreErrorCode.DuplicateFilterLocalIdentifier]: `Duplicate filter local identifier "{0}". Each filter must have a unique local identifier across a dashboard tab, including filters in groups.`,
|
|
103008
103009
|
[CoreErrorCode.DuplicateTabIdentifier]: `Duplicate tab identifier "{0}". Each tab must have a unique identifier within the dashboard.`,
|
|
103010
|
+
[CoreErrorCode.InvalidIanaTimezoneId]: `"{0}" is not a valid IANA timezone ID. Use a real timezone such as Europe/Prague or $browserDetected.`,
|
|
103009
103011
|
[CoreErrorCode.MissingDataSourceId]: `Missing data source. Data source must be specified in profile or directly on dataset. Use "data_source" property in profile or "data_source" property in current dataset definition.`,
|
|
103010
103012
|
[CoreErrorCode.SqlIsNotRefreshedFromServer]: `SQL statement not loaded from server and need to be refreshed. Use "Run" button over the SQL statement to force retrieve new definition.`,
|
|
103011
103013
|
[SpecificCoreErrorCode.UniquenessDatasetsId]: `There are more datasets with id "{0}". Use unique names for datasets.`,
|
|
@@ -103084,6 +103086,7 @@ const CoreErrorTypes$1 = {
|
|
|
103084
103086
|
[CoreErrorCode.MultipleCommonDateFilters]: "MultipleCommonDateFilters",
|
|
103085
103087
|
[CoreErrorCode.DuplicateFilterLocalIdentifier]: "DuplicateFilterLocalIdentifier",
|
|
103086
103088
|
[CoreErrorCode.DuplicateTabIdentifier]: "DuplicateTabIdentifier",
|
|
103089
|
+
[CoreErrorCode.InvalidIanaTimezoneId]: "InvalidIanaTimezoneId",
|
|
103087
103090
|
[CoreErrorCode.MissingDataSourceId]: "MissingDataSourceId",
|
|
103088
103091
|
[SpecificCoreErrorCode.UniquenessDatasetsId]: "UniquenessDatasetsId",
|
|
103089
103092
|
[SpecificCoreErrorCode.UniquenessMetricsId]: "UniquenessMetricsId",
|
|
@@ -134833,6 +134836,56 @@ function isAttributeHierarchyReference(obj) {
|
|
|
134833
134836
|
return !isEmpty(obj) && obj.type === "attributeHierarchyReference";
|
|
134834
134837
|
}
|
|
134835
134838
|
//#endregion
|
|
134839
|
+
//#region ../../../sdk/libs/sdk-model/esm/dashboard/dashboard.js
|
|
134840
|
+
/**
|
|
134841
|
+
* Value of {@link IDashboardTimezoneConfig.timezoneId} representing that the effective timezone
|
|
134842
|
+
* should be detected from the viewer's browser at load time. It is not a valid IANA identifier,
|
|
134843
|
+
* so it cannot collide with a real timezone.
|
|
134844
|
+
*
|
|
134845
|
+
* This sentinel is only allowed in the dashboard content ({@link DashboardTimezoneId}). Values
|
|
134846
|
+
* sent to executions or exports must always be concrete IANA IDs — resolve the sentinel first
|
|
134847
|
+
* via {@link resolveTimezoneId}.
|
|
134848
|
+
*
|
|
134849
|
+
* @alpha
|
|
134850
|
+
*/
|
|
134851
|
+
const BROWSER_DETECTED$1 = "$browserDetected";
|
|
134852
|
+
/**
|
|
134853
|
+
* Tests whether the provided timezone value is the {@link BROWSER_DETECTED} sentinel.
|
|
134854
|
+
*
|
|
134855
|
+
* @param timezoneId - timezone value to test
|
|
134856
|
+
* @alpha
|
|
134857
|
+
*/
|
|
134858
|
+
function isBrowserDetectedTimezone$1(timezoneId) {
|
|
134859
|
+
return timezoneId === BROWSER_DETECTED$1;
|
|
134860
|
+
}
|
|
134861
|
+
/**
|
|
134862
|
+
* Tests whether `timezoneId` is a valid IANA timezone identifier according to
|
|
134863
|
+
* the runtime ICU data (via `Intl.DateTimeFormat`). The {@link BROWSER_DETECTED}
|
|
134864
|
+
* sentinel is not a valid IANA ID — use {@link isValidDashboardTimezoneId} for
|
|
134865
|
+
* values stored on the dashboard.
|
|
134866
|
+
*
|
|
134867
|
+
* @param timezoneId - timezone identifier to test
|
|
134868
|
+
* @alpha
|
|
134869
|
+
*/
|
|
134870
|
+
function isValidIanaTimezoneId$1(timezoneId) {
|
|
134871
|
+
try {
|
|
134872
|
+
new Intl.DateTimeFormat(void 0, { timeZone: timezoneId });
|
|
134873
|
+
return true;
|
|
134874
|
+
} catch {
|
|
134875
|
+
return false;
|
|
134876
|
+
}
|
|
134877
|
+
}
|
|
134878
|
+
/**
|
|
134879
|
+
* Tests whether a dashboard timezone value is allowed in dashboard content:
|
|
134880
|
+
* {@link BROWSER_DETECTED}, or a valid IANA timezone ID.
|
|
134881
|
+
*
|
|
134882
|
+
* @param timezoneId - timezone value from the dashboard content
|
|
134883
|
+
* @alpha
|
|
134884
|
+
*/
|
|
134885
|
+
function isValidDashboardTimezoneId$1(timezoneId) {
|
|
134886
|
+
return isBrowserDetectedTimezone$1(timezoneId) || isValidIanaTimezoneId$1(timezoneId);
|
|
134887
|
+
}
|
|
134888
|
+
//#endregion
|
|
134836
134889
|
//#region ../../../sdk/libs/sdk-code-convertors/src/utils/errors.ts
|
|
134837
134890
|
/**
|
|
134838
134891
|
* @public
|
|
@@ -134853,7 +134906,8 @@ const CoreErrorMessages = {
|
|
|
134853
134906
|
["core.duplicateFilterName"]: `Duplicate filter name "{0}". Each filter in a query must have a unique name, including the filters a date filter carries.`,
|
|
134854
134907
|
["core.duplicateLayerIdentifier"]: `Duplicate layer id "{0}". Each layer of a visualisation must have a unique id.`,
|
|
134855
134908
|
["core.duplicateTabIdentifier"]: `Duplicate tab identifier "{0}". Each tab must have a unique identifier within the dashboard.`,
|
|
134856
|
-
["core.tabsAndRootContentMutuallyExclusive"]: `Dashboard "{0}" defines both "tabs" and root-level "sections" or "filters". These are mutually exclusive — keep all content inside tabs or at the root, not both
|
|
134909
|
+
["core.tabsAndRootContentMutuallyExclusive"]: `Dashboard "{0}" defines both "tabs" and root-level "sections" or "filters". These are mutually exclusive — keep all content inside tabs or at the root, not both.`,
|
|
134910
|
+
["core.invalidIanaTimezoneId"]: `"{0}" is not a valid IANA timezone ID. Use a real timezone such as Europe/Prague or $browserDetected.`
|
|
134857
134911
|
};
|
|
134858
134912
|
/**
|
|
134859
134913
|
* @public
|
|
@@ -134874,7 +134928,8 @@ const CoreErrorTypes = {
|
|
|
134874
134928
|
["core.duplicateFilterName"]: "DuplicateFilterName",
|
|
134875
134929
|
["core.duplicateLayerIdentifier"]: "DuplicateLayerIdentifier",
|
|
134876
134930
|
["core.duplicateTabIdentifier"]: "DuplicateTabIdentifier",
|
|
134877
|
-
["core.tabsAndRootContentMutuallyExclusive"]: "TabsAndRootContentMutuallyExclusive"
|
|
134931
|
+
["core.tabsAndRootContentMutuallyExclusive"]: "TabsAndRootContentMutuallyExclusive",
|
|
134932
|
+
["core.invalidIanaTimezoneId"]: "InvalidIanaTimezoneId"
|
|
134878
134933
|
};
|
|
134879
134934
|
/**
|
|
134880
134935
|
* Update error context with new values
|
|
@@ -140797,8 +140852,9 @@ function yamlPluginToDeclarative$1(input) {
|
|
|
140797
140852
|
parameters: serialiseParameters(input.parameters ?? "")
|
|
140798
140853
|
};
|
|
140799
140854
|
}
|
|
140800
|
-
function yamlTimezoneConfigToDeclarative(input) {
|
|
140855
|
+
function yamlTimezoneConfigToDeclarative(input, errorContext) {
|
|
140801
140856
|
if (!input) return;
|
|
140857
|
+
if (input.timezone_id !== void 0 && !isValidDashboardTimezoneId$1(input.timezone_id)) throw newError("core.invalidIanaTimezoneId", [input.timezone_id], updateErrorContext(errorContext, { path: ["timezone_config", "timezone_id"] }));
|
|
140802
140858
|
return {
|
|
140803
140859
|
...input.timezone_id ? { timezoneId: input.timezone_id } : {},
|
|
140804
140860
|
...input.show_timezone_info ? { showTimezoneInfo: input.show_timezone_info } : {},
|
|
@@ -152330,7 +152386,8 @@ const metadata_v1 = {
|
|
|
152330
152386
|
}, {
|
|
152331
152387
|
"type": "string",
|
|
152332
152388
|
"pattern": "^[A-Za-z][A-Za-z0-9_+.-]*(?:/[A-Za-z0-9_+.-]+)*$"
|
|
152333
|
-
}]
|
|
152389
|
+
}],
|
|
152390
|
+
"$semantic": { "type": "iana_timezone" }
|
|
152334
152391
|
},
|
|
152335
152392
|
"widget": {
|
|
152336
152393
|
"title": "Widget",
|
|
@@ -156647,6 +156704,56 @@ function movePosition$2(fullDocument, point, position) {
|
|
|
156647
156704
|
};
|
|
156648
156705
|
}
|
|
156649
156706
|
//#endregion
|
|
156707
|
+
//#region ../../../sdk/libs/sdk-model/src/dashboard/dashboard.ts
|
|
156708
|
+
/**
|
|
156709
|
+
* Value of {@link IDashboardTimezoneConfig.timezoneId} representing that the effective timezone
|
|
156710
|
+
* should be detected from the viewer's browser at load time. It is not a valid IANA identifier,
|
|
156711
|
+
* so it cannot collide with a real timezone.
|
|
156712
|
+
*
|
|
156713
|
+
* This sentinel is only allowed in the dashboard content ({@link DashboardTimezoneId}). Values
|
|
156714
|
+
* sent to executions or exports must always be concrete IANA IDs — resolve the sentinel first
|
|
156715
|
+
* via {@link resolveTimezoneId}.
|
|
156716
|
+
*
|
|
156717
|
+
* @alpha
|
|
156718
|
+
*/
|
|
156719
|
+
const BROWSER_DETECTED = "$browserDetected";
|
|
156720
|
+
/**
|
|
156721
|
+
* Tests whether the provided timezone value is the {@link BROWSER_DETECTED} sentinel.
|
|
156722
|
+
*
|
|
156723
|
+
* @param timezoneId - timezone value to test
|
|
156724
|
+
* @alpha
|
|
156725
|
+
*/
|
|
156726
|
+
function isBrowserDetectedTimezone(timezoneId) {
|
|
156727
|
+
return timezoneId === BROWSER_DETECTED;
|
|
156728
|
+
}
|
|
156729
|
+
/**
|
|
156730
|
+
* Tests whether `timezoneId` is a valid IANA timezone identifier according to
|
|
156731
|
+
* the runtime ICU data (via `Intl.DateTimeFormat`). The {@link BROWSER_DETECTED}
|
|
156732
|
+
* sentinel is not a valid IANA ID — use {@link isValidDashboardTimezoneId} for
|
|
156733
|
+
* values stored on the dashboard.
|
|
156734
|
+
*
|
|
156735
|
+
* @param timezoneId - timezone identifier to test
|
|
156736
|
+
* @alpha
|
|
156737
|
+
*/
|
|
156738
|
+
function isValidIanaTimezoneId(timezoneId) {
|
|
156739
|
+
try {
|
|
156740
|
+
new Intl.DateTimeFormat(void 0, { timeZone: timezoneId });
|
|
156741
|
+
return true;
|
|
156742
|
+
} catch {
|
|
156743
|
+
return false;
|
|
156744
|
+
}
|
|
156745
|
+
}
|
|
156746
|
+
/**
|
|
156747
|
+
* Tests whether a dashboard timezone value is allowed in dashboard content:
|
|
156748
|
+
* {@link BROWSER_DETECTED}, or a valid IANA timezone ID.
|
|
156749
|
+
*
|
|
156750
|
+
* @param timezoneId - timezone value from the dashboard content
|
|
156751
|
+
* @alpha
|
|
156752
|
+
*/
|
|
156753
|
+
function isValidDashboardTimezoneId(timezoneId) {
|
|
156754
|
+
return isBrowserDetectedTimezone(timezoneId) || isValidIanaTimezoneId(timezoneId);
|
|
156755
|
+
}
|
|
156756
|
+
//#endregion
|
|
156650
156757
|
//#region ../code/esm/store/textDocument/update.js
|
|
156651
156758
|
var ContentChangeMode;
|
|
156652
156759
|
(function(ContentChangeMode) {
|
|
@@ -156806,6 +156913,7 @@ async function validateYamlSemantic(state, resolvedReferences, textDocument, sch
|
|
|
156806
156913
|
results.push(validateYamlSemanticForRequiredCommonDate(resolvedReferences, schemas, schema, root, node));
|
|
156807
156914
|
results.push(validateYamlSemanticForUniqueFilterLocalIdentifiers(schemas, schema, node));
|
|
156808
156915
|
results.push(validateYamlSemanticForUniqueTabIdentifiers(schemas, schema, node));
|
|
156916
|
+
results.push(validateYamlSemanticForIanaTimezone(schemas, schema, node));
|
|
156809
156917
|
return mergeSchemaValidatorDiagnostics(diagnostics, ...results);
|
|
156810
156918
|
}
|
|
156811
156919
|
async function validateYamlSemanticForMaql(state, resolvedReferences, textDocument, schema, root, node) {
|
|
@@ -157159,6 +157267,16 @@ function validateYamlSemanticForUniqueTabIdentifiers(schemas, schema, node) {
|
|
|
157159
157267
|
return currentDiagnostics;
|
|
157160
157268
|
}));
|
|
157161
157269
|
}
|
|
157270
|
+
function validateYamlSemanticForIanaTimezone(schemas, schema, node) {
|
|
157271
|
+
return mergeSchemaValidatorDiagnostics(...getSemanticItems(schema.$semantic).map((semantic) => {
|
|
157272
|
+
const currentDiagnostics = createSchemaValidatorDiagnostics([]);
|
|
157273
|
+
if (semantic.type === "iana_timezone" && node.position) {
|
|
157274
|
+
const value = getNodeValue(node);
|
|
157275
|
+
if (typeof value === "string" && value.length > 0 && !isValidDashboardTimezoneId(value)) currentDiagnostics.diagnostics.push(createDiagnostic$1(SchemaDiagnosticSeverity.Error, node.position, getSchemaArray(schemas, schema), CoreErrorCode.InvalidIanaTimezoneId, CoreErrorMessages$1[CoreErrorCode.InvalidIanaTimezoneId], [value]));
|
|
157276
|
+
}
|
|
157277
|
+
return currentDiagnostics;
|
|
157278
|
+
}));
|
|
157279
|
+
}
|
|
157162
157280
|
function hasConnectedField(property, semantic) {
|
|
157163
157281
|
if (semantic?.connectedField) {
|
|
157164
157282
|
const nodeValue = getNodeValue(getPropertyValueNode(property));
|
|
@@ -159560,6 +159678,7 @@ function referencesFindYamlByType(references, document, parents, nodeItem, seman
|
|
|
159560
159678
|
case "required_data_source":
|
|
159561
159679
|
case "unique_filter_local_identifiers":
|
|
159562
159680
|
case "unique_tab_identifiers":
|
|
159681
|
+
case "iana_timezone":
|
|
159563
159682
|
case void 0: return [];
|
|
159564
159683
|
default: assertUnreachable$1(semanticItem.type);
|
|
159565
159684
|
}
|
|
@@ -160680,7 +160799,7 @@ async function open(state, emitter, file) {
|
|
|
160680
160799
|
//#endregion
|
|
160681
160800
|
//#region ../code/package.json
|
|
160682
160801
|
var name = "@gooddata/code";
|
|
160683
|
-
var version = "0.50.0-alpha.
|
|
160802
|
+
var version = "0.50.0-alpha.5";
|
|
160684
160803
|
//#endregion
|
|
160685
160804
|
//#region ../../../sdk/libs/api-client-tiger/src/axios.ts
|
|
160686
160805
|
/**
|
|
@@ -160702,7 +160821,7 @@ const _CONFIG = {
|
|
|
160702
160821
|
common: {
|
|
160703
160822
|
"X-Requested-With": "XMLHttpRequest",
|
|
160704
160823
|
"X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
|
|
160705
|
-
"X-GDC-JS-PACKAGE-VERSION": "11.54.0-alpha.
|
|
160824
|
+
"X-GDC-JS-PACKAGE-VERSION": "11.54.0-alpha.5"
|
|
160706
160825
|
},
|
|
160707
160826
|
post: { "Content-Type": "application/json;charset=utf8" },
|
|
160708
160827
|
put: { "Content-Type": "application/json;charset=utf8" }
|