Skip to content

Commit a432f55

Browse files
committed
chore: MVP
1 parent fe291bf commit a432f55

File tree

11 files changed

+1437
-95
lines changed

11 files changed

+1437
-95
lines changed

README.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
1-
# starter-ts ![TypeScript heart icon](https://img.shields.io/badge/♡-%23007ACC.svg?logo=typescript&logoColor=white)
1+
# @namesmt/utils-lambda ![TypeScript heart icon](https://img.shields.io/badge/♡-%23007ACC.svg?logo=typescript&logoColor=white)
22

33
[![npm version][npm-version-src]][npm-version-href]
44
[![npm downloads][npm-downloads-src]][npm-downloads-href]
55
[![Codecov][codecov-src]][codecov-href]
66
[![Bundlejs][bundlejs-src]][bundlejs-href]
77
[![jsDocs.io][jsDocs-src]][jsDocs-href]
88

9-
**starter-ts** is my starter/boilerplate for typescript projects.
10-
This template assumes you are using Linux, or the included Dev Container.
11-
12-
### Notes (remove this section when you use the template)
13-
#### * Do a global replace for `starter-ts` and `NamesMT`
14-
15-
#### * I'm heavily inspired by [antfu](https://github.com/antfu) and [UnJS](https://github.com/unjs), some notable things:
16-
- [antfu/ni](https://github.com/antfu/ni)
17-
- [antfu/taze](https://github.com/antfu/taze)
18-
- [antfu/vscode-settings](https://github.com/antfu/vscode-settings)
19-
- [antfu/eslint-config](https://github.com/antfu/eslint-config)
20-
- Style error silencing is commented out
21-
22-
#### * Script: `play` vs `play:useBuild` for playground testing?
23-
- `play` script uses `unbuild`'s [passive watcher (stub mode)](https://github.com/unjs/unbuild#-passive-watcher), which allows you to execute new code **live** without rebuilding the project. The cons is TS declarations are not available.
24-
- `play:useBuild` builds a static version of the package, useful for testing the actual look/behavior when shipping.
25-
### END NOTE
9+
**@namesmt/utils-lambda** is a collection of some useful utilities and types targeting AWS Lambda.
2610

2711
## Features
2812
- [x] TypeScript ready!
@@ -31,19 +15,19 @@ This template assumes you are using Linux, or the included Dev Container.
3115
### Install package:
3216
```sh
3317
# npm
34-
npm install starter-ts
18+
npm install @namesmt/utils-lambda
3519

3620
# yarn
37-
yarn add starter-ts
21+
yarn add @namesmt/utils-lambda
3822

3923
# pnpm (recommended)
40-
pnpm install starter-ts
24+
pnpm install @namesmt/utils-lambda
4125
```
4226

4327
### Import:
4428
```ts
4529
// ESM
46-
import { hello } from 'starter-ts'
30+
import { decodeResponse } from '@namesmt/utils-lambda'
4731
```
4832

4933
## Roadmap
@@ -56,15 +40,15 @@ import { hello } from 'starter-ts'
5640

5741
<!-- Badges -->
5842

59-
[npm-version-src]: https://img.shields.io/npm/v/starter-ts?labelColor=18181B&color=F0DB4F
60-
[npm-version-href]: https://npmjs.com/package/starter-ts
61-
[npm-downloads-src]: https://img.shields.io/npm/dm/starter-ts?labelColor=18181B&color=F0DB4F
62-
[npm-downloads-href]: https://npmjs.com/package/starter-ts
63-
[codecov-src]: https://img.shields.io/codecov/c/gh/namesmt/starter-ts/main?labelColor=18181B&color=F0DB4F
64-
[codecov-href]: https://codecov.io/gh/namesmt/starter-ts
65-
[license-src]: https://img.shields.io/github/license/namesmt/starter-ts.svg?labelColor=18181B&color=F0DB4F
66-
[license-href]: https://github.com/namesmt/starter-ts/blob/main/LICENSE
67-
[bundlejs-src]: https://img.shields.io/bundlejs/size/starter-ts?labelColor=18181B&color=F0DB4F
68-
[bundlejs-href]: https://bundlejs.com/?q=starter-ts
43+
[npm-version-src]: https://img.shields.io/npm/v/@namesmt/utils-lambda?labelColor=18181B&color=F0DB4F
44+
[npm-version-href]: https://npmjs.com/package/@namesmt/utils-lambda
45+
[npm-downloads-src]: https://img.shields.io/npm/dm/@namesmt/utils-lambda?labelColor=18181B&color=F0DB4F
46+
[npm-downloads-href]: https://npmjs.com/package/@namesmt/utils-lambda
47+
[codecov-src]: https://img.shields.io/codecov/c/gh/namesmt/@namesmt/utils-lambda/main?labelColor=18181B&color=F0DB4F
48+
[codecov-href]: https://codecov.io/gh/namesmt/@namesmt/utils-lambda
49+
[license-src]: https://img.shields.io/github/license/namesmt/@namesmt/utils-lambda.svg?labelColor=18181B&color=F0DB4F
50+
[license-href]: https://github.com/namesmt/@namesmt/utils-lambda/blob/main/LICENSE
51+
[bundlejs-src]: https://img.shields.io/bundlejs/size/@namesmt/utils-lambda?labelColor=18181B&color=F0DB4F
52+
[bundlejs-href]: https://bundlejs.com/?q=@namesmt/utils-lambda
6953
[jsDocs-src]: https://img.shields.io/badge/Check_out-jsDocs.io---?labelColor=18181B&color=F0DB4F
70-
[jsDocs-href]: https://www.jsdocs.io/package/starter-ts
54+
[jsDocs-href]: https://www.jsdocs.io/package/@namesmt/utils-lambda

build.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default defineBuildConfig({
1515
],
1616
declaration: 'node16',
1717
clean: true,
18+
externals: ['aws-lambda'],
1819
rollup: {
1920
esbuild: {
2021
target: 'esnext',

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "starter-ts",
2+
"name": "@namesmt/utils-lambda",
33
"type": "module",
44
"version": "0.0.0",
55
"packageManager": "pnpm@9.4.0",
6-
"description": "",
6+
"description": "Collection of some useful utilities and types targeting AWS Lambda",
77
"author": "NamesMT <dangquoctrung123@gmail.com>",
88
"license": "MIT",
99
"funding": "https://github.com/sponsors/namesmt",
10-
"homepage": "https://github.com/namesmt/starter-ts#readme",
10+
"homepage": "https://github.com/namesmt/@namesmt/utils-lambda#readme",
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/namesmt/starter-ts.git"
13+
"url": "git+https://github.com/namesmt/@namesmt/utils-lambda.git"
1414
},
15-
"bugs": "https://github.com/namesmt/starter-ts/issues",
15+
"bugs": "https://github.com/namesmt/@namesmt/utils-lambda/issues",
1616
"keywords": [],
1717
"sideEffects": false,
1818
"exports": {
@@ -48,12 +48,17 @@
4848
"prepublishOnly": "pnpm run build"
4949
},
5050
"dependencies": {
51+
"@aws-sdk/client-lambda": "^3.600.0",
52+
"@namesmt/utils": "^0.3.1",
53+
"@types/aws-lambda": "^8.10.140",
5154
"consola": "^3.2.3",
52-
"std-env": "^3.7.0"
55+
"destr": "^2.0.3",
56+
"std-env": "^3.7.0",
57+
"type-fest": "^4.20.1"
5358
},
5459
"devDependencies": {
5560
"@antfu/eslint-config": "^2.21.1",
56-
"@types/node": "^20.14.7",
61+
"@types/node": "^20.14.8",
5762
"@vitest/coverage-v8": "^1.6.0",
5863
"eslint": "^9.5.0",
5964
"lint-staged": "^15.2.7",

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"dev": "nodemon -w '../src/**/*.ts' -w 'main.ts' -e .ts -x vite"
77
},
88
"devDependencies": {
9+
"@namesmt/utils-lambda": "workspace:^",
910
"nodemon": "^3.1.4",
10-
"starter-ts": "workspace:^",
1111
"vite": "^5.3.1",
1212
"vite-plugin-inspect": "^0.8.4"
1313
}

playground/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from 'vite'
22
import Inspect from 'vite-plugin-inspect'
3-
import * as rootPackage from 'starter-ts'
3+
import * as rootPackage from '@namesmt/utils-lambda'
44

55
// eslint-disable-next-line no-console
66
console.log({ rootPackage: JSON.stringify(rootPackage) })

0 commit comments

Comments
 (0)