Skip to content

Commit

Permalink
fix(branding): remove leftover centraverse naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ewen-lbh committed Jun 29, 2024
1 parent 3e58ac6 commit 2ca288e
Show file tree
Hide file tree
Showing 131 changed files with 2,213 additions and 2,520 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"*.{css,scss,svelte}": "stylelint --fix",
"*": "prettier --write --ignore-unknown",
"packages/api/**/*.ts": [
"yarn workspace @centraverse/api barrelize",
"yarn workspace @churros/api barrelize",
"git add packages/api/src/modules/**/index.ts packages/api/barrelsby.config.json",
"eslint --fix"
]
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN yarn generate-buildinfo
RUN apk add bash
RUN bash -c printenv

RUN yarn workspaces foreach -Rt --from '{@centraverse/api,@centraverse/app}' run build
RUN yarn workspaces foreach -Rt --from '{@churros/api,@churros/app}' run build


FROM node:20-alpine as base
Expand Down Expand Up @@ -59,7 +59,7 @@ COPY --from=builder /app/packages/api/static/ /app/packages/api/static/
COPY --from=builder /app/packages/api/package.json /app/packages/api/

# Install dependencies
RUN yarn workspaces focus @centraverse/api --production
RUN yarn workspaces focus @churros/api --production

# Copy prisma client script
COPY packages/api/prisma-client.sh /app/prisma-client.sh
Expand All @@ -80,7 +80,7 @@ COPY --from=builder /app/packages/app/build/ /app/packages/app/build/
COPY --from=builder /app/packages/app/package.json /app/packages/app/

# Install dependencies
RUN yarn workspaces focus @centraverse/app --production
RUN yarn workspaces focus @churros/app --production

# Copy entrypoint
COPY packages/app/entrypoint.sh /app/entrypoint.sh
Expand Down
6 changes: 3 additions & 3 deletions ci/volta.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ pages:
PUBLIC_API_URL: https://churros.inpt.fr/graphql
PUBLIC_API_WEBSOCKET_URL: wss://churros.inpt.fr/graphql
script:
- yarn workspace @centraverse/docs install --immutable
- yarn workspace @centraverse/docs create-dotenv
- yarn workspace @churros/docs install --immutable
- yarn workspace @churros/docs create-dotenv
- yarn generate-buildinfo
- yarn workspace @centraverse/docs build
- yarn workspace @churros/docs build
- mv packages/docs/build public
artifacts:
paths:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "centraverse",
"name": "churros",
"type": "module",
"devDependencies": {
"@commitlint/cli": "^19.2.1",
Expand Down Expand Up @@ -40,15 +40,15 @@
"packageManager": "[email protected]",
"private": true,
"scripts": {
"build": "yarn cp-env && yarn generate-buildinfo && yarn workspaces foreach --exclude @centraverse/docs --interlaced --topological-dev -Apv run build",
"build": "yarn cp-env && yarn generate-buildinfo && yarn workspaces foreach --exclude @churros/docs --interlaced --topological-dev -Apv run build",
"cp-env": "test -f .env || cp .env.example .env && cp .env packages/api/ && cp .env packages/app/ && cp .env packages/db/",
"dev": "yarn sync-with-example-dotenv && yarn cp-env && docker compose up -d && yarn dotenv -- yarn workspaces foreach -Apiv run dev",
"format": "prettier . --write --ignore-unknown",
"lint": "eslint . --cache=true & stylelint '**/*.{css,scss,svelte}' &",
"lintfix": "eslint --fix --cache=true . & stylelint --fix '**/*.{css,scss,svelte}' &",
"migration": "docker compose up -d && yarn prisma migrate dev --name",
"postinstall": "husky install",
"prisma": "yarn workspace @centraverse/db run prisma",
"prisma": "yarn workspace @churros/db run prisma",
"reset": "docker compose up -d && NODE_ENV=development yarn prisma migrate reset --force",
"start": "docker compose up -d && yarn workspaces foreach -Apiv run start",
"triage": "xdg-open 'https://git.inpt.fr/inp-net/churros/-/issues/?sort=created_date&state=opened&not[label_name][]=importance:urgent&not[label_name][]=importance:high&not[label_name][]=importance:medium&not[label_name][]=importance:low&not[label_name][]=importance:rockbottom&not[label_name][]=difficulty:braindead&not[label_name][]=difficulty:easy&not[label_name][]=difficulty:moderate&not[label_name][]=difficulty:hard&not[label_name][]=difficulty:unknown'",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ yarn prisma migrate deploy
echo 'Migrated!'


echo 'Starting centraverse api...'
yarn workspace @centraverse/api start
echo 'Starting churros api...'
yarn workspace @churros/api start
8 changes: 4 additions & 4 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@centraverse/api",
"name": "@churros/api",
"dependencies": {
"@centraverse/db": "workspace:^",
"@churros/db": "workspace:^",
"@envelop/core": "^5.0.0",
"@graphql-tools/utils": "^10.2.2",
"@graphql-yoga/node": "^3.9.1",
Expand Down Expand Up @@ -140,8 +140,8 @@
"format-at": "prettier --write --ignore-unknown",
"format": "yarn format-at .",
"build": "run-s \"build:*\"",
"prisma": "yarn workspace @centraverse/db run prisma",
"build:prisma": "yarn workspace @centraverse/db run generate",
"prisma": "yarn workspace @churros/db run prisma",
"build:prisma": "yarn workspace @churros/db run generate",
"build:changelog": "run-s copy-changelog",
"build:typenames": "tsx ./scripts/update-id-prefix-to-typename-map.ts",
"build:barrelize": "run-s barrelize",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/prisma-client.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn node -e 'const {PrismaClient} = require("@centraverse/db/prisma"); const p = new PrismaClient()' -i
yarn node -e 'const {PrismaClient} = require("@churros/db/prisma"); const p = new PrismaClient()' -i
6 changes: 3 additions & 3 deletions packages/api/scripts/add-search-support.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PrismaClient } from '@centraverse/db/prisma';
// run yarn workspace @centraverse/db generate:patch if you get a type error here
import { type RuntimeDataModel } from '@centraverse/db/prisma/runtime/library';
import { PrismaClient } from '@churros/db/prisma';
// run yarn workspace @churros/db generate:patch if you get a type error here
import { type RuntimeDataModel } from '@churros/db/prisma/runtime/library';
import * as p from '@clack/prompts';
import { glob } from 'glob';
import { execSync } from 'node:child_process';
Expand Down
2 changes: 1 addition & 1 deletion packages/api/scripts/create-integration-groups.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrismaClient } from '@centraverse/db/prisma';
import { PrismaClient } from '@churros/db/prisma';
import { readFileSync } from 'fs';

const p = new PrismaClient();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrismaClient } from '@centraverse/db/prisma';
import { PrismaClient } from '@churros/db/prisma';
import { readFile, writeFile } from 'node:fs/promises';

const p = new PrismaClient();
Expand Down
2 changes: 1 addition & 1 deletion packages/api/scripts/generate-promo-code.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrismaClient, PromotionType, type Event, type Group } from '@centraverse/db/prisma';
import { PrismaClient, PromotionType, type Event, type Group } from '@churros/db/prisma';

function usage(): never {
console.error(
Expand Down
4 changes: 2 additions & 2 deletions packages/api/scripts/new-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ TODO: Écrire la documentation du module
);

p.log.step('Génération des barrels (fichiers index.ts)');
p.log.info(`$ yarn workspace @centraverse/api barrelize`);
execSync(`yarn workspace @centraverse/api barrelize`);
p.log.info(`$ yarn workspace @churros/api barrelize`);
execSync(`yarn workspace @churros/api barrelize`);

p.log.step('Mise à jour de packages/api/src/schema.ts');
await writeFile(
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { User } from '@centraverse/db/prisma';
import type { User } from '@churros/db/prisma';
import type { Context } from './context.js';

export interface AuthScopes {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type AuthContexts,
type AuthScopes,
} from '#lib';
import type PrismaTypes from '@centraverse/db/pothos';
import type PrismaTypes from '@churros/db/pothos';
import SchemaBuilder, { type BuiltinScalarRef } from '@pothos/core';
import ComplexityPlugin from '@pothos/plugin-complexity';
import DataloaderPlugin from '@pothos/plugin-dataloader';
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
type School,
type StudentAssociation,
type User,
} from '@centraverse/db/prisma';
} from '@churros/db/prisma';
import type { YogaInitialContext } from '@graphql-yoga/node';
import { GraphQLError } from 'graphql';
import { isThirdPartyToken } from './auth.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/google-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fullName } from '#modules/users';
import type { Event, Group, Registration, User } from '@centraverse/db/prisma';
import type { Event, Group, Registration, User } from '@churros/db/prisma';
import { GoogleAuth, type JWTInput } from 'google-auth-library';
import { splitID } from './global-id.js';

Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/lib/ldap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
School,
StudentAssociation,
User,
} from '@centraverse/db/prisma';
} from '@churros/db/prisma';
import ldap from 'ldapjs';
import crypto from 'node:crypto';

Expand Down Expand Up @@ -651,11 +651,11 @@ async function createLdapClub(
}

export {
LDAP_BIND_DN,
connectLdap,
createLdapClub,
createLdapGroup,
createLdapUser,
LDAP_BIND_DN,
queryLdapUser,
resetLdapUserPassword,
};
2 changes: 1 addition & 1 deletion packages/api/src/lib/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const toHtml = async (
.then((s) =>
options?.linkifyGitlabItems
? String(s).replaceAll(
/https:\/\/git.inpt.fr\/inp-net\/(?:churros|centraverse)\/(?:-\/)?issues\/(\d+)/g,
/https:\/\/git.inpt.fr\/inp-net\/churros\/(?:-\/)?issues\/(\d+)/g,
'/reports/$1',
)
: String(s),
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/lib/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PrismaClient } from '@centraverse/db/prisma';
import { PrismaClient } from '@churros/db/prisma';

export const prisma = new PrismaClient();
2 changes: 1 addition & 1 deletion packages/api/src/lib/search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { prisma } from '#lib';
import type { Prisma } from '@centraverse/db/prisma';
import type { Prisma } from '@churros/db/prisma';
export const HIGHLIGHTER_OPTIONS = 'StartSel=<mark>, StopSel=</mark>';

export type SearchResult<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '#lib';
import { notify } from '#modules/notifications';
import { userIsAdminOf } from '#permissions';
import { NotificationChannel, type User } from '@centraverse/db/prisma';
import { NotificationChannel, type User } from '@churros/db/prisma';
import { GraphQLError } from 'graphql';
import { CommentType } from '../index.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { builder, type SearchResult } from '#lib';

import { type Document } from '@centraverse/db/prisma';
import { type Document } from '@churros/db/prisma';

export const DocumentSearchResultType = builder
.objectRef<SearchResult<{ document: Document }>>('DocumentSearchResult')
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/documents/types/document-type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { builder } from '#lib';

import * as Prisma from '@centraverse/db/prisma';
import * as Prisma from '@churros/db/prisma';

export const DocumentTypeEnum = builder.enumType(Prisma.DocumentType, {
name: 'DocumentType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { builder, log, prisma, publish, pubsub, subscriptionName } from '#lib';
import { DateTimeScalar, VisibilityEnum } from '#modules/global';
import { LinkInput } from '#modules/links';
import { TicketGroupInput, TicketInput, createTicketUid } from '#modules/ticketing';
import * as PrismaTypes from '@centraverse/db/prisma';
import { EventFrequency, GroupType, Visibility } from '@centraverse/db/prisma';
import * as PrismaTypes from '@churros/db/prisma';
import { EventFrequency, GroupType, Visibility } from '@churros/db/prisma';
import { isBefore } from 'date-fns';
import { GraphQLError } from 'graphql';
import omit from 'lodash.omit';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { builder, prisma } from '#lib';
import { DateTimeScalar } from '#modules/global';
import { prismaQueryVisibleEvents } from '#permissions';
import { EventFrequency, Visibility, type Event } from '@centraverse/db/prisma';
import { EventFrequency, Visibility, type Event } from '@churros/db/prisma';
import {
addDays,
differenceInDays,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { builder, prisma } from '#lib';

import { prismaQueryVisibleEvents } from '#permissions';
import { Visibility } from '@centraverse/db/prisma';
import { Visibility } from '@churros/db/prisma';
import { EventType } from '../index.js';
// TODO rename to group.events

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/resolvers/query.events.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { builder, prisma } from '#lib';

import { prismaQueryVisibleEvents } from '#permissions';
import { Visibility, type Prisma } from '@centraverse/db/prisma';
import { Visibility, type Prisma } from '@churros/db/prisma';
import { endOfDay, startOfDay } from 'date-fns';
import { EventType, findNextRecurringEvent } from '../index.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/types/event-frequency.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { builder } from '#lib';

import { EventFrequency } from '@centraverse/db/prisma';
import { EventFrequency } from '@churros/db/prisma';

export const EventFrequencyType = builder.enumType(EventFrequency, {
name: 'EventFrequency',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { builder, type SearchResult } from '#lib';

import type { Event } from '@centraverse/db/prisma';
import type { Event } from '@churros/db/prisma';

export const EventSearchResultType = builder
.objectRef<SearchResult<{ event: Event }, ['description', 'title']>>('EvenSearchResult')
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/types/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
prismaQueryAccessibleArticles,
userCanSeeTicket,
} from '#permissions';
import { PaymentMethod } from '@centraverse/db/prisma';
import { PaymentMethod } from '@churros/db/prisma';
import { EventFrequencyType, eventCapacity } from '../index.js';
import {
canEdit,
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/utils/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
type School,
type Ticket,
type User,
} from '@centraverse/db/prisma';
} from '@churros/db/prisma';
import type Cron from 'croner';
import { format, subMinutes } from 'date-fns';

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/utils/permissions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Context } from '#lib';
import { canScanBookings } from '#modules/ticketing';
import { onBoard, userIsAdminOf, userIsGroupEditorOf } from '#permissions';
import type { Event, EventManager, Group } from '@centraverse/db/prisma';
import type { Event, EventManager, Group } from '@churros/db/prisma';

export function canEdit(
event: Event & { managers: EventManager[]; group: { studentAssociationId: string | null } },
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/utils/places.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Ticket, TicketGroup } from '@centraverse/db/prisma';
import type { Ticket, TicketGroup } from '@churros/db/prisma';

export function eventCapacity(
tickets: Array<Ticket & { group: TicketGroup | null }>,
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/events/utils/recurrence.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventFrequency, type Event as EventPrisma } from '@centraverse/db/prisma';
import { EventFrequency, type Event as EventPrisma } from '@churros/db/prisma';
import {
addMonths,
addWeeks,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder, fullTextSearch, prisma } from '#lib';
import type { Answer, User } from '@centraverse/db/prisma';
import type { Answer, User } from '@churros/db/prisma';
import { resolveArrayConnection, resolveOffsetConnection } from '@pothos/plugin-relay';
import groupBy from 'lodash.groupby';
import { answerTypePrismaIncludes } from '../types/answer.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { builder, prisma } from '#lib';
import { DateTimeScalar, VisibilityEnum } from '#modules/global';
import { Visibility } from '@centraverse/db/prisma';
import { Visibility } from '@churros/db/prisma';
import { GraphQLError } from 'graphql';
import omit from 'lodash.omit';
import { FormType } from '../types/form.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder, prisma, type SearchResult } from '#lib';
import type { Answer } from '@centraverse/db/prisma';
import type { Answer } from '@churros/db/prisma';
import { AnswerType } from './answer.js';

export const AnswerSearchResultType = builder
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/forms/types/form-search-result.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder, type SearchResult } from '#lib';
import type { Form } from '@centraverse/db/prisma';
import type { Form } from '@churros/db/prisma';
import { FormType } from './form.js';

export const FormSearchResultType = builder
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/forms/types/question-kind.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder } from '#lib';
import { QuestionKind } from '@centraverse/db/prisma';
import { QuestionKind } from '@churros/db/prisma';

export const QuestionKindType = builder.enumType(QuestionKind, {
description: 'Le type de question',
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/forms/utils/answers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { QuestionKind } from '@centraverse/db/prisma';
import type { QuestionKind } from '@churros/db/prisma';
import { GraphQLError } from 'graphql';

export const REDACTED_ANSWER = '•'.repeat(10);
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/forms/utils/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type Prisma,
type Question,
type StudentAssociation,
} from '@centraverse/db/prisma';
} from '@churros/db/prisma';
import { GraphQLError } from 'graphql';

export const requiredIncludesForPermissions = {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/modules/global/types/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder } from '#lib';
import { Prisma } from '@centraverse/db/prisma';
import { Prisma } from '@churros/db/prisma';
import { ZodError, type ZodFormattedError } from 'zod';

const ErrorInterface = builder.interfaceRef<Error>('ErrorInterface').implement({
Expand Down
Loading

0 comments on commit 2ca288e

Please sign in to comment.