Skip to content

Commit

Permalink
feat(functions): annotate internal options (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed Dec 10, 2021
1 parent 0daac81 commit 259698f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
},
"dependencies": {
"@stoplight/better-ajv-errors": "1.0.1",
"@stoplight/json": "3.17.0",
"@stoplight/spectral-core": "^1.1.0",
"@stoplight/json": "~3.17.1",
"@stoplight/spectral-core": "^1.7.0",
"@stoplight/spectral-formats": "^1.0.0",
"@stoplight/spectral-runtime": "*",
"@stoplight/spectral-runtime": "^1.1.0",
"@stoplight/types": "12.3.0",
"ajv": "~8.6.3",
"ajv": "^8.6.3",
"ajv-draft-04": "~1.0.0",
"ajv-errors": "~3.0.0",
"ajv-formats": "~2.1.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/functions/src/optionSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const optionSchemas: Record<string, CustomFunctionOptionsSchema> = {
},
},
required: ['test', 'flags'],
'x-internal': true,
},
],
errorMessage: `"pattern" function and its "match" option must be string or RegExp instance`,
Expand All @@ -135,6 +136,7 @@ export const optionSchemas: Record<string, CustomFunctionOptionsSchema> = {
},
},
required: ['test', 'flags'],
'x-internal': true,
},
],
errorMessage: `"pattern" function and its "notMatch" option must be string or RegExp instance`,
Expand Down Expand Up @@ -166,7 +168,9 @@ export const optionSchemas: Record<string, CustomFunctionOptionsSchema> = {
default: false,
description: 'Returns all errors when true; otherwise only returns the first error.',
},
prepareResults: true,
prepareResults: {
'x-internal': true,
},
},
required: ['schema'],
type: 'object',
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ __metadata:
languageName: node
linkType: hard

"@stoplight/json@npm:3.17.0, @stoplight/json@npm:^3.15.0, @stoplight/json@npm:^3.17.0":
"@stoplight/json@npm:3.17.0, @stoplight/json@npm:^3.15.0, @stoplight/json@npm:^3.17.0, @stoplight/json@npm:~3.17.1":
version: 3.17.0
resolution: "@stoplight/json@npm:3.17.0"
dependencies:
Expand Down Expand Up @@ -2023,7 +2023,7 @@ __metadata:
languageName: unknown
linkType: soft

"@stoplight/spectral-core@>=1, @stoplight/spectral-core@^1.1.0, @stoplight/spectral-core@^1.3.0, @stoplight/spectral-core@^1.5.1, @stoplight/spectral-core@workspace:packages/core":
"@stoplight/spectral-core@>=1, @stoplight/spectral-core@^1.1.0, @stoplight/spectral-core@^1.3.0, @stoplight/spectral-core@^1.5.1, @stoplight/spectral-core@^1.7.0, @stoplight/spectral-core@workspace:packages/core":
version: 0.0.0-use.local
resolution: "@stoplight/spectral-core@workspace:packages/core"
dependencies:
Expand Down Expand Up @@ -2074,13 +2074,13 @@ __metadata:
resolution: "@stoplight/spectral-functions@workspace:packages/functions"
dependencies:
"@stoplight/better-ajv-errors": 1.0.1
"@stoplight/json": 3.17.0
"@stoplight/spectral-core": ^1.1.0
"@stoplight/json": ~3.17.1
"@stoplight/spectral-core": ^1.7.0
"@stoplight/spectral-formats": ^1.0.0
"@stoplight/spectral-parsers": "*"
"@stoplight/spectral-runtime": "*"
"@stoplight/spectral-runtime": ^1.1.0
"@stoplight/types": 12.3.0
ajv: ~8.6.3
ajv: ^8.6.3
ajv-draft-04: ~1.0.0
ajv-errors: ~3.0.0
ajv-formats: ~2.1.0
Expand Down Expand Up @@ -2184,7 +2184,7 @@ __metadata:
languageName: unknown
linkType: soft

"@stoplight/spectral-runtime@*, @stoplight/spectral-runtime@^1.0.0, @stoplight/spectral-runtime@^1.1.0, @stoplight/spectral-runtime@workspace:packages/runtime":
"@stoplight/spectral-runtime@^1.0.0, @stoplight/spectral-runtime@^1.1.0, @stoplight/spectral-runtime@workspace:packages/runtime":
version: 0.0.0-use.local
resolution: "@stoplight/spectral-runtime@workspace:packages/runtime"
dependencies:
Expand Down Expand Up @@ -2842,7 +2842,7 @@ __metadata:
languageName: node
linkType: hard

"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.6.0, ajv@npm:~8.6.0, ajv@npm:~8.6.3":
"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.6.0, ajv@npm:^8.6.3, ajv@npm:~8.6.0":
version: 8.6.3
resolution: "ajv@npm:8.6.3"
dependencies:
Expand Down

0 comments on commit 259698f

Please sign in to comment.