Skip to content

Commit

Permalink
Merge pull request #497 from codigoencasa/feature/breaking-change
Browse files Browse the repository at this point in the history
Feature/breaking change
  • Loading branch information
leifermendez committed Jan 16, 2023
2 parents e72794a + b393c11 commit 09fd0dd
Show file tree
Hide file tree
Showing 10 changed files with 217 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,51 @@ jobs:

- name: Unit Tests
run: yarn test

############ UNIT TEST ############
check-providers:
name: Check Providers Versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000

- name: Check Baileys
run: yarn node ./scripts/checker.js --name=baileys --stable=true

- name: Check Venom
run: yarn node ./scripts/checker.js --name=venom --stable=true

- name: Check web-whatsapp
run: yarn node ./scripts/checker.js --name=web-whatsapp --stable=true

- name: Check Meta
run: yarn node ./scripts/checker.js --name=meta --stable=true

- name: Check Twilio
run: yarn node ./scripts/checker.js --name=twilio --stable=true

- 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:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: feature/providers-major
4 changes: 4 additions & 0 deletions packages/portal/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
32 changes: 32 additions & 0 deletions packages/portal/.vscode/qwik-city.code-snippets
Original file line number Diff line number Diff line change
@@ -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 changes: 84 additions & 0 deletions packages/portal/.vscode/qwik.code-snippets
Original file line number Diff line number Diff line change
@@ -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 changes: 15 additions & 0 deletions packages/portal/server/@qwik-city-not-found-paths.js
Original file line number Diff line number Diff line change
@@ -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 }
Loading

0 comments on commit 09fd0dd

Please sign in to comment.