[Shore] fix project imports
This commit is contained in:
1 parent
1f36480b07
commit
115b1798e0
45 files changed
+141
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import "LoadingMessages.bs"
|
||||
import "pkg:/source/Dialog.bs"
|
||||
import "pkg:/source/Logger.bs"
|
||||
import "pkg:/source/Manifest.bs"
|
||||
import "pkg:/source/Registry.bs"
|
||||
|
||||
function Init() as void
|
||||
m.scene = m.top.getScene()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace DialogUtils
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/RemoteKeys.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function InitializeLongPress(keys as object, duration = 1.0 as float)
|
||||
longPressKeyMap = {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpUtils.bs"
|
||||
import "pkg:/source/services/XmlObject.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import "pkg:/components/Services/Innertube/Context.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
function CreateBrowseRequest(browseId as string, clienType as Innertube.ClientType, params = "" as string, continuation = "" as string) as object
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/Innertube/Constants.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/ObjectUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/components/Services/Innertube/NodesParser.bs"
|
||||
import "pkg:/source/utils/ObjectUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import "pkg:/components/Services/Innertube/Context.bs"
|
||||
import "pkg:/components/Services/Innertube/NodesParser.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
import "pkg:/source/utils/ObjectUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
function CreatePlayerRequest(videoId as string, ctt as string) as object
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import "pkg:/components/Services/Innertube/Context.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
|
||||
namespace Innertube
|
||||
function CreateResolveUrlRequest(url as string) as object
|
||||
deviceInfo = CreateObject("roDeviceInfo")
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import "pkg:/components/Services/Innertube/Context.bs"
|
||||
import "pkg:/components/Services/Innertube/Parser.bs"
|
||||
import "pkg:/components/Services/Innertube/SearchFilters.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Innertube
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import "pkg:/source/utils/Locale.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace LoungeDeviceConnected
|
||||
const NOTIFICATION_NODE_ID = "DeviceConnectedNotification"
|
||||
|
||||
@@ -2,6 +2,7 @@ import "pkg:/components/Services/SponsorBlock/Notifications/SponsorBlockNotifica
|
||||
import "pkg:/components/Services/SponsorBlock/SponsorBlockService.bs"
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "VideoPlayer.bs"
|
||||
|
||||
namespace SponsorBlock
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
enum MinimizeState
|
||||
None ' None is not a valid state, but it is the default value pre-initialization
|
||||
Minimizing
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import "pkg:/source/utils/DisposableObserve.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
enum PlayerUiState
|
||||
None ' None is not a valid state, but it is the default value pre-initialization
|
||||
FadingIn
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
import "pkg:/source/utils/FocusManagement.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
|
||||
namespace VideoQueueUtils
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/BookmarksService/BookmarksServiceUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/RegistryUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/CacheUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import "pkg:/components/Services/Dash/DashManifest.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
import "pkg:/source/services/XmlObject.bs"
|
||||
import "pkg:/source/utils/MessagePortUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/services/HttpClient.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Screens/HomeScreen/HomeScreenUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class HomeRouter extends HttpRouter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/CryptoUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/Innertube/InnertubeService.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/RegistryUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class PreferencesRouter extends HttpRouter
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class ProfilesRouter extends HttpRouter
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
#const LOG_EXPORT_CODE = false
|
||||
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/RegistryUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/TimeUtils.bs"
|
||||
|
||||
const REGISTRY_EXPORT_VERSION = 1
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "pkg:/components/Services/SearchHistory/SearchHistoryUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/MessagePortUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
import "pkg:/components/VideoQueue/VideoQueueUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/MathUtils.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -2,6 +2,7 @@ import "pkg:/components/ChannelView/ChannelUtils.bs"
|
||||
import "pkg:/components/PlaylistView/PlaylistUtils.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
import "pkg:/components/VideoQueue/VideoQueueUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "HttpRequest.bs"
|
||||
import "HttpResponse.bs"
|
||||
import "HttpSettings.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpConnectionState.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import "HttpRequestState.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpConnection.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
import "pkg:/source/utils/UrlUtils.bs"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpConnection.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpServer.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpSettings.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/TimeUtils.bs"
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpConnection.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRequest.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpResponse.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class HttpRouter
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class CorsMiddleware extends HttpRouter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "EtagUtils.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/CryptoUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
class EtagUtils
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRequest.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpResponse.bs"
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
import "WebSocketConnectionState.bs"
|
||||
import "WebSocketFrame.bs"
|
||||
import "WebSocketServer.bs"
|
||||
|
||||
namespace Web
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import "pkg:/components/Web/WebServer/Http/HttpRouter.bs"
|
||||
import "pkg:/source/utils/CryptoUtils.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
namespace Http
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// This plugin validates missing imports in bs files
|
||||
// The idea is for each script, create a dummy component that only imports the script
|
||||
// Then the linter will detect if there are undefined symbols not imported in the component.
|
||||
// There are some false positives, and the approach is "weird", but it works for now.
|
||||
// Plugin not used by default.
|
||||
|
||||
import {
|
||||
BscFile,
|
||||
CompilerPlugin,
|
||||
isBrsFile,
|
||||
} from 'brighterscript';
|
||||
import { existsSync } from 'fs-extra';
|
||||
|
||||
export class ImportValidationPlugin implements CompilerPlugin {
|
||||
public name = 'ImportValidationPlugin';
|
||||
|
||||
afterFileParse(file: BscFile) {
|
||||
if (!isBrsFile(file)) {
|
||||
return
|
||||
}
|
||||
|
||||
// Skip generated files
|
||||
if (!existsSync(file.srcPath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.generateXmlComponent(file);
|
||||
}
|
||||
|
||||
generateXmlComponent(file: BscFile) {
|
||||
const path = file.pkgPath;
|
||||
const name = path.split('/').pop().replace('.bs', '') + `TestComponent${path.length}`;
|
||||
const content = `<component name="${name}" extends="Node">
|
||||
<script type="text/brightscript" uri="pkg:/${file.pkgPath}" />
|
||||
</component>`
|
||||
|
||||
file.program.setFile(`${path}.TestComponent.xml`, content);
|
||||
}
|
||||
}
|
||||
|
||||
export default () => {
|
||||
return new ImportValidationPlugin();
|
||||
};
|
||||
Reference in new issue
Block a user