@sqlane/core 0.0.0-stage → 0.0.1
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 +21 -0
- package/README.md +41 -2
- package/package.json +68 -3
- package/src/index.js +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Klim Pal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sqlane
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@sqlane/core` on npm.
|
|
4
|
+
|
|
5
|
+
Transactional SQL job queue for Node.js, backed by MySQL or PostgreSQL.
|
|
6
|
+
|
|
7
|
+
> Work in progress: this version is a name placeholder, with no code yet. See the [design](docs/design.md).
|
|
8
|
+
|
|
9
|
+
## Goals
|
|
10
|
+
|
|
11
|
+
- Enqueue a job in your business transaction: no commit, no job.
|
|
12
|
+
- Many queues at low cost: idle queues add no load to the database.
|
|
13
|
+
- Low latency: a job starts in milliseconds after the commit.
|
|
14
|
+
- MySQL and PostgreSQL.
|
|
15
|
+
- MIT license.
|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
|
|
19
|
+
Requires [mise](https://mise.jdx.dev). It installs Node.js, pnpm, hk, betterleaks and typos (`mise.toml`).
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
mise install
|
|
23
|
+
pnpm install
|
|
24
|
+
hk install --global --mise # Git hooks, also for GUI Git clients: lint, format, type check, secrets, typos, Conventional Commits
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Command | Does |
|
|
28
|
+
| ------------------- | ---------------------------------------------------------- |
|
|
29
|
+
| `pnpm test` | Run the tests (Vitest) |
|
|
30
|
+
| `pnpm lint` | Lint, including formatting (oxlint, @stylistic) |
|
|
31
|
+
| `pnpm lint:fix` | Fix lint and formatting |
|
|
32
|
+
| `pnpm format` | Format the other files: JSON, YAML, Markdown, TOML (oxfmt) |
|
|
33
|
+
| `pnpm lint:package` | Check the package that npm would publish (publint) |
|
|
34
|
+
| `pnpm typecheck` | Type-check the JSDoc (`tsc`, no emit) |
|
|
35
|
+
| `pnpm check` | Run all hook checks on all files (`hk check --all`) |
|
|
36
|
+
|
|
37
|
+
Commit messages follow [Conventional Commits](https://www.conventionalcommits.org). A change of the package adds a
|
|
38
|
+
changeset (`pnpm changeset`); see [releasing](docs/releasing.md).
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqlane/core",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Transactional SQL job queue for Node.js (MySQL, PostgreSQL)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"background-jobs",
|
|
7
|
+
"job",
|
|
8
|
+
"mysql",
|
|
9
|
+
"outbox",
|
|
10
|
+
"postgres",
|
|
11
|
+
"postgresql",
|
|
12
|
+
"queue",
|
|
13
|
+
"transactional"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/sqlane/sqlane-node#readme",
|
|
16
|
+
"bugs": "https://github.com/sqlane/sqlane-node/issues",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Klim Pal",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/sqlane/sqlane-node.git"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"src",
|
|
25
|
+
"!src/**/*.test.js"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": "./src/index.js"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@changesets/changelog-github": "1.0.1",
|
|
36
|
+
"@changesets/cli": "3.0.3",
|
|
37
|
+
"@stylistic/eslint-plugin": "5.10.0",
|
|
38
|
+
"@testcontainers/mysql": "12.2.1",
|
|
39
|
+
"@testcontainers/postgresql": "12.2.1",
|
|
40
|
+
"@types/node": "22.20.5",
|
|
41
|
+
"@types/pg": "8.23.1",
|
|
42
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
43
|
+
"mysql2": "3.24.6",
|
|
44
|
+
"oxfmt": "0.75.0",
|
|
45
|
+
"oxlint": "1.90.0",
|
|
46
|
+
"pg": "8.23.1",
|
|
47
|
+
"publint": "0.3.25",
|
|
48
|
+
"testcontainers": "12.2.1",
|
|
49
|
+
"typescript": "7.0.2",
|
|
50
|
+
"vitest": "5.0.5"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=22.12.0"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"lint": "oxlint --deny-warnings",
|
|
57
|
+
"lint:fix": "oxlint --fix",
|
|
58
|
+
"lint:package": "publint --strict",
|
|
59
|
+
"format": "oxfmt",
|
|
60
|
+
"format:check": "oxfmt --check",
|
|
61
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
62
|
+
"test": "vitest run",
|
|
63
|
+
"test:unit": "vitest run --project unit",
|
|
64
|
+
"test:integration": "vitest run --project 'integration:*'",
|
|
65
|
+
"test:watch": "vitest",
|
|
66
|
+
"test:coverage": "vitest run --coverage",
|
|
67
|
+
"check": "hk check --all",
|
|
68
|
+
"changeset": "changeset",
|
|
69
|
+
"changeset:version": "changeset version && oxfmt --no-error-on-unmatched-pattern CHANGELOG.md"
|
|
70
|
+
}
|
|
6
71
|
}
|
package/src/index.js
ADDED