-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into 592-rework-on-loginpa…
…sskeys
- Loading branch information
Showing
59 changed files
with
632 additions
and
313 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,6 @@ | ||
--- | ||
"@codeimage/api": minor | ||
"@codeimage/app": minor | ||
--- | ||
|
||
feat(app,api) add new border type glass option |
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 @@ | ||
--- | ||
"@codeimage/api": minor | ||
"@codeimage/app": minor | ||
--- | ||
|
||
feat(app,api): add line number start option |
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 @@ | ||
--- | ||
'@codeimage/app': minor | ||
--- | ||
|
||
feat: allow zero padding |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Deploy (Production)" | ||
name: 'Deploy (Production)' | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
@@ -22,8 +22,8 @@ jobs: | |
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -33,20 +33,20 @@ jobs: | |
|
||
lint: | ||
name: Lint | ||
needs: [ "install" ] | ||
needs: ['install'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
- name: "[API] Generate Prisma Migration" | ||
- name: '[API] Generate Prisma Migration' | ||
run: | | ||
pnpm --filter=@codeimage/api exec prisma generate | ||
pnpm --filter=@codeimage/prisma-models build | ||
|
@@ -55,25 +55,25 @@ jobs: | |
|
||
build-packages: | ||
name: Build packages/** | ||
needs: [ "install" ] | ||
needs: ['install'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: "[API] Generate Prisma Migration" | ||
- name: '[API] Generate Prisma Migration' | ||
run: | | ||
pnpm --filter=@codeimage/api exec prisma generate | ||
pnpm --filter=@codeimage/prisma-models build | ||
- name: "Build packages" | ||
- name: 'Build packages' | ||
run: | | ||
pnpm libs:build | ||
|
@@ -84,21 +84,21 @@ jobs: | |
key: packages-dist-${{ github.run_id }}-${{ github.run_number }} | ||
|
||
build-api: | ||
name: "Build @codeimage/api" | ||
needs: [ "install" ] | ||
name: 'Build @codeimage/api' | ||
needs: ['install'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: "[API] Generate Prisma Migration" | ||
- name: '[API] Generate Prisma Migration' | ||
run: | | ||
pnpm --filter=@codeimage/api exec prisma generate | ||
pnpm --filter=@codeimage/prisma-models build | ||
|
@@ -118,7 +118,7 @@ jobs: | |
|
||
test-api: | ||
name: Api test | ||
needs: [ install ] | ||
needs: [install] | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
|
@@ -146,7 +146,7 @@ jobs: | |
GRANT_TYPE_AUTH0: client_credentials | ||
MOCK_AUTH: false | ||
MOCK_AUTH_EMAIL: [email protected] | ||
ALLOWED_ORIGINS: "*" | ||
ALLOWED_ORIGINS: '*' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -159,7 +159,7 @@ jobs: | |
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: "Run prisma DB migrations" | ||
- name: 'Run prisma DB migrations' | ||
run: | | ||
cd apps/api | ||
pnpm exec prisma migrate deploy | ||
|
@@ -174,12 +174,12 @@ jobs: | |
|
||
typecheck-packages: | ||
name: Type-checking packages/** | ||
needs: [ "install", "build-packages" ] | ||
needs: ['install', 'build-packages'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -205,12 +205,12 @@ jobs: | |
deploy-highlight-package: | ||
name: Deploy @codeimage/highlight app | ||
environment: Production | ||
needs: [ "install", "lint", "build-packages" ] | ||
needs: ['install', 'lint', 'build-packages'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -239,12 +239,12 @@ jobs: | |
deploy-api: | ||
name: Build and Deploy Api | ||
environment: Production | ||
needs: [ install, lint, typecheck-packages, test-api, build-api ] | ||
needs: [install, lint, typecheck-packages, test-api, build-api] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -274,21 +274,21 @@ jobs: | |
find -type f -name '.gitignore' -delete | ||
pnpm railway link --environment production $RAILWAY_API_PROJECT_ID | ||
cd dist/api-bundle | ||
pnpm railway up --detach | ||
pnpm railway up -s codeimage | ||
env: | ||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | ||
RAILWAY_API_PROJECT_ID: ${{ secrets.RAILWAY_API_PROJECT_ID }} | ||
|
||
deploy-app: | ||
name: Deploy @codeimage/app | ||
environment: Production | ||
needs: [ install, lint, typecheck-packages, build-packages, deploy-api ] | ||
needs: [install, lint, typecheck-packages, build-packages, deploy-api] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -325,23 +325,22 @@ jobs: | |
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional | ||
vercel-args: '--prebuilt --prod' #Optional | ||
working-directory: apps/codeimage | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required | ||
alias-domains: | #Optional | ||
app.codeimage.dev | ||
deploy-website: | ||
if: ${{ github.event.inputs.deploy-website == 'true' }} | ||
name: Deploy @codeimage/website | ||
environment: Production | ||
needs: [ install, lint, typecheck-packages, build-packages ] | ||
needs: [install, lint, typecheck-packages, build-packages] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
# with: | ||
# submodules: 'true' | ||
# with: | ||
# submodules: 'true' | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
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
2 changes: 2 additions & 0 deletions
2
apps/api/prisma/migrations/20231231115803_add_terminal_border_type_property/migration.sql
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 @@ | ||
-- AlterTable | ||
ALTER TABLE "SnippetTerminal" ADD COLUMN "borderType" TEXT; |
2 changes: 2 additions & 0 deletions
2
apps/api/prisma/migrations/20240107110836_add_line_number_start/migration.sql
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 @@ | ||
-- AlterTable | ||
ALTER TABLE "SnippetEditorTab" ADD COLUMN "lineNumberStart" INTEGER NOT NULL DEFAULT 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
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import {Type} from '@sinclair/typebox'; | ||
import {TString, Type} from '@sinclair/typebox'; | ||
|
||
export const enumLiteral = <T extends readonly string[]>(values: [...T]) => { | ||
export const enumLiteral = <T extends string>(values: T[]): TString => { | ||
const literals = values.map(value => Type.Literal(value)); | ||
// TODO: validation should work but type must work as a string... | ||
return Type.Intersect([Type.Union(literals), Type.String()]); | ||
return Type.Intersect([ | ||
Type.Union(literals), | ||
Type.String(), | ||
]) as unknown as TString; | ||
}; |
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
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
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
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
Oops, something went wrong.