@tileflow/vite 0.1.0-alpha.18 → 0.1.0-alpha.19

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 +7 -1
  2. package/dist/index.js +20 -12
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -32,6 +32,12 @@ const source = {
32
32
 
33
33
  Development and production expose that same prefixed URL.
34
34
 
35
+ Development snapshots local `hostedTileset()` archives for coherent preview requests. Production
36
+ builds reject unresolved local PMTiles before emitting Tileflow assets; they never copy, hash, or
37
+ deduplicate user datasets. Publish a managed tileset explicitly or provide an application-owned
38
+ production source. Development Style URLs remain stable by logical tileset ID while the served
39
+ snapshot changes by generation.
40
+
35
41
  The Vite process is the only application server needed. It watches config, transitive imports, and
36
42
  local icon/font files, serves the Tileflow manifest, styles, sprites, and prepared fonts, and reloads
37
43
  from the latest valid generation. To capture an application scene, keep `vite` running and point the
@@ -39,7 +45,7 @@ short-lived headless command at that same loopback origin; do not start `tileflo
39
45
 
40
46
  ```sh
41
47
  npm run dev
42
- TILEFLOW_APP_ORIGIN=http://127.0.0.1:5173 npm exec --no -- tileflow capture app-desktop
48
+ TILEFLOW_APP_ORIGIN=http://127.0.0.1:5173 npx tileflow capture app-desktop
43
49
  ```
44
50
 
45
51
  ## Compatibility
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  // src/index.ts
2
2
  import { resolve } from "path";
3
3
  import {
4
+ assertNoLocalTilesetsForProduction,
4
5
  assertTileflowSelfHostedManifestTarget,
5
6
  createTileflowArtifactSession,
6
7
  createTileflowBuildArtifacts,
7
8
  defaultTileflowConfigPath,
9
+ disposeTileflowBuildArtifacts,
8
10
  getTileflowAssetBasePath,
9
11
  getTileflowAssetFileName,
10
12
  normalizeTileflowBasePath,
@@ -138,19 +140,25 @@ function tileflow(options = {}) {
138
140
  config: configPath,
139
141
  cwd: config.root,
140
142
  styleBaseUrl: publicUrls.styleBaseUrl,
141
- apiBaseUrl: options.apiBaseUrl
143
+ apiBaseUrl: options.apiBaseUrl,
144
+ target: "production"
142
145
  });
143
- const assetBase = getTileflowAssetBasePath(basePath);
144
- await assertTileflowSelfHostedManifestTarget(
145
- resolve(config.publicDir, assetBase, "manifest.json"),
146
- { overwriteHostedManifest: options.overwriteHostedManifest }
147
- );
148
- for (const asset of artifacts.files) {
149
- this.emitFile({
150
- fileName: getTileflowAssetFileName(assetBase, asset.fileName),
151
- source: asset.source,
152
- type: "asset"
153
- });
146
+ try {
147
+ assertNoLocalTilesetsForProduction(artifacts);
148
+ const assetBase = getTileflowAssetBasePath(basePath);
149
+ await assertTileflowSelfHostedManifestTarget(
150
+ resolve(config.publicDir, assetBase, "manifest.json"),
151
+ { overwriteHostedManifest: options.overwriteHostedManifest }
152
+ );
153
+ for (const asset of artifacts.files) {
154
+ this.emitFile({
155
+ fileName: getTileflowAssetFileName(assetBase, asset.fileName),
156
+ source: asset.source,
157
+ type: "asset"
158
+ });
159
+ }
160
+ } finally {
161
+ await disposeTileflowBuildArtifacts(artifacts);
154
162
  }
155
163
  }
156
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/vite",
3
- "version": "0.1.0-alpha.18",
3
+ "version": "0.1.0-alpha.19",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Vite plugin for Tileflow map style development and static artifacts.",
6
6
  "engines": {
@@ -44,14 +44,14 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@tileflow/dev": ">=0.1.0-alpha.19 <0.1.0-beta.0"
47
+ "@tileflow/dev": ">=0.1.0-alpha.20 <0.1.0-beta.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "vite": ">=5 <9"
51
51
  },
52
52
  "devDependencies": {
53
53
  "vite": "^8.0.16",
54
- "@tileflow/maps": "0.1.0-alpha.0"
54
+ "@tileflow/maps": "0.1.0-alpha.1"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup src/index.ts --format esm --dts --clean --external vite --platform node",