effortless-aws 0.7.1 → 0.8.0

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHandlerRuntime
3
- } from "../chunk-5L76NICW.js";
3
+ } from "../chunk-B4P7ZKNM.js";
4
4
 
5
5
  // src/runtime/wrap-app.ts
6
6
  import { readFileSync, existsSync } from "fs";
@@ -60,8 +60,8 @@ var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
60
60
  ".map"
61
61
  ]);
62
62
  var wrapApp = (handler) => {
63
- const { dir, index: indexFile = "index.html", spa = false } = handler.config;
64
- const rt = createHandlerRuntime({}, "app", handler.config.logLevel ?? "error");
63
+ const { dir, index: indexFile = "index.html", spa = false } = handler.__spec;
64
+ const rt = createHandlerRuntime({}, "app", handler.__spec.logLevel ?? "error");
65
65
  const baseDir = join(process.cwd(), dir);
66
66
  return async (event) => {
67
67
  const startTime = Date.now();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHandlerRuntime
3
- } from "../chunk-5L76NICW.js";
3
+ } from "../chunk-B4P7ZKNM.js";
4
4
 
5
5
  // src/runtime/wrap-fifo-queue.ts
6
6
  var parseMessages = (rawRecords, schema) => {
@@ -32,7 +32,7 @@ var wrapFifoQueue = (handler) => {
32
32
  if (!handler.onMessage && !handler.onBatch) {
33
33
  throw new Error("wrapFifoQueue requires a handler with onMessage or onBatch defined");
34
34
  }
35
- const rt = createHandlerRuntime(handler, "fifo-queue", handler.config.logLevel ?? "info");
35
+ const rt = createHandlerRuntime(handler, "fifo-queue", handler.__spec.logLevel ?? "info");
36
36
  const handleError = handler.onError ?? ((e) => console.error(`[effortless:${rt.handlerName}]`, e));
37
37
  return async (event) => {
38
38
  const startTime = Date.now();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHandlerRuntime
3
- } from "../chunk-5L76NICW.js";
3
+ } from "../chunk-B4P7ZKNM.js";
4
4
 
5
5
  // src/runtime/wrap-http.ts
6
6
  var CONTENT_TYPE_MAP = {
@@ -23,7 +23,7 @@ var parseBody = (body, isBase64) => {
23
23
  }
24
24
  };
25
25
  var wrapHttp = (handler) => {
26
- const rt = createHandlerRuntime(handler, "http", handler.config.logLevel ?? "info");
26
+ const rt = createHandlerRuntime(handler, "http", handler.__spec.logLevel ?? "info");
27
27
  const toResult = (r) => {
28
28
  const resolved = r.contentType ? CONTENT_TYPE_MAP[r.contentType] : void 0;
29
29
  const customContentType = resolved ?? r.headers?.["content-type"] ?? r.headers?.["Content-Type"];
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createHandlerRuntime,
3
3
  createTableClient
4
- } from "../chunk-5L76NICW.js";
4
+ } from "../chunk-B4P7ZKNM.js";
5
5
 
6
6
  // src/runtime/wrap-table-stream.ts
7
7
  import { unmarshall } from "@aws-sdk/util-dynamodb";
@@ -41,7 +41,7 @@ var wrapTableStream = (handler) => {
41
41
  if (!handler.onRecord && !handler.onBatch) {
42
42
  throw new Error("wrapTableStream requires a handler with onRecord or onBatch defined");
43
43
  }
44
- const rt = createHandlerRuntime(handler, "table", handler.config.logLevel ?? "info");
44
+ const rt = createHandlerRuntime(handler, "table", handler.__spec.logLevel ?? "info");
45
45
  const handleError = handler.onError ?? ((e) => console.error(`[effortless:${rt.handlerName}]`, e));
46
46
  let selfClient = null;
47
47
  const getSelfClient = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effortless-aws",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Code-first AWS Lambda framework. Export handlers, deploy with one command.",