100 Commits
Author SHA1 Message Date
Tau d6d98aa561 v016 2021-02-04 17:03:11 -05:00
Tau 2c78e6646a Fix trailing comma in SQL 2021-02-04 17:02:23 -05:00
Tau 0f8010ae8d v015 2021-02-04 16:47:21 -05:00
Tau cb5db5e55f idz: Drop idz_team_auto_uq constraint 2021-02-04 16:41:42 -05:00
Tau 37660a382a v014 2021-02-03 18:51:28 -05:00
Tau e43faeff10 idz: Fix SqlTeamRepository 2021-02-03 23:43:46 +00:00
Tau 85aad3377e idz: Fix SqlStampsRepository 2021-02-03 23:43:45 +00:00
Tau dbffb15779 idz: Fix SqlProfileRepository 2021-02-03 23:43:45 +00:00
Tau 1f544ddb7e idz: Fix SqlMyCharaRepository 2021-02-03 23:43:45 +00:00
Tau afe9f27c25 idz: Fix SqlWeeklyMissionsRepository 2021-02-03 23:43:44 +00:00
Tau f1386f8e3d idz: Split/fix loadConfig messages 2021-02-03 23:43:42 +00:00
Tau 6d581c114d idz: Split/fix load2on2 messages 2021-02-03 23:43:42 +00:00
Tau 9570349565 idz: Plumb clientHello into request dispatcher 2021-02-03 23:43:42 +00:00
Tau f3be39823a idz: Explicitly split team msg encoders 2021-02-03 23:43:40 +00:00
Tau 03d0e87b55 idz: Push story geometry down into codecs
Sparsify the data model returned from the repository layer. Different
versions of the game can have drastically different dimensions for the
story data grid, so handling those dimensions is best done in the
encoders themselves.
2021-02-03 23:43:40 +00:00
Tau efcc1caa76 idz: Add explicit CreateProfileResponse 2021-02-03 23:43:40 +00:00
Tau 2a546c0d9d idz: Generalize msg00AD
The purpose of this request is unknown, but its message code
changed in idz2.
2021-02-03 23:43:40 +00:00
Tau 63627eaf78 idz: Combine loadConfig requests 2021-02-03 23:43:40 +00:00
Tau ed7c461fe1 idz: Dispatch on declared protocol version 2021-02-03 23:43:39 +00:00
Tau 75ac6e03f2 idz: Support multiple major versions
Doesn't actually add support for any additional versions, but it
does lay the groundwork.
2021-02-03 23:43:39 +00:00
Tau 2f2dc82b5a idz: Add type defs for common net comms context 2021-02-03 23:43:38 +00:00
Tau 198256e6ff idz: Add implicit version field to requests 2021-02-03 23:43:38 +00:00
Tau eb276128c2 sql: Add "maintenance transaction" system
SQLite's ALTER TABLE functionality leaves a lot to be desired, so
in practice the way you alter SQLite schema is to create a new
table, migrate the data into it, then drop the old table. However,
this is potentially complicated by the presence of foreign key
constraints.

In order to resolve the foreign key constraint issue we add a
`maintenance()` method to the `DataSource` abstraction layer. This
operates similarly to the existing `transaction()` method, but the
SQLite implementation of this method defers enforcement of foreign
keys until the transaction is about to commit.
2021-02-03 23:43:38 +00:00
Tau 6090a60467 sql: Drive-by method documentation 2021-02-03 23:43:38 +00:00
Tau 2099622b0f sql: Throw conventionally... 2021-02-03 23:43:38 +00:00
Tau 9494f3026b checkdb: Use single transaction 2021-02-03 23:43:38 +00:00
Tau f7ceb6bcda idz: Prettier compliance 2021-02-03 23:43:38 +00:00
Tau 04dac7279e idz: Remove some dead code 2021-02-03 23:43:37 +00:00
Tau 8c164b6130 idz: Use string I/O helpers 2021-02-03 23:43:37 +00:00
Tau 27b229e1c2 idz: Remove iffy redundant NUL termination op 2021-02-03 23:43:37 +00:00
Tau c877d9d214 idz: Fix apparent buffer stride bug 2021-02-03 23:43:37 +00:00
Tau 636789b8bf idz: Delete dead imports 2021-02-03 23:43:37 +00:00
Tau 48aeb1c9d2 types: Declare ON CONFLICT ... DO NOTHING clause 2021-02-03 23:43:36 +00:00
Tau 5f09c00eb4 Add explicit vscode formatter conf 2021-02-03 23:43:36 +00:00
Tau bf28710000 v013 2020-12-15 18:05:28 -05:00
Tau 8c61bda865 Apply Prettier to CHANGELOG 2020-12-15 18:05:09 -05:00
Tau 4f5eb97309 Fix npm audit noise 2020-09-01 01:10:32 +00:00
Tau 122c397b59 idz: Add utilities for binary I/O 2020-09-01 01:10:32 +00:00
Tau d3984dcd5d idz: Use Switchboard config for some ports 2020-09-01 01:10:31 +00:00
Tau 4abc04e9f6 idz: Port userdb/ onto common/ 2020-09-01 01:10:31 +00:00
Tau c01dbb50f7 idz: Factor out common TCP obfuscation 2020-09-01 01:10:31 +00:00
Tau fa5ed284e1 util: Add promise-based stream wrapper
You'd think something like this would exist on npm somewhere.
2020-09-01 01:10:31 +00:00
Tau 76583f17ce idz: Fix userdb msg 00AD block alignment 2020-09-01 01:10:31 +00:00
Tau f959993197 idz: Hoist userdb code 2020-09-01 01:10:31 +00:00
Tau 6dceb7c48a Fix CHANGELOG attribution 2020-08-19 18:44:29 -04:00
Tau 1869c37949 Add CHANGELOG up to v012 2020-08-17 21:26:40 -04:00
Tau 94ed27503a Add tests to CI build 2020-08-01 12:38:47 -04:00
Tau ad1b48c210 Fix? long-broken test 2020-08-01 12:38:47 -04:00
Tau 75b35e09e2 Add GitLab CI 2020-08-01 12:38:47 -04:00
Tau 01198d546a sql: Add NULL support to database wrappers 2020-03-22 22:38:54 +00:00
Tau 7b21a0bdae idz: Implement multi-page Garage fetch 2020-01-25 19:26:42 -05:00
Tau 5311618d1d Fix new DB initialization, AGAIN. 2020-01-05 10:45:40 -05:00
Tau 37ce14dda7 Switch to @decafcode/sqlite for database access 2020-01-05 10:00:12 -05:00
Tau 0d8d5845c9 schema: Fix M0011 for newly-created databases 2019-12-09 23:06:20 -05:00
Tau 143f534ba1 npm audit 2019-12-09 22:55:25 -05:00
Tau 4db3d94ee8 idz: Un-hardcode result limit in repo layer
Minor design nit but I should probably take my own code review
advice.
2019-11-30 14:13:49 -05:00
Tau e195cf77cd idz: Wire up TA topTen team results 2019-11-30 14:05:36 -05:00
Tau ac9622f1bd idz: Extend Time Attack topTen result set 2019-11-30 14:05:14 -05:00
Tau e8535b1a80 idz: Label additional team info in topTen response 2019-11-30 13:35:37 -05:00
Tau 60d2f7cfd3 Fix working directory issues in startup batch file 2019-11-09 14:03:16 -05:00
Tau 0ac8b44ce0 idz/sql/teamMember.ts: Fix another ignored result set
That should cover all the leftover uses of forUpdate() ...
2019-11-09 14:00:24 -05:00
Tau 59fec74d08 Add Project DIVA workaround to startup script 2019-11-09 13:42:40 -05:00
Tau 52f142a2b9 Bump deps so npm audit will shut up 2019-11-08 19:46:19 -05:00
Tau 3a7132d276 Drop ts-node
Stopped using it a while ago, `tsc --watch` is more convenient.
2019-11-08 19:43:59 -05:00
Tau 4f89894fd1 chunithm: Raise POST payload size limit 2019-11-08 19:39:03 -05:00
Tau c50a0093fd idz/sql/teamReservation.ts: Fix ignored result set
Apparently the latest SQLite driver doesn't like it if you do that.
2019-11-06 17:29:07 -05:00
Tau 1b41b82745 Tiny cosmetic change 2019-11-06 17:29:07 -05:00
Tau d1d63e1ef9 chunithm: Initial implementation code drop
No cleaner development history than this exists. It's difficult to
methodically design something when you don't yet know what it is
you're designing.
2019-11-06 17:29:07 -05:00
Tau beb9144e9b sql/util.ts: Add a simple SQL record mapper
sql-bricks can write queries for us, and the mapper handles type
conversions to and from SQL-friendly strings.
2019-11-06 17:29:07 -05:00
Tau d58f4bed8f Add npm "snakeCase" dep 2019-11-06 17:29:07 -05:00
Tau 125e4d8ca7 sql/sqlite.ts: Fix NULL handling 2019-11-06 17:29:07 -05:00
Tau b096a79f95 Simplify aime_player schema 2019-11-06 17:29:07 -05:00
Tau 04b0ccfda3 Force UTC for all internal date processing 2019-11-06 17:29:07 -05:00
Tau 82bd9ad7bb Additional assorted layering cleanups 2019-11-06 17:29:07 -05:00
Tau 6a4ac795b2 Heal the layer break around the Id<> type 2019-11-06 17:29:07 -05:00
Tau 3a71f5054c Bump to Node v12
This is the LTS version now, might as well use it.
2019-11-06 17:29:07 -05:00
Tau 650e05310d Flip-flop on debug logging code style 2019-11-06 17:29:07 -05:00
Tau 3aee0f611c sql/sqlite.ts: Make FK constraints do something
They don't by default, because they didn't in older versions of
SQLite and some older applications might rely on that. You have to
send an explicit pragma prior to opening a transaction to make them
take effect.
2019-11-06 17:29:07 -05:00
Tau fa45169b96 Enhance vscode config files 2019-11-06 17:29:07 -05:00
Tau 07222c9ae9 Add stub README.md 2019-11-06 17:29:01 -05:00
Tau 38298a2840 Add Windows batch file to init and start the server 2019-11-06 17:28:31 -05:00
Tau 2440bedf4a Add Markdown to .editorconfig 2019-11-06 17:28:31 -05:00
Tau 9acc375d99 Tweak switchboard defaults 2019-11-06 17:28:31 -05:00
Tau 799ace06d7 Wire up schema automation 2019-11-06 17:28:31 -05:00
Tau 6d91659b24 Add automated schema management 2019-11-06 17:28:31 -05:00
Tau 151dd41e64 sql: Add db compaction method 2019-11-06 17:28:31 -05:00
Tau 13e234a68c sql: Add raw SQL interface method 2019-11-06 17:28:31 -05:00
Tau 839debca97 Bump declared TypeScript dep 2019-11-06 17:28:31 -05:00
Tau abda3d5279 Switch to npm from Yarn
Yarn is the better package manager IMO, but npm comes with node and
using it does make the end-user installation experience a little
simpler as a result.
2019-11-06 17:28:31 -05:00
Tau 44d8c0a824 Tweak package.json lifecycle scripts 2019-11-06 17:28:31 -05:00
Tau f348feff62 sql/sqlite.ts: Fix type check 2019-11-06 17:28:30 -05:00
Tau 6603b6aaa6 Rename database file 2019-11-06 17:28:30 -05:00
Tau a96924c24f Abbreviate startup msg logging 2019-11-06 17:28:30 -05:00
Tau aa53fd8146 allnet: Add some environment fallbacks 2019-11-06 17:28:30 -05:00
Tau bbb5a3b408 aimedb/pipeline.ts: Silence a deprecation warning 2019-11-06 17:28:30 -05:00
Tau 072d70b42a Migrate to SQLite3
We'll keep the door open for side-by-side support of Postgres in
the background, but due to SQLite's type system quirks we cannot
use the same DDL for both databases, so we would have to maintain
two sets of DDL (schema init and schema migration scripts) at once.

Interested future contributors can shoulder this maintenance burden
if they so choose.
2019-11-06 17:28:30 -05:00
Tau f9970fa81c Force explicit conversion of rows fetched from SQL DB
Everything is a scalar value now, and while this does involve more
boilerplate it will also catch type conversion issues like
"1" + 0 === "10" in the future.
2019-11-06 17:28:30 -05:00
Tau 30d42bd832 Store array colums as CSV text
This is in preparation for a transition to SQLite, which sadly does
not support array-valued columns (or indeed have much of a type
system in general).
2019-11-06 17:28:30 -05:00
Tau 3e6b4f4798 Add an SQL DB abstraction layer
Because what self-respecting Enterprise(R) project doesn't have
one of those?
2019-11-06 17:28:30 -05:00
Tau 2ccd9dc382 types/sql-bricks-postgres: Add initial typings
This commit declares and type-checks the following clauses:

* limit().offset() chains on SelectStatement
* onConflict().doUpdate() chains on InsertStatement

We need to flesh out the other possibilities for onConflict() in
particular before all these changes get submitted as an upstream
PR.
2019-11-06 17:28:30 -05:00