mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 12:39:24 +00:00
feat(ci): 🎨 relases script
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,6 +20,7 @@ coverage/
|
|||||||
log
|
log
|
||||||
log/*
|
log/*
|
||||||
*.log
|
*.log
|
||||||
|
*.tgz
|
||||||
lib
|
lib
|
||||||
tmp/
|
tmp/
|
||||||
.yarn/*
|
.yarn/*
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
"rollup": "^3.2.3",
|
"rollup": "^3.2.3",
|
||||||
"rollup-plugin-cleanup": "^3.2.1",
|
"rollup-plugin-cleanup": "^3.2.1",
|
||||||
"rollup-plugin-copy": "^3.4.0",
|
"rollup-plugin-copy": "^3.4.0",
|
||||||
|
"semver": "^7.3.8",
|
||||||
"standard-version": "^9.5.0",
|
"standard-version": "^9.5.0",
|
||||||
"uvu": "^0.5.6"
|
"uvu": "^0.5.6"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./lib/bundle.bot.cjs",
|
"main": "./lib/bundle.bot.cjs",
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bot:rollup": "node ../../node_modules/.bin/rollup index.js --config ./rollup-cli.config.js",
|
"bot:rollup": "node ../../node_modules/.bin/rollup index.js --config ./rollup-cli.config.js",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "prettier --check .",
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"private": true,
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cross-spawn": "^7.0.3",
|
"cross-spawn": "^7.0.3",
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./lib/bin/bundle.create.cjs",
|
"main": "./lib/bin/bundle.create.cjs",
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bot-whatsapp/cli": "*"
|
"@bot-whatsapp/cli": "*"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Esto es el conector a mysql, pg, mongo",
|
"description": "Esto es el conector a mysql, pg, mongo",
|
||||||
"main": "./lib/mock/index.cjs",
|
"main": "./lib/mock/index.cjs",
|
||||||
"private": true,
|
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { cloudflarePagesAdaptor } from '@builder.io/qwik-city/adaptors/cloudflare-pages/vite';
|
import { cloudflarePagesAdaptor } from '@builder.io/qwik-city/adaptors/cloudflare-pages/vite'
|
||||||
import { extendConfig } from '@builder.io/qwik-city/vite';
|
import { extendConfig } from '@builder.io/qwik-city/vite'
|
||||||
import baseConfig from '../../vite.config';
|
import baseConfig from '../../vite.config'
|
||||||
|
|
||||||
export default extendConfig(baseConfig, () => {
|
export default extendConfig(baseConfig, () => {
|
||||||
return {
|
return {
|
||||||
@@ -15,5 +15,5 @@ export default extendConfig(baseConfig, () => {
|
|||||||
staticGenerate: true,
|
staticGenerate: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
}
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
// Cloudflare Pages Functions
|
// Cloudflare Pages Functions
|
||||||
// https://developers.cloudflare.com/pages/platform/functions/
|
// https://developers.cloudflare.com/pages/platform/functions/
|
||||||
export { onRequest } from '../server/entry.cloudflare-pages';
|
export { onRequest } from '../server/entry.cloudflare-pages'
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { component$, useStyles$ } from '@builder.io/qwik';
|
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||||
import { useContent, useLocation, ContentMenu } from '@builder.io/qwik-city';
|
import { useContent, useLocation, ContentMenu } from '@builder.io/qwik-city'
|
||||||
import styles from './breadcrumbs.css?inline';
|
import styles from './breadcrumbs.css?inline'
|
||||||
|
|
||||||
export const Breadcrumbs = component$(() => {
|
export const Breadcrumbs = component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
const { menu } = useContent();
|
const { menu } = useContent()
|
||||||
const loc = useLocation();
|
const loc = useLocation()
|
||||||
|
|
||||||
const breadcrumbs = createBreadcrumbs(menu, loc.pathname);
|
const breadcrumbs = createBreadcrumbs(menu, loc.pathname)
|
||||||
if (breadcrumbs.length === 0) {
|
if (breadcrumbs.length === 0) {
|
||||||
return null;
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -19,44 +19,47 @@ export const Breadcrumbs = component$(() => {
|
|||||||
<span>{b.href ? <a href={b.href}>{b.text}</a> : b.text}</span>
|
<span>{b.href ? <a href={b.href}>{b.text}</a> : b.text}</span>
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|
||||||
export function createBreadcrumbs(menu: ContentMenu | undefined, pathname: string) {
|
export function createBreadcrumbs(
|
||||||
|
menu: ContentMenu | undefined,
|
||||||
|
pathname: string
|
||||||
|
) {
|
||||||
if (menu?.items) {
|
if (menu?.items) {
|
||||||
for (const indexA of menu.items) {
|
for (const indexA of menu.items) {
|
||||||
const breadcrumbA: ContentBreadcrumb = {
|
const breadcrumbA: ContentBreadcrumb = {
|
||||||
text: indexA.text,
|
text: indexA.text,
|
||||||
};
|
}
|
||||||
if (typeof indexA.href === 'string') {
|
if (typeof indexA.href === 'string') {
|
||||||
breadcrumbA.href = indexA.href;
|
breadcrumbA.href = indexA.href
|
||||||
}
|
}
|
||||||
if (indexA.href === pathname) {
|
if (indexA.href === pathname) {
|
||||||
return [breadcrumbA];
|
return [breadcrumbA]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indexA.items) {
|
if (indexA.items) {
|
||||||
for (const indexB of indexA.items) {
|
for (const indexB of indexA.items) {
|
||||||
const breadcrumbB: ContentBreadcrumb = {
|
const breadcrumbB: ContentBreadcrumb = {
|
||||||
text: indexB.text,
|
text: indexB.text,
|
||||||
};
|
}
|
||||||
if (typeof indexB.href === 'string') {
|
if (typeof indexB.href === 'string') {
|
||||||
breadcrumbB.href = indexB.href;
|
breadcrumbB.href = indexB.href
|
||||||
}
|
}
|
||||||
if (indexB.href === pathname) {
|
if (indexB.href === pathname) {
|
||||||
return [breadcrumbA, breadcrumbB];
|
return [breadcrumbA, breadcrumbB]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indexB.items) {
|
if (indexB.items) {
|
||||||
for (const indexC of indexB.items) {
|
for (const indexC of indexB.items) {
|
||||||
const breadcrumbC: ContentBreadcrumb = {
|
const breadcrumbC: ContentBreadcrumb = {
|
||||||
text: indexC.text,
|
text: indexC.text,
|
||||||
};
|
}
|
||||||
if (typeof indexC.href === 'string') {
|
if (typeof indexC.href === 'string') {
|
||||||
breadcrumbC.href = indexC.href;
|
breadcrumbC.href = indexC.href
|
||||||
}
|
}
|
||||||
if (indexC.href === pathname) {
|
if (indexC.href === pathname) {
|
||||||
return [breadcrumbA, breadcrumbB, breadcrumbC];
|
return [breadcrumbA, breadcrumbB, breadcrumbC]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,10 +68,10 @@ export function createBreadcrumbs(menu: ContentMenu | undefined, pathname: strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ContentBreadcrumb {
|
interface ContentBreadcrumb {
|
||||||
text: string;
|
text: string
|
||||||
href?: string;
|
href?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { component$, useStyles$ } from '@builder.io/qwik';
|
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||||
import styles from './footer.css?inline';
|
import styles from './footer.css?inline'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer>
|
<footer>
|
||||||
@@ -27,10 +27,14 @@ export default component$(() => {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
<a href="https://www.builder.io/" target="_blank" class="builder">
|
<a
|
||||||
|
href="https://www.builder.io/"
|
||||||
|
target="_blank"
|
||||||
|
class="builder"
|
||||||
|
>
|
||||||
Made with ♡ by Builder.io
|
Made with ♡ by Builder.io
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { component$, useStyles$ } from '@builder.io/qwik';
|
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||||
import { useLocation } from '@builder.io/qwik-city';
|
import { useLocation } from '@builder.io/qwik-city'
|
||||||
import { QwikLogo } from '../icons/qwik';
|
import { QwikLogo } from '../icons/qwik'
|
||||||
import styles from './header.css?inline';
|
import styles from './header.css?inline'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header>
|
<header>
|
||||||
@@ -14,13 +14,19 @@ export default component$(() => {
|
|||||||
<QwikLogo />
|
<QwikLogo />
|
||||||
</a>
|
</a>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="/docs" class={{ active: pathname.startsWith('/docs') }}>
|
<a
|
||||||
|
href="/docs"
|
||||||
|
class={{ active: pathname.startsWith('/docs') }}
|
||||||
|
>
|
||||||
Docs
|
Docs
|
||||||
</a>
|
</a>
|
||||||
<a href="/about-us" class={{ active: pathname.startsWith('/about-us') }}>
|
<a
|
||||||
|
href="/about-us"
|
||||||
|
class={{ active: pathname.startsWith('/about-us') }}
|
||||||
|
>
|
||||||
About Us
|
About Us
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ export const QwikLogo = () => (
|
|||||||
d="M33.3 24.69 15.02 4.75l2.6 15.62-4.66 4.51L31.91 43.7l-1.7-15.62 3.1-3.4Z"
|
d="M33.3 24.69 15.02 4.75l2.6 15.62-4.66 4.51L31.91 43.7l-1.7-15.62 3.1-3.4Z"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
);
|
)
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { component$, useStyles$ } from '@builder.io/qwik';
|
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||||
import { useContent, Link, useLocation } from '@builder.io/qwik-city';
|
import { useContent, Link, useLocation } from '@builder.io/qwik-city'
|
||||||
import styles from './menu.css?inline';
|
import styles from './menu.css?inline'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
const { menu } = useContent();
|
const { menu } = useContent()
|
||||||
const loc = useLocation();
|
const loc = useLocation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside class="menu">
|
<aside class="menu">
|
||||||
@@ -20,7 +20,8 @@ export default component$(() => {
|
|||||||
<Link
|
<Link
|
||||||
href={item.href}
|
href={item.href}
|
||||||
class={{
|
class={{
|
||||||
'is-active': loc.pathname === item.href,
|
'is-active':
|
||||||
|
loc.pathname === item.href,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.text}
|
{item.text}
|
||||||
@@ -32,5 +33,5 @@ export default component$(() => {
|
|||||||
))
|
))
|
||||||
: null}
|
: null}
|
||||||
</aside>
|
</aside>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
import { useContent, useLocation } from '@builder.io/qwik-city';
|
import { useContent, useLocation } from '@builder.io/qwik-city'
|
||||||
import { component$, useStyles$ } from '@builder.io/qwik';
|
import { component$, useStyles$ } from '@builder.io/qwik'
|
||||||
import styles from './on-this-page.css?inline';
|
import styles from './on-this-page.css?inline'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
const { headings } = useContent();
|
const { headings } = useContent()
|
||||||
const contentHeadings = headings?.filter((h) => h.level === 2 || h.level === 3) || [];
|
const contentHeadings =
|
||||||
|
headings?.filter((h) => h.level === 2 || h.level === 3) || []
|
||||||
|
|
||||||
const { pathname } = useLocation();
|
const { pathname } = useLocation()
|
||||||
const editUrl = `#update-your-edit-url-for-${pathname}`;
|
const editUrl = `#update-your-edit-url-for-${pathname}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside class="on-this-page">
|
<aside class="on-this-page">
|
||||||
@@ -58,5 +59,5 @@ export default component$(() => {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
import { component$ } from '@builder.io/qwik';
|
import { component$ } from '@builder.io/qwik'
|
||||||
import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
|
import { useDocumentHead, useLocation } from '@builder.io/qwik-city'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The RouterHead component is placed inside of the document `<head>` element.
|
* The RouterHead component is placed inside of the document `<head>` element.
|
||||||
*/
|
*/
|
||||||
export const RouterHead = component$(() => {
|
export const RouterHead = component$(() => {
|
||||||
const head = useDocumentHead();
|
const head = useDocumentHead()
|
||||||
const loc = useLocation();
|
const loc = useLocation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<title>{head.title}</title>
|
<title>{head.title}</title>
|
||||||
|
|
||||||
<link rel="canonical" href={loc.href} />
|
<link rel="canonical" href={loc.href} />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0"
|
||||||
|
/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
|
|
||||||
{head.meta.map((m) => (
|
{head.meta.map((m) => (
|
||||||
@@ -28,5 +31,5 @@ export const RouterHead = component$(() => {
|
|||||||
<style {...s.props} dangerouslySetInnerHTML={s.style} />
|
<style {...s.props} dangerouslySetInnerHTML={s.style} />
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
* - https://qwik.builder.io/qwikcity/adaptors/cloudflare-pages/
|
* - https://qwik.builder.io/qwikcity/adaptors/cloudflare-pages/
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { createQwikCity } from '@builder.io/qwik-city/middleware/cloudflare-pages';
|
import { createQwikCity } from '@builder.io/qwik-city/middleware/cloudflare-pages'
|
||||||
import qwikCityPlan from '@qwik-city-plan';
|
import qwikCityPlan from '@qwik-city-plan'
|
||||||
import render from './entry.ssr';
|
import render from './entry.ssr'
|
||||||
|
|
||||||
const onRequest = createQwikCity({ render, qwikCityPlan });
|
const onRequest = createQwikCity({ render, qwikCityPlan })
|
||||||
|
|
||||||
export { onRequest };
|
export { onRequest }
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
* - More code is transferred to the browser than in SSR mode.
|
* - More code is transferred to the browser than in SSR mode.
|
||||||
* - Optimizer/Serialization/Deserialization code is not exercised!
|
* - Optimizer/Serialization/Deserialization code is not exercised!
|
||||||
*/
|
*/
|
||||||
import { render, RenderOptions } from '@builder.io/qwik';
|
import { render, RenderOptions } from '@builder.io/qwik'
|
||||||
import Root from './root';
|
import Root from './root'
|
||||||
|
|
||||||
export default function (opts: RenderOptions) {
|
export default function (opts: RenderOptions) {
|
||||||
return render(document, <Root />, opts);
|
return render(document, <Root />, opts)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
* - https://vitejs.dev/config/preview-options.html#preview-options
|
* - https://vitejs.dev/config/preview-options.html#preview-options
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { createQwikCity } from '@builder.io/qwik-city/middleware/node';
|
import { createQwikCity } from '@builder.io/qwik-city/middleware/node'
|
||||||
import render from './entry.ssr';
|
import render from './entry.ssr'
|
||||||
import qwikCityPlan from '@qwik-city-plan';
|
import qwikCityPlan from '@qwik-city-plan'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default export is the QwikCity adaptor used by Vite preview.
|
* The default export is the QwikCity adaptor used by Vite preview.
|
||||||
*/
|
*/
|
||||||
export default createQwikCity({ render, qwikCityPlan });
|
export default createQwikCity({ render, qwikCityPlan })
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
* - npm run build
|
* - npm run build
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
|
import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server'
|
||||||
import { manifest } from '@qwik-client-manifest';
|
import { manifest } from '@qwik-client-manifest'
|
||||||
import Root from './root';
|
import Root from './root'
|
||||||
|
|
||||||
export default function (opts: RenderToStreamOptions) {
|
export default function (opts: RenderToStreamOptions) {
|
||||||
return renderToStream(<Root />, {
|
return renderToStream(<Root />, {
|
||||||
@@ -23,5 +23,5 @@ export default function (opts: RenderToStreamOptions) {
|
|||||||
lang: 'en-us',
|
lang: 'en-us',
|
||||||
...opts.containerAttributes,
|
...opts.containerAttributes,
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
--user-font-scale: 1rem - 16px;
|
--user-font-scale: 1rem - 16px;
|
||||||
--max-width: calc(100% - 1rem);
|
--max-width: calc(100% - 1rem);
|
||||||
|
|
||||||
--font-body: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif,
|
--font-body: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,
|
||||||
Apple Color Emoji, Segoe UI Emoji;
|
Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
|
||||||
--font-mono: 'IBM Plex Mono', Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console',
|
--font-mono: 'IBM Plex Mono', Consolas, 'Andale Mono WT', 'Andale Mono',
|
||||||
'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono',
|
'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono',
|
||||||
'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace;
|
'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', Monaco,
|
||||||
|
'Courier New', Courier, monospace;
|
||||||
|
|
||||||
color-scheme: light;
|
color-scheme: light;
|
||||||
--theme-accent: #006ce9;
|
--theme-accent: #006ce9;
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import { component$ } from '@builder.io/qwik';
|
import { component$ } from '@builder.io/qwik'
|
||||||
import { QwikCityProvider, RouterOutlet, ServiceWorkerRegister } from '@builder.io/qwik-city';
|
import {
|
||||||
import { RouterHead } from './components/router-head/router-head';
|
QwikCityProvider,
|
||||||
|
RouterOutlet,
|
||||||
|
ServiceWorkerRegister,
|
||||||
|
} from '@builder.io/qwik-city'
|
||||||
|
import { RouterHead } from './components/router-head/router-head'
|
||||||
|
|
||||||
import './global.css';
|
import './global.css'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
/*
|
/*
|
||||||
@@ -22,5 +26,5 @@ export default component$(() => {
|
|||||||
<ServiceWorkerRegister />
|
<ServiceWorkerRegister />
|
||||||
</body>
|
</body>
|
||||||
</QwikCityProvider>
|
</QwikCityProvider>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { component$, Slot, useStyles$ } from '@builder.io/qwik';
|
import { component$, Slot, useStyles$ } from '@builder.io/qwik'
|
||||||
import type { DocumentHead } from '@builder.io/qwik-city';
|
import type { DocumentHead } from '@builder.io/qwik-city'
|
||||||
import Menu from '~/components/menu/menu';
|
import Menu from '~/components/menu/menu'
|
||||||
import OnThisPage from '~/components/on-this-page/on-this-page';
|
import OnThisPage from '~/components/on-this-page/on-this-page'
|
||||||
import styles from './docs.css?inline';
|
import styles from './docs.css?inline'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
useStyles$(styles);
|
useStyles$(styles)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="docs">
|
<div class="docs">
|
||||||
@@ -15,11 +15,11 @@ export default component$(() => {
|
|||||||
</article>
|
</article>
|
||||||
<OnThisPage />
|
<OnThisPage />
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|
||||||
export const head: DocumentHead = ({ head }) => {
|
export const head: DocumentHead = ({ head }) => {
|
||||||
return {
|
return {
|
||||||
title: `${head.title} - Documentation`,
|
title: `${head.title} - Documentation`,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { component$, Slot } from '@builder.io/qwik';
|
import { component$, Slot } from '@builder.io/qwik'
|
||||||
import Footer from '~/components/footer/footer';
|
import Footer from '~/components/footer/footer'
|
||||||
import Header from '~/components/header/header';
|
import Header from '~/components/header/header'
|
||||||
|
|
||||||
export default component$(() => {
|
export default component$(() => {
|
||||||
return (
|
return (
|
||||||
@@ -11,5 +11,5 @@ export default component$(() => {
|
|||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</>
|
</>
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
* Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
|
* Qwik uses a service worker to speed up your site and reduce latency, ie, not used in the traditional way of offline.
|
||||||
* You can also use this file to add more functionality that runs in the service worker.
|
* You can also use this file to add more functionality that runs in the service worker.
|
||||||
*/
|
*/
|
||||||
import { setupServiceWorker } from '@builder.io/qwik-city/service-worker';
|
import { setupServiceWorker } from '@builder.io/qwik-city/service-worker'
|
||||||
|
|
||||||
setupServiceWorker();
|
setupServiceWorker()
|
||||||
|
|
||||||
addEventListener('install', () => self.skipWaiting());
|
addEventListener('install', () => self.skipWaiting())
|
||||||
|
|
||||||
addEventListener('activate', () => self.clients.claim());
|
addEventListener('activate', () => self.clients.claim())
|
||||||
|
|
||||||
declare const self: ServiceWorkerGlobalScope;
|
declare const self: ServiceWorkerGlobalScope
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
|
||||||
const defaultTheme = require("tailwindcss/defaultTheme");
|
const defaultTheme = require('tailwindcss/defaultTheme')
|
||||||
const colors = require("tailwindcss/colors");
|
const colors = require('tailwindcss/colors')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
|
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
@@ -17,5 +17,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
darkMode: "class",
|
darkMode: 'class',
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite'
|
||||||
import { qwikVite } from '@builder.io/qwik/optimizer';
|
import { qwikVite } from '@builder.io/qwik/optimizer'
|
||||||
import { qwikCity } from '@builder.io/qwik-city/vite';
|
import { qwikCity } from '@builder.io/qwik-city/vite'
|
||||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
||||||
|
|
||||||
export default defineConfig(() => {
|
export default defineConfig(() => {
|
||||||
return {
|
return {
|
||||||
@@ -11,5 +11,5 @@ export default defineConfig(() => {
|
|||||||
'Cache-Control': 'public, max-age=600',
|
'Cache-Control': 'public, max-age=600',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Esto es el conector a Twilio, Meta, etc...",
|
"description": "Esto es el conector a Twilio, Meta, etc...",
|
||||||
"main": "./lib/mock/index.cjs",
|
"main": "./lib/mock/index.cjs",
|
||||||
"private": true,
|
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
@@ -1,7 +1,25 @@
|
|||||||
const { writeFile, readFileSync } = require('fs')
|
const { writeFile, readFileSync } = require('fs')
|
||||||
const { join } = require('path')
|
const { join } = require('path')
|
||||||
const PATH_PACKAGES = join(__dirname, '..', `packages`)
|
const { exec, spawn } = require('node:child_process')
|
||||||
|
const semver = require('semver')
|
||||||
|
|
||||||
const [PKG_ARG, PKG_ARG_VERSION] = process.argv.slice(2) || [null]
|
const [PKG_ARG, PKG_ARG_VERSION] = process.argv.slice(2) || [null]
|
||||||
|
const PATH_PACKAGES = join(__dirname, '..', `packages`)
|
||||||
|
|
||||||
|
const readPackage = (packageName = null) => {
|
||||||
|
const pkgJson = join(PATH_PACKAGES, packageName, 'package.json')
|
||||||
|
const rawFile = readFileSync(pkgJson, 'utf-8')
|
||||||
|
if (!rawFile) throw new Error(`ERROR_FILE_READ`)
|
||||||
|
|
||||||
|
return JSON.parse(rawFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
const updatePackage = (packageName = null, newPkgJson) => {
|
||||||
|
const pkgJson = join(PATH_PACKAGES, packageName, 'package.json')
|
||||||
|
writeFile(pkgJson, newPkgJson, (err) => {
|
||||||
|
if (err) throw err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actualizar ramdon version de package
|
* Actualizar ramdon version de package
|
||||||
@@ -9,20 +27,30 @@ const [PKG_ARG, PKG_ARG_VERSION] = process.argv.slice(2) || [null]
|
|||||||
*/
|
*/
|
||||||
const updateVersion = (packageName = null, number = null) => {
|
const updateVersion = (packageName = null, number = null) => {
|
||||||
if (!packageName) throw new Error(`PATH_ERROR_PACKAGE: ${packageName}`)
|
if (!packageName) throw new Error(`PATH_ERROR_PACKAGE: ${packageName}`)
|
||||||
const pkgJson = join(PATH_PACKAGES, packageName, 'package.json')
|
|
||||||
const rawFile = readFileSync(pkgJson, 'utf-8')
|
|
||||||
|
|
||||||
if (!rawFile) throw new Error(`ERROR_FILE_READ`)
|
const pkgJsonObject = readPackage(packageName)
|
||||||
let pkgJsonObject = JSON.parse(rawFile)
|
const { version } = pkgJsonObject
|
||||||
const build = !number ? Date.now() : number
|
const newVersion = !number
|
||||||
let [versionNumber] = pkgJsonObject.version.split('-')
|
? semver.inc(version, 'prepatch', 'alpha')
|
||||||
pkgJsonObject.version = !number ? `${versionNumber}-${build}` : `${number}`
|
: `${number}`
|
||||||
pkgJsonObject = JSON.stringify(pkgJsonObject)
|
|
||||||
writeFile(pkgJson, pkgJsonObject, (err) => {
|
if (!semver.valid(newVersion))
|
||||||
if (err) throw err
|
throw new Error(`VERSION_ERROR: ${newVersion}`)
|
||||||
})
|
|
||||||
|
const newPkgJson = JSON.stringify(
|
||||||
|
{ ...pkgJsonObject, version: newVersion },
|
||||||
|
null,
|
||||||
|
2
|
||||||
|
)
|
||||||
|
updatePackage(packageName, newPkgJson)
|
||||||
|
return { version: newVersion }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const publishRelease = async (packageName) => {
|
||||||
|
// const pkgTarName = `builder.io-qwik-${version}.tgz`
|
||||||
|
// await execa('npm', ['pack'], { cwd: distPkgDir })
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recibe los argumentos entrantes
|
* Recibe los argumentos entrantes
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -964,6 +964,7 @@ __metadata:
|
|||||||
cross-env: ^7.0.3
|
cross-env: ^7.0.3
|
||||||
eslint: ^8.26.0
|
eslint: ^8.26.0
|
||||||
eslint-config-prettier: ^8.5.0
|
eslint-config-prettier: ^8.5.0
|
||||||
|
execa: ^6.1.0
|
||||||
fs-extra: ^11.1.0
|
fs-extra: ^11.1.0
|
||||||
git-cz: ^4.9.0
|
git-cz: ^4.9.0
|
||||||
husky: ^8.0.2
|
husky: ^8.0.2
|
||||||
@@ -975,6 +976,7 @@ __metadata:
|
|||||||
rollup: ^3.2.3
|
rollup: ^3.2.3
|
||||||
rollup-plugin-cleanup: ^3.2.1
|
rollup-plugin-cleanup: ^3.2.1
|
||||||
rollup-plugin-copy: ^3.4.0
|
rollup-plugin-copy: ^3.4.0
|
||||||
|
semver: ^7.3.8
|
||||||
standard-version: ^9.5.0
|
standard-version: ^9.5.0
|
||||||
uvu: ^0.5.6
|
uvu: ^0.5.6
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
@@ -7637,7 +7639,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7":
|
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8":
|
||||||
version: 7.3.8
|
version: 7.3.8
|
||||||
resolution: "semver@npm:7.3.8"
|
resolution: "semver@npm:7.3.8"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user