Skip to content

Commit

Permalink
Merge branch 'master' into new-interface-trust-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamsi authored Feb 27, 2021
2 parents 5c49d29 + f8b814a commit c94b577
Show file tree
Hide file tree
Showing 35 changed files with 777 additions and 141 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-bikes-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystonejs/test-utils': patch
---

Updated `multiAdapterRunners().before()` to return a `context` object when using `setupFromConfig()`.
5 changes: 5 additions & 0 deletions .changeset/fast-meals-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/auth': patch
---

Fixed a bug which prevented accessing the '/init` path from behind a reverse proxy.
5 changes: 5 additions & 0 deletions .changeset/light-scissors-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/fields': minor
---

Added float field type for keystone-next
5 changes: 5 additions & 0 deletions .changeset/mean-lions-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': major
---

Removed `itemId` from `FieldAccessArgs` and no longer pass this value into field level imperative access control rules.
6 changes: 6 additions & 0 deletions .changeset/modern-squids-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystone-next/keystone': major
'@keystone-next/types': major
---

Removed the `context` argument from `KeystoneContext.graphql.raw` and `KeystoneContext.graphql.run`.
5 changes: 5 additions & 0 deletions .changeset/moody-windows-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/auth': patch
---

Updated import of `KeystoneContext` to use top level `types` package API.
5 changes: 5 additions & 0 deletions .changeset/perfect-pillows-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/types': patch
---

Refactored `KeystoneContext` definition to make documentation easier. No functional changes.
5 changes: 5 additions & 0 deletions .changeset/red-boxes-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/website': minor
---

Added access control API docs.
5 changes: 5 additions & 0 deletions .changeset/selfish-singers-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/keystone': major
---

Removed `itemIds` from `FieldAccessArgs` and no longer pass this value into field level imperative access control rules.
5 changes: 5 additions & 0 deletions .changeset/sharp-news-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-next/types': minor
---

Deprecated `KeystoneContext.keystone`.
15 changes: 8 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
filters: |
shouldRunTests:
- '!{{website,docs,examples,packages-next,examples-next,design-system}/**,**/*.md}'
- '!{{website,docs,examples,design-system}/**,**/*.md}'
- run: echo "SHOULD_RUN_TESTS=$SHOULD_RUN" >> $GITHUB_ENV
if: github.event_name == 'pull_request'
env:
Expand Down Expand Up @@ -203,10 +203,11 @@ jobs:
fail-fast: false
matrix:
project:
- test-projects/basic
- test-projects/login
- test-projects/access-control
- test-projects/client-validation
- tests/test-projects/basic
- tests/test-projects/login
- tests/test-projects/access-control
- tests/test-projects/client-validation
- docs-next
steps:
- name: Checkout Repo
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
Expand Down Expand Up @@ -236,9 +237,9 @@ jobs:
- name: Install Dependencies
run: yarn
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- run: yarn --cwd tests/${{ matrix.project }} cypress install
- run: yarn --cwd ${{ matrix.project }} cypress install
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- run: yarn --cwd tests/${{ matrix.project }} cypress:run:ci
- run: yarn --cwd ${{ matrix.project }} cypress:run:ci
if: needs.should_run_tests.outputs.shouldRunTests == 'true'
- uses: actions/upload-artifact@v2
if: failure()
Expand Down
7 changes: 4 additions & 3 deletions docs-next/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ export const Navigation = () => {
<NavItem href="/apis/config">Config API</NavItem>
<NavItem href="/apis/schema">Schema API</NavItem>
<NavItem href="/apis/fields">Fields API</NavItem>
<NavItem href="/apis/access-control" isPlaceholder>
Access Control API
</NavItem>
<NavItem href="/apis/access-control">Access Control API</NavItem>
<NavItem href="/apis/hooks" isPlaceholder>
Hooks API
</NavItem>
Expand All @@ -80,6 +78,9 @@ export const Navigation = () => {
<NavItem href="/apis/graphql" isPlaceholder>
GraphQL API
</NavItem>
<NavItem href="/apis/items" isPlaceholder>
List Item API
</NavItem>
</Section>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions docs-next/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions docs-next/cypress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
videos
screenshots
reports
5 changes: 5 additions & 0 deletions docs-next/cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
10 changes: 10 additions & 0 deletions docs-next/cypress/integration/examples/home_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="cypress" />

describe('basic docs tests', () => {
beforeEach(() => {
cy.visit('http://localhost:8000');
});
it('finds the Welcome content', () => {
cy.contains('Welcome');
});
});
22 changes: 22 additions & 0 deletions docs-next/cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};
25 changes: 25 additions & 0 deletions docs-next/cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions docs-next/cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
7 changes: 6 additions & 1 deletion docs-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"private": true,
"license": "MIT",
"scripts": {
"dev": "next -p 8000"
"dev": "next -p 8000",
"cy:open": "cypress open",
"cy:run": "cypress run",
"cypress:run:ci": "start-server-and-test dev http://localhost:8000 cy:run"
},
"dependencies": {
"@babel/runtime": "^7.12.18",
Expand Down Expand Up @@ -32,6 +35,7 @@
"autoprefixer": "^10.2.4",
"classnames": "^2.2.6",
"copy-to-clipboard": "^3.3.1",
"cypress": "^5.6.0",
"facepaint": "^1.2.1",
"next": "10.0.7",
"next-compose-plugins": "^2.2.1",
Expand All @@ -43,6 +47,7 @@
"unist-builder": "^2.0.3"
},
"devDependencies": {
"start-server-and-test": "^1.12.0",
"typescript": "^4.1.5"
},
"engines": {
Expand Down
Loading

0 comments on commit c94b577

Please sign in to comment.