-
Notifications
You must be signed in to change notification settings - Fork 10
RD: legacy migration experiment #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
228 commits
Select commit
Hold shift + click to select a range
68f2f48
feat: create legacy structure separate from seed
tefkah 4c0d100
fix: fix some type errors
tefkah b1ba731
feat: extremely basic importer
tefkah f908ba5
fix: pass trx to getAllPubTypesForCommunity
tefkah f106652
feat: delete existing stuff before reattempting migration
tefkah 0d03574
feat: much better parsing, import entire archive
tefkah 1282b94
refactor: make creating pubtypes with default forms easier
tefkah 7d5a765
refactor: improve passing through of trx
tefkah f62b33f
refactor: create separate place for creating pubtype with form
tefkah ec9b9c4
fix: worse validation
tefkah aad45c8
feat: wow sort of importing works
tefkah 7578b61
feat: add ability to target by value rather than id for many pub-op o…
tefkah ad921ad
feat: add tests for by value operations
tefkah 9af0e29
fix: make relateByValue also properly accept multiple values
tefkah 258c9dd
fix: improve setting logic
tefkah 262f0ba
feat: import collections
tefkah c3fb31c
feat: import pages
tefkah 7d64137
fix: update pnpm-lock.yaml for reasons
tefkah e8552f0
fix: allow non-destructive update
tefkah 1f0aee6
feat: allow you to actually set a size for a column in a datatable ho…
tefkah 7ee0902
fix(pubOp): make updateByRelatedValue work
tefkah 4ba7207
fix(ui): fix checkbox alignment in tables
tefkah 52f10cd
feat(ui): add sticky header option for datatable
tefkah 4d7ecff
feat(migration): add more granular undo
tefkah 39cb44c
feat(autoCache): correctly handle autocache in transactions
tefkah cdf7d4a
refactor(pub-op): allow pub-op to not return things
tefkah df01b17
feat(migration): create top-level journal + connections
tefkah 26d85e0
feat(pubOp): tentatively add support for batch operations
tefkah 697f9cc
feat(pubOp): add tests for batch operations
tefkah 663870f
chore(pubOp): add seed
tefkah 75e1488
feat(PubOp): make resolving non-target values more efficient
tefkah ff70426
fix(trx): do not always throw transaction
tefkah 44fca9c
feat(api): search pubtypes by name
tefkah d655236
feat(api): search pubtypes by name array
tefkah ced6235
feat(site-builder): functioning site-builder
tefkah 5f0885b
feat(site-builder): add site building action
tefkah 2506a6d
refactor(ui): move submit button to ui package
tefkah 12fe755
feat(site-builder): add astro configs for prettier and vscode
tefkah 700d52e
feat(site-builder): add env vars for sitebuilder
tefkah a0ace75
fix(pubOp): fix target resolution
tefkah b7bf102
chore(migration): update server action to log out error
tefkah b010e2c
feat(site-builder): add working action
tefkah 6a70640
chore: new deps
tefkah 99a0ff5
chore(migration): clean up migration code a bit
tefkah 274cc34
fix(site-builder): do not depend on ui and use shared dockerfile
tefkah ec16524
chore(site-builder): keep builds dir
tefkah 6dd6c41
chore(site-builder): keep more dirs
tefkah 5727b3b
fix(site-builder): run successfully in docker
tefkah 4d568a2
chore(site-buider): better docker folders
tefkah 98bf731
feat(site-builder): use ts-rest with hono, use different thing with t…
tefkah 66f3070
feat(site-builder): stream, and allow of uploading directory
tefkah dbaf480
feat(site-builder): make building more programattic and slightly easi…
tefkah 6db0f0c
chore: merge with main
tefkah 8fa58bf
fix(site-builder): include .env.development
tefkah 41a0fee
fix(site-builder): fix things
tefkah 18c6c67
feat(site-builder): add sitebuilder auth and sitebuilder specific tokens
tefkah 9067a87
chore: fix env imports
tefkah 18546a3
feat(site-builder): add infra configuration
tefkah f6965fb
chore: update vitest dep to solve types
tefkah 03c3470
chore: fix lint and type errors
tefkah ba3c284
chore: fix jobs
tefkah e866310
fix: mock autoCache/revalidate better
tefkah 1d9752d
chore: attempt to fix workflow
tefkah 3e6585e
fix: fix tests
tefkah efc6b4f
fix: fix apiAccesstoken better
tefkah 9452e46
chore: stupid way to fix error, rework auto rollback with kysely 0.28…
tefkah 1f3f395
fix(ci): run playwright at e2e
tefkah 7aab8f9
fix(self-host): re enable minio
tefkah bbfc3c2
fix(ci): do not exit after minio-init
tefkah 1d26f1b
fix(e2e): install correct playwright deps
tefkah 667a13a
fix: skip all other ci
tefkah f9b0ce0
fix(ci): really skip ci
tefkah 3760934
fix(ci): add new env vars
tefkah b419050
fix(ci): SITE_BUILDER_ENDPOINT!!
tefkah 2db84b2
fix(migration): don't write archive.json
tefkah 560c0df
chore(ci): rebuild core
tefkah 5bb1f5c
chore: skip ci again
tefkah 40e00c2
fix: maybe set port correctly
tefkah 2899b24
fix(preview): fix preview issues
tefkah 4e21934
fix(preview): fix preview issues
tefkah 2517cbd
fix(preview): fix preview issues
tefkah 6f2d224
fix(site-builder): set correct permissions for folders
tefkah d7ff0bb
fix: correct id
tefkah e3d2511
fix(assets): try some workaround to make assets uploading work
tefkah b59b888
fix(site-builder): rewrite returned url
tefkah 89b3aa2
fix(self-host): use actual script as entrypoint
tefkah dc221f9
fix(site-builder): fix path for returned
tefkah 1a135a1
feat(actions): allow returning straight up jsx as report
tefkah c76ff22
refactor(migration): use new batch system in migratins
tefkah 098ab93
fix(preview): maybe depend on minio-init?
tefkah 6e5ab3f
fix(preview: oops, i mean have platform depend
tefkah 63bc961
feat(site-builder+ui): make site-builder token unremovable and extrac…
tefkah c5e93cd
feat(migration): show migration in sidebar
tefkah aa6ee8d
chore: get rid of unnecessary between function
tefkah 9c5d7ec
feat(migration): import actual draft
tefkah 086373d
feat(migration): support images
tefkah 95e91e7
feat(context-editor): add hard_break node
tefkah 99a3c63
feat(migration): use slightly different content structure
tefkah 187f014
chore: merge with main
tefkah cd038a6
feat(html): basic html serialization/deserialization
tefkah ea1b9be
Merge branch 'main' into tfk/migration-prosemirror-rehype
tefkah 1812f07
fix: fix merge conflicts
tefkah d935cde
chore: merge with main
tefkah cdcfcfe
Merge branch 'tfk/migration' into tfk/migration-prosemirror-rehype
tefkah dd41e60
feat(ui): add new show more component
tefkah 7d1f9d1
feat(serialization): add proper serialization libs
tefkah 8bbd621
refactor(serialization): parse and convert prosemirror tree during
tefkah 7c4bf75
fix(migration): make migration code work with new pubop stuff
tefkah ef0687e
feat: make site-builder prettier
tefkah 2938c49
Merge branch 'main' into tfk/migration-prosemirror-rehype
tefkah 3fc921a
feat(fts|serialization): properly index html
tefkah e0605f5
fix(thing): try to reconstruct things
tefkah 2869c52
Merge branch 'main' into tfk/migration-prosemirror-rehype
tefkah a9ce387
chore: merge
tefkah b5c4b89
fix(images): properly convert images on import
tefkah fb3b112
fix(migration): properly convert images on import
tefkah 2ee5cfc
fix(serialization): sort of fix loading
tefkah f5d42cb
feat(serialization): add first pass at serialization
tefkah ce77fcd
feat(ui): add new show more component
tefkah 204fa4f
feat(serialization): add proper serialization libs
tefkah c33097f
refactor(serialization): parse and convert prosemirror tree during
tefkah 8f49b17
feat(fts|serialization): properly index html
tefkah d9f4f20
fix(serialization): sort of fix loading
tefkah e92f261
fix: fix weird redis install issue
tefkah 550c767
dev: make legacy seed have useful richtext
tefkah 78aae12
feat(migration): import images as figures with captions
tefkah 6dcc8a4
chore: remove logs
tefkah 614afbf
fix(migration): properly import equation nodes
tefkah 71439d6
dev: make legacy seed have useful richtext
tefkah 642bbd1
feat(math): serialize math to mathml and back reliably
tefkah 9997e8f
feat(serialization): find a happy way to store html and serialize on …
tefkah 2b3c8b5
chore: remove old validation function, fix test
tefkah e5bf99f
fix: fix the stories
tefkah b83d855
fix: really fix math, cleanup
tefkah e2b5978
feat: add migration to clear current richtext values
tefkah 276fffe
Merge branch 'main' into tfk/html-richtext
tefkah eb9bcc9
chore: bring up to speed with other html work
tefkah 6c740c6
chore: meaningless change to trigger ci
tefkah 53bb547
fix: fix fts related type issues
tefkah 162b545
fix: fix contexteditor related type issues
tefkah 0ced401
chore: don't format html
tefkah 76e70e8
fix: fix test to work with figures
tefkah 7831b83
chore: revert and merge with main
tefkah 8c28170
chore: merge with tfk/html-richtext
tefkah d72f664
fix: fix small issues
tefkah 4944bd0
chore(db): increase idle-in-connection timeout, otherwise migration c…
tefkah 544d00c
fix(migration): properly import table nodes
tefkah 69b0a54
feat(migration): handle some pub facets (when i have them)
tefkah 257837e
fix(migration): fallback to latest release content if draft is empty
tefkah dfa3ad8
feat(migration/site-builder): navigation menus sort of work
tefkah ec44cc8
fix: modify tests
tefkah fb42241
Merge branch 'tfk/html-richtext' into tfk/migration
tefkah 5ebf290
feat: add extremely basic page layout migration
tefkah 0725fa5
feat: use pages somewhat
tefkah 7d74040
fix(ui): type error with submit component
tefkah 580f1b6
chore(migration): clean up
tefkah 25fd70b
feat(migration): add some page metadata for the migration page
tefkah 39b0628
Merge branch 'main' into tfk/html-richtext
tefkah 829eb08
chore: remove silly console.log messages in cache layer
tefkah 6a01dbd
chore: merge with main
tefkah 4eb57a6
Merge branch 'tfk/html-richtext' into tfk/migration
tefkah b892c62
refactor: move the html/prosemirror boundary to the form
tefkah 0dded00
chore: merge with main
tefkah 114206f
fix: handle no value for richtext
tefkah e0f038d
fix: use more predictable handling of temp richtext value, add explan…
tefkah 7a6ea14
refactor: get rid of forward ref, it is cringe
tefkah 971e977
Merge branch 'main' into tfk/html-richtext
tefkah 81d60fc
fix: make ref optional
tefkah 848a258
fix: use consolidate prosemirror/html conversion fns a bit
tefkah 1bbb209
Merge branch 'main' into tfk/html-richtext
tefkah 05564bd
docs: update rich text docs
tefkah a3d9614
fix: find math display correctly
tefkah ce54302
chore: merge
tefkah 4af319e
feat(color): allow alpha for color
tefkah f6e0699
chore: remove old editor serializiation methods
tefkah 36b7023
chore: cleanup
tefkah 22c80b2
Merge branch 'main' into tfk/html-richtext
tefkah 25f761d
fix?: use localhost instead of docker-host for minio init
tefkah 3edd460
debug: add some logs
tefkah 4b4c059
fix?: upgrade aws?
tefkah 7ced2c4
fix(minio): use new minio client syntax after breaking change
tefkah c86b044
chore: merge
tefkah faabcf1
fix(minio): use new minio client syntax after breaking change
tefkah 6d85856
chore: remove console.logs
tefkah cf1a864
chore: run ci again
tefkah 150f223
chore: remove console.logs
tefkah 04f67ba
chore: sync up vite versions
tefkah 570dedd
fix: manually cast timeout to be sure that typescript does not get co…
tefkah bc5b3fd
fix(migration): restrucuter the giant legacy-migration file a bit
tefkah af4b3b2
dev(migration): create a blank community
tefkah 63ae0e8
fix(migration): properly import colors
tefkah 243d4ea
Merge branch 'main' into tfk/html-richtext
tefkah c0e290a
Merge branch 'tfk/html-richtext' into tfk/migration
tefkah ad1a2cd
chore(migration): clean up
tefkah 993c610
chore(migration): clean up + increase concurrency
tefkah d5a1e8e
fix(migration): add possibly crucial missing await
tefkah 4ab04cd
chore: rename cleanup to legacy-cleanup
tefkah 02e317d
fix: actually delete pubfields when undoing legacy migration
tefkah 4696e6c
fix: remove site_builder_api_key
tefkah 30905a2
chore: prettier
tefkah 9881d52
chore: merge
tefkah 9e29fa3
chore: merge
tefkah 2709e27
chore: merge
tefkah 8bc9678
fix: add sitebuilder to e2e tests, and set correct env vars
tefkah a310a1c
chore: merge
tefkah c3bb95b
fix: set test env correctly
tefkah e676374
chore: merge
tefkah 5456a5d
feat: make user upload static.json themselves
tefkah 5e70710
fix: add html
tefkah b4e2751
fix: remove storybook filter
tefkah c65b304
fix: click action run button correctly
tefkah b04e9f0
fix: fix test to look at correct permissions
tefkah 38750d1
fix: fix test by waiting for nav
tefkah 2bfad60
fix: have slightly better error if you access form as superadmin
tefkah 8846ac9
fix: fix obscure nuqs error by installing specific version of babel/…
tefkah 8677b8c
fix: when clicking on community on /communities, take you there
tefkah ea397c7
fix: don't write file silly
tefkah bfe5b13
chore: merge
tefkah dbdab73
Merge branch 'main' into tfk/migration
tefkah 8ef68af
chore: fix format
tefkah 8c925b0
fix: type-check
tefkah b6349be
fix: close toast in test
tefkah bd928a1
Merge branch 'main' into tfk/migration
tefkah ef96317
chore: merge
tefkah 0004d9b
fix: more merge
tefkah b7c9da7
fix: aa
tefkah 169791b
fix: fix merge
tefkah f87eeab
Merge branch 'main' into tfk/migration
tefkah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // @ts-check | ||
|
|
||
| import baseConfig from "./index.js"; | ||
|
|
||
| /** @typedef {import("prettier").Config} PrettierConfig */ | ||
| /** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */ | ||
| /** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */ | ||
|
|
||
| /** @type {PrettierConfig & SortImportsConfig & TailwindConfig} */ | ||
| const config = { | ||
| ...baseConfig, | ||
| plugins: [...(baseConfig.plugins ?? []), "prettier-plugin-astro"], | ||
| overrides: [ | ||
| { | ||
| files: "*.astro", | ||
| options: { | ||
| parser: "astro", | ||
| }, | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,31 @@ | ||
| MAILGUN_SMTP_HOST=localhost | ||
| MAILGUN_SMTP_PORT=54325 | ||
| API_KEY="super_secret_key" | ||
| DATABASE_URL="postgresql://postgres:postgres@localhost:54322/postgres" | ||
| PUBPUB_URL="http://localhost:3000" | ||
| ASSETS_BUCKET_NAME="assets.v7.pubpub.org" | ||
| ASSETS_REGION="us-east-1" | ||
| API_KEY=super_secret_key | ||
| DATABASE_URL=postgresql://postgres:postgres@localhost:54322/postgres | ||
| PUBPUB_URL=http://localhost:3000 | ||
| ASSETS_BUCKET_NAME=assets.v7.pubpub.org | ||
| ASSETS_REGION=us-east-1 | ||
|
|
||
| # mninio defaults | ||
| ASSETS_UPLOAD_KEY="pubpubuser" | ||
| ASSETS_UPLOAD_SECRET_KEY="pubpubpass" | ||
| ASSETS_STORAGE_ENDPOINT="http://localhost:9000" | ||
| ASSETS_UPLOAD_KEY=pubpubuser | ||
| ASSETS_UPLOAD_SECRET_KEY=pubpubpass | ||
| ASSETS_STORAGE_ENDPOINT=http://localhost:9000 | ||
|
|
||
| MAILGUN_SMTP_PASSWORD="xxx" | ||
| MAILGUN_SMTP_USERNAME="xxx" | ||
| MAILGUN_SMTP_PASSWORD=xxx | ||
| MAILGUN_SMTP_USERNAME=xxx | ||
|
|
||
| OTEL_SERVICE_NAME="pubpub-v7-dev" # should be shared across components but not environments | ||
| HONEYCOMB_API_KEY="xxx" | ||
| ARTILLERY_CLOUD_API_KEY="xxx" | ||
| OTEL_SERVICE_NAME=pubpub-v7-dev | ||
| HONEYCOMB_API_KEY=xxx | ||
| ARTILLERY_CLOUD_API_KEY=xxx | ||
|
|
||
| KYSELY_DEBUG="true" | ||
| KYSELY_DEBUG=true | ||
|
|
||
| DATACITE_REPOSITORY_ID="" | ||
| DATACITE_PASSWORD="" | ||
| DATACITE_API_URL="https://api.test.datacite.org" | ||
| DATACITE_REPOSITORY_ID= | ||
| DATACITE_PASSWORD= | ||
| DATACITE_API_URL=https://api.test.datacite.org | ||
|
|
||
| GCLOUD_KEY_FILE='xxx' | ||
| VALKEY_HOST='localhost' | ||
| GCLOUD_KEY_FILE=xxx | ||
|
|
||
| SITE_BUILDER_ENDPOINT=http://localhost:4000 | ||
|
|
||
| VALKEY_HOST='localhost' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { Book } from "lucide-react"; | ||
| import * as z from "zod"; | ||
|
|
||
| import { Action } from "db/public"; | ||
| import { FileText } from "ui/icon"; | ||
|
|
||
| import { fieldName } from "../_lib/zodTypes"; | ||
| import { defineAction } from "../types"; | ||
|
|
||
| const schema = z.object({ | ||
| token: z.string().describe("The token for the site builder"), | ||
| articles: fieldName(), | ||
| collections: fieldName(), | ||
| mainColor: fieldName(), | ||
| accentColor: fieldName(), | ||
| }); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are not actually used, but we should do so in the future (or find some other way to configure it) |
||
|
|
||
| export const action = defineAction({ | ||
| name: Action.buildJournalSite, | ||
| config: { | ||
| schema, | ||
| }, | ||
| description: "Build a journal site and receive a zip file", | ||
| params: { | ||
| schema: schema.partial(), | ||
| }, | ||
| icon: Book, | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really used for the sitebuilder action, but could be used in the future.