@auersperg/flare 0.3.1 → 0.3.4

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 (52) hide show
  1. package/README.md +13 -8
  2. package/dist/cli/{chunk-x14smx1y.js → chunk-5s6zv1h9.js} +1 -1
  3. package/dist/cli/chunk-5tjevcsj.js +1174 -0
  4. package/dist/cli/{chunk-5cq8wgte.js → chunk-5yg1zj5n.js} +48 -29
  5. package/dist/cli/{chunk-786w6vrj.js → chunk-fv98dfg5.js} +21 -1
  6. package/dist/cli/flare.js +120 -4
  7. package/dist/platform/admin.js +790 -0
  8. package/dist/platform/dashboard/_astro/auth-view.CuxQ12Fa.js +1 -0
  9. package/dist/platform/dashboard/_astro/badge.DwKWvVfO.js +1 -0
  10. package/dist/platform/dashboard/_astro/card.Bdqmram9.js +1 -0
  11. package/dist/platform/dashboard/_astro/cli-approval.VKPc8wYS.js +1 -0
  12. package/dist/platform/dashboard/_astro/client.BUUZgEFj.js +1 -0
  13. package/dist/platform/dashboard/_astro/client.DYdPL2z4.js +9 -0
  14. package/dist/platform/dashboard/_astro/common.HrRZXwD9.js +1 -0
  15. package/dist/platform/dashboard/_astro/dashboard.CH594XTw.js +3 -0
  16. package/dist/platform/dashboard/_astro/data-view.CcyUYvId.js +1 -0
  17. package/dist/platform/dashboard/_astro/function-badge.MlTRYkqM.js +1 -0
  18. package/dist/platform/dashboard/_astro/functions-view.C8JWdNAh.js +1 -0
  19. package/dist/platform/dashboard/_astro/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
  20. package/dist/platform/dashboard/_astro/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
  21. package/dist/platform/dashboard/_astro/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
  22. package/dist/platform/dashboard/_astro/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
  23. package/dist/platform/dashboard/_astro/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
  24. package/dist/platform/dashboard/_astro/index.DiiMDa7R.css +2 -0
  25. package/dist/platform/dashboard/_astro/input-group.3twGpQ77.js +1 -0
  26. package/dist/platform/dashboard/_astro/react-dom.DwX89IcG.js +1 -0
  27. package/dist/platform/dashboard/_astro/refresh-cw.B0Cj85jJ.js +1 -0
  28. package/dist/platform/dashboard/_astro/sdk-view.CRFkbEyS.js +1 -0
  29. package/dist/platform/dashboard/_astro/services-view.B2suYnaG.js +1 -0
  30. package/dist/platform/dashboard/_astro/settings-view.BFP47ySK.js +3 -0
  31. package/dist/platform/dashboard/_astro/status-badge.BV1dzbX9.js +1 -0
  32. package/dist/platform/dashboard/_astro/table-guide.DzBDP6fC.js +2 -0
  33. package/dist/platform/dashboard/_astro/tabs.GRO5rCrK.js +1 -0
  34. package/dist/platform/dashboard/_headers +3 -0
  35. package/dist/platform/dashboard/bootstrap/action.js +263 -0
  36. package/dist/platform/dashboard/bootstrap/api.ts +5 -0
  37. package/dist/platform/dashboard/bootstrap/facet.js +914 -0
  38. package/dist/platform/dashboard/bootstrap/manifest.json +5 -0
  39. package/dist/platform/dashboard/bootstrap/openapi.json +18 -0
  40. package/dist/platform/dashboard/bootstrap/release.json +11 -0
  41. package/dist/platform/dashboard/bootstrap/schema.json +1 -0
  42. package/dist/platform/dashboard/index.html +1 -0
  43. package/dist/platform/manifest.json +230 -0
  44. package/dist/platform/migrations/0001.sql +8 -0
  45. package/dist/platform/migrations/0002_project_aliases.sql +6 -0
  46. package/dist/platform/migrations/0003_cli_login.sql +9 -0
  47. package/dist/platform/migrations/0004_retention.sql +4 -0
  48. package/dist/platform/migrations/0005_project_deletion.sql +11 -0
  49. package/dist/platform/migrations/0006_platform_installation.sql +8 -0
  50. package/dist/platform/runtime.js +9392 -0
  51. package/dist/sdk/client.js +10 -2
  52. package/package.json +1 -1
@@ -51,6 +51,14 @@ export async function uploadFile(grant, file, options = {}) {
51
51
  throw new FlareError("INVALID_RESPONSE", "Upload outcome is unknown; refresh the file list before uploading again", true);
52
52
  return { id: result.id };
53
53
  }
54
+ const authorizationErrors = new Set([
55
+ "UNAUTHORIZED",
56
+ "AUTH_EXPIRED",
57
+ "FORBIDDEN",
58
+ "AUTH_DISABLED",
59
+ "HTTP_401",
60
+ "HTTP_403"
61
+ ]);
54
62
  export function createClient(options) {
55
63
  const base = new URL(options.url);
56
64
  if (!/^https?:$/.test(base.protocol) || base.username || base.password || base.search || base.hash)
@@ -206,7 +214,7 @@ export function createClient(options) {
206
214
  return;
207
215
  if (frame.type === "error") {
208
216
  sub.terminal = true;
209
- if (["AUTH_EXPIRED", "UNAUTHORIZED", "FORBIDDEN"].includes(frame.code)) {
217
+ if (authorizationErrors.has(frame.code)) {
210
218
  sub.hasValue = false;
211
219
  sub.value = undefined;
212
220
  }
@@ -262,7 +270,7 @@ export function createClient(options) {
262
270
  if (disposed || current !== generation)
263
271
  return;
264
272
  for (const sub of subscriptions.values()) {
265
- if (error instanceof FlareError && ["HTTP_401", "HTTP_403"].includes(error.code)) {
273
+ if (error instanceof FlareError && authorizationErrors.has(error.code)) {
266
274
  sub.hasValue = false;
267
275
  sub.value = undefined;
268
276
  sub.revision = -1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auersperg/flare",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Flare client, server declarations and development CLI",