tileflow 0.1.0-alpha.7 → 0.1.0-alpha.8
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 +11 -0
- package/dist/index.js +1001 -392
- package/docs/build-artifacts.md +7 -0
- package/docs/command-families.md +5 -1
- package/docs/hosted-authentication-and-deploy.md +3 -2
- package/docs/native-artifacts.md +169 -0
- package/package.json +6 -6
package/docs/build-artifacts.md
CHANGED
|
@@ -31,3 +31,10 @@ screenshot window.
|
|
|
31
31
|
Build is local and credential-free. Hosted compatibility is a separate
|
|
32
32
|
`tileflow validate --target hosted` preflight. Primary map data must remain Tileflow World; named
|
|
33
33
|
Team sources are validated and resolved independently.
|
|
34
|
+
|
|
35
|
+
## Choose an artifact renderer
|
|
36
|
+
|
|
37
|
+
`validate` and `build` accept `--renderer web|native`; omission preserves the web pipeline and its
|
|
38
|
+
bytes. Native artifacts use a separate `native/` output directory and do not establish a running
|
|
39
|
+
mobile SDK. See [native artifact validation and output](native-artifacts.md) for the target matrix,
|
|
40
|
+
JSON diagnostics, prepared fonts and explicit limitations.
|
package/docs/command-families.md
CHANGED
|
@@ -14,7 +14,11 @@ Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/ma
|
|
|
14
14
|
| Hosted delivery | `deploy`, `status` |
|
|
15
15
|
|
|
16
16
|
Run `tileflow <command> --help` (or the family help, such as `tileflow icons --help`) for the exact
|
|
17
|
-
arguments and bounded JSON modes.
|
|
17
|
+
arguments and bounded JSON modes. `preview` defaults to the existing web renderer. The explicit
|
|
18
|
+
`preview --renderer native` / `dev --renderer native` mode serves watched `native-v1` artifacts only;
|
|
19
|
+
Metro remains the React Native JavaScript development server. See
|
|
20
|
+
[Native artifacts and local preview](./native-artifacts.md) for the endpoint and qualification
|
|
21
|
+
boundary.
|
|
18
22
|
|
|
19
23
|
`icon-set` and `icons` are deliberately separate. `icon-set` needs Team authority and changes the
|
|
20
24
|
remote catalog. `icons list` and `icons diff` are keyless local inspection, and
|
|
@@ -171,8 +171,9 @@ For a map with `icons: ['./icons']`, hosted validation compiles the local SVG/PN
|
|
|
171
171
|
without a key. Ordered directories apply left to right and later exact IDs replace earlier files.
|
|
172
172
|
Deploy uploads the four generated sprite files before its first style write and reuses
|
|
173
173
|
byte-identical packages by content hash. Source icons and absolute paths remain local; generated
|
|
174
|
-
atlas bytes and sorted icon names are public. Each hosted package is limited to
|
|
175
|
-
generated bytes as a processing envelope.
|
|
174
|
+
atlas bytes and sorted icon names are public. Each hosted package is limited to 1,000 icons and 8 MiB
|
|
175
|
+
generated bytes as a processing envelope. Large artwork may reach the 2,048-pixel atlas bound before
|
|
176
|
+
the icon count. There is no package-count quota; physically retained
|
|
176
177
|
generated packages share the organization's 5/10-GB hosted-storage pool with retained PMTiles,
|
|
177
178
|
remain protected by deployment/library references, and otherwise enter the technical orphan grace
|
|
178
179
|
before deletion. Upload success must confirm the submitted `contentHash`, exact icon count, exact
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Native artifacts, local preview and Hosted deployment
|
|
2
|
+
|
|
3
|
+
Use a project-local CLI version that includes the native artifact selector and a trusted
|
|
4
|
+
`tileflow.config.ts`. Follow the [installation instructions](../README.md) first. Native commands
|
|
5
|
+
prepare, serve or publish Tileflow artifacts; they do not install, start or qualify a mobile renderer.
|
|
6
|
+
|
|
7
|
+
## Validate and build
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx tileflow validate --renderer native --target local --json
|
|
11
|
+
npx tileflow build --renderer native --target local --out public/tileflow --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`validate` prepares and checks the complete theme family without writing production output.
|
|
15
|
+
`build` writes the checked generation beneath `public/tileflow/native`, including a strict version-1
|
|
16
|
+
runtime manifest and a separate schema-v2 `native-build.json` record. Serve the complete renderer
|
|
17
|
+
directory, not just the style. A failed compatibility check leaves existing output unchanged.
|
|
18
|
+
|
|
19
|
+
Both commands accept `--renderer web|native`; omission means `web`. Renderer selection is separate
|
|
20
|
+
from `--target local|hosted`. Existing `validate --target hosted` continues to perform web Hosted
|
|
21
|
+
preflight. Native with `--target hosted` fails with `NATIVE_RENDERER_UNSUPPORTED` before loading the
|
|
22
|
+
config or writing files. `build --target hosted` is not publication and is rejected. The explicit
|
|
23
|
+
combined Hosted publication command below performs its own complete two-renderer preflight.
|
|
24
|
+
|
|
25
|
+
JSON success uses the existing version-1 command envelope. Native results additionally identify
|
|
26
|
+
`renderer: 'native'`, `profile: 'native-v1'` and `validation: 'static-artifacts'`. JSON failure writes
|
|
27
|
+
one structured envelope to stderr, leaves stdout empty and exits nonzero. Native diagnostics have
|
|
28
|
+
safe JSON Pointers, stable codes, severity and suggestions. Unknown renderer names are not echoed.
|
|
29
|
+
The ordinary web commands and their default artifact bytes retain their existing behavior.
|
|
30
|
+
|
|
31
|
+
## Watch and serve native artifacts
|
|
32
|
+
|
|
33
|
+
`preview` and its `dev` alias use the same renderer selector:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npx tileflow preview --renderer native --map stores --theme light
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Native mode creates the existing watched artifact session with renderer `native`. It keeps the
|
|
40
|
+
last-known-good native artifact family when a watched generation becomes invalid and replaces it
|
|
41
|
+
only after a later valid generation is prepared. The endpoint is an **assets-only** development
|
|
42
|
+
endpoint: it does not render a browser map, open the visual workbench, start Metro, launch a device,
|
|
43
|
+
or establish visual/native acceptance.
|
|
44
|
+
|
|
45
|
+
With the default host and port, the canonical runtime manifest is:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
http://127.0.0.1:3333/native/manifest.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The manifest remains the ordinary strict version-1 Tileflow runtime manifest. Its style, sprite,
|
|
52
|
+
font, tileset and generation references use the existing renderer-specific `/native/...` paths; no
|
|
53
|
+
preview-only manifest schema is introduced. `--map` and `--theme` validate a desired map/theme
|
|
54
|
+
against that finalized manifest but do not narrow or fork the served artifact family.
|
|
55
|
+
|
|
56
|
+
Human output identifies the exact manifest URL, profile `native-v1`, and `assets-only` endpoint.
|
|
57
|
+
Native NDJSON lifecycle events additionally carry `renderer`, `profile`, `manifest` and
|
|
58
|
+
`assetsOnly`; the default and explicit `--renderer web` lifecycle/output contract remains the
|
|
59
|
+
existing browser-preview contract.
|
|
60
|
+
|
|
61
|
+
Metro remains the React Native application's JavaScript development server. The application points
|
|
62
|
+
its Tileflow source at the native manifest URL and sets `source.developmentOrigin` to its exact HTTP
|
|
63
|
+
origin, for example `http://127.0.0.1:3333`. Both addresses must be reachable from the target device;
|
|
64
|
+
an Android emulator may use a different host address. Other resource origins still require HTTPS.
|
|
65
|
+
The application supplies its own development networking setup. Tileflow
|
|
66
|
+
does not add a Metro plugin, device discovery or a tunnel.
|
|
67
|
+
|
|
68
|
+
`preview` still binds to `127.0.0.1` by default. Existing explicit `--host <ip-or-localhost>` behavior
|
|
69
|
+
is preserved. Selecting another host does not add LAN discovery, a public tunnel, an iOS ATS
|
|
70
|
+
exception, an Android cleartext exception, or any native application mutation; the application and
|
|
71
|
+
developer remain responsible for making an explicitly selected development endpoint reachable
|
|
72
|
+
under their own platform/network policy.
|
|
73
|
+
|
|
74
|
+
Browser-only selections fail before config execution in native mode. In particular, committed
|
|
75
|
+
`--scene` preview and every `--against-*` comparison-workbench option are unavailable with
|
|
76
|
+
`--renderer native`. Native mode does not serve the browser preview root, preview JavaScript runtime,
|
|
77
|
+
compiler-inspection sidecars, or the dev handler's status/event control routes. Use ordinary/default
|
|
78
|
+
web preview for those workflows.
|
|
79
|
+
|
|
80
|
+
The `native-lowering-v1` preparation policy records fixed globe-to-Mercator normalization and
|
|
81
|
+
finite cap/dash layer partitioning in `native-build.json`; it does not change web artifacts.
|
|
82
|
+
Native preparation rejects adaptive/unknown projections, terrain, browser PMTiles/contour protocols,
|
|
83
|
+
missing text providers and unsupported style values rather than degrading them silently. It preserves
|
|
84
|
+
shared icon inheritance and independent sprite densities, and maps verified licensed TTF/OTF faces
|
|
85
|
+
into native style declarations. See the
|
|
86
|
+
[profile contract](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/native-artifact-profile.md)
|
|
87
|
+
and [artifact layout](https://github.com/tileflow/tileflow-sdk/blob/main/packages/dev/docs/native-artifacts.md).
|
|
88
|
+
|
|
89
|
+
## Publish web and Native together
|
|
90
|
+
|
|
91
|
+
The pre-release source supports an explicit combined deployment against a compatible Hosted API.
|
|
92
|
+
This is a wire and implementation contract, not a statement that a package or server release is
|
|
93
|
+
available. The API must understand renderer-collection deployment schema 2.
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
npx tileflow deploy --with-native --map-id map_0123456789abcdef --map stores
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`--map-id` selects the existing managed Tileflow Map. `--map` selects one map from the repository;
|
|
100
|
+
it can be omitted only when the config contains one map. The command uses the ordinary deployment
|
|
101
|
+
credential or account capability, not the publishable mobile credential. Do not put privileged
|
|
102
|
+
credentials in mobile application configuration.
|
|
103
|
+
|
|
104
|
+
Before authentication, upload or publication, the command loads the trusted config once, prepares
|
|
105
|
+
its icon closure, compiles all web themes and lowers all Native themes from that same compiled
|
|
106
|
+
input. It validates profile `native-v1`, hashes, authored identity, source ownership declarations,
|
|
107
|
+
semantic POI provenance and overlay boundaries. Native incompatibility rejects the entire request;
|
|
108
|
+
it cannot publish a new web family alone. Existing Hosted restrictions still apply, including the
|
|
109
|
+
current rejection of package-owned web font bundles. This opt-in does not bypass those restrictions;
|
|
110
|
+
use an explicitly configured glyph provider for this Hosted path.
|
|
111
|
+
|
|
112
|
+
Shared icon packages use the existing content-addressed upload protocol once. The command replaces
|
|
113
|
+
only the confirmed owned sprite URL, without reevaluating config, and sends one strict renderer
|
|
114
|
+
collection to `POST /v1/styles`. The server verifies both complete families and their owned resources,
|
|
115
|
+
stages immutable outputs, and activates them through the existing single deployment authority.
|
|
116
|
+
A Native staging failure does not activate the replacement web family. Retry the same input after an
|
|
117
|
+
interrupted response: the server's existing content identity determines reuse or a new deployment.
|
|
118
|
+
|
|
119
|
+
The successful response has its own explicit schema version 2 and identifies one managed Map and
|
|
120
|
+
deployment plus web and Native theme references. The CLI requires the complete matching response
|
|
121
|
+
before atomically replacing `--manifest`. That local file stays a strict **runtime manifest v1 for
|
|
122
|
+
web**, so existing bundlers do not receive unknown Native fields. The CLI separately prints the
|
|
123
|
+
canonical Native manifest URL. A failed request or invalid response leaves the existing local file
|
|
124
|
+
unchanged; an uncertain response is not proof that the server performed no publication.
|
|
125
|
+
|
|
126
|
+
Ordinary `deploy` without `--with-native` keeps its schema-1 request and response behavior. A later
|
|
127
|
+
web-only deployment does not inherit a Native family from an older deployment.
|
|
128
|
+
|
|
129
|
+
## Native discovery and protected resources
|
|
130
|
+
|
|
131
|
+
The canonical entry URL is on the application's configured API origin:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
https://api.example.test/maps/map_0123456789abcdef/native/manifest.json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This bounded, one-map runtime manifest is **public metadata**. It contains identity, theme names,
|
|
138
|
+
revisions and references, never Style JSON, credentials or grants. It is served with `no-store` only
|
|
139
|
+
for a coherent active Native deployment. Its GET is not a commercial completion event.
|
|
140
|
+
|
|
141
|
+
Use that URL in the existing `Map` source descriptor, keeping the authored map name in `source.map`.
|
|
142
|
+
The application configures its publishable mobile credential and approved API origin once, using the
|
|
143
|
+
[React Native application configuration contract](../../react-native/docs/native-configuration.md).
|
|
144
|
+
The SDK requires both the requested and final response URLs to be the exact canonical route for the
|
|
145
|
+
declared managed Map. The manifest's `apiUrl` must exactly equal the configured canonical API origin;
|
|
146
|
+
a remote document cannot create a trusted origin or choose where the credential is sent.
|
|
147
|
+
|
|
148
|
+
The credential goes only to the configured API's `POST /v1/sessions/start`. It is not sent to the
|
|
149
|
+
manifest, a CDN, a style URL or a redirect destination. Styles, TileJSON, tiles, sprites, glyphs and
|
|
150
|
+
font resources remain protected by the existing grant and resource-ownership checks.
|
|
151
|
+
|
|
152
|
+
A Native theme references `/maps/<mapId>/native/v<deploymentVersion>/<theme>.json` and requires a
|
|
153
|
+
revision. The server verifies that version against the active deployment and the style's stored
|
|
154
|
+
bytes against the revision. Before resource projection, the SDK checks the protected response URL
|
|
155
|
+
and its Map/theme/deployment/revision metadata. If discovery became stale, it refetches the public
|
|
156
|
+
manifest at most once for that selection, preserving its existing session and admission context.
|
|
157
|
+
Another Map, origin, mode or older deployment cannot replace that ownership. A repeated failure
|
|
158
|
+
enters the existing safe error/rollback path rather than mixing generations or looping indefinitely.
|
|
159
|
+
|
|
160
|
+
Session start, public metadata discovery and Map rendering do not themselves assert a billable
|
|
161
|
+
completion. Completion remains owned by the server's existing eligible protected GET 200/206 path.
|
|
162
|
+
Disabled mobile delivery fails closed; publication does not enable it.
|
|
163
|
+
|
|
164
|
+
## Qualification boundary
|
|
165
|
+
|
|
166
|
+
Native local preview is artifact preparation and delivery only. A successful artifact or deployment
|
|
167
|
+
response does not establish Hermes execution, iOS/Android rendering, device reachability, visual
|
|
168
|
+
fidelity, package publication or product availability. Qualify the exact compatible SDK/API pair,
|
|
169
|
+
React Native application, platform networking policy and native runtime separately.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileflow",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "CLI-only tools for Tileflow config, capture, visual testing, and deploy.",
|
|
6
6
|
"type": "module",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@hono/node-server": "2.0.10",
|
|
39
|
-
"@tileflow/capture": ">=0.1.0-alpha.
|
|
39
|
+
"@tileflow/capture": ">=0.1.0-alpha.25 <0.1.0-beta.0",
|
|
40
40
|
"@tileflow/coordinates": ">=0.1.0-alpha.1 <0.1.0-beta.0",
|
|
41
|
-
"@tileflow/coordinates-runtime": ">=0.1.0-alpha.
|
|
42
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
43
|
-
"@tileflow/dev": ">=0.1.0-alpha.
|
|
44
|
-
"@tileflow/maps": ">=0.1.0-alpha.
|
|
41
|
+
"@tileflow/coordinates-runtime": ">=0.1.0-alpha.4 <0.1.0-beta.0",
|
|
42
|
+
"@tileflow/core": ">=0.1.0-alpha.27 <0.1.0-beta.0",
|
|
43
|
+
"@tileflow/dev": ">=0.1.0-alpha.26 <0.1.0-beta.0",
|
|
44
|
+
"@tileflow/maps": ">=0.1.0-alpha.5 <0.1.0-beta.0",
|
|
45
45
|
"commander": "^15.0.0",
|
|
46
46
|
"hono": "4.13.5",
|
|
47
47
|
"picocolors": "^1.1.1",
|