-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable static build of landing page (#1724)
- Loading branch information
1 parent
850bee9
commit 0621a2d
Showing
15 changed files
with
204 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
.yarn/patches/@vue-apollo-composable-npm-4.0.0-beta.1-6fc2bfd7ec.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/package.json b/package.json | ||
index 2cb155979334911508c0647f14fe28fb7ac40295..f9310fdd18a18be20c3c67ebb723b2552de44d4f 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -25,6 +25,10 @@ | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.esm.js", | ||
+ "exports": { | ||
+ "import": "./dist/index.esm.js", | ||
+ "require": "./dist/index.js" | ||
+ }, | ||
"files": [ | ||
"dist" | ||
], |
10 changes: 10 additions & 0 deletions
10
.yarn/patches/@vue-apollo-util-npm-4.0.0-beta.4-ab694c9566.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/dist/esm/errorLog.js b/dist/esm/errorLog.js | ||
index 5965a6704c3e18ef54e4c21564153f0e7a7b1923..002685d42effc1d2ad0ed6612239956b01d47e58 100644 | ||
--- a/dist/esm/errorLog.js | ||
+++ b/dist/esm/errorLog.js | ||
@@ -1,4 +1,4 @@ | ||
-import { print } from 'graphql/language/printer'; | ||
+import { print } from 'graphql/language/printer.mjs'; | ||
export function getErrorMessages(error) { | ||
const messages = []; | ||
const { graphQLErrors, networkError } = error; |
15 changes: 15 additions & 0 deletions
15
.yarn/patches/mount-vue-component-npm-0.10.2-4968f76fd9.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/package.json b/package.json | ||
index 57735c88e8e3ab5e6b9503872b5c39752a8d4c63..a440df371c1e390da3168ab0035b965e2e561b15 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -6,6 +6,10 @@ | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
"types": "./index.d.ts", | ||
+ "exports": { | ||
+ "import": "./dist/index.esm.js", | ||
+ "require": "./dist/index.cjs.js" | ||
+ }, | ||
"scripts": { | ||
"build": "rollup -c", | ||
"preversion": "npm run test && npm run build", |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,13 +160,16 @@ | |
"unist-builder": "^3.0.0", | ||
"remark-parse": "^10.0.1", | ||
"express-session@^1.17.3": "patch:express-session@npm%3A1.17.3#./.yarn/patches/express-session-npm-1.17.3-0819dbe06c.patch", | ||
"@apollo/client@^3.7.0": "patch:@apollo/client@npm%3A3.7.0#./.yarn/patches/@apollo-client-npm-3.7.0-07cf6b7bb6.patch", | ||
"@apollo/client@^3.7.3": "patch:@apollo/client@npm%3A3.7.3#./.yarn/patches/@apollo-client-npm-3.7.3-99f37cd27e.patch", | ||
"tslib": "^2.4.0", | ||
"mount-vue-component@^0.10.2": "patch:mount-vue-component@npm%3A0.10.2#./.yarn/patches/mount-vue-component-npm-0.10.2-4968f76fd9.patch", | ||
"@vue/[email protected]": "patch:@vue/apollo-composable@npm%3A4.0.0-beta.1#./.yarn/patches/@vue-apollo-composable-npm-4.0.0-beta.1-6fc2bfd7ec.patch", | ||
"@nuxt/content": "patch:@nuxt/content@npm%3A2.4.3#./.yarn/patches/@nuxt-content-npm-2.4.3-36a92b2a56.patch", | ||
"uuid@^8.3.0": "^9.0.0", | ||
"uuid@^8.3.2": "^9.0.0", | ||
"eslint-scope@^7.1.1": "patch:eslint-scope@npm%3A7.1.1#./.yarn/patches/eslint-scope-npm-7.1.1-23935eb377.patch", | ||
"eslint-scope@^5.1.1": "patch:eslint-scope@npm%3A7.1.1#./.yarn/patches/eslint-scope-npm-7.1.1-23935eb377.patch" | ||
"eslint-scope@^5.1.1": "patch:eslint-scope@npm%3A7.1.1#./.yarn/patches/eslint-scope-npm-7.1.1-23935eb377.patch", | ||
"@vue/apollo-util@^4.0.0-beta.4": "patch:@vue/apollo-util@npm%3A4.0.0-beta.4#./.yarn/patches/@vue-apollo-util-npm-4.0.0-beta.4-ab694c9566.patch" | ||
}, | ||
"resolutionsComments": { | ||
"@types/react": "Otherwise these types interfere with the types from vite: https://github.com/johnsoncodehk/volar/discussions/592#discussioncomment-1580518", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { gql as gqlNotVerified } from 'graphql-tag' | ||
import { api, root } from '~/test/api-e2e/supertest' | ||
|
||
describe('invalid query', () => { | ||
it('returns an error', async () => { | ||
const { errors, response } = await api() | ||
.query( | ||
gqlNotVerified` | ||
query WrongQueryE2E($id: String) { | ||
user(id: $id) { | ||
id | ||
# eslint-disable-next-line @graphql-eslint/fields-on-correct-type | ||
name | ||
} | ||
} | ||
` | ||
) | ||
.variables({ id: '' }) | ||
|
||
expect(response.statusCode).toBe(400) | ||
expect(response.get('content-type')).toContain('application/json') | ||
expect(errors?.map((error) => error.message)).toMatchInlineSnapshot(` | ||
[ | ||
"Cannot query field \\"name\\" on type \\"User\\".", | ||
"Variable \\"$id\\" of type \\"String\\" used in position expecting type \\"ID!\\".", | ||
] | ||
`) | ||
}) | ||
}) | ||
|
||
describe('request without query', () => { | ||
it('returns an error', async () => { | ||
const response = await root() | ||
.get('/api') | ||
.set('Apollo-Require-Preflight', 'True') | ||
|
||
expect(response.statusCode).toBe(400) | ||
expect(response.text).toContain( | ||
'GraphQL operations must contain a non-empty `query`' | ||
) | ||
}) | ||
}) | ||
|
||
describe('preflight', () => { | ||
it('works', async () => { | ||
const response = await root() | ||
.options('/api') | ||
.set('Origin', 'https://studio.apollographql.com') | ||
.set('Access-Control-Request-Method', 'POST') | ||
|
||
expect(response.body).toStrictEqual({}) | ||
expect(response.statusCode).toBe(204) | ||
expect(response.get('access-control-allow-methods')).toBe( | ||
'GET,POST,OPTIONS' | ||
) | ||
expect(response.get('access-control-allow-origin')).toBe( | ||
'https://studio.apollographql.com' | ||
) | ||
expect(response.get('access-control-allow-headers')).toBe('Content-Type') | ||
}) | ||
|
||
it('works on route with slash', async () => { | ||
const response = await root() | ||
.options('/api/') | ||
.set('Origin', 'https://studio.apollographql.com') | ||
.set('Access-Control-Request-Method', 'POST') | ||
|
||
expect(response.body).toStrictEqual({}) | ||
expect(response.statusCode).toBe(204) | ||
expect(response.get('access-control-allow-methods')).toBe( | ||
'GET,POST,OPTIONS' | ||
) | ||
expect(response.get('access-control-allow-origin')).toBe( | ||
'https://studio.apollographql.com' | ||
) | ||
expect(response.get('access-control-allow-headers')).toBe('Content-Type') | ||
}) | ||
}) |
Oops, something went wrong.