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

[WIP] 616 #688

Closed
wants to merge 39 commits into from
Closed

[WIP] 616 #688

wants to merge 39 commits into from

Conversation

PopGoesTheWza
Copy link
Collaborator

Fixes #616

  • [?] npm run test succeeds.
  • npm run lint succeeds.
  • Appropriate changes to README are included in PR.

PopGoesTheWza and others added 30 commits May 14, 2019 00:03
use forEach instead of map when return value is not used (google#614)
* dependencies clean-up

* types for child_process' spawnSync

* types for child_process' spawnSync + options fix

* linting
* relative rootDir support

* relative rootDir support (untrackedFiles behavior changed)

* relative rootDir doc changes
* prettier + sort imports

* splitLines types

* unused package 'connect'

* ucfirst, isOnline types

* ellipsize types

* redundant package 'fs-copy-file-sync'

* removing extra line

* // TODO

* packages dependencies update

* comment fix

* fixes

* nicer ellipsize typing

* better?
* regroup `inquirer` into a single file

* fix typo

* linting

* switch to `find-up`

* switch to `find-up` & `strip-bom`

* dependencies update

* findUp implementation fix

* enum accessor fix

* fs-extra & typescript dependency fix

* linting

* dependencies clean-up (again)

* non any cast
@@ -75,7 +74,6 @@
"multimatch": "^4.0.0",
"normalize-newline": "3.0.0",
"open": "^6.4.0",
"path": "^0.12.7",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path & @types/events packages were erroneously added and are not needed

@@ -7,7 +7,6 @@ import { authorize, getLoggedInEmail } from '../auth';
import { FS_OPTIONS } from '../files';
import { readManifest } from '../manifest';
import { ERROR, LOG, checkIfOnline, hasOauthClientSettings, safeIsOnline } from '../utils';
import { google } from 'googleapis';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

@@ -16,10 +15,10 @@ import { google } from 'googleapis';
* @param {string?} options.creds The location of credentials file.
* @param {boolean?} options.status If true, prints who is logged in instead of doing login.
*/
export default async (options: { localhost?: boolean; creds?: string, status?: boolean }) => {
export default async (options: { localhost?: boolean; creds?: string; status?: boolean }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes below are tslintfixes

@@ -1,11 +1,10 @@
import { async } from 'rxjs/internal/scheduler/async';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erroneous & unused import

@@ -50,6 +50,7 @@ export default async (functionName: string, cmd: { nondev: boolean; params: stri
*/
async function runFunction(functionName: string, params: string[], scriptId: string, devMode: boolean) {
try {
// TODO: @grant what are the issues/risks of not using local auth?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with the run api. Does it requires a local auth and fails if global auth?

import fs from 'fs-extra';
import mkdirp from 'mkdirp';
import multimatch from 'multimatch';
import recursive from 'recursive-readdir';
import { async } from 'rxjs/internal/scheduler/async';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erroneous & unused import

@PopGoesTheWza
Copy link
Collaborator Author

@grant Not sure why is crashed on Node 8 tests.
Still, this PR is more so that you can judge and comment the design principle.

new files:

  • pathproxy.ts the base class to handle reference to config file (file doesn't have to exist, if path points to a folder then default filename is appended, etc.)
  • conf.ts a singleton to manage the pathproxy configuration files (replacing the DOTobject)

The other changes are mostly switching for DOT use to Conf. Handling of auth as being either local or global can be tricky but should be fine.

Pending your feedback (take your time) I'll make the requested changes and add specific tests.

@PopGoesTheWza
Copy link
Collaborator Author

@grant approved?

@grant
Copy link
Contributor

grant commented Aug 21, 2019

Oops. Didn't mean to approve. Just the commander change looked okay.

Looking for a smaller PR.

@PopGoesTheWza
Copy link
Collaborator Author

This PR is not meant to be merged as is. But for you to "preview" what I have in mind and give directions.
I know it will be a rather large PR (unless you choose small kludges & patches) :P

@PopGoesTheWza
Copy link
Collaborator Author

Do you want me to open a cleanup PR with the package updates (commander) and the drop of pre node 8 poly fill?

@grant
Copy link
Contributor

grant commented Aug 21, 2019

Please create smaller PRs that only do 1 thing.
Like bump commander.

Let's continue conversation in an issue or new small PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

environment vars & cli options to specify dotfiles
3 participants