@imqueue/pg-sequelize 4.2.0
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/CHANGELOG.md +50 -0
- package/CONTRIBUTING.md +58 -0
- package/CONTRIBUTION-TERMS.md +79 -0
- package/LICENSE +585 -0
- package/README.md +94 -0
- package/SECURITY.md +41 -0
- package/index.d.ts +86 -0
- package/index.js +87 -0
- package/package.json +75 -0
- package/src/BaseModel.d.ts +695 -0
- package/src/BaseModel.js +917 -0
- package/src/Graph.d.ts +215 -0
- package/src/Graph.js +257 -0
- package/src/decorators/AssociatedWith.d.ts +94 -0
- package/src/decorators/AssociatedWith.js +71 -0
- package/src/decorators/ColumnIndex.d.ts +206 -0
- package/src/decorators/ColumnIndex.js +98 -0
- package/src/decorators/CreatedBy.d.ts +27 -0
- package/src/decorators/CreatedBy.js +84 -0
- package/src/decorators/DeletedBy.d.ts +30 -0
- package/src/decorators/DeletedBy.js +89 -0
- package/src/decorators/DynamicView.d.ts +124 -0
- package/src/decorators/DynamicView.js +113 -0
- package/src/decorators/Emittable.d.ts +39 -0
- package/src/decorators/Emittable.js +42 -0
- package/src/decorators/NullableIndex.d.ts +77 -0
- package/src/decorators/NullableIndex.js +64 -0
- package/src/decorators/UpdatedBy.d.ts +27 -0
- package/src/decorators/UpdatedBy.js +105 -0
- package/src/decorators/View.d.ts +87 -0
- package/src/decorators/View.js +93 -0
- package/src/decorators/index.d.ts +32 -0
- package/src/decorators/index.js +33 -0
- package/src/helpers/index.d.ts +24 -0
- package/src/helpers/index.js +25 -0
- package/src/helpers/js.d.ts +61 -0
- package/src/helpers/js.js +88 -0
- package/src/helpers/query.d.ts +445 -0
- package/src/helpers/query.js +1095 -0
- package/src/index.d.ts +162 -0
- package/src/index.js +223 -0
- package/src/types/DataPage.d.ts +52 -0
- package/src/types/DataPage.js +2 -0
- package/src/types/FieldsInput.d.ts +41 -0
- package/src/types/FieldsInput.js +75 -0
- package/src/types/FilterInput.d.ts +136 -0
- package/src/types/FilterInput.js +291 -0
- package/src/types/JsonObject.d.ts +16 -0
- package/src/types/JsonObject.js +50 -0
- package/src/types/OrderByInput.d.ts +45 -0
- package/src/types/OrderByInput.js +80 -0
- package/src/types/PaginationInput.d.ts +44 -0
- package/src/types/PaginationInput.js +90 -0
- package/src/types/index.d.ts +30 -0
- package/src/types/index.js +31 -0
- package/src/types/ranges/DateRange.d.ts +27 -0
- package/src/types/ranges/DateRange.js +69 -0
- package/src/types/ranges/IRange.d.ts +47 -0
- package/src/types/ranges/IRange.js +2 -0
- package/src/types/ranges/NumericRange.d.ts +19 -0
- package/src/types/ranges/NumericRange.js +61 -0
- package/src/types/ranges/index.d.ts +26 -0
- package/src/types/ranges/index.js +27 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable changes to `@imqueue/pg-sequelize`.
|
|
4
|
+
|
|
5
|
+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [4.2.0] - 2026-08-01
|
|
8
|
+
|
|
9
|
+
The package is renamed from `@imqueue/sequelize` to `@imqueue/pg-sequelize`. No
|
|
10
|
+
export changed name or signature; the migration is the dependency and the import
|
|
11
|
+
specifiers.
|
|
12
|
+
|
|
13
|
+
`@imqueue/sequelize` is deprecated on npm and will receive no further releases.
|
|
14
|
+
There is no compatibility shim: 4.1.3, the last version published under the old
|
|
15
|
+
name, stays installable indefinitely and stays frozen.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Renamed on npm.** `npm i @imqueue/pg-sequelize`, and update every import
|
|
20
|
+
specifier.
|
|
21
|
+
|
|
22
|
+
The `pg-` prefix states what was already true. This package is Postgres-
|
|
23
|
+
specific rather than dialect-neutral: `pg` is a direct dependency, the index
|
|
24
|
+
decorators emit Postgres `CREATE INDEX` syntax including `CONCURRENTLY`, and
|
|
25
|
+
the filter operators (`ILIKE`, `~`, `@>`, `<@`, `&&`, `-|-`, …) are Postgres
|
|
26
|
+
operators. It also lines the name up with its sibling
|
|
27
|
+
[`@imqueue/pg-prisma`](https://github.com/imqueue/pg-prisma), which covers the
|
|
28
|
+
same ground for that stack.
|
|
29
|
+
|
|
30
|
+
- **`repository.url` was malformed and is now correct.** It read
|
|
31
|
+
`git@github.com:/imqueue/sequelize` — scp form with a stray slash after the
|
|
32
|
+
colon and no `.git` suffix — and was published that way. It is now
|
|
33
|
+
`git+https://github.com/imqueue/pg-sequelize.git`.
|
|
34
|
+
|
|
35
|
+
- **`bugs.url`** and the three README badges (build status, Snyk, license) point
|
|
36
|
+
at the renamed repository, and the API-reference link points at
|
|
37
|
+
<https://imqueue.org/api/pg-sequelize/latest/>.
|
|
38
|
+
|
|
39
|
+
- **The published description was silently truncated.** npm stores 255
|
|
40
|
+
characters and the description was 286, so it had been cut mid-word at
|
|
41
|
+
"…Sequelize cannot e" since 4.1.3. It is now 239 characters.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- **`keywords`.** There were none, so discoverability rested entirely on the
|
|
46
|
+
package name matching a search for "sequelize" — which the rename gives up.
|
|
47
|
+
The list keeps `sequelize` alongside `postgres`, `pg`, `orm` and the rest.
|
|
48
|
+
|
|
49
|
+
- **`publishConfig.access`**, so a first publish under a new scoped name cannot
|
|
50
|
+
land as a restricted package.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Contributing to @imqueue
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving @imqueue! Contributions of all kinds are
|
|
4
|
+
welcome — bug fixes, features, tests, and documentation.
|
|
5
|
+
|
|
6
|
+
## Contribution terms — please read first
|
|
7
|
+
|
|
8
|
+
@imqueue is **dual-licensed**: it is free to everyone under **GPL-3.0**, and it is
|
|
9
|
+
also offered under **commercial licenses** for closed-source use. To make that
|
|
10
|
+
sustainable, contributions are accepted under the
|
|
11
|
+
**[@imqueue Contribution Terms](./CONTRIBUTION-TERMS.md)**.
|
|
12
|
+
|
|
13
|
+
**By opening a pull request — or otherwise contributing — you agree to those
|
|
14
|
+
terms.** In short:
|
|
15
|
+
|
|
16
|
+
- You **keep the copyright** in your contribution.
|
|
17
|
+
- Your contribution stays available to everyone under **GPL-3.0**.
|
|
18
|
+
- You grant the project owner the right to **also license your contribution
|
|
19
|
+
commercially**, royalty-free — you will not receive a fee for it.
|
|
20
|
+
|
|
21
|
+
**If you do not agree, please do not contribute.** Read the full text in
|
|
22
|
+
[CONTRIBUTION-TERMS.md](./CONTRIBUTION-TERMS.md).
|
|
23
|
+
|
|
24
|
+
## How to contribute
|
|
25
|
+
|
|
26
|
+
1. **Open an issue first** for anything non-trivial, so we can agree on the
|
|
27
|
+
approach before you invest time.
|
|
28
|
+
2. **Fork** the repository and create a topic branch from `master`
|
|
29
|
+
(e.g. `fix/redis-reconnect` or `feat/lock-timeout`).
|
|
30
|
+
3. **Make your change**, following the existing code style. Keep pull requests
|
|
31
|
+
focused — one logical change per PR.
|
|
32
|
+
4. **Add or update tests** so the change is covered, and make sure the full suite
|
|
33
|
+
passes locally:
|
|
34
|
+
```bash
|
|
35
|
+
npm ci
|
|
36
|
+
npm test
|
|
37
|
+
```
|
|
38
|
+
5. **Write clear commit messages** and a descriptive PR title and summary.
|
|
39
|
+
6. **Open the pull request** against `master` and fill in the PR template,
|
|
40
|
+
including the contribution-terms checkbox.
|
|
41
|
+
|
|
42
|
+
## Guidelines
|
|
43
|
+
|
|
44
|
+
- Match the existing TypeScript style and formatting already used in the file you
|
|
45
|
+
are editing.
|
|
46
|
+
- Keep public API changes documented (doc-blocks / README as appropriate).
|
|
47
|
+
- Be respectful and constructive in reviews and discussions.
|
|
48
|
+
|
|
49
|
+
## Reporting security issues
|
|
50
|
+
|
|
51
|
+
Please **do not** open a public issue for security vulnerabilities. Report them
|
|
52
|
+
privately to the maintainers (see the repository's security policy or contact
|
|
53
|
+
address) so they can be addressed responsibly.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
Questions about the terms or a larger/corporate contribution? Reach out before you
|
|
58
|
+
start and we'll help.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @imqueue Contribution Terms (v1.0)
|
|
2
|
+
|
|
3
|
+
These terms apply to every contribution to any repository of the **@imqueue**
|
|
4
|
+
project — the packages published under the `@imqueue` npm scope and any repository
|
|
5
|
+
in the imqueue GitHub organisation.
|
|
6
|
+
|
|
7
|
+
**By submitting a contribution — opening a pull request, pushing a commit, sending
|
|
8
|
+
a patch, or otherwise offering work for inclusion — you accept these terms in
|
|
9
|
+
full. If you do not agree with them, do not contribute.**
|
|
10
|
+
|
|
11
|
+
In these terms, **"Owner"** means Mykhailo Stadnyk, together with his successors,
|
|
12
|
+
assigns and any entity he controls (including VaryLogic s.r.o.), and
|
|
13
|
+
**"Contribution"** means any work of authorship — code, documentation or other
|
|
14
|
+
material — you submit to an @imqueue repository.
|
|
15
|
+
|
|
16
|
+
## 1. What you grant
|
|
17
|
+
|
|
18
|
+
You grant the Owner a **perpetual, worldwide, irrevocable, royalty-free,
|
|
19
|
+
non-exclusive, transferable and sublicensable** license to use, reproduce,
|
|
20
|
+
modify, adapt, publish, distribute and otherwise exploit your Contribution and
|
|
21
|
+
derivative works of it, **and to license and sub-license it under any terms the
|
|
22
|
+
Owner chooses — including commercial and proprietary (closed-source) licenses,
|
|
23
|
+
without any obligation to release source code.**
|
|
24
|
+
|
|
25
|
+
In plain terms: the Owner may include your Contribution in @imqueue and **sell
|
|
26
|
+
commercial licenses that cover it**, alongside the open-source edition.
|
|
27
|
+
|
|
28
|
+
## 2. No royalties, fees or compensation
|
|
29
|
+
|
|
30
|
+
The rights above are granted **free of charge**. You **waive** any right to
|
|
31
|
+
royalties, license fees, revenue share or any other compensation arising from the
|
|
32
|
+
Owner's use or licensing of your Contribution, including its commercial licensing,
|
|
33
|
+
and you agree not to seek any such payment now or in the future.
|
|
34
|
+
|
|
35
|
+
## 3. You keep your copyright
|
|
36
|
+
|
|
37
|
+
You **retain ownership** of the copyright in your Contribution and may use it
|
|
38
|
+
elsewhere for your own purposes. You are granting the Owner the rights in Section
|
|
39
|
+
1 — you are not required to transfer ownership. Your Contribution also remains
|
|
40
|
+
available to the public under the repository's open-source license (GPL-3.0).
|
|
41
|
+
|
|
42
|
+
## 4. Patent license
|
|
43
|
+
|
|
44
|
+
You grant the Owner and all downstream recipients a perpetual, worldwide,
|
|
45
|
+
royalty-free, irrevocable (except as stated) patent license to make, use, sell,
|
|
46
|
+
offer to sell, import and transfer your Contribution, limited to the patent claims
|
|
47
|
+
you can license that are necessarily infringed by your Contribution alone or in
|
|
48
|
+
combination with the project. If you start patent litigation alleging the project
|
|
49
|
+
or your Contribution infringes your patents, the patent license you received
|
|
50
|
+
terminates.
|
|
51
|
+
|
|
52
|
+
## 5. Your promises
|
|
53
|
+
|
|
54
|
+
You confirm that: (a) the Contribution is your own original work, or you have the
|
|
55
|
+
right to submit it and to grant these rights; (b) if your employer has any rights
|
|
56
|
+
in your work, you have their permission to contribute, or they have waived those
|
|
57
|
+
rights; and (c) you have identified any third-party material in your Contribution
|
|
58
|
+
and its license.
|
|
59
|
+
|
|
60
|
+
## 6. Moral rights
|
|
61
|
+
|
|
62
|
+
To the maximum extent permitted by applicable law, you waive, or agree not to
|
|
63
|
+
exercise, any moral rights in your Contribution in a way that would prevent the
|
|
64
|
+
Owner from exercising the rights in Section 1. (Certain moral rights are
|
|
65
|
+
inalienable under Slovak/EU law; nothing here purports to transfer those.)
|
|
66
|
+
|
|
67
|
+
## 7. No obligation; "as is"
|
|
68
|
+
|
|
69
|
+
The Owner is under no obligation to use your Contribution. It is provided **"as
|
|
70
|
+
is"**, without warranty of any kind.
|
|
71
|
+
|
|
72
|
+
## 8. Governing law
|
|
73
|
+
|
|
74
|
+
These terms are governed by the laws of the Slovak Republic, without regard to its
|
|
75
|
+
conflict-of-laws rules.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
**If you do not agree to all of the above, do not contribute to @imqueue.**
|