bigal 15.11.3 → 15.11.5
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 +4 -0
- package/docs/.vitepress/config.ts +26 -2
- package/docs/.vitepress/theme/custom.css +71 -2
- package/docs/advanced/bigal-vs-raw-sql.md +4 -0
- package/docs/advanced/known-issues.md +4 -0
- package/docs/getting-started.md +4 -0
- package/docs/guide/crud-operations.md +4 -0
- package/docs/guide/models.md +4 -0
- package/docs/guide/querying.md +22 -0
- package/docs/guide/relationships.md +4 -0
- package/docs/guide/subqueries-and-joins.md +4 -0
- package/docs/guide/views.md +4 -0
- package/docs/index.md +0 -1
- package/docs/package-lock.json +123 -120
- package/docs/package.json +1 -1
- package/{context7.json → docs/public/context7.json} +3 -1
- package/docs/reference/api.md +4 -0
- package/docs/reference/configuration.md +4 -0
- package/package.json +8 -7
- package/release.config.mjs +11 -8
- package/.agents/skills/enforcing-typescript-standards/SKILL.md +0 -412
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [15.11.5](https://github.com/bigalorm/bigal/compare/v15.11.4...v15.11.5) (2026-03-23)
|
|
2
|
+
|
|
3
|
+
## [15.11.4](https://github.com/bigalorm/bigal/compare/v15.11.3...v15.11.4) (2026-03-12)
|
|
4
|
+
|
|
1
5
|
## [15.11.3](https://github.com/bigalorm/bigal/compare/v15.11.2...v15.11.3) (2026-03-12)
|
|
2
6
|
|
|
3
7
|
## [15.11.2](https://github.com/bigalorm/bigal/compare/v15.11.1...v15.11.2) (2026-03-12)
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { defineConfig } from 'vitepress';
|
|
2
2
|
import llmstxt from 'vitepress-plugin-llms';
|
|
3
3
|
|
|
4
|
+
const SITE_URL = 'https://bigalorm.github.io/bigal';
|
|
5
|
+
const SITE_DESCRIPTION = 'A PostgreSQL-optimized, type-safe TypeScript ORM for Node.js';
|
|
6
|
+
|
|
4
7
|
export default defineConfig({
|
|
5
8
|
title: 'BigAl',
|
|
6
|
-
description:
|
|
9
|
+
description: SITE_DESCRIPTION,
|
|
7
10
|
base: '/bigal/',
|
|
8
11
|
appearance: 'force-dark',
|
|
12
|
+
sitemap: {
|
|
13
|
+
hostname: SITE_URL,
|
|
14
|
+
},
|
|
9
15
|
head: [
|
|
10
16
|
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
|
|
11
17
|
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
|
|
@@ -13,11 +19,29 @@ export default defineConfig({
|
|
|
13
19
|
'link',
|
|
14
20
|
{
|
|
15
21
|
rel: 'stylesheet',
|
|
16
|
-
href: 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=
|
|
22
|
+
href: 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Source+Code+Pro:wght@400;500&family=Source+Sans+3:wght@400;500;600&display=swap',
|
|
17
23
|
},
|
|
18
24
|
],
|
|
19
25
|
['link', { rel: 'llms-txt', href: '/bigal/llms.txt' }],
|
|
26
|
+
['meta', { property: 'og:site_name', content: 'BigAl' }],
|
|
27
|
+
['meta', { property: 'og:type', content: 'website' }],
|
|
28
|
+
['meta', { name: 'twitter:card', content: 'summary' }],
|
|
20
29
|
],
|
|
30
|
+
transformPageData(pageData) {
|
|
31
|
+
const isHome = pageData.frontmatter.layout === 'home';
|
|
32
|
+
const title = isHome ? 'BigAl — PostgreSQL-optimized TypeScript ORM' : `${pageData.title} | BigAl`;
|
|
33
|
+
const description = pageData.frontmatter.description || SITE_DESCRIPTION;
|
|
34
|
+
const canonicalUrl = `${SITE_URL}/${pageData.relativePath}`.replace(/index\.md$/, '').replace(/\.md$/, '');
|
|
35
|
+
|
|
36
|
+
pageData.frontmatter.head ??= [];
|
|
37
|
+
pageData.frontmatter.head.push(
|
|
38
|
+
['meta', { property: 'og:title', content: title }],
|
|
39
|
+
['meta', { property: 'og:description', content: description }],
|
|
40
|
+
['meta', { property: 'og:url', content: canonicalUrl }],
|
|
41
|
+
['meta', { name: 'twitter:title', content: title }],
|
|
42
|
+
['meta', { name: 'twitter:description', content: description }],
|
|
43
|
+
);
|
|
44
|
+
},
|
|
21
45
|
themeConfig: {
|
|
22
46
|
nav: [
|
|
23
47
|
{ text: 'Guide', link: '/getting-started' },
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
/* Typography */
|
|
27
27
|
--bigal-font-display: 'DM Sans', sans-serif;
|
|
28
28
|
--bigal-font-body: 'Source Sans 3', sans-serif;
|
|
29
|
-
--bigal-font-mono: '
|
|
29
|
+
--bigal-font-mono: 'Source Code Pro', monospace;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/* Map to VitePress theme variables */
|
|
@@ -101,12 +101,57 @@
|
|
|
101
101
|
color: var(--bigal-text-muted);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
/*
|
|
104
|
+
/* Vite-style nav: title + links left, search + social right */
|
|
105
|
+
.VPNavBarTitle .title {
|
|
106
|
+
color: var(--bigal-accent-text);
|
|
107
|
+
font-family: var(--bigal-font-display);
|
|
108
|
+
font-size: 1.375rem;
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.VPNavBarMenu {
|
|
113
|
+
order: -1;
|
|
114
|
+
padding-left: 16px;
|
|
115
|
+
font-size: 1.1rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
105
118
|
.VPNavBarSearch {
|
|
106
119
|
flex-grow: 1;
|
|
107
120
|
justify-content: flex-end;
|
|
108
121
|
}
|
|
109
122
|
|
|
123
|
+
/* Full-width nav above sidebar (vite.dev style) —
|
|
124
|
+
!important needed to override VitePress scoped [data-v-*] selectors */
|
|
125
|
+
@media (min-width: 960px) {
|
|
126
|
+
/* Target the wrapper div (not the <a> link which also has class .title) */
|
|
127
|
+
.VPNavBar.has-sidebar div.title {
|
|
128
|
+
position: static !important;
|
|
129
|
+
width: auto !important;
|
|
130
|
+
padding: 0 0 0 32px !important;
|
|
131
|
+
height: auto !important;
|
|
132
|
+
border-bottom: none !important;
|
|
133
|
+
background-color: var(--bigal-bg) !important;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Remove the sidebar-width divider border that VitePress puts
|
|
137
|
+
under the title link on has-sidebar pages, and restore full height
|
|
138
|
+
so the title text is vertically centered in the nav bar */
|
|
139
|
+
.VPNavBarTitle.has-sidebar a.title {
|
|
140
|
+
border-bottom: none !important;
|
|
141
|
+
padding-left: 0 !important;
|
|
142
|
+
height: var(--vp-nav-height, 64px) !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.VPNavBar.has-sidebar .content {
|
|
146
|
+
padding-left: 0 !important;
|
|
147
|
+
padding-right: 32px !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.VPNavBar.has-sidebar .divider {
|
|
151
|
+
padding-left: 0 !important;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
110
155
|
/* Sidebar refinements */
|
|
111
156
|
.VPSidebar {
|
|
112
157
|
font-family: var(--bigal-font-body);
|
|
@@ -133,3 +178,27 @@
|
|
|
133
178
|
.vp-doc table tr:nth-child(even) {
|
|
134
179
|
background: var(--bigal-bg-deep);
|
|
135
180
|
}
|
|
181
|
+
|
|
182
|
+
/* Thin scrollbars (vite.dev style) */
|
|
183
|
+
* {
|
|
184
|
+
scrollbar-width: thin;
|
|
185
|
+
scrollbar-color: var(--bigal-border) transparent;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
::-webkit-scrollbar {
|
|
189
|
+
width: 6px;
|
|
190
|
+
height: 6px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
::-webkit-scrollbar-track {
|
|
194
|
+
background: transparent;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
::-webkit-scrollbar-thumb {
|
|
198
|
+
background: var(--bigal-border);
|
|
199
|
+
border-radius: 3px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
::-webkit-scrollbar-thumb:hover {
|
|
203
|
+
background: var(--bigal-text-faint);
|
|
204
|
+
}
|
package/docs/getting-started.md
CHANGED
package/docs/guide/models.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Define PostgreSQL tables as TypeScript classes with decorators for columns, primary keys, relationships, and automatic timestamps.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Models
|
|
2
6
|
|
|
3
7
|
Models map TypeScript classes to PostgreSQL tables. Every model extends `Entity` and uses decorators for table and column configuration.
|
package/docs/guide/querying.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fluent query builder for find, findOne, and count with WHERE operators, JSONB querying, pagination, sorting, DISTINCT ON, and populate.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Querying
|
|
2
6
|
|
|
3
7
|
BigAl provides `findOne()`, `find()`, and `count()` methods on repositories. Queries use a fluent builder pattern —
|
|
@@ -164,6 +168,24 @@ await repo.find().where({ bar: { a: { b: { c: 'value' } } } });
|
|
|
164
168
|
// SQL: WHERE "bar"->'a'->'b'->>'c'=$1
|
|
165
169
|
```
|
|
166
170
|
|
|
171
|
+
### Null checks
|
|
172
|
+
|
|
173
|
+
Check if a JSONB property is null or not null:
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
await repo.find().where({ bar: { theme: null } });
|
|
177
|
+
// SQL: WHERE "bar"->>'theme' IS NULL
|
|
178
|
+
|
|
179
|
+
await repo.find().where({ bar: { theme: { '!': null } } });
|
|
180
|
+
// SQL: WHERE "bar"->>'theme' IS NOT NULL
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Note that `IS NULL` on a JSONB property is true both when the key is missing from the object and when it is
|
|
184
|
+
explicitly set to `null`. This matches PostgreSQL's behavior — the `->>` operator returns `NULL` in both cases.
|
|
185
|
+
|
|
186
|
+
Properties set to `undefined` in a where clause are silently ignored (standard JavaScript — `undefined` values are
|
|
187
|
+
dropped by `Object.entries`). To query for missing or null properties, always use `null` explicitly.
|
|
188
|
+
|
|
167
189
|
### JSONB containment
|
|
168
190
|
|
|
169
191
|
Combine `contains` with property access:
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Many-to-one, one-to-many, and many-to-many relationships with decorators, QueryResult type narrowing, and populate options.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Relationships
|
|
2
6
|
|
|
3
7
|
BigAl supports three relationship patterns via the `@column` decorator: many-to-one, one-to-many, and many-to-many.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Type-safe subqueries for WHERE IN, EXISTS, and scalar comparisons. Model joins, subquery joins, aggregates, GROUP BY, and HAVING.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Subqueries and Joins
|
|
2
6
|
|
|
3
7
|
BigAl supports subqueries for WHERE clauses, scalar comparisons, and joins. All subqueries are type-safe and composable.
|
package/docs/guide/views.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Map PostgreSQL views to readonly models with ReadonlyRepository. Supports inheritance, schema options, and all query features.
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Views and Readonly Repositories
|
|
2
6
|
|
|
3
7
|
BigAl does not distinguish between tables and views. Both use the `@table()` decorator. Setting `readonly: true` causes
|
package/docs/index.md
CHANGED
package/docs/package-lock.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"name": "bigal-docs",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"vitepress": "1.6.4",
|
|
10
|
-
"vitepress-plugin-llms": "1.
|
|
10
|
+
"vitepress-plugin-llms": "1.12.0"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"node_modules/@algolia/abtesting": {
|
|
@@ -289,9 +289,9 @@
|
|
|
289
289
|
}
|
|
290
290
|
},
|
|
291
291
|
"node_modules/@babel/parser": {
|
|
292
|
-
"version": "7.29.
|
|
293
|
-
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.
|
|
294
|
-
"integrity": "sha512-
|
|
292
|
+
"version": "7.29.2",
|
|
293
|
+
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",
|
|
294
|
+
"integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",
|
|
295
295
|
"dev": true,
|
|
296
296
|
"license": "MIT",
|
|
297
297
|
"dependencies": {
|
|
@@ -761,9 +761,9 @@
|
|
|
761
761
|
}
|
|
762
762
|
},
|
|
763
763
|
"node_modules/@iconify-json/simple-icons": {
|
|
764
|
-
"version": "1.2.
|
|
765
|
-
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.
|
|
766
|
-
"integrity": "sha512-
|
|
764
|
+
"version": "1.2.74",
|
|
765
|
+
"resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.74.tgz",
|
|
766
|
+
"integrity": "sha512-yqaohfY6jnYjTVpuTkaBQHrWbdUrQyWXhau0r/0EZiNWYXPX/P8WWwl1DoLH5CbvDjjcWQw5J0zADhgCUklOqA==",
|
|
767
767
|
"dev": true,
|
|
768
768
|
"license": "CC0-1.0",
|
|
769
769
|
"dependencies": {
|
|
@@ -785,9 +785,9 @@
|
|
|
785
785
|
"license": "MIT"
|
|
786
786
|
},
|
|
787
787
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
|
788
|
-
"version": "4.
|
|
789
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.
|
|
790
|
-
"integrity": "sha512-
|
|
788
|
+
"version": "4.60.0",
|
|
789
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz",
|
|
790
|
+
"integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==",
|
|
791
791
|
"cpu": [
|
|
792
792
|
"arm"
|
|
793
793
|
],
|
|
@@ -799,9 +799,9 @@
|
|
|
799
799
|
]
|
|
800
800
|
},
|
|
801
801
|
"node_modules/@rollup/rollup-android-arm64": {
|
|
802
|
-
"version": "4.
|
|
803
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.
|
|
804
|
-
"integrity": "sha512-
|
|
802
|
+
"version": "4.60.0",
|
|
803
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz",
|
|
804
|
+
"integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==",
|
|
805
805
|
"cpu": [
|
|
806
806
|
"arm64"
|
|
807
807
|
],
|
|
@@ -813,9 +813,9 @@
|
|
|
813
813
|
]
|
|
814
814
|
},
|
|
815
815
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
|
816
|
-
"version": "4.
|
|
817
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.
|
|
818
|
-
"integrity": "sha512-
|
|
816
|
+
"version": "4.60.0",
|
|
817
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz",
|
|
818
|
+
"integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==",
|
|
819
819
|
"cpu": [
|
|
820
820
|
"arm64"
|
|
821
821
|
],
|
|
@@ -827,9 +827,9 @@
|
|
|
827
827
|
]
|
|
828
828
|
},
|
|
829
829
|
"node_modules/@rollup/rollup-darwin-x64": {
|
|
830
|
-
"version": "4.
|
|
831
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.
|
|
832
|
-
"integrity": "sha512-
|
|
830
|
+
"version": "4.60.0",
|
|
831
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz",
|
|
832
|
+
"integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==",
|
|
833
833
|
"cpu": [
|
|
834
834
|
"x64"
|
|
835
835
|
],
|
|
@@ -841,9 +841,9 @@
|
|
|
841
841
|
]
|
|
842
842
|
},
|
|
843
843
|
"node_modules/@rollup/rollup-freebsd-arm64": {
|
|
844
|
-
"version": "4.
|
|
845
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.
|
|
846
|
-
"integrity": "sha512-
|
|
844
|
+
"version": "4.60.0",
|
|
845
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz",
|
|
846
|
+
"integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==",
|
|
847
847
|
"cpu": [
|
|
848
848
|
"arm64"
|
|
849
849
|
],
|
|
@@ -855,9 +855,9 @@
|
|
|
855
855
|
]
|
|
856
856
|
},
|
|
857
857
|
"node_modules/@rollup/rollup-freebsd-x64": {
|
|
858
|
-
"version": "4.
|
|
859
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.
|
|
860
|
-
"integrity": "sha512-
|
|
858
|
+
"version": "4.60.0",
|
|
859
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz",
|
|
860
|
+
"integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==",
|
|
861
861
|
"cpu": [
|
|
862
862
|
"x64"
|
|
863
863
|
],
|
|
@@ -869,9 +869,9 @@
|
|
|
869
869
|
]
|
|
870
870
|
},
|
|
871
871
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
|
872
|
-
"version": "4.
|
|
873
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.
|
|
874
|
-
"integrity": "sha512-
|
|
872
|
+
"version": "4.60.0",
|
|
873
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz",
|
|
874
|
+
"integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==",
|
|
875
875
|
"cpu": [
|
|
876
876
|
"arm"
|
|
877
877
|
],
|
|
@@ -883,9 +883,9 @@
|
|
|
883
883
|
]
|
|
884
884
|
},
|
|
885
885
|
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
|
886
|
-
"version": "4.
|
|
887
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.
|
|
888
|
-
"integrity": "sha512-
|
|
886
|
+
"version": "4.60.0",
|
|
887
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz",
|
|
888
|
+
"integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==",
|
|
889
889
|
"cpu": [
|
|
890
890
|
"arm"
|
|
891
891
|
],
|
|
@@ -897,9 +897,9 @@
|
|
|
897
897
|
]
|
|
898
898
|
},
|
|
899
899
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
|
900
|
-
"version": "4.
|
|
901
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.
|
|
902
|
-
"integrity": "sha512-
|
|
900
|
+
"version": "4.60.0",
|
|
901
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz",
|
|
902
|
+
"integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==",
|
|
903
903
|
"cpu": [
|
|
904
904
|
"arm64"
|
|
905
905
|
],
|
|
@@ -911,9 +911,9 @@
|
|
|
911
911
|
]
|
|
912
912
|
},
|
|
913
913
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
|
914
|
-
"version": "4.
|
|
915
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.
|
|
916
|
-
"integrity": "sha512-
|
|
914
|
+
"version": "4.60.0",
|
|
915
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz",
|
|
916
|
+
"integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==",
|
|
917
917
|
"cpu": [
|
|
918
918
|
"arm64"
|
|
919
919
|
],
|
|
@@ -925,9 +925,9 @@
|
|
|
925
925
|
]
|
|
926
926
|
},
|
|
927
927
|
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
|
928
|
-
"version": "4.
|
|
929
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.
|
|
930
|
-
"integrity": "sha512-
|
|
928
|
+
"version": "4.60.0",
|
|
929
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz",
|
|
930
|
+
"integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==",
|
|
931
931
|
"cpu": [
|
|
932
932
|
"loong64"
|
|
933
933
|
],
|
|
@@ -939,9 +939,9 @@
|
|
|
939
939
|
]
|
|
940
940
|
},
|
|
941
941
|
"node_modules/@rollup/rollup-linux-loong64-musl": {
|
|
942
|
-
"version": "4.
|
|
943
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.
|
|
944
|
-
"integrity": "sha512-
|
|
942
|
+
"version": "4.60.0",
|
|
943
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz",
|
|
944
|
+
"integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==",
|
|
945
945
|
"cpu": [
|
|
946
946
|
"loong64"
|
|
947
947
|
],
|
|
@@ -953,9 +953,9 @@
|
|
|
953
953
|
]
|
|
954
954
|
},
|
|
955
955
|
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
|
956
|
-
"version": "4.
|
|
957
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.
|
|
958
|
-
"integrity": "sha512-
|
|
956
|
+
"version": "4.60.0",
|
|
957
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz",
|
|
958
|
+
"integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==",
|
|
959
959
|
"cpu": [
|
|
960
960
|
"ppc64"
|
|
961
961
|
],
|
|
@@ -967,9 +967,9 @@
|
|
|
967
967
|
]
|
|
968
968
|
},
|
|
969
969
|
"node_modules/@rollup/rollup-linux-ppc64-musl": {
|
|
970
|
-
"version": "4.
|
|
971
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.
|
|
972
|
-
"integrity": "sha512
|
|
970
|
+
"version": "4.60.0",
|
|
971
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz",
|
|
972
|
+
"integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==",
|
|
973
973
|
"cpu": [
|
|
974
974
|
"ppc64"
|
|
975
975
|
],
|
|
@@ -981,9 +981,9 @@
|
|
|
981
981
|
]
|
|
982
982
|
},
|
|
983
983
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
|
984
|
-
"version": "4.
|
|
985
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.
|
|
986
|
-
"integrity": "sha512-
|
|
984
|
+
"version": "4.60.0",
|
|
985
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz",
|
|
986
|
+
"integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==",
|
|
987
987
|
"cpu": [
|
|
988
988
|
"riscv64"
|
|
989
989
|
],
|
|
@@ -995,9 +995,9 @@
|
|
|
995
995
|
]
|
|
996
996
|
},
|
|
997
997
|
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
|
998
|
-
"version": "4.
|
|
999
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.
|
|
1000
|
-
"integrity": "sha512-
|
|
998
|
+
"version": "4.60.0",
|
|
999
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz",
|
|
1000
|
+
"integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==",
|
|
1001
1001
|
"cpu": [
|
|
1002
1002
|
"riscv64"
|
|
1003
1003
|
],
|
|
@@ -1009,9 +1009,9 @@
|
|
|
1009
1009
|
]
|
|
1010
1010
|
},
|
|
1011
1011
|
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
|
1012
|
-
"version": "4.
|
|
1013
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.
|
|
1014
|
-
"integrity": "sha512-
|
|
1012
|
+
"version": "4.60.0",
|
|
1013
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz",
|
|
1014
|
+
"integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==",
|
|
1015
1015
|
"cpu": [
|
|
1016
1016
|
"s390x"
|
|
1017
1017
|
],
|
|
@@ -1023,9 +1023,9 @@
|
|
|
1023
1023
|
]
|
|
1024
1024
|
},
|
|
1025
1025
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
|
1026
|
-
"version": "4.
|
|
1027
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.
|
|
1028
|
-
"integrity": "sha512-
|
|
1026
|
+
"version": "4.60.0",
|
|
1027
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz",
|
|
1028
|
+
"integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==",
|
|
1029
1029
|
"cpu": [
|
|
1030
1030
|
"x64"
|
|
1031
1031
|
],
|
|
@@ -1037,9 +1037,9 @@
|
|
|
1037
1037
|
]
|
|
1038
1038
|
},
|
|
1039
1039
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
|
1040
|
-
"version": "4.
|
|
1041
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.
|
|
1042
|
-
"integrity": "sha512-
|
|
1040
|
+
"version": "4.60.0",
|
|
1041
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz",
|
|
1042
|
+
"integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==",
|
|
1043
1043
|
"cpu": [
|
|
1044
1044
|
"x64"
|
|
1045
1045
|
],
|
|
@@ -1051,9 +1051,9 @@
|
|
|
1051
1051
|
]
|
|
1052
1052
|
},
|
|
1053
1053
|
"node_modules/@rollup/rollup-openbsd-x64": {
|
|
1054
|
-
"version": "4.
|
|
1055
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.
|
|
1056
|
-
"integrity": "sha512-
|
|
1054
|
+
"version": "4.60.0",
|
|
1055
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz",
|
|
1056
|
+
"integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==",
|
|
1057
1057
|
"cpu": [
|
|
1058
1058
|
"x64"
|
|
1059
1059
|
],
|
|
@@ -1065,9 +1065,9 @@
|
|
|
1065
1065
|
]
|
|
1066
1066
|
},
|
|
1067
1067
|
"node_modules/@rollup/rollup-openharmony-arm64": {
|
|
1068
|
-
"version": "4.
|
|
1069
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.
|
|
1070
|
-
"integrity": "sha512-
|
|
1068
|
+
"version": "4.60.0",
|
|
1069
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz",
|
|
1070
|
+
"integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==",
|
|
1071
1071
|
"cpu": [
|
|
1072
1072
|
"arm64"
|
|
1073
1073
|
],
|
|
@@ -1079,9 +1079,9 @@
|
|
|
1079
1079
|
]
|
|
1080
1080
|
},
|
|
1081
1081
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
|
1082
|
-
"version": "4.
|
|
1083
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.
|
|
1084
|
-
"integrity": "sha512-
|
|
1082
|
+
"version": "4.60.0",
|
|
1083
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz",
|
|
1084
|
+
"integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==",
|
|
1085
1085
|
"cpu": [
|
|
1086
1086
|
"arm64"
|
|
1087
1087
|
],
|
|
@@ -1093,9 +1093,9 @@
|
|
|
1093
1093
|
]
|
|
1094
1094
|
},
|
|
1095
1095
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
|
1096
|
-
"version": "4.
|
|
1097
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.
|
|
1098
|
-
"integrity": "sha512-
|
|
1096
|
+
"version": "4.60.0",
|
|
1097
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz",
|
|
1098
|
+
"integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==",
|
|
1099
1099
|
"cpu": [
|
|
1100
1100
|
"ia32"
|
|
1101
1101
|
],
|
|
@@ -1107,9 +1107,9 @@
|
|
|
1107
1107
|
]
|
|
1108
1108
|
},
|
|
1109
1109
|
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
|
1110
|
-
"version": "4.
|
|
1111
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.
|
|
1112
|
-
"integrity": "sha512-
|
|
1110
|
+
"version": "4.60.0",
|
|
1111
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz",
|
|
1112
|
+
"integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==",
|
|
1113
1113
|
"cpu": [
|
|
1114
1114
|
"x64"
|
|
1115
1115
|
],
|
|
@@ -1121,9 +1121,9 @@
|
|
|
1121
1121
|
]
|
|
1122
1122
|
},
|
|
1123
1123
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
|
1124
|
-
"version": "4.
|
|
1125
|
-
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.
|
|
1126
|
-
"integrity": "sha512-
|
|
1124
|
+
"version": "4.60.0",
|
|
1125
|
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz",
|
|
1126
|
+
"integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==",
|
|
1127
1127
|
"cpu": [
|
|
1128
1128
|
"x64"
|
|
1129
1129
|
],
|
|
@@ -1222,9 +1222,9 @@
|
|
|
1222
1222
|
"license": "MIT"
|
|
1223
1223
|
},
|
|
1224
1224
|
"node_modules/@types/debug": {
|
|
1225
|
-
"version": "4.1.
|
|
1226
|
-
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.
|
|
1227
|
-
"integrity": "sha512-
|
|
1225
|
+
"version": "4.1.13",
|
|
1226
|
+
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",
|
|
1227
|
+
"integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==",
|
|
1228
1228
|
"dev": true,
|
|
1229
1229
|
"license": "MIT",
|
|
1230
1230
|
"dependencies": {
|
|
@@ -3159,9 +3159,9 @@
|
|
|
3159
3159
|
"license": "MIT"
|
|
3160
3160
|
},
|
|
3161
3161
|
"node_modules/rollup": {
|
|
3162
|
-
"version": "4.
|
|
3163
|
-
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.
|
|
3164
|
-
"integrity": "sha512-
|
|
3162
|
+
"version": "4.60.0",
|
|
3163
|
+
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz",
|
|
3164
|
+
"integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==",
|
|
3165
3165
|
"dev": true,
|
|
3166
3166
|
"license": "MIT",
|
|
3167
3167
|
"dependencies": {
|
|
@@ -3175,31 +3175,31 @@
|
|
|
3175
3175
|
"npm": ">=8.0.0"
|
|
3176
3176
|
},
|
|
3177
3177
|
"optionalDependencies": {
|
|
3178
|
-
"@rollup/rollup-android-arm-eabi": "4.
|
|
3179
|
-
"@rollup/rollup-android-arm64": "4.
|
|
3180
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
3181
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
3182
|
-
"@rollup/rollup-freebsd-arm64": "4.
|
|
3183
|
-
"@rollup/rollup-freebsd-x64": "4.
|
|
3184
|
-
"@rollup/rollup-linux-arm-gnueabihf": "4.
|
|
3185
|
-
"@rollup/rollup-linux-arm-musleabihf": "4.
|
|
3186
|
-
"@rollup/rollup-linux-arm64-gnu": "4.
|
|
3187
|
-
"@rollup/rollup-linux-arm64-musl": "4.
|
|
3188
|
-
"@rollup/rollup-linux-loong64-gnu": "4.
|
|
3189
|
-
"@rollup/rollup-linux-loong64-musl": "4.
|
|
3190
|
-
"@rollup/rollup-linux-ppc64-gnu": "4.
|
|
3191
|
-
"@rollup/rollup-linux-ppc64-musl": "4.
|
|
3192
|
-
"@rollup/rollup-linux-riscv64-gnu": "4.
|
|
3193
|
-
"@rollup/rollup-linux-riscv64-musl": "4.
|
|
3194
|
-
"@rollup/rollup-linux-s390x-gnu": "4.
|
|
3195
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
3196
|
-
"@rollup/rollup-linux-x64-musl": "4.
|
|
3197
|
-
"@rollup/rollup-openbsd-x64": "4.
|
|
3198
|
-
"@rollup/rollup-openharmony-arm64": "4.
|
|
3199
|
-
"@rollup/rollup-win32-arm64-msvc": "4.
|
|
3200
|
-
"@rollup/rollup-win32-ia32-msvc": "4.
|
|
3201
|
-
"@rollup/rollup-win32-x64-gnu": "4.
|
|
3202
|
-
"@rollup/rollup-win32-x64-msvc": "4.
|
|
3178
|
+
"@rollup/rollup-android-arm-eabi": "4.60.0",
|
|
3179
|
+
"@rollup/rollup-android-arm64": "4.60.0",
|
|
3180
|
+
"@rollup/rollup-darwin-arm64": "4.60.0",
|
|
3181
|
+
"@rollup/rollup-darwin-x64": "4.60.0",
|
|
3182
|
+
"@rollup/rollup-freebsd-arm64": "4.60.0",
|
|
3183
|
+
"@rollup/rollup-freebsd-x64": "4.60.0",
|
|
3184
|
+
"@rollup/rollup-linux-arm-gnueabihf": "4.60.0",
|
|
3185
|
+
"@rollup/rollup-linux-arm-musleabihf": "4.60.0",
|
|
3186
|
+
"@rollup/rollup-linux-arm64-gnu": "4.60.0",
|
|
3187
|
+
"@rollup/rollup-linux-arm64-musl": "4.60.0",
|
|
3188
|
+
"@rollup/rollup-linux-loong64-gnu": "4.60.0",
|
|
3189
|
+
"@rollup/rollup-linux-loong64-musl": "4.60.0",
|
|
3190
|
+
"@rollup/rollup-linux-ppc64-gnu": "4.60.0",
|
|
3191
|
+
"@rollup/rollup-linux-ppc64-musl": "4.60.0",
|
|
3192
|
+
"@rollup/rollup-linux-riscv64-gnu": "4.60.0",
|
|
3193
|
+
"@rollup/rollup-linux-riscv64-musl": "4.60.0",
|
|
3194
|
+
"@rollup/rollup-linux-s390x-gnu": "4.60.0",
|
|
3195
|
+
"@rollup/rollup-linux-x64-gnu": "4.60.0",
|
|
3196
|
+
"@rollup/rollup-linux-x64-musl": "4.60.0",
|
|
3197
|
+
"@rollup/rollup-openbsd-x64": "4.60.0",
|
|
3198
|
+
"@rollup/rollup-openharmony-arm64": "4.60.0",
|
|
3199
|
+
"@rollup/rollup-win32-arm64-msvc": "4.60.0",
|
|
3200
|
+
"@rollup/rollup-win32-ia32-msvc": "4.60.0",
|
|
3201
|
+
"@rollup/rollup-win32-x64-gnu": "4.60.0",
|
|
3202
|
+
"@rollup/rollup-win32-x64-msvc": "4.60.0",
|
|
3203
3203
|
"fsevents": "~2.3.2"
|
|
3204
3204
|
}
|
|
3205
3205
|
},
|
|
@@ -3631,26 +3631,29 @@
|
|
|
3631
3631
|
}
|
|
3632
3632
|
},
|
|
3633
3633
|
"node_modules/vitepress-plugin-llms": {
|
|
3634
|
-
"version": "1.
|
|
3635
|
-
"resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.
|
|
3636
|
-
"integrity": "sha512-
|
|
3634
|
+
"version": "1.12.0",
|
|
3635
|
+
"resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.12.0.tgz",
|
|
3636
|
+
"integrity": "sha512-zuzL7a8UJuGl46le5cAy/QxKMGlpSylcsLjDDn6BYPc1u+eP3nzoQk9ne9XFBqrE7exoJlIYJELVN8HMgYlFKQ==",
|
|
3637
3637
|
"dev": true,
|
|
3638
3638
|
"license": "MIT",
|
|
3639
3639
|
"dependencies": {
|
|
3640
3640
|
"gray-matter": "^4.0.3",
|
|
3641
3641
|
"markdown-it": "^14.1.0",
|
|
3642
3642
|
"markdown-title": "^1.0.2",
|
|
3643
|
-
"mdast-util-from-markdown": "^2.0.
|
|
3643
|
+
"mdast-util-from-markdown": "^2.0.3",
|
|
3644
3644
|
"millify": "^6.1.0",
|
|
3645
|
-
"minimatch": "^10.
|
|
3645
|
+
"minimatch": "^10.2.4",
|
|
3646
3646
|
"path-to-regexp": "^6.3.0",
|
|
3647
3647
|
"picocolors": "^1.1.1",
|
|
3648
3648
|
"pretty-bytes": "^7.1.0",
|
|
3649
3649
|
"remark": "^15.0.1",
|
|
3650
3650
|
"remark-frontmatter": "^5.0.0",
|
|
3651
|
-
"tokenx": "^1.
|
|
3651
|
+
"tokenx": "^1.3.0",
|
|
3652
3652
|
"unist-util-remove": "^4.0.0",
|
|
3653
|
-
"unist-util-visit": "^5.
|
|
3653
|
+
"unist-util-visit": "^5.1.0"
|
|
3654
|
+
},
|
|
3655
|
+
"engines": {
|
|
3656
|
+
"node": ">=18.0.0"
|
|
3654
3657
|
},
|
|
3655
3658
|
"funding": {
|
|
3656
3659
|
"url": "https://github.com/sponsors/okineadev"
|
package/docs/package.json
CHANGED
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
"description": "Type-safe PostgreSQL ORM for Node.js/TypeScript with fluent query builder, decorator-based models, and immutable query state.",
|
|
4
4
|
"folders": ["docs/", "src/", "README.md"],
|
|
5
5
|
"excludeFolders": ["internal/", "tests/", "node_modules/"],
|
|
6
|
-
"excludeFiles": ["*.test.ts", "*.spec.ts"]
|
|
6
|
+
"excludeFiles": ["*.test.ts", "*.spec.ts"],
|
|
7
|
+
"url": "https://context7.com/websites/bigalorm_github_io_bigal",
|
|
8
|
+
"public_key": "pk_zVEcoyB1XDzPT2mrbBDG3"
|
|
7
9
|
}
|
package/docs/reference/api.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bigal",
|
|
3
|
-
"version": "15.11.
|
|
3
|
+
"version": "15.11.5",
|
|
4
4
|
"description": "A type-safe PostgreSQL ORM for Node.js, written in TypeScript. Features a fluent query builder, decorator-based models, and immutable query state.",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -48,22 +48,23 @@
|
|
|
48
48
|
"@semantic-release/npm": "13.1.5",
|
|
49
49
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
50
50
|
"@types/node": ">=22",
|
|
51
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
51
|
+
"@typescript/native-preview": "7.0.0-dev.20260322.1",
|
|
52
|
+
"conventional-changelog-conventionalcommits": "9.3.0",
|
|
52
53
|
"eslint-plugin-vitest": "0.5.4",
|
|
53
54
|
"husky": "9.1.7",
|
|
54
|
-
"lint-staged": "16.
|
|
55
|
+
"lint-staged": "16.4.0",
|
|
55
56
|
"markdownlint-cli": "0.48.0",
|
|
56
57
|
"npm-run-all2": "8.0.4",
|
|
57
|
-
"oxfmt": "0.
|
|
58
|
-
"oxlint": "1.
|
|
59
|
-
"oxlint-tsgolint": "0.
|
|
58
|
+
"oxfmt": "0.41.0",
|
|
59
|
+
"oxlint": "1.56.0",
|
|
60
|
+
"oxlint-tsgolint": "0.17.1",
|
|
60
61
|
"pinst": "3.0.0",
|
|
61
62
|
"postgres-pool": "11.0.4",
|
|
62
63
|
"semantic-release": "25.0.3",
|
|
63
64
|
"strict-event-emitter-types": "2.0.0",
|
|
64
65
|
"typescript": "5.9.3",
|
|
65
66
|
"unbuild": "3.6.1",
|
|
66
|
-
"vitest": "4.0
|
|
67
|
+
"vitest": "4.1.0"
|
|
67
68
|
},
|
|
68
69
|
"scripts": {
|
|
69
70
|
"build": "unbuild",
|
package/release.config.mjs
CHANGED
|
@@ -10,23 +10,26 @@ export default {
|
|
|
10
10
|
[
|
|
11
11
|
'@semantic-release/commit-analyzer',
|
|
12
12
|
{
|
|
13
|
-
preset: '
|
|
13
|
+
preset: 'conventionalcommits',
|
|
14
14
|
releaseRules: [
|
|
15
|
-
{
|
|
15
|
+
{ breaking: true, release: 'major' },
|
|
16
|
+
{ revert: true, release: 'patch' },
|
|
17
|
+
{ type: 'docs', release: false },
|
|
16
18
|
{ type: 'feat', release: 'minor' },
|
|
17
19
|
{ type: 'fix', release: 'patch' },
|
|
18
20
|
{ type: 'test', release: 'patch' },
|
|
19
21
|
{ type: 'chore', release: 'patch' },
|
|
20
22
|
{ type: 'chore', scope: 'deps', release: false },
|
|
23
|
+
{ type: 'chore', scope: 'docs', release: false },
|
|
21
24
|
],
|
|
22
|
-
parserOpts: {
|
|
23
|
-
// eslint-disable-next-line security/detect-unsafe-regex
|
|
24
|
-
headerPattern: /^(\w+)(?:\(([^)]+)\))?: (.+)$/,
|
|
25
|
-
headerCorrespondence: ['type', 'scope', 'subject'],
|
|
26
|
-
},
|
|
27
25
|
},
|
|
28
26
|
],
|
|
29
|
-
|
|
27
|
+
[
|
|
28
|
+
'@semantic-release/release-notes-generator',
|
|
29
|
+
{
|
|
30
|
+
preset: 'conventionalcommits',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
30
33
|
[
|
|
31
34
|
'@semantic-release/changelog',
|
|
32
35
|
{
|
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: enforcing-typescript-standards
|
|
3
|
-
description: Enforces the project's core TypeScript standards including explicit typing, import organization, class member ordering, and code safety rules. ALWAYS apply when creating, modifying, or reviewing any TypeScript (.ts/.tsx) file.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Enforcing TypeScript Standards
|
|
7
|
-
|
|
8
|
-
Enforces the project's core TypeScript standards including explicit typing, import organization, class member ordering, and code safety rules.
|
|
9
|
-
|
|
10
|
-
## Triggers
|
|
11
|
-
|
|
12
|
-
Activate this skill when the user says or implies any of these:
|
|
13
|
-
|
|
14
|
-
- "write", "create", "implement", "add", "build" (new TypeScript code)
|
|
15
|
-
- "fix", "update", "change", "modify", "refactor" (existing TypeScript code)
|
|
16
|
-
- "review", "check", "improve", "clean up" (code quality)
|
|
17
|
-
- Any request involving `.ts` or `.tsx` files
|
|
18
|
-
|
|
19
|
-
Specific triggers:
|
|
20
|
-
|
|
21
|
-
- Creating a new `.ts` or `.tsx` file
|
|
22
|
-
- Modifying existing TypeScript code
|
|
23
|
-
- Reviewing TypeScript code for compliance
|
|
24
|
-
|
|
25
|
-
## Core Standards
|
|
26
|
-
|
|
27
|
-
### Type Safety
|
|
28
|
-
|
|
29
|
-
- **Explicit return types**: Prefer explicit return types when practical; omit when inference is obvious and adds no clarity
|
|
30
|
-
- **Explicit member accessibility**: Class members require `public`, `private`, or `protected`
|
|
31
|
-
- **Type-only imports**: Use `import type` for types: `import type { Foo } from './foo.js'`
|
|
32
|
-
- **Sorted type constituents**: Union/intersection types must be alphabetically sorted
|
|
33
|
-
- **Only throw Error objects**: Never throw strings or other primitives
|
|
34
|
-
- **Avoid `any` and type assertions**: Prefer proper typing over `any` or `as` casts; use them only when truly necessary
|
|
35
|
-
- **Type JSON fields explicitly**: Use `Record<string, unknown>` or specific interfaces for JSON data, never `any`
|
|
36
|
-
- **Use Number() for conversion**: Prefer `Number(value)` over `parseInt(value, 10)` or `parseFloat(value)`
|
|
37
|
-
- **Reuse existing types**: Before defining a new interface, search for existing types that can be reused directly, extended, or derived using `Pick`, `Omit`, `Partial`, or other utility types
|
|
38
|
-
|
|
39
|
-
#### Alternatives to Type Assertions
|
|
40
|
-
|
|
41
|
-
Before using `as`, try these approaches in order:
|
|
42
|
-
|
|
43
|
-
1. Proper typing at the source
|
|
44
|
-
2. Type guards (`typeof`, `instanceof`)
|
|
45
|
-
3. Type narrowing through control flow
|
|
46
|
-
4. Custom type predicate functions
|
|
47
|
-
5. Discriminated unions
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
// Bad
|
|
51
|
-
const user = data as User;
|
|
52
|
-
|
|
53
|
-
// Good
|
|
54
|
-
function isUser(data: unknown): data is User {
|
|
55
|
-
return typeof data === 'object' && data !== null && 'id' in data;
|
|
56
|
-
}
|
|
57
|
-
if (isUser(data)) {
|
|
58
|
-
// data is now typed as User
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Import Organization
|
|
63
|
-
|
|
64
|
-
- **Import order**: built-in → external → internal → parent → sibling → index (alphabetized within groups)
|
|
65
|
-
- **No duplicate imports**: Consolidate imports from the same module
|
|
66
|
-
- **Newline after imports**: Empty line required after import block
|
|
67
|
-
|
|
68
|
-
### Class Member Ordering
|
|
69
|
-
|
|
70
|
-
1. Signatures (call/construct)
|
|
71
|
-
2. Fields: private → public → protected
|
|
72
|
-
3. Constructors: public → protected → private
|
|
73
|
-
4. Methods: public → protected → private
|
|
74
|
-
|
|
75
|
-
### Code Style
|
|
76
|
-
|
|
77
|
-
- **Simplicity over cleverness**: Straightforward, readable code is better than clever one-liners
|
|
78
|
-
- **Early returns**: Use guard clauses to reduce nesting; return early for edge cases
|
|
79
|
-
- **Nullish coalescing**: Prefer `??` over `||` for defaults (avoids false positives on `0` or `''`)
|
|
80
|
-
- **Optional chaining**: Use `?.` for safe property access
|
|
81
|
-
- **Match existing patterns**: Follow conventions already established in the codebase
|
|
82
|
-
- **Meaningful identifiers**: Names must be descriptive (exceptions: `_`, `i`, `j`, `k`, `e`, `x`, `y`)
|
|
83
|
-
- **Function declarations**: Use `function foo()` not `const foo = function()`
|
|
84
|
-
- **Prefer const**: Use `const` unless reassignment is needed
|
|
85
|
-
- **No var**: Always use `const` or `let`
|
|
86
|
-
- **Object shorthand**: Use `{ foo }` not `{ foo: foo }`
|
|
87
|
-
- **Template literals**: Use `` `Hello ${name}` `` not `'Hello ' + name`
|
|
88
|
-
- **Strict equality**: Use `===` except for null comparisons
|
|
89
|
-
- **One class per file**: Maximum one class definition per file
|
|
90
|
-
- **Avoid `reduce`**: Prefer `for...of` loops or other array methods for clarity
|
|
91
|
-
- **Functions over classes**: Prefer exported functions over classes with static methods (unless state is needed)
|
|
92
|
-
- **No nested functions**: Define helper functions at module level, not inside other functions
|
|
93
|
-
- **Immutability**: Create new objects/arrays instead of mutating existing ones
|
|
94
|
-
|
|
95
|
-
### Naming Conventions
|
|
96
|
-
|
|
97
|
-
- **Enum members**: Use `PascalCase` (e.g., `MyValue`)
|
|
98
|
-
- **No trailing underscores**: Identifiers cannot end with `_`
|
|
99
|
-
|
|
100
|
-
### Comments
|
|
101
|
-
|
|
102
|
-
- **No redundant comments**: Never comment what the code already expresses clearly
|
|
103
|
-
- **No duplicate comments**: Don't repeat information from function names, types, or nearby comments
|
|
104
|
-
- **Meaningful only**: Only add comments to explain _why_, not _what_ — the code shows what it does
|
|
105
|
-
|
|
106
|
-
### Boolean Expressions
|
|
107
|
-
|
|
108
|
-
- **Prefer truthiness checks**: Use implicit truthy/falsy checks over explicit comparisons
|
|
109
|
-
- **Exception**: Use explicit checks when distinguishing `0`/`''` (valid values) from `null`/`undefined` is semantically important
|
|
110
|
-
|
|
111
|
-
### Testing
|
|
112
|
-
|
|
113
|
-
- **Minimize mocking**: Avoid mocking everything; use real implementations and data generators when available
|
|
114
|
-
- **Test real behavior**: Testing mocks provides little value — test actual code paths
|
|
115
|
-
- **Don't be lazy**: Write thorough tests that cover edge cases, not just happy paths
|
|
116
|
-
|
|
117
|
-
### Error Handling
|
|
118
|
-
|
|
119
|
-
- **Specific error types**: Prefer specific error types over generic `Error` when meaningful
|
|
120
|
-
- **Avoid silent failures**: Don't swallow errors with empty catch blocks
|
|
121
|
-
- **Handle rejections**: Always handle promise rejections
|
|
122
|
-
- **Let errors propagate**: Don't catch errors just to re-throw or log — let them bubble up to error handlers
|
|
123
|
-
|
|
124
|
-
## Negative Knowledge
|
|
125
|
-
|
|
126
|
-
Avoid these antipatterns:
|
|
127
|
-
|
|
128
|
-
- `console.log()` statements in production code
|
|
129
|
-
- `eval()` or `Function()` constructor
|
|
130
|
-
- Nested ternary operators
|
|
131
|
-
- `await` inside loops when `Promise.all` would be simpler (sequential awaits are fine when order matters or parallelism adds complexity)
|
|
132
|
-
- Empty interfaces
|
|
133
|
-
- Variable shadowing
|
|
134
|
-
- Functions defined inside loops
|
|
135
|
-
- `@ts-ignore` without explanation (use `@ts-expect-error` with 10+ char description)
|
|
136
|
-
- Comments that restate the code: `// increment counter` above `counter++`
|
|
137
|
-
- Comments that duplicate type information: `// returns a string` when return type is `: string`
|
|
138
|
-
- Commented-out code (delete it; use version control)
|
|
139
|
-
- Verbose boolean comparisons: `arr.length > 0`, `str !== ''`, `obj !== null && obj !== undefined`
|
|
140
|
-
- Disabling linter rules via comments (fix the code instead)
|
|
141
|
-
- Overuse of `any` type or `as` type assertions
|
|
142
|
-
- Over-mocking in tests instead of using real implementations or data generators
|
|
143
|
-
- Empty catch blocks that silently swallow errors
|
|
144
|
-
- Using `||` for defaults when `??` is more appropriate
|
|
145
|
-
- Deep nesting when early returns would simplify
|
|
146
|
-
- Catching errors just to re-throw or log them
|
|
147
|
-
- Nested function definitions inside other functions
|
|
148
|
-
- Mutating objects/arrays instead of creating new ones
|
|
149
|
-
- TOCTOU: Checking file/resource existence before operating (try and handle errors instead)
|
|
150
|
-
- Classes with only static methods (use plain functions instead)
|
|
151
|
-
- Duplicating existing interfaces instead of reusing or deriving with `Pick`/`Omit`/`Partial`
|
|
152
|
-
|
|
153
|
-
## Verification Workflow
|
|
154
|
-
|
|
155
|
-
1. **Analyze**: Compare the code change against these TypeScript standards
|
|
156
|
-
2. **Generate/Refactor**: Write or modify code to comply with all rules above
|
|
157
|
-
3. **Simplify**: Review for opportunities to simplify — prefer clear, straightforward code over clever solutions
|
|
158
|
-
4. **Review naming**: Verify variable and function names still make sense in context after changes
|
|
159
|
-
5. **Build**: Verify types compile without errors (e.g., `npm run build` or `npx tsc --noEmit`)
|
|
160
|
-
6. **Lint**: Run `npm run lint` to confirm compliance before completing the task
|
|
161
|
-
|
|
162
|
-
## Examples
|
|
163
|
-
|
|
164
|
-
### Comments Examples
|
|
165
|
-
|
|
166
|
-
```ts
|
|
167
|
-
// Standard
|
|
168
|
-
// Retry with exponential backoff to handle transient network failures
|
|
169
|
-
async function fetchWithRetry(url: string, attempts = 3): Promise<Response> {
|
|
170
|
-
for (let i = 0; i < attempts; i++) {
|
|
171
|
-
try {
|
|
172
|
-
return await fetch(url);
|
|
173
|
-
} catch {
|
|
174
|
-
await sleep(2 ** i * 100);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
throw new Error(`Failed after ${attempts} attempts`);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Non-Standard
|
|
181
|
-
/**
|
|
182
|
-
* Fetches data from a URL with retry logic
|
|
183
|
-
* @param url - The URL to fetch from
|
|
184
|
-
* @param attempts - Number of attempts (default 3)
|
|
185
|
-
* @returns A Promise that resolves to a Response
|
|
186
|
-
*/
|
|
187
|
-
async function fetchWithRetry(url: string, attempts = 3): Promise<Response> {
|
|
188
|
-
// Loop through attempts
|
|
189
|
-
for (let i = 0; i < attempts; i++) {
|
|
190
|
-
try {
|
|
191
|
-
// Try to fetch the URL
|
|
192
|
-
return await fetch(url);
|
|
193
|
-
} catch {
|
|
194
|
-
// Wait before retrying
|
|
195
|
-
await sleep(2 ** i * 100);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
// Throw error if all attempts fail
|
|
199
|
-
throw new Error(`Failed after ${attempts} attempts`);
|
|
200
|
-
}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Boolean Expressions Examples
|
|
204
|
-
|
|
205
|
-
```ts
|
|
206
|
-
// Standard
|
|
207
|
-
if (myArray.length) {
|
|
208
|
-
}
|
|
209
|
-
if (myString) {
|
|
210
|
-
}
|
|
211
|
-
if (myObject) {
|
|
212
|
-
}
|
|
213
|
-
if (!value) {
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// Non-Standard
|
|
217
|
-
if (myArray.length !== 0) {
|
|
218
|
-
}
|
|
219
|
-
if (myArray.length > 0) {
|
|
220
|
-
}
|
|
221
|
-
if (myString !== '') {
|
|
222
|
-
}
|
|
223
|
-
if (myObject !== null && myObject !== undefined) {
|
|
224
|
-
}
|
|
225
|
-
if (value === null || value === undefined) {
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Early Return Examples
|
|
230
|
-
|
|
231
|
-
```ts
|
|
232
|
-
// Standard
|
|
233
|
-
function processUser(user: User | null): Result {
|
|
234
|
-
if (!user) {
|
|
235
|
-
return { error: 'No user provided' };
|
|
236
|
-
}
|
|
237
|
-
if (!user.isActive) {
|
|
238
|
-
return { error: 'User is inactive' };
|
|
239
|
-
}
|
|
240
|
-
return { data: transform(user) };
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Non-Standard
|
|
244
|
-
function processUser(user: User | null): Result {
|
|
245
|
-
if (user) {
|
|
246
|
-
if (user.isActive) {
|
|
247
|
-
return { data: transform(user) };
|
|
248
|
-
} else {
|
|
249
|
-
return { error: 'User is inactive' };
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
return { error: 'No user provided' };
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### Functions Over Classes Examples
|
|
258
|
-
|
|
259
|
-
```ts
|
|
260
|
-
// Standard
|
|
261
|
-
export function calculateTotal(items: Item[]): number {
|
|
262
|
-
return items.reduce((sum, item) => sum + item.price, 0);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export function formatCurrency(amount: number): string {
|
|
266
|
-
return `$${amount.toFixed(2)}`;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Non-Standard
|
|
270
|
-
export class Calculator {
|
|
271
|
-
static calculateTotal(items: Item[]): number {
|
|
272
|
-
return items.reduce((sum, item) => sum + item.price, 0);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
static formatCurrency(amount: number): string {
|
|
276
|
-
return `$${amount.toFixed(2)}`;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### No Nested Functions Examples
|
|
282
|
-
|
|
283
|
-
```ts
|
|
284
|
-
// Standard
|
|
285
|
-
function transformItem(item: Item): TransformedItem {
|
|
286
|
-
return { id: item.id, name: item.name.toUpperCase() };
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
async function processItems(items: Item[]): Promise<TransformedItem[]> {
|
|
290
|
-
return items.map(transformItem);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// Non-Standard
|
|
294
|
-
async function processItems(items: Item[]): Promise<TransformedItem[]> {
|
|
295
|
-
function transformItem(item: Item): TransformedItem {
|
|
296
|
-
return { id: item.id, name: item.name.toUpperCase() };
|
|
297
|
-
}
|
|
298
|
-
return items.map(transformItem);
|
|
299
|
-
}
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### Immutability Examples
|
|
303
|
-
|
|
304
|
-
```ts
|
|
305
|
-
// Standard
|
|
306
|
-
function addItem(items: Item[], newItem: Item): Item[] {
|
|
307
|
-
return [...items, newItem];
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
function removeItem(items: Item[], id: string): Item[] {
|
|
311
|
-
return items.filter((item) => item.id !== id);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function updateItem(items: Item[], id: string, updates: Partial<Item>): Item[] {
|
|
315
|
-
return items.map((item) => (item.id === id ? { ...item, ...updates } : item));
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Non-Standard
|
|
319
|
-
function addItem(items: Item[], newItem: Item): Item[] {
|
|
320
|
-
items.push(newItem);
|
|
321
|
-
return items;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function removeItem(items: Item[], id: string): Item[] {
|
|
325
|
-
const index = items.findIndex((item) => item.id === id);
|
|
326
|
-
items.splice(index, 1);
|
|
327
|
-
return items;
|
|
328
|
-
}
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
### Error Propagation Examples
|
|
332
|
-
|
|
333
|
-
```ts
|
|
334
|
-
// Standard
|
|
335
|
-
async function getUser(id: string): Promise<User> {
|
|
336
|
-
return userService.findById(id);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Non-Standard
|
|
340
|
-
async function getUser(id: string): Promise<User> {
|
|
341
|
-
try {
|
|
342
|
-
return await userService.findById(id);
|
|
343
|
-
} catch (error) {
|
|
344
|
-
console.error(error);
|
|
345
|
-
throw error;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
### TOCTOU Examples
|
|
351
|
-
|
|
352
|
-
```ts
|
|
353
|
-
// Standard
|
|
354
|
-
async function readConfig(path: string): Promise<Config> {
|
|
355
|
-
try {
|
|
356
|
-
const content = await readFile(path, 'utf-8');
|
|
357
|
-
return JSON.parse(content);
|
|
358
|
-
} catch (error) {
|
|
359
|
-
if (isNotFoundError(error)) {
|
|
360
|
-
return defaultConfig;
|
|
361
|
-
}
|
|
362
|
-
throw error;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// Non-Standard
|
|
367
|
-
async function readConfig(path: string): Promise<Config> {
|
|
368
|
-
if (await fileExists(path)) {
|
|
369
|
-
const content = await readFile(path, 'utf-8');
|
|
370
|
-
return JSON.parse(content);
|
|
371
|
-
}
|
|
372
|
-
return defaultConfig;
|
|
373
|
-
}
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
### Type Reuse Examples
|
|
377
|
-
|
|
378
|
-
```ts
|
|
379
|
-
// Given an existing type
|
|
380
|
-
interface User {
|
|
381
|
-
id: string;
|
|
382
|
-
email: string;
|
|
383
|
-
name: string;
|
|
384
|
-
passwordHash: string;
|
|
385
|
-
createdAt: Date;
|
|
386
|
-
updatedAt: Date;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// Standard - derive from existing type
|
|
390
|
-
type PublicUser = Omit<User, 'passwordHash'>;
|
|
391
|
-
type UserSummary = Pick<User, 'id' | 'name'>;
|
|
392
|
-
type UserUpdate = Partial<Pick<User, 'email' | 'name'>>;
|
|
393
|
-
|
|
394
|
-
// Non-Standard - duplicating fields that already exist
|
|
395
|
-
interface PublicUser {
|
|
396
|
-
id: string;
|
|
397
|
-
email: string;
|
|
398
|
-
name: string;
|
|
399
|
-
createdAt: Date;
|
|
400
|
-
updatedAt: Date;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
interface UserSummary {
|
|
404
|
-
id: string;
|
|
405
|
-
name: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
interface UserUpdate {
|
|
409
|
-
email?: string;
|
|
410
|
-
name?: string;
|
|
411
|
-
}
|
|
412
|
-
```
|