Skip to content

Commit

Permalink
Eliminate top index functions (#144)
Browse files Browse the repository at this point in the history
* Make change to assume dest folder. Delete 2 old tests that looked for old behavior, add 2 more tests that look for new behavior

* Sort files

* Update src/RokuDeploy.ts

Co-authored-by: Bronley Plumb <[email protected]>

* Removed redundant entry.dest is null situation

* Added a few commands, not all are working correctly

* Move commands to their own file

* More command files

* Change commands to help with tests

* Add testing suite for all cli (2 tests are not working)

* Updated cli file after adding in commands and tests

* Fixed a few test cases

* Change name and input of table helper

* Delete all functions, start fixing errors that pop up

* Changed name of toTable

* Make test for objectToTable

* add yargs to pacjage.json

* add package-lock.json

* add new line at eof

* Add test for coverage, also remove an unncessary '?'

* last merge change

---------

Co-authored-by: Bronley Plumb <[email protected]>
  • Loading branch information
MilapNaik and TwitchBronBron authored Feb 6, 2024
1 parent 8af51a1 commit 4dfe850
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 54 deletions.
5 changes: 3 additions & 2 deletions src/device.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as assert from 'assert';
import * as fsExtra from 'fs-extra';
import * as rokuDeploy from './index';
import type { RokuDeployOptions } from './index';
import { rokuDeploy } from './index';
import { cwd, expectPathExists, expectThrowsAsync, outDir, rootDir, tempDir, writeFiles } from './testUtils.spec';
import * as dedent from 'dedent';

//these tests are run against an actual roku device. These cannot be enabled when run on the CI server
describe('device', function device() {
let options: rokuDeploy.RokuDeployOptions;
let options: RokuDeployOptions;

beforeEach(() => {
fsExtra.emptyDirSync(tempDir);
Expand Down
52 changes: 0 additions & 52 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,3 @@ export * from './DeviceInfo';

//create a new static instance of RokuDeploy, and export those functions for backwards compatibility
export const rokuDeploy = new RokuDeploy();

let createPackage = RokuDeploy.prototype.createPackage.bind(rokuDeploy);
let deleteInstalledChannel = RokuDeploy.prototype.deleteInstalledChannel.bind(rokuDeploy);
let deploy = RokuDeploy.prototype.deploy.bind(rokuDeploy);
let deployAndSignPackage = RokuDeploy.prototype.deployAndSignPackage.bind(rokuDeploy);
let getDestPath = RokuDeploy.prototype.getDestPath.bind(rokuDeploy);
let getDeviceInfo = RokuDeploy.prototype.getDeviceInfo.bind(rokuDeploy);
let getFilePaths = RokuDeploy.prototype.getFilePaths.bind(rokuDeploy);
let getOptions = RokuDeploy.prototype.getOptions.bind(rokuDeploy);
let getOutputPkgFilePath = RokuDeploy.prototype.getOutputPkgFilePath.bind(rokuDeploy);
let getOutputZipFilePath = RokuDeploy.prototype.getOutputZipFilePath.bind(rokuDeploy);
let normalizeFilesArray = RokuDeploy.prototype.normalizeFilesArray.bind(rokuDeploy);
let normalizeRootDir = RokuDeploy.prototype.normalizeRootDir.bind(rokuDeploy);
let parseManifest = RokuDeploy.prototype.parseManifest.bind(rokuDeploy);
let prepublishToStaging = RokuDeploy.prototype.prepublishToStaging.bind(rokuDeploy);
let pressHomeButton = RokuDeploy.prototype.pressHomeButton.bind(rokuDeploy);
let publish = RokuDeploy.prototype.publish.bind(rokuDeploy);
let rekeyDevice = RokuDeploy.prototype.rekeyDevice.bind(rokuDeploy);
let retrieveSignedPackage = RokuDeploy.prototype.retrieveSignedPackage.bind(rokuDeploy);
let signExistingPackage = RokuDeploy.prototype.signExistingPackage.bind(rokuDeploy);
let stringifyManifest = RokuDeploy.prototype.stringifyManifest.bind(rokuDeploy);
let takeScreenshot = RokuDeploy.prototype.takeScreenshot.bind(rokuDeploy);
let getDevId = RokuDeploy.prototype.getDevId.bind(rokuDeploy);
let zipFolder = RokuDeploy.prototype.zipFolder.bind(rokuDeploy);
let zipPackage = RokuDeploy.prototype.zipPackage.bind(rokuDeploy);

export {
createPackage,
deleteInstalledChannel,
deploy,
deployAndSignPackage,
getDestPath,
getDeviceInfo,
getFilePaths,
getOptions,
getOutputPkgFilePath,
getOutputZipFilePath,
normalizeFilesArray,
normalizeRootDir,
parseManifest,
prepublishToStaging,
pressHomeButton,
publish,
rekeyDevice,
retrieveSignedPackage,
signExistingPackage,
stringifyManifest,
takeScreenshot,
getDevId,
zipFolder,
zipPackage
};

0 comments on commit 4dfe850

Please sign in to comment.