@gooddata/code-cli 0.53.0-alpha.4 → 0.53.0-alpha.6
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/NOTICE +32782 -32782
- package/dist/index.js +34 -33
- 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.53.0-alpha.
|
|
37373
|
+
var version$1 = "0.53.0-alpha.6";
|
|
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) => {
|
|
@@ -87230,10 +87230,37 @@ var require_dist$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
87230
87230
|
exports.visitAsync = visit.visitAsync;
|
|
87231
87231
|
}));
|
|
87232
87232
|
//#endregion
|
|
87233
|
-
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/
|
|
87233
|
+
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/maqlObjectTypes.js
|
|
87234
87234
|
var import_main$1 = require_main();
|
|
87235
87235
|
var import_out = require_out();
|
|
87236
87236
|
var import_dist$7 = /* @__PURE__ */ __toESM(require_dist$7(), 1);
|
|
87237
|
+
/**
|
|
87238
|
+
* MAQL spells the computed-attribute object type with an underscore (`{computed_attribute/id}`),
|
|
87239
|
+
* while the Tiger entity type it maps onto is camelCase (`computedAttribute`). Every other MAQL
|
|
87240
|
+
* object type is spelled the same on both sides, so this is the only bridge the two need.
|
|
87241
|
+
*/
|
|
87242
|
+
const MAQL_OBJECT_TYPE_TO_TIGER_TYPE = { computed_attribute: "computedAttribute" };
|
|
87243
|
+
const TIGER_TYPE_TO_MAQL_OBJECT_TYPE = Object.fromEntries(Object.entries(MAQL_OBJECT_TYPE_TO_TIGER_TYPE).map(([maqlType, tigerType]) => [tigerType, maqlType]));
|
|
87244
|
+
/**
|
|
87245
|
+
* Translates an object type as written in MAQL into the Tiger entity type it denotes. Types that
|
|
87246
|
+
* are spelled identically on both sides are returned unchanged, so this is safe to apply to any
|
|
87247
|
+
* `{type/id}` token before looking the type up.
|
|
87248
|
+
*
|
|
87249
|
+
* Keep the MAQL spelling for anything user-facing (diagnostics quote what the author wrote).
|
|
87250
|
+
*/
|
|
87251
|
+
function normalizeMaqlObjectType(maqlObjectType) {
|
|
87252
|
+
return MAQL_OBJECT_TYPE_TO_TIGER_TYPE[maqlObjectType] ?? maqlObjectType;
|
|
87253
|
+
}
|
|
87254
|
+
/**
|
|
87255
|
+
* Translates a Tiger entity type into the way MAQL spells it. Use it whenever a `{type/id}`
|
|
87256
|
+
* reference is written back into MAQL text - a catalog object carries the Tiger type, which the
|
|
87257
|
+
* parser would reject for computed attributes.
|
|
87258
|
+
*/
|
|
87259
|
+
function toMaqlObjectType(tigerType) {
|
|
87260
|
+
return TIGER_TYPE_TO_MAQL_OBJECT_TYPE[tigerType] ?? tigerType;
|
|
87261
|
+
}
|
|
87262
|
+
//#endregion
|
|
87263
|
+
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/tokenRanges.js
|
|
87237
87264
|
function isMaqlObject(obj) {
|
|
87238
87265
|
return "actualType" in obj;
|
|
87239
87266
|
}
|
|
@@ -87331,9 +87358,10 @@ var LabelContext = class {
|
|
|
87331
87358
|
});
|
|
87332
87359
|
return this;
|
|
87333
87360
|
}
|
|
87334
|
-
addLabel(
|
|
87361
|
+
addLabel(maqlType, id, range, _space) {
|
|
87362
|
+
const type = normalizeMaqlObjectType(maqlType);
|
|
87335
87363
|
if (!isTigerType(type)) return this;
|
|
87336
|
-
if (type === "attribute" || type === "label") this.labels.push({
|
|
87364
|
+
if (type === "attribute" || type === "label" || type === "computedAttribute") this.labels.push({
|
|
87337
87365
|
actualType: type,
|
|
87338
87366
|
tigerType: type,
|
|
87339
87367
|
id,
|
|
@@ -87465,33 +87493,6 @@ var LabelElementsFinder = class extends LabelContextMarker {
|
|
|
87465
87493
|
}
|
|
87466
87494
|
};
|
|
87467
87495
|
//#endregion
|
|
87468
|
-
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/maqlObjectTypes.js
|
|
87469
|
-
/**
|
|
87470
|
-
* MAQL spells the computed-attribute object type with an underscore (`{computed_attribute/id}`),
|
|
87471
|
-
* while the Tiger entity type it maps onto is camelCase (`computedAttribute`). Every other MAQL
|
|
87472
|
-
* object type is spelled the same on both sides, so this is the only bridge the two need.
|
|
87473
|
-
*/
|
|
87474
|
-
const MAQL_OBJECT_TYPE_TO_TIGER_TYPE = { computed_attribute: "computedAttribute" };
|
|
87475
|
-
const TIGER_TYPE_TO_MAQL_OBJECT_TYPE = Object.fromEntries(Object.entries(MAQL_OBJECT_TYPE_TO_TIGER_TYPE).map(([maqlType, tigerType]) => [tigerType, maqlType]));
|
|
87476
|
-
/**
|
|
87477
|
-
* Translates an object type as written in MAQL into the Tiger entity type it denotes. Types that
|
|
87478
|
-
* are spelled identically on both sides are returned unchanged, so this is safe to apply to any
|
|
87479
|
-
* `{type/id}` token before looking the type up.
|
|
87480
|
-
*
|
|
87481
|
-
* Keep the MAQL spelling for anything user-facing (diagnostics quote what the author wrote).
|
|
87482
|
-
*/
|
|
87483
|
-
function normalizeMaqlObjectType(maqlObjectType) {
|
|
87484
|
-
return MAQL_OBJECT_TYPE_TO_TIGER_TYPE[maqlObjectType] ?? maqlObjectType;
|
|
87485
|
-
}
|
|
87486
|
-
/**
|
|
87487
|
-
* Translates a Tiger entity type into the way MAQL spells it. Use it whenever a `{type/id}`
|
|
87488
|
-
* reference is written back into MAQL text - a catalog object carries the Tiger type, which the
|
|
87489
|
-
* parser would reject for computed attributes.
|
|
87490
|
-
*/
|
|
87491
|
-
function toMaqlObjectType(tigerType) {
|
|
87492
|
-
return TIGER_TYPE_TO_MAQL_OBJECT_TYPE[tigerType] ?? tigerType;
|
|
87493
|
-
}
|
|
87494
|
-
//#endregion
|
|
87495
87496
|
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/metadata/parameters.js
|
|
87496
87497
|
const { escapeString: escapeString$1 } = import_dist$7.default;
|
|
87497
87498
|
function parameterTypeLabel(definition) {
|
|
@@ -161751,7 +161752,7 @@ async function open(state, emitter, file) {
|
|
|
161751
161752
|
//#endregion
|
|
161752
161753
|
//#region ../code/package.json
|
|
161753
161754
|
var name = "@gooddata/code";
|
|
161754
|
-
var version = "0.53.0-alpha.
|
|
161755
|
+
var version = "0.53.0-alpha.6";
|
|
161755
161756
|
//#endregion
|
|
161756
161757
|
//#region ../../../sdk/libs/api-client-tiger/src/axios.ts
|
|
161757
161758
|
/**
|
|
@@ -161773,7 +161774,7 @@ const _CONFIG = {
|
|
|
161773
161774
|
common: {
|
|
161774
161775
|
"X-Requested-With": "XMLHttpRequest",
|
|
161775
161776
|
"X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
|
|
161776
|
-
"X-GDC-JS-PACKAGE-VERSION": "11.57.0-alpha.
|
|
161777
|
+
"X-GDC-JS-PACKAGE-VERSION": "11.57.0-alpha.6"
|
|
161777
161778
|
},
|
|
161778
161779
|
post: { "Content-Type": "application/json;charset=utf8" },
|
|
161779
161780
|
put: { "Content-Type": "application/json;charset=utf8" }
|