@auersperg/flare 0.3.2 → 0.3.5
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 +10 -4
- package/dist/cli/{chunk-x14smx1y.js → chunk-5s6zv1h9.js} +1 -1
- package/dist/cli/{chunk-5cq8wgte.js → chunk-5yg1zj5n.js} +48 -29
- package/dist/cli/{chunk-786w6vrj.js → chunk-fv98dfg5.js} +21 -1
- package/dist/cli/chunk-r3ceakrn.js +1366 -0
- package/dist/cli/flare.js +122 -4
- package/dist/platform/admin.js +790 -0
- package/dist/platform/dashboard/_astro/auth-view.UTGGCEHc.js +1 -0
- package/dist/platform/dashboard/_astro/cli-approval.BZAWmpiR.js +1 -0
- package/dist/platform/dashboard/_astro/client.BUUZgEFj.js +1 -0
- package/dist/platform/dashboard/_astro/client.Bcl1NrNO.js +1 -0
- package/dist/platform/dashboard/_astro/client.BeKNsjPN.js +9 -0
- package/dist/platform/dashboard/_astro/common.DPoFQu44.js +1 -0
- package/dist/platform/dashboard/_astro/data-view.BgYyTCMN.js +1 -0
- package/dist/platform/dashboard/_astro/functions-view.PUkng3T1.js +1 -0
- package/dist/platform/dashboard/_astro/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
- package/dist/platform/dashboard/_astro/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
- package/dist/platform/dashboard/_astro/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
- package/dist/platform/dashboard/_astro/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
- package/dist/platform/dashboard/_astro/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
- package/dist/platform/dashboard/_astro/index.astro_astro_type_script_index_0_lang.BEuO3H0E.js +4 -0
- package/dist/platform/dashboard/_astro/index.lobU7uK5.css +2 -0
- package/dist/platform/dashboard/_astro/input-group.CJxPRHej.js +1 -0
- package/dist/platform/dashboard/_astro/sdk-view.COmbEZrF.js +1 -0
- package/dist/platform/dashboard/_astro/services-view.C34dy0dk.js +1 -0
- package/dist/platform/dashboard/_astro/settings-view.IuD2r5JW.js +3 -0
- package/dist/platform/dashboard/_headers +3 -0
- package/dist/platform/dashboard/bootstrap/action.js +263 -0
- package/dist/platform/dashboard/bootstrap/api.ts +5 -0
- package/dist/platform/dashboard/bootstrap/facet.js +914 -0
- package/dist/platform/dashboard/bootstrap/manifest.json +5 -0
- package/dist/platform/dashboard/bootstrap/openapi.json +18 -0
- package/dist/platform/dashboard/bootstrap/release.json +11 -0
- package/dist/platform/dashboard/bootstrap/schema.json +1 -0
- package/dist/platform/dashboard/index.html +1 -0
- package/dist/platform/manifest.json +195 -0
- package/dist/platform/migrations/0001.sql +8 -0
- package/dist/platform/migrations/0002_project_aliases.sql +6 -0
- package/dist/platform/migrations/0003_cli_login.sql +9 -0
- package/dist/platform/migrations/0004_retention.sql +4 -0
- package/dist/platform/migrations/0005_project_deletion.sql +11 -0
- package/dist/platform/migrations/0006_platform_installation.sql +8 -0
- package/dist/platform/runtime.js +9392 -0
- package/dist/sdk/client.js +10 -2
- package/package.json +1 -1
package/dist/sdk/client.js
CHANGED
|
@@ -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 (
|
|
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 &&
|
|
273
|
+
if (error instanceof FlareError && authorizationErrors.has(error.code)) {
|
|
266
274
|
sub.hasValue = false;
|
|
267
275
|
sub.value = undefined;
|
|
268
276
|
sub.revision = -1;
|