Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,40 @@ on:
- main

jobs:
lint:
name: Code Quality
qa:
name: Code Quality Node ${{ matrix.node }}
runs-on: [self-hosted, Linux]
strategy:
fail-fast: false
matrix:
node: [20, 22, 24]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci

- name: Lint source files
run: npm run lint

- name: Run Prettier
run: npm run prettier

- name: Lint source files
run: npm run lint

- name: Check types
run: npm run typecheck

- name: Run tests
run: npm run test:coverage

- name: Build package
run: npm run build

- name: Run tests with coverage
run: npm run test:coverage

- name: 'Report Coverage'
if: always()
if: matrix.node == 22 && always()
uses: davelosert/vitest-coverage-report-action@v2
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

8 changes: 4 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'vitepress';
import { head } from './config/en/head';
import { nav } from './config/en/nav';
import { sidebar } from './config/en/sidebar';
import { markdown } from './config/markdown';
import { head } from './config/en/head.js';
import { nav } from './config/en/nav.js';
import { sidebar } from './config/en/sidebar.js';
import { markdown } from './config/markdown.js';

export default defineConfig({
title: 'CDN Client',
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config/en/nav.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultTheme } from 'vitepress/theme';
import type { DefaultTheme } from 'vitepress/theme';
import { version } from '../../../../package.json';

export const nav = (): DefaultTheme.NavItem[] => [
Expand Down
171 changes: 148 additions & 23 deletions docs/.vitepress/theme/components/FooterLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,43 @@
<div class="footer-links__nav">
<div class="footer-links__col">
<div class="footer-links__col-header">
<a href="https://localazy.com" target="_blank" class="logo-link">
<img src="/theme/localazy-logo-white.svg" alt="Localazy" width="150" />
<a
href="https://localazy.com"
target="_blank"
class="logo-link"
>
<img
src="/theme/localazy-logo-white.svg"
alt="Localazy"
width="150"
/>
</a>
</div>
<ul>
<li><a href="https://localazy.com" target="_blank">Why Localazy?</a></li>
<li><a href="https://localazy.com/book-demo" target="_blank">Book a demo</a></li>
<li><a href="https://localazy.com/my/dashboard" target="_blank">Go to your Dashboard</a></li>
<li>
<a
href="https://localazy.com"
target="_blank"
>
Why Localazy?
</a>
</li>
<li>
<a
href="https://localazy.com/book-demo"
target="_blank"
>
Book a demo
</a>
</li>
<li>
<a
href="https://localazy.com/my/dashboard"
target="_blank"
>
Go to your Dashboard
</a>
</li>
</ul>
</div>

Expand All @@ -22,8 +51,22 @@
<strong>Resources</strong>
</div>
<ul>
<li><a href="https://localazy.com/docs/cdn/cdn-introduction" target="_blank">CDN documentation</a></li>
<li><a href="https://localazy.com/tags/cdn" target="_blank">CDN blog posts</a></li>
<li>
<a
href="https://localazy.com/docs/cdn/cdn-introduction"
target="_blank"
>
CDN documentation
</a>
</li>
<li>
<a
href="https://localazy.com/tags/cdn"
target="_blank"
>
CDN blog posts
</a>
</li>
</ul>
</div>

Expand All @@ -32,10 +75,38 @@
<strong>Support</strong>
</div>
<ul>
<li><a href="https://localazy.com" target="_blank">Intercom chat</a></li>
<li><a href="https://github.com/localazy/cdn-client/issues" target="_blank">GitHub issues</a></li>
<li><a href="https://discuss.localazy.com" target="_blank">Discussion forum</a></li>
<li><a href="mailto:[email protected]" target="_blank">[email protected]</a></li>
<li>
<a
href="https://localazy.com"
target="_blank"
>
Intercom chat
</a>
</li>
<li>
<a
href="https://github.com/localazy/cdn-client/issues"
target="_blank"
>
GitHub issues
</a>
</li>
<li>
<a
href="https://discuss.localazy.com"
target="_blank"
>
Discussion forum
</a>
</li>
<li>
<a
href="mailto:[email protected]"
target="_blank"
>
[email protected]
</a>
</li>
</ul>
</div>

Expand All @@ -44,18 +115,43 @@
<strong>NPM packages</strong>
</div>
<ul>
<li><a href="https://www.npmjs.com/package/@localazy/cli" target="_blank">@localazy/cli</a></li>
<li>
<a href="https://www.npmjs.com/package/@localazy/api-client" target="_blank">@localazy/api-client</a>
<a
href="https://www.npmjs.com/package/@localazy/cli"
target="_blank"
>
@localazy/cli
</a>
</li>
<li>
<a
href="https://www.npmjs.com/package/@localazy/api-client"
target="_blank"
>
@localazy/api-client
</a>
</li>
<li><a href="https://www.npmjs.com/package/@localazy/languages" target="_blank">@localazy/languages</a></li>
<li>
<a href="https://www.npmjs.com/package/@localazy/strapi-plugin" target="_blank">
<a
href="https://www.npmjs.com/package/@localazy/languages"
target="_blank"
>
@localazy/languages
</a>
</li>
<li>
<a
href="https://www.npmjs.com/package/@localazy/strapi-plugin"
target="_blank"
>
@localazy/strapi-plugin
</a>
</li>
<li>
<a href="https://www.npmjs.com/package/@localazy/directus-extension-localazy" target="_blank">
<a
href="https://www.npmjs.com/package/@localazy/directus-extension-localazy"
target="_blank"
>
@localazy/directus-extension-localazy
</a>
</li>
Expand All @@ -64,29 +160,58 @@
</div>

<div class="footer-links__social">
<a href="https://localazy.com/feed.xml" target="_blank" class="social-link">
<a
href="https://localazy.com/feed.xml"
target="_blank"
class="social-link"
>
<span class="vpi-social-rss" />
</a>
<a href="https://www.facebook.com/localazy/" target="_blank" class="social-link">
<a
href="https://www.facebook.com/localazy/"
target="_blank"
class="social-link"
>
<span class="vpi-social-facebook" />
</a>
<a href="https://github.com/localazy" target="_blank" class="social-link">
<a
href="https://github.com/localazy"
target="_blank"
class="social-link"
>
<span class="vpi-social-github" />
</a>
<a href="https://twitter.com/localazy" target="_blank" class="social-link">
<a
href="https://twitter.com/localazy"
target="_blank"
class="social-link"
>
<span class="vpi-social-twitter" />
</a>
<a href="https://www.linkedin.com/company/37836599/" target="_blank" class="social-link">
<a
href="https://www.linkedin.com/company/37836599/"
target="_blank"
class="social-link"
>
<span class="vpi-social-linkedin" />
</a>
<a href="https://discuss.localazy.com/" target="_blank" class="social-link">
<a
href="https://discuss.localazy.com/"
target="_blank"
class="social-link"
>
<span class="vpi-social-discuss" />
</a>
</div>

<div class="footer-links__licence">
© {{ new Date().getFullYear() }} Localazy. Released under the
<a href="https://github.com/localazy/cdn-client/blob/main/LICENSE" target="_blank">MIT license</a>
<a
href="https://github.com/localazy/cdn-client/blob/main/LICENSE"
target="_blank"
>
MIT license
</a>
.
</div>
</div>
Expand Down
25 changes: 20 additions & 5 deletions docs/.vitepress/theme/components/LocSandpack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
SandpackProvider,
type SandpackFiles,
} from 'sandpack-vue3';
import { getCustomSetupFromProps, getSandpackFiles, getSandpackOptions, sandboxProps } from 'vitepress-plugin-sandpack';
import {
getCustomSetupFromProps,
getSandpackFiles,
getSandpackOptions,
sandboxProps,
} from 'vitepress-plugin-sandpack';
import { computed, nextTick, onBeforeMount, onMounted, ref, useSlots, watch } from 'vue';
import { githubDark, githubLight } from './github-themes';

Expand Down Expand Up @@ -65,8 +70,12 @@ const previewHeight = computed(() =>
const previewHeightStyle = computed(() =>
previewHeight.value ? `${previewHeight.value}px` : 'var(--sp-layout-height)',
);
const coderHeight = computed(() => (isNaN(Number(getOpt('coderHeight'))) ? undefined : Number(getOpt('coderHeight'))));
const coderHeightStyle = computed(() => (coderHeight.value ? `${coderHeight.value}px` : 'var(--sp-layout-height)'));
const coderHeight = computed(() =>
isNaN(Number(getOpt('coderHeight'))) ? undefined : Number(getOpt('coderHeight')),
);
const coderHeightStyle = computed(() =>
coderHeight.value ? `${coderHeight.value}px` : 'var(--sp-layout-height)',
);

/* options */

Expand All @@ -88,11 +97,17 @@ const customSetup = computed(() => {
:custom-setup="customSetup"
>
<SandpackLayout>
<SandpackCodeEditor showLineNumbers initMode="user-visible" />
<SandpackCodeEditor
showLineNumbers
initMode="user-visible"
/>
</SandpackLayout>
<br />
<SandpackLayout>
<SandpackPreview showNavigator :showRestartButton="false" />
<SandpackPreview
showNavigator
:showRestartButton="false"
/>
</SandpackLayout>
</SandpackProvider>
</template>
Expand Down
6 changes: 5 additions & 1 deletion docs/.vitepress/theme/components/LocZoomImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ onMounted(() => {
</script>

<template>
<img ref="imgRef" :src="withBase(src)" :alt="alt" />
<img
ref="imgRef"
:src="withBase(src)"
:alt="alt"
/>
</template>

<style>
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EnhanceAppContext } from 'vitepress';
import type { EnhanceAppContext } from 'vitepress';
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client';
import DefaultTheme from 'vitepress/theme';
import { default as DefaultTheme } from 'vitepress/theme';
import { h } from 'vue';
import FooterLinks from './components/FooterLinks.vue';
import LocSandbox from './components/LocSandbox.vue';
Expand Down
9 changes: 5 additions & 4 deletions docs/.vitepress/theme/vitepress-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@
/* Override: Typography */

--vp-font-family-base:
Roboto, 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
'Segoe UI', 'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
Roboto, 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif, system-ui, -apple-system,
BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--vp-font-family-mono:
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono',
'Courier New', monospace;

/* Override: Home */

Expand Down
Loading