-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 8e553cf
Showing
89 changed files
with
15,971 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,43 @@ | ||
name: CI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm lint |
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,40 @@ | ||
name: Prerelease | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+-*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Build & Prerelease | ||
run: GH_TOKEN=${{ secrets.github_token }} pnpm build --prerelease |
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,40 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Build & Release | ||
run: GH_TOKEN=${{ secrets.github_token }} pnpm build --release |
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 @@ | ||
# Nuxt dev/build outputs | ||
.output | ||
.data | ||
.nuxt | ||
.nitro | ||
.cache | ||
dist | ||
|
||
# Node dependencies | ||
node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Misc | ||
.DS_Store | ||
.fleet | ||
.idea | ||
|
||
# Local env files | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
.husky | ||
app.db | ||
/artifacts |
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 @@ | ||
node-linker=hoisted | ||
public-hoist-pattern=* | ||
shamefully-hoist=true |
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,57 @@ | ||
{ | ||
// Enable the ESlint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
// Disable the default formatter, use eslint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
// Auto fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
// Silent the stylistic rules in you IDE, but still auto fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off" }, | ||
{ "rule": "format/*", "severity": "off" }, | ||
{ "rule": "*-indent", "severity": "off" }, | ||
{ "rule": "*-spacing", "severity": "off" }, | ||
{ "rule": "*-spaces", "severity": "off" }, | ||
{ "rule": "*-order", "severity": "off" }, | ||
{ "rule": "*-dangle", "severity": "off" }, | ||
{ "rule": "*-newline", "severity": "off" }, | ||
{ "rule": "*quotes", "severity": "off" }, | ||
{ "rule": "*semi", "severity": "off" } | ||
], | ||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml", | ||
"toml" | ||
], | ||
// @nuxt/ui related intellisense config | ||
"files.associations": { | ||
"*.css": "tailwindcss" | ||
}, | ||
"editor.quickSuggestions": { | ||
"strings": true | ||
}, | ||
"tailwindCSS.experimental.configFile": "tailwind.config.ts", | ||
"tailwindCSS.experimental.classRegex": [ | ||
["ui:\\s*{([^)]*)\\s*}", "[\"'`]([^\"'`]*).*?[\"'`]"], | ||
["/\\*ui\\*/\\s*{([^;]*)}", ":\\s*[\"'`]([^\"'`]*).*?[\"'`]"] | ||
], | ||
"tailwindCSS.classAttributes": [ | ||
"class", | ||
"className", | ||
"ngClass", | ||
"ui" | ||
] | ||
} |
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,10 @@ | ||
export default defineAppConfig({ | ||
ui: { | ||
primary: 'teal', | ||
gray: 'zinc', | ||
notifications: { | ||
// Show toasts at the top right of the screen | ||
position: 'top-0 bottom-auto', | ||
}, | ||
}, | ||
}) |
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,43 @@ | ||
<script setup lang="ts"> | ||
const mobileSidebarVisible = useState('mobile-sidebar-visible', () => false) | ||
const activeView = useActiveView() | ||
</script> | ||
|
||
<template> | ||
<div class="w-screen h-dvh flex flex-col overflow-hidden"> | ||
<Sidebar /> | ||
|
||
<!-- sidebar overlay --> | ||
<div | ||
v-if="mobileSidebarVisible" | ||
class="z-[9] w-screen h-dvh fixed inset-0 md:hidden" | ||
@click="mobileSidebarVisible = false" | ||
/> | ||
|
||
<div | ||
class="flex-1 flex flex-col transition-all duration-300 ml-0 md:ml-64 lg:ml-72 bg-gray-100 dark:bg-gray-900" | ||
:class="mobileSidebarVisible ? 'scale-95' : ''" | ||
> | ||
<!-- small screen topbar --> | ||
<div class="w-full flex md:hidden px-4 py-2 items-center justify-between border-b border-gray-200/50 dark:border-gray-800/50"> | ||
<UButton | ||
square | ||
variant="link" | ||
color="gray" | ||
size="xl" | ||
:padded="false" | ||
icon="i-heroicons-bars-3" | ||
class="-ml-0.5" | ||
@click="mobileSidebarVisible = true" | ||
/> | ||
</div> | ||
<!-- main content --> | ||
<div class="w-full h-full flex-1 flex-col" :class="activeView === 'terminal' ? 'flex' : 'hidden'"> | ||
<TerminalView /> | ||
</div> | ||
</div> | ||
|
||
<UNotifications /> | ||
<ConfirmationDialog /> | ||
</div> | ||
</template> |
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,44 @@ | ||
import { execSync } from 'node:child_process' | ||
import { cpSync } from 'node:fs' | ||
|
||
const web = process.argv.includes('--web') | ||
const release = process.argv.includes('--release') | ||
const prerelease = process.argv.includes('--prerelease') | ||
if (release && prerelease) { | ||
console.error('Cannot have both --release and --prerelease') | ||
process.exit(1) | ||
} | ||
|
||
function run(cmd) { | ||
try { | ||
execSync(cmd, { stdio: 'inherit' }) | ||
} | ||
catch (error) { | ||
console.error(error) | ||
process.exit(1) | ||
} | ||
} | ||
|
||
if (!web) { | ||
// Install app dependencies for Electron Builder | ||
run('electron-builder install-app-deps') | ||
} | ||
|
||
// Run Nuxt.js build | ||
run('nuxt build') | ||
|
||
// Copy migrations to output directory | ||
const migrationsPath = 'db/migrations' | ||
const outputMigrationsPath = '.output/server/db/migrations' | ||
try { | ||
cpSync(migrationsPath, outputMigrationsPath, { recursive: true }) | ||
} | ||
catch (error) { | ||
console.error(error) | ||
process.exit(1) | ||
} | ||
|
||
if (!web) { | ||
// Package (and Publish) | ||
run(`${prerelease ? 'EP_PRE_RELEASE=true ' : ''}electron-builder${release || prerelease ? ' --publish always' : ''}`) | ||
} |
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.
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.
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.
Binary file not shown.
Binary file not shown.
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,10 @@ | ||
import type { UserConfig } from '@commitlint/types' | ||
|
||
const Configuration: UserConfig = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'chore', 'style', 'refactor', 'ci', 'test', 'revert', 'perf', 'build']], | ||
}, | ||
} | ||
|
||
module.exports = Configuration |
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,50 @@ | ||
<script setup lang="ts"> | ||
import { UButton } from '#components' | ||
type ButtonProps = InstanceType<typeof UButton>['$props'] | ||
const props = defineProps<{ | ||
// https://ui.nuxt.com/elements/button#props | ||
ui?: ButtonProps['ui'] | ||
size?: ButtonProps['size'] | ||
type?: ButtonProps['type'] | ||
color?: ButtonProps['color'] | ||
variant?: ButtonProps['variant'] | ||
// icon?: ButtonProps['icon'] // Omitted | ||
label?: ButtonProps['label'] | ||
loadingIcon?: ButtonProps['loadingIcon'] | ||
leadingIcon?: ButtonProps['leadingIcon'] | ||
trailingIcon?: ButtonProps['trailingIcon'] | ||
disabled?: ButtonProps['disabled'] | ||
truncate?: ButtonProps['truncate'] | ||
block?: ButtonProps['block'] | ||
square?: ButtonProps['square'] | ||
loading?: ButtonProps['loading'] | ||
padded?: ButtonProps['padded'] | ||
trailing?: ButtonProps['trailing'] | ||
leading?: ButtonProps['leading'] | ||
// Additional | ||
class?: ButtonProps['class'] | ||
}>() | ||
const colorMode = useColorMode() | ||
const isDark = computed({ | ||
get: () => colorMode.value === 'dark', | ||
set: () => | ||
(colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'), | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ClientOnly> | ||
<UButton | ||
v-bind="{ ...props }" | ||
aria-label="Theme" | ||
:icon="isDark ? 'i-heroicons-moon' : 'i-heroicons-sun'" | ||
@click="isDark = !isDark" | ||
/> | ||
|
||
<template #fallback> | ||
<div class="w-8 h-8" /> | ||
</template> | ||
</ClientOnly> | ||
</template> |
Oops, something went wrong.