@lightdash/cli 0.2108.1 → 0.2110.0

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.
@@ -3,6 +3,8 @@ type LoginOptions = {
3
3
  token?: string;
4
4
  /** Use OAuth2 flow instead of password/token */
5
5
  oauth?: boolean;
6
+ /** Project UUID to select after login */
7
+ project?: string;
6
8
  interactive?: boolean;
7
9
  verbose: boolean;
8
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/handlers/login.ts"],"names":[],"mappings":"AAcA,KAAK,YAAY,GAAG;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AA+FF,eAAO,MAAM,KAAK,QAAe,MAAM,WAAW,YAAY,kBAiF7D,CAAC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/handlers/login.ts"],"names":[],"mappings":"AAcA,KAAK,YAAY,GAAG;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CACpB,CAAC;AA+FF,eAAO,MAAM,KAAK,QAAe,MAAM,WAAW,YAAY,kBAmF7D,CAAC"}
@@ -131,7 +131,10 @@ const login = async (url, options) => {
131
131
  await (0, config_1.setDefaultUser)(userUuid, organizationUuid);
132
132
  console.error(`\n ✅️ Login successful\n`);
133
133
  try {
134
- if (process.env.CI === 'true') {
134
+ if (options.project) {
135
+ await (0, setProject_1.setProjectCommand)(undefined, options.project);
136
+ }
137
+ else if (process.env.CI === 'true') {
135
138
  await (0, setProject_1.setFirstProject)();
136
139
  }
137
140
  else {
package/dist/index.js CHANGED
@@ -88,6 +88,7 @@ ${styles.bold('Examples:')}
88
88
  `)
89
89
  .option('--token <token>', 'Login with an API access token', undefined)
90
90
  .option('--oauth', 'Login using OAuth2 flow (opens browser for authentication)', false)
91
+ .option('--project <project uuid>', 'Select a project by UUID after login', parseProjectArgument, undefined)
91
92
  .option('--verbose', undefined, false)
92
93
  .action(login_1.login);
93
94
  // CONFIG
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.2108.1",
3
+ "version": "0.2110.0",
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/common": "0.2108.1",
37
- "@lightdash/warehouses": "0.2108.1"
36
+ "@lightdash/warehouses": "0.2110.0",
37
+ "@lightdash/common": "0.2110.0"
38
38
  },
39
39
  "description": "Lightdash CLI tool",
40
40
  "devDependencies": {