@lightdash/cli 0.2190.1 → 0.2191.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.
@@ -7,6 +7,7 @@ export type DownloadHandlerOptions = {
7
7
  project?: string;
8
8
  languageMap: boolean;
9
9
  skipSpaceCreate: boolean;
10
+ public: boolean;
10
11
  includeCharts: boolean;
11
12
  };
12
13
  export declare const downloadContent: (ids: string[], type: "charts" | "dashboards", projectId: string, customPath?: string, languageMap?: boolean) => Promise<[number, string[]]>;
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CAC1B,CAAC;AA4IF,eAAO,MAAM,eAAe,QACnB,MAAM,EAAE,QACP,QAAQ,GAAG,YAAY,aAClB,MAAM,eACJ,MAAM,gBACN,OAAO,KACrB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA2F5B,CAAC;AAEF,eAAO,MAAM,eAAe,YACf,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAsHd,CAAC;AA2MF,eAAO,MAAM,aAAa,YACb,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAqHd,CAAC"}
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/handlers/download.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CAC1B,CAAC;AA4IF,eAAO,MAAM,eAAe,QACnB,MAAM,EAAE,QACP,QAAQ,GAAG,YAAY,aAClB,MAAM,eACJ,MAAM,gBACN,OAAO,KACrB,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA2F5B,CAAC;AAEF,eAAO,MAAM,eAAe,YACf,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAsHd,CAAC;AA6MF,eAAO,MAAM,aAAa,YACb,sBAAsB,KAChC,OAAO,CAAC,IAAI,CAuHd,CAAC"}
@@ -282,7 +282,7 @@ const logUploadChanges = (changes) => {
282
282
  *
283
283
  * @param slugs if slugs are provided, we only force upsert the charts/dashboards that match the slugs, if slugs are empty, we upload files that were locally updated
284
284
  */
285
- const upsertResources = async (type, projectId, changes, force, slugs, customPath, skipSpaceCreate) => {
285
+ const upsertResources = async (type, projectId, changes, force, slugs, customPath, skipSpaceCreate, publicSpaceCreate) => {
286
286
  const config = await (0, config_1.getConfig)();
287
287
  const items = await readCodeFiles(type, customPath);
288
288
  console.info(`Found ${items.length} ${type} files`);
@@ -317,6 +317,7 @@ const upsertResources = async (type, projectId, changes, force, slugs, customPat
317
317
  body: JSON.stringify({
318
318
  ...item,
319
319
  skipSpaceCreate,
320
+ publicSpaceCreate,
320
321
  }),
321
322
  });
322
323
  globalState_1.default.debug(`${type} "${item.name}": ${upsertData[type]?.[0].action}`);
@@ -402,7 +403,7 @@ const uploadHandler = async (options) => {
402
403
  console.info(styles.warning(`No charts filters provided, skipping`));
403
404
  }
404
405
  else {
405
- const { changes: chartChanges, total } = await upsertResources('charts', projectId, changes, options.force, chartSlugs, options.path, options.skipSpaceCreate);
406
+ const { changes: chartChanges, total } = await upsertResources('charts', projectId, changes, options.force, chartSlugs, options.path, options.skipSpaceCreate, options.public);
406
407
  changes = chartChanges;
407
408
  chartTotal = total;
408
409
  }
@@ -410,7 +411,7 @@ const uploadHandler = async (options) => {
410
411
  console.info(styles.warning(`No dashboard filters provided, skipping`));
411
412
  }
412
413
  else {
413
- const { changes: dashboardChanges, total } = await upsertResources('dashboards', projectId, changes, options.force, options.dashboards, options.path, options.skipSpaceCreate);
414
+ const { changes: dashboardChanges, total } = await upsertResources('dashboards', projectId, changes, options.force, options.dashboards, options.path, options.skipSpaceCreate, options.public);
414
415
  changes = dashboardChanges;
415
416
  dashboardTotal = total;
416
417
  }
package/dist/index.js CHANGED
@@ -242,6 +242,7 @@ commander_1.program
242
242
  .option('-p, --path <path>', 'specify a custom path to upload charts and dashboards from', undefined)
243
243
  .option('--project <project uuid>', 'specify a project UUID to upload', parseProjectArgument, undefined)
244
244
  .option('--skip-space-create', 'Skip space creation if it does not exist', false)
245
+ .option('--public', 'Create new spaces as public instead of private', false)
245
246
  .option('--include-charts', 'Include charts updates when uploading dashboards', false)
246
247
  .action(download_1.uploadHandler);
247
248
  commander_1.program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.2190.1",
3
+ "version": "0.2191.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "lightdash": "dist/index.js"
@@ -33,8 +33,8 @@
33
33
  "parse-node-version": "^2.0.0",
34
34
  "unique-names-generator": "^4.7.1",
35
35
  "uuid": "^11.0.3",
36
- "@lightdash/warehouses": "0.2190.1",
37
- "@lightdash/common": "0.2190.1"
36
+ "@lightdash/common": "0.2191.1",
37
+ "@lightdash/warehouses": "0.2191.1"
38
38
  },
39
39
  "description": "Lightdash CLI tool",
40
40
  "devDependencies": {