Skip to content

Commit

Permalink
chore: rename service and add VMMETRICS_API_TOKEN var
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard committed Aug 12, 2024
1 parent 7a2441b commit 4b55672
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
4 changes: 3 additions & 1 deletion tiles/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
interface WorkerEnv extends Omit<Env, 'ENVIRONMENT' | 'PMTILES_FILE_NAME' | 'PMTILES_FILE_HASH'> {
interface WorkerEnv
extends Omit<Env, 'ENVIRONMENT' | 'PMTILES_FILE_NAME' | 'PMTILES_FILE_HASH' | 'VMMETRICS_API_TOKEN'> {
ENVIRONMENT: string;
PMTILES_FILE_NAME: string;
PMTILES_FILE_HASH: string;
VMMETRICS_API_TOKEN: string;
}
2 changes: 1 addition & 1 deletion tiles/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Metrics } from './monitor';
import { PMTilesService } from './pmtiles/pmtiles';
import { PMTilesService } from './pmtiles/pmtiles.service';
import { CloudflareKVRepository, MemCacheRepository, R2StorageRepository } from './repository';

const URL_MATCHER = /^\/v(?<VERSION>[0-9]+)((?=)|(?<JSON>\.json)|\/(?<Z>\d+)\/(?<X>\d+)\/(?<Y>\d+).mvt)$/;
Expand Down
File renamed without changes.
15 changes: 8 additions & 7 deletions tiles/worker-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Generated by Wrangler on Mon Aug 12 2024 10:58:19 GMT+0100 (British Summer Time)
// Generated by Wrangler on Mon Aug 12 2024 19:11:53 GMT+0100 (British Summer Time)
// by running `wrangler types`

interface Env {
KV: KVNamespace;
PMTILES_FILE_NAME: 'v1.pmtiles';
PMTILES_FILE_HASH: 'example-dev-hash';
ENVIRONMENT: 'dev';
BUCKET: R2Bucket;
CF_VERSION_METADATA: { id: string; tag: string };
KV: KVNamespace;
PMTILES_FILE_NAME: "v1.pmtiles";
PMTILES_FILE_HASH: "example-dev-hash";
ENVIRONMENT: "development";
VMMETRICS_API_TOKEN: "token";
BUCKET: R2Bucket;
CF_VERSION_METADATA: { id: string; tag: string };
}
6 changes: 1 addition & 5 deletions tiles/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,4 @@ binding = "CF_VERSION_METADATA"
PMTILES_FILE_NAME = "v1.pmtiles"
PMTILES_FILE_HASH = "example-dev-hash"
ENVIRONMENT = "development"

[env.prod]
name = "tiles"
[vars]
ENVIRONMENT = "production"
VMMETRICS_API_TOKEN = "token"

0 comments on commit 4b55672

Please sign in to comment.