Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bineenasc committed Dec 18, 2024
0 parents commit 0a1cd9a
Show file tree
Hide file tree
Showing 57 changed files with 10,714 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .aeria-ui/aeria-ui.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// WARNING: this file will be overriden
declare module 'aeria-ui' {
export * from 'aeria-ui/dist'

type SystemStores = typeof import('@aeria-ui/core/stores')
type UserStores = typeof import('../src/stores')

type Stores = {
[P in keyof (SystemStores & UserStores)]: ReturnType<(SystemStores & UserStores)[P]>
}

export const useStore: <TStoreId extends keyof Stores | keyof Collections>(
storeId: TStoreId,
manager?: import('@aeria-ui/state-management').GlobalStateManager
) => TStoreId extends keyof Stores
? Stores[TStoreId]
: TStoreId extends keyof Collections
? 'item' extends keyof Collections[TStoreId]
? Collections[TStoreId]['item'] extends infer Item
? Item extends { _id: any }
? import('aeria-ui').CollectionStore<Item>
: never
: never
: never
: never
}

declare module '@vue/runtime-core' {
import type { TemplateFunctions } from '@aeria-ui/core'

interface ComponentCustomProperties {
formatDateTime: TemplateFunctions['formatDateTime']
getRelativeTimeFromNow: TemplateFunctions['getRelativeTimeFromNow']
hasRoles: TemplateFunctions['hasRoles']
t: TemplateFunctions['t']
viewTitle: string
viewIcon: string
instanceVars: typeof import('@aeria-ui/cli').InstanceConfig['site']
currentUser: Collections['user']['item']
t: typeof import('@aeria-ui/i18n').t
}
}

import type { RouteRecordRaw } from 'vue-router'
import type { Icon } from '@aeriajs/types'

declare global {
const definePage: (page: Partial<RouteRecordRaw> & {
meta: Record<string, unknown> & {
title: string
icon?: Icon
collection?: string
}
}) => void
}

export {}
//
33 changes: 33 additions & 0 deletions .aeria/aeria.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// this file will be overwritten
import type {} from '@aeriajs/types'

declare global {
type UnpackCollections<TCollections> = {
[P in keyof TCollections]: TCollections[P] extends infer Candidate
? Candidate extends (...args: unknown[]) => infer Coll
? Coll
: Candidate
: never
}

type Collections = typeof import('../src/index.ts') extends infer EntrypointModule
? 'collections' extends keyof EntrypointModule
? UnpackCollections<EntrypointModule['collections']>
: 'default' extends keyof EntrypointModule
? EntrypointModule['default'] extends infer Entrypoint
? 'options' extends keyof Entrypoint
? 'collections' extends keyof Entrypoint['options']
? UnpackCollections<Entrypoint['options']['collections']>
: never
: never
: never
: never
: never
}

declare module 'aeria' {
import type { Context } from 'aeria'
export const createAeria: () => Promise<Context>
export const aeria: Context
}
//
2 changes: 2 additions & 0 deletions .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- '@commitlint/config-conventional'
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ignore husky hooks
.husky/* linguist-vendored

# ignore scripts
scripts/*.js linguist-vendored

26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Continuos Integration

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Build packages
run: |
(cd api; npm run build)
(cd api; npm run build:icons)
(cd web; npm run build:ci)
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
production.env
dist
node_modules
**/.aeria/out

4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

npx --no -- commitlint --edit ${1}

4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

npm run --workspaces lint:fix

4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

npm run --workspaces lint

27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Quickstart

This is an Aeria project bootstrapped with [`create-aeria-app`]().
It uses the `npm` package manager, which you may change in the future. You may also replace this README.md file with your own at anytime.

To get documentation, visit [https://aeria.land/](https://aeria.land/).

## Installation

```sh
$ npm install
```

## Running

```sh
$ npm run dev
```

You may sign in into your application visiting `http://localhost:8080/user/signin`.


## Support

- [Official website](https://aeria.land/)
- [Discord community]() (get live support almost 24/7)

Loading

0 comments on commit 0a1cd9a

Please sign in to comment.