@karmaniverous/smoz 0.1.2

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.
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Jason Williscroft
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ <div align="center">
2
+
3
+ # SMOZ
4
+
5
+ [Serverless](https://www.serverless.com/) · [Middy](https://middy.js.org/) · [OpenAPI 3.1](https://spec.openapis.org/oas/latest.html) · [Zod](https://zod.dev/)
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@karmaniverous/smoz.svg)](https://www.npmjs.com/package/@karmaniverous/smoz)
8
+ ![Node Current](https://img.shields.io/node/v/@karmaniverous/smoz)
9
+ [![docs](https://img.shields.io/badge/docs-website-blue)](https://docs.karmanivero.us/smoz)
10
+ [![changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](https://github.com/karmaniverous/smoz/tree/main/CHANGELOG.md)
11
+ [![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/karmaniverous/smoz/tree/main/LICENSE.md)
12
+
13
+ </div>
14
+
15
+ SMOZ is a small, pragmatic toolkit for authoring AWS Lambda handlers with
16
+ [Middy] and [Zod], then aggregating Serverless functions and hand‑crafted
17
+ OpenAPI 3.1 paths from a single, schema‑first application definition.
18
+
19
+ - Keep prod code testable and framework‑agnostic
20
+ - HTTP middleware with validation, shaping, errors, CORS, negotiation, and HEAD
21
+ - Non‑HTTP flows stay lean (no middleware overhead)
22
+
23
+ ## Quick links
24
+
25
+ - [Overview](https://docs.karmanivero.us/smoz/documents/Overview.html)
26
+ - [Why smoz?](https://docs.karmanivero.us/smoz/documents/Why_smoz_.html)
27
+ - [Getting started](https://docs.karmanivero.us/smoz/documents/Getting_started.html)
28
+ - [10-minute tour](https://docs.karmanivero.us/smoz/documents/10%E2%80%91minute_tour.html)
29
+ - [HTTP MIddleware](https://docs.karmanivero.us/smoz/documents/HTTP_middleware.html)
30
+ - [Recipes](https://docs.karmanivero.us/smoz/documents/Recipes.html)
31
+ - [SQS function](https://docs.karmanivero.us/smoz/documents/Recipes.SQS_function.html)
32
+ - [Contexts + Cognito authorizer](https://docs.karmanivero.us/smoz/documents/Recipes.Contexts_+_Cognito_authorizer.html)
33
+ - [Custom middleware insertion](https://docs.karmanivero.us/smoz/documents/Recipes.Custom_middleware_insertion.html)
34
+ - [Per‑function env](<https://docs.karmanivero.us/smoz/documents/Recipes.Per%E2%80%91function_env_(fnEnvKeys).html>)
35
+ - [Observability](<https://docs.karmanivero.us/smoz/documents/Recipes.Observability_(requestId_header).html>)
36
+ - [Troubleshooting](https://docs.karmanivero.us/smoz/documents/Recipes.Troubleshooting.html)
37
+ - [Templates](https://docs.karmanivero.us/smoz/documents/Templates.html)
38
+ - [CLI](https://docs.karmanivero.us/smoz/documents/CLI.html)
39
+ - [Contributing](https://docs.karmanivero.us/smoz/documents/Contributing.html)
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ npm i @karmaniverous/smoz zod zod-openapi @middy/core \
45
+ @middy/http-header-normalizer \
46
+ @middy/http-event-normalizer \
47
+ @middy/http-json-body-parser \
48
+ @middy/http-content-negotiation \
49
+ @middy/http-error-handler \
50
+ @middy/http-cors \
51
+ @middy/http-response-serializer
52
+ ```
53
+
54
+ ## Dev tooling (recommended):
55
+
56
+ ```bash
57
+ npm i -D typescript typescript-eslint eslint prettier typedoc
58
+ ```
59
+
60
+ ## Docs and reference
61
+
62
+ - [Docs site](https://docs.karmanivero.us/smoz)
63
+ - [Changelog](https://github.com/karmaniverous/smoz/tree/main/CHANGELOG.md)
64
+ - [License](https://github.com/karmaniverous/smoz/tree/main/LICENSE.md)
65
+ - [Middy](https://middy.js.org/)
66
+ - [Zod](https://zod.dev/)