From 71ae97bf5816e8d9464bf09f7ef61049b1dd288c Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Wed, 6 Mar 2024 15:58:16 -0600 Subject: [PATCH 01/13] add renderings table. Move gateway to walangmeta. Rename some properties --- .gitignore | 4 + controller/drizzle/meta/_journal.json | 3 + controller/package.json | 3 + controller/pnpm-lock.yaml | 390 ++++++++++++++++++ controller/src/db/schema/schema.ts | 49 +++ controller/src/db/utils/getMocks.ts | 4 + controller/src/functions/git-bus.ts | 22 + controller/src/functions/renderings-bus.ts | 49 +++ controller/src/routes/content.ts | 5 + controller/src/routes/rendering.ts | 20 + docker-compose.yml | 29 ++ ...ateway_language_to_dependent_language.yaml | 9 + .../languageapi/tables/public_language.yaml | 16 + makefile | 4 + 14 files changed, 607 insertions(+) diff --git a/.gitignore b/.gitignore index ba1aea0..2354d35 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ data_dump.sql proj_notes.md mise.toml .tool-versions +<<<<<<< HEAD launch.json .DS_Store fixup.ts +======= +launch.json +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) diff --git a/controller/drizzle/meta/_journal.json b/controller/drizzle/meta/_journal.json index abd6962..34c75d1 100644 --- a/controller/drizzle/meta/_journal.json +++ b/controller/drizzle/meta/_journal.json @@ -148,6 +148,7 @@ "when": 1709679629988, "tag": "0020_right_mojo", "breakpoints": true +<<<<<<< HEAD }, { "idx": 21, @@ -176,6 +177,8 @@ "when": 1712691755151, "tag": "0024_daffy_black_bolt", "breakpoints": true +======= +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) } ] } \ No newline at end of file diff --git a/controller/package.json b/controller/package.json index 53f51ec..8dfc5ee 100644 --- a/controller/package.json +++ b/controller/package.json @@ -21,7 +21,10 @@ "dependencies": { "@asteasolutions/zod-to-openapi": "^6.4.0", "@azure/functions": "^4.3.0", +<<<<<<< HEAD "@paralleldrive/cuid2": "^2.2.2", +======= +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) "api-spec-converter": "^2.12.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.29.4", diff --git a/controller/pnpm-lock.yaml b/controller/pnpm-lock.yaml index bfd5914..9432b37 100644 --- a/controller/pnpm-lock.yaml +++ b/controller/pnpm-lock.yaml @@ -5,6 +5,7 @@ settings: excludeLinksFromLockfile: false dependencies: +<<<<<<< HEAD "@asteasolutions/zod-to-openapi": specifier: ^6.4.0 version: 6.4.0(zod@3.22.4) @@ -14,6 +15,14 @@ dependencies: "@paralleldrive/cuid2": specifier: ^2.2.2 version: 2.2.2 +======= + '@asteasolutions/zod-to-openapi': + specifier: ^6.4.0 + version: 6.4.0(zod@3.22.4) + '@azure/functions': + specifier: ^4.3.0 + version: 4.3.0 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) api-spec-converter: specifier: ^2.12.0 version: 2.12.0 @@ -40,10 +49,17 @@ devDependencies: "@anatine/zod-mock": specifier: ^3.13.3 version: 3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4) +<<<<<<< HEAD "@faker-js/faker": specifier: ^8.4.1 version: 8.4.1 "@types/node": +======= + '@faker-js/faker': + specifier: ^8.4.1 + version: 8.4.1 + '@types/node': +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) specifier: ^20.11.24 version: 20.11.24 drizzle-kit: @@ -66,25 +82,39 @@ devDependencies: version: 5.3.3 packages: +<<<<<<< HEAD /@anatine/zod-mock@3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4): resolution: { integrity: sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==, } +======= + + /@anatine/zod-mock@3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4): + resolution: {integrity: sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: "@faker-js/faker": ^7.0.0 || ^8.0.0 zod: ^3.21.4 dependencies: +<<<<<<< HEAD "@faker-js/faker": 8.4.1 +======= + '@faker-js/faker': 8.4.1 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) randexp: 0.5.3 zod: 3.22.4 dev: true /@asteasolutions/zod-to-openapi@6.4.0(zod@3.22.4): +<<<<<<< HEAD resolution: { integrity: sha512-8cxfF7AHHx2PqnN4Cd8/O8CBu/nVYJP9DpnfVLW3BFb66VJDnqI/CczZnkqMc3SNh6J9GiX7JbJ5T4BSP4HZ2Q==, } +======= + resolution: {integrity: sha512-8cxfF7AHHx2PqnN4Cd8/O8CBu/nVYJP9DpnfVLW3BFb66VJDnqI/CczZnkqMc3SNh6J9GiX7JbJ5T4BSP4HZ2Q==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: zod: ^3.20.2 dependencies: @@ -93,11 +123,16 @@ packages: dev: false /@azure/functions@4.3.0: +<<<<<<< HEAD resolution: { integrity: sha512-l7iAuSyyBCOgwkDZmV6UUagwkFoqMOVfq01oJ+rJlFhN7Mb8/kkUAZLffCPUxBy2Wwah741BhJGizwaCP9G2/A==, } engines: {node: ">=18.0"} +======= + resolution: {integrity: sha512-l7iAuSyyBCOgwkDZmV6UUagwkFoqMOVfq01oJ+rJlFhN7Mb8/kkUAZLffCPUxBy2Wwah741BhJGizwaCP9G2/A==} + engines: {node: '>=18.0'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: cookie: 0.6.0 long: 4.0.0 @@ -124,10 +159,14 @@ packages: dev: true /@drizzle-team/studio@0.0.39: +<<<<<<< HEAD resolution: { integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==, } +======= + resolution: {integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: superjson: 2.2.1 dev: true @@ -153,11 +192,16 @@ packages: dev: true /@esbuild/aix-ppc64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ppc64] os: [aix] requiresBuild: true @@ -177,11 +221,16 @@ packages: optional: true /@esbuild/android-arm64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [android] requiresBuild: true @@ -201,11 +250,16 @@ packages: optional: true /@esbuild/android-arm@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm] os: [android] requiresBuild: true @@ -225,11 +279,16 @@ packages: optional: true /@esbuild/android-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [android] requiresBuild: true @@ -249,11 +308,16 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [darwin] requiresBuild: true @@ -273,11 +337,16 @@ packages: optional: true /@esbuild/darwin-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [darwin] requiresBuild: true @@ -297,11 +366,16 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [freebsd] requiresBuild: true @@ -321,11 +395,16 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [freebsd] requiresBuild: true @@ -345,11 +424,16 @@ packages: optional: true /@esbuild/linux-arm64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [linux] requiresBuild: true @@ -369,11 +453,16 @@ packages: optional: true /@esbuild/linux-arm@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm] os: [linux] requiresBuild: true @@ -393,11 +482,16 @@ packages: optional: true /@esbuild/linux-ia32@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ia32] os: [linux] requiresBuild: true @@ -417,11 +511,16 @@ packages: optional: true /@esbuild/linux-loong64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [loong64] os: [linux] requiresBuild: true @@ -441,11 +540,16 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [mips64el] os: [linux] requiresBuild: true @@ -465,11 +569,16 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ppc64] os: [linux] requiresBuild: true @@ -489,11 +598,16 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [riscv64] os: [linux] requiresBuild: true @@ -513,11 +627,16 @@ packages: optional: true /@esbuild/linux-s390x@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [s390x] os: [linux] requiresBuild: true @@ -537,11 +656,16 @@ packages: optional: true /@esbuild/linux-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [linux] requiresBuild: true @@ -561,11 +685,16 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [netbsd] requiresBuild: true @@ -585,11 +714,16 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [openbsd] requiresBuild: true @@ -609,11 +743,16 @@ packages: optional: true /@esbuild/sunos-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [sunos] requiresBuild: true @@ -633,11 +772,16 @@ packages: optional: true /@esbuild/win32-arm64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [win32] requiresBuild: true @@ -657,11 +801,16 @@ packages: optional: true /@esbuild/win32-ia32@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ia32] os: [win32] requiresBuild: true @@ -681,11 +830,16 @@ packages: optional: true /@esbuild/win32-x64@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [win32] requiresBuild: true @@ -693,6 +847,7 @@ packages: optional: true /@faker-js/faker@8.4.1: +<<<<<<< HEAD resolution: { integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==, @@ -706,6 +861,15 @@ packages: integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==, } engines: {node: ">=14"} +======= + resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} + dev: true + + /@fastify/busboy@2.1.1: + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /@isaacs/cliui@8.0.2: @@ -724,11 +888,16 @@ packages: dev: true /@jridgewell/resolve-uri@3.1.2: +<<<<<<< HEAD resolution: { integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==, } engines: {node: ">=6.0.0"} +======= + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /@jridgewell/sourcemap-codec@1.4.15: @@ -744,8 +913,13 @@ packages: integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, } dependencies: +<<<<<<< HEAD "@jridgewell/resolve-uri": 3.1.2 "@jridgewell/sourcemap-codec": 1.4.15 +======= + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /@noble/hashes@1.4.0: @@ -810,15 +984,23 @@ packages: } requiresBuild: true dependencies: +<<<<<<< HEAD "@types/node": 20.11.24 +======= + '@types/node': 20.11.24 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false optional: true /@types/node@20.11.24: +<<<<<<< HEAD resolution: { integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==, } +======= + resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: undici-types: 5.26.5 @@ -829,7 +1011,11 @@ packages: } requiresBuild: true dependencies: +<<<<<<< HEAD "@types/node": 20.11.24 +======= + '@types/node': 20.11.24 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false optional: true @@ -853,11 +1039,16 @@ packages: optional: true /acorn-walk@8.3.2: +<<<<<<< HEAD resolution: { integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==, } engines: {node: ">=0.4.0"} +======= + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /acorn@8.11.3: @@ -1127,11 +1318,16 @@ packages: engines: {node: ">=4"} /call-bind@1.0.7: +<<<<<<< HEAD resolution: { integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -1191,11 +1387,16 @@ packages: optional: true /cli-color@2.0.4: +<<<<<<< HEAD resolution: { integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==, } engines: {node: ">=0.10"} +======= + resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} + engines: {node: '>=0.10'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 es5-ext: 0.10.64 @@ -1328,6 +1529,11 @@ packages: engines: {node: ">= 0.6"} dev: false + /cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + dev: false + /cookiejar@2.1.4: resolution: { @@ -1403,11 +1609,16 @@ packages: dev: true /d@1.0.2: +<<<<<<< HEAD resolution: { integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==, } engines: {node: ">=0.12"} +======= + resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} + engines: {node: '>=0.12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es5-ext: 0.10.64 type: 2.7.2 @@ -1480,11 +1691,16 @@ packages: dev: false /define-data-property@1.1.4: +<<<<<<< HEAD resolution: { integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -1527,11 +1743,16 @@ packages: dev: true /dotenv@16.4.5: +<<<<<<< HEAD resolution: { integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /drafter.js@2.6.7: @@ -1563,6 +1784,7 @@ packages: dev: true /drizzle-kit@0.20.14: +<<<<<<< HEAD resolution: { integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==, @@ -1571,6 +1793,13 @@ packages: dependencies: "@drizzle-team/studio": 0.0.39 "@esbuild-kit/esm-loader": 2.6.5 +======= + resolution: {integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==} + hasBin: true + dependencies: + '@drizzle-team/studio': 0.0.39 + '@esbuild-kit/esm-loader': 2.6.5 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) camelcase: 7.0.1 chalk: 5.3.0 commander: 9.5.0 @@ -1588,10 +1817,14 @@ packages: dev: true /drizzle-orm@0.29.4(pg@8.11.3)(postgres@3.4.3): +<<<<<<< HEAD resolution: { integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==, } +======= + resolution: {integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: "@aws-sdk/client-rds-data": ">=3" "@cloudflare/workers-types": ">=3" @@ -1666,10 +1899,14 @@ packages: dev: false /drizzle-zod@0.5.1(drizzle-orm@0.29.4)(zod@3.22.4): +<<<<<<< HEAD resolution: { integrity: sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A==, } +======= + resolution: {integrity: sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: drizzle-orm: ">=0.23.13" zod: "*" @@ -1774,16 +2011,22 @@ packages: optional: true /es-define-property@1.0.0: +<<<<<<< HEAD resolution: { integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: get-intrinsic: 1.2.4 dev: false /es-errors@1.3.0: +<<<<<<< HEAD resolution: { integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==, @@ -1797,6 +2040,15 @@ packages: integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==, } engines: {node: ">=0.10"} +======= + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: false + + /es5-ext@0.10.64: + resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} + engines: {node: '>=0.10'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dependencies: es6-iterator: 2.0.3 @@ -1835,11 +2087,16 @@ packages: optional: true /es6-symbol@3.1.4: +<<<<<<< HEAD resolution: { integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==, } engines: {node: ">=0.12"} +======= + resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} + engines: {node: '>=0.12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 ext: 1.7.0 @@ -1858,10 +2115,14 @@ packages: dev: true /esbuild-register@3.5.0(esbuild@0.19.12): +<<<<<<< HEAD resolution: { integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==, } +======= + resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: esbuild: ">=0.12 <1" dependencies: @@ -1905,6 +2166,7 @@ packages: dev: true /esbuild@0.19.12: +<<<<<<< HEAD resolution: { integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==, @@ -1936,6 +2198,36 @@ packages: "@esbuild/win32-arm64": 0.19.12 "@esbuild/win32-ia32": 0.19.12 "@esbuild/win32-x64": 0.19.12 +======= + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /escodegen@0.0.21: @@ -1989,11 +2281,16 @@ packages: optional: true /esniff@2.0.1: +<<<<<<< HEAD resolution: { integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==, } engines: {node: ">=0.10"} +======= + resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} + engines: {node: '>=0.10'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 es5-ext: 0.10.64 @@ -2281,11 +2578,16 @@ packages: optional: true /get-intrinsic@1.2.4: +<<<<<<< HEAD resolution: { integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-errors: 1.3.0 function-bind: 1.1.2 @@ -2448,20 +2750,29 @@ packages: dev: false /has-property-descriptors@1.0.2: +<<<<<<< HEAD resolution: { integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==, } +======= + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 dev: false /has-proto@1.0.3: +<<<<<<< HEAD resolution: { integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /has-symbols@1.0.3: @@ -2473,11 +2784,16 @@ packages: dev: false /hasown@2.0.1: +<<<<<<< HEAD resolution: { integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: function-bind: 1.1.2 dev: false @@ -2847,10 +3163,14 @@ packages: optional: true /json-schema-faker@0.5.6: +<<<<<<< HEAD resolution: { integrity: sha512-u/cFC26/GDxh2vPiAC8B8xVvpXAW+QYtG2mijEbKrimCk8IHtiwQBjCE8TwvowdhALWq9IcdIWZ+/8ocXvdL3Q==, } +======= + resolution: {integrity: sha512-u/cFC26/GDxh2vPiAC8B8xVvpXAW+QYtG2mijEbKrimCk8IHtiwQBjCE8TwvowdhALWq9IcdIWZ+/8ocXvdL3Q==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dependencies: json-schema-ref-parser: 6.1.0 @@ -3093,10 +3413,14 @@ packages: optional: true /lru-cache@10.2.0: +<<<<<<< HEAD resolution: { integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==, } +======= + resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) engines: {node: 14 || >=16.14} dev: true @@ -3420,10 +3744,14 @@ packages: dev: false /openapi3-ts@4.2.2: +<<<<<<< HEAD resolution: { integrity: sha512-+9g4actZKeb3czfi9gVQ4Br2Ju3KwhCAQJBNaKgye5KggqcBLIhFHH+nIkcm0BUX00TrAJl6dH4JWgM4G4JWrw==, } +======= + resolution: {integrity: sha512-+9g4actZKeb3czfi9gVQ4Br2Ju3KwhCAQJBNaKgye5KggqcBLIhFHH+nIkcm0BUX00TrAJl6dH4JWgM4G4JWrw==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: yaml: 2.4.0 dev: false @@ -3739,11 +4067,16 @@ packages: xtend: 4.0.2 /postgres@3.4.3: +<<<<<<< HEAD resolution: { integrity: sha512-iHJn4+M9vbTdHSdDzNkC0crHq+1CUdFhx+YqCE+SqWxPjm+Zu63jq7yZborOBF64c8pc58O5uMudyL1FQcHacA==, } engines: {node: ">=12"} +======= + resolution: {integrity: sha512-iHJn4+M9vbTdHSdDzNkC0crHq+1CUdFhx+YqCE+SqWxPjm+Zu63jq7yZborOBF64c8pc58O5uMudyL1FQcHacA==} + engines: {node: '>=12'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /prelude-ls@1.1.2: @@ -4070,11 +4403,16 @@ packages: optional: true /semver@7.6.0: +<<<<<<< HEAD resolution: { integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==, } engines: {node: ">=10"} +======= + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dependencies: lru-cache: 6.0.0 @@ -4089,11 +4427,16 @@ packages: optional: true /set-function-length@1.2.1: +<<<<<<< HEAD resolution: { integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -4212,11 +4555,16 @@ packages: optional: true /side-channel@1.0.6: +<<<<<<< HEAD resolution: { integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==, } engines: {node: ">= 0.4"} +======= + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -4294,10 +4642,14 @@ packages: optional: true /spdx-exceptions@2.5.0: +<<<<<<< HEAD resolution: { integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==, } +======= + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -4315,10 +4667,14 @@ packages: optional: true /spdx-license-ids@3.0.17: +<<<<<<< HEAD resolution: { integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==, } +======= + resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -4389,10 +4745,14 @@ packages: optional: true /stream-shift@1.0.3: +<<<<<<< HEAD resolution: { integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==, } +======= + resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -4684,10 +5044,14 @@ packages: dev: false /ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3): +<<<<<<< HEAD resolution: { integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==, } +======= + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true peerDependencies: "@swc/core": ">=1.2.50" @@ -4700,12 +5064,21 @@ packages: "@swc/wasm": optional: true dependencies: +<<<<<<< HEAD "@cspotcode/source-map-support": 0.8.1 "@tsconfig/node10": 1.0.9 "@tsconfig/node12": 1.0.11 "@tsconfig/node14": 1.0.3 "@tsconfig/node16": 1.0.4 "@types/node": 20.11.24 +======= + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.11.24 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -4746,11 +5119,16 @@ packages: optional: true /type-fest@4.10.3: +<<<<<<< HEAD resolution: { integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==, } engines: {node: ">=16"} +======= + resolution: {integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==} + engines: {node: '>=16'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /type-of-is@3.5.1: @@ -4813,6 +5191,7 @@ packages: } /undici@5.28.3: +<<<<<<< HEAD resolution: { integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==, @@ -4820,6 +5199,12 @@ packages: engines: {node: ">=14.0"} dependencies: "@fastify/busboy": 2.1.1 +======= + resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.1 +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /uri-js@4.4.1: @@ -5045,11 +5430,16 @@ packages: } /yaml@2.4.0: +<<<<<<< HEAD resolution: { integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==, } engines: {node: ">= 14"} +======= + resolution: {integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==} + engines: {node: '>= 14'} +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dev: false diff --git a/controller/src/db/schema/schema.ts b/controller/src/db/schema/schema.ts index ad3d06c..c40f34d 100644 --- a/controller/src/db/schema/schema.ts +++ b/controller/src/db/schema/schema.ts @@ -50,6 +50,7 @@ export const language = pgTable( } ); //@=============== WA LANG META ============= +<<<<<<< HEAD export const waLangMetadata = pgTable( "wa_language_metadata", { @@ -71,6 +72,19 @@ export const waLangMetadata = pgTable( }; } ); +======= +export const waLangMetadata = pgTable("wa_language_meta", { + id: serial("id").primaryKey(), + ietfCode: varchar("ietf_code") + .references(() => language.ietfCode, { + onDelete: "cascade", + onUpdate: "cascade", + }) + .notNull(), + isGateway: boolean("is_gateway").notNull(), + showOnBiel: boolean("show_on_biel").notNull(), +}); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) //@=============== LANG ALT ============= export const languageAlternateName = pgTable( @@ -117,6 +131,7 @@ export const languagesToLanguages = pgTable( columns: [table.gatewayLanguageId, table.gatewayLanguageToId], name: "gateway_dependent_pkey", }), +<<<<<<< HEAD }; } ); @@ -142,6 +157,8 @@ export const content = pgTable( table.name, table.namespace ), +======= +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; } ); @@ -165,6 +182,7 @@ export const waContentMetadata = pgTable( ); //@=============== DIRECTLY CONNECTED CONTENT ============= +<<<<<<< HEAD // export const connectedContent = pgTable( // "connected_content", // { @@ -182,6 +200,25 @@ export const waContentMetadata = pgTable( // }), // }) // ); +======= +export const connectedContent = pgTable( + "connected_content", + { + contentId1: varchar("content_id_1", {length: 256}) + .references(() => content.id, {onDelete: "cascade", onUpdate: "cascade"}) + .notNull(), + contentId2: varchar("content_id_2", {length: 256}) + .references(() => content.id, {onDelete: "cascade", onUpdate: "cascade"}) + .notNull(), + }, + (table) => ({ + primaryKey: primaryKey({ + columns: [table.contentId1, table.contentId2], + name: "connected_content_pkey", + }), + }) +); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) //@=============== GIT REPO ============= export const gitRepo = pgTable( "git_repo", @@ -234,7 +271,16 @@ export const scripturalRenderingMetadata = pgTable( "scriptural_rendering_metadata", { id: serial("id").primaryKey(), +<<<<<<< HEAD renderingId: serial("rendering_id").notNull(), +======= + renderingId: serial("rendering_id") + .references(() => rendering.id, { + onDelete: "cascade", + onUpdate: "cascade", + }) + .notNull(), +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) bookSlug: varchar("book_slug", {length: 64}), //zod stores these as exclusively uppercase bookName: varchar("book_name"), chapter: integer("chapter"), @@ -334,6 +380,7 @@ export const countryToLanguage = pgTable( columns: [table.languageIetf, table.countryAlpha], name: "country_to_language_pkey", }), +<<<<<<< HEAD }; } ); @@ -357,6 +404,8 @@ export const localization = pgTable( columns: [table.ietfCode, table.key, table.category], name: "localization_pkey", }), +======= +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; } ); diff --git a/controller/src/db/utils/getMocks.ts b/controller/src/db/utils/getMocks.ts index 560c403..413c307 100644 --- a/controller/src/db/utils/getMocks.ts +++ b/controller/src/db/utils/getMocks.ts @@ -188,7 +188,11 @@ export function getMockedRendering( type: "scripture" | "nonscripture" = "scripture" ) { type apiKeys = z.infer; +<<<<<<< HEAD const randomUUid = createId(); +======= + const randomUUid = crypto.randomUUID(); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const mockedRender: apiKeys = { tempId: randomUUid, diff --git a/controller/src/functions/git-bus.ts b/controller/src/functions/git-bus.ts index 5fd6e1e..4c3ee53 100644 --- a/controller/src/functions/git-bus.ts +++ b/controller/src/functions/git-bus.ts @@ -1,6 +1,7 @@ import {app, InvocationContext} from "@azure/functions"; import {getDb as startDb} from "../db/config"; import {z} from "zod"; +<<<<<<< HEAD import {eq, and} from "drizzle-orm"; import {handlePost as handleGitPost} from "../routes/git"; import {handlePost as handleContentPost} from "../routes/content"; @@ -11,6 +12,11 @@ import * as dbSchema from "../db/schema/schema"; const db = startDb(); // import {createId} from "@paralleldrive/cuid2"; +======= +import {handlePost as handleGitPost} from "../routes/git"; +import * as validators from "../routes/validation"; +startDb(); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const latestCommitSchema = z.object({ Hash: z.string(), @@ -37,6 +43,7 @@ export async function wacsSbLangApi( message: unknown, context: InvocationContext ) { +<<<<<<< HEAD const namespace = "wacs"; // If zod or the db action below throws here, the message will end up in the dead letter queue. try { @@ -101,6 +108,21 @@ export async function wacsSbLangApi( const shapedForDb: z.infer = [ { contentId: contentCuid, +======= + // If zod or the db action below throws here, the message will end up in the dead letter queue. + try { + context.log(message); + const parsed = eventSchema.parse(message); + context.log( + `received a message for ${parsed.Repo} of event type ${parsed.EventType}` + ); + + // api built with bulk ops in mind, so arrays are passed, even for single op, versus having insertSingle vs insertMany type routes + const shapedForDb: z.infer = [ + { + namespace: "wacs", + contentId: `${parsed.User}/${parsed.Repo}`, +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) repoName: parsed.Repo, repoUrl: parsed.RepoHtmlUrl, username: parsed.User, diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index 60c1eea..351af2b 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -5,11 +5,15 @@ import { handlePost as handleRenderingPost, handleDel, } from "../routes/rendering"; +<<<<<<< HEAD import {handlePost as handleContentPost} from "../routes/content"; import * as validators from "../routes/validation"; import * as schema from "../db/schema/schema"; import {and, eq} from "drizzle-orm"; import {createId} from "@paralleldrive/cuid2"; +======= +import * as validators from "../routes/validation"; +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const db = startDb(); @@ -23,7 +27,11 @@ const renderedFileSchema = z.object({ Slug: z.string().nullable(), }); +<<<<<<< HEAD const titlesSchema = z.record(z.string().nullable()); +======= +const titlesSchema = z.record(z.string()); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const renderingsSchema = z.object({ Successful: z.boolean(), @@ -44,6 +52,7 @@ export async function wacsSbRenderingsApi( message: unknown, context: InvocationContext ) { +<<<<<<< HEAD const namespace = "wacs"; let contentCuid: string | null = null; //we need the guid of a content row to insert or upsert on the renderings Table. @@ -104,16 +113,36 @@ export async function wacsSbRenderingsApi( // Delete all renderings connected to this repo/project/content row: When we transact this delete, it should cascade to meta tables as long as cascade is set in schema. const deletePayload: z.infer = { contentIds: [contentCuid], +======= + // If zod or the db action below throws here, the message will end up in the dead letter queue. + try { + const parsed = renderingsSchema.parse(message); + context.log( + `received a message for ${parsed.User} for ${parsed.Repo} for ${parsed.ResourceType} type` + ); + + // Delete all renderings connected to this repo/project/content row: When we transact this delete, it should cascade to meta tables as long as cascade is set in schema. + const deletePayload: z.infer = { + contentIds: [{namespace: "wacs", id: `${parsed.User}/${parsed.Repo}`}], +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; const dbPayload: z.infer = parsed.RenderedFiles.map((payload) => { +<<<<<<< HEAD // Used to tie together metadata to rendering const randomUUid = createId(); let baseLoad: z.infer = { tempId: randomUUid, namespace, contentId: contentCuid!, +======= + const randomUUid = crypto.randomUUID(); + let baseLoad: z.infer = { + tempId: randomUUid, + namespace: "wacs", + contentId: `${parsed.User}/${parsed.Repo}`, +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) fileType: payload.FileType, url: payload.Path, fileSizeBytes: payload.Size || 0, @@ -151,9 +180,15 @@ export async function wacsSbRenderingsApi( return baseLoad; }); // todo: becuase these are rendered over and over, we want to delete everything from the renderings and renderings meta tables for the given content id, and new meta (since blobs are replaced and not versioned out). Then we can post to the renderings and meta tables +<<<<<<< HEAD await db.transaction(async (tx) => { // Clear out all renderings and meta (cascade) for this wacs repo first since the pipeline recreates all blobs on a path on render. context.log(`Clearing prev renderings for ${parsed.User}/${parsed.Repo}`); +======= + + await db.transaction(async (tx) => { + // Clear out all renderings and meta (cascade) for this wacs repo first since the pipeline recreates all blobs on a path on render. +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const delResult = await handleDel(deletePayload); if (delResult.status != 200) { tx.rollback(); @@ -162,11 +197,15 @@ export async function wacsSbRenderingsApi( } } else { // Insert new renderings and meta +<<<<<<< HEAD context.log(`Posting new renderings for ${parsed.User}/${parsed.Repo}`); +======= +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const postResult = await handleRenderingPost(dbPayload); if (postResult.status != 200) { tx.rollback(); if (postResult.jsonBody) { +<<<<<<< HEAD if (postResult.jsonBody.additionalErrors) { const errMessage = JSON.stringify( `ADDITIONAL ERRORS: \n ${postResult.jsonBody.additionalErrors}\n\n @@ -179,11 +218,15 @@ export async function wacsSbRenderingsApi( postResult.jsonBody.message || "failed to delete" ); } +======= + throw new Error(postResult.jsonBody.message || "failed to delete"); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) } } } }); } catch (error) { +<<<<<<< HEAD context.error(`Error processing ${JSON.stringify(message)}`); context.error(error); if (error instanceof z.ZodError) { @@ -215,6 +258,12 @@ export async function checkContentExists({ return {exists: doesExist.length > 0, id: dbId}; } +======= + context.error(error); + } +} + +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) console.log("booting up the renderings bus listener"); app.serviceBusTopic("waLangApiRenderings", { connection: "BUS_CONN", diff --git a/controller/src/routes/content.ts b/controller/src/routes/content.ts index ce90de6..2eb254a 100644 --- a/controller/src/routes/content.ts +++ b/controller/src/routes/content.ts @@ -98,8 +98,13 @@ export async function handlePost(payload: unknown): Promise { const payloadParsed = validationSchema.parse(payload); const payloadsWithGuids = payloadParsed.map((payload) => { return { +<<<<<<< HEAD ...payload, id: createId(), +======= + ...contentPayload, + id: `${namespace}-${contentPayload.id}`.toLowerCase(), +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; }); type accType = { diff --git a/controller/src/routes/rendering.ts b/controller/src/routes/rendering.ts index dd38fe2..c10eafe 100644 --- a/controller/src/routes/rendering.ts +++ b/controller/src/routes/rendering.ts @@ -95,7 +95,14 @@ export async function handlePost(payload: unknown): Promise { const validationSchema = validators.renderingsPost; const payloadParsed = validationSchema.parse(payload); const payloadsWithNamespacedId = payloadParsed.map((payload) => { +<<<<<<< HEAD if (payload.nonScripturalMeta) { +======= + const {namespace, ...renderPayload} = payload; + // port making content ids that are like user-repo. It should provide a contentId that matches (e.g. user-repo) and a namesapce (dcs). We prefix it here and make that that its contentId so 'dcs-user-repo'. Another, non-git-system might just use 'ab-en_ulb' for its content id if en_ulb is all it needs as its content identifier. So this is just normalizing and consolidating the namespace plus provided contentId + const contentId = `${namespace}-${renderPayload.contentId}`.toLowerCase(); + if (renderPayload.nonScripturalMeta) { +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) // I'm intentionally adding string of wrong type here. and below for expect error. These will not be inserted. I'm adding this property as a way to ensure that in the transaction, once the renderigns are inserted, I can pluck the ids off the inserts ids and map it back to the metadata via this common obj. property // @ts-expect-error payload.nonScripturalMeta.renderingId = payload.contentId; @@ -104,7 +111,14 @@ export async function handlePost(payload: unknown): Promise { // @ts-expect-error payload.scripturalMeta.renderingId = payload.contentId; } +<<<<<<< HEAD return payload; +======= + return { + ...renderPayload, + contentId: `${namespace}-${renderPayload.contentId}`.toLowerCase(), + }; +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }); type accType = { @@ -260,7 +274,13 @@ export async function handleDel(payload: unknown): Promise { try { const deleteSchema = validators.renderingDelete; const deletePayloadsParsed = deleteSchema.parse(payload); +<<<<<<< HEAD const rowsToDeleteByContentId = deletePayloadsParsed.contentIds; +======= + const rowsToDeleteByContentId = deletePayloadsParsed.contentIds.map((row) => + `${row.namespace}-${row.id}`.toLowerCase() + ); +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) // E.g. delete all rendergins (and cascade accross) where the guid of a project is passed const deleteOnField = schema.rendering.contentId; diff --git a/docker-compose.yml b/docker-compose.yml index 6b802b2..d9235e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: "3.8" services: +<<<<<<< HEAD # controller: # build: # context: ./controller @@ -34,6 +35,25 @@ services: postgres: condition: service_healthy +======= + controller: + build: + context: ./controller + dockerfile: Dockerfile + environment: + - AzureWebJobsStorage= + - DATABASE_URL=postgres://docker:docker@postgres:5432/docker + - WEBSITE_CONTENTAZUREFILECONNECTIONSTRING= + - WEBSITE_CONTENTSHARE= + platform: linux/amd64 + ports: + - 8081:80 + depends_on: + postgres: + condition: service_healthy + db-migrate: + condition: service_completed_successfully +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) db-migrate: build: context: ./controller @@ -41,7 +61,16 @@ services: # IF you want to run the functions in the container and migrate # entrypoint: ["sh", "-c", "pnpm run migrate && pnpm run start"] # IF you only want to migrate so hasura is up to date on migrations done locally +<<<<<<< HEAD entrypoint: pnpm run migrate +======= + entrypoint: + [ + "/bin/sh", + "-c", + "psql postgres://docker:docker@postgres:5432/docker -f data_dump.sql && pnpm run migrate", + ] +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) expose: - 7071 - 3000 diff --git a/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml b/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml index cbee7f2..5d8ac79 100644 --- a/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml +++ b/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml @@ -2,12 +2,21 @@ table: name: gateway_language_to_dependent_language schema: public object_relationships: +<<<<<<< HEAD:hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml - name: dependent_language using: foreign_key_constraint_on: dependent_language_ietf - name: gateway_language using: foreign_key_constraint_on: gateway_language_ietf +======= + - name: gateway_language + using: + foreign_key_constraint_on: gateway_language_ietf + - name: dependent_language + using: + foreign_key_constraint_on: dependent_language_ietf +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties):hasura/metadata/databases/languageapi/tables/public_languages_to_languages.yaml select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/languageapi/tables/public_language.yaml b/hasura/metadata/databases/languageapi/tables/public_language.yaml index 178d674..7ece451 100644 --- a/hasura/metadata/databases/languageapi/tables/public_language.yaml +++ b/hasura/metadata/databases/languageapi/tables/public_language.yaml @@ -48,6 +48,7 @@ array_relationships: table: name: language_alternate_name schema: public +<<<<<<< HEAD - name: localizations using: foreign_key_constraint_on: @@ -61,6 +62,21 @@ array_relationships: column: ietf_code table: name: wa_language_metadata +======= + - name: gateway_languages + using: + foreign_key_constraint_on: + column: dependent_language_ietf + table: + name: gateway_language_to_dependent_language + schema: public + - name: dependent_languages + using: + foreign_key_constraint_on: + column: gateway_language_ietf + table: + name: gateway_language_to_dependent_language +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) schema: public select_permissions: - role: anonymous diff --git a/makefile b/makefile index 6e0b6b7..a6c792d 100644 --- a/makefile +++ b/makefile @@ -7,7 +7,11 @@ console: # -n drizzle schema is for to get the same migrations that have been applied to the dev database applied. .PHONY: datadump datadump: +<<<<<<< HEAD pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle > data_dump.sql +======= + pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle --data-only > data_dump.sql +>>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) # Note, this will conflict if you're running postgres on own machine on default port too. .PHONY: localdataingest From 5d5bef7ed4f5549c5da383d19b576097b89c4868 Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Wed, 6 Mar 2024 16:16:42 -0600 Subject: [PATCH 02/13] adjust makefile dump back to what it should be --- makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/makefile b/makefile index a6c792d..6e0b6b7 100644 --- a/makefile +++ b/makefile @@ -7,11 +7,7 @@ console: # -n drizzle schema is for to get the same migrations that have been applied to the dev database applied. .PHONY: datadump datadump: -<<<<<<< HEAD pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle > data_dump.sql -======= - pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle --data-only > data_dump.sql ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) # Note, this will conflict if you're running postgres on own machine on default port too. .PHONY: localdataingest From ff172cc296a96646fdccfe7c194a6ea241b9b650 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 20 Mar 2024 17:15:07 -0400 Subject: [PATCH 03/13] make runnable locally, add dev bus string --- docker-compose.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d9235e9..6b802b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,6 @@ version: "3.8" services: -<<<<<<< HEAD # controller: # build: # context: ./controller @@ -35,25 +34,6 @@ services: postgres: condition: service_healthy -======= - controller: - build: - context: ./controller - dockerfile: Dockerfile - environment: - - AzureWebJobsStorage= - - DATABASE_URL=postgres://docker:docker@postgres:5432/docker - - WEBSITE_CONTENTAZUREFILECONNECTIONSTRING= - - WEBSITE_CONTENTSHARE= - platform: linux/amd64 - ports: - - 8081:80 - depends_on: - postgres: - condition: service_healthy - db-migrate: - condition: service_completed_successfully ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) db-migrate: build: context: ./controller @@ -61,16 +41,7 @@ services: # IF you want to run the functions in the container and migrate # entrypoint: ["sh", "-c", "pnpm run migrate && pnpm run start"] # IF you only want to migrate so hasura is up to date on migrations done locally -<<<<<<< HEAD entrypoint: pnpm run migrate -======= - entrypoint: - [ - "/bin/sh", - "-c", - "psql postgres://docker:docker@postgres:5432/docker -f data_dump.sql && pnpm run migrate", - ] ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) expose: - 7071 - 3000 From 992f628c2363f481b9583c1c17f7bf7b315124c3 Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Tue, 26 Mar 2024 14:15:03 -0500 Subject: [PATCH 04/13] adjusted the logic for creating content row if not present while updating renderings table --- controller/src/functions/git-bus.ts | 28 +++++++++++- controller/src/functions/renderings-bus.ts | 52 ++-------------------- 2 files changed, 30 insertions(+), 50 deletions(-) diff --git a/controller/src/functions/git-bus.ts b/controller/src/functions/git-bus.ts index 4c3ee53..7e23472 100644 --- a/controller/src/functions/git-bus.ts +++ b/controller/src/functions/git-bus.ts @@ -14,7 +14,9 @@ const db = startDb(); // import {createId} from "@paralleldrive/cuid2"; ======= import {handlePost as handleGitPost} from "../routes/git"; +import {handlePost as handleContentPost} from "../routes/content"; import * as validators from "../routes/validation"; +import {checkContentExists} from "../functions/renderings-bus"; startDb(); >>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) @@ -114,8 +116,32 @@ export async function wacsSbLangApi( context.log(message); const parsed = eventSchema.parse(message); context.log( - `received a message for ${parsed.Repo} of event type ${parsed.EventType}` + `GIT BUS RECEIVED: received a message for ${parsed.Repo} of event type ${parsed.EventType}` ); + const thatContentRowExists = await checkContentExists( + `wac-${parsed.User}/${parsed.Repo}`.toLowerCase() + ); + if (!thatContentRowExists) { + context.log( + `wac-${parsed.User}/${parsed.Repo} is not already in api. Creating new row in table` + ); + const newContentRow: z.infer = [ + { + namespace: "wacs", + id: `${parsed.User}/${parsed.Repo}`.toLowerCase(), + type: "text", + }, + ]; + const newRowRes = await handleContentPost(newContentRow); + if (newRowRes.status !== 200) { + context.log( + `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` + ); + throw new Error( + `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` + ); + } + } // api built with bulk ops in mind, so arrays are passed, even for single op, versus having insertSingle vs insertMany type routes const shapedForDb: z.infer = [ diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index 351af2b..a9cc1b2 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -5,15 +5,11 @@ import { handlePost as handleRenderingPost, handleDel, } from "../routes/rendering"; -<<<<<<< HEAD import {handlePost as handleContentPost} from "../routes/content"; import * as validators from "../routes/validation"; import * as schema from "../db/schema/schema"; import {and, eq} from "drizzle-orm"; import {createId} from "@paralleldrive/cuid2"; -======= -import * as validators from "../routes/validation"; ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const db = startDb(); @@ -27,11 +23,8 @@ const renderedFileSchema = z.object({ Slug: z.string().nullable(), }); -<<<<<<< HEAD const titlesSchema = z.record(z.string().nullable()); -======= -const titlesSchema = z.record(z.string()); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) +const titlesSchema = z.record(z.string().nullable()); const renderingsSchema = z.object({ Successful: z.boolean(), @@ -52,7 +45,6 @@ export async function wacsSbRenderingsApi( message: unknown, context: InvocationContext ) { -<<<<<<< HEAD const namespace = "wacs"; let contentCuid: string | null = null; //we need the guid of a content row to insert or upsert on the renderings Table. @@ -113,36 +105,16 @@ export async function wacsSbRenderingsApi( // Delete all renderings connected to this repo/project/content row: When we transact this delete, it should cascade to meta tables as long as cascade is set in schema. const deletePayload: z.infer = { contentIds: [contentCuid], -======= - // If zod or the db action below throws here, the message will end up in the dead letter queue. - try { - const parsed = renderingsSchema.parse(message); - context.log( - `received a message for ${parsed.User} for ${parsed.Repo} for ${parsed.ResourceType} type` - ); - - // Delete all renderings connected to this repo/project/content row: When we transact this delete, it should cascade to meta tables as long as cascade is set in schema. - const deletePayload: z.infer = { - contentIds: [{namespace: "wacs", id: `${parsed.User}/${parsed.Repo}`}], ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; const dbPayload: z.infer = parsed.RenderedFiles.map((payload) => { -<<<<<<< HEAD // Used to tie together metadata to rendering const randomUUid = createId(); let baseLoad: z.infer = { tempId: randomUUid, namespace, contentId: contentCuid!, -======= - const randomUUid = crypto.randomUUID(); - let baseLoad: z.infer = { - tempId: randomUUid, - namespace: "wacs", - contentId: `${parsed.User}/${parsed.Repo}`, ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) fileType: payload.FileType, url: payload.Path, fileSizeBytes: payload.Size || 0, @@ -180,15 +152,9 @@ export async function wacsSbRenderingsApi( return baseLoad; }); // todo: becuase these are rendered over and over, we want to delete everything from the renderings and renderings meta tables for the given content id, and new meta (since blobs are replaced and not versioned out). Then we can post to the renderings and meta tables -<<<<<<< HEAD await db.transaction(async (tx) => { // Clear out all renderings and meta (cascade) for this wacs repo first since the pipeline recreates all blobs on a path on render. context.log(`Clearing prev renderings for ${parsed.User}/${parsed.Repo}`); -======= - - await db.transaction(async (tx) => { - // Clear out all renderings and meta (cascade) for this wacs repo first since the pipeline recreates all blobs on a path on render. ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const delResult = await handleDel(deletePayload); if (delResult.status != 200) { tx.rollback(); @@ -197,15 +163,12 @@ export async function wacsSbRenderingsApi( } } else { // Insert new renderings and meta -<<<<<<< HEAD context.log(`Posting new renderings for ${parsed.User}/${parsed.Repo}`); -======= ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) + context.log(`Posting new renderings for ${parsed.User}/${parsed.Repo}`); const postResult = await handleRenderingPost(dbPayload); if (postResult.status != 200) { tx.rollback(); if (postResult.jsonBody) { -<<<<<<< HEAD if (postResult.jsonBody.additionalErrors) { const errMessage = JSON.stringify( `ADDITIONAL ERRORS: \n ${postResult.jsonBody.additionalErrors}\n\n @@ -218,15 +181,12 @@ export async function wacsSbRenderingsApi( postResult.jsonBody.message || "failed to delete" ); } -======= - throw new Error(postResult.jsonBody.message || "failed to delete"); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) } } } }); } catch (error) { -<<<<<<< HEAD + context.error(`Error processing ${JSON.stringify(message)}`); context.error(`Error processing ${JSON.stringify(message)}`); context.error(error); if (error instanceof z.ZodError) { @@ -258,12 +218,6 @@ export async function checkContentExists({ return {exists: doesExist.length > 0, id: dbId}; } -======= - context.error(error); - } -} - ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) console.log("booting up the renderings bus listener"); app.serviceBusTopic("waLangApiRenderings", { connection: "BUS_CONN", From 07e1aa36ef6d5dd0bf7d88765c0af5c88ed3292e Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Tue, 26 Mar 2024 14:31:10 -0500 Subject: [PATCH 05/13] add a view for getting source zips from wacs --- controller/drizzle/0021_first_ink.sql | 18 ++++++++++++++++++ controller/drizzle/meta/_journal.json | 3 --- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 controller/drizzle/0021_first_ink.sql diff --git a/controller/drizzle/0021_first_ink.sql b/controller/drizzle/0021_first_ink.sql new file mode 100644 index 0000000..4752c4d --- /dev/null +++ b/controller/drizzle/0021_first_ink.sql @@ -0,0 +1,18 @@ +Custom SQL migration file, put you code below! + +CREATE OR REPLACE VIEW source_zips AS +SELECT c.*, CONCAT(g.repo_url, '/archive/master.zip') AS zip_url, COUNT(DISTINCT srm.book_slug) AS unique_book_slugs_count, +m.show_on_biel, m.status AS meta_status, l.national_name, l.english_name + +FROM content c +JOIN rendering r ON r.content_id = c.id +JOIN scriptural_rendering_metadata srm ON srm.rendering_id = r.id +JOIN git_repo g ON g.id = c.git_id +JOIN wa_content_meta m ON m.content_id = c.id +JOIN language l on c.language_id = l.ietf_code +WHERE c.domain = 'scripture' +AND m.show_on_biel = false +AND m.status = 'Active' +AND c.git_id IS NOT NULL +GROUP BY c.id, CONCAT(g.repo_url, '/archive/master.zip'), m.id, l.national_name, l.english_name +HAVING COUNT(DISTINCT srm.book_slug) > 26 \ No newline at end of file diff --git a/controller/drizzle/meta/_journal.json b/controller/drizzle/meta/_journal.json index 34c75d1..abd6962 100644 --- a/controller/drizzle/meta/_journal.json +++ b/controller/drizzle/meta/_journal.json @@ -148,7 +148,6 @@ "when": 1709679629988, "tag": "0020_right_mojo", "breakpoints": true -<<<<<<< HEAD }, { "idx": 21, @@ -177,8 +176,6 @@ "when": 1712691755151, "tag": "0024_daffy_black_bolt", "breakpoints": true -======= ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) } ] } \ No newline at end of file From 8550ca6b5a3519105cbbf35f50a89e3bf1b07a19 Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Wed, 3 Apr 2024 16:52:51 -0500 Subject: [PATCH 06/13] add a localization table and cron trigger --- controller/drizzle/0021_first_ink.sql | 2 - controller/drizzle/0022_stiff_raider.sql | 12 + controller/drizzle/meta/0022_snapshot.json | 671 +++++++++++++++++++++ controller/drizzle/meta/_journal.json | 7 + controller/src/db/schema/schema.ts | 22 + controller/src/functions/localization.ts | 39 ++ 6 files changed, 751 insertions(+), 2 deletions(-) create mode 100644 controller/drizzle/0022_stiff_raider.sql diff --git a/controller/drizzle/0021_first_ink.sql b/controller/drizzle/0021_first_ink.sql index 4752c4d..b38a174 100644 --- a/controller/drizzle/0021_first_ink.sql +++ b/controller/drizzle/0021_first_ink.sql @@ -1,5 +1,3 @@ -Custom SQL migration file, put you code below! - CREATE OR REPLACE VIEW source_zips AS SELECT c.*, CONCAT(g.repo_url, '/archive/master.zip') AS zip_url, COUNT(DISTINCT srm.book_slug) AS unique_book_slugs_count, m.show_on_biel, m.status AS meta_status, l.national_name, l.english_name diff --git a/controller/drizzle/0022_stiff_raider.sql b/controller/drizzle/0022_stiff_raider.sql new file mode 100644 index 0000000..dc707f8 --- /dev/null +++ b/controller/drizzle/0022_stiff_raider.sql @@ -0,0 +1,12 @@ +CREATE TABLE IF NOT EXISTS "localization" ( + "ietf_code" varchar NOT NULL, + "key" varchar NOT NULL, + "value" text NOT NULL, + CONSTRAINT "localization_pkey" PRIMARY KEY("ietf_code","key") +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "localization" ADD CONSTRAINT "localization_ietf_code_language_ietf_code_fk" FOREIGN KEY ("ietf_code") REFERENCES "language"("ietf_code") ON DELETE cascade ON UPDATE cascade; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; diff --git a/controller/drizzle/meta/0022_snapshot.json b/controller/drizzle/meta/0022_snapshot.json index 33fb2ed..e82f063 100644 --- a/controller/drizzle/meta/0022_snapshot.json +++ b/controller/drizzle/meta/0022_snapshot.json @@ -1,4 +1,5 @@ { +<<<<<<< HEAD "id": "e6f90db0-199b-4232-b5e3-f82b725d7c8c", "prevId": "07f7edc6-676a-4914-9b7b-fb53f4a7064a", "version": "5", @@ -265,6 +266,13 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, +======= + "id": "015a2339-2418-43d7-82ce-f01f8c72fba3", + "prevId": "2de8e394-451c-45b3-8c67-b223d60334e9", + "version": "5", + "dialect": "pg", + "tables": { +>>>>>>> afea3a4 (add a localization table and cron trigger) "language": { "name": "language", "schema": "", @@ -333,12 +341,24 @@ "indexes": { "ietf_idx": { "name": "ietf_idx", +<<<<<<< HEAD "columns": ["ietf_code"], +======= + "columns": [ + "ietf_code" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true }, "id_idx": { "name": "id_idx", +<<<<<<< HEAD "columns": ["id"], +======= + "columns": [ + "id" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, @@ -347,8 +367,17 @@ "name": "language_home_country_alpha2_country_alpha_2_fk", "tableFrom": "language", "tableTo": "country", +<<<<<<< HEAD "columnsFrom": ["home_country_alpha2"], "columnsTo": ["alpha_2"], +======= + "columnsFrom": [ + "home_country_alpha2" + ], + "columnsTo": [ + "alpha_2" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "no action", "onUpdate": "no action" } @@ -356,6 +385,57 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, +<<<<<<< HEAD +======= + "wa_language_meta": { + "name": "wa_language_meta", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ietf_code": { + "name": "ietf_code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_gateway": { + "name": "is_gateway", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "show_on_biel": { + "name": "show_on_biel", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "wa_language_meta_ietf_code_language_ietf_code_fk": { + "name": "wa_language_meta_ietf_code_language_ietf_code_fk", + "tableFrom": "wa_language_meta", + "tableTo": "language", + "columnsFrom": [ + "ietf_code" + ], + "columnsTo": [ + "ietf_code" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, +>>>>>>> afea3a4 (add a localization table and cron trigger) "language_alternate_name": { "name": "language_alternate_name", "schema": "", @@ -382,7 +462,14 @@ "indexes": { "name_ietf_idx": { "name": "name_ietf_idx", +<<<<<<< HEAD "columns": ["name", "ietf_code"], +======= + "columns": [ + "name", + "ietf_code" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, @@ -391,8 +478,17 @@ "name": "language_alternate_name_ietf_code_language_ietf_code_fk", "tableFrom": "language_alternate_name", "tableTo": "language", +<<<<<<< HEAD "columnsFrom": ["ietf_code"], "columnsTo": ["ietf_code"], +======= + "columnsFrom": [ + "ietf_code" + ], + "columnsTo": [ + "ietf_code" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -423,8 +519,17 @@ "name": "gateway_language_to_dependent_language_gateway_language_ietf_language_ietf_code_fk", "tableFrom": "gateway_language_to_dependent_language", "tableTo": "language", +<<<<<<< HEAD "columnsFrom": ["gateway_language_ietf"], "columnsTo": ["ietf_code"], +======= + "columnsFrom": [ + "gateway_language_ietf" + ], + "columnsTo": [ + "ietf_code" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" }, @@ -432,8 +537,17 @@ "name": "gateway_language_to_dependent_language_dependent_language_ietf_language_ietf_code_fk", "tableFrom": "gateway_language_to_dependent_language", "tableTo": "language", +<<<<<<< HEAD "columnsFrom": ["dependent_language_ietf"], "columnsTo": ["ietf_code"], +======= + "columnsFrom": [ + "dependent_language_ietf" + ], + "columnsTo": [ + "ietf_code" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -441,11 +555,19 @@ "compositePrimaryKeys": { "gateway_dependent_pkey": { "name": "gateway_dependent_pkey", +<<<<<<< HEAD "columns": ["gateway_language_ietf", "dependent_language_ietf"] +======= + "columns": [ + "gateway_language_ietf", + "dependent_language_ietf" + ] +>>>>>>> afea3a4 (add a localization table and cron trigger) } }, "uniqueConstraints": {} }, +<<<<<<< HEAD "localization": { "name": "localization", "schema": "", @@ -473,10 +595,76 @@ "type": "text", "primaryKey": false, "notNull": true +======= + "content": { + "name": "content", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(256)", + "primaryKey": true, + "notNull": true + }, + "language_id": { + "name": "language_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar(256)", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "type_id", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "domain", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "git_id": { + "name": "git_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_on": { + "name": "created_on", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "modified_on": { + "name": "modified_on", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "varchar", + "primaryKey": false, + "notNull": false +>>>>>>> afea3a4 (add a localization table and cron trigger) } }, "indexes": {}, "foreignKeys": { +<<<<<<< HEAD "localization_ietf_code_language_ietf_code_fk": { "name": "localization_ietf_code_language_ietf_code_fk", "tableFrom": "localization", @@ -497,6 +685,27 @@ }, "nonscriptural_rendering_metadata": { "name": "nonscriptural_rendering_metadata", +======= + "content_language_id_language_ietf_code_fk": { + "name": "content_language_id_language_ietf_code_fk", + "tableFrom": "content", + "tableTo": "language", + "columnsFrom": [ + "language_id" + ], + "columnsTo": [ + "ietf_code" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "wa_content_meta": { + "name": "wa_content_meta", +>>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -505,6 +714,7 @@ "primaryKey": true, "notNull": true }, +<<<<<<< HEAD "rendering_id": { "name": "rendering_id", "type": "serial", @@ -532,6 +742,47 @@ "tableTo": "rendered_content", "columnsFrom": ["rendering_id"], "columnsTo": ["id"], +======= + "content_id": { + "name": "content_id", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "show_on_biel": { + "name": "show_on_biel", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "content_idx": { + "name": "content_idx", + "columns": [ + "content_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "wa_content_meta_content_id_content_id_fk": { + "name": "wa_content_meta_content_id_content_id_fk", + "tableFrom": "wa_content_meta", + "tableTo": "content", + "columnsFrom": [ + "content_id" + ], + "columnsTo": [ + "id" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -539,8 +790,140 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, +<<<<<<< HEAD "rendered_content": { "name": "rendered_content", +======= + "connected_content": { + "name": "connected_content", + "schema": "", + "columns": { + "content_id_1": { + "name": "content_id_1", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "content_id_2": { + "name": "content_id_2", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "connected_content_content_id_1_content_id_fk": { + "name": "connected_content_content_id_1_content_id_fk", + "tableFrom": "connected_content", + "tableTo": "content", + "columnsFrom": [ + "content_id_1" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "connected_content_content_id_2_content_id_fk": { + "name": "connected_content_content_id_2_content_id_fk", + "tableFrom": "connected_content", + "tableTo": "content", + "columnsFrom": [ + "content_id_2" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": { + "connected_content_pkey": { + "name": "connected_content_pkey", + "columns": [ + "content_id_1", + "content_id_2" + ] + } + }, + "uniqueConstraints": {} + }, + "git_repo": { + "name": "git_repo", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "content_id": { + "name": "content_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "repo_name": { + "name": "repo_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "repo_url": { + "name": "repo_url", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "username_reponame_idx": { + "name": "username_reponame_idx", + "columns": [ + "username", + "repo_name" + ], + "isUnique": true + }, + "content_id_idx": { + "name": "content_id_idx", + "columns": [ + "content_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "git_repo_content_id_content_id_fk": { + "name": "git_repo_content_id_content_id_fk", + "tableFrom": "git_repo", + "tableTo": "content", + "columnsFrom": [ + "content_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "rendering": { + "name": "rendering", +>>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -596,17 +979,36 @@ "indexes": { "rendering_unique_idx": { "name": "rendering_unique_idx", +<<<<<<< HEAD "columns": ["url"], +======= + "columns": [ + "url" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, "foreignKeys": { +<<<<<<< HEAD "rendered_content_content_id_content_id_fk": { "name": "rendered_content_content_id_content_id_fk", "tableFrom": "rendered_content", "tableTo": "content", "columnsFrom": ["content_id"], "columnsTo": ["id"], +======= + "rendering_content_id_content_id_fk": { + "name": "rendering_content_id_content_id_fk", + "tableFrom": "rendering", + "tableTo": "content", + "columnsFrom": [ + "content_id" + ], + "columnsTo": [ + "id" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -669,12 +1071,25 @@ }, "indexes": {}, "foreignKeys": { +<<<<<<< HEAD "rendering_fk": { "name": "rendering_fk", "tableFrom": "scriptural_rendering_metadata", "tableTo": "rendered_content", "columnsFrom": ["rendering_id"], "columnsTo": ["id"], +======= + "scriptural_rendering_metadata_rendering_id_rendering_id_fk": { + "name": "scriptural_rendering_metadata_rendering_id_rendering_id_fk", + "tableFrom": "scriptural_rendering_metadata", + "tableTo": "rendering", + "columnsFrom": [ + "rendering_id" + ], + "columnsTo": [ + "id" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -682,8 +1097,13 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, +<<<<<<< HEAD "wa_content_metadata": { "name": "wa_content_metadata", +======= + "nonscriptural_rendering_metadata": { + "name": "nonscriptural_rendering_metadata", +>>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -692,6 +1112,7 @@ "primaryKey": true, "notNull": true }, +<<<<<<< HEAD "content_id": { "name": "content_id", "type": "varchar(256)", @@ -759,16 +1180,48 @@ "type": "boolean", "primaryKey": false, "notNull": true +======= + "rendering_id": { + "name": "rendering_id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(256)", + "primaryKey": false, + "notNull": false + }, + "additional_data": { + "name": "additional_data", + "type": "json", + "primaryKey": false, + "notNull": false +>>>>>>> afea3a4 (add a localization table and cron trigger) } }, "indexes": {}, "foreignKeys": { +<<<<<<< HEAD "metadata_language_fk": { "name": "metadata_language_fk", "tableFrom": "wa_language_metadata", "tableTo": "language", "columnsFrom": ["ietf_code"], "columnsTo": ["ietf_code"], +======= + "nonscriptural_rendering_metadata_rendering_id_rendering_id_fk": { + "name": "nonscriptural_rendering_metadata_rendering_id_rendering_id_fk", + "tableFrom": "nonscriptural_rendering_metadata", + "tableTo": "rendering", + "columnsFrom": [ + "rendering_id" + ], + "columnsTo": [ + "id" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -808,13 +1261,20 @@ "indexes": { "region_name_idx": { "name": "region_name_idx", +<<<<<<< HEAD "columns": ["region"], +======= + "columns": [ + "region" + ], +>>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} +<<<<<<< HEAD } }, "enums": { @@ -825,6 +1285,203 @@ "gloss": "gloss", "parascriptural": "parascriptural", "peripheral": "peripheral" +======= + }, + "country": { + "name": "country", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "world_region_id": { + "name": "world_region_id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "created_on": { + "name": "created_on", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "modified_on": { + "name": "modified_on", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "alpha_2": { + "name": "alpha_2", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "alpha_3": { + "name": "alpha_3", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "population": { + "name": "population", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "alpha_2_idx": { + "name": "alpha_2_idx", + "columns": [ + "alpha_2" + ], + "isUnique": true + } + }, + "foreignKeys": { + "country_world_region_id_world_region_id_fk": { + "name": "country_world_region_id_world_region_id_fk", + "tableFrom": "country", + "tableTo": "world_region", + "columnsFrom": [ + "world_region_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "country_to_language": { + "name": "country_to_language", + "schema": "", + "columns": { + "language_ietf_code": { + "name": "language_ietf_code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "country_alpha_2": { + "name": "country_alpha_2", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "country_to_language_language_ietf_code_language_ietf_code_fk": { + "name": "country_to_language_language_ietf_code_language_ietf_code_fk", + "tableFrom": "country_to_language", + "tableTo": "language", + "columnsFrom": [ + "language_ietf_code" + ], + "columnsTo": [ + "ietf_code" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "country_to_language_country_alpha_2_country_alpha_2_fk": { + "name": "country_to_language_country_alpha_2_country_alpha_2_fk", + "tableFrom": "country_to_language", + "tableTo": "country", + "columnsFrom": [ + "country_alpha_2" + ], + "columnsTo": [ + "alpha_2" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": { + "country_to_language_pkey": { + "name": "country_to_language_pkey", + "columns": [ + "language_ietf_code", + "country_alpha_2" + ] + } + }, + "uniqueConstraints": {} + }, + "localization": { + "name": "localization", + "schema": "", + "columns": { + "ietf_code": { + "name": "ietf_code", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "localization_ietf_code_language_ietf_code_fk": { + "name": "localization_ietf_code_language_ietf_code_fk", + "tableFrom": "localization", + "tableTo": "language", + "columnsFrom": [ + "ietf_code" + ], + "columnsTo": [ + "ietf_code" + ], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": { + "localization_pkey": { + "name": "localization_pkey", + "columns": [ + "ietf_code", + "key" + ] + } + }, + "uniqueConstraints": {} + } + }, + "enums": { + "direction": { + "name": "direction", + "values": { + "ltr": "ltr", + "rtl": "rtl" +>>>>>>> afea3a4 (add a localization table and cron trigger) } }, "type_id": { @@ -836,11 +1493,21 @@ "braille": "braille" } }, +<<<<<<< HEAD "direction": { "name": "direction", "values": { "ltr": "ltr", "rtl": "rtl" +======= + "domain": { + "name": "domain", + "values": { + "scripture": "scripture", + "gloss": "gloss", + "parascriptural": "parascriptural", + "peripheral": "peripheral" +>>>>>>> afea3a4 (add a localization table and cron trigger) } } }, @@ -850,4 +1517,8 @@ "schemas": {}, "tables": {} } +<<<<<<< HEAD +} +======= } +>>>>>>> afea3a4 (add a localization table and cron trigger) diff --git a/controller/drizzle/meta/_journal.json b/controller/drizzle/meta/_journal.json index abd6962..d9c73cf 100644 --- a/controller/drizzle/meta/_journal.json +++ b/controller/drizzle/meta/_journal.json @@ -176,6 +176,13 @@ "when": 1712691755151, "tag": "0024_daffy_black_bolt", "breakpoints": true + }, + { + "idx": 22, + "version": "5", + "when": 1712163855137, + "tag": "0022_stiff_raider", + "breakpoints": true } ] } \ No newline at end of file diff --git a/controller/src/db/schema/schema.ts b/controller/src/db/schema/schema.ts index c40f34d..05a0785 100644 --- a/controller/src/db/schema/schema.ts +++ b/controller/src/db/schema/schema.ts @@ -409,3 +409,25 @@ export const localization = pgTable( }; } ); + +export const localization = pgTable( + "localization", + { + ietfCode: varchar("ietf_code") + .references(() => language.ietfCode, { + onDelete: "cascade", + onUpdate: "cascade", + }) + .notNull(), + key: varchar("key").notNull(), + value: text("value").notNull(), + }, + (table) => { + return { + primaryKey: primaryKey({ + columns: [table.ietfCode, table.key], + name: "localization_pkey", + }), + }; + } +); diff --git a/controller/src/functions/localization.ts b/controller/src/functions/localization.ts index 1f00b9e..7746f44 100644 --- a/controller/src/functions/localization.ts +++ b/controller/src/functions/localization.ts @@ -17,11 +17,15 @@ export async function populateLocalization( myTimer: Timer, context: InvocationContext ): Promise { +<<<<<<< HEAD context.log( `Timer function processed request. at ${new Date()}. Next is ${ myTimer.scheduleStatus?.next }` ); +======= + context.log("Timer function processed request."); +>>>>>>> afea3a4 (add a localization table and cron trigger) const bookNamesResult = await populateScripturalBookNames(); context.log( Array.isArray(bookNamesResult) @@ -37,11 +41,18 @@ export async function populateLocalization( } async function populationResourceTypes() { +<<<<<<< HEAD const category = "resource_type"; const payload = localizations.reduce( (acc: insertLocalizationType[], curr) => { const rows = Object.entries(curr.dict).map(([key, value]) => { return {ietfCode: curr.ietf, key, value, category}; +======= + const payload = localizations.reduce( + (acc: insertLocalizationType[], curr) => { + const rows = Object.entries(curr.dict).map(([key, value]) => { + return {ietfCode: curr.ietf, key, value}; +>>>>>>> afea3a4 (add a localization table and cron trigger) }); acc.push(...rows); return acc; @@ -53,9 +64,15 @@ async function populationResourceTypes() { tableKey: "localization", content: payload, onConflictDoUpdateArgs: { +<<<<<<< HEAD target: [table.ietfCode, table.key, table.category], // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. set: onConflictSetAllFieldsToSqlExcluded(table, ["value"]), +======= + target: [table.ietfCode, table.key], + // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. + set: onConflictSetAllFieldsToSqlExcluded(table, ["ietfCode", "key"]), +>>>>>>> afea3a4 (add a localization table and cron trigger) }, }); return res; @@ -99,7 +116,11 @@ async function populateScripturalBookNames() { ) .leftJoin(content, eq(content.id, rendering.contentId)) .leftJoin(language, eq(language.ietfCode, content.languageId)) +<<<<<<< HEAD .leftJoin(gitRepo, eq(content.id, gitRepo.contentId)) +======= + .leftJoin(gitRepo, eq(content.gitId, gitRepo.id)) +>>>>>>> afea3a4 (add a localization table and cron trigger) .where( and( ilike(gitRepo.username, "%wa-catalog%"), @@ -108,6 +129,7 @@ async function populateScripturalBookNames() { ) ) .as("sq"); +<<<<<<< HEAD // for debuggin // const finalSql = db // .select({ @@ -120,6 +142,8 @@ async function populateScripturalBookNames() { // .where(eq(subquery.rn, 1)) // .orderBy(subquery.ietf_code, subquery.book_slug) // .toSQL(); +======= +>>>>>>> afea3a4 (add a localization table and cron trigger) const result = await db .select({ book_name: subquery.book_name, @@ -144,29 +168,44 @@ async function populateScripturalBookNames() { }) ) .parse(result); +<<<<<<< HEAD const category = "bible_book"; +======= +>>>>>>> afea3a4 (add a localization table and cron trigger) const payload: insertLocalizationType[] = parsed.map((row) => { return { ietfCode: row.ietf_code, key: row.book_slug.toLowerCase(), value: row.book_name, +<<<<<<< HEAD category, +======= +>>>>>>> afea3a4 (add a localization table and cron trigger) }; }); const inserted = await polymorphicInsert({ tableKey: "localization", content: payload, onConflictDoUpdateArgs: { +<<<<<<< HEAD target: [table.ietfCode, table.key, table.category], // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. set: onConflictSetAllFieldsToSqlExcluded(table, ["value"]), +======= + target: [table.ietfCode, table.key], + set: onConflictSetAllFieldsToSqlExcluded(table, ["ietfCode", "key"]), +>>>>>>> afea3a4 (add a localization table and cron trigger) }, }); return inserted; } app.timer("manageLocalizationTable", { +<<<<<<< HEAD schedule: "*/30 * * * * *", +======= + schedule: "0 0 0 * * *", +>>>>>>> afea3a4 (add a localization table and cron trigger) handler: populateLocalization, useMonitor: false, }); From d5cda67655ed06de0a3d4d14e2e130610063c567 Mon Sep 17 00:00:00 2001 From: danparisd <43418833+danparisd@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:52:58 -0400 Subject: [PATCH 07/13] Update Crowdin configuration file --- crowdin.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 crowdin.yml diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 0000000..0df4260 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: /controller/src/localizations/en.ts + translation: /controller/src/localizations/%two_letters_code%.ts From 7e92a09bd3292551b7c51c7765174cb1705aef34 Mon Sep 17 00:00:00 2001 From: danparisd <43418833+danparisd@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:00:52 -0400 Subject: [PATCH 08/13] Update Crowdin configuration file --- crowdin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdin.yml b/crowdin.yml index 0df4260..071c7c1 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,3 @@ files: - - source: /controller/src/localizations/en.ts + - source: /controller/src/localizations/*.ts translation: /controller/src/localizations/%two_letters_code%.ts From 26e40fe71c568bfa247e5ab3c37351d7026c5741 Mon Sep 17 00:00:00 2001 From: Will Kelly <67284402+wkelly17@users.noreply.github.com> Date: Wed, 24 Apr 2024 12:00:22 -0500 Subject: [PATCH 09/13] Update crowdin.yml Revert to only en --- crowdin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdin.yml b/crowdin.yml index 071c7c1..0df4260 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,3 @@ files: - - source: /controller/src/localizations/*.ts + - source: /controller/src/localizations/en.ts translation: /controller/src/localizations/%two_letters_code%.ts From e9f6f08718cf528e8bb2ce03cfb8019da515ce1b Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Wed, 24 Apr 2024 12:54:46 -0500 Subject: [PATCH 10/13] rebase dev onto feature branch that has crowdin --- .gitignore | 4 - controller/drizzle/meta/0022_snapshot.json | 671 ------------------ controller/package.json | 3 - controller/pnpm-lock.yaml | 385 ---------- controller/src/db/schema/schema.ts | 71 -- controller/src/db/utils/getMocks.ts | 4 - controller/src/functions/git-bus.ts | 48 -- controller/src/functions/localization.ts | 61 +- controller/src/functions/renderings-bus.ts | 3 - controller/src/localizations/en.ts | 1 + controller/src/localizations/es.ts | 7 - controller/src/localizations/index.ts | 6 - controller/src/routes/content.ts | 5 - controller/src/routes/rendering.ts | 20 - ...ateway_language_to_dependent_language.yaml | 9 - .../languageapi/tables/public_language.yaml | 16 - 16 files changed, 22 insertions(+), 1292 deletions(-) delete mode 100644 controller/src/localizations/es.ts delete mode 100644 controller/src/localizations/index.ts diff --git a/.gitignore b/.gitignore index 2354d35..ba1aea0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,6 @@ data_dump.sql proj_notes.md mise.toml .tool-versions -<<<<<<< HEAD launch.json .DS_Store fixup.ts -======= -launch.json ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) diff --git a/controller/drizzle/meta/0022_snapshot.json b/controller/drizzle/meta/0022_snapshot.json index e82f063..33fb2ed 100644 --- a/controller/drizzle/meta/0022_snapshot.json +++ b/controller/drizzle/meta/0022_snapshot.json @@ -1,5 +1,4 @@ { -<<<<<<< HEAD "id": "e6f90db0-199b-4232-b5e3-f82b725d7c8c", "prevId": "07f7edc6-676a-4914-9b7b-fb53f4a7064a", "version": "5", @@ -266,13 +265,6 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, -======= - "id": "015a2339-2418-43d7-82ce-f01f8c72fba3", - "prevId": "2de8e394-451c-45b3-8c67-b223d60334e9", - "version": "5", - "dialect": "pg", - "tables": { ->>>>>>> afea3a4 (add a localization table and cron trigger) "language": { "name": "language", "schema": "", @@ -341,24 +333,12 @@ "indexes": { "ietf_idx": { "name": "ietf_idx", -<<<<<<< HEAD "columns": ["ietf_code"], -======= - "columns": [ - "ietf_code" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true }, "id_idx": { "name": "id_idx", -<<<<<<< HEAD "columns": ["id"], -======= - "columns": [ - "id" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, @@ -367,17 +347,8 @@ "name": "language_home_country_alpha2_country_alpha_2_fk", "tableFrom": "language", "tableTo": "country", -<<<<<<< HEAD "columnsFrom": ["home_country_alpha2"], "columnsTo": ["alpha_2"], -======= - "columnsFrom": [ - "home_country_alpha2" - ], - "columnsTo": [ - "alpha_2" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "no action", "onUpdate": "no action" } @@ -385,57 +356,6 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, -<<<<<<< HEAD -======= - "wa_language_meta": { - "name": "wa_language_meta", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "ietf_code": { - "name": "ietf_code", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "is_gateway": { - "name": "is_gateway", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "show_on_biel": { - "name": "show_on_biel", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "wa_language_meta_ietf_code_language_ietf_code_fk": { - "name": "wa_language_meta_ietf_code_language_ietf_code_fk", - "tableFrom": "wa_language_meta", - "tableTo": "language", - "columnsFrom": [ - "ietf_code" - ], - "columnsTo": [ - "ietf_code" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, ->>>>>>> afea3a4 (add a localization table and cron trigger) "language_alternate_name": { "name": "language_alternate_name", "schema": "", @@ -462,14 +382,7 @@ "indexes": { "name_ietf_idx": { "name": "name_ietf_idx", -<<<<<<< HEAD "columns": ["name", "ietf_code"], -======= - "columns": [ - "name", - "ietf_code" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, @@ -478,17 +391,8 @@ "name": "language_alternate_name_ietf_code_language_ietf_code_fk", "tableFrom": "language_alternate_name", "tableTo": "language", -<<<<<<< HEAD "columnsFrom": ["ietf_code"], "columnsTo": ["ietf_code"], -======= - "columnsFrom": [ - "ietf_code" - ], - "columnsTo": [ - "ietf_code" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -519,17 +423,8 @@ "name": "gateway_language_to_dependent_language_gateway_language_ietf_language_ietf_code_fk", "tableFrom": "gateway_language_to_dependent_language", "tableTo": "language", -<<<<<<< HEAD "columnsFrom": ["gateway_language_ietf"], "columnsTo": ["ietf_code"], -======= - "columnsFrom": [ - "gateway_language_ietf" - ], - "columnsTo": [ - "ietf_code" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" }, @@ -537,17 +432,8 @@ "name": "gateway_language_to_dependent_language_dependent_language_ietf_language_ietf_code_fk", "tableFrom": "gateway_language_to_dependent_language", "tableTo": "language", -<<<<<<< HEAD "columnsFrom": ["dependent_language_ietf"], "columnsTo": ["ietf_code"], -======= - "columnsFrom": [ - "dependent_language_ietf" - ], - "columnsTo": [ - "ietf_code" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -555,19 +441,11 @@ "compositePrimaryKeys": { "gateway_dependent_pkey": { "name": "gateway_dependent_pkey", -<<<<<<< HEAD "columns": ["gateway_language_ietf", "dependent_language_ietf"] -======= - "columns": [ - "gateway_language_ietf", - "dependent_language_ietf" - ] ->>>>>>> afea3a4 (add a localization table and cron trigger) } }, "uniqueConstraints": {} }, -<<<<<<< HEAD "localization": { "name": "localization", "schema": "", @@ -595,76 +473,10 @@ "type": "text", "primaryKey": false, "notNull": true -======= - "content": { - "name": "content", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(256)", - "primaryKey": true, - "notNull": true - }, - "language_id": { - "name": "language_id", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false - }, - "type": { - "name": "type", - "type": "type_id", - "primaryKey": false, - "notNull": true - }, - "domain": { - "name": "domain", - "type": "domain", - "primaryKey": false, - "notNull": false - }, - "resource_type": { - "name": "resource_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "git_id": { - "name": "git_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_on": { - "name": "created_on", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "modified_on": { - "name": "modified_on", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "level": { - "name": "level", - "type": "varchar", - "primaryKey": false, - "notNull": false ->>>>>>> afea3a4 (add a localization table and cron trigger) } }, "indexes": {}, "foreignKeys": { -<<<<<<< HEAD "localization_ietf_code_language_ietf_code_fk": { "name": "localization_ietf_code_language_ietf_code_fk", "tableFrom": "localization", @@ -685,27 +497,6 @@ }, "nonscriptural_rendering_metadata": { "name": "nonscriptural_rendering_metadata", -======= - "content_language_id_language_ietf_code_fk": { - "name": "content_language_id_language_ietf_code_fk", - "tableFrom": "content", - "tableTo": "language", - "columnsFrom": [ - "language_id" - ], - "columnsTo": [ - "ietf_code" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "wa_content_meta": { - "name": "wa_content_meta", ->>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -714,7 +505,6 @@ "primaryKey": true, "notNull": true }, -<<<<<<< HEAD "rendering_id": { "name": "rendering_id", "type": "serial", @@ -742,47 +532,6 @@ "tableTo": "rendered_content", "columnsFrom": ["rendering_id"], "columnsTo": ["id"], -======= - "content_id": { - "name": "content_id", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true - }, - "show_on_biel": { - "name": "show_on_biel", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "content_idx": { - "name": "content_idx", - "columns": [ - "content_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "wa_content_meta_content_id_content_id_fk": { - "name": "wa_content_meta_content_id_content_id_fk", - "tableFrom": "wa_content_meta", - "tableTo": "content", - "columnsFrom": [ - "content_id" - ], - "columnsTo": [ - "id" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -790,140 +539,8 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, -<<<<<<< HEAD "rendered_content": { "name": "rendered_content", -======= - "connected_content": { - "name": "connected_content", - "schema": "", - "columns": { - "content_id_1": { - "name": "content_id_1", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true - }, - "content_id_2": { - "name": "content_id_2", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "connected_content_content_id_1_content_id_fk": { - "name": "connected_content_content_id_1_content_id_fk", - "tableFrom": "connected_content", - "tableTo": "content", - "columnsFrom": [ - "content_id_1" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "connected_content_content_id_2_content_id_fk": { - "name": "connected_content_content_id_2_content_id_fk", - "tableFrom": "connected_content", - "tableTo": "content", - "columnsFrom": [ - "content_id_2" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": { - "connected_content_pkey": { - "name": "connected_content_pkey", - "columns": [ - "content_id_1", - "content_id_2" - ] - } - }, - "uniqueConstraints": {} - }, - "git_repo": { - "name": "git_repo", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_id": { - "name": "content_id", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "username": { - "name": "username", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "repo_name": { - "name": "repo_name", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "repo_url": { - "name": "repo_url", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "username_reponame_idx": { - "name": "username_reponame_idx", - "columns": [ - "username", - "repo_name" - ], - "isUnique": true - }, - "content_id_idx": { - "name": "content_id_idx", - "columns": [ - "content_id" - ], - "isUnique": true - } - }, - "foreignKeys": { - "git_repo_content_id_content_id_fk": { - "name": "git_repo_content_id_content_id_fk", - "tableFrom": "git_repo", - "tableTo": "content", - "columnsFrom": [ - "content_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "rendering": { - "name": "rendering", ->>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -979,36 +596,17 @@ "indexes": { "rendering_unique_idx": { "name": "rendering_unique_idx", -<<<<<<< HEAD "columns": ["url"], -======= - "columns": [ - "url" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, "foreignKeys": { -<<<<<<< HEAD "rendered_content_content_id_content_id_fk": { "name": "rendered_content_content_id_content_id_fk", "tableFrom": "rendered_content", "tableTo": "content", "columnsFrom": ["content_id"], "columnsTo": ["id"], -======= - "rendering_content_id_content_id_fk": { - "name": "rendering_content_id_content_id_fk", - "tableFrom": "rendering", - "tableTo": "content", - "columnsFrom": [ - "content_id" - ], - "columnsTo": [ - "id" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -1071,25 +669,12 @@ }, "indexes": {}, "foreignKeys": { -<<<<<<< HEAD "rendering_fk": { "name": "rendering_fk", "tableFrom": "scriptural_rendering_metadata", "tableTo": "rendered_content", "columnsFrom": ["rendering_id"], "columnsTo": ["id"], -======= - "scriptural_rendering_metadata_rendering_id_rendering_id_fk": { - "name": "scriptural_rendering_metadata_rendering_id_rendering_id_fk", - "tableFrom": "scriptural_rendering_metadata", - "tableTo": "rendering", - "columnsFrom": [ - "rendering_id" - ], - "columnsTo": [ - "id" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -1097,13 +682,8 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, -<<<<<<< HEAD "wa_content_metadata": { "name": "wa_content_metadata", -======= - "nonscriptural_rendering_metadata": { - "name": "nonscriptural_rendering_metadata", ->>>>>>> afea3a4 (add a localization table and cron trigger) "schema": "", "columns": { "id": { @@ -1112,7 +692,6 @@ "primaryKey": true, "notNull": true }, -<<<<<<< HEAD "content_id": { "name": "content_id", "type": "varchar(256)", @@ -1180,48 +759,16 @@ "type": "boolean", "primaryKey": false, "notNull": true -======= - "rendering_id": { - "name": "rendering_id", - "type": "serial", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(256)", - "primaryKey": false, - "notNull": false - }, - "additional_data": { - "name": "additional_data", - "type": "json", - "primaryKey": false, - "notNull": false ->>>>>>> afea3a4 (add a localization table and cron trigger) } }, "indexes": {}, "foreignKeys": { -<<<<<<< HEAD "metadata_language_fk": { "name": "metadata_language_fk", "tableFrom": "wa_language_metadata", "tableTo": "language", "columnsFrom": ["ietf_code"], "columnsTo": ["ietf_code"], -======= - "nonscriptural_rendering_metadata_rendering_id_rendering_id_fk": { - "name": "nonscriptural_rendering_metadata_rendering_id_rendering_id_fk", - "tableFrom": "nonscriptural_rendering_metadata", - "tableTo": "rendering", - "columnsFrom": [ - "rendering_id" - ], - "columnsTo": [ - "id" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "onDelete": "cascade", "onUpdate": "cascade" } @@ -1261,20 +808,13 @@ "indexes": { "region_name_idx": { "name": "region_name_idx", -<<<<<<< HEAD "columns": ["region"], -======= - "columns": [ - "region" - ], ->>>>>>> afea3a4 (add a localization table and cron trigger) "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} -<<<<<<< HEAD } }, "enums": { @@ -1285,203 +825,6 @@ "gloss": "gloss", "parascriptural": "parascriptural", "peripheral": "peripheral" -======= - }, - "country": { - "name": "country", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "world_region_id": { - "name": "world_region_id", - "type": "serial", - "primaryKey": false, - "notNull": true - }, - "created_on": { - "name": "created_on", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "modified_on": { - "name": "modified_on", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "alpha_2": { - "name": "alpha_2", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "alpha_3": { - "name": "alpha_3", - "type": "varchar", - "primaryKey": false, - "notNull": false - }, - "population": { - "name": "population", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "alpha_2_idx": { - "name": "alpha_2_idx", - "columns": [ - "alpha_2" - ], - "isUnique": true - } - }, - "foreignKeys": { - "country_world_region_id_world_region_id_fk": { - "name": "country_world_region_id_world_region_id_fk", - "tableFrom": "country", - "tableTo": "world_region", - "columnsFrom": [ - "world_region_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "country_to_language": { - "name": "country_to_language", - "schema": "", - "columns": { - "language_ietf_code": { - "name": "language_ietf_code", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "country_alpha_2": { - "name": "country_alpha_2", - "type": "varchar", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "country_to_language_language_ietf_code_language_ietf_code_fk": { - "name": "country_to_language_language_ietf_code_language_ietf_code_fk", - "tableFrom": "country_to_language", - "tableTo": "language", - "columnsFrom": [ - "language_ietf_code" - ], - "columnsTo": [ - "ietf_code" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "country_to_language_country_alpha_2_country_alpha_2_fk": { - "name": "country_to_language_country_alpha_2_country_alpha_2_fk", - "tableFrom": "country_to_language", - "tableTo": "country", - "columnsFrom": [ - "country_alpha_2" - ], - "columnsTo": [ - "alpha_2" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": { - "country_to_language_pkey": { - "name": "country_to_language_pkey", - "columns": [ - "language_ietf_code", - "country_alpha_2" - ] - } - }, - "uniqueConstraints": {} - }, - "localization": { - "name": "localization", - "schema": "", - "columns": { - "ietf_code": { - "name": "ietf_code", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "key": { - "name": "key", - "type": "varchar", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "localization_ietf_code_language_ietf_code_fk": { - "name": "localization_ietf_code_language_ietf_code_fk", - "tableFrom": "localization", - "tableTo": "language", - "columnsFrom": [ - "ietf_code" - ], - "columnsTo": [ - "ietf_code" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": { - "localization_pkey": { - "name": "localization_pkey", - "columns": [ - "ietf_code", - "key" - ] - } - }, - "uniqueConstraints": {} - } - }, - "enums": { - "direction": { - "name": "direction", - "values": { - "ltr": "ltr", - "rtl": "rtl" ->>>>>>> afea3a4 (add a localization table and cron trigger) } }, "type_id": { @@ -1493,21 +836,11 @@ "braille": "braille" } }, -<<<<<<< HEAD "direction": { "name": "direction", "values": { "ltr": "ltr", "rtl": "rtl" -======= - "domain": { - "name": "domain", - "values": { - "scripture": "scripture", - "gloss": "gloss", - "parascriptural": "parascriptural", - "peripheral": "peripheral" ->>>>>>> afea3a4 (add a localization table and cron trigger) } } }, @@ -1517,8 +850,4 @@ "schemas": {}, "tables": {} } -<<<<<<< HEAD -} -======= } ->>>>>>> afea3a4 (add a localization table and cron trigger) diff --git a/controller/package.json b/controller/package.json index 8dfc5ee..53f51ec 100644 --- a/controller/package.json +++ b/controller/package.json @@ -21,10 +21,7 @@ "dependencies": { "@asteasolutions/zod-to-openapi": "^6.4.0", "@azure/functions": "^4.3.0", -<<<<<<< HEAD "@paralleldrive/cuid2": "^2.2.2", -======= ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) "api-spec-converter": "^2.12.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.29.4", diff --git a/controller/pnpm-lock.yaml b/controller/pnpm-lock.yaml index 9432b37..f3b1c2c 100644 --- a/controller/pnpm-lock.yaml +++ b/controller/pnpm-lock.yaml @@ -5,7 +5,6 @@ settings: excludeLinksFromLockfile: false dependencies: -<<<<<<< HEAD "@asteasolutions/zod-to-openapi": specifier: ^6.4.0 version: 6.4.0(zod@3.22.4) @@ -15,14 +14,6 @@ dependencies: "@paralleldrive/cuid2": specifier: ^2.2.2 version: 2.2.2 -======= - '@asteasolutions/zod-to-openapi': - specifier: ^6.4.0 - version: 6.4.0(zod@3.22.4) - '@azure/functions': - specifier: ^4.3.0 - version: 4.3.0 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) api-spec-converter: specifier: ^2.12.0 version: 2.12.0 @@ -49,17 +40,10 @@ devDependencies: "@anatine/zod-mock": specifier: ^3.13.3 version: 3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4) -<<<<<<< HEAD "@faker-js/faker": specifier: ^8.4.1 version: 8.4.1 "@types/node": -======= - '@faker-js/faker': - specifier: ^8.4.1 - version: 8.4.1 - '@types/node': ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) specifier: ^20.11.24 version: 20.11.24 drizzle-kit: @@ -82,39 +66,25 @@ devDependencies: version: 5.3.3 packages: -<<<<<<< HEAD /@anatine/zod-mock@3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4): resolution: { integrity: sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==, } -======= - - /@anatine/zod-mock@3.13.3(@faker-js/faker@8.4.1)(zod@3.22.4): - resolution: {integrity: sha512-AN+0YEFE7s6BpuALQHhEoVmJmD+0gPnf4Fehc6oE5NHbM3X2ZD5fW5M6vvot29NWUB6nxvj0gu+BPQ9cVnxALw==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: "@faker-js/faker": ^7.0.0 || ^8.0.0 zod: ^3.21.4 dependencies: -<<<<<<< HEAD "@faker-js/faker": 8.4.1 -======= - '@faker-js/faker': 8.4.1 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) randexp: 0.5.3 zod: 3.22.4 dev: true /@asteasolutions/zod-to-openapi@6.4.0(zod@3.22.4): -<<<<<<< HEAD resolution: { integrity: sha512-8cxfF7AHHx2PqnN4Cd8/O8CBu/nVYJP9DpnfVLW3BFb66VJDnqI/CczZnkqMc3SNh6J9GiX7JbJ5T4BSP4HZ2Q==, } -======= - resolution: {integrity: sha512-8cxfF7AHHx2PqnN4Cd8/O8CBu/nVYJP9DpnfVLW3BFb66VJDnqI/CczZnkqMc3SNh6J9GiX7JbJ5T4BSP4HZ2Q==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: zod: ^3.20.2 dependencies: @@ -123,16 +93,11 @@ packages: dev: false /@azure/functions@4.3.0: -<<<<<<< HEAD resolution: { integrity: sha512-l7iAuSyyBCOgwkDZmV6UUagwkFoqMOVfq01oJ+rJlFhN7Mb8/kkUAZLffCPUxBy2Wwah741BhJGizwaCP9G2/A==, } engines: {node: ">=18.0"} -======= - resolution: {integrity: sha512-l7iAuSyyBCOgwkDZmV6UUagwkFoqMOVfq01oJ+rJlFhN7Mb8/kkUAZLffCPUxBy2Wwah741BhJGizwaCP9G2/A==} - engines: {node: '>=18.0'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: cookie: 0.6.0 long: 4.0.0 @@ -159,14 +124,10 @@ packages: dev: true /@drizzle-team/studio@0.0.39: -<<<<<<< HEAD resolution: { integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==, } -======= - resolution: {integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: superjson: 2.2.1 dev: true @@ -192,16 +153,11 @@ packages: dev: true /@esbuild/aix-ppc64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ppc64] os: [aix] requiresBuild: true @@ -221,16 +177,11 @@ packages: optional: true /@esbuild/android-arm64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [android] requiresBuild: true @@ -250,16 +201,11 @@ packages: optional: true /@esbuild/android-arm@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm] os: [android] requiresBuild: true @@ -279,16 +225,11 @@ packages: optional: true /@esbuild/android-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [android] requiresBuild: true @@ -308,16 +249,11 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [darwin] requiresBuild: true @@ -337,16 +273,11 @@ packages: optional: true /@esbuild/darwin-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [darwin] requiresBuild: true @@ -366,16 +297,11 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [freebsd] requiresBuild: true @@ -395,16 +321,11 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [freebsd] requiresBuild: true @@ -424,16 +345,11 @@ packages: optional: true /@esbuild/linux-arm64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [linux] requiresBuild: true @@ -453,16 +369,11 @@ packages: optional: true /@esbuild/linux-arm@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm] os: [linux] requiresBuild: true @@ -482,16 +393,11 @@ packages: optional: true /@esbuild/linux-ia32@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ia32] os: [linux] requiresBuild: true @@ -511,16 +417,11 @@ packages: optional: true /@esbuild/linux-loong64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [loong64] os: [linux] requiresBuild: true @@ -540,16 +441,11 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [mips64el] os: [linux] requiresBuild: true @@ -569,16 +465,11 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ppc64] os: [linux] requiresBuild: true @@ -598,16 +489,11 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [riscv64] os: [linux] requiresBuild: true @@ -627,16 +513,11 @@ packages: optional: true /@esbuild/linux-s390x@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [s390x] os: [linux] requiresBuild: true @@ -656,16 +537,11 @@ packages: optional: true /@esbuild/linux-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [linux] requiresBuild: true @@ -685,16 +561,11 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [netbsd] requiresBuild: true @@ -714,16 +585,11 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [openbsd] requiresBuild: true @@ -743,16 +609,11 @@ packages: optional: true /@esbuild/sunos-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [sunos] requiresBuild: true @@ -772,16 +633,11 @@ packages: optional: true /@esbuild/win32-arm64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [arm64] os: [win32] requiresBuild: true @@ -801,16 +657,11 @@ packages: optional: true /@esbuild/win32-ia32@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [ia32] os: [win32] requiresBuild: true @@ -830,16 +681,11 @@ packages: optional: true /@esbuild/win32-x64@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) cpu: [x64] os: [win32] requiresBuild: true @@ -847,7 +693,6 @@ packages: optional: true /@faker-js/faker@8.4.1: -<<<<<<< HEAD resolution: { integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==, @@ -861,15 +706,6 @@ packages: integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==, } engines: {node: ">=14"} -======= - resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} - dev: true - - /@fastify/busboy@2.1.1: - resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} - engines: {node: '>=14'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /@isaacs/cliui@8.0.2: @@ -888,16 +724,11 @@ packages: dev: true /@jridgewell/resolve-uri@3.1.2: -<<<<<<< HEAD resolution: { integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==, } engines: {node: ">=6.0.0"} -======= - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /@jridgewell/sourcemap-codec@1.4.15: @@ -913,13 +744,8 @@ packages: integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, } dependencies: -<<<<<<< HEAD "@jridgewell/resolve-uri": 3.1.2 "@jridgewell/sourcemap-codec": 1.4.15 -======= - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /@noble/hashes@1.4.0: @@ -984,23 +810,15 @@ packages: } requiresBuild: true dependencies: -<<<<<<< HEAD "@types/node": 20.11.24 -======= - '@types/node': 20.11.24 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false optional: true /@types/node@20.11.24: -<<<<<<< HEAD resolution: { integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==, } -======= - resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: undici-types: 5.26.5 @@ -1011,11 +829,7 @@ packages: } requiresBuild: true dependencies: -<<<<<<< HEAD "@types/node": 20.11.24 -======= - '@types/node': 20.11.24 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false optional: true @@ -1039,16 +853,11 @@ packages: optional: true /acorn-walk@8.3.2: -<<<<<<< HEAD resolution: { integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==, } engines: {node: ">=0.4.0"} -======= - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} - engines: {node: '>=0.4.0'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /acorn@8.11.3: @@ -1318,16 +1127,11 @@ packages: engines: {node: ">=4"} /call-bind@1.0.7: -<<<<<<< HEAD resolution: { integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -1387,16 +1191,11 @@ packages: optional: true /cli-color@2.0.4: -<<<<<<< HEAD resolution: { integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==, } engines: {node: ">=0.10"} -======= - resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} - engines: {node: '>=0.10'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 es5-ext: 0.10.64 @@ -1609,16 +1408,11 @@ packages: dev: true /d@1.0.2: -<<<<<<< HEAD resolution: { integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==, } engines: {node: ">=0.12"} -======= - resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} - engines: {node: '>=0.12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es5-ext: 0.10.64 type: 2.7.2 @@ -1691,16 +1485,11 @@ packages: dev: false /define-data-property@1.1.4: -<<<<<<< HEAD resolution: { integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -1743,16 +1532,11 @@ packages: dev: true /dotenv@16.4.5: -<<<<<<< HEAD resolution: { integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /drafter.js@2.6.7: @@ -1784,7 +1568,6 @@ packages: dev: true /drizzle-kit@0.20.14: -<<<<<<< HEAD resolution: { integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==, @@ -1793,13 +1576,6 @@ packages: dependencies: "@drizzle-team/studio": 0.0.39 "@esbuild-kit/esm-loader": 2.6.5 -======= - resolution: {integrity: sha512-0fHv3YIEaUcSVPSGyaaBfOi9bmpajjhbJNdPsRMIUvYdLVxBu9eGjH8mRc3Qk7HVmEidFc/lhG1YyJhoXrn5yA==} - hasBin: true - dependencies: - '@drizzle-team/studio': 0.0.39 - '@esbuild-kit/esm-loader': 2.6.5 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) camelcase: 7.0.1 chalk: 5.3.0 commander: 9.5.0 @@ -1817,14 +1593,10 @@ packages: dev: true /drizzle-orm@0.29.4(pg@8.11.3)(postgres@3.4.3): -<<<<<<< HEAD resolution: { integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==, } -======= - resolution: {integrity: sha512-ZnSM8TAxFhzH7p1s3+w3pRE/eKaOeNkH9SKitm717pubDVVcV2I0BCDBPGKV+pe02+wMfw37ntlTcCyo2rA3IA==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: "@aws-sdk/client-rds-data": ">=3" "@cloudflare/workers-types": ">=3" @@ -1899,14 +1671,10 @@ packages: dev: false /drizzle-zod@0.5.1(drizzle-orm@0.29.4)(zod@3.22.4): -<<<<<<< HEAD resolution: { integrity: sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A==, } -======= - resolution: {integrity: sha512-C/8bvzUH/zSnVfwdSibOgFjLhtDtbKYmkbPbUCq46QZyZCH6kODIMSOgZ8R7rVjoI+tCj3k06MRJMDqsIeoS4A==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: drizzle-orm: ">=0.23.13" zod: "*" @@ -2011,22 +1779,16 @@ packages: optional: true /es-define-property@1.0.0: -<<<<<<< HEAD resolution: { integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: get-intrinsic: 1.2.4 dev: false /es-errors@1.3.0: -<<<<<<< HEAD resolution: { integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==, @@ -2040,15 +1802,6 @@ packages: integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==, } engines: {node: ">=0.10"} -======= - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - dev: false - - /es5-ext@0.10.64: - resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} - engines: {node: '>=0.10'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dependencies: es6-iterator: 2.0.3 @@ -2087,16 +1840,11 @@ packages: optional: true /es6-symbol@3.1.4: -<<<<<<< HEAD resolution: { integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==, } engines: {node: ">=0.12"} -======= - resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} - engines: {node: '>=0.12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 ext: 1.7.0 @@ -2115,14 +1863,10 @@ packages: dev: true /esbuild-register@3.5.0(esbuild@0.19.12): -<<<<<<< HEAD resolution: { integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==, } -======= - resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) peerDependencies: esbuild: ">=0.12 <1" dependencies: @@ -2166,7 +1910,6 @@ packages: dev: true /esbuild@0.19.12: -<<<<<<< HEAD resolution: { integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==, @@ -2198,36 +1941,6 @@ packages: "@esbuild/win32-arm64": 0.19.12 "@esbuild/win32-ia32": 0.19.12 "@esbuild/win32-x64": 0.19.12 -======= - resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/aix-ppc64': 0.19.12 - '@esbuild/android-arm': 0.19.12 - '@esbuild/android-arm64': 0.19.12 - '@esbuild/android-x64': 0.19.12 - '@esbuild/darwin-arm64': 0.19.12 - '@esbuild/darwin-x64': 0.19.12 - '@esbuild/freebsd-arm64': 0.19.12 - '@esbuild/freebsd-x64': 0.19.12 - '@esbuild/linux-arm': 0.19.12 - '@esbuild/linux-arm64': 0.19.12 - '@esbuild/linux-ia32': 0.19.12 - '@esbuild/linux-loong64': 0.19.12 - '@esbuild/linux-mips64el': 0.19.12 - '@esbuild/linux-ppc64': 0.19.12 - '@esbuild/linux-riscv64': 0.19.12 - '@esbuild/linux-s390x': 0.19.12 - '@esbuild/linux-x64': 0.19.12 - '@esbuild/netbsd-x64': 0.19.12 - '@esbuild/openbsd-x64': 0.19.12 - '@esbuild/sunos-x64': 0.19.12 - '@esbuild/win32-arm64': 0.19.12 - '@esbuild/win32-ia32': 0.19.12 - '@esbuild/win32-x64': 0.19.12 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /escodegen@0.0.21: @@ -2281,16 +1994,11 @@ packages: optional: true /esniff@2.0.1: -<<<<<<< HEAD resolution: { integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==, } engines: {node: ">=0.10"} -======= - resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} - engines: {node: '>=0.10'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: d: 1.0.2 es5-ext: 0.10.64 @@ -2578,16 +2286,11 @@ packages: optional: true /get-intrinsic@1.2.4: -<<<<<<< HEAD resolution: { integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-errors: 1.3.0 function-bind: 1.1.2 @@ -2750,29 +2453,20 @@ packages: dev: false /has-property-descriptors@1.0.2: -<<<<<<< HEAD resolution: { integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==, } -======= - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: es-define-property: 1.0.0 dev: false /has-proto@1.0.3: -<<<<<<< HEAD resolution: { integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /has-symbols@1.0.3: @@ -2784,16 +2478,11 @@ packages: dev: false /hasown@2.0.1: -<<<<<<< HEAD resolution: { integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: function-bind: 1.1.2 dev: false @@ -3163,14 +2852,10 @@ packages: optional: true /json-schema-faker@0.5.6: -<<<<<<< HEAD resolution: { integrity: sha512-u/cFC26/GDxh2vPiAC8B8xVvpXAW+QYtG2mijEbKrimCk8IHtiwQBjCE8TwvowdhALWq9IcdIWZ+/8ocXvdL3Q==, } -======= - resolution: {integrity: sha512-u/cFC26/GDxh2vPiAC8B8xVvpXAW+QYtG2mijEbKrimCk8IHtiwQBjCE8TwvowdhALWq9IcdIWZ+/8ocXvdL3Q==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dependencies: json-schema-ref-parser: 6.1.0 @@ -3413,14 +3098,10 @@ packages: optional: true /lru-cache@10.2.0: -<<<<<<< HEAD resolution: { integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==, } -======= - resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) engines: {node: 14 || >=16.14} dev: true @@ -3744,14 +3425,10 @@ packages: dev: false /openapi3-ts@4.2.2: -<<<<<<< HEAD resolution: { integrity: sha512-+9g4actZKeb3czfi9gVQ4Br2Ju3KwhCAQJBNaKgye5KggqcBLIhFHH+nIkcm0BUX00TrAJl6dH4JWgM4G4JWrw==, } -======= - resolution: {integrity: sha512-+9g4actZKeb3czfi9gVQ4Br2Ju3KwhCAQJBNaKgye5KggqcBLIhFHH+nIkcm0BUX00TrAJl6dH4JWgM4G4JWrw==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: yaml: 2.4.0 dev: false @@ -4067,16 +3744,11 @@ packages: xtend: 4.0.2 /postgres@3.4.3: -<<<<<<< HEAD resolution: { integrity: sha512-iHJn4+M9vbTdHSdDzNkC0crHq+1CUdFhx+YqCE+SqWxPjm+Zu63jq7yZborOBF64c8pc58O5uMudyL1FQcHacA==, } engines: {node: ">=12"} -======= - resolution: {integrity: sha512-iHJn4+M9vbTdHSdDzNkC0crHq+1CUdFhx+YqCE+SqWxPjm+Zu63jq7yZborOBF64c8pc58O5uMudyL1FQcHacA==} - engines: {node: '>=12'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /prelude-ls@1.1.2: @@ -4403,16 +4075,11 @@ packages: optional: true /semver@7.6.0: -<<<<<<< HEAD resolution: { integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==, } engines: {node: ">=10"} -======= - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} - engines: {node: '>=10'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dependencies: lru-cache: 6.0.0 @@ -4427,16 +4094,11 @@ packages: optional: true /set-function-length@1.2.1: -<<<<<<< HEAD resolution: { integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -4555,16 +4217,11 @@ packages: optional: true /side-channel@1.0.6: -<<<<<<< HEAD resolution: { integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==, } engines: {node: ">= 0.4"} -======= - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -4642,14 +4299,10 @@ packages: optional: true /spdx-exceptions@2.5.0: -<<<<<<< HEAD resolution: { integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==, } -======= - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -4667,14 +4320,10 @@ packages: optional: true /spdx-license-ids@3.0.17: -<<<<<<< HEAD resolution: { integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==, } -======= - resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -4745,14 +4394,10 @@ packages: optional: true /stream-shift@1.0.3: -<<<<<<< HEAD resolution: { integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==, } -======= - resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) requiresBuild: true dev: false optional: true @@ -5044,14 +4689,10 @@ packages: dev: false /ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3): -<<<<<<< HEAD resolution: { integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==, } -======= - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true peerDependencies: "@swc/core": ">=1.2.50" @@ -5064,21 +4705,12 @@ packages: "@swc/wasm": optional: true dependencies: -<<<<<<< HEAD "@cspotcode/source-map-support": 0.8.1 "@tsconfig/node10": 1.0.9 "@tsconfig/node12": 1.0.11 "@tsconfig/node14": 1.0.3 "@tsconfig/node16": 1.0.4 "@types/node": 20.11.24 -======= - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.24 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -5119,16 +4751,11 @@ packages: optional: true /type-fest@4.10.3: -<<<<<<< HEAD resolution: { integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==, } engines: {node: ">=16"} -======= - resolution: {integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==} - engines: {node: '>=16'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: true /type-of-is@3.5.1: @@ -5191,7 +4818,6 @@ packages: } /undici@5.28.3: -<<<<<<< HEAD resolution: { integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==, @@ -5199,12 +4825,6 @@ packages: engines: {node: ">=14.0"} dependencies: "@fastify/busboy": 2.1.1 -======= - resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} - engines: {node: '>=14.0'} - dependencies: - '@fastify/busboy': 2.1.1 ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) dev: false /uri-js@4.4.1: @@ -5430,16 +5050,11 @@ packages: } /yaml@2.4.0: -<<<<<<< HEAD resolution: { integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==, } engines: {node: ">= 14"} -======= - resolution: {integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==} - engines: {node: '>= 14'} ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) hasBin: true dev: false diff --git a/controller/src/db/schema/schema.ts b/controller/src/db/schema/schema.ts index 05a0785..ad3d06c 100644 --- a/controller/src/db/schema/schema.ts +++ b/controller/src/db/schema/schema.ts @@ -50,7 +50,6 @@ export const language = pgTable( } ); //@=============== WA LANG META ============= -<<<<<<< HEAD export const waLangMetadata = pgTable( "wa_language_metadata", { @@ -72,19 +71,6 @@ export const waLangMetadata = pgTable( }; } ); -======= -export const waLangMetadata = pgTable("wa_language_meta", { - id: serial("id").primaryKey(), - ietfCode: varchar("ietf_code") - .references(() => language.ietfCode, { - onDelete: "cascade", - onUpdate: "cascade", - }) - .notNull(), - isGateway: boolean("is_gateway").notNull(), - showOnBiel: boolean("show_on_biel").notNull(), -}); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) //@=============== LANG ALT ============= export const languageAlternateName = pgTable( @@ -131,7 +117,6 @@ export const languagesToLanguages = pgTable( columns: [table.gatewayLanguageId, table.gatewayLanguageToId], name: "gateway_dependent_pkey", }), -<<<<<<< HEAD }; } ); @@ -157,8 +142,6 @@ export const content = pgTable( table.name, table.namespace ), -======= ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; } ); @@ -182,7 +165,6 @@ export const waContentMetadata = pgTable( ); //@=============== DIRECTLY CONNECTED CONTENT ============= -<<<<<<< HEAD // export const connectedContent = pgTable( // "connected_content", // { @@ -200,25 +182,6 @@ export const waContentMetadata = pgTable( // }), // }) // ); -======= -export const connectedContent = pgTable( - "connected_content", - { - contentId1: varchar("content_id_1", {length: 256}) - .references(() => content.id, {onDelete: "cascade", onUpdate: "cascade"}) - .notNull(), - contentId2: varchar("content_id_2", {length: 256}) - .references(() => content.id, {onDelete: "cascade", onUpdate: "cascade"}) - .notNull(), - }, - (table) => ({ - primaryKey: primaryKey({ - columns: [table.contentId1, table.contentId2], - name: "connected_content_pkey", - }), - }) -); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) //@=============== GIT REPO ============= export const gitRepo = pgTable( "git_repo", @@ -271,16 +234,7 @@ export const scripturalRenderingMetadata = pgTable( "scriptural_rendering_metadata", { id: serial("id").primaryKey(), -<<<<<<< HEAD renderingId: serial("rendering_id").notNull(), -======= - renderingId: serial("rendering_id") - .references(() => rendering.id, { - onDelete: "cascade", - onUpdate: "cascade", - }) - .notNull(), ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) bookSlug: varchar("book_slug", {length: 64}), //zod stores these as exclusively uppercase bookName: varchar("book_name"), chapter: integer("chapter"), @@ -380,7 +334,6 @@ export const countryToLanguage = pgTable( columns: [table.languageIetf, table.countryAlpha], name: "country_to_language_pkey", }), -<<<<<<< HEAD }; } ); @@ -404,30 +357,6 @@ export const localization = pgTable( columns: [table.ietfCode, table.key, table.category], name: "localization_pkey", }), -======= ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) - }; - } -); - -export const localization = pgTable( - "localization", - { - ietfCode: varchar("ietf_code") - .references(() => language.ietfCode, { - onDelete: "cascade", - onUpdate: "cascade", - }) - .notNull(), - key: varchar("key").notNull(), - value: text("value").notNull(), - }, - (table) => { - return { - primaryKey: primaryKey({ - columns: [table.ietfCode, table.key], - name: "localization_pkey", - }), }; } ); diff --git a/controller/src/db/utils/getMocks.ts b/controller/src/db/utils/getMocks.ts index 413c307..560c403 100644 --- a/controller/src/db/utils/getMocks.ts +++ b/controller/src/db/utils/getMocks.ts @@ -188,11 +188,7 @@ export function getMockedRendering( type: "scripture" | "nonscripture" = "scripture" ) { type apiKeys = z.infer; -<<<<<<< HEAD const randomUUid = createId(); -======= - const randomUUid = crypto.randomUUID(); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const mockedRender: apiKeys = { tempId: randomUUid, diff --git a/controller/src/functions/git-bus.ts b/controller/src/functions/git-bus.ts index 7e23472..5fd6e1e 100644 --- a/controller/src/functions/git-bus.ts +++ b/controller/src/functions/git-bus.ts @@ -1,7 +1,6 @@ import {app, InvocationContext} from "@azure/functions"; import {getDb as startDb} from "../db/config"; import {z} from "zod"; -<<<<<<< HEAD import {eq, and} from "drizzle-orm"; import {handlePost as handleGitPost} from "../routes/git"; import {handlePost as handleContentPost} from "../routes/content"; @@ -12,13 +11,6 @@ import * as dbSchema from "../db/schema/schema"; const db = startDb(); // import {createId} from "@paralleldrive/cuid2"; -======= -import {handlePost as handleGitPost} from "../routes/git"; -import {handlePost as handleContentPost} from "../routes/content"; -import * as validators from "../routes/validation"; -import {checkContentExists} from "../functions/renderings-bus"; -startDb(); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) const latestCommitSchema = z.object({ Hash: z.string(), @@ -45,7 +37,6 @@ export async function wacsSbLangApi( message: unknown, context: InvocationContext ) { -<<<<<<< HEAD const namespace = "wacs"; // If zod or the db action below throws here, the message will end up in the dead letter queue. try { @@ -110,45 +101,6 @@ export async function wacsSbLangApi( const shapedForDb: z.infer = [ { contentId: contentCuid, -======= - // If zod or the db action below throws here, the message will end up in the dead letter queue. - try { - context.log(message); - const parsed = eventSchema.parse(message); - context.log( - `GIT BUS RECEIVED: received a message for ${parsed.Repo} of event type ${parsed.EventType}` - ); - const thatContentRowExists = await checkContentExists( - `wac-${parsed.User}/${parsed.Repo}`.toLowerCase() - ); - if (!thatContentRowExists) { - context.log( - `wac-${parsed.User}/${parsed.Repo} is not already in api. Creating new row in table` - ); - const newContentRow: z.infer = [ - { - namespace: "wacs", - id: `${parsed.User}/${parsed.Repo}`.toLowerCase(), - type: "text", - }, - ]; - const newRowRes = await handleContentPost(newContentRow); - if (newRowRes.status !== 200) { - context.log( - `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` - ); - throw new Error( - `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` - ); - } - } - - // api built with bulk ops in mind, so arrays are passed, even for single op, versus having insertSingle vs insertMany type routes - const shapedForDb: z.infer = [ - { - namespace: "wacs", - contentId: `${parsed.User}/${parsed.Repo}`, ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) repoName: parsed.Repo, repoUrl: parsed.RepoHtmlUrl, username: parsed.User, diff --git a/controller/src/functions/localization.ts b/controller/src/functions/localization.ts index 7746f44..0786329 100644 --- a/controller/src/functions/localization.ts +++ b/controller/src/functions/localization.ts @@ -1,6 +1,5 @@ import {app, InvocationContext, Timer} from "@azure/functions"; import {getDb as startDb} from "../db/config"; -import {localizations} from "../localizations"; import type {insertLocalizationType} from "../db/schema/validations"; import {insertSchemas} from "../db/schema/validations"; import {polymorphicInsert} from "../db/handlers"; @@ -8,6 +7,7 @@ import {onConflictSetAllFieldsToSqlExcluded} from "../utils"; import * as dbSchema from "../db/schema/schema"; import {eq, sql, and, ilike, isNotNull} from "drizzle-orm"; import {z} from "zod"; +import {readdir} from "fs/promises"; const db = startDb(); const table = insertSchemas.localization.table; @@ -17,21 +17,18 @@ export async function populateLocalization( myTimer: Timer, context: InvocationContext ): Promise { -<<<<<<< HEAD context.log( `Timer function processed request. at ${new Date()}. Next is ${ myTimer.scheduleStatus?.next }` ); -======= - context.log("Timer function processed request."); ->>>>>>> afea3a4 (add a localization table and cron trigger) const bookNamesResult = await populateScripturalBookNames(); context.log( Array.isArray(bookNamesResult) ? `inserted ${bookNamesResult.length} rows of book names` : bookNamesResult.message ); + const resourceTypesResult = await populationResourceTypes(); context.log( Array.isArray(resourceTypesResult) @@ -40,19 +37,31 @@ export async function populateLocalization( ); } +async function getLocalizations() { + const cwd = process.cwd(); + const dirPath = `${cwd}/src/localizations`; + const files = await readdir(dirPath); + const localizations = await Promise.all( + files.map(async (file) => { + // const filePath = `${dirPath}/${file}`; + const importString = `../localizations/${file.replace(".ts", "")}`; + const module = await import(importString); + return module.default as { + dict: Record; + ietf: string; + }; + }) + ); + return localizations; +} + async function populationResourceTypes() { -<<<<<<< HEAD + const localizations = await getLocalizations(); const category = "resource_type"; const payload = localizations.reduce( (acc: insertLocalizationType[], curr) => { const rows = Object.entries(curr.dict).map(([key, value]) => { return {ietfCode: curr.ietf, key, value, category}; -======= - const payload = localizations.reduce( - (acc: insertLocalizationType[], curr) => { - const rows = Object.entries(curr.dict).map(([key, value]) => { - return {ietfCode: curr.ietf, key, value}; ->>>>>>> afea3a4 (add a localization table and cron trigger) }); acc.push(...rows); return acc; @@ -64,15 +73,9 @@ async function populationResourceTypes() { tableKey: "localization", content: payload, onConflictDoUpdateArgs: { -<<<<<<< HEAD target: [table.ietfCode, table.key, table.category], // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. set: onConflictSetAllFieldsToSqlExcluded(table, ["value"]), -======= - target: [table.ietfCode, table.key], - // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. - set: onConflictSetAllFieldsToSqlExcluded(table, ["ietfCode", "key"]), ->>>>>>> afea3a4 (add a localization table and cron trigger) }, }); return res; @@ -116,11 +119,7 @@ async function populateScripturalBookNames() { ) .leftJoin(content, eq(content.id, rendering.contentId)) .leftJoin(language, eq(language.ietfCode, content.languageId)) -<<<<<<< HEAD .leftJoin(gitRepo, eq(content.id, gitRepo.contentId)) -======= - .leftJoin(gitRepo, eq(content.gitId, gitRepo.id)) ->>>>>>> afea3a4 (add a localization table and cron trigger) .where( and( ilike(gitRepo.username, "%wa-catalog%"), @@ -129,7 +128,6 @@ async function populateScripturalBookNames() { ) ) .as("sq"); -<<<<<<< HEAD // for debuggin // const finalSql = db // .select({ @@ -142,8 +140,6 @@ async function populateScripturalBookNames() { // .where(eq(subquery.rn, 1)) // .orderBy(subquery.ietf_code, subquery.book_slug) // .toSQL(); -======= ->>>>>>> afea3a4 (add a localization table and cron trigger) const result = await db .select({ book_name: subquery.book_name, @@ -168,44 +164,29 @@ async function populateScripturalBookNames() { }) ) .parse(result); -<<<<<<< HEAD const category = "bible_book"; -======= ->>>>>>> afea3a4 (add a localization table and cron trigger) const payload: insertLocalizationType[] = parsed.map((row) => { return { ietfCode: row.ietf_code, key: row.book_slug.toLowerCase(), value: row.book_name, -<<<<<<< HEAD category, -======= ->>>>>>> afea3a4 (add a localization table and cron trigger) }; }); const inserted = await polymorphicInsert({ tableKey: "localization", content: payload, onConflictDoUpdateArgs: { -<<<<<<< HEAD target: [table.ietfCode, table.key, table.category], // loops through every column in given table setting the column to be the value of the excluded (e.g. conflicting) row except for those given in the second argument. For localization though, it just updates the value. set: onConflictSetAllFieldsToSqlExcluded(table, ["value"]), -======= - target: [table.ietfCode, table.key], - set: onConflictSetAllFieldsToSqlExcluded(table, ["ietfCode", "key"]), ->>>>>>> afea3a4 (add a localization table and cron trigger) }, }); return inserted; } app.timer("manageLocalizationTable", { -<<<<<<< HEAD schedule: "*/30 * * * * *", -======= - schedule: "0 0 0 * * *", ->>>>>>> afea3a4 (add a localization table and cron trigger) handler: populateLocalization, useMonitor: false, }); diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index a9cc1b2..60c1eea 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -23,7 +23,6 @@ const renderedFileSchema = z.object({ Slug: z.string().nullable(), }); -const titlesSchema = z.record(z.string().nullable()); const titlesSchema = z.record(z.string().nullable()); const renderingsSchema = z.object({ @@ -164,7 +163,6 @@ export async function wacsSbRenderingsApi( } else { // Insert new renderings and meta context.log(`Posting new renderings for ${parsed.User}/${parsed.Repo}`); - context.log(`Posting new renderings for ${parsed.User}/${parsed.Repo}`); const postResult = await handleRenderingPost(dbPayload); if (postResult.status != 200) { tx.rollback(); @@ -186,7 +184,6 @@ export async function wacsSbRenderingsApi( } }); } catch (error) { - context.error(`Error processing ${JSON.stringify(message)}`); context.error(`Error processing ${JSON.stringify(message)}`); context.error(error); if (error instanceof z.ZodError) { diff --git a/controller/src/localizations/en.ts b/controller/src/localizations/en.ts index bd39224..ba783c6 100644 --- a/controller/src/localizations/en.ts +++ b/controller/src/localizations/en.ts @@ -1,6 +1,7 @@ const en = { tw: "Translations Words", tn: "Translation Notes", + obs: "Open Bible Stories", }; export type keysType = keyof typeof en; export default {dict: en, ietf: "en"}; diff --git a/controller/src/localizations/es.ts b/controller/src/localizations/es.ts deleted file mode 100644 index a37205a..0000000 --- a/controller/src/localizations/es.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type {keysType} from "./en"; -export const es: Record = { - tn: "Notas de traducción", - tw: "Palabras de traducción", -}; - -export default {dict: es, ietf: "es-419"}; diff --git a/controller/src/localizations/index.ts b/controller/src/localizations/index.ts deleted file mode 100644 index 75374eb..0000000 --- a/controller/src/localizations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import en from "./en"; -import es from "./es"; - -export const localizations = [en, es]; - -// Obj diff --git a/controller/src/routes/content.ts b/controller/src/routes/content.ts index 2eb254a..ce90de6 100644 --- a/controller/src/routes/content.ts +++ b/controller/src/routes/content.ts @@ -98,13 +98,8 @@ export async function handlePost(payload: unknown): Promise { const payloadParsed = validationSchema.parse(payload); const payloadsWithGuids = payloadParsed.map((payload) => { return { -<<<<<<< HEAD ...payload, id: createId(), -======= - ...contentPayload, - id: `${namespace}-${contentPayload.id}`.toLowerCase(), ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }; }); type accType = { diff --git a/controller/src/routes/rendering.ts b/controller/src/routes/rendering.ts index c10eafe..dd38fe2 100644 --- a/controller/src/routes/rendering.ts +++ b/controller/src/routes/rendering.ts @@ -95,14 +95,7 @@ export async function handlePost(payload: unknown): Promise { const validationSchema = validators.renderingsPost; const payloadParsed = validationSchema.parse(payload); const payloadsWithNamespacedId = payloadParsed.map((payload) => { -<<<<<<< HEAD if (payload.nonScripturalMeta) { -======= - const {namespace, ...renderPayload} = payload; - // port making content ids that are like user-repo. It should provide a contentId that matches (e.g. user-repo) and a namesapce (dcs). We prefix it here and make that that its contentId so 'dcs-user-repo'. Another, non-git-system might just use 'ab-en_ulb' for its content id if en_ulb is all it needs as its content identifier. So this is just normalizing and consolidating the namespace plus provided contentId - const contentId = `${namespace}-${renderPayload.contentId}`.toLowerCase(); - if (renderPayload.nonScripturalMeta) { ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) // I'm intentionally adding string of wrong type here. and below for expect error. These will not be inserted. I'm adding this property as a way to ensure that in the transaction, once the renderigns are inserted, I can pluck the ids off the inserts ids and map it back to the metadata via this common obj. property // @ts-expect-error payload.nonScripturalMeta.renderingId = payload.contentId; @@ -111,14 +104,7 @@ export async function handlePost(payload: unknown): Promise { // @ts-expect-error payload.scripturalMeta.renderingId = payload.contentId; } -<<<<<<< HEAD return payload; -======= - return { - ...renderPayload, - contentId: `${namespace}-${renderPayload.contentId}`.toLowerCase(), - }; ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) }); type accType = { @@ -274,13 +260,7 @@ export async function handleDel(payload: unknown): Promise { try { const deleteSchema = validators.renderingDelete; const deletePayloadsParsed = deleteSchema.parse(payload); -<<<<<<< HEAD const rowsToDeleteByContentId = deletePayloadsParsed.contentIds; -======= - const rowsToDeleteByContentId = deletePayloadsParsed.contentIds.map((row) => - `${row.namespace}-${row.id}`.toLowerCase() - ); ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) // E.g. delete all rendergins (and cascade accross) where the guid of a project is passed const deleteOnField = schema.rendering.contentId; diff --git a/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml b/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml index 5d8ac79..cbee7f2 100644 --- a/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml +++ b/hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml @@ -2,21 +2,12 @@ table: name: gateway_language_to_dependent_language schema: public object_relationships: -<<<<<<< HEAD:hasura/metadata/databases/languageapi/tables/public_gateway_language_to_dependent_language.yaml - name: dependent_language using: foreign_key_constraint_on: dependent_language_ietf - name: gateway_language using: foreign_key_constraint_on: gateway_language_ietf -======= - - name: gateway_language - using: - foreign_key_constraint_on: gateway_language_ietf - - name: dependent_language - using: - foreign_key_constraint_on: dependent_language_ietf ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties):hasura/metadata/databases/languageapi/tables/public_languages_to_languages.yaml select_permissions: - role: anonymous permission: diff --git a/hasura/metadata/databases/languageapi/tables/public_language.yaml b/hasura/metadata/databases/languageapi/tables/public_language.yaml index 7ece451..178d674 100644 --- a/hasura/metadata/databases/languageapi/tables/public_language.yaml +++ b/hasura/metadata/databases/languageapi/tables/public_language.yaml @@ -48,7 +48,6 @@ array_relationships: table: name: language_alternate_name schema: public -<<<<<<< HEAD - name: localizations using: foreign_key_constraint_on: @@ -62,21 +61,6 @@ array_relationships: column: ietf_code table: name: wa_language_metadata -======= - - name: gateway_languages - using: - foreign_key_constraint_on: - column: dependent_language_ietf - table: - name: gateway_language_to_dependent_language - schema: public - - name: dependent_languages - using: - foreign_key_constraint_on: - column: gateway_language_ietf - table: - name: gateway_language_to_dependent_language ->>>>>>> 90cec3e (add renderings table. Move gateway to walangmeta. Rename some properties) schema: public select_permissions: - role: anonymous From a73b610ea07db7ceabae53581627759ec2f9a7c1 Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Wed, 3 Jul 2024 10:14:45 -0500 Subject: [PATCH 11/13] code for bus messages for audio --- controller/Dockerfile | 20 +- .../src/functions/audio-renderings-bus.ts | 251 ++++++++++++++++++ controller/src/functions/git-bus.ts | 4 +- controller/src/functions/renderings-bus.ts | 31 +-- controller/src/routes/content.ts | 3 +- controller/src/routes/validation/index.ts | 2 +- controller/src/utils.ts | 27 +- docker-compose.yml | 1 - makefile | 2 +- 9 files changed, 301 insertions(+), 40 deletions(-) create mode 100644 controller/src/functions/audio-renderings-bus.ts diff --git a/controller/Dockerfile b/controller/Dockerfile index f0237a0..5309544 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -11,7 +11,17 @@ ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ AzureFunctionsJobHost__Logging__Console__IsEnabled=true WORKDIR /home/site/wwwroot +ENV PNPM_HOME=/usr/local/bin + +COPY ./package.json /home/site/wwwroot +RUN pnpm install +RUN pnpm add --global azure-functions-core-tools@^4.0.5455 COPY . . +# I have no clue why, but when I included azure core tools as part of the controller dependencies using the core tools node package, the func command reliably broke, but not when installed globally +# Enable `pnpm add --global` on Alpine Linux by setting +# home location environment variable to a location already in $PATH +# https://github.com/pnpm/pnpm/issues/784#issuecomment-1518582235 + RUN apt-get update && \ @@ -20,12 +30,6 @@ RUN apt-get update && \ ARG DATABASE_URL -# I have no clue why, but when I included azure core tools as part of the controller dependencies using the core tools node package, the func command reliably broke, but not when installed globally -# Enable `pnpm add --global` on Alpine Linux by setting -# home location environment variable to a location already in $PATH -# https://github.com/pnpm/pnpm/issues/784#issuecomment-1518582235 -ENV PNPM_HOME=/usr/local/bin -RUN pnpm add --global azure-functions-core-tools@^4.0.5455 -RUN pnpm install && \ - pnpm run build + +RUN pnpm run build diff --git a/controller/src/functions/audio-renderings-bus.ts b/controller/src/functions/audio-renderings-bus.ts new file mode 100644 index 0000000..bfb10f8 --- /dev/null +++ b/controller/src/functions/audio-renderings-bus.ts @@ -0,0 +1,251 @@ +import {z} from "zod"; +import {app, InvocationContext} from "@azure/functions"; +import {checkContentExists} from "../utils"; +import {createId} from "@paralleldrive/cuid2"; +import * as validators from "../routes/validation"; +import {handlePost as handleContentPost} from "../routes/content"; +import {getDb as startDb} from "../db/config"; +import * as schema from "../db/schema/schema"; +import {eq, and, inArray} from "drizzle-orm"; +import {handlePost as handleRenderingPost} from "../routes/rendering"; +import {insertContent} from "../db/schema/validations"; + +const db = startDb(); + +const numberInString = z.string().transform((val, ctx) => { + const parsed = parseInt(val); + if (isNaN(parsed)) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Not a number", + }); + + // This is a special symbol you can use to + // return early from the transform function. + // It has type `never` so it does not affect the + // inferred return type. + return z.NEVER; + } + return parsed; +}); + +const audioMessageFileSchema = z.object({ + size: z.number(), + url: z.string(), + fileType: z.string().toLowerCase(), + hash: z.string(), + isWholeBook: z.boolean(), + isWholeProject: z.boolean(), + bookName: z.string(), + bookSlug: z.string(), + chapter: numberInString, +}); +const audioMessageSchema = z.object({ + languageIetf: z.string(), + name: z.string().toLowerCase(), + type: z.string(), + domain: z.string(), + resourceType: z.string(), + createdOn: z.string().optional(), //todo check + modifiedOn: z.string().optional(), //todo check + namespace: z.string().toLowerCase(), + files: z.array(audioMessageFileSchema), +}); + +export async function audioRenderedContentListener( + message: unknown, + context: InvocationContext +) { + console.log( + `Processing audio message. Invocation id is ${context.invocationId}` + ); + let contentCuid: string | null = null; //we need the guid of a content row to insert or upsert on the renderings Table. + + try { + const parsed = audioMessageSchema.passthrough().parse(message); + const {exists, id: currentExistingId} = await checkContentExists({ + name: parsed.name, + namespace: parsed.namespace, + db, + }); + if (currentExistingId) { + contentCuid = currentExistingId; + } + + await db.transaction(async (tx) => { + // prepare payload. Creating content also in transaction in case in fails to not orphan that content row + // If this unique name/namespace for a piece of content does not exist, then creat it in the db: + if (!exists) { + parsed.createdOn = parsed.createdOn || new Date().toISOString(); + parsed.modifiedOn = parsed.modifiedOn || new Date().toISOString(); + contentCuid = await createContentRow({ + context, + row: parsed, + }); + } + if (!contentCuid) { + throw new Error( + `Failed to find contentCuid for ${parsed.name}-${parsed.namespace}` + ); + } + + // messages for audio can't always fit into a single repo + all it's files since there are 3k plus files for each Bible due to mp3, cue, wav, etc for each chapter.So, we'll need to upsert on the url for each row in rendered_content table. + // But what about metadata row? But if I just insert the metadata row, there could be duplicates. Probably just best to query all rendered_content rows for a given contentId. Merge in any existing IDs from db, and then ovveride the rest of the properties with what's given. + const renderedContentRowsAlreadyInDb = await db + .select({ + renderedRowId: schema.rendering.id, + url: schema.rendering.url, + metadataId: schema.scripturalRenderingMetadata.id, + createdAt: schema.rendering.createdAt, + }) + .from(schema.rendering) + .leftJoin( + // metadata and rendered_row are 1-1; + schema.scripturalRenderingMetadata, + eq( + schema.rendering.id, + schema.scripturalRenderingMetadata.renderingId + ) + ) + .where( + and( + eq(schema.rendering.contentId, contentCuid), + // we only have a slice of the files from bus meesage, so we should filter this result based on the urls from parsed queue message: What this query returns will be mapped against queue messages for ids and then updated. If there is something from queue that is not in db, it'll be inserted. + inArray( + schema.rendering.url, + parsed.files.map((f) => f.url) + ) + ) + ); + // queue messages are ones to process, but we'll grab id's from db on existing for upserts; + // Create a set of rendered_row + meta for each retrieval. + // renderedRowsWithMetaSet + type returnedRowType = (typeof renderedContentRowsAlreadyInDb)[number]; + let renderedRowsLookup: Record = {}; + renderedContentRowsAlreadyInDb.forEach((row) => { + // @ts-ignore. Some types are wrong somewhere, cause this is become a day when queried back out. + if (row.createdAt instanceof Date) { + row.createdAt = row.createdAt.toISOString(); + } + renderedRowsLookup[row.url] = row; + }); + + // Prepare the rows to insert and upsert renderedContent and meta; + const dbPayload: z.infer = + parsed.files.map((file) => { + // used to tie together metadata to a rendering and maintain a key constraint. + const tempId = createId(); + let payload: z.infer = { + tempId: tempId, + namespace: parsed.namespace, + contentId: contentCuid!, + fileType: file.fileType, + url: file.url, + fileSizeBytes: file.size, + hash: file.hash, + scripturalMeta: { + isWholeBook: file.isWholeBook, + isWholeProject: file.isWholeProject, + bookName: file.bookName, + bookSlug: file.bookSlug, + chapter: file.chapter, + tempId: tempId, + }, + }; + if (renderedRowsLookup[file.url]) { + // Add the ids if we have them, for upserts, otherwise leave blank to auto create + payload.createdAt = + renderedRowsLookup[file.url].createdAt || + new Date().toISOString(); + payload.id = renderedRowsLookup[file.url].renderedRowId; + //@ts-ignore. I gave the type above for autocomplate and warnings, but meta is there above. + payload.scripturalMeta.id = renderedRowsLookup[file.url].metadataId; + } + return payload; + }); + const postResult = await handleRenderingPost(dbPayload); + if (postResult.status != 200) { + tx.rollback(); + if (postResult.jsonBody) { + if (postResult.jsonBody.additionalErrors) { + const errMessage = JSON.stringify( + `ADDITIONAL ERRORS: \n ${postResult.jsonBody.additionalErrors}\n\n + LAST ERR: + ${postResult.jsonBody.message}` + ); + throw new Error(errMessage); + } else { + throw new Error( + postResult.jsonBody.message || "failed to post for some reason" + ); + } + } + } + }); + } catch (error) { + // @ts-ignore + let sessionId = + typeof message == "object" && !!message && "session_id" in message + ? message.session_id + : "unknown"; + context.error( + `Error processing ${context.invocationId}. Session_id was ${sessionId}` + ); + context.error(error); + if (error instanceof z.ZodError) { + error.issues.forEach((issue) => { + context.error(JSON.stringify(issue)); + }); + } + } +} + +type createContentRowArgs = { + context: InvocationContext; + row: z.infer; +}; +async function createContentRow({context, row}: createContentRowArgs) { + context.log( + `${row.namespace}-${row.name} is not already in api. Creating new row in table` + ); + const cuid = createId(); + const newContentPayload: insertContent = { + id: cuid, + name: row.name, + namespace: row.namespace, + type: "audio", + // @ts-ignore. All are scritpure hardcoded for now, gonna leave the hard code on the message sender side + domain: row.domain, + languageId: row.languageIetf, + resourceType: row.resourceType, + createdOn: row.createdOn, + modifiedOn: row.modifiedOn, + } as const; + const newContentRow: z.infer = [ + newContentPayload, + ]; + const newRowRes = await handleContentPost(newContentRow); + if (newRowRes.status !== 200) { + // Not catching here. Failing to have an actual content row when we needed to create one is reason for top level throw to catch this. + throw new Error( + `Failed to create new content row for ${row.namespace}-${row.name} ` + ); + } else { + return newContentPayload.id; + } +} + +console.log("booting up the listener for audio bible messages"); +app.serviceBusTopic("waAudioRenderings", { + connection: "BUS_CONN", + topicName: "audiobiel", + subscriptionName: "languageapi", + handler: audioRenderedContentListener, + isSessionsEnabled: true, +}); + +// 1 -> content doesn't exist yet? Lemme make it +// 2 -> content doesn't exist yet? Lemme make it + +// 1 -> make content +// 2 -> make content diff --git a/controller/src/functions/git-bus.ts b/controller/src/functions/git-bus.ts index 5fd6e1e..173ca81 100644 --- a/controller/src/functions/git-bus.ts +++ b/controller/src/functions/git-bus.ts @@ -5,9 +5,9 @@ import {eq, and} from "drizzle-orm"; import {handlePost as handleGitPost} from "../routes/git"; import {handlePost as handleContentPost} from "../routes/content"; import * as validators from "../routes/validation"; -import {checkContentExists} from "../functions/renderings-bus"; import {createId} from "@paralleldrive/cuid2"; import * as dbSchema from "../db/schema/schema"; +import {checkContentExists} from "../utils"; const db = startDb(); // import {createId} from "@paralleldrive/cuid2"; @@ -46,10 +46,10 @@ export async function wacsSbLangApi( context.log( `GIT BUS RECEIVED: received a message for ${parsed.Repo} of event type ${parsed.EventType}` ); - // todo: check on name/namesapce, const {exists, id} = await checkContentExists({ name: `${parsed.User}/${parsed.Repo}`.toLowerCase(), namespace: namespace, + db, }); if (!exists) { context.log( diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index 60c1eea..175e8c8 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -7,12 +7,10 @@ import { } from "../routes/rendering"; import {handlePost as handleContentPost} from "../routes/content"; import * as validators from "../routes/validation"; -import * as schema from "../db/schema/schema"; -import {and, eq} from "drizzle-orm"; +import {checkContentExists} from "../utils"; import {createId} from "@paralleldrive/cuid2"; const db = startDb(); - const renderedFileSchema = z.object({ Path: z.string(), Size: z.number(), @@ -61,6 +59,7 @@ export async function wacsSbRenderingsApi( return; } const parsed = renderingsSchema.parse(message); + // Id for wacs text repos is this user/repo lower string const id = `${parsed.User}/${parsed.Repo}`.toLowerCase(); context.log( `RENDERINGS BUS RECEIVED: received a message for ${parsed.User} for ${parsed.Repo} for ${parsed.ResourceType} type` @@ -69,8 +68,11 @@ export async function wacsSbRenderingsApi( const {exists, id: currentExistingId} = await checkContentExists({ name: id, namespace, + db, }); - if (currentExistingId) contentCuid = currentExistingId; + if (currentExistingId) { + contentCuid = currentExistingId; + } if (!exists) { context.log( `${namespace}-${id} is not already in api. Creating new row in table` @@ -194,27 +196,6 @@ export async function wacsSbRenderingsApi( } } -export async function checkContentExists({ - name, - namespace, -}: { - name: string; - namespace: string; -}) { - const doesExist = await db - .select({id: schema.content.id}) - .from(schema.content) - .where( - and( - eq(schema.content.namespace, namespace), - eq(schema.content.name, name) - ) - ); - - let dbId = doesExist[0]?.id ?? null; - - return {exists: doesExist.length > 0, id: dbId}; -} console.log("booting up the renderings bus listener"); app.serviceBusTopic("waLangApiRenderings", { connection: "BUS_CONN", diff --git a/controller/src/routes/content.ts b/controller/src/routes/content.ts index ce90de6..c1b2eef 100644 --- a/controller/src/routes/content.ts +++ b/controller/src/routes/content.ts @@ -99,7 +99,8 @@ export async function handlePost(payload: unknown): Promise { const payloadsWithGuids = payloadParsed.map((payload) => { return { ...payload, - id: createId(), + // some routes provide their own unique cuids + id: payload.id ? payload.id : createId(), }; }); type accType = { diff --git a/controller/src/routes/validation/index.ts b/controller/src/routes/validation/index.ts index 75a92c0..61a00d0 100644 --- a/controller/src/routes/validation/index.ts +++ b/controller/src/routes/validation/index.ts @@ -79,7 +79,7 @@ export const contentDelete = z.object({ /* //@=========== Renderings =========== */ export const contentRenderingWithMeta = dbValidators.insertRenderingSchema.extend({ - tempId: z.string(), + tempId: z.string(), //Tghis is used not in db, but for doing some connecting meta and rendering during batched inserts. fileType: z.string().trim().toLowerCase(), namespace: z.string().trim().toLowerCase(), scripturalMeta: dbValidators.insertScripturalRenderingMetadataSchema diff --git a/controller/src/utils.ts b/controller/src/utils.ts index 85f99d0..619ee86 100644 --- a/controller/src/utils.ts +++ b/controller/src/utils.ts @@ -1,8 +1,10 @@ -import {DrizzleError, SQL, sql} from "drizzle-orm"; +import {DrizzleError, SQL, and, eq, sql} from "drizzle-orm"; import {PgTableWithColumns, TableConfig} from "drizzle-orm/pg-core"; import {PostgresError} from "postgres"; import {handlerReturnError} from "./customTypes/types"; import {ZodError} from "zod"; +import * as schema from "./db/schema/schema"; +import {PostgresJsDatabase} from "drizzle-orm/postgres-js"; export const BibleBookCategories = { OT: [ @@ -232,3 +234,26 @@ export function statusCodeFromErrType(err: unknown) { if (err instanceof ZodError) return 400; return 400; } + +export async function checkContentExists({ + name, + namespace, + db, +}: { + name: string; + namespace: string; + db: PostgresJsDatabase; +}) { + const doesExist = await db + .select({id: schema.content.id}) + .from(schema.content) + .where( + and( + eq(schema.content.namespace, namespace), + eq(schema.content.name, name) + ) + ); + + let dbId = doesExist[0]?.id ?? null; + return {exists: doesExist.length > 0, id: dbId}; +} diff --git a/docker-compose.yml b/docker-compose.yml index 6b802b2..8173c15 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ #TODO: There's a lot of placeholders in here -version: "3.8" services: # controller: diff --git a/makefile b/makefile index 6e0b6b7..a354a89 100644 --- a/makefile +++ b/makefile @@ -7,7 +7,7 @@ console: # -n drizzle schema is for to get the same migrations that have been applied to the dev database applied. .PHONY: datadump datadump: - pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle > data_dump.sql + pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle > ./controller/data_dump.sql # Note, this will conflict if you're running postgres on own machine on default port too. .PHONY: localdataingest From dd0ae2e4721efb32de7c3fa6bc46e43d8095aa6e Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Tue, 9 Jul 2024 12:41:48 -0500 Subject: [PATCH 12/13] make subscription name an env var. Adjust open api docs --- controller/src/db/utils/getMocks.ts | 2 +- controller/src/docs/openApi.ts | 5 +- controller/src/docs/open_api_v2.json | 118 +++++++++--------- controller/src/docs/open_api_v3.json | 2 +- controller/src/functions/git-bus.ts | 135 --------------------- controller/src/functions/renderings-bus.ts | 23 +++- 6 files changed, 83 insertions(+), 202 deletions(-) delete mode 100644 controller/src/functions/git-bus.ts diff --git a/controller/src/db/utils/getMocks.ts b/controller/src/db/utils/getMocks.ts index 560c403..01ccb00 100644 --- a/controller/src/db/utils/getMocks.ts +++ b/controller/src/db/utils/getMocks.ts @@ -112,7 +112,7 @@ export function getMockedContent() { // scripture" | "gloss" | "parascriptural" | "peripheral const fakeIdWord = faker.word.words(1); const mockedContent: apiKeys = { - id: fakeIdWord, + // id: fakeIdWord, namespace: "wacs", domain: faker.helpers.arrayElement([ "scripture", diff --git a/controller/src/docs/openApi.ts b/controller/src/docs/openApi.ts index d827c29..5d73c6c 100644 --- a/controller/src/docs/openApi.ts +++ b/controller/src/docs/openApi.ts @@ -139,7 +139,7 @@ registry.registerPath({ // apiValidators.langDelete request: { body: { - description: "A list of ietfCodes corresponding to languages to delete", + description: "", content: { "applications/json": { schema: apiValidators.countryDelete, @@ -292,8 +292,7 @@ registry.registerPath({ // apiValidators.langDelete request: { body: { - description: - "A list of ietfCodes corresponding to languages to delete. Whereas inserts are namespaced, as: namespace-id, the client is expected to namespace (lowered, trimmed) to delete its ids", + description: "", content: { "applications/json": { schema: apiValidators.contentDelete, diff --git a/controller/src/docs/open_api_v2.json b/controller/src/docs/open_api_v2.json index 4e9836d..76fff8e 100644 --- a/controller/src/docs/open_api_v2.json +++ b/controller/src/docs/open_api_v2.json @@ -17,7 +17,7 @@ ], "parameters": [ { - "description": "A list of ietfCodes corresponding to languages to delete. Whereas inserts are namespaced, as: namespace-id, the client is expected to namespace (lowered, trimmed) to delete its ids", + "description": "", "in": "body", "name": "body", "schema": { @@ -198,7 +198,7 @@ ], "parameters": [ { - "description": "A list of ietfCodes corresponding to languages to delete", + "description": "", "in": "body", "name": "body", "schema": { @@ -1007,25 +1007,24 @@ "content": { "example": [ { - "createdOn": "2024-09-07T16:34:28.186Z", + "createdOn": "2025-03-24T21:09:44.194Z", "domain": "peripheral", "gitEntry": { "namespace": "wacs", - "repoName": "violet", - "repoUrl": "https://blind-committee.name/", - "username": "Christ_Kozey82" + "repoName": "clipper", + "repoUrl": "https://knotty-headquarters.net/", + "username": "Ebba_Morissette" }, - "id": "yowza", - "languageId": "urs", + "languageId": "kht", "level": "medium", "meta": { - "showOnBiel": true, + "showOnBiel": false, "status": "not approved" }, - "modifiedOn": "2024-02-10T08:11:54.917Z", - "name": "notes", + "modifiedOn": "2025-03-28T14:29:04.763Z", + "name": "ulb", "namespace": "wacs", - "resourceType": "reg", + "resourceType": "tq", "type": "text" } ], @@ -1133,13 +1132,13 @@ "country": { "example": [ { - "alpha2": "BM", - "alpha3": "BRN", - "createdOn": "2023-05-24T02:59:32.846Z", - "modifiedOn": "2024-04-15T06:49:17.349Z", - "name": "Switzerland", - "population": 1712482197, - "regionName": "Asia" + "alpha2": "BN", + "alpha3": "CRI", + "createdOn": "2023-12-13T01:16:56.564Z", + "modifiedOn": "2023-08-19T09:35:29.012Z", + "name": "Samoa", + "population": 461394755, + "regionName": "Austrailia" } ], "items": { @@ -1186,9 +1185,9 @@ "example": [ { "contentId": "wacs-user-repo", - "repoName": "yuck", - "repoUrl": "https://confused-plaintiff.info", - "username": "Deborah34" + "repoName": "readily", + "repoUrl": "https://gummy-waveform.biz/", + "username": "Esta_Bayer" } ], "items": { @@ -1222,22 +1221,27 @@ "language": { "example": [ { - "allCountryAlpha2": [], + "allCountryAlpha2": [ + "SS", + "CR" + ], "alternateNames": [ - "flaky" + "inside", + "consequently", + "offbeat" ], - "createdOn": "2024-10-15T14:47:18.418Z", - "direction": "rtl", - "englishName": "finally", - "homeCountryAlpha2": "GQ", - "id": "WVpTRyrzAg", - "ietfCode": "rrj", - "isOralLanguage": false, - "iso6393": "cspejjbojt", - "nationalName": "leak", + "createdOn": "2025-03-12T15:30:57.764Z", + "direction": "ltr", + "englishName": "unless", + "homeCountryAlpha2": "LA", + "id": "fqcyKyFEoH", + "ietfCode": "ats", + "isOralLanguage": true, + "iso6393": "nwhornsr", + "nationalName": "wisdom", "waLangMeta": { - "isGateway": false, - "showOnBiel": true + "isGateway": true, + "showOnBiel": false } } ], @@ -1342,9 +1346,9 @@ "region": { "example": [ { - "createdOn": "2023-05-17T02:58:14.426Z", - "modifiedOn": "2024-12-20T05:48:25.914Z", - "name": "Asia" + "createdOn": "2023-07-27T23:47:58.068Z", + "modifiedOn": "2025-01-20T19:09:33.551Z", + "name": "Africa" } ], "items": { @@ -1376,46 +1380,46 @@ [ { "contentId": "user-repo", - "createdAt": "2023-11-06T13:25:33.395Z", - "fileSizeBytes": 1344618048258048, - "fileType": "zip", - "modifiedOn": "2025-01-20T10:22:31.513Z", + "createdAt": "2024-01-25T13:36:54.975Z", + "fileSizeBytes": 7289338714914816, + "fileType": "mp3", + "modifiedOn": "2023-08-09T17:50:58.948Z", "namespace": "wacs", "scripturalMeta": { "bookName": "1 Jean", "bookSlug": "1JN", - "chapter": 0, + "chapter": 1, "isWholeBook": true, "isWholeProject": false, - "tempId": "8419730d-55ac-463c-9bea-a42565eb746c" + "tempId": "yxznk9pe8qq53w5g97yiken1" }, - "tempId": "8419730d-55ac-463c-9bea-a42565eb746c", - "url": "https://imperturbable-bog.info/" + "tempId": "yxznk9pe8qq53w5g97yiken1", + "url": "https://embarrassed-frog.info" } ], [ { "contentId": "user-repo", - "createdAt": "2023-05-14T14:55:35.579Z", - "fileSizeBytes": 4763748757667840, - "fileType": "web", - "modifiedOn": "2023-09-16T18:28:07.168Z", + "createdAt": "2024-12-14T00:21:21.892Z", + "fileSizeBytes": 2049820787212288, + "fileType": "zip", + "modifiedOn": "2023-12-23T20:12:25.204Z", "namespace": "wacs", "nonScripturalMeta": { "additionalData": "A json field", "name": "nonScripturalName", - "tempId": "6c0a0baf-268e-4c4c-803a-48c0bf665fca" + "tempId": "n9bei7lcw4ey9gvcnu51rcrb" }, "scripturalMeta": { "bookName": "1 Jean", "bookSlug": "1JN", - "chapter": 2, - "isWholeBook": true, - "isWholeProject": true, - "tempId": "6c0a0baf-268e-4c4c-803a-48c0bf665fca" + "chapter": 4, + "isWholeBook": false, + "isWholeProject": false, + "tempId": "n9bei7lcw4ey9gvcnu51rcrb" }, - "tempId": "6c0a0baf-268e-4c4c-803a-48c0bf665fca", - "url": "https://demanding-frenzy.org/" + "tempId": "n9bei7lcw4ey9gvcnu51rcrb", + "url": "https://creative-identity.net/" } ] ], diff --git a/controller/src/docs/open_api_v3.json b/controller/src/docs/open_api_v3.json index 35591d2..16ccff6 100644 --- a/controller/src/docs/open_api_v3.json +++ b/controller/src/docs/open_api_v3.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"1.0.0","title":"My API","description":"This is the API"},"servers":[{"url":"/"}],"components":{"schemas":{"language":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ietfCode":{"type":"string"},"nationalName":{"type":"string"},"englishName":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]},"iso6393":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"isOralLanguage":{"type":"boolean","nullable":true},"homeCountryAlpha2":{"type":"string"},"allCountryAlpha2":{"type":"array","items":{"type":"string"}},"alternateNames":{"type":"array","items":{"type":"string"}},"waLangMeta":{"type":"object","properties":{"isGateway":{"type":"boolean"},"showOnBiel":{"type":"boolean"}},"required":["isGateway","showOnBiel"]},"gatewayIetf":{"type":"string"}},"required":["id","ietfCode","nationalName","englishName","direction","homeCountryAlpha2"]},"example":[{"id":"WVpTRyrzAg","homeCountryAlpha2":"GQ","allCountryAlpha2":[],"direction":"rtl","englishName":"finally","ietfCode":"rrj","nationalName":"leak","alternateNames":["flaky"],"createdOn":"2024-10-15T14:47:18.418Z","iso6393":"cspejjbojt","isOralLanguage":false,"waLangMeta":{"isGateway":false,"showOnBiel":true}}]},"country":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"alpha2":{"type":"string"},"alpha3":{"type":"string","nullable":true},"population":{"type":"number","nullable":true},"regionName":{"type":"string"}},"required":["name","alpha2","regionName"]},"example":[{"name":"Switzerland","createdOn":"2023-05-24T02:59:32.846Z","modifiedOn":"2024-04-15T06:49:17.349Z","alpha2":"BM","alpha3":"BRN","population":1712482197,"regionName":"Asia"}]},"content":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"languageId":{"type":"string","nullable":true},"name":{"type":"string","maxLength":256},"namespace":{"type":"string"},"type":{"type":"string","enum":["text","audio","video","braille"]},"domain":{"type":"string","nullable":true,"enum":["scripture","gloss","parascriptural","peripheral"]},"resourceType":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"level":{"type":"string","nullable":true},"meta":{"type":"object","properties":{"id":{"type":"number"},"showOnBiel":{"type":"boolean"},"status":{"type":"string"}},"required":["showOnBiel","status"]},"gitEntry":{"type":"object","properties":{"id":{"type":"number"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["username","repoName","repoUrl"]}},"required":["name","namespace","type"]},"example":[{"id":"yowza","namespace":"wacs","domain":"peripheral","createdOn":"2024-09-07T16:34:28.186Z","modifiedOn":"2024-02-10T08:11:54.917Z","languageId":"urs","level":"medium","name":"notes","resourceType":"reg","type":"text","meta":{"showOnBiel":true,"status":"not approved"},"gitEntry":{"username":"Christ_Kozey82","repoName":"violet","repoUrl":"https://blind-committee.name/","namespace":"wacs"}}]},"region":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["name"]},"example":[{"name":"Asia","createdOn":"2023-05-17T02:58:14.426Z","modifiedOn":"2024-12-20T05:48:25.914Z"}]},"git":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["contentId","username","repoName","repoUrl"]},"example":[{"contentId":"wacs-user-repo","username":"Deborah34","repoName":"yuck","repoUrl":"https://confused-plaintiff.info"}]},"rendering":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"fileType":{"type":"string"},"fileSizeBytes":{"type":"number","nullable":true,"minimum":0},"url":{"type":"string"},"hash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"tempId":{"type":"string"},"namespace":{"type":"string"},"scripturalMeta":{"type":"object","properties":{"id":{"type":"number"},"renderingId":{"type":"number"},"bookSlug":{"type":"string","nullable":true},"bookName":{"type":"string","nullable":true},"chapter":{"type":"number","nullable":true},"isWholeBook":{"type":"boolean"},"isWholeProject":{"type":"boolean"},"sort":{"type":"number","nullable":true},"tempId":{"type":"string"}},"required":["isWholeBook","isWholeProject","tempId"]},"nonScripturalMeta":{"type":"object","properties":{"id":{"type":"number"},"renderingId":{"type":"number"},"name":{"type":"string","nullable":true,"maxLength":256},"additionalData":{"nullable":true},"tempId":{"type":"string"}},"required":["tempId"]}},"required":["contentId","fileType","url","tempId","namespace"]},"examples":[[{"tempId":"8419730d-55ac-463c-9bea-a42565eb746c","contentId":"user-repo","namespace":"wacs","fileType":"zip","scripturalMeta":{"tempId":"8419730d-55ac-463c-9bea-a42565eb746c","isWholeBook":true,"isWholeProject":false,"bookName":"1 Jean","bookSlug":"1JN","chapter":0},"url":"https://imperturbable-bog.info/","fileSizeBytes":1344618048258048,"createdAt":"2023-11-06T13:25:33.395Z","modifiedOn":"2025-01-20T10:22:31.513Z"}],[{"tempId":"6c0a0baf-268e-4c4c-803a-48c0bf665fca","contentId":"user-repo","namespace":"wacs","fileType":"web","scripturalMeta":{"tempId":"6c0a0baf-268e-4c4c-803a-48c0bf665fca","isWholeBook":true,"isWholeProject":true,"bookName":"1 Jean","bookSlug":"1JN","chapter":2},"url":"https://demanding-frenzy.org/","fileSizeBytes":4763748757667840,"createdAt":"2023-05-14T14:55:35.579Z","modifiedOn":"2023-09-16T18:28:07.168Z","nonScripturalMeta":{"tempId":"6c0a0baf-268e-4c4c-803a-48c0bf665fca","name":"nonScripturalName","additionalData":"A json field"}}]]},"apiError":{"type":"object","properties":{"message":{"type":"string"},"err":{"type":"object","properties":{"issues":{"type":"array","items":{"nullable":true}},"didErr":{"type":"boolean"},"name":{"type":"string"}}},"addlErrs":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["message","name"]}}},"required":["message","err","addlErrs"]},"okRes":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean","default":true}},"required":["message"]}},"parameters":{}},"paths":{"/api/country":{"post":{"operationId":"CreateCountry","description":"Add one or more country","requestBody":{"description":"A list of countries","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/country"}}}},"responses":{"200":{"description":"Object with inserted country data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetCountry","description":"Get country","responses":{"200":{"description":"All countries","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"worldRegionId":{"type":"number"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"alpha2":{"type":"string"},"alpha3":{"type":"string","nullable":true},"population":{"type":"number","nullable":true}},"required":["id","name","worldRegionId","createdOn","modifiedOn","alpha2","alpha3","population"]}}},"required":["message","data"]}}}}}},"delete":{"operationId":"DeleteCountry","description":"Delete one or more countries","requestBody":{"description":"A list of ietfCodes corresponding to languages to delete","content":{"applications/json":{"schema":{"type":"object","properties":{"alpha2Codes":{"type":"array","items":{"type":"string"}}},"required":["alpha2Codes"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/language":{"post":{"operationId":"CreateLanguage","description":"Add one or more language","requestBody":{"description":"A list of languages","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/language"}}}},"responses":{"200":{"description":"Object with inserted language data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetLanguage","description":"Get language","responses":{"200":{"description":"All languages","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ietfCode":{"type":"string"},"nationalName":{"type":"string"},"englishName":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]},"iso6393":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"isOralLanguage":{"type":"boolean","nullable":true},"homeCountryAlpha2":{"type":"string"}},"required":["id","ietfCode","nationalName","englishName","direction","iso6393","createdOn","modifiedOn","isOralLanguage","homeCountryAlpha2"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteLanguage","description":"Delete one or more languages","requestBody":{"description":"A list of ietfCodes corresponding to languages to delete","content":{"applications/json":{"schema":{"type":"object","properties":{"ietfCodes":{"type":"array","items":{"type":"string"}}},"required":["ietfCodes"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/content":{"post":{"operationId":"CreateContent","description":"Add one or more repo/content","requestBody":{"description":"A list of projects/content","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/content"}}}},"responses":{"200":{"description":"Object with inserted content data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetContent","description":"Get content","responses":{"200":{"description":"All content","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":256},"languageId":{"type":"string","nullable":true},"name":{"type":"string","maxLength":256},"namespace":{"type":"string","maxLength":256},"type":{"type":"string","enum":["text","audio","video","braille"]},"domain":{"type":"string","nullable":true,"enum":["scripture","gloss","parascriptural","peripheral"]},"resourceType":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"level":{"type":"string","nullable":true}},"required":["id","languageId","name","namespace","type","domain","resourceType","createdOn","modifiedOn","level"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteContent","description":"Delete one or more content/repo","requestBody":{"description":"A list of ietfCodes corresponding to languages to delete. Whereas inserts are namespaced, as: namespace-id, the client is expected to namespace (lowered, trimmed) to delete its ids","content":{"applications/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/region":{"post":{"operationId":"CreateRegion","description":"Add one or more regions","requestBody":{"description":"A list of regions","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/region"}}}},"responses":{"200":{"description":"Object with inserted region data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetRegion","description":"Get region","responses":{"200":{"description":"All regions","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["id","name","createdOn","modifiedOn"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteRegion","description":"Delete one or more regions","requestBody":{"description":"A list of regions by their regionName corresponding to regions to delete","content":{"applications/json":{"schema":{"type":"object","properties":{"regionNames":{"type":"array","items":{"type":"string"}}},"required":["regionNames"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/git":{"post":{"operationId":"CreateGit","description":"Add one or more git entries","requestBody":{"description":"A list of git entries to add","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/git"}}}},"responses":{"200":{"description":"Confirmation of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetGit","description":"Get git entries","responses":{"200":{"description":"All git entries","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["id","contentId","username","repoName","repoUrl"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteGit","description":"Delete one or git entries","requestBody":{"description":"A list of username and repo (composite key) used to delete git repos","content":{"applications/json":{"schema":{"type":"object","properties":{"userRepo":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"repo":{"type":"string"}},"required":["username","repo"]}}},"required":["userRepo"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/rendering":{"post":{"operationId":"CreateRendering","description":"Add one or more renders/links of content","requestBody":{"description":"A list of renders/links to add","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/rendering"}}}},"responses":{"200":{"description":"Confirmation of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetRendering","description":"Get renderings","responses":{"200":{"description":"All renderings","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"fileType":{"type":"string"},"fileSizeBytes":{"type":"number","nullable":true},"url":{"type":"string"},"hash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["id","contentId","fileType","fileSizeBytes","url","hash","createdAt","modifiedOn"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteRendering","description":"Delete one or more renderings","requestBody":{"description":"A list of namespaces and content ids (e.g. namespace=wacs, contentId=user-repo to use to delete renderings","content":{"applications/json":{"schema":{"type":"object","properties":{"contentIds":{"type":"array","items":{"type":"string"}}},"required":["contentIds"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}}}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"1.0.0","title":"My API","description":"This is the API"},"servers":[{"url":"/"}],"components":{"schemas":{"language":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ietfCode":{"type":"string"},"nationalName":{"type":"string"},"englishName":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]},"iso6393":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"isOralLanguage":{"type":"boolean","nullable":true},"homeCountryAlpha2":{"type":"string"},"allCountryAlpha2":{"type":"array","items":{"type":"string"}},"alternateNames":{"type":"array","items":{"type":"string"}},"waLangMeta":{"type":"object","properties":{"isGateway":{"type":"boolean"},"showOnBiel":{"type":"boolean"}},"required":["isGateway","showOnBiel"]},"gatewayIetf":{"type":"string"}},"required":["id","ietfCode","nationalName","englishName","direction","homeCountryAlpha2"]},"example":[{"id":"fqcyKyFEoH","homeCountryAlpha2":"LA","allCountryAlpha2":["SS","CR"],"direction":"ltr","englishName":"unless","ietfCode":"ats","nationalName":"wisdom","alternateNames":["inside","consequently","offbeat"],"createdOn":"2025-03-12T15:30:57.764Z","iso6393":"nwhornsr","isOralLanguage":true,"waLangMeta":{"isGateway":true,"showOnBiel":false}}]},"country":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"alpha2":{"type":"string"},"alpha3":{"type":"string","nullable":true},"population":{"type":"number","nullable":true},"regionName":{"type":"string"}},"required":["name","alpha2","regionName"]},"example":[{"name":"Samoa","createdOn":"2023-12-13T01:16:56.564Z","modifiedOn":"2023-08-19T09:35:29.012Z","alpha2":"BN","alpha3":"CRI","population":461394755,"regionName":"Austrailia"}]},"content":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"languageId":{"type":"string","nullable":true},"name":{"type":"string","maxLength":256},"namespace":{"type":"string"},"type":{"type":"string","enum":["text","audio","video","braille"]},"domain":{"type":"string","nullable":true,"enum":["scripture","gloss","parascriptural","peripheral"]},"resourceType":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"level":{"type":"string","nullable":true},"meta":{"type":"object","properties":{"id":{"type":"number"},"showOnBiel":{"type":"boolean"},"status":{"type":"string"}},"required":["showOnBiel","status"]},"gitEntry":{"type":"object","properties":{"id":{"type":"number"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["username","repoName","repoUrl"]}},"required":["name","namespace","type"]},"example":[{"namespace":"wacs","domain":"peripheral","createdOn":"2025-03-24T21:09:44.194Z","modifiedOn":"2025-03-28T14:29:04.763Z","languageId":"kht","level":"medium","name":"ulb","resourceType":"tq","type":"text","meta":{"showOnBiel":false,"status":"not approved"},"gitEntry":{"username":"Ebba_Morissette","repoName":"clipper","repoUrl":"https://knotty-headquarters.net/","namespace":"wacs"}}]},"region":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["name"]},"example":[{"name":"Africa","createdOn":"2023-07-27T23:47:58.068Z","modifiedOn":"2025-01-20T19:09:33.551Z"}]},"git":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["contentId","username","repoName","repoUrl"]},"example":[{"contentId":"wacs-user-repo","username":"Esta_Bayer","repoName":"readily","repoUrl":"https://gummy-waveform.biz/"}]},"rendering":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"fileType":{"type":"string"},"fileSizeBytes":{"type":"number","nullable":true,"minimum":0},"url":{"type":"string"},"hash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"tempId":{"type":"string"},"namespace":{"type":"string"},"scripturalMeta":{"type":"object","properties":{"id":{"type":"number"},"renderingId":{"type":"number"},"bookSlug":{"type":"string","nullable":true},"bookName":{"type":"string","nullable":true},"chapter":{"type":"number","nullable":true},"isWholeBook":{"type":"boolean"},"isWholeProject":{"type":"boolean"},"sort":{"type":"number","nullable":true},"tempId":{"type":"string"}},"required":["isWholeBook","isWholeProject","tempId"]},"nonScripturalMeta":{"type":"object","properties":{"id":{"type":"number"},"renderingId":{"type":"number"},"name":{"type":"string","nullable":true,"maxLength":256},"additionalData":{"nullable":true},"tempId":{"type":"string"}},"required":["tempId"]}},"required":["contentId","fileType","url","tempId","namespace"]},"examples":[[{"tempId":"yxznk9pe8qq53w5g97yiken1","contentId":"user-repo","namespace":"wacs","fileType":"mp3","scripturalMeta":{"tempId":"yxznk9pe8qq53w5g97yiken1","isWholeBook":true,"isWholeProject":false,"bookName":"1 Jean","bookSlug":"1JN","chapter":1},"url":"https://embarrassed-frog.info","fileSizeBytes":7289338714914816,"createdAt":"2024-01-25T13:36:54.975Z","modifiedOn":"2023-08-09T17:50:58.948Z"}],[{"tempId":"n9bei7lcw4ey9gvcnu51rcrb","contentId":"user-repo","namespace":"wacs","fileType":"zip","scripturalMeta":{"tempId":"n9bei7lcw4ey9gvcnu51rcrb","isWholeBook":false,"isWholeProject":false,"bookName":"1 Jean","bookSlug":"1JN","chapter":4},"url":"https://creative-identity.net/","fileSizeBytes":2049820787212288,"createdAt":"2024-12-14T00:21:21.892Z","modifiedOn":"2023-12-23T20:12:25.204Z","nonScripturalMeta":{"tempId":"n9bei7lcw4ey9gvcnu51rcrb","name":"nonScripturalName","additionalData":"A json field"}}]]},"apiError":{"type":"object","properties":{"message":{"type":"string"},"err":{"type":"object","properties":{"issues":{"type":"array","items":{"nullable":true}},"didErr":{"type":"boolean"},"name":{"type":"string"}}},"addlErrs":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"name":{"type":"string"}},"required":["message","name"]}}},"required":["message","err","addlErrs"]},"okRes":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean","default":true}},"required":["message"]}},"parameters":{}},"paths":{"/api/country":{"post":{"operationId":"CreateCountry","description":"Add one or more country","requestBody":{"description":"A list of countries","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/country"}}}},"responses":{"200":{"description":"Object with inserted country data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetCountry","description":"Get country","responses":{"200":{"description":"All countries","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"worldRegionId":{"type":"number"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"alpha2":{"type":"string"},"alpha3":{"type":"string","nullable":true},"population":{"type":"number","nullable":true}},"required":["id","name","worldRegionId","createdOn","modifiedOn","alpha2","alpha3","population"]}}},"required":["message","data"]}}}}}},"delete":{"operationId":"DeleteCountry","description":"Delete one or more countries","requestBody":{"description":"","content":{"applications/json":{"schema":{"type":"object","properties":{"alpha2Codes":{"type":"array","items":{"type":"string"}}},"required":["alpha2Codes"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/language":{"post":{"operationId":"CreateLanguage","description":"Add one or more language","requestBody":{"description":"A list of languages","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/language"}}}},"responses":{"200":{"description":"Object with inserted language data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetLanguage","description":"Get language","responses":{"200":{"description":"All languages","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ietfCode":{"type":"string"},"nationalName":{"type":"string"},"englishName":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]},"iso6393":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"isOralLanguage":{"type":"boolean","nullable":true},"homeCountryAlpha2":{"type":"string"}},"required":["id","ietfCode","nationalName","englishName","direction","iso6393","createdOn","modifiedOn","isOralLanguage","homeCountryAlpha2"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteLanguage","description":"Delete one or more languages","requestBody":{"description":"A list of ietfCodes corresponding to languages to delete","content":{"applications/json":{"schema":{"type":"object","properties":{"ietfCodes":{"type":"array","items":{"type":"string"}}},"required":["ietfCodes"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/content":{"post":{"operationId":"CreateContent","description":"Add one or more repo/content","requestBody":{"description":"A list of projects/content","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/content"}}}},"responses":{"200":{"description":"Object with inserted content data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetContent","description":"Get content","responses":{"200":{"description":"All content","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":256},"languageId":{"type":"string","nullable":true},"name":{"type":"string","maxLength":256},"namespace":{"type":"string","maxLength":256},"type":{"type":"string","enum":["text","audio","video","braille"]},"domain":{"type":"string","nullable":true,"enum":["scripture","gloss","parascriptural","peripheral"]},"resourceType":{"type":"string","nullable":true},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true},"level":{"type":"string","nullable":true}},"required":["id","languageId","name","namespace","type","domain","resourceType","createdOn","modifiedOn","level"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteContent","description":"Delete one or more content/repo","requestBody":{"description":"","content":{"applications/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/region":{"post":{"operationId":"CreateRegion","description":"Add one or more regions","requestBody":{"description":"A list of regions","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/region"}}}},"responses":{"200":{"description":"Object with inserted region data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetRegion","description":"Get region","responses":{"200":{"description":"All regions","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"createdOn":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["id","name","createdOn","modifiedOn"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteRegion","description":"Delete one or more regions","requestBody":{"description":"A list of regions by their regionName corresponding to regions to delete","content":{"applications/json":{"schema":{"type":"object","properties":{"regionNames":{"type":"array","items":{"type":"string"}}},"required":["regionNames"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/git":{"post":{"operationId":"CreateGit","description":"Add one or more git entries","requestBody":{"description":"A list of git entries to add","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/git"}}}},"responses":{"200":{"description":"Confirmation of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetGit","description":"Get git entries","responses":{"200":{"description":"All git entries","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"username":{"type":"string"},"repoName":{"type":"string"},"repoUrl":{"type":"string"}},"required":["id","contentId","username","repoName","repoUrl"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteGit","description":"Delete one or git entries","requestBody":{"description":"A list of username and repo (composite key) used to delete git repos","content":{"applications/json":{"schema":{"type":"object","properties":{"userRepo":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"repo":{"type":"string"}},"required":["username","repo"]}}},"required":["userRepo"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}},"/api/rendering":{"post":{"operationId":"CreateRendering","description":"Add one or more renders/links of content","requestBody":{"description":"A list of renders/links to add","content":{"applications/json":{"schema":{"$ref":"#/components/schemas/rendering"}}}},"responses":{"200":{"description":"Confirmation of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}},"get":{"operationId":"GetRendering","description":"Get renderings","responses":{"200":{"description":"All renderings","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"contentId":{"type":"string"},"fileType":{"type":"string"},"fileSizeBytes":{"type":"number","nullable":true},"url":{"type":"string"},"hash":{"type":"string","nullable":true},"createdAt":{"type":"string","nullable":true},"modifiedOn":{"type":"string","nullable":true}},"required":["id","contentId","fileType","fileSizeBytes","url","hash","createdAt","modifiedOn"]}}},"required":["message","ok","data"]}}}}}},"delete":{"operationId":"DeleteRendering","description":"Delete one or more renderings","requestBody":{"description":"A list of namespaces and content ids (e.g. namespace=wacs, contentId=user-repo to use to delete renderings","content":{"applications/json":{"schema":{"type":"object","properties":{"contentIds":{"type":"array","items":{"type":"string"}}},"required":["contentIds"]}}}},"responses":{"200":{"description":"confirmation message of successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okRes"}}}},"400":{"description":"Error with details of improper request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiError"}}}}}}}}} \ No newline at end of file diff --git a/controller/src/functions/git-bus.ts b/controller/src/functions/git-bus.ts deleted file mode 100644 index 173ca81..0000000 --- a/controller/src/functions/git-bus.ts +++ /dev/null @@ -1,135 +0,0 @@ -import {app, InvocationContext} from "@azure/functions"; -import {getDb as startDb} from "../db/config"; -import {z} from "zod"; -import {eq, and} from "drizzle-orm"; -import {handlePost as handleGitPost} from "../routes/git"; -import {handlePost as handleContentPost} from "../routes/content"; -import * as validators from "../routes/validation"; -import {createId} from "@paralleldrive/cuid2"; -import * as dbSchema from "../db/schema/schema"; -import {checkContentExists} from "../utils"; -const db = startDb(); - -// import {createId} from "@paralleldrive/cuid2"; - -const latestCommitSchema = z.object({ - Hash: z.string(), - Message: z.string(), - Url: z.string(), - Username: z.string(), - Timestamp: z.string(), -}); -const eventSchema = z.object({ - // EventType: z.enum(["push", "fork", "repository"]), - EventType: z.string(), - RepoHtmlUrl: z.string(), - User: z.string(), - Repo: z.string(), - LanguageCode: z.string().optional().nullable(), - LanguageName: z.string().optional().nullable(), - ResourceCode: z.string().optional().nullable(), - LatestCommit: latestCommitSchema.optional().nullable(), - RepoId: z.number(), - Action: z.string().nullable(), -}); - -export async function wacsSbLangApi( - message: unknown, - context: InvocationContext -) { - const namespace = "wacs"; - // If zod or the db action below throws here, the message will end up in the dead letter queue. - try { - context.log(message); - let contentCuid = null; //we need the guid of a content row to insert or upsert on the git Table. - const parsed = eventSchema.parse(message); - context.log( - `GIT BUS RECEIVED: received a message for ${parsed.Repo} of event type ${parsed.EventType}` - ); - const {exists, id} = await checkContentExists({ - name: `${parsed.User}/${parsed.Repo}`.toLowerCase(), - namespace: namespace, - db, - }); - if (!exists) { - context.log( - `namespace: ${namespace} and name: ${parsed.User}/${parsed.Repo} is not already in api. Creating new row in table` - ); - const cuid = createId(); - const newContentPayload = { - id: cuid, - name: `${parsed.User}/${parsed.Repo}`.toLowerCase(), - namespace: namespace, - type: "text", - } as const; - const newContentRow: z.infer = [ - newContentPayload, - ]; - const newRowRes = await handleContentPost(newContentRow); - if (newRowRes.status !== 200) { - contentCuid = cuid; - context.log( - `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` - ); - throw new Error( - `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` - ); - } - } - contentCuid = id ? id : contentCuid; - if (!contentCuid) { - let matchingRow = await db - .select() - .from(dbSchema.content) - .where( - and( - eq( - dbSchema.content.name, - `${parsed.User}/${parsed.Repo}`.toLowerCase() - ), - eq(dbSchema.content.namespace, namespace) - ) - ); - if (!matchingRow[0]) { - throw new Error( - `Could not find content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` - ); - } - contentCuid = matchingRow[0].id; - } - // api built with bulk ops in mind, so arrays are passed, even for single op, versus having insertSingle vs insertMany type routes - const shapedForDb: z.infer = [ - { - contentId: contentCuid, - repoName: parsed.Repo, - repoUrl: parsed.RepoHtmlUrl, - username: parsed.User, - }, - ]; - - if ( - parsed.EventType == "forked" || - parsed.EventType == "push" || - parsed.EventType == "repository" - ) { - const result = await handleGitPost(shapedForDb); - if (result.status != 200) { - throw new Error( - `Could not update git information in DB for ${`${parsed.User}/${parsed.Repo}`}` - ); - } - } else { - context.log("Updated table successfully"); - } - } catch (error) { - context.error(error); - } -} - -console.log("booting up the bus listener"); -app.serviceBusTopic("waLangApi", { - connection: "BUS_CONN", - topicName: "wacsevent", - subscriptionName: "languageapi", - handler: wacsSbLangApi, -}); diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index 6e0d2c2..2daa0f0 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -119,7 +119,7 @@ export async function wacsSbRenderingsApi( throw new Error(`Failed to find contentCuid for ${joinedName}`); } - // we got a repoRendered from gitea, so create a git row while we are it. + // we got a repoRendered from gitea, so create a git row while we are it. go ahead and upsert in case the repoName or username or something changed const newGitRow: z.infer = [ { contentId: contentCuid, @@ -158,7 +158,10 @@ export async function wacsSbRenderingsApi( hash: payload.Hash, }; const domain = determineResourceType(parsed.ResourceType); - if (["scripture", "gloss", "parascriptural"].includes(domain || "")) { + if ( + !!domain && + ["scripture", "gloss", "parascriptural"].includes(domain) + ) { const bookName = parsed.Titles[payload.Book || ""]; const isWholeBook = !payload.Chapter && !!payload.Book; let isWholeProject = @@ -217,8 +220,15 @@ export async function wacsSbRenderingsApi( } }); } catch (error) { - context.error(`Error processing ${JSON.stringify(message)}`); - context.error(error); + const repo = + typeof message == "object" && !!message && "Repo" in message + ? message.Repo + : "unknown repo"; + const user = + typeof message == "object" && !!message && "User" in message + ? message.User + : "unknown user"; + context.error(`Error processing ${user}/${repo}`); if (error instanceof z.ZodError) { error.issues.forEach((issue) => { context.error(JSON.stringify(issue)); @@ -231,6 +241,9 @@ console.log("booting up the renderings bus listener"); app.serviceBusTopic("waLangApiRenderings", { connection: "BUS_CONN", topicName: "reporendered", - subscriptionName: "reporendered-languageapi", + subscriptionName: + process.env.NODE_ENV?.toUpperCase() == "DEV" + ? "will-local" + : "reporendered-languageapi", handler: wacsSbRenderingsApi, }); From 1bb22ab544509aa3c47eeee5c69d502cba438578 Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Tue, 9 Jul 2024 15:48:47 -0500 Subject: [PATCH 13/13] change name of FileBase to FileBasePath --- controller/src/functions/renderings-bus.ts | 16 ++++++++++++++-- makefile | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/controller/src/functions/renderings-bus.ts b/controller/src/functions/renderings-bus.ts index 2daa0f0..cc94b3a 100644 --- a/controller/src/functions/renderings-bus.ts +++ b/controller/src/functions/renderings-bus.ts @@ -14,7 +14,12 @@ import {determineResourceType} from "../utils"; const db = startDb(); const renderedFileSchema = z.object({ - Path: z.string(), + Path: z.string().transform((val, ctx) => { + if (!val.startsWith("/")) { + val = `/${val}`; + } + return val; + }), Size: z.number(), FileType: z.string(), Hash: z.string(), @@ -37,6 +42,12 @@ const renderingsSchema = z.object({ RenderedAt: z.string(), RepoId: z.number(), RenderedFiles: z.array(renderedFileSchema), + FileBasePath: z.string().transform((val, ctx) => { + if (val.endsWith("/")) { + val.slice(0, -1); + } + return val; + }), Titles: titlesSchema, }); @@ -153,7 +164,8 @@ export async function wacsSbRenderingsApi( namespace, contentId: contentCuid!, fileType: payload.FileType, - url: payload.Path, + // zod handles the / separatore. Base Path should end with + url: `${parsed.FileBasePath}${payload.Path}`, fileSizeBytes: payload.Size || 0, hash: payload.Hash, }; diff --git a/makefile b/makefile index a354a89..29e251f 100644 --- a/makefile +++ b/makefile @@ -4,7 +4,7 @@ console: --admin-secret $(op read "op://AppDev Scripture Accessibility/languageapi-hasura-dev-container-secrets/hasura-graphql-admin-secret") \ --endpoint $(op read "op://AppDev Scripture Accessibility/languageapi-hasura-dev-container-secrets/url") -# -n drizzle schema is for to get the same migrations that have been applied to the dev database applied. +# -n drizzle schema is for to get the same migrations that have been applied to the dev database applied. This presumes a workflow of dumping dev data incl. it's migrations, and then trying out new stuff from there. When the docker compose postgres volume spins ups, its uses psql and mounts in this dump. .PHONY: datadump datadump: pg_dump $(op read "op://AppDev Scripture Accessibility/languageapi-dev/connection string") -n public -n drizzle > ./controller/data_dump.sql