Skip to content

Commit bb04c99

Browse files
FatmeDimitarTachev
authored andcommitted
refactor(preview): rename playgroundQrCodeGenerator to previewQrCodeService
1 parent e6b7968 commit bb04c99

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

lib/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $injector.require("previewAppLiveSyncService", "./services/livesync/playground/p
135135
$injector.require("previewAppPluginsService", "./services/livesync/playground/preview-app-plugins-service");
136136
$injector.require("previewSdkService", "./services/livesync/playground/preview-sdk-service");
137137
$injector.requirePublicClass("previewDevicesService", "./services/livesync/playground/devices/preview-devices-service");
138-
$injector.require("playgroundQrCodeGenerator", "./services/livesync/playground/qr-code-generator");
138+
$injector.require("previewQrCodeService", "./services/livesync/playground/preview-qr-code-service");
139139
$injector.requirePublic("sysInfo", "./sys-info");
140140

141141
$injector.require("iOSNotificationService", "./services/ios-notification-service");

lib/commands/preview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class PreviewCommand implements ICommand {
88
private $networkConnectivityValidator: INetworkConnectivityValidator,
99
private $projectData: IProjectData,
1010
private $options: IOptions,
11-
private $playgroundQrCodeGenerator: IPlaygroundQrCodeGenerator) { }
11+
private $previewQrCodeService: IPreviewQrCodeService) { }
1212

1313
public async execute(): Promise<void> {
1414
await this.$liveSyncService.liveSync([], {
@@ -24,7 +24,7 @@ export class PreviewCommand implements ICommand {
2424
useHotModuleReload: this.$options.hmr
2525
});
2626

27-
await this.$playgroundQrCodeGenerator.generateQrCode({ useHotModuleReload: this.$options.hmr, link: this.$options.link });
27+
await this.$previewQrCodeService.generateQrCode({ useHotModuleReload: this.$options.hmr, link: this.$options.link });
2828
}
2929

3030
public async canExecute(args: string[]): Promise<boolean> {

lib/definitions/preview-app-livesync.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare global {
2222
getExternalPlugins(device: Device): string[];
2323
}
2424

25-
interface IPlaygroundQrCodeGenerator {
25+
interface IPreviewQrCodeService {
2626
generateQrCode(options: IGenerateQrCodeOptions): Promise<void>;
2727
}
2828

lib/services/livesync/playground/qr-code-generator.ts renamed to lib/services/livesync/playground/preview-qr-code-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as util from "util";
22
import { EOL } from "os";
33
import { PlaygroundStoreUrls } from "./preview-app-constants";
44

5-
export class PlaygroundQrCodeGenerator implements IPlaygroundQrCodeGenerator {
5+
export class PreviewQrCodeService implements IPreviewQrCodeService {
66
constructor(private $previewSdkService: IPreviewSdkService,
77
private $httpClient: Server.IHttpClient,
88
private $qrCodeTerminalService: IQrCodeTerminalService,
@@ -39,4 +39,4 @@ To scan the QR code and deploy your app on a device, you need to have the \`Nati
3939
}
4040
}
4141
}
42-
$injector.register("playgroundQrCodeGenerator", PlaygroundQrCodeGenerator);
42+
$injector.register("previewQrCodeService", PreviewQrCodeService);

lib/services/platform-environment-requirements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
1313
private $staticConfig: IStaticConfig,
1414
private $analyticsService: IAnalyticsService,
1515
private $injector: IInjector,
16-
private $playgroundQrCodeGenerator: IPlaygroundQrCodeGenerator) { }
16+
private $previewQrCodeService: IPreviewQrCodeService) { }
1717

1818
@cache()
1919
private get $liveSyncService(): ILiveSyncService {
@@ -194,7 +194,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
194194
useHotModuleReload: options.hmr
195195
});
196196

197-
await this.$playgroundQrCodeGenerator.generateQrCode({ useHotModuleReload: options.hmr, link: options.link });
197+
await this.$previewQrCodeService.generateQrCode({ useHotModuleReload: options.hmr, link: options.link });
198198
}
199199
}
200200

test/services/platform-environment-requirements.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function createTestInjector() {
2828
testInjector.register("platformEnvironmentRequirements", PlatformEnvironmentRequirements);
2929
testInjector.register("staticConfig", { SYS_REQUIREMENTS_LINK: "" });
3030
testInjector.register("nativeScriptCloudExtensionService", {});
31-
testInjector.register("playgroundQrCodeGenerator", {});
31+
testInjector.register("previewQrCodeService", {});
3232

3333
return testInjector;
3434
}

0 commit comments

Comments
 (0)