stability-editing
All checks were successful
deploy / test (push) Successful in 2m7s
deploy / Update templates on Mailgun (push) Has been skipped

This commit is contained in:
Untone 2024-02-05 11:59:21 +03:00
parent 1832362fb9
commit a880fe81e5
8 changed files with 272 additions and 913 deletions

View File

@ -13,6 +13,10 @@ type checking with watch
```
npm run typecheck:watch
```
fix styles, imports, formatting and autofixable linting errors:
```
npm run fix
```
## Code generation
generate new SolidJS component:

View File

@ -22,5 +22,3 @@ export const <%= h.changeCase.pascal(name) %>Provider = (props: { children: JSX.
return <<%= h.changeCase.pascal(name) %>Context.Provider value={value}>{props.children}</<%= h.changeCase.pascal(name) %>Context.Provider>
}

View File

@ -2,4 +2,4 @@
message: |
hygen {bold generator new} --name [NAME] --action [ACTION]
hygen {bold generator with-prompt} --name [NAME] --action [ACTION]
---
---

1120
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -50,15 +50,15 @@
"@graphql-codegen/typescript-operations": "4.0.1",
"@graphql-codegen/typescript-urql": "4.0.0",
"@graphql-codegen/urql-introspection": "3.0.0",
"@graphql-tools/url-loader": "7.17.18",
"@graphql-tools/url-loader": "8.0.1",
"@graphql-typed-document-node/core": "3.2.0",
"@hocuspocus/provider": "2.0.6",
"@microsoft/fetch-event-source": "^2.0.1",
"@nanostores/router": "0.11.0",
"@nanostores/router": "0.13.0",
"@nanostores/solid": "0.4.2",
"@playwright/test": "1.41.2",
"@popperjs/core": "2.11.8",
"@sentry/browser": "5.30.0",
"@sentry/browser": "7.99.0",
"@solid-primitives/media": "2.2.3",
"@solid-primitives/memo": "1.2.4",
"@solid-primitives/share": "2.0.4",
@ -97,7 +97,7 @@
"@tiptap/extension-youtube": "2.0.3",
"@types/js-cookie": "3.0.6",
"@types/node": "20.9.0",
"@urql/core": "3.2.2",
"@urql/core": "4.2.3",
"@urql/devtools": "2.0.3",
"babel-preset-solid": "1.8.4",
"bootstrap": "5.3.2",

View File

@ -326,8 +326,8 @@ export const FullArticle = (props: Props) => {
const cover = props.article.cover ?? 'production/image/logo_image.png'
const ogImage = getOpenGraphImageUrl(cover, {
title: props.article.title,
topic: mainTopic().title,
author: props.article.authors[0].name,
topic: mainTopic()?.title || '',
author: props.article?.authors[0]?.name || '',
width: 1200,
})

View File

@ -207,8 +207,12 @@ export const EditorProvider = (props: { children: JSX.Element }) => {
shout_id,
publish: true,
})
addArticles([newShout])
openPage(router, 'feed')
if (newShout) {
addArticles([newShout])
openPage(router, 'feed')
} else {
console.error('[publishShoutById] no shout returned:', newShout)
}
} catch (error) {
console.error('[publishShoutById]', error)
showSnackbar({ type: 'error', body: t('Error') })

View File

@ -0,0 +1,37 @@
import { chromium } from 'playwright'
;(async () => {
const browser = await chromium.launch()
const context = await browser.newContext()
// Define the URLs to visit
const pagesToVisit = [
'http://localhost:3000/',
'http://localhost:3000/feed',
'http://localhost:3000/create',
'http://localhost:3000/about/donate',
'http://localhost:3000/authors',
'http://localhost:3000/topics',
'http://localhost:3000/inbox',
]
// Loop through the pages and visit each one
for (const pageUrl of pagesToVisit) {
const page = await context.newPage()
// Log a message before visiting the page
console.log(`Visiting page: ${pageUrl}`)
await page.goto(pageUrl)
// Add your test assertions here if needed
// Log a message after visiting the page
console.log(`Finished visiting page: ${pageUrl}`)
// Close the page before moving to the next one
await page.close()
}
// Close the browser
await browser.close()
})()