@lightdash/cli 1.50.1 → 1.51.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 CHANGED
@@ -103,20 +103,6 @@ ${styles.bold('Examples:')}
103
103
  ${styles.title('⚡')}️lightdash ${styles.bold('deploy')} ${styles.secondary('-- compiles and deploys Lightdash metrics to active project')}
104
104
  ${styles.title('⚡')}️lightdash ${styles.bold('login https://lightdash.domain.com')} ${styles.secondary('-- logs in to a Lightdash instance')}
105
105
  `);
106
- const createProgram = commander_1.program
107
- .command('create')
108
- .description('Creates Lightdash content locally');
109
- createProgram
110
- .command('app <name>')
111
- .description('Creates a new data app locally')
112
- .option('--description <text>', 'Set the app description', '')
113
- .option('--slug <slug>', 'Override the app slug')
114
- .option('-p, --path <path>', 'Specify the Lightdash content root (default: ./lightdash)')
115
- .option('--project <project uuid>', 'Specify the project the app will use', parseProjectArgument, undefined)
116
- .option('-y, --assume-yes', 'approve npm package installation', false)
117
- .option('--verbose', undefined, false)
118
- .addHelpText('after', `\n${styles.bold('Example:')}\n ${styles.title('⚡')}️lightdash ${styles.bold('create app "Revenue explorer"')} ${styles.secondary('-- creates ./lightdash/apps/revenue-explorer')}\n`)
119
- .action(createApp_1.createAppHandler);
120
106
  commander_1.program
121
107
  .command('connect-snowflake')
122
108
  .description('Connects Lightdash to Snowflake using browser-based SSO')
@@ -435,6 +421,17 @@ uploadCommand.action(withOrganizationMode(download_1.uploadHandler));
435
421
  const appsProgram = commander_1.program
436
422
  .command('apps')
437
423
  .description('Work with data apps (enterprise)');
424
+ appsProgram
425
+ .command('create <name>')
426
+ .description('Creates a new data app locally')
427
+ .option('--description <text>', 'Set the app description', '')
428
+ .option('--slug <slug>', 'Override the app slug')
429
+ .option('-p, --path <path>', 'Specify the Lightdash content root (default: ./lightdash)')
430
+ .option('--project <project uuid>', 'Specify the project the app will use', parseProjectArgument, undefined)
431
+ .option('-y, --assume-yes', 'approve npm package installation', false)
432
+ .option('--verbose', undefined, false)
433
+ .addHelpText('after', `\n${styles.bold('Example:')}\n ${styles.title('⚡')}️lightdash ${styles.bold('apps create "Revenue explorer"')} ${styles.secondary('-- creates ./lightdash/apps/revenue-explorer')}\n`)
434
+ .action(createApp_1.createAppHandler);
438
435
  appsProgram
439
436
  .command('preview [path]')
440
437
  .description('Preview a downloaded data app locally against a real Lightdash instance, authenticated as you. Your credential stays in the CLI, behind a local proxy limited to data-app SDK routes.')
@@ -6,7 +6,7 @@ Two skills in `.claude/skills/` describe how to edit this app:
6
6
 
7
7
  Edit only `src/`. Root config files are read-only reference — the server rebuilds against a trusted template.
8
8
 
9
- The local build is an optional pre-check. Apps made with `lightdash create app` already have dependencies installed and can run `npm run build`; after `lightdash download`, use `npm install && npm run build` if you choose to build locally. If install fails, skip it and upload — never modify machine config, npmrc, or dependency files to force it; the server rebuild is authoritative.
9
+ The local build is an optional pre-check. Apps made with `lightdash apps create` already have dependencies installed and can run `npm run build`; after `lightdash download`, use `npm install && npm run build` if you choose to build locally. If install fails, skip it and upload — never modify machine config, npmrc, or dependency files to force it; the server rebuild is authoritative.
10
10
 
11
11
  Build with the template's preinstalled dependency set (see `package.json`). Adding new npm packages only works when the instance has custom dependencies enabled — assume it does not; ask the user before considering a new library, and never vendor library source into `src/` as a workaround. Where enabled, adding a dependency is the one workflow that still requires pnpm: upload requires a matching `pnpm-lock.yaml`, so `pnpm add <pkg>` (or `pnpm install --lockfile-only`) must succeed locally. If it fails, stop and report the error — hand-editing `package.json` without the lockfile makes the upload fail.
12
12
 
@@ -4,7 +4,7 @@ Created or downloaded with the Lightdash CLI.
4
4
 
5
5
  ## Edit → build → upload
6
6
  1. Edit files under `src/`.
7
- 2. Optionally, run `npm run build` to check it compiles locally. `lightdash create app` installs the initial dependencies after asking permission; after `lightdash download`, run `npm install` first if `node_modules` is absent. If install fails in your environment, skip the local build — the server build on upload is authoritative and surfaces errors on the app page. Don't change machine or registry config to force it.
7
+ 2. Optionally, run `npm run build` to check it compiles locally. `lightdash apps create` installs the initial dependencies after asking permission; after `lightdash download`, run `npm install` first if `node_modules` is absent. If install fails in your environment, skip the local build — the server build on upload is authoritative and surfaces errors on the app page. Don't change machine or registry config to force it.
8
8
  3. Optionally, preview against real data: `lightdash apps preview` (needs a successful `npm install`).
9
9
  4. `lightdash upload --apps <slug>` (the `slug` from `lightdash-app.yml`) — Lightdash rebuilds and serves the app.
10
10
 
@@ -28,7 +28,7 @@ You are editing a Lightdash **data app** that was created or downloaded with the
28
28
  ## The edit → build → upload loop
29
29
 
30
30
  1. Edit files under `src/` only.
31
- 2. Optionally, run `npm run build` to check it compiles. Apps made with `lightdash create app` already have their initial dependencies installed. After `lightdash download`, if you choose to do the local pre-check and `node_modules` is absent, run `npm install` first. This is an **optional local pre-check** — see below.
31
+ 2. Optionally, run `npm run build` to check it compiles. Apps made with `lightdash apps create` already have their initial dependencies installed. After `lightdash download`, if you choose to do the local pre-check and `node_modules` is absent, run `npm install` first. This is an **optional local pre-check** — see below.
32
32
  3. `lightdash upload --apps <slug>` (the `slug` from this folder's `lightdash-app.yml`) — the **server** rebuilds and serves the app. The server rebuild, not your local build, is what ships.
33
33
 
34
34
  ## The local build is optional — never fight a failing install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "1.50.1",
3
+ "version": "1.51.1",
4
4
  "description": "Lightdash CLI tool",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -41,8 +41,8 @@
41
41
  "unique-names-generator": "4.7.1",
42
42
  "uuid": "11.1.1",
43
43
  "yaml": "2.8.3",
44
- "@lightdash/common": "1.50.1",
45
- "@lightdash/warehouses": "1.50.1"
44
+ "@lightdash/warehouses": "1.51.1",
45
+ "@lightdash/common": "1.51.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/inquirer": "8.2.4",