@bluelibs/runner-dev 4.0.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/AI.md +411 -0
- package/README.md +1103 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +58 -0
- package/dist/cli.js.map +1 -0
- package/dist/client/documentation.d.ts +8 -0
- package/dist/client/documentation.js +144 -0
- package/dist/client/documentation.js.map +1 -0
- package/dist/components/Documentation/Documentation.d.ts +8 -0
- package/dist/components/Documentation/Documentation.js +283 -0
- package/dist/components/Documentation/Documentation.js.map +1 -0
- package/dist/components/Documentation/components/DiagnosticsPanel.d.ts +7 -0
- package/dist/components/Documentation/components/DiagnosticsPanel.js +126 -0
- package/dist/components/Documentation/components/DiagnosticsPanel.js.map +1 -0
- package/dist/components/Documentation/components/EventCard.d.ts +8 -0
- package/dist/components/Documentation/components/EventCard.js +164 -0
- package/dist/components/Documentation/components/EventCard.js.map +1 -0
- package/dist/components/Documentation/components/HookCard.d.ts +8 -0
- package/dist/components/Documentation/components/HookCard.js +111 -0
- package/dist/components/Documentation/components/HookCard.js.map +1 -0
- package/dist/components/Documentation/components/MiddlewareCard.d.ts +8 -0
- package/dist/components/Documentation/components/MiddlewareCard.js +159 -0
- package/dist/components/Documentation/components/MiddlewareCard.js.map +1 -0
- package/dist/components/Documentation/components/ResourceCard.d.ts +8 -0
- package/dist/components/Documentation/components/ResourceCard.js +94 -0
- package/dist/components/Documentation/components/ResourceCard.js.map +1 -0
- package/dist/components/Documentation/components/Sidebar.d.ts +13 -0
- package/dist/components/Documentation/components/Sidebar.js +129 -0
- package/dist/components/Documentation/components/Sidebar.js.map +1 -0
- package/dist/components/Documentation/components/TagCard.d.ts +7 -0
- package/dist/components/Documentation/components/TagCard.js +75 -0
- package/dist/components/Documentation/components/TagCard.js.map +1 -0
- package/dist/components/Documentation/components/TaskCard.d.ts +8 -0
- package/dist/components/Documentation/components/TaskCard.js +77 -0
- package/dist/components/Documentation/components/TaskCard.js.map +1 -0
- package/dist/components/Documentation/index.d.ts +2 -0
- package/dist/components/Documentation/index.js +6 -0
- package/dist/components/Documentation/index.js.map +1 -0
- package/dist/components/Documentation/utils/formatting.d.ts +8 -0
- package/dist/components/Documentation/utils/formatting.js +84 -0
- package/dist/components/Documentation/utils/formatting.js.map +1 -0
- package/dist/components/ExampleComponent.d.ts +10 -0
- package/dist/components/ExampleComponent.js +48 -0
- package/dist/components/ExampleComponent.js.map +1 -0
- package/dist/generated/resolvers-types.d.ts +1523 -0
- package/dist/generated/resolvers-types.js +3 -0
- package/dist/generated/resolvers-types.js.map +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -0
- package/dist/mcp/env.d.ts +5 -0
- package/dist/mcp/env.js +42 -0
- package/dist/mcp/env.js.map +1 -0
- package/dist/mcp/format.d.ts +50 -0
- package/dist/mcp/format.js +249 -0
- package/dist/mcp/format.js.map +1 -0
- package/dist/mcp/help.d.ts +20 -0
- package/dist/mcp/help.js +121 -0
- package/dist/mcp/help.js.map +1 -0
- package/dist/mcp/http.d.ts +6 -0
- package/dist/mcp/http.js +47 -0
- package/dist/mcp/http.js.map +1 -0
- package/dist/mcp/projectOverview.d.ts +2 -0
- package/dist/mcp/projectOverview.js +210 -0
- package/dist/mcp/projectOverview.js.map +1 -0
- package/dist/mcp/schema.d.ts +1 -0
- package/dist/mcp/schema.js +17 -0
- package/dist/mcp/schema.js.map +1 -0
- package/dist/mcp/tools/graphql.introspect.d.ts +2 -0
- package/dist/mcp/tools/graphql.introspect.js +19 -0
- package/dist/mcp/tools/graphql.introspect.js.map +1 -0
- package/dist/mcp/tools/graphql.mutation.d.ts +2 -0
- package/dist/mcp/tools/graphql.mutation.js +43 -0
- package/dist/mcp/tools/graphql.mutation.js.map +1 -0
- package/dist/mcp/tools/graphql.ping.d.ts +2 -0
- package/dist/mcp/tools/graphql.ping.js +23 -0
- package/dist/mcp/tools/graphql.ping.js.map +1 -0
- package/dist/mcp/tools/graphql.query.d.ts +2 -0
- package/dist/mcp/tools/graphql.query.js +42 -0
- package/dist/mcp/tools/graphql.query.js.map +1 -0
- package/dist/mcp/tools/graphql.schemaSdl.d.ts +2 -0
- package/dist/mcp/tools/graphql.schemaSdl.js +15 -0
- package/dist/mcp/tools/graphql.schemaSdl.js.map +1 -0
- package/dist/mcp/tools/help.read.d.ts +2 -0
- package/dist/mcp/tools/help.read.js +67 -0
- package/dist/mcp/tools/help.read.js.map +1 -0
- package/dist/mcp/tools/help.runner.d.ts +2 -0
- package/dist/mcp/tools/help.runner.js +55 -0
- package/dist/mcp/tools/help.runner.js.map +1 -0
- package/dist/mcp/tools/help.runnerDev.d.ts +2 -0
- package/dist/mcp/tools/help.runnerDev.js +56 -0
- package/dist/mcp/tools/help.runnerDev.js.map +1 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +75 -0
- package/dist/mcp.js.map +1 -0
- package/dist/resources/dev.resource.d.ts +5 -0
- package/dist/resources/dev.resource.js +26 -0
- package/dist/resources/dev.resource.js.map +1 -0
- package/dist/resources/docs.generator.resource.d.ts +17 -0
- package/dist/resources/docs.generator.resource.js +230 -0
- package/dist/resources/docs.generator.resource.js.map +1 -0
- package/dist/resources/graphql-accumulator.resource.d.ts +7 -0
- package/dist/resources/graphql-accumulator.resource.js +41 -0
- package/dist/resources/graphql-accumulator.resource.js.map +1 -0
- package/dist/resources/introspector.resource.d.ts +129 -0
- package/dist/resources/introspector.resource.js +266 -0
- package/dist/resources/introspector.resource.js.map +1 -0
- package/dist/resources/introspector.tools.d.ts +47 -0
- package/dist/resources/introspector.tools.js +505 -0
- package/dist/resources/introspector.tools.js.map +1 -0
- package/dist/resources/live.resource.d.ts +80 -0
- package/dist/resources/live.resource.js +231 -0
- package/dist/resources/live.resource.js.map +1 -0
- package/dist/resources/server.resource.d.ts +38 -0
- package/dist/resources/server.resource.js +106 -0
- package/dist/resources/server.resource.js.map +1 -0
- package/dist/resources/swap.resource.d.ts +43 -0
- package/dist/resources/swap.resource.js +251 -0
- package/dist/resources/swap.resource.js.map +1 -0
- package/dist/resources/swap.tools.d.ts +31 -0
- package/dist/resources/swap.tools.js +207 -0
- package/dist/resources/swap.tools.js.map +1 -0
- package/dist/resources/telemetry.chain.d.ts +13 -0
- package/dist/resources/telemetry.chain.js +32 -0
- package/dist/resources/telemetry.chain.js.map +1 -0
- package/dist/resources/telemetry.resource.d.ts +1 -0
- package/dist/resources/telemetry.resource.js +90 -0
- package/dist/resources/telemetry.resource.js.map +1 -0
- package/dist/schema/context.d.ts +11 -0
- package/dist/schema/context.js +3 -0
- package/dist/schema/context.js.map +1 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.js +72 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/model.d.ts +97 -0
- package/dist/schema/model.js +5 -0
- package/dist/schema/model.js.map +1 -0
- package/dist/schema/mutation.d.ts +3 -0
- package/dist/schema/mutation.js +112 -0
- package/dist/schema/mutation.js.map +1 -0
- package/dist/schema/query.d.ts +3 -0
- package/dist/schema/query.js +295 -0
- package/dist/schema/query.js.map +1 -0
- package/dist/schema/types/AllType.d.ts +3 -0
- package/dist/schema/types/AllType.js +149 -0
- package/dist/schema/types/AllType.js.map +1 -0
- package/dist/schema/types/BaseElementCommon.d.ts +11 -0
- package/dist/schema/types/BaseElementCommon.js +61 -0
- package/dist/schema/types/BaseElementCommon.js.map +1 -0
- package/dist/schema/types/DiagnosticsType.d.ts +2 -0
- package/dist/schema/types/DiagnosticsType.js +15 -0
- package/dist/schema/types/DiagnosticsType.js.map +1 -0
- package/dist/schema/types/EventType.d.ts +4 -0
- package/dist/schema/types/EventType.js +97 -0
- package/dist/schema/types/EventType.js.map +1 -0
- package/dist/schema/types/HookType.d.ts +4 -0
- package/dist/schema/types/HookType.js +123 -0
- package/dist/schema/types/HookType.js.map +1 -0
- package/dist/schema/types/LiveType.d.ts +33 -0
- package/dist/schema/types/LiveType.js +553 -0
- package/dist/schema/types/LiveType.js.map +1 -0
- package/dist/schema/types/MetaType.d.ts +3 -0
- package/dist/schema/types/MetaType.js +31 -0
- package/dist/schema/types/MetaType.js.map +1 -0
- package/dist/schema/types/MiddlewareType.d.ts +4 -0
- package/dist/schema/types/MiddlewareType.js +26 -0
- package/dist/schema/types/MiddlewareType.js.map +1 -0
- package/dist/schema/types/ResourceType.d.ts +2 -0
- package/dist/schema/types/ResourceType.js +145 -0
- package/dist/schema/types/ResourceType.js.map +1 -0
- package/dist/schema/types/RunTypes.d.ts +7 -0
- package/dist/schema/types/RunTypes.js +95 -0
- package/dist/schema/types/RunTypes.js.map +1 -0
- package/dist/schema/types/SwapType.d.ts +5 -0
- package/dist/schema/types/SwapType.js +42 -0
- package/dist/schema/types/SwapType.js.map +1 -0
- package/dist/schema/types/TagType.d.ts +6 -0
- package/dist/schema/types/TagType.js +48 -0
- package/dist/schema/types/TagType.js.map +1 -0
- package/dist/schema/types/TaskLikeCommon.d.ts +7 -0
- package/dist/schema/types/TaskLikeCommon.js +86 -0
- package/dist/schema/types/TaskLikeCommon.js.map +1 -0
- package/dist/schema/types/TaskType.d.ts +11 -0
- package/dist/schema/types/TaskType.js +188 -0
- package/dist/schema/types/TaskType.js.map +1 -0
- package/dist/schema/types/index.d.ts +13 -0
- package/dist/schema/types/index.js +44 -0
- package/dist/schema/types/index.js.map +1 -0
- package/dist/schema/types/middleware/UsageTypes.d.ts +3 -0
- package/dist/schema/types/middleware/UsageTypes.js +23 -0
- package/dist/schema/types/middleware/UsageTypes.js.map +1 -0
- package/dist/schema/types/middleware/common.d.ts +6 -0
- package/dist/schema/types/middleware/common.js +156 -0
- package/dist/schema/types/middleware/common.js.map +1 -0
- package/dist/schema/utils.d.ts +12 -0
- package/dist/schema/utils.js +35 -0
- package/dist/schema/utils.js.map +1 -0
- package/dist/ui/index.html +20 -0
- package/dist/ui/static/index-D-NS5aw1.js +40 -0
- package/dist/utils/json-schema-to-readable.d.ts +1 -0
- package/dist/utils/json-schema-to-readable.js +256 -0
- package/dist/utils/json-schema-to-readable.js.map +1 -0
- package/dist/utils/path.d.ts +16 -0
- package/dist/utils/path.js +101 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/react-ssr.d.ts +9 -0
- package/dist/utils/react-ssr.js +36 -0
- package/dist/utils/react-ssr.js.map +1 -0
- package/dist/utils/zod.d.ts +6 -0
- package/dist/utils/zod.js +39 -0
- package/dist/utils/zod.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function jsonSchemaToReadableText(schemaString: string): string;
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jsonSchemaToReadableText = jsonSchemaToReadableText;
|
|
4
|
+
function jsonSchemaToReadableText(schemaString) {
|
|
5
|
+
try {
|
|
6
|
+
const schema = JSON.parse(schemaString);
|
|
7
|
+
return formatSchema(schema, 0, schema);
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
return `Error parsing JSON schema: ${error instanceof Error ? error.message : "Unknown error"}`;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function resolveRef(ref, rootSchema) {
|
|
14
|
+
if (!ref.startsWith("#/"))
|
|
15
|
+
return null;
|
|
16
|
+
const path = ref.slice(2).split("/");
|
|
17
|
+
let current = rootSchema;
|
|
18
|
+
for (const part of path) {
|
|
19
|
+
if (current && typeof current === "object" && part in current) {
|
|
20
|
+
current = current[part];
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return current;
|
|
27
|
+
}
|
|
28
|
+
function formatSchema(schema, depth = 0, rootSchema) {
|
|
29
|
+
const indent = " ".repeat(depth);
|
|
30
|
+
const lines = [];
|
|
31
|
+
// Handle $ref
|
|
32
|
+
if (schema.$ref && rootSchema) {
|
|
33
|
+
const resolved = resolveRef(schema.$ref, rootSchema);
|
|
34
|
+
if (resolved) {
|
|
35
|
+
return formatSchema(resolved, depth, rootSchema);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
lines.push(`${indent}Reference: ${schema.$ref} (unresolved)`);
|
|
39
|
+
return lines.join("\n");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Handle title and description at root level
|
|
43
|
+
if (depth === 0) {
|
|
44
|
+
if (schema.title) {
|
|
45
|
+
lines.push(`Schema: ${schema.title}`);
|
|
46
|
+
lines.push("");
|
|
47
|
+
}
|
|
48
|
+
if (schema.description) {
|
|
49
|
+
lines.push(`Description: ${schema.description}`);
|
|
50
|
+
lines.push("");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Handle different schema types
|
|
54
|
+
if (schema.type === "object") {
|
|
55
|
+
if (depth === 0) {
|
|
56
|
+
lines.push("Type: Object");
|
|
57
|
+
if (schema.required && schema.required.length > 0) {
|
|
58
|
+
lines.push(`Required fields: ${schema.required.join(", ")}`);
|
|
59
|
+
}
|
|
60
|
+
lines.push("");
|
|
61
|
+
lines.push("Properties:");
|
|
62
|
+
}
|
|
63
|
+
if (schema.properties) {
|
|
64
|
+
for (const [propName, propSchema] of Object.entries(schema.properties)) {
|
|
65
|
+
const required = schema.required?.includes(propName)
|
|
66
|
+
? " (required)"
|
|
67
|
+
: " (optional)";
|
|
68
|
+
lines.push("");
|
|
69
|
+
lines.push(`${indent} ${propName}${required}:`);
|
|
70
|
+
lines.push(formatProperty(propSchema, depth + 2, rootSchema));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (schema.additionalProperties !== undefined) {
|
|
74
|
+
lines.push("");
|
|
75
|
+
lines.push(`${indent} Additional properties: ${schema.additionalProperties === false ? "not allowed" : "allowed"}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (schema.type === "array") {
|
|
79
|
+
lines.push(`${indent}Type: Array`);
|
|
80
|
+
if (schema.minItems !== undefined) {
|
|
81
|
+
lines.push(`${indent}Minimum items: ${schema.minItems}`);
|
|
82
|
+
}
|
|
83
|
+
if (schema.maxItems !== undefined) {
|
|
84
|
+
lines.push(`${indent}Maximum items: ${schema.maxItems}`);
|
|
85
|
+
}
|
|
86
|
+
if (schema.uniqueItems) {
|
|
87
|
+
lines.push(`${indent}Items must be unique`);
|
|
88
|
+
}
|
|
89
|
+
if (schema.items) {
|
|
90
|
+
lines.push(`${indent}Item type:`);
|
|
91
|
+
lines.push(formatProperty(schema.items, depth + 1, rootSchema));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (schema.enum) {
|
|
95
|
+
lines.push(`${indent}Allowed values: ${schema.enum
|
|
96
|
+
.map((v) => JSON.stringify(v))
|
|
97
|
+
.join(", ")}`);
|
|
98
|
+
}
|
|
99
|
+
else if (schema.const !== undefined) {
|
|
100
|
+
lines.push(`${indent}Constant value: ${JSON.stringify(schema.const)}`);
|
|
101
|
+
}
|
|
102
|
+
else if (schema.type) {
|
|
103
|
+
lines.push(`${indent}Type: ${schema.type}`);
|
|
104
|
+
}
|
|
105
|
+
// Handle oneOf, anyOf, allOf
|
|
106
|
+
if (schema.oneOf) {
|
|
107
|
+
lines.push(`${indent}Must match exactly one of:`);
|
|
108
|
+
schema.oneOf.forEach((subSchema, index) => {
|
|
109
|
+
lines.push(`${indent} Option ${index + 1}:`);
|
|
110
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (schema.anyOf) {
|
|
114
|
+
lines.push(`${indent}Must match at least one of:`);
|
|
115
|
+
schema.anyOf.forEach((subSchema, index) => {
|
|
116
|
+
lines.push(`${indent} Option ${index + 1}:`);
|
|
117
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (schema.allOf) {
|
|
121
|
+
lines.push(`${indent}Must match all of:`);
|
|
122
|
+
schema.allOf.forEach((subSchema, index) => {
|
|
123
|
+
lines.push(`${indent} Constraint ${index + 1}:`);
|
|
124
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return lines.join("\n");
|
|
128
|
+
}
|
|
129
|
+
function formatProperty(prop, depth, rootSchema) {
|
|
130
|
+
const indent = " ".repeat(depth);
|
|
131
|
+
const lines = [];
|
|
132
|
+
// Handle $ref
|
|
133
|
+
if (prop.$ref && rootSchema) {
|
|
134
|
+
const resolved = resolveRef(prop.$ref, rootSchema);
|
|
135
|
+
if (resolved) {
|
|
136
|
+
return formatProperty(resolved, depth, rootSchema);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
lines.push(`${indent}Reference: ${prop.$ref} (unresolved)`);
|
|
140
|
+
return lines.join("\n");
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// Type
|
|
144
|
+
if (prop.type) {
|
|
145
|
+
lines.push(`${indent}Type: ${prop.type}`);
|
|
146
|
+
}
|
|
147
|
+
// Description
|
|
148
|
+
if (prop.description) {
|
|
149
|
+
lines.push(`${indent}Description: ${prop.description}`);
|
|
150
|
+
}
|
|
151
|
+
// Format
|
|
152
|
+
if (prop.format) {
|
|
153
|
+
lines.push(`${indent}Format: ${prop.format}`);
|
|
154
|
+
}
|
|
155
|
+
// Default value
|
|
156
|
+
if (prop.default !== undefined) {
|
|
157
|
+
lines.push(`${indent}Default: ${JSON.stringify(prop.default)}`);
|
|
158
|
+
}
|
|
159
|
+
// String constraints
|
|
160
|
+
if (prop.type === "string") {
|
|
161
|
+
if (prop.minLength !== undefined) {
|
|
162
|
+
lines.push(`${indent}Minimum length: ${prop.minLength}`);
|
|
163
|
+
}
|
|
164
|
+
if (prop.maxLength !== undefined) {
|
|
165
|
+
lines.push(`${indent}Maximum length: ${prop.maxLength}`);
|
|
166
|
+
}
|
|
167
|
+
if (prop.pattern) {
|
|
168
|
+
lines.push(`${indent}Pattern: ${prop.pattern}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// Number constraints
|
|
172
|
+
if (prop.type === "number" || prop.type === "integer") {
|
|
173
|
+
if (prop.minimum !== undefined) {
|
|
174
|
+
lines.push(`${indent}Minimum: ${prop.minimum}${prop.exclusiveMinimum ? " (exclusive)" : ""}`);
|
|
175
|
+
}
|
|
176
|
+
if (prop.maximum !== undefined) {
|
|
177
|
+
lines.push(`${indent}Maximum: ${prop.maximum}${prop.exclusiveMaximum ? " (exclusive)" : ""}`);
|
|
178
|
+
}
|
|
179
|
+
if (prop.multipleOf !== undefined) {
|
|
180
|
+
lines.push(`${indent}Must be multiple of: ${prop.multipleOf}`);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// Enum values
|
|
184
|
+
if (prop.enum) {
|
|
185
|
+
lines.push(`${indent}Allowed values: ${prop.enum
|
|
186
|
+
.map((v) => JSON.stringify(v))
|
|
187
|
+
.join(", ")}`);
|
|
188
|
+
}
|
|
189
|
+
// Const value
|
|
190
|
+
if (prop.const !== undefined) {
|
|
191
|
+
lines.push(`${indent}Constant value: ${JSON.stringify(prop.const)}`);
|
|
192
|
+
}
|
|
193
|
+
// Handle nested objects
|
|
194
|
+
if (prop.type === "object" && prop.properties) {
|
|
195
|
+
if (prop.required && prop.required.length > 0) {
|
|
196
|
+
lines.push(`${indent}Required fields: ${prop.required.join(", ")}`);
|
|
197
|
+
}
|
|
198
|
+
lines.push(`${indent}Properties:`);
|
|
199
|
+
for (const [nestedPropName, nestedPropSchema] of Object.entries(prop.properties)) {
|
|
200
|
+
const required = prop.required?.includes(nestedPropName)
|
|
201
|
+
? " (required)"
|
|
202
|
+
: " (optional)";
|
|
203
|
+
lines.push(`${indent} ${nestedPropName}${required}:`);
|
|
204
|
+
lines.push(formatProperty(nestedPropSchema, depth + 2, rootSchema));
|
|
205
|
+
}
|
|
206
|
+
if (prop.additionalProperties !== undefined) {
|
|
207
|
+
lines.push(`${indent}Additional properties: ${prop.additionalProperties === false ? "not allowed" : "allowed"}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// Handle arrays
|
|
211
|
+
if (prop.type === "array") {
|
|
212
|
+
if (prop.minItems !== undefined) {
|
|
213
|
+
lines.push(`${indent}Minimum items: ${prop.minItems}`);
|
|
214
|
+
}
|
|
215
|
+
if (prop.maxItems !== undefined) {
|
|
216
|
+
lines.push(`${indent}Maximum items: ${prop.maxItems}`);
|
|
217
|
+
}
|
|
218
|
+
if (prop.uniqueItems) {
|
|
219
|
+
lines.push(`${indent}Items must be unique`);
|
|
220
|
+
}
|
|
221
|
+
if (prop.items) {
|
|
222
|
+
lines.push(`${indent}Item type:`);
|
|
223
|
+
lines.push(formatProperty(prop.items, depth + 1, rootSchema));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
// Handle oneOf, anyOf, allOf
|
|
227
|
+
if (prop.oneOf) {
|
|
228
|
+
lines.push(`${indent}Must match exactly one of:`);
|
|
229
|
+
prop.oneOf.forEach((subSchema, index) => {
|
|
230
|
+
lines.push(`${indent} Option ${index + 1}:`);
|
|
231
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
if (prop.anyOf) {
|
|
235
|
+
lines.push(`${indent}Must match at least one of:`);
|
|
236
|
+
prop.anyOf.forEach((subSchema, index) => {
|
|
237
|
+
lines.push(`${indent} Option ${index + 1}:`);
|
|
238
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (prop.allOf) {
|
|
242
|
+
lines.push(`${indent}Must match all of:`);
|
|
243
|
+
prop.allOf.forEach((subSchema, index) => {
|
|
244
|
+
lines.push(`${indent} Constraint ${index + 1}:`);
|
|
245
|
+
lines.push(formatProperty(subSchema, depth + 2, rootSchema));
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
// Examples
|
|
249
|
+
if (prop.examples && prop.examples.length > 0) {
|
|
250
|
+
lines.push(`${indent}Examples: ${prop.examples
|
|
251
|
+
.map((e) => JSON.stringify(e))
|
|
252
|
+
.join(", ")}`);
|
|
253
|
+
}
|
|
254
|
+
return lines.join("\n");
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=json-schema-to-readable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-to-readable.js","sourceRoot":"","sources":["../../src/utils/json-schema-to-readable.ts"],"names":[],"mappings":";;AAAA,4DASC;AATD,SAAgB,wBAAwB,CAAC,YAAoB;IAC3D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACxC,OAAO,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,8BACL,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAC3C,EAAE,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,GAAW,EAAE,UAAe;IAC9C,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,OAAO,GAAG,UAAU,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,IAAI,IAAI,OAAO,EAAE,CAAC;YAC9D,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAA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KAAK,CAAC,IAAI,CACR,GAAG,MAAM,aAAa,IAAI,CAAC,QAAQ;aAChC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aAClC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type PathRoot = {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function getPathRoots(): PathRoot[];
|
|
6
|
+
/**
|
|
7
|
+
* Returns a redacted path suitable for public output.
|
|
8
|
+
* - If absolute path falls under a known root, returns `${root}:${relative}`
|
|
9
|
+
* - If inside node_modules, returns `node_modules:${relative}`
|
|
10
|
+
* - Otherwise returns an elided version like `…/parent/basename`
|
|
11
|
+
*/
|
|
12
|
+
export declare function sanitizePath(input: unknown): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Clears cached roots. Useful for tests.
|
|
15
|
+
*/
|
|
16
|
+
export declare function __resetPathRootsCache(): void;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.getPathRoots = getPathRoots;
|
|
27
|
+
exports.sanitizePath = sanitizePath;
|
|
28
|
+
exports.__resetPathRootsCache = __resetPathRootsCache;
|
|
29
|
+
const path = __importStar(require("path"));
|
|
30
|
+
const os = __importStar(require("os"));
|
|
31
|
+
function normalizeAbsolute(p) {
|
|
32
|
+
try {
|
|
33
|
+
// Resolve to absolute and normalize separators
|
|
34
|
+
return path.resolve(p);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return p;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function defaultRoots() {
|
|
41
|
+
const cwd = normalizeAbsolute(process.cwd());
|
|
42
|
+
const nm = normalizeAbsolute(path.join(cwd, "node_modules"));
|
|
43
|
+
const home = normalizeAbsolute(os.homedir());
|
|
44
|
+
const roots = [
|
|
45
|
+
{ name: "workspace", path: cwd },
|
|
46
|
+
{ name: "node_modules", path: nm },
|
|
47
|
+
{ name: "home", path: home },
|
|
48
|
+
];
|
|
49
|
+
return roots;
|
|
50
|
+
}
|
|
51
|
+
let cachedRoots = null;
|
|
52
|
+
function getPathRoots() {
|
|
53
|
+
if (cachedRoots)
|
|
54
|
+
return cachedRoots;
|
|
55
|
+
const roots = [...defaultRoots()]
|
|
56
|
+
// Deduplicate by name, last-one-wins (env overrides default)
|
|
57
|
+
.reduce((map, r) => {
|
|
58
|
+
if (!r?.name || !r?.path)
|
|
59
|
+
return map;
|
|
60
|
+
map.set(r.name, { name: r.name, path: normalizeAbsolute(r.path) });
|
|
61
|
+
return map;
|
|
62
|
+
}, new Map())
|
|
63
|
+
.values();
|
|
64
|
+
// Sort by path length desc so more specific roots match first
|
|
65
|
+
cachedRoots = Array.from(roots).sort((a, b) => b.path.length - a.path.length);
|
|
66
|
+
return cachedRoots;
|
|
67
|
+
}
|
|
68
|
+
function lastSegments(inputPath, count) {
|
|
69
|
+
const parts = inputPath.split(path.sep).filter(Boolean);
|
|
70
|
+
return parts.slice(Math.max(0, parts.length - count)).join(path.sep);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a redacted path suitable for public output.
|
|
74
|
+
* - If absolute path falls under a known root, returns `${root}:${relative}`
|
|
75
|
+
* - If inside node_modules, returns `node_modules:${relative}`
|
|
76
|
+
* - Otherwise returns an elided version like `…/parent/basename`
|
|
77
|
+
*/
|
|
78
|
+
function sanitizePath(input) {
|
|
79
|
+
if (typeof input !== "string" || input.length === 0)
|
|
80
|
+
return null;
|
|
81
|
+
const abs = normalizeAbsolute(input);
|
|
82
|
+
for (const root of getPathRoots()) {
|
|
83
|
+
const rootPath = root.path.endsWith(path.sep)
|
|
84
|
+
? root.path
|
|
85
|
+
: root.path + path.sep;
|
|
86
|
+
if (abs === root.path || abs.startsWith(rootPath)) {
|
|
87
|
+
const rel = path.relative(root.path, abs);
|
|
88
|
+
return `${root.name}:${rel || "."}`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Fallback: elide and show only last 2 segments for safety
|
|
92
|
+
const elided = lastSegments(abs, 2);
|
|
93
|
+
return `…/${elided}`;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Clears cached roots. Useful for tests.
|
|
97
|
+
*/
|
|
98
|
+
function __resetPathRootsCache() {
|
|
99
|
+
cachedRoots = null;
|
|
100
|
+
}
|
|
101
|
+
//# sour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,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QACzB,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAC1C,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;QACtC,CAAC;IACH,CAAC;IAED,2DAA2D;IAC3D,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACpC,OAAO,KAAK,MAAM,EAAE,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ReactSSROptions {
|
|
3
|
+
title?: string;
|
|
4
|
+
meta?: Record<string, string>;
|
|
5
|
+
stylesheets?: string[];
|
|
6
|
+
scripts?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function renderReactToString(component: React.ReactElement, options?: ReactSSROptions): string;
|
|
9
|
+
export declare function renderReactComponentOnly(component: React.ReactElement): string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderReactToString = renderReactToString;
|
|
4
|
+
exports.renderReactComponentOnly = renderReactComponentOnly;
|
|
5
|
+
const server_1 = require("react-dom/server");
|
|
6
|
+
function renderReactToString(component, options = {}) {
|
|
7
|
+
const html = (0, server_1.renderToString)(component);
|
|
8
|
+
const { title = 'React App', meta = {}, stylesheets = [], scripts = [] } = options;
|
|
9
|
+
const metaTags = Object.entries(meta)
|
|
10
|
+
.map(([name, content]) => `<meta name="${name}" content="${content}">`)
|
|
11
|
+
.join('\n ');
|
|
12
|
+
const stylesheetLinks = stylesheets
|
|
13
|
+
.map(href => `<link rel="stylesheet" href="${href}">`)
|
|
14
|
+
.join('\n ');
|
|
15
|
+
const scriptTags = scripts
|
|
16
|
+
.map(src => `<script src="${src}"></script>`)
|
|
17
|
+
.join('\n ');
|
|
18
|
+
return `<!DOCTYPE html>
|
|
19
|
+
<html lang="en">
|
|
20
|
+
<head>
|
|
21
|
+
<meta charset="UTF-8">
|
|
22
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
23
|
+
<title>${title}</title>
|
|
24
|
+
${metaTags}
|
|
25
|
+
${stylesheetLinks}
|
|
26
|
+
</head>
|
|
27
|
+
<body>
|
|
28
|
+
<div id="root">${html}</div>
|
|
29
|
+
${scriptTags}
|
|
30
|
+
</body>
|
|
31
|
+
</html>`;
|
|
32
|
+
}
|
|
33
|
+
function renderReactComponentOnly(component) {
|
|
34
|
+
return (0, server_1.renderToString)(component);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=react-ssr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-ssr.js","sourceRoot":"","sources":["../../src/utils/react-ssr.tsx"],"names":[],"mappings":";;AAUA,kDAuCC;AAED,4DAEC;AApDD,6CAAkD;AASlD,SAAgB,mBAAmB,CACjC,SAA6B,EAC7B,UAA2B,EAAE;IAE7B,MAAM,IAAI,GAAG,IAAA,uBAAc,EAAC,SAAS,CAAC,CAAC;IAEvC,MAAM,EACJ,KAAK,GAAG,WAAW,EACnB,IAAI,GAAG,EAAE,EACT,WAAW,GAAG,EAAE,EAChB,OAAO,GAAG,EAAE,EACb,GAAG,OAAO,CAAC;IAEZ,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,eAAe,IAAI,cAAc,OAAO,IAAI,CAAC;SACtE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAElB,MAAM,eAAe,GAAG,WAAW;SAChC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,gCAAgC,IAAI,IAAI,CAAC;SACrD,IAAI,CAAC,QAAQ,CAAC,CAAC;IAElB,MAAM,UAAU,GAAG,OAAO;SACvB,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,gBAAgB,GAAG,aAAa,CAAC;SAC5C,IAAI,CAAC,QAAQ,CAAC,CAAC;IAElB,OAAO;;;;;aAKI,KAAK;MACZ,QAAQ;MACR,eAAe;;;qBAGA,IAAI;MACnB,UAAU;;QAER,CAAC;AACT,CAAC;AAED,SAAgB,wBAAwB,CAAC,SAA6B;IACpE,OAAO,IAAA,uBAAc,EAAC,SAAS,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type ZodTypeAny = z.ZodTypeAny;
|
|
3
|
+
export declare function isZodSchema(value: unknown): value is ZodTypeAny;
|
|
4
|
+
export declare function formatZodSchemaNicely(schema: ZodTypeAny): string;
|
|
5
|
+
export declare function formatSchemaIfZod(value: unknown): string | null;
|
|
6
|
+
export declare function convertJsonSchemaToReadable(jsonSchemaString: string | null | undefined): Promise<string | null>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isZodSchema = isZodSchema;
|
|
4
|
+
exports.formatZodSchemaNicely = formatZodSchemaNicely;
|
|
5
|
+
exports.formatSchemaIfZod = formatSchemaIfZod;
|
|
6
|
+
exports.convertJsonSchemaToReadable = convertJsonSchemaToReadable;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
9
|
+
const json_schema_to_readable_1 = require("./json-schema-to-readable");
|
|
10
|
+
function isZodSchema(value) {
|
|
11
|
+
return (typeof value === "object" && value !== null && value instanceof zod_1.z.ZodType);
|
|
12
|
+
}
|
|
13
|
+
function formatZodSchemaNicely(schema) {
|
|
14
|
+
try {
|
|
15
|
+
const jsonSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(schema, { name: "Schema" });
|
|
16
|
+
return JSON.stringify(jsonSchema, null, 2);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
// Fallback to minimal string
|
|
20
|
+
return String(schema);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function formatSchemaIfZod(value) {
|
|
24
|
+
try {
|
|
25
|
+
if (isZodSchema(value)) {
|
|
26
|
+
return formatZodSchemaNicely(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// ignore
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
async function convertJsonSchemaToReadable(jsonSchemaString) {
|
|
35
|
+
if (!jsonSchemaString)
|
|
36
|
+
return null;
|
|
37
|
+
return (0, json_schema_to_readable_1.jsonSchemaToReadableText)(jsonSchemaString);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sourceRoot":"","sources":["../../src/utils/zod.ts"],"names":[],"mappings":";;AAMA,kCAIC;AAED,sDAQC;AAED,8CASC;AAED,kEAMC;AAvCD,6BAAwB;AACxB,2DAAqD;AACrD,uEAAqE;AAIrE,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,YAAY,OAAC,CAAC,OAAO,CAC1E,CAAC;AACJ,CAAC;AAED,SAAgB,qBAAqB,CAAC,MAAkB;IACtD,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,IAAA,oCAAe,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,6BAA6B;QAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED,SAAgB,iBAAiB,CAAC,KAAc;IAC9C,IAAI,CAAC;QACH,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,2BAA2B,CAC/C,gBAA2C;IAE3C,IAAI,CAAC,gBAAgB;QAAE,OAAO,IAAI,CAAC;IAEnC,OAAO,IAAA,kDAAwB,EAAC,gBAAgB,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bluelibs/runner-dev",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "BlueLibs Runner DevTools",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/bluelibs/runner-dev"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"watch": "tsc -w",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"start": "node dist/main.js",
|
|
15
|
+
"dev": "npm run build && npm run start",
|
|
16
|
+
"test": "jest --verbose --runInBand",
|
|
17
|
+
"test:dev": "jest --verbose --watch",
|
|
18
|
+
"coverage": "jest --verbose --coverage",
|
|
19
|
+
"test:clean": "jest --clearCache",
|
|
20
|
+
"testonly": "npm test",
|
|
21
|
+
"test:ci": "npm run coverage -- --ci --maxWorkers=2 --reporters=default --reporters=jest-junit",
|
|
22
|
+
"prepublishOnly": "npm run build",
|
|
23
|
+
"typedoc": "typedoc --options typedoc.json",
|
|
24
|
+
"codegen": "graphql-codegen --config codegen.ts",
|
|
25
|
+
"prebuild": "npm run codegen",
|
|
26
|
+
"play": "ts-node src/__tests__/dummy/dummyServer.ts"
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"runner-dev": "dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@graphql-codegen/cli": "^5.0.2",
|
|
33
|
+
"@graphql-codegen/schema-ast": "^4.1.0",
|
|
34
|
+
"@graphql-codegen/typescript": "^4.0.7",
|
|
35
|
+
"@graphql-codegen/typescript-resolvers": "^4.4.0",
|
|
36
|
+
"@types/benchmark": "^2.1.5",
|
|
37
|
+
"@types/express": "^5.0.3",
|
|
38
|
+
"@types/graphql": "^0.11.3",
|
|
39
|
+
"@types/jest": "^27.0.0",
|
|
40
|
+
"@types/node": "^20.0.0",
|
|
41
|
+
"@types/react": "^18.3.11",
|
|
42
|
+
"@types/react-dom": "^18.3.7",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "8.39.0",
|
|
44
|
+
"@typescript-eslint/parser": "8.39.0",
|
|
45
|
+
"benchmark": "^2.1.4",
|
|
46
|
+
"eslint": "^9.32.0",
|
|
47
|
+
"eslint-config-prettier": "6.3.0",
|
|
48
|
+
"eslint-plugin-prettier": "3.1.1",
|
|
49
|
+
"express": "^5.1.0",
|
|
50
|
+
"jest": "^29.0.0",
|
|
51
|
+
"jest-junit": "^10.0.0",
|
|
52
|
+
"prettier": "^2.0.5",
|
|
53
|
+
"reflect-metadata": "^0.2.2",
|
|
54
|
+
"source-map-support": "^0.5.13",
|
|
55
|
+
"ts-jest": "^29.0.0",
|
|
56
|
+
"ts-node": "^10.9.2",
|
|
57
|
+
"typedoc": "^0.26.7",
|
|
58
|
+
"typedoc-material-theme": "^1.1.0",
|
|
59
|
+
"typescript": "^5.6.2"
|
|
60
|
+
},
|
|
61
|
+
"typings": "dist/index.d.ts",
|
|
62
|
+
"typescript": {
|
|
63
|
+
"definition": "dist/index.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"license": "MIT",
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@adobe/jsonschema2md": "^8.0.5",
|
|
68
|
+
"@apollo/server": "^5.0.0",
|
|
69
|
+
"@as-integrations/express5": "^1.1.2",
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.17.2",
|
|
71
|
+
"express": "^5.0.0",
|
|
72
|
+
"graphql": "^16.11.0",
|
|
73
|
+
"graphql-voyager": "^1.3.0",
|
|
74
|
+
"lru-cache": "^11.1.0",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"react-dom": "^18.3.1",
|
|
77
|
+
"zod": "^3.25.76",
|
|
78
|
+
"zod-to-json-schema": "^3.23.5"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"@bluelibs/runner": "../runner"
|
|
82
|
+
}
|
|
83
|
+
}
|