@gooddata/code-cli 0.43.0-alpha.0 → 0.43.0-alpha.1
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 +24 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37366,7 +37366,7 @@ function isPromise(value) {
|
|
|
37366
37366
|
//#endregion
|
|
37367
37367
|
//#region package.json
|
|
37368
37368
|
var name$1 = "@gooddata/code-cli";
|
|
37369
|
-
var version$1 = "0.43.0-alpha.
|
|
37369
|
+
var version$1 = "0.43.0-alpha.1";
|
|
37370
37370
|
//#endregion
|
|
37371
37371
|
//#region ../code/esm/features/references/types.js
|
|
37372
37372
|
var UpdateReferencesType;
|
|
@@ -145474,6 +145474,17 @@ var LabelElementsFinder = class extends LabelContextMarker {
|
|
|
145474
145474
|
}
|
|
145475
145475
|
};
|
|
145476
145476
|
//#endregion
|
|
145477
|
+
//#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
|
|
145478
|
+
function parameterTypeLabel(definition) {
|
|
145479
|
+
return definition.type.toLowerCase();
|
|
145480
|
+
}
|
|
145481
|
+
function parameterDefaultLabel(definition) {
|
|
145482
|
+
return JSON.stringify(definition.defaultValue);
|
|
145483
|
+
}
|
|
145484
|
+
function parameterSummary(definition) {
|
|
145485
|
+
return `${parameterTypeLabel(definition)}, default: ${parameterDefaultLabel(definition)}`;
|
|
145486
|
+
}
|
|
145487
|
+
//#endregion
|
|
145477
145488
|
//#region ../../../common/temp/aac/node_modules/.pnpm/gdc-maql-language-server@file+..+..+..+libs+gdc-maql-language-server/node_modules/gdc-maql-language-server/esm/parseMaql.js
|
|
145478
145489
|
var import_antlr4ts = require_antlr4ts();
|
|
145479
145490
|
const { CaseInsensitiveCharStream, MaqlAstVisitor, MaqlLexer: MaqlLexer$3, MaqlParser: MaqlParser$5 } = import_dist.default;
|
|
@@ -146990,7 +147001,7 @@ function completeNumeric(ldmObjects, range, allowedTypes) {
|
|
|
146990
147001
|
return items;
|
|
146991
147002
|
}
|
|
146992
147003
|
function completeParameter(ldmObjects, range, allowedTypes) {
|
|
146993
|
-
return ldmObjects.get("parameter").filter((parameter) => allowedTypes.some((type) => isSubtype(parameterMaqlType(parameter.definition), type))).map((obj) =>
|
|
147004
|
+
return ldmObjects.get("parameter").filter((parameter) => allowedTypes.some((type) => isSubtype(parameterMaqlType(parameter.definition), type))).map((obj) => createParameterCompletionItem(obj, range));
|
|
146994
147005
|
}
|
|
146995
147006
|
function parameterMaqlType(definition) {
|
|
146996
147007
|
switch (definition.type) {
|
|
@@ -146998,6 +147009,14 @@ function parameterMaqlType(definition) {
|
|
|
146998
147009
|
case "STRING": return MaqlType.STRING;
|
|
146999
147010
|
}
|
|
147000
147011
|
}
|
|
147012
|
+
function createParameterCompletionItem(parameter, range) {
|
|
147013
|
+
const item = createMetadataCompletionItem(parameter, range);
|
|
147014
|
+
return {
|
|
147015
|
+
...item,
|
|
147016
|
+
labelDetails: { description: parameterTypeLabel(parameter.definition) },
|
|
147017
|
+
detail: `${item.detail}, Default: ${parameterDefaultLabel(parameter.definition)}`
|
|
147018
|
+
};
|
|
147019
|
+
}
|
|
147001
147020
|
const preferredRules = new Set([
|
|
147002
147021
|
MaqlParser.RULE_attribute,
|
|
147003
147022
|
MaqlParser.RULE_numeric,
|
|
@@ -151233,7 +151252,7 @@ function markdownObjectContent(object) {
|
|
|
151233
151252
|
lines.push(`## ${object.title}`);
|
|
151234
151253
|
if (object.description && object.description.length > 0) lines.push(object.description);
|
|
151235
151254
|
if (isITigerMetric(object)) lines.push("```maql", object.expression, "```", `format: ${object.format}`);
|
|
151236
|
-
if (isITigerParameter(object)) lines.push(
|
|
151255
|
+
if (isITigerParameter(object)) lines.push(`Parameter (${parameterSummary(object.definition)})`);
|
|
151237
151256
|
return lines.join("\n");
|
|
151238
151257
|
}
|
|
151239
151258
|
function objectContent(object) {
|
|
@@ -151386,7 +151405,7 @@ const _CONFIG = {
|
|
|
151386
151405
|
common: {
|
|
151387
151406
|
"X-Requested-With": "XMLHttpRequest",
|
|
151388
151407
|
"X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
|
|
151389
|
-
"X-GDC-JS-PACKAGE-VERSION": "11.47.0-alpha.
|
|
151408
|
+
"X-GDC-JS-PACKAGE-VERSION": "11.47.0-alpha.1"
|
|
151390
151409
|
},
|
|
151391
151410
|
post: { "Content-Type": "application/json;charset=utf8" },
|
|
151392
151411
|
put: { "Content-Type": "application/json;charset=utf8" }
|
|
@@ -196980,7 +196999,7 @@ async function get(state, opts) {
|
|
|
196980
196999
|
//#endregion
|
|
196981
197000
|
//#region ../code/package.json
|
|
196982
197001
|
var name = "@gooddata/code";
|
|
196983
|
-
var version = "0.43.0-alpha.
|
|
197002
|
+
var version = "0.43.0-alpha.1";
|
|
196984
197003
|
//#endregion
|
|
196985
197004
|
//#region ../code/esm/actions/initialize.js
|
|
196986
197005
|
async function initialize(state, emitter, options) {
|