@gooddata/code-cli 0.63.0 → 0.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.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,6 @@
1
1
  # Change Log - @gooddata/code-cli
2
2
 
3
- This log was last generated on Mon, 02 Nov 2026 10:22:02 GMT and should not be manually modified.
4
-
5
- ## 0.63.0
6
-
7
- Mon, 02 Nov 2026 10:22:02 GMT
8
-
9
- _Version update only_
3
+ This log was last generated on Thu, 29 Oct 2026 14:43:57 GMT and should not be manually modified.
10
4
 
11
5
  ## 0.62.1
12
6
 
package/NOTICE CHANGED
@@ -13,7 +13,7 @@ The following 3rd-party software packages may be used by or distributed with gdc
13
13
 
14
14
  Date generated: 2026-11-2
15
15
 
16
- Revision ID: 2c231ca0ae8c725e09d899e90b385a39c62e6f58
16
+ Revision ID: 9001a1d462cb431babb8fe0d38bf2c318a67b3ff
17
17
 
18
18
  ================================================================================
19
19
  ================================================================================
@@ -270,7 +270,6 @@ Revision ID: 2c231ca0ae8c725e09d899e90b385a39c62e6f58
270
270
  - debounce-promise (3.1.2) [MIT]
271
271
  - debug (4.4.3) [MIT]
272
272
  - decode-named-character-reference (1.3.0) [MIT]
273
- - decode-uri-component (0.5.1) [MIT]
274
273
  - deepmerge-json (1.5.0) [MIT]
275
274
  - default-import (1.1.5) [MIT]
276
275
  - defaults (1.0.4) [MIT]
@@ -325,7 +324,7 @@ Revision ID: 2c231ca0ae8c725e09d899e90b385a39c62e6f58
325
324
  - fast-json-patch (3.1.1) [MIT]
326
325
  - fast-uri (3.1.9) [BSD-3-Clause, bsd-2-clause-views]
327
326
  - figures (5.0.0) [MIT]
328
- - filter-obj (5.1.0) [MIT]
327
+ - filter-obj (6.1.0) [MIT]
329
328
  - finalhandler (2.1.1) [MIT]
330
329
  - find-root (1.1.0) [MIT]
331
330
  - flat (5.0.2) [BSD-3-Clause]
@@ -532,7 +531,7 @@ Revision ID: 2c231ca0ae8c725e09d899e90b385a39c62e6f58
532
531
  - pseudo-localization (2.4.0) [MIT]
533
532
  - punycode.js (2.3.1) [MIT]
534
533
  - qs (6.16.0) [BSD-3-Clause]
535
- - query-string (9.5.1) [MIT]
534
+ - query-string (10.0.0) [MIT]
536
535
  - quickselect (2.0.0) [ISC]
537
536
  - quickselect (3.0.0) [ISC]
538
537
  - railroad-diagrams (1.0.0) [CC0-1.0]
@@ -617,7 +616,7 @@ Revision ID: 2c231ca0ae8c725e09d899e90b385a39c62e6f58
617
616
  - source-map-js (1.2.2) [BSD-3-Clause]
618
617
  - space-separated-tokens (2.0.2) [MIT]
619
618
  - spark-md5 (3.0.2) [Multi-license: WTFPL OR MIT]
620
- - split-on-first (3.0.0) [MIT]
619
+ - split-on-first (4.0.0) [MIT]
621
620
  - sql-formatter (12.2.4) [MIT]
622
621
  - sql-highlight (4.4.2) [MIT]
623
622
  - statuses (2.0.2) [MIT]
@@ -14796,41 +14795,6 @@ SOFTWARE.
14796
14795
  MIT
14797
14796
  - Copyright (c) Titus Wormer <tituswormer@gmail.com>
14798
14797
 
14799
- --------------------------------------------------------------------------------
14800
- Package Title: decode-uri-component (0.5.1)
14801
-
14802
- Package Locator: npm+decode-uri-component$0.5.1
14803
-
14804
- Package Depth: Transitive
14805
- --------------------------------------------------------------------------------
14806
-
14807
- * Declared Licenses *
14808
- MIT
14809
-
14810
- * License Header *
14811
- Copyright (c) 2017 Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)
14812
- Permission is hereby granted, free of charge, to any person obtaining a copy
14813
- of this software and associated documentation files (the "Software"), to deal
14814
- in the Software without restriction, including without limitation the rights
14815
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14816
- copies of the Software, and to permit persons to whom the Software is
14817
- furnished to do so, subject to the following conditions:
14818
-
14819
- The above copyright notice and this permission notice shall be included in all
14820
- copies or substantial portions of the Software.
14821
-
14822
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14823
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14824
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14825
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14826
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
14827
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
14828
- SOFTWARE.
14829
-
14830
- * Copyrights *
14831
- MIT
14832
- - Copyright (c) 2017 Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)
14833
-
14834
14798
  --------------------------------------------------------------------------------
14835
14799
  Package Title: deepmerge-json (1.5.0)
14836
14800
 
@@ -17629,9 +17593,9 @@ MIT
17629
17593
  - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
17630
17594
 
17631
17595
  --------------------------------------------------------------------------------
17632
- Package Title: filter-obj (5.1.0)
17596
+ Package Title: filter-obj (6.1.0)
17633
17597
 
17634
- Package Locator: npm+filter-obj$5.1.0
17598
+ Package Locator: npm+filter-obj$6.1.0
17635
17599
 
17636
17600
  Package Depth: Transitive
17637
17601
  --------------------------------------------------------------------------------
@@ -26865,9 +26829,9 @@ BSD-3-Clause
26865
26829
  - Copyright (c) 2014, Nathan LaFreniere and other
26866
26830
 
26867
26831
  --------------------------------------------------------------------------------
26868
- Package Title: query-string (9.5.1)
26832
+ Package Title: query-string (10.0.0)
26869
26833
 
26870
- Package Locator: npm+query-string$9.5.1
26834
+ Package Locator: npm+query-string$10.0.0
26871
26835
 
26872
26836
  Package Depth: Direct
26873
26837
  --------------------------------------------------------------------------------
@@ -30560,9 +30524,9 @@ The reason to have two licenses is that some entities refuse to use the master l
30560
30524
  bad language. If that's also your case, you can choose the alternative license.
30561
30525
 
30562
30526
  --------------------------------------------------------------------------------
30563
- Package Title: split-on-first (3.0.0)
30527
+ Package Title: split-on-first (4.0.0)
30564
30528
 
30565
- Package Locator: npm+split-on-first$3.0.0
30529
+ Package Locator: npm+split-on-first$4.0.0
30566
30530
 
30567
30531
  Package Depth: Transitive
30568
30532
  --------------------------------------------------------------------------------
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ import https from "https";
26
26
  import http2 from "http2";
27
27
  import zlib from "zlib";
28
28
  import * as fs from "node:fs";
29
- import { readFileSync as readFileSync$1 } from "node:fs";
29
+ import { constants, readFileSync as readFileSync$1 } from "node:fs";
30
30
  import * as fsPromise from "node:fs/promises";
31
31
  import { lstat, readdir, realpath, stat } from "node:fs/promises";
32
32
  import * as util$1 from "node:util";
@@ -37445,7 +37445,7 @@ function isPromise(value) {
37445
37445
  //#endregion
37446
37446
  //#region package.json
37447
37447
  var name$1 = "@gooddata/code-cli";
37448
- var version$1 = "0.63.0";
37448
+ var version$1 = "0.64.0-alpha.2";
37449
37449
  //#endregion
37450
37450
  //#region ../../../common/temp/aac/node_modules/.pnpm/@gooddata+sdk-maql-language-server@file+..+..+..+sdk+libs+sdk-maql-language-server_debug@4.4.3/node_modules/@gooddata/sdk-maql-language-server/esm/docs/en/docs/create-metrics/maql/aggregation/approximate_count.js
37451
37451
  const content$65 = `# APPROXIMATE_COUNT
@@ -117738,7 +117738,7 @@ const _CONFIG$1 = {
117738
117738
  common: {
117739
117739
  "X-Requested-With": "XMLHttpRequest",
117740
117740
  "X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
117741
- "X-GDC-JS-PACKAGE-VERSION": "11.66.0"
117741
+ "X-GDC-JS-PACKAGE-VERSION": "11.67.0-alpha.2"
117742
117742
  },
117743
117743
  post: { "Content-Type": "application/json;charset=utf8" },
117744
117744
  put: { "Content-Type": "application/json;charset=utf8" }
@@ -163891,7 +163891,7 @@ function declarativeDashboardToYaml(entities, dashboard, filterContexts, context
163891
163891
  if (content.disableUserFilterReset) doc.add(entryWithSpace("user_filters_reset", false));
163892
163892
  if (content.disableUserFilterSave) doc.add(entryWithSpace("user_filters_save", false));
163893
163893
  if (content.disableFilterViews) doc.add(entryWithSpace("filter_views", false));
163894
- if (content.disablePersistentFiltersAcrossTabs) doc.add(entryWithSpace("persistent_filters_across_tabs", false));
163894
+ if (typeof content.enablePersistentFiltersAcrossTabs === "boolean") doc.add(entryWithSpace("persistent_filters_across_tabs", content.enablePersistentFiltersAcrossTabs));
163895
163895
  if (content.timezoneConfig) doc.add(entryWithSpace("timezone_config", declarativeTimezoneConfigToYaml(content.timezoneConfig)));
163896
163896
  const hasMultipleTabs = content.tabs && content.tabs.length > 1;
163897
163897
  const hasSingleTabWithTitle = content.tabs?.length === 1 && content.tabs[0].title;
@@ -164638,7 +164638,7 @@ function yamlDashboardToDeclarative(entities, input) {
164638
164638
  ...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
164639
164639
  ...input.user_filters_reset === false ? { disableUserFilterReset: true } : {},
164640
164640
  ...input.filter_views === false ? { disableFilterViews: true } : {},
164641
- ...input.persistent_filters_across_tabs === false ? { disablePersistentFiltersAcrossTabs: true } : {}
164641
+ ...typeof input.persistent_filters_across_tabs === "boolean" ? { enablePersistentFiltersAcrossTabs: input.persistent_filters_across_tabs } : {}
164642
164642
  } : {
164643
164643
  version: "2",
164644
164644
  layout,
@@ -164653,7 +164653,7 @@ function yamlDashboardToDeclarative(entities, input) {
164653
164653
  ...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
164654
164654
  ...input.user_filters_reset === false ? { disableUserFilterReset: true } : {},
164655
164655
  ...input.filter_views === false ? { disableFilterViews: true } : {},
164656
- ...input.persistent_filters_across_tabs === false ? { disablePersistentFiltersAcrossTabs: true } : {},
164656
+ ...typeof input.persistent_filters_across_tabs === "boolean" ? { enablePersistentFiltersAcrossTabs: input.persistent_filters_across_tabs } : {},
164657
164657
  filterContextRef: filterContext ? createIdentifier(filterContext.id, { forceType: "filterContext" }) : void 0
164658
164658
  };
164659
164659
  return {
@@ -169656,7 +169656,7 @@ function yamlAbsoluteDateFilterToDeclarative(entities, filter, assignFilterLocal
169656
169656
  dataSet: createIdentifier(filter.using, { forceType: "dataset" }),
169657
169657
  from: filter.from,
169658
169658
  to: filter.to,
169659
- ...dateFilterEmptyValueHandling(filter)
169659
+ ...dateFilterEmptyValueHandling$1(filter)
169660
169660
  } }] };
169661
169661
  result = mergeDeclarativeResults(result, dateFilterWithFieldToDeclarative(entities, filter, assignFilterLocalId));
169662
169662
  return result;
@@ -169666,7 +169666,7 @@ function yamlAbsoluteDateFilterToDeclarative(entities, filter, assignFilterLocal
169666
169666
  * before carried the mode as a separate attribute filter on the single empty string value instead; that
169667
169667
  * representation is still read (see `processConnectedAttributeFilters`), never written.
169668
169668
  */
169669
- function dateFilterEmptyValueHandling(filter) {
169669
+ function dateFilterEmptyValueHandling$1(filter) {
169670
169670
  const { empty_values } = filter;
169671
169671
  return empty_values === "include" || empty_values === "exclude" || empty_values === "only" ? { emptyValueHandling: empty_values } : {};
169672
169672
  }
@@ -169686,14 +169686,14 @@ function yamlRelativeDateFilterToDeclarative(entities, filter, assignFilterLocal
169686
169686
  granularity: convertGranularity$1(filter.granularity),
169687
169687
  from: filter.from,
169688
169688
  to: filter.to,
169689
- ...dateFilterEmptyValueHandling(filter)
169689
+ ...dateFilterEmptyValueHandling$1(filter)
169690
169690
  } }] });
169691
169691
  else if (filter.empty_values) result = mergeDeclarativeResults(result, { filters: [{ relativeDateFilter: {
169692
169692
  dataSet: identifier,
169693
169693
  granularity: "ALL_TIME_GRANULARITY",
169694
169694
  from: 0,
169695
169695
  to: 0,
169696
- ...dateFilterEmptyValueHandling(filter)
169696
+ ...dateFilterEmptyValueHandling$1(filter)
169697
169697
  } }] });
169698
169698
  else result = mergeDeclarativeResults(result, { filters: [{ relativeDateFilter: {
169699
169699
  dataSet: identifier,
@@ -170085,6 +170085,42 @@ function yamlAttributeHierarchyToDeclarative(input) {
170085
170085
  };
170086
170086
  }
170087
170087
  //#endregion
170088
+ //#region ../../../common/temp/aac/node_modules/.pnpm/@gooddata+sdk-code-convertors@file+..+..+..+sdk+libs+sdk-code-convertors_debug@4.4.3/node_modules/@gooddata/sdk-code-convertors/esm/to/yamlDocumentsToDeclarativeWorkspace.js
170089
+ /**
170090
+ * Converts the entities of one workspace to its declarative model and stores the declarative form
170091
+ * of each entity in its `declarative` property.
170092
+ *
170093
+ * @internal
170094
+ */
170095
+ function yamlEntitiesToDeclarativeWorkspace(entities, { dataSourceId } = {}) {
170096
+ const convert = (types, toDeclarative) => entities.filter((entity) => types.includes(entity.type)).map((entity) => {
170097
+ const declarative = toDeclarative(entity.data);
170098
+ entity.declarative = declarative;
170099
+ return declarative;
170100
+ });
170101
+ const dashboards = convert(DashboardTypes$1, (dashboard) => yamlDashboardToDeclarative(entities, dashboard));
170102
+ return {
170103
+ ldm: {
170104
+ datasets: convert(DatasetTypes$2, (dataset) => yamlDatasetToDeclarative(entities, dataset, dataSourceId)),
170105
+ dateInstances: convert(DateDatasetTypes$2, yamlDateDatesetToDeclarative)
170106
+ },
170107
+ analytics: {
170108
+ metrics: convert(MetricTypes$1, yamlMetricToDeclarative),
170109
+ parameters: convert(ParameterTypes$1, yamlParameterToDeclarative),
170110
+ computedAttributes: convert(ComputedAttributeTypes$1, yamlComputedAttributeToDeclarative),
170111
+ visualizationObjects: convert(VisualisationsTypes, (visualisation) => yamlVisualisationToDeclarative(entities, visualisation)),
170112
+ analyticalDashboards: dashboards.map(({ dashboard }) => dashboard),
170113
+ filterContexts: dashboards.flatMap(dashboardFilterContexts),
170114
+ dashboardPlugins: convert(PluginTypes$1, yamlPluginToDeclarative),
170115
+ attributeHierarchies: convert(AttributeHierarchyTypes$1, yamlAttributeHierarchyToDeclarative)
170116
+ }
170117
+ };
170118
+ }
170119
+ function dashboardFilterContexts({ filterContext, tabFilterContexts = [] }) {
170120
+ const contexts = filterContext ? [filterContext, ...tabFilterContexts] : tabFilterContexts;
170121
+ return contexts.filter((context, index) => contexts.findIndex(({ id }) => id === context.id) === index);
170122
+ }
170123
+ //#endregion
170088
170124
  //#region ../../../common/temp/aac/node_modules/.pnpm/@gooddata+sdk-code-convertors@file+..+..+..+sdk+libs+sdk-code-convertors_debug@4.4.3/node_modules/@gooddata/sdk-code-convertors/esm/from/declarativeDatasetToYaml.js
170089
170125
  function processDeclarativeLabel(dataset, label, tablesMap, profile) {
170090
170126
  const map = new import_dist$5.YAMLMap();
@@ -171682,6 +171718,20 @@ function buildDimensions(query, execution) {
171682
171718
  sorting
171683
171719
  };
171684
171720
  }
171721
+ /**
171722
+ * `empty_values` is the date filter's own mode; the AFM spells it in upper case.
171723
+ */
171724
+ function dateFilterEmptyValueHandling(filter) {
171725
+ const { empty_values } = filter;
171726
+ return empty_values === "include" || empty_values === "exclude" || empty_values === "only" ? { emptyValueHandling: empty_values.toUpperCase() } : {};
171727
+ }
171728
+ /**
171729
+ * Converts AaC `filter_by` into AFM filters for the query preview.
171730
+ *
171731
+ * sdk-backend-tiger's `convertFilter` converts the equivalent model filters for a stored insight. When
171732
+ * you add or change a date filter property here, change it there too, and extend
171733
+ * `AacFilterParity.test.ts` in sdk-backend-tiger, which fails if the two diverge.
171734
+ */
171685
171735
  function buildFilters(entities, filters_by) {
171686
171736
  if (!filters_by) return [];
171687
171737
  const filters = [];
@@ -171690,13 +171740,20 @@ function buildFilters(entities, filters_by) {
171690
171740
  if (isAbsoluteDateFilter$1(filter)) filters.push({ absoluteDateFilter: {
171691
171741
  dataset: createIdentifier(filter.using, { forceType: "dataset" }),
171692
171742
  from: filter.from,
171693
- to: filter.to
171743
+ to: filter.to,
171744
+ ...dateFilterEmptyValueHandling(filter)
171694
171745
  } });
171695
- if (isRelativeDateFilter$1(filter)) filters.push({ relativeDateFilter: {
171746
+ if (isAllTimeDateFilter$1(filter)) {
171747
+ if (filter.empty_values === "exclude" || filter.empty_values === "only") filters.push({ allTimeDateFilter: {
171748
+ dataset: createIdentifier(filter.using, { forceType: "dataset" }),
171749
+ ...dateFilterEmptyValueHandling(filter)
171750
+ } });
171751
+ } else if (isRelativeDateFilter$1(filter)) filters.push({ relativeDateFilter: {
171696
171752
  dataset: createIdentifier(filter.using, { forceType: "dataset" }),
171697
171753
  granularity: filter.granularity ?? void 0,
171698
171754
  from: filter.from,
171699
- to: filter.to
171755
+ to: filter.to,
171756
+ ...dateFilterEmptyValueHandling(filter)
171700
171757
  } });
171701
171758
  if (isPositiveAttributeFilter(filter)) filters.push({ positiveAttributeFilter: {
171702
171759
  label: createIdentifier(filter.using),
@@ -193053,7 +193110,7 @@ const metadata_v1 = {
193053
193110
  },
193054
193111
  "persistent_filters_across_tabs": {
193055
193112
  "type": "boolean",
193056
- "description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
193113
+ "description": "Whether persistent filters across tabs are enabled for this dashboard. When omitted, the setting is off."
193057
193114
  },
193058
193115
  "timezone_config": {
193059
193116
  "$ref": "#/$defs/timezoneConfig",
@@ -200040,7 +200097,7 @@ const metadata_v1 = {
200040
200097
  },
200041
200098
  "persistent_filters_across_tabs": {
200042
200099
  "type": "boolean",
200043
- "description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
200100
+ "description": "Whether persistent filters across tabs are enabled for this dashboard. When omitted, the setting is off."
200044
200101
  },
200045
200102
  "timezone_config": {
200046
200103
  "$ref": "#/$defs/timezoneConfig",
@@ -209648,7 +209705,7 @@ async function open(state, emitter, file) {
209648
209705
  //#endregion
209649
209706
  //#region ../code/package.json
209650
209707
  var name = "@gooddata/code";
209651
- var version = "0.63.0";
209708
+ var version = "0.64.0-alpha.2";
209652
209709
  //#endregion
209653
209710
  //#region ../code/esm/services/server/client.js
209654
209711
  function getApiClient$1(profile, { packageName, packageVersion }) {
@@ -215301,9 +215358,8 @@ function initializeServices(state, options) {
215301
215358
  async function toDeclarative(store, basePath, profile, { experimentalFeatures: _experimentalFeatures = {}, ...restOpts } = {}) {
215302
215359
  const { mode, related } = asDefaultFileMode(restOpts);
215303
215360
  const entities = loadAllEntities(getRoots(store.memory, mode, related ?? false), basePath);
215304
- const { ws } = createDeclarativeWorkspaceModel(entities, profile);
215305
215361
  return {
215306
- ws,
215362
+ ws: yamlEntitiesToDeclarativeWorkspace(entities, { dataSourceId: profile.data_source }),
215307
215363
  entities
215308
215364
  };
215309
215365
  }
@@ -215333,75 +215389,6 @@ function loadAllEntities(roots, basePath) {
215333
215389
  }
215334
215390
  return entitiesPerRoot.flat();
215335
215391
  }
215336
- function createDeclarativeWorkspaceModel(entities, profile) {
215337
- const ws = {
215338
- ldm: {},
215339
- analytics: {}
215340
- };
215341
- const datasetsEntities = entities.filter((e) => DatasetTypes$2.includes(e.type)).map((data) => {
215342
- data.declarative = yamlDatasetToDeclarative(entities, data.data, profile.data_source);
215343
- return data;
215344
- });
215345
- ws.ldm.datasets = datasetsEntities.map((d) => d.declarative);
215346
- const dateInstancesEntities = entities.filter((e) => DateDatasetTypes$2.includes(e.type)).map((data) => {
215347
- data.declarative = yamlDateDatesetToDeclarative(data.data);
215348
- return data;
215349
- });
215350
- ws.ldm.dateInstances = dateInstancesEntities.map((d) => d.declarative);
215351
- const metricsEntities = entities.filter((e) => MetricTypes$1.includes(e.type)).map((data) => {
215352
- data.declarative = yamlMetricToDeclarative(data.data);
215353
- return data;
215354
- });
215355
- ws.analytics.metrics = metricsEntities.map((d) => d.declarative);
215356
- const parameterEntities = entities.filter((e) => ParameterTypes$1.includes(e.type)).map((data) => {
215357
- data.declarative = yamlParameterToDeclarative(data.data);
215358
- return data;
215359
- });
215360
- ws.analytics.parameters = parameterEntities.map((d) => d.declarative);
215361
- const computedAttributesEntities = entities.filter((e) => ComputedAttributeTypes$1.includes(e.type)).map((data) => {
215362
- data.declarative = yamlComputedAttributeToDeclarative(data.data);
215363
- return data;
215364
- });
215365
- ws.analytics.computedAttributes = computedAttributesEntities.map((d) => d.declarative);
215366
- const visualisationsEntities = entities.filter((e) => VisualisationsTypes.includes(e.type)).map((data) => {
215367
- data.declarative = yamlVisualisationToDeclarative(entities, data.data);
215368
- return data;
215369
- });
215370
- ws.analytics.visualizationObjects = visualisationsEntities.map((d) => d.declarative);
215371
- const dashboardEntities = entities.filter((e) => DashboardTypes$1.includes(e.type)).map((data) => {
215372
- data.declarative = yamlDashboardToDeclarative(entities, data.data);
215373
- return data;
215374
- });
215375
- ws.analytics.analyticalDashboards = dashboardEntities.map((d) => d.declarative.dashboard);
215376
- ws.analytics.filterContexts = dashboardEntities.flatMap((d) => {
215377
- const declarative = d.declarative;
215378
- const seen = /* @__PURE__ */ new Set();
215379
- const result = [];
215380
- if (declarative.filterContext) {
215381
- result.push(declarative.filterContext);
215382
- seen.add(declarative.filterContext.id);
215383
- }
215384
- for (const fc of declarative.tabFilterContexts ?? []) if (!seen.has(fc.id)) {
215385
- result.push(fc);
215386
- seen.add(fc.id);
215387
- }
215388
- return result;
215389
- });
215390
- const pluginEntities = entities.filter((e) => PluginTypes$1.includes(e.type)).map((data) => {
215391
- data.declarative = yamlPluginToDeclarative(data.data);
215392
- return data;
215393
- });
215394
- ws.analytics.dashboardPlugins = pluginEntities.map((d) => d.declarative);
215395
- const attributeHierarchyEntities = entities.filter((e) => AttributeHierarchyTypes$1.includes(e.type)).map((data) => {
215396
- data.declarative = yamlAttributeHierarchyToDeclarative(data.data);
215397
- return data;
215398
- });
215399
- ws.analytics.attributeHierarchies = attributeHierarchyEntities.map((d) => d.declarative);
215400
- return {
215401
- ws,
215402
- entities
215403
- };
215404
- }
215405
215392
  function getRoots(memNode, mode, related) {
215406
215393
  switch (mode) {
215407
215394
  case "physical": return [findPhysical(memNode) || createPhysicalNode()];
@@ -237180,7 +237167,7 @@ const _CONFIG = {
237180
237167
  common: {
237181
237168
  "X-Requested-With": "XMLHttpRequest",
237182
237169
  "X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
237183
- "X-GDC-JS-PACKAGE-VERSION": "11.66.0"
237170
+ "X-GDC-JS-PACKAGE-VERSION": "11.67.0-alpha.2"
237184
237171
  },
237185
237172
  post: { "Content-Type": "application/json;charset=utf8" },
237186
237173
  put: { "Content-Type": "application/json;charset=utf8" }
@@ -274916,6 +274903,26 @@ async function compileManifest(state) {
274916
274903
  }
274917
274904
  return manifestYaml;
274918
274905
  }
274906
+ async function appendPrivateFile(filePath, data) {
274907
+ const { O_APPEND, O_CREAT, O_WRONLY, O_NOFOLLOW, O_NONBLOCK } = constants;
274908
+ if (O_NOFOLLOW === void 0) {
274909
+ if ((await fsPromise.lstat(filePath).catch((e) => {
274910
+ if (e.code === "ENOENT") return;
274911
+ throw e;
274912
+ }))?.isSymbolicLink()) throw new Error(`"${filePath}" is a symbolic link`);
274913
+ }
274914
+ const flags = O_APPEND | O_CREAT | O_WRONLY | (O_NOFOLLOW ?? 0) | (O_NONBLOCK ?? 0);
274915
+ const handle = await fsPromise.open(filePath, flags, 384);
274916
+ try {
274917
+ const stats = await handle.stat();
274918
+ if (!stats.isFile()) throw new Error(`"${filePath}" is not a regular file`);
274919
+ if (typeof process.getuid === "function" && stats.uid !== process.getuid()) throw new Error(`"${filePath}" is not owned by the current user`);
274920
+ if ((stats.mode & 63) !== 0) await handle.chmod(384);
274921
+ await handle.appendFile(data);
274922
+ } finally {
274923
+ await handle.close();
274924
+ }
274925
+ }
274919
274926
  async function saveManifest(state, manifestYaml) {
274920
274927
  const manifestPath = path$3.resolve(process.cwd(), manifestFileNames[0]);
274921
274928
  debug(texts.cmd__init__debug__manifest__path(manifestPath));
@@ -274925,7 +274932,7 @@ async function saveManifest(state, manifestYaml) {
274925
274932
  throw new Error([texts.cmd__init__manifest__write__error(manifestPath), e.message].join("\n"));
274926
274933
  }
274927
274934
  if (state.env?.path && ["created", "updated"].includes(state.env.status)) try {
274928
- await fsPromise.appendFile(state.env.path, `${state.env.status === "updated" ? os$1.EOL : ""}${state.token?.variable}="${state.token?.raw}"`, { flag: "a+" });
274935
+ await appendPrivateFile(state.env.path, `${state.env.status === "updated" ? os$1.EOL : ""}${state.token?.variable}="${state.token?.raw}"`);
274929
274936
  } catch (e) {
274930
274937
  throw new Error([texts.cmd__init__env__write__error(state.env.path), e.message].join("\n"));
274931
274938
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/code-cli",
3
- "version": "0.63.0",
3
+ "version": "0.64.0-alpha.2",
4
4
  "description": "GoodData CLI",
5
5
  "keywords": [
6
6
  "analytics",