Skip to content

Commit 1a839e1

Browse files
committed
chore: several updates
1 parent 0c5383b commit 1a839e1

18 files changed

+205
-193
lines changed

.github/renovate.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"extends": [
3-
"@ow3"
4-
]
2+
"extends": ["@ow3"]
53
}

.vscode/extensions.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
42
"recommendations": [
5-
"dbaeumer.vscode-eslint",
3+
"biomejs.biome",
64
"streetsidesoftware.code-spell-checker",
75
"davidanson.vscode-markdownlint"
86
]

.vscode/settings.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,8 @@
6868
"yaml",
6969
"toml"
7070
],
71-
"cSpell.ignorePaths": [
72-
"node_modules"
73-
],
74-
"cSpell.dictionaries": [
75-
"custom-dictionary"
76-
],
71+
"cSpell.ignorePaths": ["node_modules"],
72+
"cSpell.dictionaries": ["custom-dictionary"],
7773
"cSpell.diagnosticLevel": "Hint",
7874
"cSpell.customDictionaries": {
7975
"bun-plugin-env": {

.zed/settings.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// For a full list of overridable settings, and general information on folder-specific settings,
2+
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
3+
{
4+
"format_on_save": "on",
5+
"formatter": {
6+
"language_server": {
7+
"name": "biome"
8+
}
9+
},
10+
"code_actions_on_format": {
11+
"source.fixAll.biome": true,
12+
"source.organizeImports.biome": true
13+
},
14+
"file_types": {
15+
"JavaScript": ["buddy"]
16+
}
17+
}

README.md

+83-83
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# DynamoDB Goodies
2-
31
![Social Card of this repo](.github/art/cover.png)
42

3+
# DynamoDB Goodies
4+
55
[![npm version][npm-version-src]][npm-version-href]
66
[![GitHub Actions][github-actions-src]][github-actions-href]
77
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
@@ -10,134 +10,134 @@
1010

1111
## Features
1212

13-
-Zero-config DynamoDB setup
14-
-Local development with SSL support (wip)
15-
-DynamoDB Toolbox integration
13+
- Zero-config DynamoDB setup
14+
- Local development with SSL support (wip)
15+
- DynamoDB Toolbox integration
1616

1717
## Install
1818

19-
```bash
20-
bun install -d dynamodb-tooling
21-
```
19+
```bash
20+
bun install -d dynamodb-tooling
21+
```
2222

2323
## Get Started
2424

25-
Getting started with the DynamoDB Tooling is easy. Just import `dynamoDb` and get going:
25+
Getting started with the DynamoDB Tooling is easy. Just import `dynamoDb` and get going:
2626

27-
```ts
28-
import { dynamoDb } from 'dynamodb-tooling'
27+
```ts
28+
import { dynamoDb } from 'dynamodb-tooling'
2929

30-
interface LaunchOptions {
31-
port: number
32-
dbPath?: string
33-
additionalArgs?: string[]
34-
verbose?: boolean
35-
detached?: boolean
36-
javaOpts?: string
37-
}
30+
interface LaunchOptions {
31+
port: number
32+
dbPath?: string
33+
additionalArgs?: string[]
34+
verbose?: boolean
35+
detached?: boolean
36+
javaOpts?: string
37+
}
3838

39-
const childProcess = await dynamoDb.launch(options)
40-
dynamoDb.stopChild(childProcess)
41-
dynamoDb.stop(options.port)
42-
dynamoDb.relaunch()
39+
const childProcess = await dynamoDb.launch(options)
40+
dynamoDb.stopChild(childProcess)
41+
dynamoDb.stop(options.port)
42+
dynamoDb.relaunch()
4343

44-
dynamoDb.configureInstaller()
44+
dynamoDb.configureInstaller()
4545

46-
await dynamoDb.install()
47-
```
46+
await dynamoDb.install()
47+
```
4848

4949
### Example
5050

51-
```ts
52-
import { dynamoDb } from 'dynamodb-tooling'
53-
54-
const port = 8000
55-
// if you want to share with Bun Shell
56-
// eslint-disable-next-line antfu/no-top-level-await
57-
await dynamoDb.launch({
58-
port,
59-
additionalArgs: ['-sharedDb'],
60-
})
61-
// do your tests / trigger your logic
62-
dynamoDb.stop(port)
63-
```
64-
65-
Alternatively, you can use it as a detached server:
66-
67-
```ts
68-
const port = 8000
69-
const child = await dynamoDb.launch({ port })
70-
// trigger your logic
71-
await dynamoDb.stopChild(child)
72-
```
51+
```ts
52+
import { dynamoDb } from 'dynamodb-tooling'
53+
54+
const port = 8000
55+
// if you want to share with Bun Shell
56+
// eslint-disable-next-line antfu/no-top-level-await
57+
await dynamoDb.launch({
58+
port,
59+
additionalArgs: ['-sharedDb'],
60+
})
61+
// do your tests / trigger your logic
62+
dynamoDb.stop(port)
63+
```
64+
65+
Alternatively, you can use it as a detached server:
66+
67+
```ts
68+
const port = 8000
69+
const child = await dynamoDb.launch({ port })
70+
// trigger your logic
71+
await dynamoDb.stopChild(child)
72+
```
7373

7474
## Configuration
7575

76-
The client can be configured using a `dynamodb.config.ts` _(or `dynamodb.config.js`)_ file and it will be automatically loaded.
76+
The client can be configured using a `dynamodb.config.ts` _(or `dynamodb.config.js`)_ file and it will be automatically loaded.
7777

78-
```ts
79-
// dynamodb.config.ts (or dynamodb.config.js)
80-
export default {
81-
installPath: path.join(os.tmpdir(), 'dynamodb-local'),
82-
downloadUrl: 'https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_latest.tar.gz', // the official download URL
83-
}
84-
```
78+
```ts
79+
// dynamodb.config.ts (or dynamodb.config.js)
80+
export default {
81+
installPath: path.join(os.tmpdir(), 'dynamodb-local'),
82+
downloadUrl: 'https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_latest.tar.gz', // the official download URL
83+
}
84+
```
8585

8686
## Testing
8787

88-
```bash
89-
bun test
90-
```
88+
```bash
89+
bun test
90+
```
9191

9292
## Changelog
9393

94-
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
94+
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
9595

9696
## Contributing
9797

98-
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
98+
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
9999

100100
## Community
101101

102-
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
102+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
103103

104-
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
104+
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
105105

106-
For casual chit-chat with others using this package:
106+
For casual chit-chat with others using this package:
107107

108-
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
108+
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
109109

110110
## Postcardware
111111

112-
Stacks OSS will always stay open-sourced, and we will always love to receive postcards from wherever Stacks is used! _And we also publish them on our website. Thank you, Spatie._
112+
Stacks OSS will always stay open-sourced, and we will always love to receive postcards from wherever Stacks is used! _And we also publish them on our website. Thank you, Spatie._
113113

114-
Our address: Stacks.js, 5710 Crescent Park #107, Playa Vista 90094, CA, USA 🌎
114+
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎
115115

116116
## Sponsors
117117

118-
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
118+
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
119119

120-
-[JetBrains](https://www.jetbrains.com/)
121-
-[The Solana Foundation](https://solana.com/)
120+
- [JetBrains](https://www.jetbrains.com/)
121+
- [The Solana Foundation](https://solana.com/)
122122

123123
## Credits
124124

125-
-[dynamodb-toolbox](https://github.com/jeremydaly/dynamodb-toolbox)
126-
-[dynamodb-local](https://github.com/rynop/dynamodb-local)
127-
-[Chris Breuer](https://github.com/chrisbbreuer)
128-
-[All Contributors](../../contributors)
125+
- [dynamodb-toolbox](https://github.com/jeremydaly/dynamodb-toolbox)
126+
- [dynamodb-local](https://github.com/rynop/dynamodb-local)
127+
- [Chris Breuer](https://github.com/chrisbbreuer)
128+
- [All Contributors](../../contributors)
129129

130130
## License
131131

132-
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
132+
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
133133

134-
Made with 💙
134+
Made with 💙
135135

136-
<!-- Badges -->
137-
[npm-version-src]: https://img.shields.io/npm/v/bun-reverse-proxy?style=flat-square
138-
[npm-version-href]: https://npmjs.com/package/bun-reverse-proxy
139-
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/reverse-proxy/ci.yml?style=flat-square&branch=main
140-
[github-actions-href]: https://github.com/stacksjs/reverse-proxy/actions?query=workflow%3Aci
136+
<!-- Badges -->
137+
[npm-version-src]: https://img.shields.io/npm/v/bun-reverse-proxy?style=flat-square
138+
[npm-version-href]: https://npmjs.com/package/bun-reverse-proxy
139+
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/reverse-proxy/ci.yml?style=flat-square&branch=main
140+
[github-actions-href]: https://github.com/stacksjs/reverse-proxy/actions?query=workflow%3Aci
141141

142-
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/reverse-proxy/main?style=flat-square
143-
[codecov-href]: https://codecov.io/gh/stacksjs/reverse-proxy -->
142+
<!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/reverse-proxy/main?style=flat-square
143+
[codecov-href]: https://codecov.io/gh/stacksjs/reverse-proxy -->

biome.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"extends": ["@stacksjs/biome-config"]
4+
}

build.ts

+14-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,24 @@
11
import process from 'node:process'
22
import dts from 'bun-plugin-dts-auto'
33

4-
// eslint-disable-next-line no-console
54
console.log('Building...')
65

7-
Bun.build({
8-
entrypoints: [
9-
'src/index.ts',
10-
],
6+
const result = await Bun.build({
7+
entrypoints: ['src/index.ts'],
118

129
target: 'bun',
1310
outdir: './dist',
1411

15-
plugins: [
16-
dts(),
17-
],
12+
plugins: [dts()],
1813
})
19-
.then((result) => {
20-
if (result.success) {
21-
// eslint-disable-next-line no-console
22-
console.log('Build successful!')
23-
process.exit(0)
24-
}
25-
else {
26-
console.error('Build failed!', result)
27-
process.exit(1)
28-
}
29-
})
30-
.catch((err) => {
31-
console.error('Build process encountered an error:', err)
32-
process.exit(1)
33-
})
14+
15+
if (!result.success) {
16+
console.error('Build failed')
17+
for (const message of result.logs) {
18+
console.error(message)
19+
}
20+
process.exit(1)
21+
}
22+
23+
console.log('Build successful!')
24+
process.exit(0)

bun.lockb

-111 KB
Binary file not shown.

commitlint.config.js

+17-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
},
88
prompt: {
99
messages: {
10-
type: 'Select the type of change that you\'re committing:',
10+
type: "Select the type of change that you're committing:",
1111
scope: 'Select the SCOPE of this change (optional):',
1212
customScope: 'Select the SCOPE of this change:',
1313
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
@@ -23,12 +23,24 @@ export default {
2323
{ value: 'fix', name: 'fix: 🐛 A bug fix', emoji: ':bug:' },
2424
{ value: 'docs', name: 'docs: 📝 Documentation only changes', emoji: ':memo:' },
2525
{ value: 'style', name: 'style: 💄 Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
26-
{ value: 'refactor', name: 'refactor: ♻️ A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
26+
{
27+
value: 'refactor',
28+
name: 'refactor: ♻️ A code change that neither fixes a bug nor adds a feature',
29+
emoji: ':recycle:',
30+
},
2731
{ value: 'perf', name: 'perf: ⚡️ A code change that improves performance', emoji: ':zap:' },
28-
{ value: 'test', name: 'test: ✅ Adding missing tests or adjusting existing tests', emoji: ':white_check_mark:' },
29-
{ value: 'build', name: 'build: 📦️ Changes that affect the build system or external dependencies', emoji: ':package:' },
32+
{
33+
value: 'test',
34+
name: 'test: ✅ Adding missing tests or adjusting existing tests',
35+
emoji: ':white_check_mark:',
36+
},
37+
{
38+
value: 'build',
39+
name: 'build: 📦️ Changes that affect the build system or external dependencies',
40+
emoji: ':package:',
41+
},
3042
{ value: 'ci', name: 'ci: 🎡 Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
31-
{ value: 'chore', name: 'chore: 🔨 Other changes that don\'t modify src or test files', emoji: ':hammer:' },
43+
{ value: 'chore', name: "chore: 🔨 Other changes that don't modify src or test files", emoji: ':hammer:' },
3244
{ value: 'revert', name: 'revert: ⏪️ Reverts a previous commit', emoji: ':rewind:' },
3345
],
3446
useEmoji: false,

dynamodb.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Config } from './src/types'
21
import * as os from 'node:os'
32
import * as path from 'node:path'
3+
import type { Config } from './src/types'
44

55
export default {
66
port: 8000,

eslint.config.js

-5
This file was deleted.

0 commit comments

Comments
 (0)