@kirkelliott/zap 0.1.2 → 0.1.3

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 (2) hide show
  1. package/dist/cli.js +10 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -141,4 +141,14 @@ program
141
141
  return console.log('no handlers deployed');
142
142
  handlers.forEach(o => console.log(o.Key.replace(/\.zap$/, '')));
143
143
  });
144
+ program
145
+ .command('demo')
146
+ .description('deploy the built-in demo handlers')
147
+ .option('-b, --bucket <bucket>', 'S3 bucket (or set ZAP_BUCKET)')
148
+ .action(async (opts) => {
149
+ const b = bucket(opts);
150
+ const demoDir = (0, node_path_1.resolve)(__dirname, '..', 'demo');
151
+ const files = await walkZap(demoDir, 'demo');
152
+ await Promise.all(files.map(({ filePath, key }) => deployFile(b, filePath, key)));
153
+ });
144
154
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirkelliott/zap",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Drop a .zap file in S3. It becomes an API endpoint.",
5
5
  "main": "dist/handler.js",
6
6
  "bin": {