diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/extra-utils/index.ts | 16 | ||||
-rw-r--r-- | shared/server-commands/bulk/bulk-command.ts (renamed from shared/extra-utils/bulk/bulk-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/bulk/index.ts (renamed from shared/extra-utils/bulk/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/cli/cli-command.ts (renamed from shared/extra-utils/cli/cli-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/cli/index.ts (renamed from shared/extra-utils/cli/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/custom-pages/custom-pages-command.ts (renamed from shared/extra-utils/custom-pages/custom-pages-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/custom-pages/index.ts (renamed from shared/extra-utils/custom-pages/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/feeds/feeds-command.ts (renamed from shared/extra-utils/feeds/feeds-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/feeds/index.ts (renamed from shared/extra-utils/feeds/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/index.ts | 15 | ||||
-rw-r--r-- | shared/server-commands/logs/index.ts (renamed from shared/extra-utils/logs/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/logs/logs-command.ts (renamed from shared/extra-utils/logs/logs-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/checks.ts (renamed from shared/extra-utils/miscs/checks.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/generate.ts (renamed from shared/extra-utils/miscs/generate.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/index.ts (renamed from shared/extra-utils/miscs/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/sql-command.ts (renamed from shared/extra-utils/miscs/sql-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/tests.ts (renamed from shared/extra-utils/miscs/tests.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/miscs/webtorrent.ts (renamed from shared/extra-utils/miscs/webtorrent.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/index.ts (renamed from shared/extra-utils/mock-servers/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-429.ts (renamed from shared/extra-utils/mock-servers/mock-429.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-email.ts (renamed from shared/extra-utils/mock-servers/mock-email.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-instances-index.ts (renamed from shared/extra-utils/mock-servers/mock-instances-index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-joinpeertube-versions.ts (renamed from shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-object-storage.ts (renamed from shared/extra-utils/mock-servers/mock-object-storage.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-plugin-blocklist.ts (renamed from shared/extra-utils/mock-servers/mock-plugin-blocklist.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/mock-proxy.ts (renamed from shared/extra-utils/mock-servers/mock-proxy.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/mock-servers/utils.ts (renamed from shared/extra-utils/mock-servers/utils.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/moderation/abuses-command.ts (renamed from shared/extra-utils/moderation/abuses-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/moderation/index.ts (renamed from shared/extra-utils/moderation/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/overviews/index.ts (renamed from shared/extra-utils/overviews/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/overviews/overviews-command.ts (renamed from shared/extra-utils/overviews/overviews-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/requests/check-api-params.ts (renamed from shared/extra-utils/requests/check-api-params.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/requests/index.ts (renamed from shared/extra-utils/requests/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/requests/requests.ts (renamed from shared/extra-utils/requests/requests.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/search/index.ts (renamed from shared/extra-utils/search/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/search/search-command.ts (renamed from shared/extra-utils/search/search-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/config-command.ts (renamed from shared/extra-utils/server/config-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/contact-form-command.ts (renamed from shared/extra-utils/server/contact-form-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/debug-command.ts (renamed from shared/extra-utils/server/debug-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/directories.ts (renamed from shared/extra-utils/server/directories.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/follows-command.ts (renamed from shared/extra-utils/server/follows-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/follows.ts (renamed from shared/extra-utils/server/follows.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/index.ts (renamed from shared/extra-utils/server/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/jobs-command.ts (renamed from shared/extra-utils/server/jobs-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/jobs.ts (renamed from shared/extra-utils/server/jobs.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/object-storage-command.ts (renamed from shared/extra-utils/server/object-storage-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/plugins-command.ts (renamed from shared/extra-utils/server/plugins-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/plugins.ts (renamed from shared/extra-utils/server/plugins.ts) | 2 | ||||
-rw-r--r-- | shared/server-commands/server/redundancy-command.ts (renamed from shared/extra-utils/server/redundancy-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/server.ts (renamed from shared/extra-utils/server/server.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/servers-command.ts (renamed from shared/extra-utils/server/servers-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/servers.ts (renamed from shared/extra-utils/server/servers.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/stats-command.ts (renamed from shared/extra-utils/server/stats-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/server/tracker.ts (renamed from shared/extra-utils/server/tracker.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/shared/abstract-command.ts (renamed from shared/extra-utils/shared/abstract-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/shared/index.ts (renamed from shared/extra-utils/shared/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/socket/index.ts (renamed from shared/extra-utils/socket/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/socket/socket-io-command.ts (renamed from shared/extra-utils/socket/socket-io-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/accounts-command.ts (renamed from shared/extra-utils/users/accounts-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/actors.ts (renamed from shared/extra-utils/users/actors.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/blocklist-command.ts (renamed from shared/extra-utils/users/blocklist-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/index.ts (renamed from shared/extra-utils/users/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/login-command.ts (renamed from shared/extra-utils/users/login-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/login.ts (renamed from shared/extra-utils/users/login.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/notifications-command.ts (renamed from shared/extra-utils/users/notifications-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/notifications.ts (renamed from shared/extra-utils/users/notifications.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/subscriptions-command.ts (renamed from shared/extra-utils/users/subscriptions-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/users/users-command.ts (renamed from shared/extra-utils/users/users-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/blacklist-command.ts (renamed from shared/extra-utils/videos/blacklist-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/captions-command.ts (renamed from shared/extra-utils/videos/captions-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/captions.ts (renamed from shared/extra-utils/videos/captions.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/change-ownership-command.ts (renamed from shared/extra-utils/videos/change-ownership-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/channels-command.ts (renamed from shared/extra-utils/videos/channels-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/channels.ts (renamed from shared/extra-utils/videos/channels.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/comments-command.ts (renamed from shared/extra-utils/videos/comments-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/history-command.ts (renamed from shared/extra-utils/videos/history-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/imports-command.ts (renamed from shared/extra-utils/videos/imports-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/index.ts (renamed from shared/extra-utils/videos/index.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/live-command.ts (renamed from shared/extra-utils/videos/live-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/live.ts (renamed from shared/extra-utils/videos/live.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/playlists-command.ts (renamed from shared/extra-utils/videos/playlists-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/playlists.ts (renamed from shared/extra-utils/videos/playlists.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/services-command.ts (renamed from shared/extra-utils/videos/services-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/streaming-playlists-command.ts (renamed from shared/extra-utils/videos/streaming-playlists-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/streaming-playlists.ts (renamed from shared/extra-utils/videos/streaming-playlists.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/videos-command.ts (renamed from shared/extra-utils/videos/videos-command.ts) | 0 | ||||
-rw-r--r-- | shared/server-commands/videos/videos.ts (renamed from shared/extra-utils/videos/videos.ts) | 0 | ||||
-rw-r--r-- | shared/tsconfig.types.json | 5 | ||||
-rw-r--r-- | shared/typescript-utils/index.ts | 1 | ||||
-rw-r--r-- | shared/typescript-utils/types.ts | 45 |
90 files changed, 67 insertions, 17 deletions
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts index 4b3636d06..5710c5ab5 100644 --- a/shared/extra-utils/index.ts +++ b/shared/extra-utils/index.ts | |||
@@ -1,15 +1 @@ | |||
1 | export * from './bulk' | export * from './ffprobe' | |
2 | export * from './cli' | ||
3 | export * from './custom-pages' | ||
4 | export * from './feeds' | ||
5 | export * from './logs' | ||
6 | export * from './miscs' | ||
7 | export * from './mock-servers' | ||
8 | export * from './moderation' | ||
9 | export * from './overviews' | ||
10 | export * from './requests' | ||
11 | export * from './search' | ||
12 | export * from './server' | ||
13 | export * from './socket' | ||
14 | export * from './users' | ||
15 | export * from './videos' | ||
diff --git a/shared/extra-utils/bulk/bulk-command.ts b/shared/server-commands/bulk/bulk-command.ts index b5c5673ce..b5c5673ce 100644 --- a/shared/extra-utils/bulk/bulk-command.ts +++ b/shared/server-commands/bulk/bulk-command.ts | |||
diff --git a/shared/extra-utils/bulk/index.ts b/shared/server-commands/bulk/index.ts index 391597243..391597243 100644 --- a/shared/extra-utils/bulk/index.ts +++ b/shared/server-commands/bulk/index.ts | |||
diff --git a/shared/extra-utils/cli/cli-command.ts b/shared/server-commands/cli/cli-command.ts index ab9738174..ab9738174 100644 --- a/shared/extra-utils/cli/cli-command.ts +++ b/shared/server-commands/cli/cli-command.ts | |||
diff --git a/shared/extra-utils/cli/index.ts b/shared/server-commands/cli/index.ts index 91b5abfbe..91b5abfbe 100644 --- a/shared/extra-utils/cli/index.ts +++ b/shared/server-commands/cli/index.ts | |||
diff --git a/shared/extra-utils/custom-pages/custom-pages-command.ts b/shared/server-commands/custom-pages/custom-pages-command.ts index cd869a8de..cd869a8de 100644 --- a/shared/extra-utils/custom-pages/custom-pages-command.ts +++ b/shared/server-commands/custom-pages/custom-pages-command.ts | |||
diff --git a/shared/extra-utils/custom-pages/index.ts b/shared/server-commands/custom-pages/index.ts index 58aed04f2..58aed04f2 100644 --- a/shared/extra-utils/custom-pages/index.ts +++ b/shared/server-commands/custom-pages/index.ts | |||
diff --git a/shared/extra-utils/feeds/feeds-command.ts b/shared/server-commands/feeds/feeds-command.ts index 3c95f9536..3c95f9536 100644 --- a/shared/extra-utils/feeds/feeds-command.ts +++ b/shared/server-commands/feeds/feeds-command.ts | |||
diff --git a/shared/extra-utils/feeds/index.ts b/shared/server-commands/feeds/index.ts index 662a22b6f..662a22b6f 100644 --- a/shared/extra-utils/feeds/index.ts +++ b/shared/server-commands/feeds/index.ts | |||
diff --git a/shared/server-commands/index.ts b/shared/server-commands/index.ts new file mode 100644 index 000000000..4b3636d06 --- /dev/null +++ b/shared/server-commands/index.ts | |||
@@ -0,0 +1,15 @@ | |||
1 | export * from './bulk' | ||
2 | export * from './cli' | ||
3 | export * from './custom-pages' | ||
4 | export * from './feeds' | ||
5 | export * from './logs' | ||
6 | export * from './miscs' | ||
7 | export * from './mock-servers' | ||
8 | export * from './moderation' | ||
9 | export * from './overviews' | ||
10 | export * from './requests' | ||
11 | export * from './search' | ||
12 | export * from './server' | ||
13 | export * from './socket' | ||
14 | export * from './users' | ||
15 | export * from './videos' | ||
diff --git a/shared/extra-utils/logs/index.ts b/shared/server-commands/logs/index.ts index 69452d7f0..69452d7f0 100644 --- a/shared/extra-utils/logs/index.ts +++ b/shared/server-commands/logs/index.ts | |||
diff --git a/shared/extra-utils/logs/logs-command.ts b/shared/server-commands/logs/logs-command.ts index 7b5c66c0c..7b5c66c0c 100644 --- a/shared/extra-utils/logs/logs-command.ts +++ b/shared/server-commands/logs/logs-command.ts | |||
diff --git a/shared/extra-utils/miscs/checks.ts b/shared/server-commands/miscs/checks.ts index 589928997..589928997 100644 --- a/shared/extra-utils/miscs/checks.ts +++ b/shared/server-commands/miscs/checks.ts | |||
diff --git a/shared/extra-utils/miscs/generate.ts b/shared/server-commands/miscs/generate.ts index 93673a063..93673a063 100644 --- a/shared/extra-utils/miscs/generate.ts +++ b/shared/server-commands/miscs/generate.ts | |||
diff --git a/shared/extra-utils/miscs/index.ts b/shared/server-commands/miscs/index.ts index 4474661de..4474661de 100644 --- a/shared/extra-utils/miscs/index.ts +++ b/shared/server-commands/miscs/index.ts | |||
diff --git a/shared/extra-utils/miscs/sql-command.ts b/shared/server-commands/miscs/sql-command.ts index bedb3349b..bedb3349b 100644 --- a/shared/extra-utils/miscs/sql-command.ts +++ b/shared/server-commands/miscs/sql-command.ts | |||
diff --git a/shared/extra-utils/miscs/tests.ts b/shared/server-commands/miscs/tests.ts index 658fe5fd3..658fe5fd3 100644 --- a/shared/extra-utils/miscs/tests.ts +++ b/shared/server-commands/miscs/tests.ts | |||
diff --git a/shared/extra-utils/miscs/webtorrent.ts b/shared/server-commands/miscs/webtorrent.ts index 0683f8893..0683f8893 100644 --- a/shared/extra-utils/miscs/webtorrent.ts +++ b/shared/server-commands/miscs/webtorrent.ts | |||
diff --git a/shared/extra-utils/mock-servers/index.ts b/shared/server-commands/mock-servers/index.ts index 93c00c788..93c00c788 100644 --- a/shared/extra-utils/mock-servers/index.ts +++ b/shared/server-commands/mock-servers/index.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-429.ts b/shared/server-commands/mock-servers/mock-429.ts index 9e0d1281a..9e0d1281a 100644 --- a/shared/extra-utils/mock-servers/mock-429.ts +++ b/shared/server-commands/mock-servers/mock-429.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-email.ts b/shared/server-commands/mock-servers/mock-email.ts index f646c1621..f646c1621 100644 --- a/shared/extra-utils/mock-servers/mock-email.ts +++ b/shared/server-commands/mock-servers/mock-email.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-instances-index.ts b/shared/server-commands/mock-servers/mock-instances-index.ts index 92b12d6f3..92b12d6f3 100644 --- a/shared/extra-utils/mock-servers/mock-instances-index.ts +++ b/shared/server-commands/mock-servers/mock-instances-index.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts b/shared/server-commands/mock-servers/mock-joinpeertube-versions.ts index e7906ea56..e7906ea56 100644 --- a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts +++ b/shared/server-commands/mock-servers/mock-joinpeertube-versions.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-object-storage.ts b/shared/server-commands/mock-servers/mock-object-storage.ts index d135c2631..d135c2631 100644 --- a/shared/extra-utils/mock-servers/mock-object-storage.ts +++ b/shared/server-commands/mock-servers/mock-object-storage.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts b/shared/server-commands/mock-servers/mock-plugin-blocklist.ts index f8a271cba..f8a271cba 100644 --- a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts +++ b/shared/server-commands/mock-servers/mock-plugin-blocklist.ts | |||
diff --git a/shared/extra-utils/mock-servers/mock-proxy.ts b/shared/server-commands/mock-servers/mock-proxy.ts index 75ac79055..75ac79055 100644 --- a/shared/extra-utils/mock-servers/mock-proxy.ts +++ b/shared/server-commands/mock-servers/mock-proxy.ts | |||
diff --git a/shared/extra-utils/mock-servers/utils.ts b/shared/server-commands/mock-servers/utils.ts index 235642439..235642439 100644 --- a/shared/extra-utils/mock-servers/utils.ts +++ b/shared/server-commands/mock-servers/utils.ts | |||
diff --git a/shared/extra-utils/moderation/abuses-command.ts b/shared/server-commands/moderation/abuses-command.ts index 0db32ba46..0db32ba46 100644 --- a/shared/extra-utils/moderation/abuses-command.ts +++ b/shared/server-commands/moderation/abuses-command.ts | |||
diff --git a/shared/extra-utils/moderation/index.ts b/shared/server-commands/moderation/index.ts index b37643956..b37643956 100644 --- a/shared/extra-utils/moderation/index.ts +++ b/shared/server-commands/moderation/index.ts | |||
diff --git a/shared/extra-utils/overviews/index.ts b/shared/server-commands/overviews/index.ts index e19551907..e19551907 100644 --- a/shared/extra-utils/overviews/index.ts +++ b/shared/server-commands/overviews/index.ts | |||
diff --git a/shared/extra-utils/overviews/overviews-command.ts b/shared/server-commands/overviews/overviews-command.ts index 06b4892d2..06b4892d2 100644 --- a/shared/extra-utils/overviews/overviews-command.ts +++ b/shared/server-commands/overviews/overviews-command.ts | |||
diff --git a/shared/extra-utils/requests/check-api-params.ts b/shared/server-commands/requests/check-api-params.ts index 26ba1e913..26ba1e913 100644 --- a/shared/extra-utils/requests/check-api-params.ts +++ b/shared/server-commands/requests/check-api-params.ts | |||
diff --git a/shared/extra-utils/requests/index.ts b/shared/server-commands/requests/index.ts index 501163f92..501163f92 100644 --- a/shared/extra-utils/requests/index.ts +++ b/shared/server-commands/requests/index.ts | |||
diff --git a/shared/extra-utils/requests/requests.ts b/shared/server-commands/requests/requests.ts index b6b9024ed..b6b9024ed 100644 --- a/shared/extra-utils/requests/requests.ts +++ b/shared/server-commands/requests/requests.ts | |||
diff --git a/shared/extra-utils/search/index.ts b/shared/server-commands/search/index.ts index 48dbe8ae9..48dbe8ae9 100644 --- a/shared/extra-utils/search/index.ts +++ b/shared/server-commands/search/index.ts | |||
diff --git a/shared/extra-utils/search/search-command.ts b/shared/server-commands/search/search-command.ts index 0fbbcd6ef..0fbbcd6ef 100644 --- a/shared/extra-utils/search/search-command.ts +++ b/shared/server-commands/search/search-command.ts | |||
diff --git a/shared/extra-utils/server/config-command.ts b/shared/server-commands/server/config-command.ts index 89ae8eb4f..89ae8eb4f 100644 --- a/shared/extra-utils/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts | |||
diff --git a/shared/extra-utils/server/contact-form-command.ts b/shared/server-commands/server/contact-form-command.ts index 0e8fd6d84..0e8fd6d84 100644 --- a/shared/extra-utils/server/contact-form-command.ts +++ b/shared/server-commands/server/contact-form-command.ts | |||
diff --git a/shared/extra-utils/server/debug-command.ts b/shared/server-commands/server/debug-command.ts index 3c5a785bb..3c5a785bb 100644 --- a/shared/extra-utils/server/debug-command.ts +++ b/shared/server-commands/server/debug-command.ts | |||
diff --git a/shared/extra-utils/server/directories.ts b/shared/server-commands/server/directories.ts index e6f72d6fc..e6f72d6fc 100644 --- a/shared/extra-utils/server/directories.ts +++ b/shared/server-commands/server/directories.ts | |||
diff --git a/shared/extra-utils/server/follows-command.ts b/shared/server-commands/server/follows-command.ts index 01ef6f179..01ef6f179 100644 --- a/shared/extra-utils/server/follows-command.ts +++ b/shared/server-commands/server/follows-command.ts | |||
diff --git a/shared/extra-utils/server/follows.ts b/shared/server-commands/server/follows.ts index 698238f29..698238f29 100644 --- a/shared/extra-utils/server/follows.ts +++ b/shared/server-commands/server/follows.ts | |||
diff --git a/shared/extra-utils/server/index.ts b/shared/server-commands/server/index.ts index 76a2099da..76a2099da 100644 --- a/shared/extra-utils/server/index.ts +++ b/shared/server-commands/server/index.ts | |||
diff --git a/shared/extra-utils/server/jobs-command.ts b/shared/server-commands/server/jobs-command.ts index 6636e7e4d..6636e7e4d 100644 --- a/shared/extra-utils/server/jobs-command.ts +++ b/shared/server-commands/server/jobs-command.ts | |||
diff --git a/shared/extra-utils/server/jobs.ts b/shared/server-commands/server/jobs.ts index 34fefd444..34fefd444 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/server-commands/server/jobs.ts | |||
diff --git a/shared/extra-utils/server/object-storage-command.ts b/shared/server-commands/server/object-storage-command.ts index b4de8f4cb..b4de8f4cb 100644 --- a/shared/extra-utils/server/object-storage-command.ts +++ b/shared/server-commands/server/object-storage-command.ts | |||
diff --git a/shared/extra-utils/server/plugins-command.ts b/shared/server-commands/server/plugins-command.ts index 1c44711da..1c44711da 100644 --- a/shared/extra-utils/server/plugins-command.ts +++ b/shared/server-commands/server/plugins-command.ts | |||
diff --git a/shared/extra-utils/server/plugins.ts b/shared/server-commands/server/plugins.ts index 0f5fabd5a..c6316898d 100644 --- a/shared/extra-utils/server/plugins.ts +++ b/shared/server-commands/server/plugins.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { PeerTubeServer } from '../server/server' | 4 | import { PeerTubeServer } from './server' |
5 | 5 | ||
6 | async function testHelloWorldRegisteredSettings (server: PeerTubeServer) { | 6 | async function testHelloWorldRegisteredSettings (server: PeerTubeServer) { |
7 | const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' }) | 7 | const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' }) |
diff --git a/shared/extra-utils/server/redundancy-command.ts b/shared/server-commands/server/redundancy-command.ts index e7a8b3c29..e7a8b3c29 100644 --- a/shared/extra-utils/server/redundancy-command.ts +++ b/shared/server-commands/server/redundancy-command.ts | |||
diff --git a/shared/extra-utils/server/server.ts b/shared/server-commands/server/server.ts index 339b9cabb..339b9cabb 100644 --- a/shared/extra-utils/server/server.ts +++ b/shared/server-commands/server/server.ts | |||
diff --git a/shared/extra-utils/server/servers-command.ts b/shared/server-commands/server/servers-command.ts index 47420c95f..47420c95f 100644 --- a/shared/extra-utils/server/servers-command.ts +++ b/shared/server-commands/server/servers-command.ts | |||
diff --git a/shared/extra-utils/server/servers.ts b/shared/server-commands/server/servers.ts index 21ab9405b..21ab9405b 100644 --- a/shared/extra-utils/server/servers.ts +++ b/shared/server-commands/server/servers.ts | |||
diff --git a/shared/extra-utils/server/stats-command.ts b/shared/server-commands/server/stats-command.ts index 64a452306..64a452306 100644 --- a/shared/extra-utils/server/stats-command.ts +++ b/shared/server-commands/server/stats-command.ts | |||
diff --git a/shared/extra-utils/server/tracker.ts b/shared/server-commands/server/tracker.ts index ed43a5924..ed43a5924 100644 --- a/shared/extra-utils/server/tracker.ts +++ b/shared/server-commands/server/tracker.ts | |||
diff --git a/shared/extra-utils/shared/abstract-command.ts b/shared/server-commands/shared/abstract-command.ts index a57c857fc..a57c857fc 100644 --- a/shared/extra-utils/shared/abstract-command.ts +++ b/shared/server-commands/shared/abstract-command.ts | |||
diff --git a/shared/extra-utils/shared/index.ts b/shared/server-commands/shared/index.ts index e807ab4f7..e807ab4f7 100644 --- a/shared/extra-utils/shared/index.ts +++ b/shared/server-commands/shared/index.ts | |||
diff --git a/shared/extra-utils/socket/index.ts b/shared/server-commands/socket/index.ts index 594329b2f..594329b2f 100644 --- a/shared/extra-utils/socket/index.ts +++ b/shared/server-commands/socket/index.ts | |||
diff --git a/shared/extra-utils/socket/socket-io-command.ts b/shared/server-commands/socket/socket-io-command.ts index c277ead28..c277ead28 100644 --- a/shared/extra-utils/socket/socket-io-command.ts +++ b/shared/server-commands/socket/socket-io-command.ts | |||
diff --git a/shared/extra-utils/users/accounts-command.ts b/shared/server-commands/users/accounts-command.ts index 98d9d5927..98d9d5927 100644 --- a/shared/extra-utils/users/accounts-command.ts +++ b/shared/server-commands/users/accounts-command.ts | |||
diff --git a/shared/extra-utils/users/actors.ts b/shared/server-commands/users/actors.ts index 12c3e078a..12c3e078a 100644 --- a/shared/extra-utils/users/actors.ts +++ b/shared/server-commands/users/actors.ts | |||
diff --git a/shared/extra-utils/users/blocklist-command.ts b/shared/server-commands/users/blocklist-command.ts index 2e7ed074d..2e7ed074d 100644 --- a/shared/extra-utils/users/blocklist-command.ts +++ b/shared/server-commands/users/blocklist-command.ts | |||
diff --git a/shared/extra-utils/users/index.ts b/shared/server-commands/users/index.ts index 460a06f70..460a06f70 100644 --- a/shared/extra-utils/users/index.ts +++ b/shared/server-commands/users/index.ts | |||
diff --git a/shared/extra-utils/users/login-command.ts b/shared/server-commands/users/login-command.ts index 143f72a59..143f72a59 100644 --- a/shared/extra-utils/users/login-command.ts +++ b/shared/server-commands/users/login-command.ts | |||
diff --git a/shared/extra-utils/users/login.ts b/shared/server-commands/users/login.ts index f1df027d3..f1df027d3 100644 --- a/shared/extra-utils/users/login.ts +++ b/shared/server-commands/users/login.ts | |||
diff --git a/shared/extra-utils/users/notifications-command.ts b/shared/server-commands/users/notifications-command.ts index 692420b8b..692420b8b 100644 --- a/shared/extra-utils/users/notifications-command.ts +++ b/shared/server-commands/users/notifications-command.ts | |||
diff --git a/shared/extra-utils/users/notifications.ts b/shared/server-commands/users/notifications.ts index 07ccb0f8d..07ccb0f8d 100644 --- a/shared/extra-utils/users/notifications.ts +++ b/shared/server-commands/users/notifications.ts | |||
diff --git a/shared/extra-utils/users/subscriptions-command.ts b/shared/server-commands/users/subscriptions-command.ts index edc60e612..edc60e612 100644 --- a/shared/extra-utils/users/subscriptions-command.ts +++ b/shared/server-commands/users/subscriptions-command.ts | |||
diff --git a/shared/extra-utils/users/users-command.ts b/shared/server-commands/users/users-command.ts index 90c5f2183..90c5f2183 100644 --- a/shared/extra-utils/users/users-command.ts +++ b/shared/server-commands/users/users-command.ts | |||
diff --git a/shared/extra-utils/videos/blacklist-command.ts b/shared/server-commands/videos/blacklist-command.ts index 3a2ef89ba..3a2ef89ba 100644 --- a/shared/extra-utils/videos/blacklist-command.ts +++ b/shared/server-commands/videos/blacklist-command.ts | |||
diff --git a/shared/extra-utils/videos/captions-command.ts b/shared/server-commands/videos/captions-command.ts index a65ea99e3..a65ea99e3 100644 --- a/shared/extra-utils/videos/captions-command.ts +++ b/shared/server-commands/videos/captions-command.ts | |||
diff --git a/shared/extra-utils/videos/captions.ts b/shared/server-commands/videos/captions.ts index 35e722408..35e722408 100644 --- a/shared/extra-utils/videos/captions.ts +++ b/shared/server-commands/videos/captions.ts | |||
diff --git a/shared/extra-utils/videos/change-ownership-command.ts b/shared/server-commands/videos/change-ownership-command.ts index ad4c726ef..ad4c726ef 100644 --- a/shared/extra-utils/videos/change-ownership-command.ts +++ b/shared/server-commands/videos/change-ownership-command.ts | |||
diff --git a/shared/extra-utils/videos/channels-command.ts b/shared/server-commands/videos/channels-command.ts index e406e570b..e406e570b 100644 --- a/shared/extra-utils/videos/channels-command.ts +++ b/shared/server-commands/videos/channels-command.ts | |||
diff --git a/shared/extra-utils/videos/channels.ts b/shared/server-commands/videos/channels.ts index 756c47453..756c47453 100644 --- a/shared/extra-utils/videos/channels.ts +++ b/shared/server-commands/videos/channels.ts | |||
diff --git a/shared/extra-utils/videos/comments-command.ts b/shared/server-commands/videos/comments-command.ts index f0d163a07..f0d163a07 100644 --- a/shared/extra-utils/videos/comments-command.ts +++ b/shared/server-commands/videos/comments-command.ts | |||
diff --git a/shared/extra-utils/videos/history-command.ts b/shared/server-commands/videos/history-command.ts index 13b7150c1..13b7150c1 100644 --- a/shared/extra-utils/videos/history-command.ts +++ b/shared/server-commands/videos/history-command.ts | |||
diff --git a/shared/extra-utils/videos/imports-command.ts b/shared/server-commands/videos/imports-command.ts index e4944694d..e4944694d 100644 --- a/shared/extra-utils/videos/imports-command.ts +++ b/shared/server-commands/videos/imports-command.ts | |||
diff --git a/shared/extra-utils/videos/index.ts b/shared/server-commands/videos/index.ts index 26e663f46..26e663f46 100644 --- a/shared/extra-utils/videos/index.ts +++ b/shared/server-commands/videos/index.ts | |||
diff --git a/shared/extra-utils/videos/live-command.ts b/shared/server-commands/videos/live-command.ts index 74f5d3089..74f5d3089 100644 --- a/shared/extra-utils/videos/live-command.ts +++ b/shared/server-commands/videos/live-command.ts | |||
diff --git a/shared/extra-utils/videos/live.ts b/shared/server-commands/videos/live.ts index d3665bc90..d3665bc90 100644 --- a/shared/extra-utils/videos/live.ts +++ b/shared/server-commands/videos/live.ts | |||
diff --git a/shared/extra-utils/videos/playlists-command.ts b/shared/server-commands/videos/playlists-command.ts index ce23900d3..ce23900d3 100644 --- a/shared/extra-utils/videos/playlists-command.ts +++ b/shared/server-commands/videos/playlists-command.ts | |||
diff --git a/shared/extra-utils/videos/playlists.ts b/shared/server-commands/videos/playlists.ts index 3dde52bb9..3dde52bb9 100644 --- a/shared/extra-utils/videos/playlists.ts +++ b/shared/server-commands/videos/playlists.ts | |||
diff --git a/shared/extra-utils/videos/services-command.ts b/shared/server-commands/videos/services-command.ts index 06760df42..06760df42 100644 --- a/shared/extra-utils/videos/services-command.ts +++ b/shared/server-commands/videos/services-command.ts | |||
diff --git a/shared/extra-utils/videos/streaming-playlists-command.ts b/shared/server-commands/videos/streaming-playlists-command.ts index 5d40d35cb..5d40d35cb 100644 --- a/shared/extra-utils/videos/streaming-playlists-command.ts +++ b/shared/server-commands/videos/streaming-playlists-command.ts | |||
diff --git a/shared/extra-utils/videos/streaming-playlists.ts b/shared/server-commands/videos/streaming-playlists.ts index 0451c0efe..0451c0efe 100644 --- a/shared/extra-utils/videos/streaming-playlists.ts +++ b/shared/server-commands/videos/streaming-playlists.ts | |||
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index 8ea828b40..8ea828b40 100644 --- a/shared/extra-utils/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts | |||
diff --git a/shared/extra-utils/videos/videos.ts b/shared/server-commands/videos/videos.ts index 2c3464aa8..2c3464aa8 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/server-commands/videos/videos.ts | |||
diff --git a/shared/tsconfig.types.json b/shared/tsconfig.types.json index b01d12e53..73c1cae6c 100644 --- a/shared/tsconfig.types.json +++ b/shared/tsconfig.types.json | |||
@@ -5,5 +5,8 @@ | |||
5 | "stripInternal": true, | 5 | "stripInternal": true, |
6 | "removeComments": false, | 6 | "removeComments": false, |
7 | "emitDeclarationOnly": true | 7 | "emitDeclarationOnly": true |
8 | } | 8 | }, |
9 | "exclude": [ | ||
10 | "server-commands/" | ||
11 | ] | ||
9 | } | 12 | } |
diff --git a/shared/typescript-utils/index.ts b/shared/typescript-utils/index.ts new file mode 100644 index 000000000..c9f6f047d --- /dev/null +++ b/shared/typescript-utils/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './types' | |||
diff --git a/shared/typescript-utils/types.ts b/shared/typescript-utils/types.ts new file mode 100644 index 000000000..bd2a97b98 --- /dev/null +++ b/shared/typescript-utils/types.ts | |||
@@ -0,0 +1,45 @@ | |||
1 | /* eslint-disable @typescript-eslint/array-type */ | ||
2 | |||
3 | export type FunctionPropertyNames<T> = { | ||
4 | [K in keyof T]: T[K] extends Function ? K : never | ||
5 | }[keyof T] | ||
6 | |||
7 | export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>> | ||
8 | |||
9 | export type AttributesOnly<T> = { | ||
10 | [K in keyof T]: T[K] extends Function ? never : T[K] | ||
11 | } | ||
12 | |||
13 | export type PickWith<T, KT extends keyof T, V> = { | ||
14 | [P in KT]: T[P] extends V ? V : never | ||
15 | } | ||
16 | |||
17 | export type PickWithOpt<T, KT extends keyof T, V> = { | ||
18 | [P in KT]?: T[P] extends V ? V : never | ||
19 | } | ||
20 | |||
21 | // https://github.com/krzkaczor/ts-essentials Rocks! | ||
22 | export type DeepPartial<T> = { | ||
23 | [P in keyof T]?: T[P] extends Array<infer U> | ||
24 | ? Array<DeepPartial<U>> | ||
25 | : T[P] extends ReadonlyArray<infer U> | ||
26 | ? ReadonlyArray<DeepPartial<U>> | ||
27 | : DeepPartial<T[P]> | ||
28 | } | ||
29 | |||
30 | type Primitive = string | Function | number | boolean | Symbol | undefined | null | ||
31 | export type DeepOmitHelper<T, K extends keyof T> = { | ||
32 | [P in K]: // extra level of indirection needed to trigger homomorhic behavior | ||
33 | T[P] extends infer TP // distribute over unions | ||
34 | ? TP extends Primitive | ||
35 | ? TP // leave primitives and functions alone | ||
36 | : TP extends any[] | ||
37 | ? DeepOmitArray<TP, K> // Array special handling | ||
38 | : DeepOmit<TP, K> | ||
39 | : never | ||
40 | } | ||
41 | export type DeepOmit<T, K> = T extends Primitive ? T : DeepOmitHelper<T, Exclude<keyof T, K>> | ||
42 | |||
43 | export type DeepOmitArray<T extends any[], K> = { | ||
44 | [P in keyof T]: DeepOmit<T[P], K> | ||
45 | } | ||