Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Aug 8, 2023
1 parent f86dcbc commit 2404114
Show file tree
Hide file tree
Showing 70 changed files with 131 additions and 2,172 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

92 changes: 75 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,30 @@ on:
branches:
- main
push:
tags:
- v*
branches:
- main

jobs:
verify:
name: Verify
install:
name: Install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
fetch-depth: 0
node-version: 18
cache: 'yarn'

- name: Install Packages
run: yarn install --immutable

lint:
name: Lint
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
Expand All @@ -27,8 +38,23 @@ jobs:
- name: Install Packages
run: yarn install --immutable

- name: Linting
run: yarn run lint
- name: Lint
run: yarn lint

test:
name: Test
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Packages
run: yarn install --immutable

- name: Coverage
run: yarn run test:coverage
Expand All @@ -38,15 +64,47 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: yarn dlx zx-bulk-release
build:
name: Build
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Packages
run: yarn install --immutable

- name: Build
run: yarn run build

- uses: actions/upload-artifact@v2
with:
name: build
path: dist

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [lint, test, build]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- uses: actions/download-artifact@v3
with:
name: build
path: dist

- name: Deploy
run: yarn dlx semantic-release
env:
GH_USER: 'cozybot'
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_EMAIL: 'bot@rains.cafe'
GIT_COMMITTER_EMAIL: 'bot@rains.cafe'
GIT_AUTHOR_NAME: 'Cozy Bot'
GIT_COMMITTER_NAME: 'Cozy Bot'
YARN_ENABLE_IMMUTABLE_INSTALLS: true
File renamed without changes.
3 changes: 0 additions & 3 deletions .releaserc.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
branches:
- main
550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

Empty file removed .yarn/versions/024e7298.yml
Empty file.
Empty file removed .yarn/versions/0250e0bc.yml
Empty file.
Empty file removed .yarn/versions/0eb6976d.yml
Empty file.
Empty file removed .yarn/versions/0ec6211f.yml
Empty file.
Empty file removed .yarn/versions/11dc008f.yml
Empty file.
Empty file removed .yarn/versions/24c08d65.yml
Empty file.
Empty file removed .yarn/versions/3e63900c.yml
Empty file.
2 changes: 0 additions & 2 deletions .yarn/versions/426700dc.yml

This file was deleted.

Empty file removed .yarn/versions/4946c293.yml
Empty file.
Empty file removed .yarn/versions/57c2df48.yml
Empty file.
Empty file removed .yarn/versions/58f33b5e.yml
Empty file.
Empty file removed .yarn/versions/5c70acf7.yml
Empty file.
Empty file removed .yarn/versions/5e12f54f.yml
Empty file.
2 changes: 0 additions & 2 deletions .yarn/versions/6045959d.yml

This file was deleted.

Empty file removed .yarn/versions/682ee843.yml
Empty file.
Empty file removed .yarn/versions/7c060494.yml
Empty file.
Empty file removed .yarn/versions/92b33299.yml
Empty file.
Empty file removed .yarn/versions/9d313b56.yml
Empty file.
Empty file removed .yarn/versions/9eeb785c.yml
Empty file.
Empty file removed .yarn/versions/adf03e4c.yml
Empty file.
Empty file removed .yarn/versions/b00da880.yml
Empty file.
Empty file removed .yarn/versions/bbf94530.yml
Empty file.
Empty file removed .yarn/versions/d9f6ad69.yml
Empty file.
Empty file removed .yarn/versions/e0e3b214.yml
Empty file.
Empty file removed .yarn/versions/e102a87b.yml
Empty file.
Empty file removed .yarn/versions/e875d8c6.yml
Empty file.
Empty file removed .yarn/versions/ea3f218c.yml
Empty file.
Empty file removed .yarn/versions/fa2a8eb4.yml
Empty file.
8 changes: 0 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
initScope: flarie

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: '@yarnpkg/plugin-version'
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'

yarnPath: .yarn/releases/yarn-3.6.1.cjs
65 changes: 2 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
<div align="center"><b>NOTE: THIS REPOSITORY IS A WIP AND AS SUCH THE APIS ARE</b></div>
<div align="center"><b>MORE THEN LIKELY GOING TO CHANGE DRASTICALLY</b></div>

<h2 align="center">
<div>
<a href="https://github.com/rain-cafe/flarie">
<img height="240px" src="https://raw.githubusercontent.com/rain-cafe/logos/main/flarie/logo.svg?sanitize=true">
<br>
<br>
<img height="100px" src="https://raw.githubusercontent.com/rain-cafe/logos/main/flarie/flarie.svg?sanitize=true">
</a>
</div>
</h2>

<h3 align="center">
A universal bot framework!~ :heart:
</h3>

<p align="center">
<strong>
<!-- <a href="https://flarie.github.io">API</a> -->
<!-- • -->
<a href="https://rain-cafe.gitbook.io/flarie/">Docs</a>
<!-- • -->
<!-- <a href="https://salte-auth-demo.glitch.me">Demo</a> -->
</strong>
</p>

<div align="center">
### @rain-cafe/logger

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
Expand All @@ -35,40 +7,7 @@
[![Coveralls][coveralls-image]][coveralls-url]
[![zx-bulk-release][zx-bulk-release-image]][zx-bulk-release-url]

</div>

#### Supported Platforms

- Campfire _(local testing harness)_
- [Discord](packages/discord)

## Install

```sh
# Install the Flarie Core
$ npm install @flarie/core
# Install any Platforms you need
$ npm install @flarie/discord
```

## Usage

```ts
import { Flarie, CampfirePlatform } from '@flarie/core';
import { DiscordPlatform } from '@flarie/discord';

const flarie = new Flarie({
platform: new DiscordPlatform({
token: '<your-discord-bot-token-here>'
});,
});
```

## Known Issues

_These are issues that we know about, but don't have a clear fix for!_

**There are currently no known issues, thanks for checking!**
A simple logger for all Rainbow Cafe Apps & Libraries

[npm-version-image]: https://img.shields.io/npm/v/@flarie/core.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/@flarie/core.svg?style=flat
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const jestConfig: JestConfigWithTsJest = {
...tsjPreset.transform,
},

collectCoverageFrom: ['<rootDir>/packages/**/*'],
collectCoverageFrom: ['<rootDir>/src/**/*'],

/*
* What is going on with jest where this is necessary to have the collectCoverageFrom config?
Expand Down
45 changes: 29 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
{
"name": "flarie",
"name": "@rain-cafe/logger",
"version": "1.0.0",
"packageManager": "yarn@3.6.1",
"private": true,
"workspaces": [
"packages/*"
],
"source": "src/index.ts",
"type": "module",
"exports": {
".": {
"require": "./dist/index.cjs",
"default": "./dist/index.modern.js"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.module.js",
"unpkg": "./dist/index.umd.js",
"types": "dist/index.d.ts",
"scripts": {
"start": "yarn workspace @flarie/demo run start",
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint 'packages/**/*.ts'",
"build": "yarn workspaces foreach run build",
"v:patch": "yarn workspaces foreach -p --no-private version patch",
"v:minor": "yarn workspaces foreach -p --no-private version minor",
"v:major": "yarn workspaces foreach -p --no-private version major",
"publish": "yarn zx-bulk-release --dry-run"
"build": "microbundle"
},
"dependencies": {
"chalk": "^3"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@types/jest": "^29.5.3",
"@types/node": "^18",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"chance": "^1.1.11",
"eslint": "^8.45.0",
"jest": "^29.6.1",
"microbundle": "^0.15.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0"
},
"dependencies": {
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
}
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rain-cafe/logger.git"
},
"license": "MIT"
}
81 changes: 0 additions & 81 deletions packages/core/README.md

This file was deleted.

Loading

0 comments on commit 2404114

Please sign in to comment.