mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
fix(cli): ⚡ refactor
This commit is contained in:
13
.github/workflows/check-providers.yml
vendored
13
.github/workflows/check-providers.yml
vendored
@@ -40,6 +40,15 @@ jobs:
|
||||
- name: Check Twilio
|
||||
run: yarn node ./scripts/checker.js --name=twilio --stable=true
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
- name: Add and commit changes to gh-pages branch
|
||||
run: |
|
||||
git config --local user.email 'action@github.com'
|
||||
git config --local user.name 'GitHub Action'
|
||||
git add .
|
||||
git commit -m 'major'
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
commit_message: 'ci(providers): 👍 updated versions stable providers'
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: feature/providers-major
|
||||
|
||||
4
packages/portal/.vscode/extensions.json
vendored
Normal file
4
packages/portal/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "unifiedjs.vscode-mdx"],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
32
packages/portal/.vscode/qwik-city.code-snippets
vendored
Normal file
32
packages/portal/.vscode/qwik-city.code-snippets
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"onGet": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:onGet",
|
||||
"description": "onGet function for a route index",
|
||||
"body": [
|
||||
"export const onGet: RequestHandler = (request) => {",
|
||||
" $0",
|
||||
"};"
|
||||
]
|
||||
},
|
||||
"onGet (typed)": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:onGet typed",
|
||||
"description": "onGet function for a route index",
|
||||
"body": [
|
||||
"export interface ${1:PageData} {",
|
||||
" $2",
|
||||
"};",
|
||||
"",
|
||||
"export const onGet: RequestHandler<$1> = (request) => {",
|
||||
" $4",
|
||||
"};"
|
||||
]
|
||||
},
|
||||
"useEndpoint": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useEndpoint",
|
||||
"description": "useEndpoint declaration",
|
||||
"body": "const $1 = useEndpoint<typeof onGet>();"
|
||||
}
|
||||
}
|
||||
84
packages/portal/.vscode/qwik.code-snippets
vendored
Normal file
84
packages/portal/.vscode/qwik.code-snippets
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"Qwik component (simple)": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:component",
|
||||
"description": "Simple Qwik component",
|
||||
"body": [
|
||||
"export const ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}} = component$(() => {",
|
||||
" return <${2:div}>$4</$2>",
|
||||
"});"
|
||||
]
|
||||
},
|
||||
"Qwik component (props)": {
|
||||
"scope": "typescriptreact",
|
||||
"prefix": "q:component w/props",
|
||||
"description": "Qwik component w/ props",
|
||||
"body": [
|
||||
"export interface ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}}Props {",
|
||||
" $2",
|
||||
"}",
|
||||
"",
|
||||
"export const $1 = component$<$1Props>((props) => {",
|
||||
" const ${2:count} = useSignal(0);",
|
||||
" return (",
|
||||
" <${3:div} on${4:Click}$={(ev) => {$5}}>",
|
||||
" $6",
|
||||
" </${3}>",
|
||||
" );",
|
||||
"});"
|
||||
]
|
||||
},
|
||||
"Qwik signal": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useSignal",
|
||||
"description": "useSignal() declaration",
|
||||
"body": ["const ${1:foo} = useSignal($2);", "$0"]
|
||||
},
|
||||
"Qwik store": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useStore",
|
||||
"description": "useStore() declaration",
|
||||
"body": ["const ${1:state} = useStore({", " $2", "});", "$0"]
|
||||
},
|
||||
"$ hook": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:$",
|
||||
"description": "$() function hook",
|
||||
"body": ["$(() => {", " $0", "});", ""]
|
||||
},
|
||||
"useClientEffect": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useClientEffect",
|
||||
"description": "useClientEffect$() function hook",
|
||||
"body": ["useClientEffect$(({ track }) => {", " $0", "});", ""]
|
||||
},
|
||||
"useTask": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useTask",
|
||||
"description": "useTask$() function hook",
|
||||
"body": [
|
||||
"useTask$(({ track }) => {",
|
||||
" track(() => $1);",
|
||||
" $0",
|
||||
"});",
|
||||
""
|
||||
]
|
||||
},
|
||||
"useResource": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useResource",
|
||||
"description": "useResource$() declaration",
|
||||
"body": [
|
||||
"const $1 = useResource$(({ track, cleanup }) => {",
|
||||
" $0",
|
||||
"});",
|
||||
""
|
||||
]
|
||||
},
|
||||
"useServerMount": {
|
||||
"scope": "javascriptreact,typescriptreact",
|
||||
"prefix": "q:useServerMount",
|
||||
"description": "useServerMount$() function hook",
|
||||
"body": ["useServerMount$(() => {", " $0", "});", ""]
|
||||
}
|
||||
}
|
||||
15
packages/portal/server/@qwik-city-not-found-paths.js
Normal file
15
packages/portal/server/@qwik-city-not-found-paths.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const notFounds = [
|
||||
[
|
||||
'/',
|
||||
'<!DOCTYPE html>\n<html>\n<head>\n <meta charset="utf-8">\n <meta http-equiv="Status" content="404"/>\n <title>404 Resource Not Found</title>\n <meta name="viewport" content="width=device-width,initial-scale=1">\n <style>\n body { color: #006ce9; background-color: #fafafa; padding: 30px; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif; }\n p { max-width: 600px; margin: 60px auto 30px auto; background: white; border-radius: 4px; box-shadow: 0px 0px 50px -20px #006ce9; overflow: hidden; }\n strong { display: inline-block; padding: 15px; background: #006ce9; color: white; }\n span { display: inline-block; padding: 15px; }\n pre { max-width: 580px; margin: 0 auto; }\n </style>\n</head>\n<body>\n <p><strong>404</strong> <span>Resource Not Found</span></p>\n</body>\n</html>',
|
||||
],
|
||||
]
|
||||
function getNotFound(p) {
|
||||
for (const r of notFounds) {
|
||||
if (p.startsWith(r[0])) {
|
||||
return r[1]
|
||||
}
|
||||
}
|
||||
return 'Resource Not Found'
|
||||
}
|
||||
export { getNotFound }
|
||||
5
packages/portal/server/@qwik-city-plan.mjs
Normal file
5
packages/portal/server/@qwik-city-plan.mjs
Normal file
File diff suppressed because one or more lines are too long
23
packages/portal/server/@qwik-city-static-paths.js
Normal file
23
packages/portal/server/@qwik-city-static-paths.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const staticPaths = new Set([
|
||||
'/',
|
||||
'/favicon.svg',
|
||||
'/manifest.json',
|
||||
'/q-manifest.json',
|
||||
'/robots.txt',
|
||||
'/service-worker.js',
|
||||
'/sitemap.xml',
|
||||
'/water-mark.png',
|
||||
])
|
||||
function isStaticPath(p) {
|
||||
if (p.startsWith('/build/')) {
|
||||
return true
|
||||
}
|
||||
if (p.startsWith('/assets/')) {
|
||||
return true
|
||||
}
|
||||
if (staticPaths.has(p)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
export { isStaticPath }
|
||||
1
packages/portal/server/entry.ssr.js
Normal file
1
packages/portal/server/entry.ssr.js
Normal file
@@ -0,0 +1 @@
|
||||
export * from './entry.ssr.mjs'
|
||||
2
packages/portal/server/entry.ssr.mjs
Normal file
2
packages/portal/server/entry.ssr.mjs
Normal file
File diff suppressed because one or more lines are too long
3
packages/portal/server/package.json
Normal file
3
packages/portal/server/package.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
Reference in New Issue
Block a user