callman-core 1.10.0 → 1.11.0
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/dist/host/connections.d.ts +67 -0
- package/dist/host/connections.d.ts.map +1 -0
- package/dist/host/connections.js +156 -0
- package/dist/host/connections.js.map +1 -0
- package/dist/host/db/mongoAdapter.d.ts +7 -0
- package/dist/host/db/mongoAdapter.d.ts.map +1 -0
- package/dist/host/db/mongoAdapter.js +426 -0
- package/dist/host/db/mongoAdapter.js.map +1 -0
- package/dist/host/db/mysqlAdapter.d.ts +7 -0
- package/dist/host/db/mysqlAdapter.d.ts.map +1 -0
- package/dist/host/db/mysqlAdapter.js +68 -0
- package/dist/host/db/mysqlAdapter.js.map +1 -0
- package/dist/host/db/oracleAdapter.d.ts +7 -0
- package/dist/host/db/oracleAdapter.d.ts.map +1 -0
- package/dist/host/db/oracleAdapter.js +142 -0
- package/dist/host/db/oracleAdapter.js.map +1 -0
- package/dist/host/db/oracleConnectString.d.ts +10 -0
- package/dist/host/db/oracleConnectString.d.ts.map +1 -0
- package/dist/host/db/oracleConnectString.js +58 -0
- package/dist/host/db/oracleConnectString.js.map +1 -0
- package/dist/host/db/postgresAdapter.d.ts +7 -0
- package/dist/host/db/postgresAdapter.d.ts.map +1 -0
- package/dist/host/db/postgresAdapter.js +67 -0
- package/dist/host/db/postgresAdapter.js.map +1 -0
- package/dist/host/db/queryExecutor.d.ts +3 -0
- package/dist/host/db/queryExecutor.d.ts.map +1 -0
- package/dist/host/db/queryExecutor.js +97 -0
- package/dist/host/db/queryExecutor.js.map +1 -0
- package/dist/host/db/sqlNormalize.d.ts +3 -0
- package/dist/host/db/sqlNormalize.d.ts.map +1 -0
- package/dist/host/db/sqlNormalize.js +29 -0
- package/dist/host/db/sqlNormalize.js.map +1 -0
- package/dist/host/db/templateResolver.d.ts +3 -0
- package/dist/host/db/templateResolver.d.ts.map +1 -0
- package/dist/host/db/templateResolver.js +77 -0
- package/dist/host/db/templateResolver.js.map +1 -0
- package/dist/host/db/types.d.ts +59 -0
- package/dist/host/db/types.d.ts.map +1 -0
- package/dist/host/db/types.js +6 -0
- package/dist/host/db/types.js.map +1 -0
- package/dist/host/index.d.ts +6 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +7 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/lazy.d.ts +3 -0
- package/dist/host/lazy.d.ts.map +1 -0
- package/dist/host/lazy.js +31 -0
- package/dist/host/lazy.js.map +1 -0
- package/dist/host/redis/redisService.d.ts +9 -0
- package/dist/host/redis/redisService.d.ts.map +1 -0
- package/dist/host/redis/redisService.js +264 -0
- package/dist/host/redis/redisService.js.map +1 -0
- package/dist/host/redis/types.d.ts +44 -0
- package/dist/host/redis/types.d.ts.map +1 -0
- package/dist/host/redis/types.js +4 -0
- package/dist/host/redis/types.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/runner/requestRunner.d.ts.map +1 -1
- package/dist/runner/requestRunner.js +120 -0
- package/dist/runner/requestRunner.js.map +1 -1
- package/dist/runner/runCollection.d.ts +1 -1
- package/dist/runner/runCollection.d.ts.map +1 -1
- package/dist/runner/runCollection.js +3 -1
- package/dist/runner/runCollection.js.map +1 -1
- package/dist/script/legacy.d.ts.map +1 -1
- package/dist/script/legacy.js +8 -0
- package/dist/script/legacy.js.map +1 -1
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist-cjs/host/connections.js +164 -0
- package/dist-cjs/host/connections.js.map +1 -0
- package/dist-cjs/host/db/mongoAdapter.js +431 -0
- package/dist-cjs/host/db/mongoAdapter.js.map +1 -0
- package/dist-cjs/host/db/mysqlAdapter.js +73 -0
- package/dist-cjs/host/db/mysqlAdapter.js.map +1 -0
- package/dist-cjs/host/db/oracleAdapter.js +147 -0
- package/dist-cjs/host/db/oracleAdapter.js.map +1 -0
- package/dist-cjs/host/db/oracleConnectString.js +63 -0
- package/dist-cjs/host/db/oracleConnectString.js.map +1 -0
- package/dist-cjs/host/db/postgresAdapter.js +72 -0
- package/dist-cjs/host/db/postgresAdapter.js.map +1 -0
- package/dist-cjs/host/db/queryExecutor.js +101 -0
- package/dist-cjs/host/db/queryExecutor.js.map +1 -0
- package/dist-cjs/host/db/sqlNormalize.js +33 -0
- package/dist-cjs/host/db/sqlNormalize.js.map +1 -0
- package/dist-cjs/host/db/templateResolver.js +81 -0
- package/dist-cjs/host/db/templateResolver.js.map +1 -0
- package/dist-cjs/host/db/types.js +7 -0
- package/dist-cjs/host/db/types.js.map +1 -0
- package/dist-cjs/host/index.js +17 -0
- package/dist-cjs/host/index.js.map +1 -0
- package/dist-cjs/host/lazy.js +69 -0
- package/dist-cjs/host/lazy.js.map +1 -0
- package/dist-cjs/host/redis/redisService.js +268 -0
- package/dist-cjs/host/redis/redisService.js.map +1 -0
- package/dist-cjs/host/redis/types.js +5 -0
- package/dist-cjs/host/redis/types.js.map +1 -0
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/runner/requestRunner.js +120 -0
- package/dist-cjs/runner/requestRunner.js.map +1 -1
- package/dist-cjs/runner/runCollection.js +3 -1
- package/dist-cjs/runner/runCollection.js.map +1 -1
- package/dist-cjs/script/legacy.js +8 -0
- package/dist-cjs/script/legacy.js.map +1 -1
- package/package.json +8 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// DB query template resolution — thin shim that pre-resolves
|
|
2
|
+
// scope-prefixed path tokens (`{{response.body.id}}`, `{{env.x}}`,
|
|
3
|
+
// `{{global.x}}`) then delegates remaining tokens (`{{random.uuid}}`,
|
|
4
|
+
// `{{counter}}`, plain `{{varname}}`) to callman-core's canonical
|
|
5
|
+
// Postman-style template engine.
|
|
6
|
+
//
|
|
7
|
+
// Ported from `pmanfrontend/electron/db/templateResolver.ts`; the only change
|
|
8
|
+
// is importing the template engine from callman-core's own module instead of
|
|
9
|
+
// the published package.
|
|
10
|
+
import { createTemplateRuntimeContext, resolveTemplate as resolveTemplateCore, } from "../../templating/index.js";
|
|
11
|
+
const SCOPE_TOKEN_PATTERN = /\{\{\s*((?:response|env|global)(?:\.[^.{}\s]+)*)\s*\}\}/g;
|
|
12
|
+
const getByPath = (value, path) => {
|
|
13
|
+
let currentValue = value;
|
|
14
|
+
for (const segment of path) {
|
|
15
|
+
if (currentValue === null || currentValue === undefined) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
if (Array.isArray(currentValue)) {
|
|
19
|
+
const index = Number(segment);
|
|
20
|
+
if (!Number.isInteger(index)) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
currentValue = currentValue[index];
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (typeof currentValue !== "object") {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
currentValue = currentValue[segment];
|
|
30
|
+
}
|
|
31
|
+
return currentValue;
|
|
32
|
+
};
|
|
33
|
+
const stringifyResolvedValue = (value) => {
|
|
34
|
+
if (value === null || value === undefined) {
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
if (typeof value === "string") {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
41
|
+
return String(value);
|
|
42
|
+
}
|
|
43
|
+
return JSON.stringify(value);
|
|
44
|
+
};
|
|
45
|
+
const resolveScopeExpression = (expression, context) => {
|
|
46
|
+
if (expression === "response" || expression.startsWith("response.")) {
|
|
47
|
+
const path = expression === "response" ? [] : expression.slice("response.".length).split(".");
|
|
48
|
+
return stringifyResolvedValue(getByPath(context.response, path));
|
|
49
|
+
}
|
|
50
|
+
if (expression.startsWith("env.")) {
|
|
51
|
+
return context.env[expression.slice("env.".length)] ?? "";
|
|
52
|
+
}
|
|
53
|
+
if (expression.startsWith("global.")) {
|
|
54
|
+
return context.global[expression.slice("global.".length)] ?? "";
|
|
55
|
+
}
|
|
56
|
+
return "";
|
|
57
|
+
};
|
|
58
|
+
export const resolveTemplate = (input, context) => {
|
|
59
|
+
if (!input.includes("{{")) {
|
|
60
|
+
return input;
|
|
61
|
+
}
|
|
62
|
+
const normalizedContext = {
|
|
63
|
+
response: context.response ?? null,
|
|
64
|
+
env: context.env ?? {},
|
|
65
|
+
global: context.global ?? {},
|
|
66
|
+
};
|
|
67
|
+
const scopeResolved = input.replace(SCOPE_TOKEN_PATTERN, (_match, expression) => resolveScopeExpression(expression, normalizedContext));
|
|
68
|
+
// Plain `{{varname}}` still resolves against env+global flat lookup so
|
|
69
|
+
// the legacy non-prefixed syntax keeps working alongside random/counter.
|
|
70
|
+
const flatEnvironment = {
|
|
71
|
+
...normalizedContext.global,
|
|
72
|
+
...normalizedContext.env,
|
|
73
|
+
};
|
|
74
|
+
const runtimeContext = createTemplateRuntimeContext(flatEnvironment);
|
|
75
|
+
return resolveTemplateCore(scopeResolved, runtimeContext);
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=templateResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateResolver.js","sourceRoot":"","sources":["../../../src/host/db/templateResolver.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,mEAAmE;AACnE,sEAAsE;AACtE,kEAAkE;AAClE,iCAAiC;AACjC,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AAEzB,OAAO,EACL,4BAA4B,EAC5B,eAAe,IAAI,mBAAmB,GACvC,MAAM,2BAA2B,CAAC;AAInC,MAAM,mBAAmB,GACvB,0DAA0D,CAAC;AAE7D,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,IAAc,EAAW,EAAE;IAC5D,IAAI,YAAY,GAAG,KAAK,CAAC;IAEzB,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;QAC3B,IAAI,YAAY,KAAK,IAAI,IA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,MAAM,cAAc,GAAG,4BAA4B,CAAC,eAAe,CAAC,CAAC;IACrE,OAAO,mBAAmB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type DbConnectionType = "oracle" | "mongo" | "postgres" | "mysql";
|
|
2
|
+
export type DbQueryPhase = "pre" | "post" | "manual";
|
|
3
|
+
export type DbConnectionMode = "detailed" | "connectionString";
|
|
4
|
+
export interface DbConnection {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: DbConnectionType;
|
|
8
|
+
connectionMode: DbConnectionMode;
|
|
9
|
+
connectionString?: string;
|
|
10
|
+
host: string;
|
|
11
|
+
port: number;
|
|
12
|
+
database?: string;
|
|
13
|
+
serviceName?: string;
|
|
14
|
+
username: string;
|
|
15
|
+
password: string;
|
|
16
|
+
ssl?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface DbConnectionInput {
|
|
19
|
+
id?: string;
|
|
20
|
+
name: string;
|
|
21
|
+
type: DbConnectionType;
|
|
22
|
+
connectionMode: DbConnectionMode;
|
|
23
|
+
connectionString?: string;
|
|
24
|
+
host: string;
|
|
25
|
+
port: number;
|
|
26
|
+
database?: string;
|
|
27
|
+
serviceName?: string;
|
|
28
|
+
username: string;
|
|
29
|
+
password: string;
|
|
30
|
+
ssl?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface DbTemplateContext {
|
|
33
|
+
response?: unknown | null;
|
|
34
|
+
env?: Record<string, string>;
|
|
35
|
+
global?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
export interface ExecuteDbQueryPayload {
|
|
38
|
+
connectionId: string;
|
|
39
|
+
connection?: DbConnectionInput;
|
|
40
|
+
query: string;
|
|
41
|
+
params?: unknown[];
|
|
42
|
+
phase: DbQueryPhase;
|
|
43
|
+
context?: DbTemplateContext;
|
|
44
|
+
}
|
|
45
|
+
export interface DbQueryExecutionResult {
|
|
46
|
+
success: boolean;
|
|
47
|
+
phase: DbQueryPhase;
|
|
48
|
+
connectionId: string;
|
|
49
|
+
connectionName: string;
|
|
50
|
+
connectionType: DbConnectionType;
|
|
51
|
+
query: string;
|
|
52
|
+
resolvedQuery: string;
|
|
53
|
+
rows: unknown[];
|
|
54
|
+
rowCount: number;
|
|
55
|
+
durationMs: number;
|
|
56
|
+
executedAt: string;
|
|
57
|
+
error?: string;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/host/db/types.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;IACvB,cAAc,EAAE,gBAAgB,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;IACvB,cAAc,EAAE,gBAAgB,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IAGrB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,gBAAgB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Host-side database execution types. Ported from the desktop app
|
|
2
|
+
// (`pmanfrontend/electron/db/types.ts`) so the collection runner can execute
|
|
3
|
+
// `pm.db.query` / pre-/post-request DB nodes locally instead of delegating to
|
|
4
|
+
// an Electron host.
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/host/db/types.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,6EAA6E;AAC7E,8EAA8E;AAC9E,oBAAoB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { buildDbExecuteCapability, runConfiguredDbQuery, runRedisCommandsForPhase, buildRedisValueCache, buildRedisCapability, type ConnectionRuntime, type ConnectionRuntimeMap, type DbConnectionRuntime, type RedisConnectionRuntime, type DbNodeConfig, type RequestDatabaseRuntimeConfig, type RequestRedisRuntimeConfig, type ScriptTemplateContext, } from "./connections.js";
|
|
2
|
+
export { executeQuery } from "./db/queryExecutor.js";
|
|
3
|
+
export { type DbConnection, type DbConnectionInput, type DbConnectionType, type DbConnectionMode, type DbQueryExecutionResult, type DbQueryPhase, } from "./db/types.js";
|
|
4
|
+
export { executeRedisCommands } from "./redis/redisService.js";
|
|
5
|
+
export { type RedisCommandExecutionResult, type RedisCommandPhase, type RequestRedisResult, } from "./redis/types.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Host execution layer — local DB / Redis drivers + the glue that turns
|
|
2
|
+
// resolved connection runtimes into script capabilities. Lets the collection
|
|
3
|
+
// runner execute `pm.db.*` and `pm.redis` without an external host process.
|
|
4
|
+
export { buildDbExecuteCapability, runConfiguredDbQuery, runRedisCommandsForPhase, buildRedisValueCache, buildRedisCapability, } from "./connections.js";
|
|
5
|
+
export { executeQuery } from "./db/queryExecutor.js";
|
|
6
|
+
export { executeRedisCommands } from "./redis/redisService.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,6EAA6E;AAC7E,4EAA4E;AAE5E,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,GASrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAUrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/host/lazy.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,KAAG,OAAO,CAAC,GAAG,CAQjE,CAAC;AAIF,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,KAChB,OAAO,CAAC,GAAG,GAAG,IAAI,CAMpB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Lazy loader for OPTIONAL native driver packages (mongodb, pg, mysql2,
|
|
2
|
+
// oracledb, ioredis, bson). callman-core stays runtime-agnostic: these are
|
|
3
|
+
// declared as `optionalDependencies` and only loaded the first time a query
|
|
4
|
+
// that needs them runs. Hosts that never touch a given database never pay the
|
|
5
|
+
// native-install cost.
|
|
6
|
+
//
|
|
7
|
+
// The specifier is passed as a *variable* on purpose — that stops the
|
|
8
|
+
// TypeScript compiler from statically resolving (and erroring on) packages
|
|
9
|
+
// that may not be installed, while Node's runtime resolution still finds the
|
|
10
|
+
// real module by walking up `node_modules`.
|
|
11
|
+
const moduleCache = new Map();
|
|
12
|
+
export const loadOptionalModule = (specifier) => {
|
|
13
|
+
const cached = moduleCache.get(specifier);
|
|
14
|
+
if (cached) {
|
|
15
|
+
return cached;
|
|
16
|
+
}
|
|
17
|
+
const loading = import(specifier);
|
|
18
|
+
moduleCache.set(specifier, loading);
|
|
19
|
+
return loading;
|
|
20
|
+
};
|
|
21
|
+
// Like `loadOptionalModule` but resolves to `null` instead of throwing when the
|
|
22
|
+
// module is absent. Used for soft dependencies (e.g. `bson` for Decimal128).
|
|
23
|
+
export const loadOptionalModuleOrNull = async (specifier) => {
|
|
24
|
+
try {
|
|
25
|
+
return await loadOptionalModule(specifier);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=lazy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.js","sourceRoot":"","sources":["../../src/host/lazy.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,uBAAuB;AACvB,EAAE;AACF,sEAAsE;AACtE,2EAA2E;AAC3E,6EAA6E;AAC7E,4CAA4C;AAE5C,MAAM,WAAW,GAAG,IAAI,GAAG,EAA4B,CAAC;AAExD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAgB,EAAE;IACpE,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAsB,CAAC;IAChC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,OAAuB,CAAC;AACjC,CAAC,CAAC;AAEF,gFAAgF;AAChF,6EAA6E;AAC7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,SAAiB,EACI,EAAE;IACvB,IAAI,CAAC;QACH,OAAO,MAAM,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RedisCommandExecutionResult, RedisCommandPhase, RedisConnectionInput, RedisTemplateContext } from "./types.js";
|
|
2
|
+
export declare const executeRedisCommands: ({ connectionId, connection: connectionInput, commands, phase, context, }: {
|
|
3
|
+
connectionId: string;
|
|
4
|
+
connection?: RedisConnectionInput;
|
|
5
|
+
commands: string[];
|
|
6
|
+
phase: RedisCommandPhase;
|
|
7
|
+
context?: RedisTemplateContext;
|
|
8
|
+
}) => Promise<RedisCommandExecutionResult[]>;
|
|
9
|
+
//# sourceMappingURL=redisService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redisService.d.ts","sourceRoot":"","sources":["../../../src/host/redis/redisService.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EAEjB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAgUpB,eAAO,MAAM,oBAAoB,GAAU,0EAMxC;IACD,YAAY,EAAE,MAAM,CAAC;IAGrB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,KAAG,OAAO,CAAC,2BAA2B,EAAE,CA2CxC,CAAC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
// Host-side Redis command executor. Ported from
|
|
2
|
+
// `pmanfrontend/electron/redis/redisService.ts`. The desktop original resolves
|
|
3
|
+
// connections from a local store (`redisManager`); callman-core has none, so
|
|
4
|
+
// the caller MUST provide the resolved `connection`. `ioredis` is loaded lazily
|
|
5
|
+
// via `loadOptionalModule`.
|
|
6
|
+
import { performance } from "node:perf_hooks";
|
|
7
|
+
import { loadOptionalModule } from "../lazy.js";
|
|
8
|
+
import { resolveTemplate } from "../db/templateResolver.js";
|
|
9
|
+
const unwrap = (mod) => (mod && mod.default ? mod.default : mod);
|
|
10
|
+
const loadRedisDriver = async () => {
|
|
11
|
+
try {
|
|
12
|
+
const mod = await loadOptionalModule("ioredis");
|
|
13
|
+
// ioredis exports both `default` and a named `Redis`. Prefer the named
|
|
14
|
+
// class; fall back to default.
|
|
15
|
+
return mod.Redis ?? unwrap(mod);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
throw new Error("Redis driver (`ioredis`) is not installed. Install `ioredis` to use Redis connections.");
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const REDIS_TOKEN_PATTERN = /"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|(\S+)/g;
|
|
22
|
+
const stripEscapes = (value) => value.replace(/\\(["'\\])/g, "$1");
|
|
23
|
+
const tokenizeRedisCommand = (input) => {
|
|
24
|
+
const tokens = [];
|
|
25
|
+
for (const match of input.matchAll(REDIS_TOKEN_PATTERN)) {
|
|
26
|
+
const [, doubleQuoted, singleQuoted, bare] = match;
|
|
27
|
+
const token = doubleQuoted ?? singleQuoted ?? bare ?? "";
|
|
28
|
+
if (token.length === 0) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
tokens.push(stripEscapes(token));
|
|
32
|
+
}
|
|
33
|
+
return tokens;
|
|
34
|
+
};
|
|
35
|
+
const parseRedisCommand = (command) => {
|
|
36
|
+
const tokens = tokenizeRedisCommand(command.trim());
|
|
37
|
+
if (tokens.length === 0) {
|
|
38
|
+
throw new Error("Redis command cannot be empty");
|
|
39
|
+
}
|
|
40
|
+
const commandName = tokens[0]?.toUpperCase();
|
|
41
|
+
if (commandName !== "GET" &&
|
|
42
|
+
commandName !== "SET" &&
|
|
43
|
+
commandName !== "DEL" &&
|
|
44
|
+
commandName !== "EXISTS" &&
|
|
45
|
+
commandName !== "TTL") {
|
|
46
|
+
throw new Error("Supported Redis commands are GET, SET, DEL, EXISTS, and TTL");
|
|
47
|
+
}
|
|
48
|
+
const key = tokens[1]?.trim() ?? "";
|
|
49
|
+
if (!key) {
|
|
50
|
+
throw new Error(`${commandName} requires a key`);
|
|
51
|
+
}
|
|
52
|
+
if (commandName === "SET") {
|
|
53
|
+
if (tokens.length < 3) {
|
|
54
|
+
throw new Error("SET requires a key and a value");
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
commandName,
|
|
58
|
+
key,
|
|
59
|
+
args: [tokens.slice(2).join(" ")],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (tokens.length > 2) {
|
|
63
|
+
throw new Error(`${commandName} accepts only a single key`);
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
commandName,
|
|
67
|
+
key,
|
|
68
|
+
args: [],
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
const createRedisClient = async (connection) => {
|
|
72
|
+
const IORedis = await loadRedisDriver();
|
|
73
|
+
return new IORedis({
|
|
74
|
+
host: connection.host,
|
|
75
|
+
port: connection.port,
|
|
76
|
+
password: connection.password,
|
|
77
|
+
db: connection.dbIndex,
|
|
78
|
+
lazyConnect: true,
|
|
79
|
+
enableOfflineQueue: false,
|
|
80
|
+
maxRetriesPerRequest: 1,
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
const stringifyRedisResult = (value) => {
|
|
84
|
+
if (value === null || value === undefined) {
|
|
85
|
+
return "null";
|
|
86
|
+
}
|
|
87
|
+
if (typeof value === "string") {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
91
|
+
return String(value);
|
|
92
|
+
}
|
|
93
|
+
return JSON.stringify(value);
|
|
94
|
+
};
|
|
95
|
+
const normalizeRedisResultValue = (value) => {
|
|
96
|
+
if (value === null || value === undefined) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
if (Buffer.isBuffer(value)) {
|
|
103
|
+
return value.toString("utf-8");
|
|
104
|
+
}
|
|
105
|
+
if (Array.isArray(value)) {
|
|
106
|
+
return value.map((entry) => normalizeRedisResultValue(entry));
|
|
107
|
+
}
|
|
108
|
+
if (typeof value === "object") {
|
|
109
|
+
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [
|
|
110
|
+
key,
|
|
111
|
+
normalizeRedisResultValue(entry),
|
|
112
|
+
]));
|
|
113
|
+
}
|
|
114
|
+
return String(value);
|
|
115
|
+
};
|
|
116
|
+
const executeParsedCommand = async (client, parsedCommand) => {
|
|
117
|
+
switch (parsedCommand.commandName) {
|
|
118
|
+
case "GET":
|
|
119
|
+
return await client.get(parsedCommand.key);
|
|
120
|
+
case "SET":
|
|
121
|
+
await client.set(parsedCommand.key, parsedCommand.args[0] ?? "");
|
|
122
|
+
return parsedCommand.args[0] ?? "";
|
|
123
|
+
case "DEL":
|
|
124
|
+
return await client.del(parsedCommand.key);
|
|
125
|
+
case "EXISTS":
|
|
126
|
+
return (await client.exists(parsedCommand.key)) > 0;
|
|
127
|
+
case "TTL":
|
|
128
|
+
return await client.ttl(parsedCommand.key);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const buildFailureResult = ({ connectionId, connectionName, command, resolvedCommand, phase, error, startedAt, commandName = "", key = null, }) => ({
|
|
132
|
+
success: false,
|
|
133
|
+
phase,
|
|
134
|
+
connectionId,
|
|
135
|
+
connectionName,
|
|
136
|
+
command,
|
|
137
|
+
resolvedCommand,
|
|
138
|
+
commandName,
|
|
139
|
+
key,
|
|
140
|
+
result: null,
|
|
141
|
+
resultText: "",
|
|
142
|
+
durationMs: Math.round(performance.now() - startedAt),
|
|
143
|
+
executedAt: new Date().toISOString(),
|
|
144
|
+
error: error instanceof Error ? error.message : String(error),
|
|
145
|
+
});
|
|
146
|
+
const executeResolvedCommand = async ({ client, connection, command, resolvedCommand, phase, }) => {
|
|
147
|
+
const startedAt = performance.now();
|
|
148
|
+
try {
|
|
149
|
+
const parsedCommand = parseRedisCommand(resolvedCommand);
|
|
150
|
+
const rawResult = await executeParsedCommand(client, parsedCommand);
|
|
151
|
+
const normalizedResult = normalizeRedisResultValue(rawResult);
|
|
152
|
+
return {
|
|
153
|
+
success: true,
|
|
154
|
+
phase,
|
|
155
|
+
connectionId: connection.id,
|
|
156
|
+
connectionName: connection.name,
|
|
157
|
+
command,
|
|
158
|
+
resolvedCommand,
|
|
159
|
+
commandName: parsedCommand.commandName,
|
|
160
|
+
key: parsedCommand.key,
|
|
161
|
+
result: normalizedResult,
|
|
162
|
+
resultText: stringifyRedisResult(normalizedResult),
|
|
163
|
+
durationMs: Math.round(performance.now() - startedAt),
|
|
164
|
+
executedAt: new Date().toISOString(),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
let commandName = "";
|
|
169
|
+
let key = null;
|
|
170
|
+
try {
|
|
171
|
+
const parsedCommand = parseRedisCommand(resolvedCommand);
|
|
172
|
+
commandName = parsedCommand.commandName;
|
|
173
|
+
key = parsedCommand.key;
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// ignore parse failure metadata
|
|
177
|
+
}
|
|
178
|
+
return buildFailureResult({
|
|
179
|
+
connectionId: connection.id,
|
|
180
|
+
connectionName: connection.name,
|
|
181
|
+
command,
|
|
182
|
+
resolvedCommand,
|
|
183
|
+
phase,
|
|
184
|
+
error,
|
|
185
|
+
startedAt,
|
|
186
|
+
commandName,
|
|
187
|
+
key,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
const executeWithConnection = async ({ connection, commands, phase, context, }) => {
|
|
192
|
+
if (commands.length === 0) {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
const client = await createRedisClient(connection);
|
|
196
|
+
try {
|
|
197
|
+
await client.connect();
|
|
198
|
+
const results = [];
|
|
199
|
+
for (const command of commands) {
|
|
200
|
+
const resolvedCommand = resolveTemplate(command, context ?? {});
|
|
201
|
+
const result = await executeResolvedCommand({
|
|
202
|
+
client,
|
|
203
|
+
connection,
|
|
204
|
+
command,
|
|
205
|
+
resolvedCommand,
|
|
206
|
+
phase,
|
|
207
|
+
});
|
|
208
|
+
results.push(result);
|
|
209
|
+
}
|
|
210
|
+
return results;
|
|
211
|
+
}
|
|
212
|
+
finally {
|
|
213
|
+
client.disconnect();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
const normalizeConnectionInput = (input) => ({
|
|
217
|
+
id: input.id?.trim() || "runtime-connection",
|
|
218
|
+
name: input.name.trim(),
|
|
219
|
+
type: "redis",
|
|
220
|
+
host: input.host.trim(),
|
|
221
|
+
port: Number(input.port),
|
|
222
|
+
password: input.password?.trim() ? input.password : undefined,
|
|
223
|
+
dbIndex: typeof input.dbIndex === "number" && Number.isFinite(input.dbIndex) && input.dbIndex >= 0
|
|
224
|
+
? Math.trunc(input.dbIndex)
|
|
225
|
+
: undefined,
|
|
226
|
+
});
|
|
227
|
+
export const executeRedisCommands = async ({ connectionId, connection: connectionInput, commands, phase, context, }) => {
|
|
228
|
+
const normalizedCommands = commands.map((command) => command.trim()).filter(Boolean);
|
|
229
|
+
if (normalizedCommands.length === 0) {
|
|
230
|
+
return [];
|
|
231
|
+
}
|
|
232
|
+
const connection = connectionInput ? normalizeConnectionInput(connectionInput) : null;
|
|
233
|
+
if (!connection) {
|
|
234
|
+
return normalizedCommands.map((command) => buildFailureResult({
|
|
235
|
+
connectionId,
|
|
236
|
+
connectionName: "",
|
|
237
|
+
command,
|
|
238
|
+
resolvedCommand: command,
|
|
239
|
+
phase,
|
|
240
|
+
error: "Redis connection not found",
|
|
241
|
+
startedAt: performance.now(),
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
return await executeWithConnection({
|
|
246
|
+
connection,
|
|
247
|
+
commands: normalizedCommands,
|
|
248
|
+
phase,
|
|
249
|
+
context,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
return normalizedCommands.map((command) => buildFailureResult({
|
|
254
|
+
connectionId: connection.id,
|
|
255
|
+
connectionName: connection.name,
|
|
256
|
+
command,
|
|
257
|
+
resolvedCommand: resolveTemplate(command, context ?? {}),
|
|
258
|
+
phase,
|
|
259
|
+
error,
|
|
260
|
+
startedAt: performance.now(),
|
|
261
|
+
}));
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
//# sourceMappingURL=redisService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redisService.js","sourceRoot":"","sources":["../../../src/host/redis/redisService.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAChF,4BAA4B;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9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
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: "redis";
|
|
6
|
+
host: string;
|
|
7
|
+
port: number;
|
|
8
|
+
password?: string;
|
|
9
|
+
dbIndex?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RedisConnectionInput {
|
|
12
|
+
id?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
type: "redis";
|
|
15
|
+
host: string;
|
|
16
|
+
port: number;
|
|
17
|
+
password?: string;
|
|
18
|
+
dbIndex?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface RedisTemplateContext {
|
|
21
|
+
response?: unknown | null;
|
|
22
|
+
env?: Record<string, string>;
|
|
23
|
+
global?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
export interface RedisCommandExecutionResult {
|
|
26
|
+
success: boolean;
|
|
27
|
+
phase: RedisCommandPhase;
|
|
28
|
+
connectionId: string;
|
|
29
|
+
connectionName: string;
|
|
30
|
+
command: string;
|
|
31
|
+
resolvedCommand: string;
|
|
32
|
+
commandName: string;
|
|
33
|
+
key: string | null;
|
|
34
|
+
result: unknown;
|
|
35
|
+
resultText: string;
|
|
36
|
+
durationMs: number;
|
|
37
|
+
executedAt: string;
|
|
38
|
+
error?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface RequestRedisResult {
|
|
41
|
+
pre: RedisCommandExecutionResult[];
|
|
42
|
+
post: RedisCommandExecutionResult[];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/host/redis/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,C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"mappings":"AAAA,+CAA+C;AAC/C,0CAA0C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export { validateContracts, evaluateContractCandidate, normalizeContractRule, ty
|
|
|
19
19
|
export { resolveContractPath, generalizeContractPath, normalizeContractPathKey, type ResolvedCandidate, } from "./contract/pathResolver.js";
|
|
20
20
|
export { SCENARIO_CONTRACT_FORMATS, FORMAT_VALIDATORS, isContractFormat, type ContractFormat, } from "./contract/formats.js";
|
|
21
21
|
export * from "./scenario-runner/index.js";
|
|
22
|
+
export * from "./host/index.js";
|
|
22
23
|
export * from "./types/index.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,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wB,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,cAAc,GACpB,MAAM,uBAAuB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,5 +17,6 @@ export { validateContracts, evaluateContractCandidate, normalizeContractRule, }
|
|
|
17
17
|
export { resolveContractPath, generalizeContractPath, normalizeContractPathKey, } from "./contract/pathResolver.js";
|
|
18
18
|
export { SCENARIO_CONTRACT_FORMATS, FORMAT_VALIDATORS, isContractFormat, } from "./contract/formats.js";
|
|
19
19
|
export * from "./scenario-runner/index.js";
|
|
20
|
+
export * from "./host/index.js";
|
|
20
21
|
export * from "./types/index.js";
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,kBAAkB,GAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,cA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AE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAyBhE,OAAO,EACL,eAAe,GAIhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,GAEtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestRunner.d.ts","sourceRoot":"","sources":["../../src/runner/requestRunner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requestRunner.d.ts","sourceRoot":"","sources":["../../src/runner/requestRunner.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,eAAe,EACf,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AA0K3B,eAAO,MAAM,UAAU,GACrB,OAAO,eAAe,KACrB,OAAO,CAAC,gBAAgB,CAiG1B,CAAC"}
|