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

fix(cli): Handle importing optional setup auth commands #6997

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Nov 30, 2022

We're starting to move the auth providers out of the auth-provider-* packages. See...

This PR adds basic import handling to the setup auth command so that it doesn't break when the auth setup commands are fully removed as CLI dependencies. This could be a preliminary version of plugins where the set of plugins available is hardcoded. But this is mostly just to keep things from breaking for now.

@jtoar jtoar added the release:fix This PR is a fix label Nov 30, 2022
@jtoar jtoar marked this pull request as draft November 30, 2022 20:24
@jtoar jtoar force-pushed the ds-make-some-auth-providers-optional branch from 6d17cd0 to c39e3e4 Compare November 30, 2022 20:37
@jtoar jtoar changed the title fix(cli): try catch import optional providers fix(cli): Handle importing optional setup auth commands Nov 30, 2022
@jtoar jtoar added the fixture-ok Override the test project fixture check label Nov 30, 2022
@jtoar jtoar force-pushed the ds-make-some-auth-providers-optional branch from 7324d87 to 77c27f3 Compare November 30, 2022 22:54
@jtoar jtoar marked this pull request as ready for review November 30, 2022 22:54
@@ -5,9 +5,10 @@ import {
standardAuthHandler,
} from '@redwoodjs/cli-helpers'

export const command = 'azureActiveDirectory'
export const command = 'azure-active-directory'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was getting this yargs error when it was camel cased:

YError: Invalid first argument. Expected string or array or object but received undefined.
    at c (/Users/dom/prjcts/redwood/redwood-app-2/node_modules/yargs/build/index.cjs:1:2269)
    at /Users/dom/prjcts/redwood/redwood-app-2/node_modules/yargs/build/index.cjs:1:1986
    at Array.forEach (<anonymous>)
    at h (/Users/dom/prjcts/redwood/redwood-app-2/node_modules/yargs/build/index.cjs:1:1906)
    at Xt.command (/Users/dom/prjcts/redwood/redwood-app-2/node_modules/yargs/build/index.cjs:1:32560)
    at addSetupCommand (/Users/dom/prjcts/redwood/redwood-app-2/node_modules/@redwoodjs/cli/dist/commands/setup/auth/auth.js:61:24)
    at async builder (/Users/dom/prjcts/redwood/redwood-app-2/node_modules/@redwoodjs/cli/dist/commands/setup/auth/auth.js:65:5)

@jtoar jtoar enabled auto-merge (squash) November 30, 2022 22:58
@jtoar jtoar merged commit 99c8633 into main Nov 30, 2022
@jtoar jtoar deleted the ds-make-some-auth-providers-optional branch November 30, 2022 23:29
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Nov 30, 2022
@redwoodjs-bot
Copy link

redwoodjs-bot bot commented Nov 30, 2022

🔔 @jtoar, @Tobbe—I couldn't cherry pick this one. If you want it in the next release, you'll have to cherry pick it manually.

dac09 added a commit that referenced this pull request Dec 6, 2022
…xperimental-vite-optin

* 'main' of github.com:redwoodjs/redwood: (26 commits)
  Compress v1 (1.0-1.5) docs to v1.x (#7025)
  Ch4: Deployment - Updating Environment variable section (#6970)
  fix(deps): update dependency systeminformation to v5.16.0 (#7011)
  fix(deps): update graphqlcodegenerator monorepo (#7005)
  fix(deps): update dependency concurrently to v7.6.0 (#7006)
  fix(deps): update dependency mini-css-extract-plugin to v2.7.1 (#7007)
  fix(deps): update dependency eslint to v8.28.0 (#7008)
  fix(deps): update dependency prettier to v2.8.0 (#7009)
  fix(deps): update dependency react-hook-form to v7.40.0 (#7010)
  chore(deps): update dependency lerna to v6.1.0 (#6993)
  fix(deps): update dependency @fastify/http-proxy to v8.4.0 (#6995)
  fix(deps): update prisma monorepo to v4.7.0 (#6999)
  fix(deps): update dependency jest-watch-typeahead to v2.2.1 (#6991)
  fix(deps): update dependency listr2 to v5.0.6 (#6989)
  chore(deps): update dependency cypress to v11.2.0 (#6992)
  chore(deps): update dependency nx to v15.2.4 (#6994)
  fix(deps): update dependency msw to v0.49.1 (#6996)
  auth-firebase-* (#6987)
  fix(cli): Handle importing optional setup auth commands (#6997)
  fix(deps): update dependency eslint-plugin-react to v7.31.11 (#6990)
  ...
@jtoar jtoar modified the milestones: next-release, v4.0.0 Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixture-ok Override the test project fixture check release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants