Skip to content

Commit

Permalink
Upgraded crstore package
Browse files Browse the repository at this point in the history
  • Loading branch information
Azarattum committed Jan 24, 2024
1 parent 68f9c91 commit 381000c
Show file tree
Hide file tree
Showing 24 changed files with 435 additions and 578 deletions.
8 changes: 4 additions & 4 deletions apps/core/event/persistence.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Database = DeepPartial<{
tracks: {
edit(
id: number,
track: Partial<TrackBase & { album: AlbumBase }>
track: Partial<TrackBase & { album: AlbumBase }>,
): Promise<void>;
search(query: string, limit?: number, offset?: number): Promise<Track[]>;
get(id: number): Promise<Track>;
Expand Down Expand Up @@ -82,11 +82,11 @@ type Database = DeepPartial<{
prioritize(type: "art" | "source", resource: string): Promise<void>;
get(owner: number): Promise<MediaBase>;
};
merge(changes: any[]): Promise<void>;
merge(changes: string): Promise<void>;
subscribe(
tables: string[],
callback: (changes: any[], sender?: string) => any,
options?: { client: string; version: number }
callback: (changes: string, sender?: string) => any,
options?: { client: string; version: number },
): () => void;
}>;

Expand Down
4 changes: 2 additions & 2 deletions apps/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/ws": "^8.5.10",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-node-externals": "^6.1.2",
"vite": "5.0.11",
"vite-node": "1.1.3"
"vite": "5.0.12",
"vite-node": "1.2.1"
}
}
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@sveltejs/adapter-static": "3.0.1",
"crstore": "^0.20.2",
"crstore": "^0.21.1",
"murmurhash": "^2.0.1"
}
}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@
"test": "turbo run test --parallel --no-daemon"
},
"devDependencies": {
"@sveltejs/kit": "2.0.6",
"@sveltejs/kit": "2.4.3",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@types/node": "20.10.6",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"@vitest/coverage-v8": "^1.1.3",
"autoprefixer": "^10.4.16",
"@types/node": "20.11.6",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vitest/coverage-v8": "^1.2.1",
"autoprefixer": "^10.4.17",
"cssnano": "^6.0.3",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"postcss": "^8.4.33",
"postcss-import": "^16.0.0",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"prettier-plugin-sort-imports": "^1.8.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"rimraf": "^5.0.5",
"rollup": "^4.9.4",
"rollup": "^4.9.6",
"rollup-plugin-node-externals": "^6.1.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte": "^4.2.9",
"svelte-check": "^3.6.3",
"tailwindcss": "^3.4.1",
"tailwindcss-contain": "^0.1.1",
"tslib": "^2.6.2",
"turbo": "^1.11.3",
"typescript": "^5.3.3",
"vite": "5.0.11",
"vitest": "1.1.3"
"vite": "5.0.12",
"vitest": "1.2.1"
},
"dependencies": {
"@capacitor/core": "^5.6.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/crdata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"@amadeus-music/protocol": "workspace:*",
"crstore": "^0.20.2",
"crstore": "^0.21.1",
"superstruct": "^1.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"dependencies": {
"@amadeus-music/util": "workspace:*",
"tailwind-merge": "^2.2.0"
"tailwind-merge": "^2.2.1"
}
}
2 changes: 1 addition & 1 deletion plugins/audd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"@amadeus-music/core": "workspace:*"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
2 changes: 1 addition & 1 deletion plugins/feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@amadeus-music/util": "workspace:*"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
Binary file modified plugins/sqlite/assets/arm64/crsqlite.dylib
Binary file not shown.
Binary file modified plugins/sqlite/assets/arm64/sqlite.darwin.node
Binary file not shown.
Binary file modified plugins/sqlite/assets/x64/crsqlite.dll
Binary file not shown.
Binary file modified plugins/sqlite/assets/x64/crsqlite.dylib
Binary file not shown.
Binary file modified plugins/sqlite/assets/x64/crsqlite.so
Binary file not shown.
Binary file modified plugins/sqlite/assets/x64/sqlite.linux.node
Binary file not shown.
Binary file modified plugins/sqlite/assets/x64/sqlite.win32.node
Binary file not shown.
2 changes: 1 addition & 1 deletion plugins/sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@amadeus-music/crdata": "workspace:*"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
4 changes: 2 additions & 2 deletions plugins/telegram/handlers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ changed(function* (entries) {

function handleChanges(user: string) {
const storage = persistence(user);
return async (changes: any[]) => {
return async (changes: string) => {
const parsed = parseChanges(changes);
const id = await storage.settings.extract("name", "settings");
const name = `${bright}${id}${reset}`;
Expand All @@ -26,7 +26,7 @@ function handleChanges(user: string) {
};
}

function parseChanges(changes: any) {
function parseChanges(changes: string) {
let target: string | undefined;
let consequent = 0;
let last = "";
Expand Down
4 changes: 2 additions & 2 deletions plugins/telegram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"@amadeus-music/core": "workspace:*",
"@amadeus-music/protocol": "workspace:*",
"@amadeus-music/util": "workspace:*",
"crstore": "^0.20.2"
"crstore": "^0.21.1"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
2 changes: 1 addition & 1 deletion plugins/trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"superstruct": "^1.0.3"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
6 changes: 3 additions & 3 deletions plugins/trpc/routes/sync.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { any, array, number, object, string } from "superstruct";
import { observable } from "@trpc/server/observable";
import { number, object, string } from "superstruct";
import { info, procedure, router } from "../plugin";

export const sync = router({
push: procedure.input(array(any())).mutation(async ({ input, ctx }) => {
push: procedure.input(string()).mutation(async ({ input, ctx }) => {
return ctx.persistence().merge(input).then();
}),
pull: procedure
.input(object({ version: number(), client: string() }))
.subscription(({ input, ctx }) =>
observable<any>(({ next }) => {
observable<string>(({ next }) => {
info(`${ctx.name} subscribed to database changes.`);
const promise = ctx.persistence().subscribe(["*"], next, input).then();
return async () => {
Expand Down
2 changes: 1 addition & 1 deletion plugins/vk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"onnxruntime-web": "^1.16.3"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
2 changes: 1 addition & 1 deletion plugins/yandex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"@amadeus-music/core": "workspace:*"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
4 changes: 2 additions & 2 deletions plugins/youtube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
},
"dependencies": {
"@amadeus-music/core": "workspace:*",
"youtubei.js": "^8.1.0"
"youtubei.js": "^8.2.0"
},
"devDependencies": {
"vite": "5.0.11"
"vite": "5.0.12"
}
}
Loading

0 comments on commit 381000c

Please sign in to comment.