@soliantconsulting/fm-mock-server
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -1,3 +0,3 @@ | ||
import path from "path"; | ||
import { mkdir, writeFile } from "fs/promises"; | ||
import { mkdir, writeFile } from "node:fs/promises"; | ||
import path from "node:path"; | ||
import { OpenApiBuilder } from "openapi3-ts/oas31"; | ||
@@ -4,0 +4,0 @@ const defaultErrorResponse = { |
@@ -0,5 +1,8 @@ | ||
import type { SchemaObject } from "openapi3-ts/oas31"; | ||
import { type Script } from "./script.js"; | ||
export declare class ScriptManager { | ||
private readonly scripts; | ||
private readonly schemas; | ||
addScript<T>(name: string, script: Script<T>): void; | ||
addSchema(name: string, schema: SchemaObject): void; | ||
} |
@@ -5,5 +5,9 @@ import Router from "koa-tree-router"; | ||
scripts = new Map(); | ||
schemas = new Map(); | ||
addScript(name, script) { | ||
this.scripts.set(name, script); | ||
} | ||
addSchema(name, schema) { | ||
this.schemas.set(name, schema); | ||
} | ||
/** | ||
@@ -33,2 +37,5 @@ * @internal | ||
const schemaObjects = {}; | ||
for (const [name, schema] of this.schemas.entries()) { | ||
schemaObjects[name] = schema; | ||
} | ||
for (const script of this.scripts.values()) { | ||
@@ -35,0 +42,0 @@ if (!script.schemaDependencies) { |
{ | ||
"name": "@soliantconsulting/fm-mock-server", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Mock server for FileMaker OData script calls", | ||
@@ -30,20 +30,20 @@ "type": "module", | ||
"devDependencies": { | ||
"@biomejs/biome": "1.5.3", | ||
"@commitlint/cli": "^19.0.3", | ||
"@commitlint/config-conventional": "^19.0.3", | ||
"@tsconfig/node20": "^20.1.2", | ||
"@biomejs/biome": "1.7.1", | ||
"@commitlint/cli": "^19.3.0", | ||
"@commitlint/config-conventional": "^19.2.2", | ||
"@tsconfig/node20": "^20.1.4", | ||
"@types/koa": "^2.15.0", | ||
"@types/koa-bodyparser": "^4.3.12", | ||
"@types/node": "^20.11.24", | ||
"lefthook": "^1.6.5", | ||
"typescript": "^5.3.3" | ||
"@types/node": "^20.12.7", | ||
"lefthook": "^1.6.10", | ||
"typescript": "^5.4.5" | ||
}, | ||
"dependencies": { | ||
"http-graceful-shutdown": "^3.1.13", | ||
"koa": "^2.15.0", | ||
"koa": "^2.15.3", | ||
"koa-bodyparser": "^4.4.1", | ||
"koa-tree-router": "^0.12.1", | ||
"openapi3-ts": "^4.2.2", | ||
"zod": "^3.22.4" | ||
"openapi3-ts": "^4.3.1", | ||
"zod": "^3.23.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
17320
251
1
Updatedkoa@^2.15.3
Updatedopenapi3-ts@^4.3.1
Updatedzod@^3.23.4