@nestica/cli 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -32,7 +32,7 @@ Firebase tokens and the default profile. Precedence for every setting:
32
32
  | Setting | Flag | Environment | Default |
33
33
  | --- | --- | --- | --- |
34
34
  | API base URL | `-H, --base-url` | `NESTICA_BASE_URL` | deployed API |
35
- | Firebase web API key | `--api-key` | `FIREBASE_API_KEY` | |
35
+ | Firebase web API key | `--api-key` | `FIREBASE_API_KEY` | the Nestica project's web key |
36
36
  | Google OAuth client id | `--google-client-id` | `GOOGLE_CLIENT_ID` | — |
37
37
  | Google OAuth client secret | `--google-client-secret` | `GOOGLE_CLIENT_SECRET` | — |
38
38
  | Auth emulator | — | `FIREBASE_AUTH_EMULATOR_HOST` | inferred from a localhost base URL |
@@ -68,7 +68,8 @@ Global flags: `-H/--base-url`, `--api-key`, `--profile`,
68
68
  ### login
69
69
 
70
70
  - Email/password (prompted when omitted; the password is not echoed):
71
- `nestica login --api-key <web-key> --email dev@example.com`
71
+ `nestica login --email dev@example.com` (the Firebase web API key
72
+ defaults to the Nestica project's own key)
72
73
  - Google, in the browser (OAuth + PKCE against a loopback redirect;
73
74
  needs the Firebase project's web OAuth client id):
74
75
  `nestica login --google --google-client-id <id> --api-key <key>`
package/dist/cli.js CHANGED
@@ -3380,7 +3380,7 @@ var program = new Command();
3380
3380
  // package.json
3381
3381
  var package_default = {
3382
3382
  name: "@nestica/cli",
3383
- version: "0.2.0",
3383
+ version: "0.3.0",
3384
3384
  type: "module",
3385
3385
  description: "Command-line client for the Nestica REST API",
3386
3386
  license: "MIT",
@@ -3513,6 +3513,7 @@ import { chmodSync, mkdirSync, readFileSync as readFileSync2, rmSync, writeFileS
3513
3513
  import { homedir } from "node:os";
3514
3514
  import { dirname, join } from "node:path";
3515
3515
  var DEFAULT_BASE_URL = "https://api-tjnuhxmzkq-uc.a.run.app/api/v1.0";
3516
+ var DEFAULT_FIREBASE_API_KEY = "AIzaSyCFltgXUHKKNtFt1QbsOhHZeP8ug_tr4t8";
3516
3517
  function sessionPath() {
3517
3518
  const override = process.env["NESTICA_CONFIG"];
3518
3519
  if (override) {
@@ -3545,7 +3546,7 @@ function removeSession(path2 = sessionPath()) {
3545
3546
  function resolveConnection(overrides, session) {
3546
3547
  return {
3547
3548
  baseUrl: overrides.baseUrl ?? process.env["NESTICA_BASE_URL"] ?? session.baseUrl ?? DEFAULT_BASE_URL,
3548
- apiKey: overrides.apiKey ?? process.env["FIREBASE_API_KEY"] ?? session.apiKey,
3549
+ apiKey: overrides.apiKey ?? process.env["FIREBASE_API_KEY"] ?? session.apiKey ?? DEFAULT_FIREBASE_API_KEY,
3549
3550
  profileId: overrides.profile ?? session.defaultProfileId
3550
3551
  };
3551
3552
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestica/cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Command-line client for the Nestica REST API",
6
6
  "license": "MIT",