-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/profile_editing
- Loading branch information
Showing
82 changed files
with
5,153 additions
and
2,864 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
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 was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,20 @@ | |
"name": "ipmc-core", | ||
"main": "./dist/index.js", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"watch": "tsc --watch", | ||
"build": "tsc" | ||
"build": "tsc", | ||
"test": "vitest run" | ||
}, | ||
"dependencies": { | ||
"inversify": "^6.0.2", | ||
"i18next": "^24.2.0", | ||
"inversify": "^6.2.1", | ||
"ipmc-interfaces": "workspace:^", | ||
"kubo-rpc-client": "^4.1.1", | ||
"kubo-rpc-client": "^5.0.2", | ||
"reflect-metadata": "^0.2.2" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.7.2", | ||
"vitest": "^2.1.8" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const Defaults = { | ||
Bootstrap: [ | ||
// a list of bootstrap peer multiaddrs to connect to on node startup | ||
'/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ', | ||
'/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN', | ||
'/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa', | ||
] | ||
}; |
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,14 +1,26 @@ | ||
import { IIndexManagerSymbol, IKeyValueStoreSymbol, IObjectStoreSymbol } from 'ipmc-interfaces'; | ||
import { IIndexManagerSymbol, IKeyValueStoreSymbol, IObjectStoreSymbol, ITranslationServiceSymbol, ITranslationsSymbol } from 'ipmc-interfaces'; | ||
import { MemoryKeyValueStore } from '../Services/MemoryKeyValueStore'; | ||
import { ObjectStore } from '../Services/ObjectStore'; | ||
import { IModule } from './IModule'; | ||
import { IndexManager } from '../Services/IndexManager'; | ||
import { TaskManager } from '../Services/TaskManager'; | ||
import { ITaskManagerSymbol } from 'ipmc-interfaces'; | ||
import { TranslationService } from '../Services/TranslationService'; | ||
import en from '../translations/en.json'; | ||
import de from '../translations/de.json'; | ||
|
||
export const CoreModule: IModule = (app) => { | ||
app.register(MemoryKeyValueStore, IKeyValueStoreSymbol); | ||
app.register(ObjectStore, IObjectStoreSymbol); | ||
app.register(IndexManager, IIndexManagerSymbol); | ||
app.register(TaskManager, ITaskManagerSymbol); | ||
app.register(TranslationService, ITranslationServiceSymbol); | ||
app.registerConstantMultiple({ | ||
en: { | ||
translation: en, | ||
}, | ||
de: { | ||
translation: de, | ||
} | ||
}, ITranslationsSymbol); | ||
}; |
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,5 +1,6 @@ | ||
export const Regexes = { | ||
VideoFile: /.mp4$/, | ||
VideoFile: (ext = 'mpd') => new RegExp(`^([\\w\\s':\\.\\-&!]+)(?: \\((\\d{4})\\))?\\.${ext}$`), | ||
Thumbnail: /thumb\d*\.(jpg|jpeg|png)$/, | ||
Poster: /poster\d*\.(jpg|jpeg|png)$/, | ||
} | ||
LangCheck: /^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$/i // Source: https://www.regextester.com/103066 | ||
}; |
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,22 @@ | ||
import { ILibrary, IOnProgress } from 'ipmc-interfaces'; | ||
|
||
export interface IIndexFetcher<TIndex> { | ||
fetchIndex(cid: string): Promise<TIndex>; | ||
/** | ||
* Fetches the index of the specified CID. | ||
* @param cid cid to index. | ||
* @param abortSignal signal to abort the process. | ||
* @param onProgress function to update progress. | ||
*/ | ||
fetchIndex(cid: string, abortSignal: AbortSignal, onProgress: IOnProgress): Promise<TIndex>; | ||
|
||
/** | ||
* Checks wheter the indexer can handler specified {@link ILibrary}. | ||
* @param library library to check compatibility for. | ||
*/ | ||
canIndex(library: ILibrary): boolean; | ||
|
||
/** | ||
* Version of the indexer. | ||
*/ | ||
version: string; | ||
} |
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.