FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor: move ambient const enums into real modules by edusperoni · Pull Request #6089 · NativeScript/nativescript-cli · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (1) .ts  (38) All 2 file types selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 2 additions & 1 deletion lib/commands/build.ts
This file contains hidden or 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
Expand Up @@ -13,7 +13,8 @@ import {
import { IPlatformsDataService } from "../definitions/platform";
import { IBuildController, IBuildDataService } from "../definitions/build";
import { IMigrateController } from "../definitions/migrate";
import { IErrors, OptionType } from "../common/declarations";
import { IErrors } from "../common/declarations";
import { OptionType } from "../common/enums";
import { ICommandParameter, ICommand } from "../common/definitions/commands";
import { injector } from "../common/yok";

Expand Down
1 change: 1 addition & 0 deletions lib/commands/debug.ts
This file contains hidden or 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
Expand Up @@ -17,6 +17,7 @@ import { ICleanupService } from "../definitions/cleanup-service";
import { IInjector } from "../common/definitions/yok";
import { injector } from "../common/yok";
import * as _ from "lodash";
import { SystemWarningsSeverity } from "../definitions/system-warnings";

export class DebugPlatformCommand
extends ValidatePlatformCommandBase
Expand Down
10 changes: 6 additions & 4 deletions lib/commands/deploy.ts
This file contains hidden or 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
Expand Up @@ -10,12 +10,14 @@ import { IPlatformValidationService, IOptions } from "../declarations";
import { IPlatformsDataService } from "../definitions/platform";
import { IMigrateController } from "../definitions/migrate";
import { ICommand, ICommandParameter } from "../common/definitions/commands";
import { OptionType, IErrors } from "../common/declarations";
import { IErrors } from "../common/declarations";
import { OptionType } from "../common/enums";
import { injector } from "../common/yok";

export class DeployOnDeviceCommand
extends ValidatePlatformCommandBase
implements ICommand {
implements ICommand
{
public allowedParameters: ICommandParameter[] = [];

public dashedOptions = {
Expand All @@ -36,13 +38,13 @@ export class DeployOnDeviceCommand
private $mobileHelper: Mobile.IMobileHelper,
$platformsDataService: IPlatformsDataService,
private $deployCommandHelper: DeployCommandHelper,
private $migrateController: IMigrateController
private $migrateController: IMigrateController,
) {
super(
$options,
$platformsDataService,
$platformValidationService,
$projectData
$projectData,
);
this.$projectData.initializeProjectData();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/prepare.ts
This file contains hidden or 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
Expand Up @@ -6,7 +6,7 @@ import { IOptions, IPlatformValidationService } from "../declarations";
import { IPlatformsDataService } from "../definitions/platform";
import { IMigrateController } from "../definitions/migrate";
import { ICommand, ICommandParameter } from "../common/definitions/commands";
import { OptionType } from "../common/declarations";
import { OptionType } from "../common/enums";
import { injector } from "../common/yok";

export class PrepareCommand
Expand Down
51 changes: 24 additions & 27 deletions lib/commands/test.ts
This file contains hidden or 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
Expand Up @@ -9,12 +9,11 @@ import { IPlatformEnvironmentRequirements } from "../definitions/platform";
import { IMigrateController } from "../definitions/migrate";
import { ICommandParameter, ICommand } from "../common/definitions/commands";
import {
OptionType,
IAnalyticsService,
IErrors,
IDictionary,
ErrorCodes,
} from "../common/declarations";
import { ErrorCodes, OptionType } from "../common/enums";
import { ICleanupService } from "../definitions/cleanup-service";
import { injector } from "../common/yok";

Expand Down Expand Up @@ -47,19 +46,18 @@ abstract class TestCommandBase {
sdk: this.$options.sdk,
});

const selectedDeviceForDebug = await this.$devicesService.pickSingleDevice(
{
const selectedDeviceForDebug =
await this.$devicesService.pickSingleDevice({
onlyEmulators: this.$options.emulator,
onlyDevices: this.$options.forDevice,
deviceId: this.$options.device,
}
);
});
devices = [selectedDeviceForDebug];
// const debugData = this.getDebugData(platform, projectData, deployOptions, { device: selectedDeviceForDebug.deviceInfo.identifier });
// await this.$debugService.debug(debugData, this.$options);
} else {
devices = await this.$liveSyncCommandHelper.getDeviceInstances(
this.platform
this.platform,
);
}

Expand All @@ -69,25 +67,26 @@ abstract class TestCommandBase {
this.$options.env.unitTesting = true;

const liveSyncInfo = this.$liveSyncCommandHelper.getLiveSyncData(
this.$projectData.projectDir
this.$projectData.projectDir,
);

const deviceDebugMap: IDictionary<boolean> = {};
devices.forEach(
(device) =>
(deviceDebugMap[device.deviceInfo.identifier] = this.$options.debugBrk)
(deviceDebugMap[device.deviceInfo.identifier] = this.$options.debugBrk),
);

const deviceDescriptors = await this.$liveSyncCommandHelper.createDeviceDescriptors(
devices,
this.platform,
<any>{ deviceDebugMap }
);
const deviceDescriptors =
await this.$liveSyncCommandHelper.createDeviceDescriptors(
devices,
this.platform,
<any>{ deviceDebugMap },
);

await this.$testExecutionService.startKarmaServer(
this.platform,
liveSyncInfo,
deviceDescriptors
deviceDescriptors,
);
// if we got here, it means karma exited with exit code 0 (success)
process.exit(0);
Expand All @@ -100,7 +99,7 @@ abstract class TestCommandBase {
// because the Runtime does not watch for the `/data/local/tmp<appId>-livesync-in-progress` file deletion.
// The App is closing itself after each test execution and the bug will be reproducible on each LiveSync.
this.$errors.fail(
"The `--hmr` option is not supported for this command."
"The `--hmr` option is not supported for this command.",
);
}

Expand All @@ -112,23 +111,21 @@ abstract class TestCommandBase {

this.$projectData.initializeProjectData();
this.$analyticsService.setShouldDispose(
this.$options.justlaunch || !this.$options.watch
this.$options.justlaunch || !this.$options.watch,
);
this.$cleanupService.setShouldDispose(
this.$options.justlaunch || !this.$options.watch
this.$options.justlaunch || !this.$options.watch,
);

const output = await this.$platformEnvironmentRequirements.checkEnvironmentRequirements(
{
const output =
await this.$platformEnvironmentRequirements.checkEnvironmentRequirements({
platform: this.platform,
projectDir: this.$projectData.projectDir,
options: this.$options,
}
);
});

const canStartKarmaServer = await this.$testExecutionService.canStartKarmaServer(
this.$projectData
);
const canStartKarmaServer =
await this.$testExecutionService.canStartKarmaServer(this.$projectData);
if (!canStartKarmaServer) {
this.$errors.fail({
formatStr:
Expand All @@ -154,7 +151,7 @@ class TestAndroidCommand extends TestCommandBase implements ICommand {
protected $cleanupService: ICleanupService,
protected $liveSyncCommandHelper: ILiveSyncCommandHelper,
protected $devicesService: Mobile.IDevicesService,
protected $migrateController: IMigrateController
protected $migrateController: IMigrateController,
) {
super();
}
Expand Down Expand Up @@ -195,7 +192,7 @@ class TestIosCommand extends TestCommandBase implements ICommand {
protected $cleanupService: ICleanupService,
protected $liveSyncCommandHelper: ILiveSyncCommandHelper,
protected $devicesService: Mobile.IDevicesService,
protected $migrateController: IMigrateController
protected $migrateController: IMigrateController,
) {
super();
}
Expand Down
Loading

Back | FazBrowse Home | New Git URL