tileflow 0.1.0-alpha.0 → 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.
Files changed (3) hide show
  1. package/README.md +15 -4
  2. package/dist/index.js +10 -3
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -68,12 +68,18 @@ explicitly with `--out`:
68
68
  npx tileflow build --out public/tileflow
69
69
  ```
70
70
 
71
- Named hosted sources with `local` archives are for preview and capture. `tileflow build` rejects
72
- them instead of copying user data into production output. Publish managed data explicitly with
73
- `tileset publish`, or provide the production dataset through an application-owned source.
71
+ Named hosted sources with `local` archives are for account-free validation, development, preview,
72
+ and capture. `tileflow build` rejects them instead of copying, publishing, or taking ownership of
73
+ user data. For production, either publish managed data explicitly with `tileset publish` or serve
74
+ it from infrastructure owned by the application. A local declaration never selects either path
75
+ implicitly.
76
+
74
77
  Preview, capture, and the React/Vue/Svelte adapters register Tileflow's local PMTiles protocol
75
78
  before MapLibre reads the compiled Style. Its URL is stable by logical tileset ID; physical local
76
- snapshot generations do not change Style or Capture identity.
79
+ snapshot generations do not change Style identity. Standalone Capture retains one snapshot for the
80
+ render. Application Capture uses the application's server; Tileflow's local handler provides
81
+ immutable, ETag-guarded PMTiles reads, but does not freeze every local dataset for the complete
82
+ screenshot window.
77
83
 
78
84
  Build is local and credential-free. Hosted compatibility is a separate
79
85
  `tileflow validate --target hosted` preflight. Primary map data must remain Tileflow World; named
@@ -484,6 +490,11 @@ npx tileflow status --map-id map_AbCdEfGhIjKlMnOp
484
490
  npx tileflow logout
485
491
  ```
486
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
+
487
498
  The dashboard creates the Map and browser-access policy before repository setup. Keep that exact
488
499
  Map ID in the deploy action. If the config contains several maps, select the authored map explicitly:
489
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 { error: `Account session validation failed (${response.status}).`, ok: false };
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 { error: `Project capability request failed (${response.status}).`, ok: false };
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileflow",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "CLI-only tools for Tileflow config, capture, visual testing, and deploy.",
6
6
  "type": "module",
@@ -38,9 +38,9 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@hono/node-server": "2.0.10",
41
- "@tileflow/capture": ">=0.1.0-alpha.19 <0.1.0-beta.0",
42
- "@tileflow/core": ">=0.1.0-alpha.22 <0.1.0-beta.0",
43
- "@tileflow/dev": ">=0.1.0-alpha.20 <0.1.0-beta.0",
41
+ "@tileflow/capture": ">=0.1.0-alpha.20 <0.1.0-beta.0",
42
+ "@tileflow/core": ">=0.1.0-alpha.23 <0.1.0-beta.0",
43
+ "@tileflow/dev": ">=0.1.0-alpha.21 <0.1.0-beta.0",
44
44
  "@tileflow/maps": ">=0.1.0-alpha.1 <0.1.0-beta.0",
45
45
  "hono": "4.12.34",
46
46
  "commander": "^15.0.0",