tileflow 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +5 -0
- package/dist/index.js +10 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -490,6 +490,11 @@ npx tileflow status --map-id map_AbCdEfGhIjKlMnOp
|
|
|
490
490
|
npx tileflow logout
|
|
491
491
|
```
|
|
492
492
|
|
|
493
|
+
Changing or resetting the hosted account password revokes saved personal CLI sessions. The next
|
|
494
|
+
account or hosted command stops with a clear message and asks you to run `tileflow login` again.
|
|
495
|
+
Project API and CI keys are independent project credentials and are not removed by a personal
|
|
496
|
+
password change.
|
|
497
|
+
|
|
493
498
|
The dashboard creates the Map and browser-access policy before repository setup. Keep that exact
|
|
494
499
|
Map ID in the deploy action. If the config contains several maps, select the authored map explicitly:
|
|
495
500
|
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ import { chmod, mkdir, open, readFile, rename, unlink } from "fs/promises";
|
|
|
64
64
|
import { homedir } from "os";
|
|
65
65
|
import { dirname, resolve } from "path";
|
|
66
66
|
import { z } from "zod";
|
|
67
|
+
var rejectedAccountSessionMessage = "The saved Tileflow account session is no longer valid. Run tileflow login to authorize this machine again.";
|
|
67
68
|
var maximumAuthFileBytes = 1024 * 1024;
|
|
68
69
|
var maximumOrigins = 16;
|
|
69
70
|
var accountSchema = z.object({
|
|
@@ -2018,7 +2019,10 @@ async function validateAccountSession(session, options = {}) {
|
|
|
2018
2019
|
options
|
|
2019
2020
|
);
|
|
2020
2021
|
if (!response.ok) {
|
|
2021
|
-
return {
|
|
2022
|
+
return {
|
|
2023
|
+
error: response.status === 401 ? rejectedAccountSessionMessage : `Account session validation failed (${response.status}).`,
|
|
2024
|
+
ok: false
|
|
2025
|
+
};
|
|
2022
2026
|
}
|
|
2023
2027
|
const body = asRecord(response.body);
|
|
2024
2028
|
const account = asRecord(body.account);
|
|
@@ -2110,7 +2114,10 @@ async function requestProjectCapability(session, project, scopes, options = {})
|
|
|
2110
2114
|
};
|
|
2111
2115
|
}
|
|
2112
2116
|
if (!response.ok) {
|
|
2113
|
-
return {
|
|
2117
|
+
return {
|
|
2118
|
+
error: response.status === 401 ? rejectedAccountSessionMessage : `Project capability request failed (${response.status}).`,
|
|
2119
|
+
ok: false
|
|
2120
|
+
};
|
|
2114
2121
|
}
|
|
2115
2122
|
const body = asRecord(response.body);
|
|
2116
2123
|
if (!response.json || typeof body.capability !== "string" || !body.capability.startsWith("tf_cap_") || body.capability.length > 8192 || body.reference !== project || !validIsoDate(body.expiresAt) || !Array.isArray(body.scopes) || body.scopes.join("\0") !== [...scopes].sort().join("\0")) {
|
|
@@ -3661,7 +3668,7 @@ async function accountRequest(session, path, init) {
|
|
|
3661
3668
|
}
|
|
3662
3669
|
return response.ok ? { body: response.body, ok: true, status: response.status } : {
|
|
3663
3670
|
body: response.body,
|
|
3664
|
-
error: `Request failed (${response.status}).`,
|
|
3671
|
+
error: response.status === 401 ? rejectedAccountSessionMessage : `Request failed (${response.status}).`,
|
|
3665
3672
|
ok: false,
|
|
3666
3673
|
status: response.status
|
|
3667
3674
|
};
|