-
Notifications
You must be signed in to change notification settings - Fork 109
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
Showing
3,108 changed files
with
287,605 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,2 @@ | ||
REDIS_URL="redis://redis:6379" | ||
CLICKHOUSE_URL="http://clickhouse-server:8123" |
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 @@ | ||
node_modules | ||
**/node_modules | ||
**/.env | ||
.env* | ||
|
||
.git | ||
.idea | ||
.venv | ||
.vscode | ||
.ref | ||
./ref* | ||
**/.ref | ||
*.md | ||
|
||
docker | ||
clickhouse | ||
|
||
#docker | ||
docker-compose.yml | ||
docker-compose.*.yml | ||
coverage |
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,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = 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 @@ | ||
{} |
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,27 @@ | ||
/* tslint:disable */ | ||
/** | ||
* Automatically generated file, do not modify by hand. | ||
*/ | ||
|
||
export interface CompiledServiceConfig { | ||
commands: 'bundle' | 'release' | 'render' | ||
vars: | ||
| 'AWS_ACCESS_KEY' | ||
| 'AWS_ACCESS_KEY_SECRET' | ||
| 'COMMAND' | ||
| 'COMMAND_OPTS' | ||
| 'GOOGLE_CLIENT_ID' | ||
| 'GOOGLE_CLIENT_SECRET' | ||
| 'IS_TEST' | ||
| 'NGROK_AUTH_TOKEN' | ||
| 'NODE_ENV' | ||
| 'POSTGRES_URL' | ||
| 'RUNTIME_COMMIT' | ||
| 'RUNTIME_VERSION' | ||
| 'SMTP_HOST' | ||
| 'SMTP_PASSWORD' | ||
| 'SMTP_USER' | ||
| 'TOKEN_SECRET' | ||
| 'UNSPLASH_ACCESS_KEY' | ||
[k: string]: unknown | ||
} |
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,134 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
inputs: | ||
cmd: | ||
description: Command | ||
required: true | ||
type: choice | ||
options: | ||
- deploy | ||
- test | ||
|
||
tags: | ||
description: Tags | ||
required: false | ||
type: string | ||
|
||
# if deploy on release | ||
# release: | ||
# types: [published] | ||
|
||
env: | ||
CI: true | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} | ||
STRIPE_SECRET_KEY_TEST: ${{ secrets.STRIPE_SECRET_KEY_TEST }} | ||
TOKEN_SECRET: ${{ secrets.TOKEN_SECRET }} | ||
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | ||
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | ||
SMTP_HOST: ${{ secrets.SMTP_HOST }} | ||
SMTP_USER: ${{ secrets.SMTP_USER }} | ||
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }} | ||
UNSPLASH_ACCESS_KEY: ${{ secrets.UNSPLASH_ACCESS_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
jobs: | ||
test: | ||
env: | ||
REDIS_URL: redis://localhost:6379 | ||
CLICKHOUSE_URL: http://default:@localhost:8123 | ||
POSTGRES_URL: http://test:test@localhost:5432/test | ||
SHOULD_DEPLOY: ${{ contains(github.event.head_commit.message, '-d') }} | ||
name: build and test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get The Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 8.13.1 | ||
|
||
- name: Set Node Version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: pnpm | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- name: Install Deps | ||
run: pnpm -v && pnpm i && pnpm rebuild --recursive | ||
|
||
- name: Install Playwright Browsers | ||
run: npx playwright install | ||
|
||
- name: Run Docker Compose (DB) | ||
run: docker-compose pull && docker-compose up --build -d | ||
|
||
- name: Create Tables | ||
run: npm -w @fiction/www exec -- factor run generate | ||
|
||
- name: Run Type Check | ||
run: npm run types:ci | ||
|
||
- name: BUILD unit tests | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 | ||
run: npm exec -- vitest run build -u --no-file-parallelism | ||
|
||
- name: DEV unit tests | ||
run: npm exec -- vitest run wip -u | ||
|
||
- name: STABLE unit tests | ||
run: npm exec -- vitest run ci -u | ||
|
||
- name: E2E/UI unit tests | ||
run: npm exec -- vitest run e2e -u | ||
|
||
- name: Install Build Packages | ||
if: env.SHOULD_DEPLOY | ||
run: pnpm add tsup cross-env --global | ||
|
||
- name: Build Bundles | ||
if: env.SHOULD_DEPLOY | ||
run: npm exec -- factor run bundle | ||
|
||
- name: Render Apps | ||
if: env.SHOULD_DEPLOY | ||
run: npm exec -- factor run render | ||
|
||
- name: Install FlyCtl | ||
if: env.SHOULD_DEPLOY | ||
uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- name: Deploy Apps | ||
if: env.SHOULD_DEPLOY | ||
run: | | ||
cross-env DOMAIN=fiction APP=www npm run deploy | ||
cross-env DOMAIN=fiction APP=sites npm run deploy | ||
- name: Post Notification | ||
if: always() | ||
id: slack | ||
uses: slackapi/slack-github-action@v1.24.0 | ||
with: | ||
# This data can be any valid JSON from a previous step in the GitHub Action | ||
payload: | | ||
{ | ||
"icon_emoji": "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}", | ||
"username": "supereon", | ||
"channel": "#notify", | ||
"text": "Workflow *${{ github.workflow }}* on *${{ github.ref }}* (commit: ${{ github.sha }}) completed with status: *${{ job.status }}*. <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |
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,36 @@ | ||
/xcache | ||
|
||
dist | ||
**/dist | ||
**/rendered | ||
|
||
.DS_Store | ||
**/node_modules/** | ||
coverage | ||
temp | ||
temp.* | ||
explorations | ||
TODOs.md | ||
|
||
.env | ||
.env* | ||
|
||
# wireguard/tunnels | ||
wire.* | ||
|
||
# debugging | ||
.ts-node | ||
*.log | ||
|
||
# Local .terraform directories | ||
**/.terraform | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
|
||
# Ansible/Python | ||
.venv/ | ||
.venv*/ | ||
*.retry | ||
/___*.yml |
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,5 @@ | ||
{ | ||
"MD013": false, | ||
"MD033": false, | ||
"MD041": 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 @@ | ||
v20.9.0 |
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,15 @@ | ||
{ | ||
"watch": ["packages"], | ||
"ignore": [ | ||
"**/dist/*", | ||
"**/rendered/*", | ||
"./temp/*", | ||
"**/temp/*", | ||
"./app/**/*" | ||
], | ||
"ext": "js,ts,less,html", | ||
"events": { | ||
"restart": "", | ||
"start": "" | ||
} | ||
} |
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,6 @@ | ||
*.tgz | ||
temp | ||
.env | ||
.env* | ||
.local | ||
*.log |
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 @@ | ||
{ | ||
"rules": { | ||
"require-main": "error", | ||
"require-publishConfig": "error", | ||
"name-format": "error", | ||
"version-format": "error", | ||
"require-license": "error", | ||
"require-name": "error", | ||
"require-version": "error", | ||
"bin-type": "error", | ||
"config-type": "error", | ||
"description-type": "error", | ||
"devDependencies-type": "error", | ||
"directories-type": "error", | ||
"engines-type": "error", | ||
"files-type": "error", | ||
"homepage-type": "error", | ||
"keywords-type": "error", | ||
"license-type": "error", | ||
"main-type": "error", | ||
"man-type": "error", | ||
"name-type": "error", | ||
"preferGlobal-type": "error", | ||
"private-type": "error", | ||
"repository-type": "error", | ||
"scripts-type": "error", | ||
"version-type": "error", | ||
"valid-values-author": ["error", ["Supereon"]], | ||
|
||
"no-restricted-dependencies": ["error", ["gulping-npm-package-json-lint"]], | ||
"no-restricted-pre-release-dependencies": [ | ||
"error", | ||
["gulping-npm-package-json-lint"] | ||
], | ||
"no-restricted-devDependencies": [ | ||
"error", | ||
["gulping-npm-package-json-lint"] | ||
], | ||
"no-restricted-pre-release-devDependencies": [ | ||
"error", | ||
["gulping-npm-package-json-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,4 @@ | ||
shamefully-hoist=true | ||
|
||
# https://answers.netlify.com/t/support-guide-using-private-npm-modules-on-netlify/795 | ||
# //registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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,32 @@ | ||
// const fs = require('node:fs') | ||
// const path = require('node:path') | ||
|
||
// const exists = fs.existsSync(path.join(process.cwd(), '../factor/package.json')) | ||
// const localInstall = process.env.INSTALL_ENV === 'local' | ||
function rewriteFactorDependency(deps) { | ||
// Object.entries(deps).forEach(([name, version]) => { | ||
// if (name.includes("@factor")) { | ||
// deps[name] = | ||
// exists && localInstall ? `file:~/Projects/factor/${name}` : "latest" | ||
// } | ||
// }) | ||
return deps | ||
} | ||
|
||
function readPackage(pkg, _context) { | ||
pkg.dependencies = rewriteFactorDependency(pkg.dependencies) | ||
pkg.devDependencies = rewriteFactorDependency(pkg.devDependencies) | ||
|
||
return pkg | ||
} | ||
|
||
function afterAllResolved(lockfile, _context) { | ||
return lockfile | ||
} | ||
|
||
module.exports = { | ||
hooks: { | ||
afterAllResolved, | ||
readPackage, | ||
}, | ||
} |
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,5 @@ | ||
**/.ref/** | ||
**/.ref*/** | ||
**/dist/** | ||
*-lock* | ||
**/.factor/** |
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,6 @@ | ||
{ | ||
"arrowParens": "always", | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,9 @@ | ||
{ | ||
"endpoints": [], | ||
"routes": [ | ||
{ | ||
"key": "engine", | ||
"path": "/:pathMatch(.*)*" | ||
} | ||
] | ||
} |
Oops, something went wrong.