-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
794 additions
and
247 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'envelop-no-alias': major | ||
'graphql-no-alias': patch | ||
--- | ||
|
||
Initial publish of `envelop-no-alias` | ||
|
||
Update readme for: `graphql-no-alias` |
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,30 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
graphql-no-alias: | ||
target: auto | ||
flags: | ||
- graphql-no-alias | ||
envelop: | ||
target: auto | ||
flags: | ||
- envelop | ||
|
||
comment: | ||
layout: 'reach, diff, flags, files' | ||
behavior: default | ||
require_changes: false | ||
require_base: true | ||
require_head: true | ||
|
||
flags: | ||
graphql-no-alias: | ||
paths: | ||
- packages/graphql-no-alias/ | ||
carryforward: true | ||
envelop: | ||
paths: | ||
- packages/envelop/ | ||
carryforward: true |
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 |
---|---|---|
@@ -1,76 +1,25 @@ | ||
{ | ||
"name": "graphql-no-alias", | ||
"version": "2.0.0", | ||
"private": false, | ||
"description": "No alias directive for graphql mutation and query types. It can limit the amount of alias fields that can be used for queries and mutations. Preventing batch attacks.", | ||
"keywords": [ | ||
"graphql", | ||
"graphql directive", | ||
"graphql validation", | ||
"graphql alias", | ||
"graphql query alias", | ||
"graphql mutation alias" | ||
], | ||
"author": "ivandotv", | ||
"license": "MIT", | ||
"main": "./dist/prod/graphql-no-alias.js", | ||
"exports": { | ||
"import": "./dist/prod/graphql-no-alias.esm.js", | ||
"require": "./dist/prod/graphql-no-alias.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"name": "graphql-no-alias-monorepo", | ||
"version": "0.0.0", | ||
"private": true, | ||
"author": "Ivan Vlatkovic", | ||
"scripts": { | ||
"lint": "eslint --fix \"src/**/\"", | ||
"lint:check": "eslint \"src/**/\"", | ||
"lint:ci": "pnpm lint:check && pnpm format:check", | ||
"format": "prettier --write src/**", | ||
"format:check": "prettier --check src/**", | ||
"test": "NODE_ENV=test jest --verbose --coverage --no-cache", | ||
"test:watch": "NODE_ENV=test jest --watch", | ||
"test:ci": "NODE_ENV=test jest --runInBand --ci --coverage --coverageDirectory=coverage", | ||
"build:prod": "NODE_ENV=production microbundle --tsconfig ./tsconfig.json --format modern,cjs --target node --output dist/prod", | ||
"build": "rm -rf ./dist && pnpm build:prod", | ||
"prepublishOnly": "pnpm build", | ||
"test": "pnpm multi run test --workspace-concurrency 1", | ||
"test:ci": "pnpm multi run test:ci --workspace-concurrency 1", | ||
"lint": "pnpm multi run lint", | ||
"lint:ci": "pnpm multi run lint:ci", | ||
"build": "pnpm multi run build", | ||
"prepare": "husky install", | ||
"release": "pnpm run prepublishOnly && pnpm changeset publish" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ivandotv/graphql-no-alias.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ivandotv/graphql-no-alias/issues" | ||
"release": "pnpm multi run prepublishOnly --workspace-concurrency 1 && pnpm changeset publish" | ||
}, | ||
"homepage": "https://github.com/ivandotv/graphql-no-alias#readme", | ||
"peerDependencies": { | ||
"graphql": "^16.2.0" | ||
"dependencies": { | ||
"husky": "^7.0.4", | ||
"lint-staged": "^12.2.2", | ||
"prettier": "^2.5.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.7", | ||
"@babel/preset-env": "^7.16.7", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@changesets/cli": "^2.19.0", | ||
"@types/jest": "^27.4.0", | ||
"@typescript-eslint/eslint-plugin": "^5.8.1", | ||
"@typescript-eslint/parser": "^5.8.1", | ||
"eslint": "^8.6.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-jest": "^25.3.4", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-tsdoc": "^0.2.14", | ||
"graphql": "^16.2.0", | ||
"husky": "^7.0.4", | ||
"jest": "^27.4.5", | ||
"jest-mock-console": "^1.2.3", | ||
"jest-watch-typeahead": "^1.0.0", | ||
"lint-staged": "^12.1.4", | ||
"microbundle": "^0.14.2", | ||
"prettier": "^2.5.1", | ||
"shx": "^0.3.3" | ||
"del": "^6.0.0", | ||
"minimist": "^1.2.5" | ||
} | ||
} |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Envelop Plugin | ||
|
||
This package is an [envelop plugin](https://www.envelop.dev) version of | ||
[`graphql-no-alias`](https://github.com/ivandotv/graphql-no-alias) validation directive. | ||
|
||
## Install | ||
|
||
```sh | ||
npm Install envelop-no-alias | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { envelop } from '@envelop/core' | ||
import { useNoAlias, NoAliasConfig } from 'envelop-no-alias' | ||
|
||
//optional configuration | ||
const config: NoAliasConfig = {} | ||
const getEnveloped = envelop({ | ||
plugins: [useNoAlias(config)] | ||
}) | ||
``` |
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,14 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const baseConfig = require('../../jest.config') | ||
|
||
module.exports = { | ||
...baseConfig, | ||
rootDir: '.', | ||
projects: undefined, | ||
testMatch: ['<rootDir>/src/__tests__/?(*.)+(spec|test).[jt]s?(x)'], | ||
collectCoverageFrom: [ | ||
'<rootDir>/src/**', | ||
'!<rootDir>/src/__tests__/**', | ||
'!<rootDir>/src/__fixtures__/**' | ||
] | ||
} |
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,82 @@ | ||
{ | ||
"name": "envelop-no-alias", | ||
"version": "0.0.0", | ||
"private": false, | ||
"description": "Graphql envelop plugin for no alias graphql directive. It can limit the amount of alias fields that can be used for queries and mutations. Preventing batch attacks.", | ||
"keywords": [ | ||
"@envelop", | ||
"envelop", | ||
"graphql", | ||
"graphql directive", | ||
"graphql validation", | ||
"graphql alias", | ||
"graphql query alias", | ||
"graphql mutation alias" | ||
], | ||
"author": "ivandotv", | ||
"license": "MIT", | ||
"main": "./dist/prod/envelop-no-alias.js", | ||
"exports": { | ||
"import": "./dist/prod/envelop-no-alias.esm.js", | ||
"require": "./dist/prod/envelop-no-alias.js" | ||
}, | ||
"types": "./dist/types/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"lint": "eslint --fix \"src/**/\"", | ||
"lint:check": "eslint \"src/**/\"", | ||
"lint:ci": "pnpm lint:check && pnpm format:check", | ||
"format": "prettier --write src/**", | ||
"format:check": "prettier --check src/**", | ||
"test": "jest --verbose --coverage --no-cache", | ||
"test:watch": "jest --watch", | ||
"test:ci": "jest --runInBand --ci --coverage --coverageDirectory=coverage", | ||
"build:prod": "NODE_ENV=production microbundle --tsconfig ./tsconfig.json --format modern,cjs --target node --output dist/prod", | ||
"build": "rm -rf ./dist && pnpm build:prod", | ||
"prepublishOnly": "pnpm build", | ||
"release": "pnpm run prepublishOnly && pnpm changeset publish" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ivandotv/graphql-no-alias.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ivandotv/graphql-no-alias/issues" | ||
}, | ||
"homepage": "https://github.com/ivandotv/graphql-no-alias#readme", | ||
"dependencies": { | ||
"graphql-no-alias": "../no-alias" | ||
}, | ||
"peerDependencies": { | ||
"@envelop/core": "^1.7.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.7", | ||
"@babel/preset-env": "^7.16.7", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@changesets/cli": "^2.19.0", | ||
"@envelop/core": "^1.7.1", | ||
"@envelop/testing": "^3.0.1", | ||
"@envelop/types": "^1.5.1", | ||
"@types/jest": "^27.4.0", | ||
"@typescript-eslint/eslint-plugin": "^5.8.1", | ||
"@typescript-eslint/parser": "^5.8.1", | ||
"eslint": "^8.6.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-jest": "^25.3.4", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-tsdoc": "^0.2.14", | ||
"graphql": "^16.2.0", | ||
"jest": "^27.4.5", | ||
"jest-watch-typeahead": "^1.0.0", | ||
"lint-staged": "^12.1.4", | ||
"microbundle": "^0.14.2", | ||
"prettier": "^2.5.1", | ||
"shx": "^0.3.3", | ||
"typescript": "^4.5.5" | ||
} | ||
} |
Oops, something went wrong.