@kirkelliott/zap 0.1.8 → 0.1.9

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 +12 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -193,6 +193,18 @@ program
193
193
  catch (err) {
194
194
  console.log('\ndirect invoke failed:', err.message);
195
195
  }
196
+ const urlCfg = readConfig();
197
+ if (urlCfg.url) {
198
+ try {
199
+ const res = await fetch(urlCfg.url);
200
+ console.log(`\nurl fetch: HTTP ${res.status}`);
201
+ console.log('headers:', Object.fromEntries([...res.headers.entries()].filter(([k]) => k.startsWith('x-amzn') || k === 'content-type')));
202
+ console.log('body:', await res.text());
203
+ }
204
+ catch (err) {
205
+ console.log('\nurl fetch failed:', err.message);
206
+ }
207
+ }
196
208
  });
197
209
  program
198
210
  .command('repair')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirkelliott/zap",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Drop a .zap file in S3. It becomes an API endpoint.",
5
5
  "main": "dist/handler.js",
6
6
  "bin": {