@@ -68,14 +68,40 @@ rate-limit-postgresql
68
68
│ ├── tsconfig.cjs.json
69
69
│ └── tsconfig.esm.json
70
70
├── contributing.md
71
+ ├── db
72
+ │ ├── cli
73
+ │ │ ├── apply_all_migrations.sh
74
+ │ │ ├── init_db.sh
75
+ │ │ └── run_tests.sh
76
+ │ ├── linting
77
+ │ │ ├── lint.sh
78
+ │ │ └── requirements.txt
79
+ │ └── tests
80
+ │ ├── performance
81
+ │ │ ├── aggregated_ip.test.sql
82
+ │ │ └── individual_ip.test.sql
83
+ │ └── unit
84
+ │ ├── agg_decrement.test.sql
85
+ │ ├── agg_increment.test.sql
86
+ │ ├── agg_reset_key.test.sql
87
+ │ ├── agg_reset_session.test.sql
88
+ │ ├── ind_decrement.test.sql
89
+ │ ├── ind_increment.test.sql
90
+ │ ├── ind_reset_key.test.sql
91
+ │ ├── ind_reset_session.test.sql
92
+ │ ├── session_reset.test.sql
93
+ │ └── session_select.test.sql
71
94
├── license.md
72
95
├── package.json
73
96
├── package-lock.json
74
97
├── readme.md
75
98
├── source
76
99
│ ├── index.ts
77
100
│ ├── migrations
78
- │ │ └── 1-init.sql
101
+ │ │ ├── 1-init.sql
102
+ │ │ ├── 2-add-db-functions-agg.sql
103
+ │ │ ├── 3-add-db-functions-ind.sql
104
+ │ │ └── 4-add-db-functions-sessions.sql
79
105
│ ├── models
80
106
│ │ └── session.ts
81
107
│ ├── stores
@@ -92,11 +118,12 @@ rate-limit-postgresql
92
118
│ │ └── store_individual_ip.spec.ts
93
119
│ └── util
94
120
│ └── session_handler.spec.ts
95
- └── third_party_licenses
96
- ├── dev_detailed.json
97
- ├── dev_summary.txt
98
- ├── production_detailed.json
99
- └── production_summary.txt
121
+ ├── third_party_licenses
122
+ │ ├── dev_detailed.json
123
+ │ ├── dev_summary.txt
124
+ │ ├── production_detailed.json
125
+ │ └── production_summary.txt
126
+ └── tsconfig.json
100
127
```
101
128
102
129
> The content of ` third_party_licenses ` is auto-generated.
@@ -120,10 +147,22 @@ applied, etc.
120
147
121
148
- ` tsconfig.*.json ` : The Typescript configuration files for this project.
122
149
150
+ #### ` db/ `
151
+
152
+ - ` db/cli/*.sh ` : Bash scripts used by the database part of the CI pipeline
153
+ - ` db/linting/lint.sh ` : Bash scripts used for linting SQL files as part of the
154
+ database CI pipeline
155
+ - ` db/linting/.sqlfluff ` : Configuration file for the ` sqlfluff ` linter
156
+ - ` db/linting/requirements.txt ` : Python dependencies for the ` sqlfluff ` linter
157
+ - ` db/tests/performance/*.test.sql ` : Performance tests for the stored procedures
158
+ (using ` pg_tap ` )
159
+ - ` db/cli/unit/.test.sql ` : Unit tests for the stored procedures (using ` pg_tap ` )
160
+
123
161
#### ` source/ `
124
162
125
163
- ` source/migrations/*.sql ` : Database migrations that are applied by
126
- ` postgres-migrations ` ` source/models/*.ts ` : Relevant types (e.g., Session)
164
+ ` postgres-migrations `
165
+ - ` source/models/*.ts ` : Relevant types (e.g., Session)
127
166
- ` source/util/*.ts ` : The centralized business logic for handling session
128
167
validity (` session_handler.ts ` ) and migration handling
129
168
(` migration_handler.ts ` )
0 commit comments