mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 19:01:08 +00:00
* Update CloudFormation template. * Inline Lambda code into CloudFormation template. read x-distribution-name header in TileJSON response if PUBLIC_HOSTNAME is not set. * include both build-zip and build-cloudformation-stack in CI
8 lines
344 B
TypeScript
8 lines
344 B
TypeScript
import { yamlParse, yamlDump } from 'yaml-cfn';
|
|
import fs from 'fs';
|
|
|
|
const template = yamlParse(fs.readFileSync('protomaps-template.yaml','utf-8'));
|
|
const code = fs.readFileSync('dist/index.js','utf8');
|
|
template.Resources.LambdaFunction.Properties.Code = {ZipFile:code};
|
|
fs.writeFileSync('dist/cloudformation-stack.yaml', yamlDump(template));
|