Skip to content

Implementing secrets env egress schema #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion npmDepsHash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sha256-/SFcicpWX1SFllzmz0acUYxtIV0LuBw1PU32Uk5hLzw=
sha256-5lr9ukYvA7s8sAgnX5rN6ef12tOb9lPwAHGlOrD0k+w=
155 changes: 139 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"sodium-native": "*"
},
"devDependencies": {
"@apidevtools/json-schema-ref-parser": "^11.9.3",
"@fast-check/jest": "^2.1.1",
"@matrixai/errors": "^2.1.3",
"@matrixai/exec": "^1.0.3",
Expand All @@ -149,6 +150,8 @@
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@yao-pkg/pkg": "^6.4.0",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"commander": "^8.3.0",
"cross-env": "^7.0.3",
"esbuild": "0.19.4",
Expand Down
14 changes: 14 additions & 0 deletions ref.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "object",
"allOf": [
{ "$ref": "./test.schema.json"}
],
"properties": {
"SECRET2": {
"type": "string"
}
},
"required": [
"SECRET2"
]
}
6 changes: 6 additions & 0 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ class ErrorPolykeyCLIDuplicateEnvName<T> extends ErrorPolykeyCLI<T> {
exitCode = sysexits.USAGE;
}

class ErrorPolykeyCLIMissingRequiredEnvName<T> extends ErrorPolykeyCLI<T> {
static description = 'A required environment variable is not present';
exitCode = sysexits.USAGE;
}

class ErrorPolykeyCLIMakeDirectory<T> extends ErrorPolykeyCLI<T> {
static description = 'Failed to create one or more directories';
exitCode = 1;
Expand Down Expand Up @@ -223,6 +228,7 @@ export {
ErrorPolykeyCLINodePingFailed,
ErrorPolykeyCLIInvalidEnvName,
ErrorPolykeyCLIDuplicateEnvName,
ErrorPolykeyCLIMissingRequiredEnvName,
ErrorPolykeyCLIMakeDirectory,
ErrorPolykeyCLIRenameSecret,
ErrorPolykeyCLIRemoveSecret,
Expand Down
Loading