@quantiya/codevibe-claude-plugin 1.0.36 → 1.0.38
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.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/codevibe-claude +17 -3
- package/dist/server.js +13 -13
- package/hooks/stop.sh +30 -10
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +56 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +30 -30
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +16 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/body-parser/README.md +18 -18
- package/node_modules/body-parser/index.js +6 -15
- package/node_modules/body-parser/lib/read.js +17 -20
- package/node_modules/body-parser/lib/types/json.js +8 -16
- package/node_modules/body-parser/lib/types/raw.js +3 -4
- package/node_modules/body-parser/lib/types/text.js +3 -4
- package/node_modules/body-parser/lib/types/urlencoded.js +8 -8
- package/node_modules/body-parser/lib/utils.js +11 -9
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/content-disposition/README.md +7 -8
- package/node_modules/content-disposition/index.js +118 -40
- package/node_modules/content-disposition/package.json +8 -11
- package/node_modules/express/Readme.md +39 -29
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +5 -6
- package/node_modules/express/lib/response.js +14 -0
- package/node_modules/express/lib/utils.js +3 -1
- package/node_modules/express/package.json +6 -5
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/README.md +26 -23
- package/node_modules/finalhandler/package.json +13 -9
- package/node_modules/graphql/execution/execute.d.ts +14 -1
- package/node_modules/graphql/execution/execute.js +63 -13
- package/node_modules/graphql/execution/execute.mjs +63 -13
- package/node_modules/graphql/execution/subscribe.js +1 -0
- package/node_modules/graphql/execution/subscribe.mjs +2 -0
- package/node_modules/graphql/execution/values.js +4 -4
- package/node_modules/graphql/execution/values.mjs +4 -4
- package/node_modules/graphql/index.d.ts +1 -0
- package/node_modules/graphql/language/ast.d.ts +10 -1
- package/node_modules/graphql/language/ast.js +8 -1
- package/node_modules/graphql/language/ast.mjs +8 -1
- package/node_modules/graphql/language/directiveLocation.d.ts +1 -0
- package/node_modules/graphql/language/directiveLocation.js +1 -0
- package/node_modules/graphql/language/directiveLocation.mjs +1 -0
- package/node_modules/graphql/language/index.d.ts +1 -0
- package/node_modules/graphql/language/kinds.d.ts +1 -0
- package/node_modules/graphql/language/kinds.js +1 -0
- package/node_modules/graphql/language/kinds.mjs +1 -0
- package/node_modules/graphql/language/parser.d.ts +14 -0
- package/node_modules/graphql/language/parser.js +33 -0
- package/node_modules/graphql/language/parser.mjs +33 -0
- package/node_modules/graphql/language/predicates.js +3 -1
- package/node_modules/graphql/language/predicates.mjs +5 -1
- package/node_modules/graphql/language/printer.js +13 -1
- package/node_modules/graphql/language/printer.mjs +13 -1
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/type/directives.d.ts +9 -1
- package/node_modules/graphql/type/directives.js +10 -1
- package/node_modules/graphql/type/directives.mjs +10 -1
- package/node_modules/graphql/type/introspection.js +24 -1
- package/node_modules/graphql/type/introspection.mjs +24 -1
- package/node_modules/graphql/utilities/buildASTSchema.js +4 -0
- package/node_modules/graphql/utilities/buildASTSchema.mjs +4 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +1 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +1 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +2 -2
- package/node_modules/graphql/utilities/coerceInputValue.mjs +2 -2
- package/node_modules/graphql/utilities/extendSchema.js +58 -3
- package/node_modules/graphql/utilities/extendSchema.mjs +58 -3
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +16 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +31 -38
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +31 -38
- package/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +1 -0
- package/node_modules/graphql/utilities/printSchema.js +1 -0
- package/node_modules/graphql/utilities/printSchema.mjs +1 -0
- package/node_modules/graphql/utilities/valueFromAST.js +12 -2
- package/node_modules/graphql/utilities/valueFromAST.mjs +12 -2
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +4 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +4 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +12 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +12 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +5 -11
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -11
- package/node_modules/graphql/validation/validate.js +12 -0
- package/node_modules/graphql/validation/validate.mjs +13 -2
- package/node_modules/graphql/version.js +2 -2
- package/node_modules/graphql/version.mjs +2 -2
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/iconv-lite/lib/index.d.ts +114 -26
- package/node_modules/iconv-lite/lib/index.js +39 -40
- package/node_modules/iconv-lite/package.json +13 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/node_modules/node-abi/abi_registry.json +10 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/README.md +19 -4
- package/node_modules/{semver → node-abi/node_modules/semver}/bin/semver.js +14 -10
- package/node_modules/node-abi/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/index.js +2 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/internal/re.js +1 -1
- package/node_modules/{semver → node-abi/node_modules/semver}/package.json +3 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +5 -4
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.d.ts +3 -0
- package/node_modules/path-to-regexp/dist/index.js +215 -193
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +190 -0
- package/node_modules/qs/README.md +29 -4
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +94 -49
- package/node_modules/qs/lib/utils.js +85 -11
- package/node_modules/qs/package.json +10 -9
- package/node_modules/qs/test/parse.js +391 -13
- package/node_modules/qs/test/stringify.js +16 -3
- package/node_modules/qs/test/utils.js +173 -3
- package/node_modules/send/package.json +11 -8
- package/node_modules/serve-static/README.md +23 -23
- package/node_modules/serve-static/package.json +6 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/node_modules/uuid/dist/v35.js +3 -0
- package/node_modules/uuid/dist/v6.js +3 -0
- package/node_modules/uuid/dist-node/v35.js +3 -0
- package/node_modules/uuid/dist-node/v6.js +3 -0
- package/node_modules/uuid/package.json +1 -1
- package/node_modules/ws/index.js +15 -6
- package/node_modules/ws/lib/constants.js +1 -0
- package/node_modules/ws/lib/permessage-deflate.js +6 -6
- package/node_modules/ws/lib/websocket-server.js +10 -6
- package/node_modules/ws/lib/websocket.js +19 -14
- package/node_modules/ws/package.json +4 -3
- package/node_modules/ws/wrapper.mjs +14 -1
- package/package.json +2 -2
- package/node_modules/content-disposition/HISTORY.md +0 -72
- package/node_modules/express/History.md +0 -3858
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/iconv-lite/Changelog.md +0 -236
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/send/HISTORY.md +0 -580
- package/node_modules/serve-static/HISTORY.md +0 -516
- /package/node_modules/{semver → node-abi/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/comparator.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/range.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/semver.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/coerce.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/diff.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/inc.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/parse.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/constants.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/lrucache.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/parse-options.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/intersects.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/subset.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/valid.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/index.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/license +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/package.json +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/readme.md +0 -0
|
@@ -9,7 +9,9 @@ export function getIntrospectionQuery(options) {
|
|
|
9
9
|
directiveIsRepeatable: false,
|
|
10
10
|
schemaDescription: false,
|
|
11
11
|
inputValueDeprecation: false,
|
|
12
|
+
experimentalDirectiveDeprecation: false,
|
|
12
13
|
oneOf: false,
|
|
14
|
+
typeDepth: 9,
|
|
13
15
|
...options,
|
|
14
16
|
};
|
|
15
17
|
const descriptions = optionsWithDefault.descriptions ? 'description' : '';
|
|
@@ -27,7 +29,30 @@ export function getIntrospectionQuery(options) {
|
|
|
27
29
|
return optionsWithDefault.inputValueDeprecation ? str : '';
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
function experimentalDirectiveDeprecation(str) {
|
|
33
|
+
return optionsWithDefault.experimentalDirectiveDeprecation ? str : '';
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : '';
|
|
37
|
+
|
|
38
|
+
function ofType(level, indent) {
|
|
39
|
+
if (level <= 0) {
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (level > 100) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
'Please set typeDepth to a reasonable value between 0 and 100; the default is 9.',
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return `
|
|
50
|
+
${indent}ofType {
|
|
51
|
+
${indent} name
|
|
52
|
+
${indent} kind${ofType(level - 1, indent + ' ')}
|
|
53
|
+
${indent}}`;
|
|
54
|
+
}
|
|
55
|
+
|
|
31
56
|
return `
|
|
32
57
|
query IntrospectionQuery {
|
|
33
58
|
__schema {
|
|
@@ -38,10 +63,14 @@ export function getIntrospectionQuery(options) {
|
|
|
38
63
|
types {
|
|
39
64
|
...FullType
|
|
40
65
|
}
|
|
41
|
-
directives
|
|
66
|
+
directives${experimentalDirectiveDeprecation(
|
|
67
|
+
'(includeDeprecated: true)',
|
|
68
|
+
)} {
|
|
42
69
|
name
|
|
43
70
|
${descriptions}
|
|
44
71
|
${directiveIsRepeatable}
|
|
72
|
+
${experimentalDirectiveDeprecation('isDeprecated')}
|
|
73
|
+
${experimentalDirectiveDeprecation('deprecationReason')}
|
|
45
74
|
locations
|
|
46
75
|
args${inputDeprecation('(includeDeprecated: true)')} {
|
|
47
76
|
...InputValue
|
|
@@ -96,43 +125,7 @@ export function getIntrospectionQuery(options) {
|
|
|
96
125
|
|
|
97
126
|
fragment TypeRef on __Type {
|
|
98
127
|
kind
|
|
99
|
-
name
|
|
100
|
-
ofType {
|
|
101
|
-
kind
|
|
102
|
-
name
|
|
103
|
-
ofType {
|
|
104
|
-
kind
|
|
105
|
-
name
|
|
106
|
-
ofType {
|
|
107
|
-
kind
|
|
108
|
-
name
|
|
109
|
-
ofType {
|
|
110
|
-
kind
|
|
111
|
-
name
|
|
112
|
-
ofType {
|
|
113
|
-
kind
|
|
114
|
-
name
|
|
115
|
-
ofType {
|
|
116
|
-
kind
|
|
117
|
-
name
|
|
118
|
-
ofType {
|
|
119
|
-
kind
|
|
120
|
-
name
|
|
121
|
-
ofType {
|
|
122
|
-
kind
|
|
123
|
-
name
|
|
124
|
-
ofType {
|
|
125
|
-
kind
|
|
126
|
-
name
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
128
|
+
name${ofType(optionsWithDefault.typeDepth, ' ')}
|
|
136
129
|
}
|
|
137
130
|
`;
|
|
138
131
|
}
|
|
@@ -286,6 +286,7 @@ function printDirective(directive) {
|
|
|
286
286
|
'directive @' +
|
|
287
287
|
directive.name +
|
|
288
288
|
printArgs(directive.args) +
|
|
289
|
+
printDeprecated(directive.deprecationReason) +
|
|
289
290
|
(directive.isRepeatable ? ' repeatable' : '') +
|
|
290
291
|
' on ' +
|
|
291
292
|
directive.locations.join(' | ')
|
|
@@ -262,6 +262,7 @@ function printDirective(directive) {
|
|
|
262
262
|
'directive @' +
|
|
263
263
|
directive.name +
|
|
264
264
|
printArgs(directive.args) +
|
|
265
|
+
printDeprecated(directive.deprecationReason) +
|
|
265
266
|
(directive.isRepeatable ? ' repeatable' : '') +
|
|
266
267
|
' on ' +
|
|
267
268
|
directive.locations.join(' | ')
|
|
@@ -45,7 +45,11 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
45
45
|
if (valueNode.kind === _kinds.Kind.VARIABLE) {
|
|
46
46
|
const variableName = valueNode.name.value;
|
|
47
47
|
|
|
48
|
-
if (
|
|
48
|
+
if (
|
|
49
|
+
variables == null ||
|
|
50
|
+
variables[variableName] === undefined ||
|
|
51
|
+
!hasOwnProperty(variables, variableName)
|
|
52
|
+
) {
|
|
49
53
|
// No valid return value.
|
|
50
54
|
return;
|
|
51
55
|
}
|
|
@@ -192,6 +196,12 @@ function valueFromAST(valueNode, type, variables) {
|
|
|
192
196
|
function isMissingVariable(valueNode, variables) {
|
|
193
197
|
return (
|
|
194
198
|
valueNode.kind === _kinds.Kind.VARIABLE &&
|
|
195
|
-
(variables == null ||
|
|
199
|
+
(variables == null ||
|
|
200
|
+
variables[valueNode.name.value] === undefined ||
|
|
201
|
+
!hasOwnProperty(variables, valueNode.name.value))
|
|
196
202
|
);
|
|
197
203
|
}
|
|
204
|
+
|
|
205
|
+
function hasOwnProperty(obj, prop) {
|
|
206
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
207
|
+
}
|
|
@@ -39,7 +39,11 @@ export function valueFromAST(valueNode, type, variables) {
|
|
|
39
39
|
if (valueNode.kind === Kind.VARIABLE) {
|
|
40
40
|
const variableName = valueNode.name.value;
|
|
41
41
|
|
|
42
|
-
if (
|
|
42
|
+
if (
|
|
43
|
+
variables == null ||
|
|
44
|
+
variables[variableName] === undefined ||
|
|
45
|
+
!hasOwnProperty(variables, variableName)
|
|
46
|
+
) {
|
|
43
47
|
// No valid return value.
|
|
44
48
|
return;
|
|
45
49
|
}
|
|
@@ -179,6 +183,12 @@ export function valueFromAST(valueNode, type, variables) {
|
|
|
179
183
|
function isMissingVariable(valueNode, variables) {
|
|
180
184
|
return (
|
|
181
185
|
valueNode.kind === Kind.VARIABLE &&
|
|
182
|
-
(variables == null ||
|
|
186
|
+
(variables == null ||
|
|
187
|
+
variables[valueNode.name.value] === undefined ||
|
|
188
|
+
!hasOwnProperty(variables, valueNode.name.value))
|
|
183
189
|
);
|
|
184
190
|
}
|
|
191
|
+
|
|
192
|
+
function hasOwnProperty(obj, prop) {
|
|
193
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
194
|
+
}
|
|
@@ -140,6 +140,10 @@ function getDirectiveLocationForASTPath(ancestors) {
|
|
|
140
140
|
? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION
|
|
141
141
|
: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
|
|
142
142
|
}
|
|
143
|
+
|
|
144
|
+
case _kinds.Kind.DIRECTIVE_DEFINITION:
|
|
145
|
+
case _kinds.Kind.DIRECTIVE_EXTENSION:
|
|
146
|
+
return _directiveLocation.DirectiveLocation.DIRECTIVE_DEFINITION;
|
|
143
147
|
// Not reachable, all possible types have been considered.
|
|
144
148
|
|
|
145
149
|
/* c8 ignore next */
|
|
@@ -127,6 +127,10 @@ function getDirectiveLocationForASTPath(ancestors) {
|
|
|
127
127
|
? DirectiveLocation.INPUT_FIELD_DEFINITION
|
|
128
128
|
: DirectiveLocation.ARGUMENT_DEFINITION;
|
|
129
129
|
}
|
|
130
|
+
|
|
131
|
+
case Kind.DIRECTIVE_DEFINITION:
|
|
132
|
+
case Kind.DIRECTIVE_EXTENSION:
|
|
133
|
+
return DirectiveLocation.DIRECTIVE_DEFINITION;
|
|
130
134
|
// Not reachable, all possible types have been considered.
|
|
131
135
|
|
|
132
136
|
/* c8 ignore next */
|
|
@@ -42,6 +42,7 @@ function UniqueDirectivesPerLocationRule(context) {
|
|
|
42
42
|
|
|
43
43
|
const schemaDirectives = Object.create(null);
|
|
44
44
|
const typeDirectivesMap = Object.create(null);
|
|
45
|
+
const directiveDirectivesMap = Object.create(null);
|
|
45
46
|
return {
|
|
46
47
|
// Many different AST nodes may contain directives. Rather than listing
|
|
47
48
|
// them all, just listen for entering any node, and check to see if it
|
|
@@ -68,6 +69,17 @@ function UniqueDirectivesPerLocationRule(context) {
|
|
|
68
69
|
if (seenDirectives === undefined) {
|
|
69
70
|
typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
|
|
70
71
|
}
|
|
72
|
+
} else if (
|
|
73
|
+
node.kind === _kinds.Kind.DIRECTIVE_DEFINITION ||
|
|
74
|
+
node.kind === _kinds.Kind.DIRECTIVE_EXTENSION
|
|
75
|
+
) {
|
|
76
|
+
const directiveName = node.name.value;
|
|
77
|
+
seenDirectives = directiveDirectivesMap[directiveName];
|
|
78
|
+
|
|
79
|
+
if (seenDirectives === undefined) {
|
|
80
|
+
directiveDirectivesMap[directiveName] = seenDirectives =
|
|
81
|
+
Object.create(null);
|
|
82
|
+
}
|
|
71
83
|
} else {
|
|
72
84
|
seenDirectives = Object.create(null);
|
|
73
85
|
}
|
|
@@ -35,6 +35,7 @@ export function UniqueDirectivesPerLocationRule(context) {
|
|
|
35
35
|
|
|
36
36
|
const schemaDirectives = Object.create(null);
|
|
37
37
|
const typeDirectivesMap = Object.create(null);
|
|
38
|
+
const directiveDirectivesMap = Object.create(null);
|
|
38
39
|
return {
|
|
39
40
|
// Many different AST nodes may contain directives. Rather than listing
|
|
40
41
|
// them all, just listen for entering any node, and check to see if it
|
|
@@ -58,6 +59,17 @@ export function UniqueDirectivesPerLocationRule(context) {
|
|
|
58
59
|
if (seenDirectives === undefined) {
|
|
59
60
|
typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
|
|
60
61
|
}
|
|
62
|
+
} else if (
|
|
63
|
+
node.kind === Kind.DIRECTIVE_DEFINITION ||
|
|
64
|
+
node.kind === Kind.DIRECTIVE_EXTENSION
|
|
65
|
+
) {
|
|
66
|
+
const directiveName = node.name.value;
|
|
67
|
+
seenDirectives = directiveDirectivesMap[directiveName];
|
|
68
|
+
|
|
69
|
+
if (seenDirectives === undefined) {
|
|
70
|
+
directiveDirectivesMap[directiveName] = seenDirectives =
|
|
71
|
+
Object.create(null);
|
|
72
|
+
}
|
|
61
73
|
} else {
|
|
62
74
|
seenDirectives = Object.create(null);
|
|
63
75
|
}
|
|
@@ -30,18 +30,7 @@ var _definition = require('../../type/definition.js');
|
|
|
30
30
|
* See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
|
|
31
31
|
*/
|
|
32
32
|
function ValuesOfCorrectTypeRule(context) {
|
|
33
|
-
let variableDefinitions = {};
|
|
34
33
|
return {
|
|
35
|
-
OperationDefinition: {
|
|
36
|
-
enter() {
|
|
37
|
-
variableDefinitions = {};
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
VariableDefinition(definition) {
|
|
42
|
-
variableDefinitions[definition.variable.name.value] = definition;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
34
|
ListValue(node) {
|
|
46
35
|
// Note: TypeInfo will traverse into a list's item type, so look to the
|
|
47
36
|
// parent input type to check if it is a list.
|
|
@@ -132,6 +121,11 @@ function ValuesOfCorrectTypeRule(context) {
|
|
|
132
121
|
EnumValue: (node) => isValidValueNode(context, node),
|
|
133
122
|
IntValue: (node) => isValidValueNode(context, node),
|
|
134
123
|
FloatValue: (node) => isValidValueNode(context, node),
|
|
124
|
+
// Descriptions are string values that would not validate according
|
|
125
|
+
// to the below logic, but since (per the specification) descriptions must
|
|
126
|
+
// not affect validation, they are ignored entirely when visiting the AST
|
|
127
|
+
// and do not require special handling.
|
|
128
|
+
// See https://spec.graphql.org/draft/#sec-Descriptions
|
|
135
129
|
StringValue: (node) => isValidValueNode(context, node),
|
|
136
130
|
BooleanValue: (node) => isValidValueNode(context, node),
|
|
137
131
|
};
|
|
@@ -24,18 +24,7 @@ import {
|
|
|
24
24
|
* See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
|
|
25
25
|
*/
|
|
26
26
|
export function ValuesOfCorrectTypeRule(context) {
|
|
27
|
-
let variableDefinitions = {};
|
|
28
27
|
return {
|
|
29
|
-
OperationDefinition: {
|
|
30
|
-
enter() {
|
|
31
|
-
variableDefinitions = {};
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
VariableDefinition(definition) {
|
|
36
|
-
variableDefinitions[definition.variable.name.value] = definition;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
28
|
ListValue(node) {
|
|
40
29
|
// Note: TypeInfo will traverse into a list's item type, so look to the
|
|
41
30
|
// parent input type to check if it is a list.
|
|
@@ -117,6 +106,11 @@ export function ValuesOfCorrectTypeRule(context) {
|
|
|
117
106
|
EnumValue: (node) => isValidValueNode(context, node),
|
|
118
107
|
IntValue: (node) => isValidValueNode(context, node),
|
|
119
108
|
FloatValue: (node) => isValidValueNode(context, node),
|
|
109
|
+
// Descriptions are string values that would not validate according
|
|
110
|
+
// to the below logic, but since (per the specification) descriptions must
|
|
111
|
+
// not affect validation, they are ignored entirely when visiting the AST
|
|
112
|
+
// and do not require special handling.
|
|
113
|
+
// See https://spec.graphql.org/draft/#sec-Descriptions
|
|
120
114
|
StringValue: (node) => isValidValueNode(context, node),
|
|
121
115
|
BooleanValue: (node) => isValidValueNode(context, node),
|
|
122
116
|
};
|
|
@@ -10,8 +10,12 @@ exports.validateSDL = validateSDL;
|
|
|
10
10
|
|
|
11
11
|
var _devAssert = require('../jsutils/devAssert.js');
|
|
12
12
|
|
|
13
|
+
var _mapValue = require('../jsutils/mapValue.js');
|
|
14
|
+
|
|
13
15
|
var _GraphQLError = require('../error/GraphQLError.js');
|
|
14
16
|
|
|
17
|
+
var _ast = require('../language/ast.js');
|
|
18
|
+
|
|
15
19
|
var _visitor = require('../language/visitor.js');
|
|
16
20
|
|
|
17
21
|
var _validate = require('../type/validate.js');
|
|
@@ -22,6 +26,12 @@ var _specifiedRules = require('./specifiedRules.js');
|
|
|
22
26
|
|
|
23
27
|
var _ValidationContext = require('./ValidationContext.js');
|
|
24
28
|
|
|
29
|
+
// Per the specification, descriptions must not affect validation.
|
|
30
|
+
// See https://spec.graphql.org/draft/#sec-Descriptions
|
|
31
|
+
const QueryDocumentKeysToValidate = (0, _mapValue.mapValue)(
|
|
32
|
+
_ast.QueryDocumentKeys,
|
|
33
|
+
(keys) => keys.filter((key) => key !== 'description'),
|
|
34
|
+
);
|
|
25
35
|
/**
|
|
26
36
|
* Implements the "Validation" section of the spec.
|
|
27
37
|
*
|
|
@@ -42,6 +52,7 @@ var _ValidationContext = require('./ValidationContext.js');
|
|
|
42
52
|
* Optionally a custom TypeInfo instance may be provided. If not provided, one
|
|
43
53
|
* will be created from the provided schema.
|
|
44
54
|
*/
|
|
55
|
+
|
|
45
56
|
function validate(
|
|
46
57
|
schema,
|
|
47
58
|
documentAST,
|
|
@@ -91,6 +102,7 @@ function validate(
|
|
|
91
102
|
(0, _visitor.visit)(
|
|
92
103
|
documentAST,
|
|
93
104
|
(0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor),
|
|
105
|
+
QueryDocumentKeysToValidate,
|
|
94
106
|
);
|
|
95
107
|
} catch (e) {
|
|
96
108
|
if (e !== abortObj) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { devAssert } from '../jsutils/devAssert.mjs';
|
|
2
|
+
import { mapValue } from '../jsutils/mapValue.mjs';
|
|
2
3
|
import { GraphQLError } from '../error/GraphQLError.mjs';
|
|
4
|
+
import { QueryDocumentKeys } from '../language/ast.mjs';
|
|
3
5
|
import { visit, visitInParallel } from '../language/visitor.mjs';
|
|
4
6
|
import { assertValidSchema } from '../type/validate.mjs';
|
|
5
7
|
import { TypeInfo, visitWithTypeInfo } from '../utilities/TypeInfo.mjs';
|
|
@@ -7,7 +9,12 @@ import { specifiedRules, specifiedSDLRules } from './specifiedRules.mjs';
|
|
|
7
9
|
import {
|
|
8
10
|
SDLValidationContext,
|
|
9
11
|
ValidationContext,
|
|
10
|
-
} from './ValidationContext.mjs';
|
|
12
|
+
} from './ValidationContext.mjs'; // Per the specification, descriptions must not affect validation.
|
|
13
|
+
// See https://spec.graphql.org/draft/#sec-Descriptions
|
|
14
|
+
|
|
15
|
+
const QueryDocumentKeysToValidate = mapValue(QueryDocumentKeys, (keys) =>
|
|
16
|
+
keys.filter((key) => key !== 'description'),
|
|
17
|
+
);
|
|
11
18
|
/**
|
|
12
19
|
* Implements the "Validation" section of the spec.
|
|
13
20
|
*
|
|
@@ -73,7 +80,11 @@ export function validate(
|
|
|
73
80
|
const visitor = visitInParallel(rules.map((rule) => rule(context))); // Visit the whole document with each instance of all provided rules.
|
|
74
81
|
|
|
75
82
|
try {
|
|
76
|
-
visit(
|
|
83
|
+
visit(
|
|
84
|
+
documentAST,
|
|
85
|
+
visitWithTypeInfo(typeInfo, visitor),
|
|
86
|
+
QueryDocumentKeysToValidate,
|
|
87
|
+
);
|
|
77
88
|
} catch (e) {
|
|
78
89
|
if (e !== abortObj) {
|
|
79
90
|
throw e;
|
|
@@ -10,7 +10,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
10
10
|
/**
|
|
11
11
|
* A string containing the version of the GraphQL.js library
|
|
12
12
|
*/
|
|
13
|
-
const version = '16.
|
|
13
|
+
const version = '16.14.0';
|
|
14
14
|
/**
|
|
15
15
|
* An object containing the components of the GraphQL.js version string
|
|
16
16
|
*/
|
|
@@ -18,7 +18,7 @@ const version = '16.12.0';
|
|
|
18
18
|
exports.version = version;
|
|
19
19
|
const versionInfo = Object.freeze({
|
|
20
20
|
major: 16,
|
|
21
|
-
minor:
|
|
21
|
+
minor: 14,
|
|
22
22
|
patch: 0,
|
|
23
23
|
preReleaseTag: null,
|
|
24
24
|
});
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* A string containing the version of the GraphQL.js library
|
|
6
6
|
*/
|
|
7
|
-
export const version = '16.
|
|
7
|
+
export const version = '16.14.0';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing the components of the GraphQL.js version string
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export const versionInfo = Object.freeze({
|
|
13
13
|
major: 16,
|
|
14
|
-
minor:
|
|
14
|
+
minor: 14,
|
|
15
15
|
patch: 0,
|
|
16
16
|
preReleaseTag: null,
|
|
17
17
|
});
|
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v2.0.3](https://github.com/inspect-js/hasOwn/compare/v2.0.2...v2.0.3) - 2026-04-17
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [actions] update workflows [`fb837b8`](https://github.com/inspect-js/hasOwn/commit/fb837b849bcdb8416fdc8fd344edfacd5574696c)
|
|
13
|
+
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `eslint`, `mock-property`, `npmignore`, `tape` [`f4b279b`](https://github.com/inspect-js/hasOwn/commit/f4b279bd682be34b3f0ede2a58d4e8acb58d6d47)
|
|
14
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; migrate to flat config [`7e415ce`](https://github.com/inspect-js/hasOwn/commit/7e415cee55ebf43b3c34d7fd86db73a9928b05f7)
|
|
15
|
+
- [Dev Deps] update `eslint` [`ef313da`](https://github.com/inspect-js/hasOwn/commit/ef313da342d33b60e23e738b9f5a86f6065f39ef)
|
|
16
|
+
- [meta] use `npm audit` instead of `aud` [`d5c6d4d`](https://github.com/inspect-js/hasOwn/commit/d5c6d4d7a19c6ca4f14ac173b30d8bf25abcabee)
|
|
17
|
+
- [types] add overload that narrows the key [`cc03a09`](https://github.com/inspect-js/hasOwn/commit/cc03a097e9402fb8b86d413050e67f790dd6c8c5)
|
|
18
|
+
|
|
8
19
|
## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
|
|
9
20
|
|
|
10
21
|
### Commits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hasown",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
15
|
"prepublishOnly": "safe-publish-latest",
|
|
16
16
|
"prelint": "evalmd README.md",
|
|
17
|
-
"lint": "eslint
|
|
17
|
+
"lint": "eslint .",
|
|
18
18
|
"postlint": "npm run tsc",
|
|
19
19
|
"pretest": "npm run lint",
|
|
20
20
|
"tsc": "tsc -p .",
|
|
21
21
|
"posttsc": "attw -P",
|
|
22
22
|
"tests-only": "nyc tape 'test/**/*.js'",
|
|
23
23
|
"test": "npm run tests-only",
|
|
24
|
-
"posttest": "
|
|
24
|
+
"posttest": "npx npm@\">= 10.2\" audit --production",
|
|
25
25
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
26
26
|
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
27
27
|
},
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
"function-bind": "^1.1.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@arethetypeswrong/cli": "^0.
|
|
55
|
-
"@ljharb/eslint-config": "^
|
|
56
|
-
"@ljharb/tsconfig": "^0.2
|
|
54
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
55
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
56
|
+
"@ljharb/tsconfig": "^0.3.2",
|
|
57
57
|
"@types/function-bind": "^1.1.10",
|
|
58
|
-
"@types/
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"eslint": "=8.8.0",
|
|
58
|
+
"@types/tape": "^5.8.1",
|
|
59
|
+
"auto-changelog": "^2.5.0",
|
|
60
|
+
"encoding": "^0.1.13",
|
|
61
|
+
"eslint": "^10.2.0",
|
|
63
62
|
"evalmd": "^0.0.19",
|
|
64
63
|
"in-publish": "^2.0.1",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
64
|
+
"jiti": "^0.0.0",
|
|
65
|
+
"mock-property": "^1.1.0",
|
|
66
|
+
"npmignore": "^0.3.5",
|
|
67
67
|
"nyc": "^10.3.2",
|
|
68
68
|
"safe-publish-latest": "^2.0.0",
|
|
69
|
-
"tape": "^5.
|
|
69
|
+
"tape": "^5.9.0",
|
|
70
70
|
"typescript": "next"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|