Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate top index functions #144

Merged
merged 26 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c6d2536
Make change to assume dest folder. Delete 2 old tests that looked for…
MilapNaik Jan 2, 2024
2ba8eca
Sort files
MilapNaik Jan 2, 2024
cc92e04
Update src/RokuDeploy.ts
MilapNaik Jan 16, 2024
9bbd579
Removed redundant entry.dest is null situation
MilapNaik Jan 17, 2024
460cbf6
Added a few commands, not all are working correctly
MilapNaik Jan 19, 2024
de269ed
Merge branch 'v4' into add-cli-commands
MilapNaik Jan 19, 2024
7b9ee29
Merge branch 'fix-src-dest-handling' into add-cli-commands
MilapNaik Jan 19, 2024
6db962a
Move commands to their own file
MilapNaik Jan 31, 2024
20eb21f
More command files
MilapNaik Feb 1, 2024
4e4b66a
Change commands to help with tests
MilapNaik Feb 1, 2024
2b809e6
Add testing suite for all cli (2 tests are not working)
MilapNaik Feb 2, 2024
13f2ca4
Updated cli file after adding in commands and tests
MilapNaik Feb 2, 2024
2d13441
Fixed a few test cases
MilapNaik Feb 2, 2024
09a275f
Change name and input of table helper
MilapNaik Feb 2, 2024
c7b395d
Delete all functions, start fixing errors that pop up
MilapNaik Feb 2, 2024
52b1bc0
Changed name of toTable
MilapNaik Feb 6, 2024
5395ada
Merge branch 'add-cli-commands' into eliminate-top-index-functions
MilapNaik Feb 6, 2024
f3a0c56
Make test for objectToTable
MilapNaik Feb 6, 2024
2d9d326
Merge branch 'add-cli-commands' into eliminate-top-index-functions
MilapNaik Feb 6, 2024
b5f41ca
add yargs to pacjage.json
MilapNaik Feb 6, 2024
4b95943
add package-lock.json
MilapNaik Feb 6, 2024
b6c6223
add new line at eof
MilapNaik Feb 6, 2024
f15f295
Add test for coverage, also remove an unncessary '?'
MilapNaik Feb 6, 2024
24dae35
Merge branch 'add-cli-commands' into eliminate-top-index-functions
MilapNaik Feb 6, 2024
ced32dd
Merge branch 'v4' into eliminate-top-index-functions
MilapNaik Feb 6, 2024
fdd918a
last merge change
MilapNaik Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
};