Robert Schäfer 3c1c2d4dcb refactor(backend): put config into context
This is a side quest of #8558. The motivation is to be able to do dependency injection in the tests without overwriting global data. I saw the first merge conflict from #8551 and voila: It seems @Mogge could have used this already.

refactor: follow @Mogge's review

See: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8603#pullrequestreview-2880714796

refactor: better test helper methods

wip: continue refactoring

wip: continue posts

continue

wip: continue groups

continue registration

registration

continue messages

continue observeposts

continue categories

continue posts in groups

continue invite codes

refactor: continue notificationsMiddleware

continue statistics spec

followed-users

online-status

mentions-in-groups

posts-in-groups

email spec

finish all tests

improve typescript

missed one test

remove one more reference of CONFIG

eliminate one more global import of CONFIG

fix language spec test

fix two more test suites

refactor: completely mock out 3rd part API request

refactor test

fixed user_management spec

fixed more locatoin specs

install types for jsonwebtoken

one more fetchmock

fixed one more suite

fix one more spec

yet another spec

fix spec

delete whitespaces

remove beforeAll that the same as the default

fix merge conflict

fix e2e test

refactor: use single callback function for `context` setup

refactor: display logs from backend during CI

Because why not?

fix seeds

fix login

refactor: one unnecessary naming

refactor: better editor support

refactor: fail early

Interestingly, I've had to destructure `context.user` in order to make
typescript happy. Weird.

refactor: undo changes to workflows - no effect

We're running in `--detached` mode on CI, so I guess we won't be able to
see the logs anyways.
2025-06-11 21:10:35 +08:00

654 lines
21 KiB
TypeScript

export const leipzig = {
type: 'FeatureCollection',
query: ['leipzig'],
features: [
{
id: 'place.45697082',
type: 'Feature',
place_type: ['place'],
relevance: 1,
properties: {
mapbox_id: 'dXJuOm1ieHBsYzpBcmxJT2c',
wikidata: 'Q2079',
},
text_en: 'Leipzig',
language_en: 'en',
place_name_en: 'Leipzig, Saxony, Germany',
text: 'Leipzig',
language: 'en',
place_name: 'Leipzig, Saxony, Germany',
text_de: 'Leipzig',
language_de: 'de',
place_name_de: 'Leipzig, Sachsen, Deutschland',
text_fr: 'Leipzig',
language_fr: 'fr',
place_name_fr: 'Leipzig, Saxe, Allemagne',
text_nl: 'Leipzig',
language_nl: 'nl',
place_name_nl: 'Leipzig, Saksen, Duitsland',
text_it: 'Lipsia',
language_it: 'it',
place_name_it: 'Lipsia, Sassonia, Germania',
text_es: 'Leipzig',
language_es: 'es',
place_name_es: 'Leipzig, Sajonia, Alemania',
text_pt: 'Leipzig',
language_pt: 'pt',
place_name_pt: 'Leipzig, Saxónia, Alemanha',
text_pl: 'Lipsk',
language_pl: 'pl',
place_name_pl: 'Lipsk, Saksonia, Niemcy',
text_ru: 'Лейпциг',
language_ru: 'ru',
place_name_ru: 'Лейпциг, Саксония, Германия',
bbox: [12.236476, 51.23808, 12.542577, 51.447065],
center: [12.375101, 51.34083],
geometry: {
type: 'Point',
coordinates: [12.375101, 51.34083],
},
context: [
{
id: 'region.74810',
mapbox_id: 'dXJuOm1ieHBsYzpBU1E2',
wikidata: 'Q1202',
short_code: 'DE-SN',
text_en: 'Saxony',
language_en: 'en',
text: 'Saxony',
language: 'en',
text_de: 'Sachsen',
language_de: 'de',
text_fr: 'Saxe',
language_fr: 'fr',
text_nl: 'Saksen',
language_nl: 'nl',
text_it: 'Sassonia',
language_it: 'it',
text_es: 'Sajonia',
language_es: 'es',
text_pt: 'Saxónia',
language_pt: 'pt',
text_pl: 'Saksonia',
language_pl: 'pl',
text_ru: 'Саксония',
language_ru: 'ru',
},
{
id: 'country.8762',
mapbox_id: 'dXJuOm1ieHBsYzpJam8',
wikidata: 'Q183',
short_code: 'de',
text_en: 'Germany',
language_en: 'en',
text: 'Germany',
language: 'en',
text_de: 'Deutschland',
language_de: 'de',
text_fr: 'Allemagne',
language_fr: 'fr',
text_nl: 'Duitsland',
language_nl: 'nl',
text_it: 'Germania',
language_it: 'it',
text_es: 'Alemania',
language_es: 'es',
text_pt: 'Alemanha',
language_pt: 'pt',
text_pl: 'Niemcy',
language_pl: 'pl',
text_ru: 'Германия',
language_ru: 'ru',
},
],
},
{
id: 'place.18655359',
type: 'Feature',
place_type: ['place'],
relevance: 1,
properties: {
mapbox_id: 'dXJuOm1ieHBsYzpBUnlvZnc',
wikidata: 'Q4257515',
},
text_en: 'Leipzig',
language_en: 'de',
place_name_en: 'Leipzig, Varnensky District, Chelyabinsk, Russia',
text: 'Leipzig',
language: 'de',
place_name: 'Leipzig, Varnensky District, Chelyabinsk, Russia',
text_de: 'Leipzig',
language_de: 'de',
place_name_de: 'Leipzig, Warnenski rajon, Oblast Tscheljabinsk, Russland',
text_fr: 'Leipzig',
language_fr: 'nl',
place_name_fr: 'Leipzig, Raïon de Varna, oblast de Tcheliabinsk, Russie',
text_nl: 'Leipzig',
language_nl: 'nl',
place_name_nl: 'Leipzig, Varnenskiy rayon, Oblast Tsjeljabinsk, Rusland',
text_it: 'Лейпциг',
place_name_it: "Лейпциг, Varnenskij rajon, oblast' di Čeljabinsk, Russia",
text_es: 'Leipzig',
language_es: 'nl',
place_name_es: 'Leipzig, Raïon de Varna, Cheliábinsk, Rusia',
text_pt: 'Лейпциг',
place_name_pt: 'Лейпциг, Varnenskij rajon, Oblast de Cheliabinsk, Rússia',
text_pl: 'Leipzig',
language_pl: 'nl',
place_name_pl: 'Leipzig, Varnenskiy rayon, Obwód czelabiński, Rosja',
text_ru: 'Лейпциг',
language_ru: 'ru',
place_name_ru: 'Лейпциг, Варненский район, Челябинская область, Россия',
center: [61.049587, 53.568829],
geometry: {
type: 'Point',
coordinates: [61.049587, 53.568829],
},
context: [
{
id: 'district.1967810',
mapbox_id: 'dXJuOm1ieHBsYzpIZ2JD',
wikidata: 'Q1658354',
text_en: 'Varnensky District',
language_en: 'en',
text: 'Varnensky District',
language: 'en',
text_de: 'Warnenski rajon',
language_de: 'de',
text_fr: 'Raïon de Varna',
language_fr: 'fr',
text_nl: 'Varnenskiy rayon',
language_nl: 'nl',
text_it: 'Varnenskij rajon',
language_it: 'it',
text_es: 'Raïon de Varna',
language_es: 'fr',
text_pt: 'Varnenskij rajon',
language_pt: 'it',
text_pl: 'Varnenskiy rayon',
language_pl: 'nl',
text_ru: 'Варненский район',
language_ru: 'ru',
},
{
id: 'region.468162',
mapbox_id: 'dXJuOm1ieHBsYzpCeVRD',
wikidata: 'Q5714',
short_code: 'RU-CHE',
text_en: 'Chelyabinsk',
language_en: 'en',
text: 'Chelyabinsk',
language: 'en',
text_de: 'Oblast Tscheljabinsk',
language_de: 'de',
text_fr: 'oblast de Tcheliabinsk',
language_fr: 'fr',
text_nl: 'Oblast Tsjeljabinsk',
language_nl: 'nl',
text_it: "oblast' di Čeljabinsk",
language_it: 'it',
text_es: 'Cheliábinsk',
language_es: 'es',
text_pt: 'Oblast de Cheliabinsk',
language_pt: 'pt',
text_pl: 'Obwód czelabiński',
language_pl: 'pl',
text_ru: 'Челябинская область',
language_ru: 'ru',
},
{
id: 'country.8898',
mapbox_id: 'dXJuOm1ieHBsYzpJc0k',
wikidata: 'Q159',
short_code: 'ru',
text_en: 'Russia',
language_en: 'en',
text: 'Russia',
language: 'en',
text_de: 'Russland',
language_de: 'de',
text_fr: 'Russie',
language_fr: 'fr',
text_nl: 'Rusland',
language_nl: 'nl',
text_it: 'Russia',
language_it: 'it',
text_es: 'Rusia',
language_es: 'es',
text_pt: 'Rússia',
language_pt: 'pt',
text_pl: 'Rosja',
language_pl: 'pl',
text_ru: 'Россия',
language_ru: 'ru',
},
],
},
{
id: 'address.7058830234246124',
type: 'Feature',
place_type: ['address'],
relevance: 1,
properties: {
accuracy: 'street',
mapbox_id: 'dXJuOm1ieGFkci1zdHI6OGQ4MmQ0YmYtNWViYy00OTY2LWE1MTMtNDlkYzNiNDBhZjhm',
},
text_en: 'Leipzig Way',
place_name_en: 'Leipzig Way, Greenwith South Australia 5125, Australia',
text: 'Leipzig Way',
place_name: 'Leipzig Way, Greenwith South Australia 5125, Australia',
text_de: 'Leipzig Way',
place_name_de: 'Leipzig Way, Greenwith South Australia 5125, Australien',
text_fr: 'Leipzig Way',
place_name_fr: 'Leipzig Way, Greenwith Australie-Méridionale 5125, Australie',
text_nl: 'Leipzig Way',
place_name_nl: 'Leipzig Way, Greenwith Zuid-Australië 5125, Australië',
text_it: 'Leipzig Way',
place_name_it: 'Leipzig Way, Greenwith Australia Meridionale 5125, Australia',
text_es: 'Leipzig Way',
place_name_es: 'Leipzig Way, Greenwith Australia Meridional 5125, Australia',
text_pt: 'Leipzig Way',
place_name_pt: 'Leipzig Way, Greenwith Austrália Meridional 5125, Austrália',
text_pl: 'Leipzig Way',
place_name_pl: 'Leipzig Way, Greenwith Australia Południowa 5125, Australia',
text_ru: 'Leipzig Way',
place_name_ru: 'Leipzig Way, Greenwith Южная Австралия 5125, Австралия',
center: [138.709402, -34.765821],
geometry: {
type: 'Point',
coordinates: [138.709402, -34.765821],
},
context: [
{
id: 'postcode.15560206',
mapbox_id: 'dXJuOm1ieHBsYzo3VzRP',
text_en: '5125',
text: '5125',
text_de: '5125',
text_fr: '5125',
text_nl: '5125',
text_it: '5125',
text_es: '5125',
text_pt: '5125',
text_pl: '5125',
text_ru: '5125',
},
{
id: 'locality.265447950',
mapbox_id: 'dXJuOm1ieHBsYzpEOUpxRGc',
wikidata: 'Q5604921',
text_en: 'Greenwith',
language_en: 'en',
text: 'Greenwith',
language: 'en',
text_de: 'Greenwith',
language_de: 'en',
text_fr: 'Greenwith',
language_fr: 'fr',
text_nl: 'Greenwith',
language_nl: 'fr',
text_it: 'Greenwith',
language_it: 'fr',
text_es: 'Greenwith',
language_es: 'fr',
text_pt: 'Greenwith',
text_pl: 'Greenwith',
language_pl: 'en',
text_ru: 'Greenwith',
},
{
id: 'place.51214',
mapbox_id: 'dXJuOm1ieHBsYzp5QTQ',
wikidata: 'Q5112',
text_en: 'Adelaide',
language_en: 'en',
text: 'Adelaide',
language: 'en',
text_de: 'Adelaide',
language_de: 'de',
text_fr: 'Adélaïde',
language_fr: 'fr',
text_nl: 'Adelaide',
language_nl: 'nl',
text_it: 'Adelaide',
language_it: 'it',
text_es: 'Adelaida',
language_es: 'es',
text_pt: 'Adelaide',
language_pt: 'pt',
text_pl: 'Adelaide',
language_pl: 'pl',
text_ru: 'Аделаида',
language_ru: 'ru',
},
{
id: 'region.66574',
mapbox_id: 'dXJuOm1ieHBsYzpBUVFP',
wikidata: 'Q35715',
short_code: 'AU-SA',
text_en: 'South Australia',
language_en: 'en',
text: 'South Australia',
language: 'en',
text_de: 'South Australia',
language_de: 'de',
text_fr: 'Australie-Méridionale',
language_fr: 'fr',
text_nl: 'Zuid-Australië',
language_nl: 'nl',
text_it: 'Australia Meridionale',
language_it: 'it',
text_es: 'Australia Meridional',
language_es: 'es',
text_pt: 'Austrália Meridional',
language_pt: 'pt',
text_pl: 'Australia Południowa',
language_pl: 'pl',
text_ru: 'Южная Австралия',
language_ru: 'ru',
},
{
id: 'country.8718',
mapbox_id: 'dXJuOm1ieHBsYzpJZzQ',
wikidata: 'Q408',
short_code: 'au',
text_en: 'Australia',
language_en: 'en',
text: 'Australia',
language: 'en',
text_de: 'Australien',
language_de: 'de',
text_fr: 'Australie',
language_fr: 'fr',
text_nl: 'Australië',
language_nl: 'nl',
text_it: 'Australia',
language_it: 'it',
text_es: 'Australia',
language_es: 'es',
text_pt: 'Austrália',
language_pt: 'pt',
text_pl: 'Australia',
language_pl: 'pl',
text_ru: 'Австралия',
language_ru: 'ru',
},
],
},
{
id: 'address.3203988662803706',
type: 'Feature',
place_type: ['address'],
relevance: 1,
properties: {
accuracy: 'street',
mapbox_id: 'dXJuOm1ieGFkci1zdHI6NGUzNzNkZjItNmI4Ny00ODdkLWI3MzQtZjVkMGJlMjI1NjA5',
},
text_en: 'Leipzig',
place_name_en: 'Leipzig, Osorno, Los Lagos 5290000, Chile',
text: 'Leipzig',
place_name: 'Leipzig, Osorno, Los Lagos 5290000, Chile',
text_de: 'Leipzig',
place_name_de: 'Leipzig, Osorno, Región de Los Lagos 5290000, Chile',
text_fr: 'Leipzig',
place_name_fr: 'Leipzig, Osorno, Région des Lacs 5290000, Chili',
text_nl: 'Leipzig',
place_name_nl: 'Leipzig, Osorno, Los Lagos 5290000, Chili',
text_it: 'Leipzig',
place_name_it: 'Leipzig, Osorno, regione di Los Lagos 5290000, Cile',
text_es: 'Leipzig',
place_name_es: 'Leipzig, Osorno, Región de Los Lagos 5290000, Chile',
text_pt: 'Leipzig',
place_name_pt: 'Leipzig, Osorno, Região de Los Lagos 5290000, Chile',
text_pl: 'Leipzig',
place_name_pl: 'Leipzig, Osorno, Los Lagos 5290000, Chile',
text_ru: 'Leipzig',
place_name_ru: 'Leipzig, Осорно, Лос-Лагос 5290000, Чили',
center: [-73.1087, -40.570176],
geometry: {
type: 'Point',
coordinates: [-73.1087, -40.570176],
},
context: [
{
id: 'postcode.2002479',
mapbox_id: 'dXJuOm1ieHBsYzpIbzR2',
text_en: '5290000',
text: '5290000',
text_de: '5290000',
text_fr: '5290000',
text_nl: '5290000',
text_it: '5290000',
text_es: '5290000',
text_pt: '5290000',
text_pl: '5290000',
text_ru: '5290000',
},
{
id: 'locality.2656815',
mapbox_id: 'dXJuOm1ieHBsYzpLSW92',
text_en: 'Cementerio Municipal',
text: 'Cementerio Municipal',
text_de: 'Cementerio Municipal',
text_fr: 'Cementerio Municipal',
text_nl: 'Cementerio Municipal',
text_it: 'Cementerio Municipal',
text_es: 'Cementerio Municipal',
text_pt: 'Cementerio Municipal',
text_pl: 'Cementerio Municipal',
text_ru: 'Cementerio Municipal',
},
{
id: 'place.1574959',
mapbox_id: 'dXJuOm1ieHBsYzpHQWd2',
wikidata: 'Q51059',
text_en: 'Osorno',
language_en: 'en',
text: 'Osorno',
language: 'en',
text_de: 'Osorno',
language_de: 'de',
text_fr: 'Osorno',
language_fr: 'fr',
text_nl: 'Osorno',
language_nl: 'nl',
text_it: 'Osorno',
language_it: 'it',
text_es: 'Osorno',
language_es: 'es',
text_pt: 'Osorno',
language_pt: 'pt',
text_pl: 'Osorno',
language_pl: 'pl',
text_ru: 'Осорно',
language_ru: 'ru',
},
{
id: 'region.99375',
mapbox_id: 'dXJuOm1ieHBsYzpBWVF2',
wikidata: 'Q2178',
short_code: 'CL-LL',
text_en: 'Los Lagos',
language_en: 'en',
text: 'Los Lagos',
language: 'en',
text_de: 'Región de Los Lagos',
language_de: 'de',
text_fr: 'Région des Lacs',
language_fr: 'fr',
text_nl: 'Los Lagos',
language_nl: 'nl',
text_it: 'regione di Los Lagos',
language_it: 'it',
text_es: 'Región de Los Lagos',
language_es: 'es',
text_pt: 'Região de Los Lagos',
language_pt: 'pt',
text_pl: 'Los Lagos',
language_pl: 'pl',
text_ru: 'Лос-Лагос',
language_ru: 'ru',
},
{
id: 'country.8751',
mapbox_id: 'dXJuOm1ieHBsYzpJaTg',
wikidata: 'Q298',
short_code: 'cl',
text_en: 'Chile',
language_en: 'en',
text: 'Chile',
language: 'en',
text_de: 'Chile',
language_de: 'de',
text_fr: 'Chili',
language_fr: 'fr',
text_nl: 'Chili',
language_nl: 'nl',
text_it: 'Cile',
language_it: 'it',
text_es: 'Chile',
language_es: 'es',
text_pt: 'Chile',
language_pt: 'pt',
text_pl: 'Chile',
language_pl: 'pl',
text_ru: 'Чили',
language_ru: 'ru',
},
],
},
{
id: 'address.7521078080010634',
type: 'Feature',
place_type: ['address'],
relevance: 1,
properties: {
accuracy: 'street',
mapbox_id: 'dXJuOm1ieGFkci1zdHI6OTFkZjliYjctNWJiZC00YTk3LTk1ZjktOTZjMGVkNzU3MjY3',
},
text_en: 'Leipziger Straße',
language_en: 'de',
place_name_en: 'Leipziger Straße, 43003 Chomutov, Ústí nad Labem, Czech Republic',
text: 'Leipziger Straße',
language: 'de',
place_name: 'Leipziger Straße, 43003 Chomutov, Ústí nad Labem, Czech Republic',
text_de: 'Leipziger Straße',
language_de: 'de',
place_name_de: 'Leipziger Straße, 43003 Chomutov, Ústecký kraj, Tschechien',
text_fr: 'Lipská',
place_name_fr: "Lipská, 43003 Chomutov, région d'Ústí nad Labem, Tchéquie",
text_nl: 'Lipská',
place_name_nl: 'Lipská, 43003 Chomutov, Ústí nad Labem, Tsjechië',
text_it: 'Lipská',
place_name_it: 'Lipská, 43003 Chomutov, regione di Ústí nad Labem, Repubblica Ceca',
text_es: 'Lipská',
place_name_es: 'Lipská, 43003 Chomutov, Región de Ústí nad Labem, República Checa',
text_pt: 'Lipská',
place_name_pt: 'Lipská, 43003 Chomutov, Ústí nad Labem, Chéquia',
text_pl: 'Lipská',
place_name_pl: 'Lipská, 43003 Chomutov, Kraj ustecki, Czechy',
text_ru: 'Lipská',
place_name_ru: 'Lipská, 43003 Хомутов, Устецкий край, Чехия',
center: [13.385229, 50.472246],
geometry: {
type: 'Point',
coordinates: [13.385229, 50.472246],
},
context: [
{
id: 'postcode.7521078080010634',
text_en: '43003',
text: '43003',
text_de: '43003',
text_fr: '43003',
text_nl: '43003',
text_it: '43003',
text_es: '43003',
text_pt: '43003',
text_pl: '43003',
text_ru: '43003',
},
{
id: 'place.6162489',
mapbox_id: 'dXJuOm1ieHBsYzpYZ2c1',
wikidata: 'Q146356',
text_en: 'Chomutov',
language_en: 'en',
text: 'Chomutov',
language: 'en',
text_de: 'Chomutov',
language_de: 'de',
text_fr: 'Chomutov',
language_fr: 'fr',
text_nl: 'Chomutov',
language_nl: 'nl',
text_it: 'Chomutov',
language_it: 'it',
text_es: 'Chomutov',
language_es: 'es',
text_pt: 'Chomutov',
language_pt: 'pt',
text_pl: 'Chomutov',
language_pl: 'pl',
text_ru: 'Хомутов',
language_ru: 'ru',
},
{
id: 'region.74809',
mapbox_id: 'dXJuOm1ieHBsYzpBU1E1',
wikidata: 'Q192702',
short_code: 'CZ-42',
text_en: 'Ústí nad Labem',
language_en: 'en',
text: 'Ústí nad Labem',
language: 'en',
text_de: 'Ústecký kraj',
language_de: 'de',
text_fr: "région d'Ústí nad Labem",
language_fr: 'fr',
text_nl: 'Ústí nad Labem',
language_nl: 'nl',
text_it: 'regione di Ústí nad Labem',
language_it: 'it',
text_es: 'Región de Ústí nad Labem',
language_es: 'es',
text_pt: 'Ústí nad Labem',
language_pt: 'pt',
text_pl: 'Kraj ustecki',
language_pl: 'pl',
text_ru: 'Устецкий край',
language_ru: 'ru',
},
{
id: 'country.8761',
mapbox_id: 'dXJuOm1ieHBsYzpJams',
wikidata: 'Q213',
short_code: 'cz',
text_en: 'Czech Republic',
language_en: 'en',
text: 'Czech Republic',
language: 'en',
text_de: 'Tschechien',
language_de: 'de',
text_fr: 'Tchéquie',
language_fr: 'fr',
text_nl: 'Tsjechië',
language_nl: 'nl',
text_it: 'Repubblica Ceca',
language_it: 'it',
text_es: 'República Checa',
language_es: 'es',
text_pt: 'Chéquia',
language_pt: 'pt',
text_pl: 'Czechy',
language_pl: 'pl',
text_ru: 'Чехия',
language_ru: 'ru',
},
],
},
],
attribution:
'NOTICE: © 2025 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service (https://www.mapbox.com/about/maps/). This response and the information it contains may not be retained.',
}