@juuno-sdk/cli 1.0.13 → 3.0.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.
Files changed (38) hide show
  1. package/README.md +5 -3
  2. package/bin/cli-router.js +54 -72
  3. package/bin/cli.js +2 -3
  4. package/dist/assets/main-GRbDNSIa.css +1 -0
  5. package/dist/assets/main-TDlmPBlt.js +1 -0
  6. package/dist/assets/main-rFvAfxK4.js +1 -0
  7. package/dist/cli/src/auth/index.js +47 -34
  8. package/dist/cli/src/deploy/index.js +209 -115
  9. package/dist/cli/src/dev/index.js +46 -40
  10. package/dist/cli/src/info/index.js +17 -36
  11. package/dist/cli/src/list/index.js +12 -36
  12. package/dist/cli/src/login/index.js +37 -42
  13. package/dist/cli/src/logout/index.js +34 -33
  14. package/dist/cli/src/simulator/index.js +54 -39
  15. package/dist/cli/src/utils/api.js +45 -0
  16. package/dist/cli/src/utils/error.js +9 -0
  17. package/dist/cli/src/utils/is-record.js +11 -0
  18. package/dist/cli/src/whoami/index.js +37 -33
  19. package/dist/cli/tsconfig.build.tsbuildinfo +1 -1
  20. package/dist/index.html +5 -2
  21. package/dist/types/src/auth/index.d.ts +17 -0
  22. package/dist/types/src/auth/index.d.ts.map +1 -1
  23. package/dist/types/src/deploy/index.d.ts +12 -0
  24. package/dist/types/src/deploy/index.d.ts.map +1 -1
  25. package/dist/types/src/dev/index.d.ts.map +1 -1
  26. package/dist/types/src/info/index.d.ts.map +1 -1
  27. package/dist/types/src/list/index.d.ts.map +1 -1
  28. package/dist/types/src/login/index.d.ts.map +1 -1
  29. package/dist/types/src/logout/index.d.ts.map +1 -1
  30. package/dist/types/src/simulator/index.d.ts.map +1 -1
  31. package/dist/types/src/utils/api.d.ts +27 -0
  32. package/dist/types/src/utils/api.d.ts.map +1 -0
  33. package/dist/types/src/utils/error.d.ts +8 -0
  34. package/dist/types/src/utils/error.d.ts.map +1 -0
  35. package/dist/types/src/utils/is-record.d.ts +10 -0
  36. package/dist/types/src/utils/is-record.d.ts.map +1 -0
  37. package/dist/types/src/whoami/index.d.ts.map +1 -1
  38. package/package.json +19 -17
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logout/index.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDvE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logout/index.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAoCD;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAcvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/simulator/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,iBAGjB;AA2BD;;GAEG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,iBAyKzE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/simulator/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmCH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,iBAGjB;AA0GD;;GAEG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,iBA4FzE"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Fetch JSON from a developer-API endpoint with bearer-token auth, throwing
3
+ * a useful error on non-2xx responses (status, statusText, body). Used by
4
+ * the info, list, and deploy commands.
5
+ */
6
+ export declare function fetchAuthorisedJson<T>(url: string, token: string): Promise<T>;
7
+ /**
8
+ * Wrap a thrown error with a contextual prefix. Preserves the original
9
+ * message and lets callers throw a single high-level error with the
10
+ * subsystem context, instead of stringifying details inline at every site.
11
+ */
12
+ export declare function wrapError(prefix: string, error: unknown): Error;
13
+ /**
14
+ * Standard envelope shape for `/api/v1/developer/*` JSON responses.
15
+ */
16
+ export interface ApiEnvelope<T> {
17
+ success: boolean;
18
+ data?: T;
19
+ message?: string;
20
+ }
21
+ /**
22
+ * Validate a developer-API envelope and return the unwrapped data, or
23
+ * throw a specific error for each failure mode (server-reported failure
24
+ * with or without a message; success with missing data).
25
+ */
26
+ export declare function assertSuccessEnvelope<T>(envelope: ApiEnvelope<T>): T;
27
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/utils/api.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,CAE/D;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAWpE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Pull a user-facing string out of an unknown thrown value. Preserves the
3
+ * original Error.message when present; falls back to String() coercion for
4
+ * anything else (which gives e.g. "[object Object]" for plain objects but
5
+ * is still better than crashing the catch site).
6
+ */
7
+ export declare function getErrorMessage(error: unknown): string;
8
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/utils/error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEtD"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * True for plain object-shaped values (excludes null and arrays). Use as
3
+ * the entry guard before reading properties on an `unknown` from JSON,
4
+ * dynamic imports, or other untyped boundaries.
5
+ *
6
+ * A copy of `@juuno/utils`'s `isRecord` on purpose: this package publishes
7
+ * standalone and cannot depend on a workspace package.
8
+ */
9
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
10
+ //# sourceMappingURL=is-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-record.d.ts","sourceRoot":"","sources":["../../../../src/utils/is-record.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/whoami/index.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDvE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/whoami/index.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AA6CD;;GAEG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juuno-sdk/cli",
3
- "version": "1.0.13",
3
+ "version": "3.0.0",
4
4
  "description": "Official CLI for Juuno external app development - simulator, deployment, and tools",
5
5
  "private": false,
6
6
  "type": "module",
@@ -19,27 +19,26 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "@juuno-sdk/app-sdk": "^1.0.2",
23
- "commander": "^12.1.0",
24
- "inquirer": "^11.1.0",
22
+ "inquirer": "^14.0.2",
25
23
  "jszip": "^3.10.1",
26
- "mime-types": "^2.1.35",
27
- "sirv-cli": "^2.0.2"
24
+ "@juuno-sdk/app-sdk": "^3.0.0"
28
25
  },
29
26
  "peerDependencies": {
30
- "vue": "^3.5.22"
27
+ "vue": "^3.5.41"
31
28
  },
32
29
  "devDependencies": {
33
- "@tsconfig/node22": "^22.0.2",
34
- "@types/node": "^22.15.30",
35
- "@vitejs/plugin-vue": "^6.0.1",
36
- "@vue/tsconfig": "^0.7.0",
37
- "typescript": "^5.8.3",
38
- "vite": "^6.3.5",
39
- "vue": "^3.5.22",
40
- "vue-tsc": "^3.2.5",
30
+ "@tsconfig/node22": "^22.0.5",
31
+ "@types/node": "^26.2.0",
32
+ "@vitejs/plugin-vue": "^6.0.8",
33
+ "@vue/tsconfig": "^0.9.1",
34
+ "typescript": "^5.9.3",
35
+ "vite": "^8.2.1",
36
+ "vitest": "^4.1.10",
37
+ "vue": "^3.5.41",
38
+ "vue-tsc": "^3.3.9",
39
+ "@juuno/simulator-ui": "1.0.0",
41
40
  "@juuno/service-vitejs-plugins": "0.0.1",
42
- "@juuno/simulator-ui": "1.0.0"
41
+ "@juuno/eslint-config": "0.0.1"
43
42
  },
44
43
  "keywords": [
45
44
  "juuno",
@@ -59,6 +58,9 @@
59
58
  "build": "pnpm build:cli && pnpm build:simulator",
60
59
  "build:cli": "tsc --project tsconfig.build.json",
61
60
  "build:simulator": "vite build",
62
- "type-check": "vue-tsc --project tsconfig.build.json --noEmit --composite false"
61
+ "type-check": "vue-tsc --project tsconfig.build.json --noEmit --composite false && vue-tsc --project tsconfig.vitest.json --noEmit --composite false",
62
+ "test": "pnpm test:unit",
63
+ "test:unit": "vitest run",
64
+ "test:unit:watch": "vitest"
63
65
  }
64
66
  }