-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c2ef96
commit 390be6e
Showing
236 changed files
with
23,428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tests/fixtures/file-types-metafile/file15-js/ | ||
tests/fixtures/file-types-metafile/file14-ts/ | ||
docs/code-examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'airbnb-base', | ||
'airbnb-typescript/base', | ||
], | ||
parserOptions: { | ||
project: ['tsconfig.json', 'tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint', | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'import/extensions': 'off', | ||
'import/prefer-default-export': 'off', | ||
'max-len': ['error', { code: 120 }], | ||
'prefer-destructuring': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy-docs: | ||
name: Deploy Docs | ||
runs-on: [ self-hosted, Linux ] | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build Docs | ||
run: | | ||
cd docs | ||
npm ci | ||
npm run build | ||
- name: Update Docs Branch | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: docs/.vitepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: QA checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
push: | ||
branches: | ||
- docs | ||
|
||
jobs: | ||
lint: | ||
name: Lint, Typecheck, Test and Build source files | ||
runs-on: [ self-hosted, Linux ] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- 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: 'Report Coverage' | ||
if: always() | ||
uses: davelosert/vitest-coverage-report-action@v2 | ||
|
||
- name: Get coverage percentage and branch | ||
id: coverage | ||
run: | | ||
PERCENT=$(node -p "require('./coverage/coverage-summary.json').total.lines.pct") | ||
echo "percent=$PERCENT" >> "$GITHUB_OUTPUT" | ||
BRANCH=${GITHUB_REF#refs/heads/} | ||
echo "branch=$BRANCH" >> "${GITHUB_OUTPUT}" | ||
echo "x-$PERCENT" | ||
echo "x-$BRANCH" | ||
shell: bash | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: gh-badges | ||
|
||
- name: Create badges directory | ||
run: mkdir -p "${{ steps.coverage.outputs.branch }}" | ||
shell: bash | ||
|
||
- name: Generate badge | ||
uses: emibcn/badge-action@v2.0.2 | ||
with: | ||
label: coverage | ||
status: ${{ steps.coverage.outputs.percent }} | ||
color: 44cc11 | ||
path: ${{ steps.coverage.outputs.branch }}/coverage.svg | ||
|
||
- env: { CONTENT: "${{ toJson(github) }}" } | ||
run : "echo $CONTENT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
ci: | ||
name: CI Init | ||
runs-on: [ self-hosted, Linux ] | ||
outputs: | ||
action: ${{ steps.init.outputs.action }} | ||
steps: | ||
- id: init | ||
uses: localazy/release/init@v2 | ||
|
||
prepare: | ||
name: Prepare Release PR | ||
needs: ci | ||
if: needs.ci.outputs.action == 'prepare' | ||
runs-on: [ self-hosted, Linux ] | ||
steps: | ||
- uses: localazy/release/prepare@v2 | ||
with: | ||
node-version: 20 | ||
app-id: ${{ secrets.AUTH_APP_ID }} | ||
app-key: ${{ secrets.AUTH_APP_KEY }} | ||
|
||
publish: | ||
name: Publish Release | ||
needs: ci | ||
if: needs.ci.outputs.action == 'publish' | ||
runs-on: [ self-hosted, Linux ] | ||
steps: | ||
- uses: localazy/release/publish@v2 | ||
with: | ||
node-version: 20 | ||
app-id: ${{ secrets.AUTH_APP_ID }} | ||
app-key: ${{ secrets.AUTH_APP_KEY }} | ||
npm-publish: public | ||
npm-token: ${{ secrets.NPM_AUTH_TOKEN_PUBLIC }} | ||
|
||
deploy-docs: | ||
name: Deploy Docs | ||
needs: publish | ||
runs-on: [ self-hosted, Linux ] | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build Docs | ||
run: | | ||
cd docs | ||
npm ci | ||
npm run docs:build | ||
- name: Update Docs Branch | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: docs/.vuepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fund=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Localazy | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div align="center"> | ||
|
||
[<img src="https://localazy.com/directus9/assets/9fc36b9c-81b7-4dbf-bd82-b64cd984090f" width="285" height="50" alt="Localazy" >](https://localazy.com) | ||
|
||
### 📦 `@localazy/cdn-client` | ||
|
||
Node.js module that allows you to easily interact with the [Localazy CDN](https://localazy.com/docs/cdn/cdn-introduction). | ||
|
||
[**Documentation**](https://localazy.github.io/cdn-client/) | | ||
[**Getting Started**](https://localazy.github.io/cdn-client/get-started/introduction.html) | | ||
[**API Reference**](https://localazy.github.io/cdn-client/reference/client-api.html) | | ||
[**Live Demo**]() | ||
|
||
</div> | ||
|
||
## 🔧 Install | ||
|
||
```bash | ||
npm install @localazy/cdn-client | ||
# or use your favorite package manager | ||
``` | ||
|
||
For more information, visit the [installation guide](https://localazy.com/docs/cdn/cdn-introduction). | ||
|
||
## 🛟 Support | ||
|
||
- [Intercom chat](https://localazy.com) | ||
- [GitHub issues](https://github.com/localazy/cdn-client/issues) | ||
- [Discussion forum](https://discuss.localazy.com/) | ||
- [team@localazy.com](mailto:team@localazy.com) | ||
|
||
## 💙 Localazy Ecosystem | ||
|
||
Check out other npm packages from Localazy: | ||
|
||
- [@localazy/cli](https://www.npmjs.com/package/@localazy/cli) | ||
- [@localazy/api-client](https://www.npmjs.com/package/@localazy/api-client) | ||
- [@localazy/cdn-client](https://www.npmjs.com/package/@localazy/cdn-client) | ||
- [@localazy/languages](https://www.npmjs.com/package/@localazy/languages) | ||
- [@localazy/strapi-plugin](https://www.npmjs.com/package/@localazy/strapi-plugin) | ||
|
||
Discover all available [integration options and localization examples](https://github.com/localazy). | ||
|
||
## 📜 License | ||
|
||
Code released under the [MIT license](LICENSE). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
.vitepress/cache |
Oops, something went wrong.