Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes: long-title-outflow/consistent-sidebar-ui #2913

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
150 changes: 75 additions & 75 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
// https://containers.dev/implementors/json_reference/
// https://github.com/orgs/devcontainers/discussions/4
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"containerUser": "talawa",
"customizations": {
"vscode": {
"extensions": [
"biomejs.biome",
"esbenp.prettier-vscode",
"GraphQL.vscode-graphql",
"GraphQL.vscode-graphql-syntax",
"redhat.vscode-yaml"
],
"settings": {
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.formatOnSave": true,
"editor.lineNumbers": "relative",
"editor.mouseWheelZoom": true,
"editor.wordWrap": "on",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "./node_modules/typescript/lib",
"[graphql]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
}
},
"dockerComposeFile": [
"../compose.yaml",
"../docker/compose.testing.yaml",
"../docker/compose.devcontainer.yaml"
],
"features": {
// https://github.com/devcontainers/features/tree/main/src/common-utils
"ghcr.io/devcontainers/features/common-utils": {
"installZsh": false,
"installOhMyZsh": false,
"installOhMyZshConfig": false,
"nonFreePackages": true,
"username": "talawa"
},
// https://github.com/devcontainers/features/tree/main/src/git
"ghcr.io/devcontainers/features/git": {},
// https://github.com/devcontainers/features/tree/main/src/github-cli
"ghcr.io/devcontainers/features/github-cli": {}
},
"init": true,
"initializeCommand": "cp -n ./envFiles/.env.devcontainer ./.env",
"name": "talawa_api",
"overrideCommand": true,
"postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install --prod=false && pnpm start_development_server",
"postStartCommand": "pnpm install --prod=false",
"remoteUser": "talawa",
"service": "api",
"shutdownAction": "stopCompose",
"workspaceFolder": "/home/talawa/api"
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
"containerUser": "talawa",
"customizations": {
"vscode": {
"extensions": [
"biomejs.biome",
"esbenp.prettier-vscode",
"GraphQL.vscode-graphql",
"GraphQL.vscode-graphql-syntax",
"redhat.vscode-yaml"
],
"settings": {
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.formatOnSave": true,
"editor.lineNumbers": "relative",
"editor.mouseWheelZoom": true,
"editor.wordWrap": "on",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": "./node_modules/typescript/lib",
"[graphql]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
}
},
"dockerComposeFile": [
"../compose.yaml",
"../docker/compose.testing.yaml",
"../docker/compose.devcontainer.yaml"
],
"features": {
// https://github.com/devcontainers/features/tree/main/src/common-utils
"ghcr.io/devcontainers/features/common-utils": {
"installZsh": false,
"installOhMyZsh": false,
"installOhMyZshConfig": false,
"nonFreePackages": true,
"username": "talawa"
},
// https://github.com/devcontainers/features/tree/main/src/git
"ghcr.io/devcontainers/features/git": {},
// https://github.com/devcontainers/features/tree/main/src/github-cli
"ghcr.io/devcontainers/features/github-cli": {}
},
"init": true,
"initializeCommand": "cp -n ./envFiles/.env.devcontainer ./.env",
"name": "talawa_api",
"overrideCommand": true,
"postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install --prod=false && pnpm start_development_server",
"postStartCommand": "pnpm install --prod=false",
"remoteUser": "talawa",
"service": "api",
"shutdownAction": "stopCompose",
"workspaceFolder": "/home/talawa/api"
}
35 changes: 15 additions & 20 deletions .github/workflows/push-deploy-website.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
@@ -14,35 +14,35 @@ name: PUSH Workflow - Website Deployment
on:
push:
branches:
- "develop-postgres"
- 'develop-postgres'

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
Deploy-Docusaurus:
name: Deploy https://docs-api.talawa.io website
name: Deploy https://docs-admin.talawa.io website
runs-on: ubuntu-latest
# Run only if the develop-postgres branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' }}
environment:
# This "name" has to be the repos' branch that contains
# This "name" has to be the repos' branch that contains
# the current active website. There must be an entry for
# the same branch in the PalisadoesFoundation's
# "Code and automation > Environments > github-pages"
# menu. The branch "name" must match the branch in the
# "Code and automation > Environments > gigithub-pages"
# menu. The branch "name" must match the branch in the
# "on.push.branches" section at the top of this file
name: develop-postgres
url: https://docs-api.talawa.io
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: docs/.docusaurus
key: docusaurus-${{ hashFiles('docs/**') }}
restore-keys: |
docusaurus-
node-version: '20.x'
- name: Install pnpm
run: |
npm install -g pnpm@9.15.4
pnpm --version
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
@@ -54,11 +54,6 @@ jobs:
run: |
git config --global user.email "actions@github.com"
git config --global user.name "gh-actions"
if ! pnpm install --frozen-lockfile; then
echo "Failed to install dependencies"
exit 1
fi
if ! pnpm run deploy; then
echo "Deployment failed"
exit 1
fi
pnpm install --frozen-lockfile
pnpm run build
pnpm run deploy
37 changes: 21 additions & 16 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -14,25 +14,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

# Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
# Create .env file for Talawa API testing environment
- name: Create .env file for Talawa API testing environment
run: cp ./envFiles/.env.ci ./.env

# Setup pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8.6.12
# Build Talawa API compose testing environment
- name: Build Talawa API compose testing environment
run: docker compose build

# Run tests
- name: Run tests
run: docker compose up --exit-code-from api

# Install dependencies and run tests
- name: Run Tests and Upload Coverage to Codecov
# Copy coverage from container
- name: Copy coverage from container
run: |
pnpm install --frozen-lockfile
pnpm run test
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CONTAINER_ID=$(docker ps -aq --filter "ancestor=talawa-api")
docker cp $CONTAINER_ID:/home/talawa/api/coverage ./coverage

# Upload coverage to Codecov
- name: Upload Coverage to Codecov
@@ -41,3 +39,10 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
files: ./coverage/lcov.info

# Test acceptable level of code coverage
- name: Test acceptable level of code coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: "./coverage/lcov.info"
min_coverage: 39.0
4 changes: 4 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

git diff HEAD^ HEAD --exit-code -- ./package.json || npm install
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

npm run generate-docs
npm run format:fix
# npm run lint:fix
npm run lint-staged
# npm run typecheck
# npm run update:toc

git add .
25 changes: 25 additions & 0 deletions docs/docs/auto-docs/createServer/functions/createServer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[Admin Docs](/)

***

# Function: createServer()

> **createServer**(`options`?): `Promise`\<`FastifyInstance`\<`Server`, `IncomingMessage`, `ServerResponse`, `TypeBoxTypeProvider`\>\>

Defined in: [src/createServer.ts:29](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/createServer.ts#L29)

This function is used to set up the fastify server.

## Parameters

### options?

#### envConfig

`Partial`\<\{ `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`: `string`; `API_ADMINISTRATOR_USER_NAME`: `string`; `API_ADMINISTRATOR_USER_PASSWORD`: `string`; `API_BASE_URL`: `string`; `API_COMMUNITY_FACEBOOK_URL`: `string`; `API_COMMUNITY_GITHUB_URL`: `string`; `API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION`: `number`; `API_COMMUNITY_INSTAGRAM_URL`: `string`; `API_COMMUNITY_LINKEDIN_URL`: `string`; `API_COMMUNITY_NAME`: `string`; `API_COMMUNITY_REDDIT_URL`: `string`; `API_COMMUNITY_SLACK_URL`: `string`; `API_COMMUNITY_WEBSITE_URL`: `string`; `API_COMMUNITY_X_URL`: `string`; `API_COMMUNITY_YOUTUBE_URL`: `string`; `API_HOST`: `string`; `API_IS_APPLY_DRIZZLE_MIGRATIONS`: `boolean`; `API_IS_GRAPHIQL`: `boolean`; `API_IS_PINO_PRETTY`: `boolean`; `API_JWT_EXPIRES_IN`: `number`; `API_JWT_SECRET`: `string`; `API_LOG_LEVEL`: `"debug"` \| `"error"` \| `"fatal"` \| `"info"` \| `"trace"` \| `"warn"`; `API_MINIO_ACCESS_KEY`: `string`; `API_MINIO_END_POINT`: `string`; `API_MINIO_PORT`: `number`; `API_MINIO_SECRET_KEY`: `string`; `API_MINIO_USE_SSL`: `boolean`; `API_PORT`: `number`; `API_POSTGRES_DATABASE`: `string`; `API_POSTGRES_HOST`: `string`; `API_POSTGRES_PASSWORD`: `string`; `API_POSTGRES_PORT`: `number`; `API_POSTGRES_SSL_MODE`: `boolean` \| `"allow"` \| `"prefer"` \| `"require"` \| `"verify-full"`; `API_POSTGRES_USER`: `string`; \}\>

Optional custom configuration environment variables that would merge or override the default configuration environment variables used by talawa api.

## Returns

`Promise`\<`FastifyInstance`\<`Server`, `IncomingMessage`, `ServerResponse`, `TypeBoxTypeProvider`\>\>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: advertisementAttachmentMimeTypeEnum

> `const` **advertisementAttachmentMimeTypeEnum**: `ZodEnum`\<\[`"image/avif"`, `"image/jpeg"`, `"image/png"`, `"image/webp"`, `"video/mp4"`, `"video/webm"`\]\>
Defined in: [src/drizzle/enums/advertisementAttachmentMimeType.ts:8](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/advertisementAttachmentMimeType.ts#L8)

Possible variants of the type of an attachement of an advertisement.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: advertisementTypeEnum

> `const` **advertisementTypeEnum**: `ZodEnum`\<\[`"banner"`, `"menu"`, `"pop_up"`\]\>

Defined in: [src/drizzle/enums/advertisementType.ts:6](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/advertisementType.ts#L6)

Possible variants of the type of an advertisement.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: agendaItemTypeEnum

> `const` **agendaItemTypeEnum**: `ZodEnum`\<\[`"general"`, `"note"`, `"scripture"`, `"song"`\]\>
Defined in: [src/drizzle/enums/agendaItemType.ts:6](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/agendaItemType.ts#L6)

Possible variants of the type of an agenda item.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: chatMembershipRoleEnum

> `const` **chatMembershipRoleEnum**: `ZodEnum`\<\[`"administrator"`, `"regular"`\]\>

Defined in: [src/drizzle/enums/chatMembershipRole.ts:6](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/chatMembershipRole.ts#L6)

Possible variants of the role assigned to a user within a chat.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: commentVoteTypeEnum

> `const` **commentVoteTypeEnum**: `ZodEnum`\<\[`"down_vote"`, `"up_vote"`\]\>

Defined in: [src/drizzle/enums/commentVoteType.ts:6](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/commentVoteType.ts#L6)

Possible variants of the type of of a vote on a comment.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Admin Docs](/)

***

# Variable: eventAttachmentMimeTypeEnum

> `const` **eventAttachmentMimeTypeEnum**: `ZodEnum`\<\[`"image/avif"`, `"image/jpeg"`, `"image/png"`, `"image/webp"`, `"video/mp4"`, `"video/webm"`\]\>

Defined in: [src/drizzle/enums/eventAttachmentMimeType.ts:8](https://github.com/PalisadoesFoundation/talawa-api/blob/c34688c69eb12a5eb721ebc8a0cd60b53e5fbf81/src/drizzle/enums/eventAttachmentMimeType.ts#L8)

Possible variants of the type of an attachement of an event.
Loading