-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Battlesquid/sapphire-impl
Sapphire impl
- Loading branch information
Showing
122 changed files
with
7,843 additions
and
8,532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#/-------------------.env.vault---------------------/ | ||
#/ cloud-agnostic vaulting standard / | ||
#/ [how it works](https://dotenv.org/env-vault) / | ||
#/--------------------------------------------------/ | ||
|
||
# development | ||
DOTENV_VAULT_DEVELOPMENT="8Dc0EZ572iRxaIGzP/bRwZ0GhJCtewhgkgWryMHnnOamtqvB8S5H6ml842xs5cNtceHzQiZcEvQQD8xK7RLhJVF1g5mojxtDBKPVqzsRyfU5icTxOW21rhz5k6KgrBJwT4p+lirBPzbbcAelIQGsD3b3h1GAcV+cNXcP3P6SmBXPPmgR6xpsj868pe7XcGfpN03P7Vgvm3h1/jhUuKolO6x4SSf9DTYblzY4l50P6yteaM5wh3htjbcyJiFywtpzO9GF6Vy6kTfdqUU9crKoK3XS8fJ9NVLKCmZ2MU9ZL0WllrBv5JyN3TQlyON1zLYgaSWF5oWzCw0BNBDA8VD5a39Ig73VKKVkhCbFuxSgsyaEStckDzWme0HdymGTeWVZn7w1L4q4p/QVZiP6pmW47PLMFVzIwIXOXbjAse0M2Du2ZHSVXcUhItENb2Y9MFNRT0mWRoJYErYEtq+6oX08NKxkU4u+6kCi0iSt" | ||
DOTENV_VAULT_DEVELOPMENT_VERSION=3 | ||
|
||
# ci | ||
DOTENV_VAULT_CI="pJ5xC3/Rz5eLp76NgUjDoi4Uv7cdEIGhaC3nhUQ4eA/CjjLGJ+BdcYBp4iOLrk+vtG0HYq/3CiGw2ZciZlXziKO3I1FyU6njQmpAx/pZ+h22XDPE6LANlCT5k5wsh/JAadXh3KJwnk993ZV1wX14RJIdYfY41J1dFA5F6bLQNATHUJUomYDV/BTvHXNs0+xcV+IOFh6JxOA33Fk/daK8heucCiC9gumpcHOJWtbdyr/D+lj0KuW2fWrlr/nhuQ==" | ||
DOTENV_VAULT_CI_VERSION=3 | ||
|
||
# staging | ||
DOTENV_VAULT_STAGING="KlQe5hjzjgZpDdQAgh7FfnfWhaVFJ5JzKbhZ3XyGzs4dh8T/lKIEGC2wR7VG6WQOasaYOEJdtEin4QFqSauK7IB9ZwrCoE8IC01Nfa1O8cgQokqoHbagUpMxsMg3uqMDXIU/HGKP230DS4YCt0TwNYlcNov9tI0hF4cC47VoY/32WtHNNRMkJjgljkuXon0z/Hkqmi4Vbe07jhxXfxJFUa9qRvOR3XXV1nIv4LJ4GsaMjlpJKO0fvICbSc+X5g==" | ||
DOTENV_VAULT_STAGING_VERSION=3 | ||
|
||
# production | ||
DOTENV_VAULT_PRODUCTION="VhF5GTTWtFw47b9qTZTFZtG1PmXCTYiZDbZ3j+s9YS4r6DLyl8f9ZwCZc8NvP1qfKpSnyQP7P7eLvQjDKsJ9wG8Wlf0u4ETCv//hAS1LpWm3rv2mXc7LoXz2KxjOzQrWRWhw5gCJeVMt+ki6FodNuoJM8eMiMiw7eOw1vkJWTrpk6iozDtP2cHmnrm1i/lMjI6FJISeubVhdZ9f4XnGod3BbcaXkIZvtxYDdtil1KTQrwMPeJGu0t0f5+WdN4WymYScZSb94X4laRJo8WBvNi25llA4UTA+pQjqe7hxdbdv+OBM6geNZlREGd2EXBdzNAFBNWDL6M4iczrkTAn6R57SSOB7IVBk04K89x8L6hgE5vlYOebfozvk5cSrJT04PhVtcaAdHeDtQIAalpX1KsazOxNMprL350BZNRakx0BRlEIqrWu2BtGegX9B86oNpId3QvaNxbuO1YxGGK35DFL/hkIM3Eng7KGhRSSDUOD8xnjf1Yrw23Tu1ps2AAzjScdOETr0+W/E=" | ||
DOTENV_VAULT_PRODUCTION_VERSION=6 | ||
|
||
#/----------------settings/metadata-----------------/ | ||
DOTENV_VAULT="vlt_9a9f7a488fd44d4f65b4d3ef4eb12286e90b4356ecbaa3fb694350d0bc09d773" | ||
DOTENV_API_URL="https://vault.dotenv.org" | ||
DOTENV_CLI="npx dotenv-vault@latest" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,8 @@ temp/ | |
.env | ||
dist/ | ||
config.json | ||
.eslintcache | ||
.eslintcache | ||
.env* | ||
.flaskenv* | ||
!.env.project | ||
!.env.vault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ tmp/ | |
temp/ | ||
.env | ||
dist/ | ||
config.json | ||
config.json | ||
src/interactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"printWidth": 80, | ||
"printWidth": 200, | ||
"tabWidth": 4, | ||
"semi": true, | ||
"endOfLine": "lf" | ||
"endOfLine": "lf", | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { config } from "dotenv"; | ||
import { defineConfig } from "drizzle-kit"; | ||
|
||
config(); | ||
|
||
export default defineConfig({ | ||
schema: "./src/db/schema.ts", | ||
out: "./drizzle", | ||
dialect: "postgresql", | ||
dbCredentials: { | ||
host: process.env.DB_HOST!, | ||
user: process.env.DB_USER!, | ||
password: process.env.DB_PASSWORD!, | ||
database: process.env.DB_NAME! | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CREATE TABLE IF NOT EXISTS "channel_settings" ( | ||
"gid" varchar PRIMARY KEY NOT NULL, | ||
"media_only" text[] NOT NULL, | ||
"exempted_roles" text[] DEFAULT '{}'::text[] NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "log_settings" ( | ||
"gid" varchar PRIMARY KEY NOT NULL, | ||
"t_log_ch" varchar, | ||
"i_log_ch" varchar | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "verify_entry" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"gid" varchar NOT NULL, | ||
"uid" varchar NOT NULL, | ||
"nick" varchar(32) NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE IF NOT EXISTS "verify_settings" ( | ||
"gid" varchar NOT NULL, | ||
"join_ch" varchar NOT NULL, | ||
"roles" text[] NOT NULL, | ||
"autogreet" boolean DEFAULT false NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE "log_settings" RENAME COLUMN "t_log_ch" TO "text";--> statement-breakpoint | ||
ALTER TABLE "log_settings" RENAME COLUMN "i_log_ch" TO "image";--> statement-breakpoint | ||
ALTER TABLE "log_settings" ADD COLUMN "moderation" varchar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "log_settings" RENAME COLUMN "text" TO "message"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE "channel_settings" RENAME TO "imageboard";--> statement-breakpoint | ||
ALTER TABLE "imageboard" RENAME COLUMN "media_only" TO "boards";--> statement-breakpoint | ||
ALTER TABLE "imageboard" RENAME COLUMN "exempted_roles" TO "whitelist"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE "verify_entry" DROP CONSTRAINT "verify_entry_pkey"; | ||
ALTER TABLE "verify_entry" ADD CONSTRAINT "verify_entry_gid_uid_pk" PRIMARY KEY("gid","uid");--> statement-breakpoint | ||
ALTER TABLE "verify_entry" DROP COLUMN IF EXISTS "id"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE "verify_settings" RENAME COLUMN "join_ch" TO "welcome_channel";--> statement-breakpoint | ||
ALTER TABLE "verify_settings" RENAME COLUMN "autogreet" TO "create_greeting";--> statement-breakpoint | ||
ALTER TABLE "verify_settings" ALTER COLUMN "welcome_channel" DROP NOT NULL;--> statement-breakpoint | ||
ALTER TABLE "verify_settings" ADD COLUMN "type" varchar NOT NULL DEFAULT 'message'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "verify_settings" RENAME COLUMN "welcome_channel" TO "new_user_channel"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "verify_settings" ALTER COLUMN "type" SET DEFAULT 'message'; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CREATE TABLE IF NOT EXISTS "hall_of_fame" ( | ||
"gid" varchar PRIMARY KEY NOT NULL, | ||
"halls" text[] DEFAULT '{}'::text[] NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
"id": "6ff4997c-f83b-41a8-b801-91e3a290d154", | ||
"prevId": "00000000-0000-0000-0000-000000000000", | ||
"version": "7", | ||
"dialect": "postgresql", | ||
"tables": { | ||
"public.channel_settings": { | ||
"name": "channel_settings", | ||
"schema": "", | ||
"columns": { | ||
"gid": { | ||
"name": "gid", | ||
"type": "varchar", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"media_only": { | ||
"name": "media_only", | ||
"type": "text[]", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"exempted_roles": { | ||
"name": "exempted_roles", | ||
"type": "text[]", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "'{}'::text[]" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"public.log_settings": { | ||
"name": "log_settings", | ||
"schema": "", | ||
"columns": { | ||
"gid": { | ||
"name": "gid", | ||
"type": "varchar", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"t_log_ch": { | ||
"name": "t_log_ch", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"i_log_ch": { | ||
"name": "i_log_ch", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"public.verify_entry": { | ||
"name": "verify_entry", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"gid": { | ||
"name": "gid", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"uid": { | ||
"name": "uid", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"nick": { | ||
"name": "nick", | ||
"type": "varchar(32)", | ||
"primaryKey": false, | ||
"notNull": true | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"public.verify_settings": { | ||
"name": "verify_settings", | ||
"schema": "", | ||
"columns": { | ||
"gid": { | ||
"name": "gid", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"join_ch": { | ||
"name": "join_ch", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"roles": { | ||
"name": "roles", | ||
"type": "text[]", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"autogreet": { | ||
"name": "autogreet", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"enums": {}, | ||
"schemas": {}, | ||
"_meta": { | ||
"columns": {}, | ||
"schemas": {}, | ||
"tables": {} | ||
} | ||
} |
Oops, something went wrong.