@tremho/mist-lift 1.0.2 → 1.0.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.
package/README.md CHANGED
@@ -40,7 +40,10 @@ To get started using MistLift, please see the [QuickStart Guide](https://github.
40
40
 
41
41
  ## Changelog
42
42
 
43
- ### 1.0.0 - 1.0.2 -- Initial Release 6/27/24
43
+ ### 1.0.3 -- Initial Release 6/28/24
44
+ - Include missing template files in npm publish
45
+
46
+ ### 1.0.0 - 1.0.2 -- Pre Release 6/27/24
44
47
  - Basic functionality
45
48
  - minor bug fixes
46
49
  - documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tremho/mist-lift",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "lift command line utility for MistLift development",
5
5
  "main": "build/index.js",
6
6
  "bin": {
@@ -22,8 +22,10 @@
22
22
  "files": [
23
23
  "build/**/*",
24
24
  "src/**/*",
25
+ "templateData/*",
25
26
  "index.d.ts",
26
27
  "README.md",
28
+ "LICENSE",
27
29
  "tsconfig.json"
28
30
  ],
29
31
  "keywords": [
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "$$FUNCTION_NAME$$",
3
+ "description": "",
4
+ "version": "1.0.0",
5
+ "pathMap": "$$PATHMAP$$",
6
+ "allowedMethods": "GET",
7
+ "schemas": {
8
+ },
9
+ "parameters": [
10
+ ],
11
+ "returns": {
12
+ "200": {
13
+ "type": "empty",
14
+ "description": "successful response."
15
+ },
16
+ "500": {
17
+ "type": "string",
18
+ "description": "Error details"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+
2
+ import {start} from "./main"
3
+ import fs from "fs";
4
+
5
+ async function run() {
6
+ const name = process.argv[2]
7
+ let request = {}
8
+ if(name) {
9
+ const path = `functions/HelloWorld/${name}`;
10
+ console.log("Local run with request " + path)
11
+ request = JSON.parse(fs.readFileSync(path).toString())
12
+ } else {
13
+ console.log("Local run with default request");
14
+ }
15
+ console.log(await start(request, null, (ret:any) => { return ret; }));
16
+ }
17
+ run();
@@ -0,0 +1,16 @@
1
+ import {LambdaApi, Success, NotFound, NotImplemented, ServerError} from "@tremho/inverse-y"
2
+ import fs from "fs"
3
+ import path from 'path'
4
+ import {Log} from "@tremho/inverse-y"
5
+
6
+ const def = JSON.parse(fs.readFileSync(path.join(__dirname, "definition.json")).toString());
7
+
8
+ const service = new LambdaApi<any>(def,
9
+ async (event:any) => {
10
+ Log.Info("Entering Main");
11
+ return Success("Hello, World!")
12
+ }
13
+ )
14
+ export function start(e:any, c:any, cb:any) {
15
+ return service.entryPoint(e, c, cb)
16
+ }
@@ -0,0 +1,7 @@
1
+
2
+ import { start } from "./src/main.js"
3
+
4
+ export const handler = async(event) => {
5
+
6
+ return await start(event);
7
+ };
@@ -0,0 +1,11 @@
1
+
2
+ import Tap from "tap"
3
+ function test(t:any) {
4
+ t.ok(true, 'Sanity test passes')
5
+
6
+ t.end()
7
+
8
+ }
9
+ Tap.test('First function Test', t => {
10
+ test(t)
11
+ })