create-bison-app
Advanced tools
{ | ||
"name": "create-bison-app", | ||
"version": "1.12.0-canary.8", | ||
"version": "1.12.0-canary.9", | ||
"description": "Creates a production-ready full-stack Jamstack app", | ||
@@ -62,3 +62,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "1c6878755ecc19634f4f5af0decadf31e2aca0db" | ||
"gitHead": "e7bfe01acfae5c70f2897529a63f1eca0104d9cf" | ||
} |
@@ -8,6 +8,6 @@ /// <reference types="cypress" /> | ||
import { cookies } from '../../lib/cookies'; | ||
import { LOGIN_TOKEN_KEY } from '../../constants'; | ||
import { resetDB, disconnect, setupDB, graphQLRequest } from '../../tests/helpers'; | ||
import * as Factories from '../../tests/factories'; | ||
import { cookies } from '@/lib/cookies'; | ||
import { LOGIN_TOKEN_KEY } from '@/constants'; | ||
import { resetDB, disconnect, setupDB, graphQLRequest } from '@/tests/helpers'; | ||
import * as Factories from '@/tests/factories'; | ||
@@ -14,0 +14,0 @@ declare global { |
@@ -0,6 +1,7 @@ | ||
import '@testing-library/cypress/add-commands'; | ||
import { Prisma, User } from '@prisma/client'; | ||
import '@testing-library/cypress/add-commands'; | ||
import { LOGIN_TOKEN_KEY } from '../../constants'; | ||
import { LoginTaskObject } from '../plugins'; | ||
import { LOGIN_TOKEN_KEY } from '@/constants'; | ||
import { LoginTaskObject } from '@/cypress/plugins'; | ||
@@ -7,0 +8,0 @@ declare global { |
@@ -6,4 +6,4 @@ import { IncomingMessage } from 'http'; | ||
import { prisma } from '../lib/prisma'; | ||
import { verifyAuthHeader } from '../services/auth'; | ||
import { prisma } from '@/lib/prisma'; | ||
import { verifyAuthHeader } from '@/services/auth'; | ||
@@ -10,0 +10,0 @@ /** |
import { inputObjectType, objectType } from 'nexus'; | ||
import { NotFoundError } from '../errors'; | ||
import { NotFoundError } from '@/graphql/errors'; | ||
@@ -5,0 +5,0 @@ // Profile Type |
@@ -5,6 +5,6 @@ import path from 'path'; | ||
import prettierConfig from '../prettier.config'; | ||
import * as types from './modules'; | ||
import prettierConfig from '@/prettier.config'; | ||
const currentDirectory = process.cwd(); | ||
@@ -11,0 +11,0 @@ |
@@ -0,1 +1,11 @@ | ||
const { pathsToModuleNameMapper } = require('ts-jest/utils'); | ||
const { compilerOptions } = require('./tsconfig.json'); | ||
// this creates a module name map based on all the path aliases from tsconfig | ||
// (so you only need to add path aliases in tsconfig, not here). | ||
const moduleNameMapper = compilerOptions.paths | ||
? pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/../' }) | ||
: {}; | ||
const testPathIgnorePatterns = [ | ||
@@ -24,2 +34,3 @@ '<rootDir>/node_modules', | ||
}, | ||
moduleNameMapper, | ||
}; |
@@ -6,6 +6,6 @@ /* eslint-disable no-restricted-globals */ | ||
import { LOGIN_TOKEN_KEY } from '../constants'; | ||
import { cookies } from './cookies'; | ||
import { LOGIN_TOKEN_KEY } from '@/constants'; | ||
export function createApolloClient(ctx?: Record<string, any>) { | ||
@@ -12,0 +12,0 @@ // Apollo needs an absolute URL when in SSR, so determine host |
@@ -9,4 +9,4 @@ import { | ||
import { createContext } from '../../graphql/context'; | ||
import { schema } from '../../graphql/schema'; | ||
import { createContext } from '@/graphql/context'; | ||
import { schema } from '@/graphql/schema'; | ||
@@ -13,0 +13,0 @@ export const GRAPHQL_PATH = '/api/graphql'; |
@@ -1,8 +0,8 @@ | ||
import { hashPassword } from '../../services/auth'; | ||
import { Role } from '../../types'; | ||
import { seedUsers } from '../seeds/users'; | ||
import { prisma } from '../../lib/prisma'; | ||
import { Prisma } from '@prisma/client'; | ||
import { hashPassword } from '@/services/auth'; | ||
import { Role } from '@/types'; | ||
import { seedUsers } from '@/prisma/seeds/users'; | ||
import { prisma } from '@/lib/prisma'; | ||
// HR: Hey, we've had a few more employees join -- can you create an account for them?! | ||
@@ -9,0 +9,0 @@ |
import { Prisma, Role } from '@prisma/client'; | ||
import { hashPassword } from '../../../services/auth'; | ||
import { hashPassword } from '@/services/auth'; | ||
// ********************************************* | ||
@@ -5,0 +5,0 @@ // ** DEVELOPMENT DATA SET |
import { Prisma } from '@prisma/client'; | ||
import { prisma } from '../../../lib/prisma'; | ||
import { User } from '../../../types'; | ||
import { prisma } from '@/lib/prisma'; | ||
import { User } from '@/types'; | ||
@@ -6,0 +6,0 @@ type SeedUserResult = Pick<User, 'id' | 'email'>; |
import { Role, Profile, User } from '@prisma/client'; | ||
import { Context } from '../graphql/context'; | ||
import { Context } from '@/graphql/context'; | ||
@@ -5,0 +5,0 @@ /** |
import Chance from 'chance'; | ||
import { Role, Prisma } from '@prisma/client'; | ||
import { buildPrismaIncludeFromAttrs } from '../helpers/buildPrismaIncludeFromAttrs'; | ||
import { prisma } from '../../lib/prisma'; | ||
import { hashPassword } from '../../services/auth'; | ||
import { buildPrismaIncludeFromAttrs } from '@/tests/helpers/buildPrismaIncludeFromAttrs'; | ||
import { prisma } from '@/lib/prisma'; | ||
import { hashPassword } from '@/services/auth'; | ||
@@ -8,0 +8,0 @@ const chance = new Chance(); |
import request from 'supertest'; | ||
import { User } from '@prisma/client'; | ||
import server, { GRAPHQL_PATH } from '../../pages/api/graphql'; | ||
import { appJwtForUser } from '../../services/auth'; | ||
import { disconnect } from '../../lib/prisma'; | ||
import server, { GRAPHQL_PATH } from '@/pages/api/graphql'; | ||
import { appJwtForUser } from '@/services/auth'; | ||
import { disconnect } from '@/lib/prisma'; | ||
@@ -8,0 +8,0 @@ /** A convenience method to call graphQL queries */ |
@@ -1,4 +0,4 @@ | ||
export { prisma, connect, disconnect } from '../../lib/prisma'; | ||
export { prisma, connect, disconnect } from '@/lib/prisma'; | ||
export * from './graphQLRequest'; | ||
export * from './db'; | ||
export * from './buildPrismaIncludeFromAttrs'; |
import { GraphQLError } from 'graphql'; | ||
import { resetDB, disconnect, graphQLRequestAsUser } from '../../helpers'; | ||
import { UserFactory } from '../../factories/user'; | ||
import { Role, UserCreateInput } from '../../../types'; | ||
import { resetDB, disconnect, graphQLRequestAsUser } from '@/tests/helpers'; | ||
import { UserFactory } from '@/tests/factories/user'; | ||
import { Role, UserCreateInput } from '@/types'; | ||
@@ -7,0 +7,0 @@ beforeEach(async () => resetDB()); |
import { GraphQLError } from 'graphql'; | ||
import { graphQLRequest, resetDB, disconnect } from '../../helpers'; | ||
import { UserFactory } from '../../factories/user'; | ||
import { LoginMutationVariables } from '../../../types'; | ||
import { graphQLRequest, resetDB, disconnect } from '@/tests/helpers'; | ||
import { UserFactory } from '@/tests/factories/user'; | ||
import { LoginMutationVariables } from '@/types'; | ||
@@ -7,0 +7,0 @@ beforeEach(async () => resetDB()); |
@@ -1,3 +0,3 @@ | ||
import { graphQLRequest, graphQLRequestAsUser, resetDB, disconnect } from '../../helpers'; | ||
import { UserFactory } from '../../factories/user'; | ||
import { graphQLRequest, graphQLRequestAsUser, resetDB, disconnect } from '@/tests/helpers'; | ||
import { UserFactory } from '@/tests/factories/user'; | ||
@@ -4,0 +4,0 @@ beforeEach(async () => resetDB()); |
@@ -5,4 +5,4 @@ import { Role } from '@prisma/client'; | ||
import { graphQLRequest, resetDB, disconnect } from '../../helpers'; | ||
import { UserFactory } from '../../factories/user'; | ||
import { graphQLRequest, resetDB, disconnect } from '@/tests/helpers'; | ||
import { UserFactory } from '@/tests/factories/user'; | ||
@@ -9,0 +9,0 @@ const chance = new Chance(); |
import { Role } from '@prisma/client'; | ||
import { GraphQLError } from 'graphql'; | ||
import { graphQLRequest, graphQLRequestAsUser, resetDB, disconnect } from '../../helpers'; | ||
import { UserFactory } from '../../factories/user'; | ||
import { User, UserWhereUniqueInput } from '../../../types'; | ||
import { graphQLRequest, graphQLRequestAsUser, resetDB, disconnect } from '@/tests/helpers'; | ||
import { UserFactory } from '@/tests/factories/user'; | ||
import { User, UserWhereUniqueInput } from '@/types'; | ||
@@ -8,0 +8,0 @@ beforeEach(async () => resetDB()); |
@@ -20,3 +20,7 @@ { | ||
"typeRoots": ["node_modules/@types", "types"], | ||
"rootDir": "." | ||
"rootDir": ".", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
}, | ||
@@ -23,0 +27,0 @@ "include": [".", "next-env.d.ts", "types.ts", "types.d.ts", "**/*.ts", "**/*.tsx"], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
161563
0.25%3030
0.4%