tileflow 0.1.0-alpha.6 → 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 +49 -0
- package/dist/index.js +2155 -675
- package/docs/agent-icon-composition.md +27 -12
- package/docs/build-artifacts.md +7 -0
- package/docs/command-families.md +13 -1
- package/docs/hosted-authentication-and-deploy.md +3 -2
- package/docs/native-artifacts.md +169 -0
- package/docs/team-icon-sets.md +121 -0
- package/package.json +6 -6
|
@@ -9,21 +9,35 @@ npx tileflow icons list --json
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The successful stdout contract is one deterministic JSON document followed by exactly one newline.
|
|
12
|
-
Its top-level fields, in order, are `schemaVersion:
|
|
13
|
-
Schema version
|
|
12
|
+
Its top-level fields, in order, are `schemaVersion: 3`, `pathBase: "cwd"`, and `maps`.
|
|
13
|
+
Schema version 3 is a compatibility boundary: removing or renaming a field or changing an enum's
|
|
14
14
|
meaning requires a new schema version. Additive optional fields require corresponding documentation
|
|
15
|
-
and tests.
|
|
15
|
+
and tests. It replaces version 2's directory-only shape so a locked `iconSet('@team/set')`
|
|
16
|
+
contributor can be represented without inventing a local path.
|
|
16
17
|
|
|
17
18
|
Each sorted map entry has one `id` and an `icons` value. `icons.kind` is `none` for `icons: []`, or
|
|
18
|
-
`
|
|
19
|
+
`sources` for a prepared ordered composition. A `sources` entry contains:
|
|
19
20
|
|
|
20
|
-
- `
|
|
21
|
-
`npm:<package>/<path>`
|
|
21
|
+
- `contributors`, in the exact left-to-right authoring order. Each has a `kind` of `local`,
|
|
22
|
+
`package` or `icon-set`, a `label` (a config-relative path, a safe `npm:<package>/<path>`
|
|
23
|
+
descriptor, or the canonical `@team/set` reference) and the `iconIds` it declares. Filesystem
|
|
24
|
+
contributors also report `insideWorkingTree`; shared contributors report their exact locked
|
|
25
|
+
`reference` and integer `version`.
|
|
22
26
|
- `finalIds`, the sorted canonical lower-kebab IDs in the resulting sprite;
|
|
23
|
-
- `replacements`,
|
|
24
|
-
|
|
25
|
-
- `
|
|
26
|
-
- the
|
|
27
|
+
- `replacements`, naming the replaced and winning contributor export for every later exact-ID
|
|
28
|
+
replacement, by authored file for filesystem contributors and by `@team/set` for shared ones;
|
|
29
|
+
- `sources`, one entry for each winning ID. A `file` entry carries the cwd-relative `path`, format,
|
|
30
|
+
byte length and intrinsic dimensions; an `icon-set` entry carries the exact `reference` and
|
|
31
|
+
`version` and deliberately has no path, because a shared revision publishes verified generated
|
|
32
|
+
cells rather than original artwork. Both carry the winning `contributor` ordinal.
|
|
33
|
+
- `composition`, the exact ordered `tileflow-icon-composition-v1` receipt when the map declares a
|
|
34
|
+
shared set, and `null` otherwise; and
|
|
35
|
+
- `insideWorkingTree` and the deterministic generated `packageHash`.
|
|
36
|
+
|
|
37
|
+
Listing reads the exact `tileflow.icons.lock.json` beside the selected config. It never resolves a
|
|
38
|
+
catalog head, so a newly published revision does not change this output until `tileflow icons
|
|
39
|
+
install`, `update` or `pin` changes the lock. `--cache-dir` selects the verified artifact cache root
|
|
40
|
+
and `--offline` fails a cache miss instead of hydrating it.
|
|
27
41
|
|
|
28
42
|
There is deliberately no parallel catalog registry, provider kind, semantic mapping, external
|
|
29
43
|
sprite branch, or arbitrary source-to-runtime renaming. `<id>.<ext>` publishes `<id>` and the
|
|
@@ -37,8 +51,9 @@ uses `../` and `insideWorkingTree: false`; no absolute path is emitted. Listing
|
|
|
37
51
|
authoring semantics. Run `npx tileflow validate --target hosted` separately before a
|
|
38
52
|
hosted deploy to check containment, portable IDs, SVG safety, and hosted limits.
|
|
39
53
|
|
|
40
|
-
The Tileflow command performs no authentication,
|
|
41
|
-
|
|
54
|
+
The Tileflow command performs no authentication, browser/server launch, or file write. It performs
|
|
55
|
+
no network request when every locked artifact is already in the verified cache, and `--offline`
|
|
56
|
+
forbids hydration entirely. It removes an ambient `TILEFLOW_API_KEY` before importing config. As with every config-aware
|
|
42
57
|
command, loading `tileflow.config.ts` executes repository code and is not a sandbox; side effects in
|
|
43
58
|
that code remain the repository's responsibility. Success emits no ANSI or progress prose. Usage,
|
|
44
59
|
config, source, decode, and render failures exit 1, write diagnostics to stderr, and leave stdout
|
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
|
@@ -8,11 +8,23 @@ Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/ma
|
|
|
8
8
|
| Map authoring | `init`, `validate`, `inspect`, `explain`, `semantic-diff`, `build`, `preview` (`dev` alias) |
|
|
9
9
|
| Local evidence | `setup capture`, `capture`, `visual compare`, `visual analyze`, `visual diff`, `visual update` |
|
|
10
10
|
| Data and assets | `tileset inspect`, `tileset publish/list/status/purge`, `inspect features`, `icons list/diff` |
|
|
11
|
+
| Team Icon Sets | `icon-set publish/list/status/versions/uses/archive/unarchive/purge` |
|
|
12
|
+
| Repository locks | `icons install`, `icons update`, `icons pin` |
|
|
11
13
|
| Account | `login`, `logout`, `whoami` |
|
|
12
14
|
| Hosted delivery | `deploy`, `status` |
|
|
13
15
|
|
|
14
16
|
Run `tileflow <command> --help` (or the family help, such as `tileflow icons --help`) for the exact
|
|
15
|
-
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.
|
|
22
|
+
|
|
23
|
+
`icon-set` and `icons` are deliberately separate. `icon-set` needs Team authority and changes the
|
|
24
|
+
remote catalog. `icons list` and `icons diff` are keyless local inspection, and
|
|
25
|
+
`icons install|update|pin` are the only commands that resolve `latest` or write
|
|
26
|
+
`tileflow.icons.lock.json`. See the
|
|
27
|
+
[Team Icon Set workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/team-icon-sets.md).
|
|
16
28
|
|
|
17
29
|
The CLI retains the hidden `projects` command family as a compatibility and support surface for the
|
|
18
30
|
internal application boundary. It is not part of the ordinary workflow or the product catalog.
|
|
@@ -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.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Team Icon Sets and repository locks
|
|
2
|
+
|
|
3
|
+
Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/README.md) for installation and a complete first example.
|
|
4
|
+
|
|
5
|
+
A Team Icon Set is a named catalog resource such as `@acme/brand`. Publishing creates an immutable
|
|
6
|
+
integer revision of the four generated sprite files. Maps in different repositories consume
|
|
7
|
+
independently pinned revisions through `iconSet('@acme/brand')` without copying original artwork.
|
|
8
|
+
|
|
9
|
+
Two command families cover this, and the split is deliberate. `icon-set` is a networked Team
|
|
10
|
+
authority that changes the catalog. `icons list` stays local and needs no credential. `icons diff`
|
|
11
|
+
compares prepared output with an active Hosted Map baseline, so it requires `--map-id` and a Map
|
|
12
|
+
credential but never mutates that Map. `install`, `update` and `pin` maintain the exact
|
|
13
|
+
`tileflow.icons.lock.json` beside the selected config.
|
|
14
|
+
|
|
15
|
+
Availability depends on your deployment and your Team's enabled features. Check
|
|
16
|
+
`npx tileflow icon-set --help` for the installed command surface.
|
|
17
|
+
|
|
18
|
+
## Authorize a Team
|
|
19
|
+
|
|
20
|
+
Catalog commands need Team authority. Either sign in and let the CLI exchange your account session
|
|
21
|
+
for a short-lived Team capability, or pass a Team data key:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npx tileflow login
|
|
25
|
+
npx tileflow icon-set list --team @acme --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Reads request `icons:read`; publication, archive state and purge request `icons:write`. A
|
|
29
|
+
Map-scoped deploy key never gains catalog authority, and `--team` is rejected together with
|
|
30
|
+
`--api-key` because a Team data key already selects its Team.
|
|
31
|
+
|
|
32
|
+
## Publish a revision
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx tileflow icon-set publish ./icons --id brand --team @acme --idempotency-key brand-2026-09-14 --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`publish` compiles exactly one repository-relative directory into `sprite.json`, `sprite.png`,
|
|
39
|
+
`sprite@2x.json` and `sprite@2x.png`, then uploads those four files under one durable retry key.
|
|
40
|
+
The first successful publication creates the set. Republishing identical bytes reports
|
|
41
|
+
`"publication": "unchanged"` and returns the same revision rather than a new integer. Repeating an
|
|
42
|
+
uncertain request with the same `--idempotency-key` returns its original result instead of creating
|
|
43
|
+
extra history.
|
|
44
|
+
|
|
45
|
+
`--name` and `--description` set bounded catalog display metadata after the immutable revision is
|
|
46
|
+
confirmed. If that metadata update fails, the revision remains published; rerun the same command to
|
|
47
|
+
retry the display update.
|
|
48
|
+
|
|
49
|
+
The JSON receipt reports the Team, the canonical reference, the immutable revision and version ID,
|
|
50
|
+
the package identity, the content hash, the byte count and whether the publication changed
|
|
51
|
+
anything. It contains no credential, source path, or original artwork.
|
|
52
|
+
|
|
53
|
+
## Inspect and manage the catalog
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
npx tileflow icon-set list --team @acme --json
|
|
57
|
+
npx tileflow icon-set status brand --team @acme --json
|
|
58
|
+
npx tileflow icon-set versions brand --team @acme --json
|
|
59
|
+
npx tileflow icon-set uses brand --team @acme --json
|
|
60
|
+
npx tileflow icon-set archive brand --team @acme --json
|
|
61
|
+
npx tileflow icon-set unarchive brand --team @acme --json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Reads follow bounded cursors and reject a repeated page, a duplicate row or an unsafe page count.
|
|
65
|
+
`uses` reports the known hosted deployments that retain a revision; its
|
|
66
|
+
`includesUndeployedRepositoryLocks` field is always `false`, because a repository lock that was
|
|
67
|
+
never deployed is not discoverable by the catalog. Archiving prevents new publication and implicit
|
|
68
|
+
discovery while retained consumers keep working.
|
|
69
|
+
|
|
70
|
+
## Purge an exact revision
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npx tileflow icon-set purge brand --version 3 --team @acme \
|
|
74
|
+
--idempotency-key purge-brand-3 --confirm '@acme/brand@3' --acknowledge-unknown-locks --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Purge needs all four guards: an exact positive `--version`, a durable `--idempotency-key`, a
|
|
78
|
+
`--confirm` value repeating the exact `@team/set@version`, and `--acknowledge-unknown-locks`.
|
|
79
|
+
The acknowledgement is not a formality. Purge tombstones the publication hold and keeps retained
|
|
80
|
+
deployment holds, including fully shadowed dependencies; it cannot discover undeployed repository
|
|
81
|
+
locks and cannot revoke public bytes that were already downloaded.
|
|
82
|
+
|
|
83
|
+
## Maintain the repository lock
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npx tileflow icons install --team @acme --json
|
|
87
|
+
npx tileflow icons update @acme/brand --team @acme --json
|
|
88
|
+
npx tileflow icons pin @acme/brand --version 3 --team @acme --json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
These commands read the `iconSet()` references your config declares. `install` resolves the current
|
|
92
|
+
latest revision for every declared reference that has no pin yet and leaves existing pins alone.
|
|
93
|
+
`update` moves the selected references to their current latest revision; omit the references to
|
|
94
|
+
select every declared one. `pin` selects one exact revision and never resolves a head.
|
|
95
|
+
|
|
96
|
+
They are the only build-adjacent commands that resolve `latest` or write the lock. Every requested
|
|
97
|
+
reference is resolved before a single compare-and-swap write of the whole snapshot, so a partial
|
|
98
|
+
lock is never produced and a concurrent writer fails the command rather than losing its pins. An
|
|
99
|
+
undeclared reference is rejected before any request. No lock command rewrites `tileflow.config.ts`;
|
|
100
|
+
add `iconSet('@team/set')` to your config first.
|
|
101
|
+
|
|
102
|
+
The JSON receipt lists each locked reference with its revision, version ID, package identity and
|
|
103
|
+
content hash, plus any declared reference that is still missing a pin.
|
|
104
|
+
|
|
105
|
+
## Build, preview and deploy against the lock
|
|
106
|
+
|
|
107
|
+
`validate`, `build`, `preview`, `deploy`, `icons list` and `icons diff` read the lock and compose
|
|
108
|
+
one effective sprite. They never resolve a catalog head, so publishing a newer revision changes
|
|
109
|
+
nothing in a repository until an explicit lock command runs. `--cache-dir` chooses the verified
|
|
110
|
+
artifact cache root; `--offline` fails a cache miss instead of hydrating it.
|
|
111
|
+
|
|
112
|
+
Hydration downloads only the four public files of the exact pinned artifact, from the trusted
|
|
113
|
+
delivery origin, without credentials and without following redirects. Every file's length,
|
|
114
|
+
checksum, sprite index, PNG geometry and per-icon pixel hashes are verified before use.
|
|
115
|
+
|
|
116
|
+
Deploy uploads the effective composed package and sends the same ordered composition receipt in the
|
|
117
|
+
build manifest and the request body, bound to that package's content hash. A referenced source
|
|
118
|
+
revision is never re-uploaded by a deploy.
|
|
119
|
+
|
|
120
|
+
Offline composition is not an offline map. Remote tiles, glyphs and other external resources keep
|
|
121
|
+
their own requirements.
|
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",
|