Skip to content

Commit

Permalink
Update lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thekevinscott committed Nov 21, 2023
1 parent 52daa05 commit f988f4a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 90 deletions.
11 changes: 10 additions & 1 deletion packages/upscalerjs/src/shared/errors-and-warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ModelDefinition,
MODEL_DEFINITION_VALIDATION_CHECK_ERROR_TYPE,
} from "../../../shared/src/types";
import { ModelDefinitionValidationError, } from "../constants";
// import { ModelDefinitionValidationError, } from "../constants";

const WARNING_DEPRECATED_MODEL_DEFINITION_URL =
'https://upscalerjs.com/documentation/troubleshooting#deprecated-model-definition-function';
Expand Down Expand Up @@ -114,6 +114,15 @@ export const GET_MODEL_CONFIGURATION_MISSING_PATH_AND_INTERNALS = (modelConfigur
`The model configuration provided was: ${JSON.stringify(modelConfiguration)}`,
].join(' ');

// TODO: Import this from ../constants
export class ModelDefinitionValidationError extends Error {
type: MODEL_DEFINITION_VALIDATION_CHECK_ERROR_TYPE;

constructor(type: MODEL_DEFINITION_VALIDATION_CHECK_ERROR_TYPE) {
super(type);
this.type = type;
}
}
export function getModelDefinitionError({ type, message, }: ModelDefinitionValidationError, modelDefinition?: ModelDefinition): Error {
switch (type) {
case MODEL_DEFINITION_VALIDATION_CHECK_ERROR_TYPE.INVALID_MODEL_TYPE:
Expand Down
116 changes: 27 additions & 89 deletions pnpm-lock.yaml

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

0 comments on commit f988f4a

Please sign in to comment.