@cedarjs/auth-dbauth-setup 7.0.0-canary.3079 → 7.0.0-canary.3082

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"setupHandler.d.ts","sourceRoot":"","sources":["../src/setupHandler.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAwBtC,wBAAsB,OAAO,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,KAAK,EAAE,QAAQ,GAChB,EAAE,IAAI,iBA0GN;AAsED,eAAO,MAAM,yBAAyB;;;CAuCrC,CAAA"}
1
+ {"version":3,"file":"setupHandler.d.ts","sourceRoot":"","sources":["../src/setupHandler.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAwBtC,wBAAsB,OAAO,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,KAAK,EAAE,QAAQ,GAChB,EAAE,IAAI,iBA0GN;AA4ED,eAAO,MAAM,yBAAyB;;;CAuCrC,CAAA"}
@@ -1,7 +1,11 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import prompts from "prompts";
4
- import { getGraphqlPath, standardAuthHandler } from "@cedarjs/cli-helpers";
4
+ import {
5
+ getGraphqlPath,
6
+ requireTTYOrExit,
7
+ standardAuthHandler
8
+ } from "@cedarjs/cli-helpers";
5
9
  import {
6
10
  apiPackages as oauthApiPackages,
7
11
  configureOAuthProvidersTask,
@@ -134,6 +138,7 @@ async function handler({
134
138
  }
135
139
  async function shouldIncludeWebAuthn(webauthn) {
136
140
  if (webauthn === null) {
141
+ requireTTYOrExit("--webauthn or --webauthn=false");
137
142
  const webAuthnResponse = await prompts({
138
143
  type: "confirm",
139
144
  name: "answer",
@@ -152,6 +157,7 @@ async function shouldCreateUserModel(createUserModel) {
152
157
  return true;
153
158
  }
154
159
  if (createUserModel === null && !hasUserModel) {
160
+ requireTTYOrExit("--createUserModel or --createUserModel=false");
155
161
  const createModelResponse = await prompts({
156
162
  type: "confirm",
157
163
  name: "answer",
@@ -164,6 +170,7 @@ async function shouldCreateUserModel(createUserModel) {
164
170
  }
165
171
  async function shouldGenerateDbAuthPages(generateAuthPages) {
166
172
  if (generateAuthPages === null && !hasAuthPages()) {
173
+ requireTTYOrExit("--generateAuthPages or --generateAuthPages=false");
167
174
  const generateAuthPagesResponse = await prompts({
168
175
  type: "confirm",
169
176
  name: "answer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth-dbauth-setup",
3
- "version": "7.0.0-canary.3079",
3
+ "version": "7.0.0-canary.3082",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -23,14 +23,14 @@
23
23
  "test:watch": "yarn test --watch"
24
24
  },
25
25
  "dependencies": {
26
- "@cedarjs/cli-helpers": "7.0.0-canary.3079",
27
- "@cedarjs/project-config": "7.0.0-canary.3079",
26
+ "@cedarjs/cli-helpers": "7.0.0-canary.3082",
27
+ "@cedarjs/project-config": "7.0.0-canary.3082",
28
28
  "@prisma/internals": "7.10.0",
29
29
  "prompts": "2.4.2",
30
30
  "termi-link": "1.1.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@cedarjs/framework-tools": "7.0.0-canary.3079",
33
+ "@cedarjs/framework-tools": "7.0.0-canary.3082",
34
34
  "@types/yargs": "17.0.35",
35
35
  "memfs": "4.68.2",
36
36
  "nodemon": "3.1.14",