@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,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskMiddlewareUsageType = exports.TaskDependsOnType = exports.TaskType = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
const AllType_1 = require("./AllType");
|
|
6
|
+
const MetaType_1 = require("./MetaType");
|
|
7
|
+
const ResourceType_1 = require("./ResourceType");
|
|
8
|
+
const EventType_1 = require("./EventType");
|
|
9
|
+
const MiddlewareType_1 = require("./MiddlewareType");
|
|
10
|
+
const HookType_1 = require("./HookType");
|
|
11
|
+
const BaseElementCommon_1 = require("./BaseElementCommon");
|
|
12
|
+
const path_1 = require("../../utils/path");
|
|
13
|
+
const zod_1 = require("../../utils/zod");
|
|
14
|
+
const RunTypes_1 = require("./RunTypes");
|
|
15
|
+
// Extracted to avoid inline self-referential initializer issues
|
|
16
|
+
exports.TaskDependsOnType = new graphql_1.GraphQLObjectType({
|
|
17
|
+
name: "TaskDependsOn",
|
|
18
|
+
fields: () => ({
|
|
19
|
+
tasks: {
|
|
20
|
+
description: "Tasks this task depends on",
|
|
21
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(AllType_1.BaseElementInterface))),
|
|
22
|
+
resolve: (obj) => Array.isArray(obj?.tasks)
|
|
23
|
+
? obj.tasks.filter((n) => !("event" in (n || {})))
|
|
24
|
+
: [],
|
|
25
|
+
},
|
|
26
|
+
hooks: {
|
|
27
|
+
description: "Hooks this task depends on",
|
|
28
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(HookType_1.HookType))),
|
|
29
|
+
resolve: (obj) => Array.isArray(obj?.hooks)
|
|
30
|
+
? obj.hooks.filter((n) => "event" in (n || {}))
|
|
31
|
+
: [],
|
|
32
|
+
},
|
|
33
|
+
resources: {
|
|
34
|
+
description: "Resources this task depends on",
|
|
35
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(ResourceType_1.ResourceType))),
|
|
36
|
+
resolve: (obj) => Array.isArray(obj?.resources) ? obj.resources : [],
|
|
37
|
+
},
|
|
38
|
+
emitters: {
|
|
39
|
+
description: "Events this task emits",
|
|
40
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
|
|
41
|
+
resolve: (obj) => (Array.isArray(obj?.emitters) ? obj.emitters : []),
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
exports.TaskMiddlewareUsageType = new graphql_1.GraphQLObjectType({
|
|
46
|
+
name: "TaskMiddlewareUsage",
|
|
47
|
+
fields: () => ({
|
|
48
|
+
id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
|
|
49
|
+
config: { type: graphql_1.GraphQLString },
|
|
50
|
+
node: { type: new graphql_1.GraphQLNonNull(MiddlewareType_1.TaskMiddlewareType) },
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
exports.TaskType = new graphql_1.GraphQLObjectType({
|
|
54
|
+
name: "Task",
|
|
55
|
+
interfaces: () => [AllType_1.BaseElementInterface],
|
|
56
|
+
isTypeOf: (value) => Array.isArray(value?.emits) &&
|
|
57
|
+
Array.isArray(value?.dependsOn) &&
|
|
58
|
+
!("event" in value),
|
|
59
|
+
fields: () => ({
|
|
60
|
+
id: { description: "Task id", type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
|
|
61
|
+
meta: { description: "Task metadata", type: MetaType_1.MetaType },
|
|
62
|
+
filePath: {
|
|
63
|
+
description: "Path to task file",
|
|
64
|
+
type: graphql_1.GraphQLString,
|
|
65
|
+
resolve: (node) => (0, path_1.sanitizePath)(node?.filePath ?? null),
|
|
66
|
+
},
|
|
67
|
+
fileContents: {
|
|
68
|
+
description: "Contents of the file at filePath (if accessible). Optionally slice by 1-based inclusive line numbers via startLine/endLine.",
|
|
69
|
+
type: graphql_1.GraphQLString,
|
|
70
|
+
args: {
|
|
71
|
+
startLine: {
|
|
72
|
+
description: "1-based inclusive start line",
|
|
73
|
+
type: graphql_1.GraphQLInt,
|
|
74
|
+
},
|
|
75
|
+
endLine: {
|
|
76
|
+
description: "1-based inclusive end line",
|
|
77
|
+
type: graphql_1.GraphQLInt,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
markdownDescription: {
|
|
82
|
+
description: "Markdown composed from meta.title and meta.description (if present)",
|
|
83
|
+
type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
|
|
84
|
+
},
|
|
85
|
+
emits: {
|
|
86
|
+
description: "Event ids this task may emit (from dependencies)",
|
|
87
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
|
|
88
|
+
},
|
|
89
|
+
dependsOn: {
|
|
90
|
+
description: "Ids of resources/tasks this task depends on",
|
|
91
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
|
|
92
|
+
},
|
|
93
|
+
middleware: {
|
|
94
|
+
description: "Ids of middlewares applied to this task",
|
|
95
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
|
|
96
|
+
},
|
|
97
|
+
middlewareResolved: {
|
|
98
|
+
description: "Middlewares applied to this task (resolved)",
|
|
99
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(MiddlewareType_1.TaskMiddlewareType))),
|
|
100
|
+
resolve: async (node, _args, ctx) => {
|
|
101
|
+
return ctx.introspector.getMiddlewaresByIds(node.middleware);
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
middlewareResolvedDetailed: {
|
|
105
|
+
description: "Middlewares applied to this task with per-usage config",
|
|
106
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(exports.TaskMiddlewareUsageType))),
|
|
107
|
+
resolve: (node, _args, ctx) => ctx.introspector.getMiddlewareUsagesForTask(node.id),
|
|
108
|
+
},
|
|
109
|
+
emitsResolved: {
|
|
110
|
+
description: "Events emitted by this task (resolved)",
|
|
111
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
|
|
112
|
+
resolve: async (node, _args, ctx) => {
|
|
113
|
+
return ctx.introspector.getEventsByIds(node.emits);
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
overriddenBy: {
|
|
117
|
+
description: "Id of the resource that overrides this task (if any). Overriding replaces registrations at runtime.",
|
|
118
|
+
type: graphql_1.GraphQLString,
|
|
119
|
+
},
|
|
120
|
+
depenendsOnResolved: {
|
|
121
|
+
description: "Flattened dependencies resolved to All (tasks, hooks, resources)",
|
|
122
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(AllType_1.BaseElementInterface))),
|
|
123
|
+
resolve: async (node, _args, ctx) => {
|
|
124
|
+
const { tasks, hooks, resources } = await ctx.introspector.getDependencies(node);
|
|
125
|
+
return [...tasks, ...hooks, ...resources];
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
registeredBy: {
|
|
129
|
+
description: "Id of the resource that registered this task (if any). Useful to trace provenance.",
|
|
130
|
+
type: graphql_1.GraphQLString,
|
|
131
|
+
resolve: (node, _args, ctx) => {
|
|
132
|
+
// TODO: Store it in the mapping phase?
|
|
133
|
+
if (node.registeredBy != null)
|
|
134
|
+
return node.registeredBy;
|
|
135
|
+
const allResources = ctx.introspector.getResources();
|
|
136
|
+
const found = allResources.find((r) => (r.registers || []).includes(node.id));
|
|
137
|
+
return found?.id ?? null;
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
registeredByResolved: {
|
|
141
|
+
description: "Resource that registered this task (resolved, if any)",
|
|
142
|
+
type: ResourceType_1.ResourceType,
|
|
143
|
+
resolve: (node, _args, ctx) => {
|
|
144
|
+
if (node.registeredBy != null) {
|
|
145
|
+
return ctx.introspector.getResource(node.registeredBy);
|
|
146
|
+
}
|
|
147
|
+
// Fallback for backward-compatibility
|
|
148
|
+
const allResources = ctx.introspector.getResources();
|
|
149
|
+
return (allResources.find((r) => (r.registers || []).includes(node.id)) ||
|
|
150
|
+
null);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
// Task-like explicit fields
|
|
154
|
+
inputSchema: {
|
|
155
|
+
description: "Prettified Zod JSON structure for the input schema, if provided",
|
|
156
|
+
type: graphql_1.GraphQLString,
|
|
157
|
+
},
|
|
158
|
+
inputSchemaReadable: {
|
|
159
|
+
description: "Readable text representation of the input schema, if provided",
|
|
160
|
+
type: graphql_1.GraphQLString,
|
|
161
|
+
resolve: (node) => (0, zod_1.convertJsonSchemaToReadable)(node.inputSchema),
|
|
162
|
+
},
|
|
163
|
+
dependsOnResolved: {
|
|
164
|
+
description: "Resolved dependencies and emitted events for this task",
|
|
165
|
+
type: new graphql_1.GraphQLNonNull(exports.TaskDependsOnType),
|
|
166
|
+
resolve: async (node, _args, ctx) => {
|
|
167
|
+
const { tasks, hooks, resources, emitters } = await ctx.introspector.getDependencies(node);
|
|
168
|
+
return { tasks, hooks, resources, emitters };
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
runs: {
|
|
172
|
+
description: "Execution run records for this task",
|
|
173
|
+
args: {
|
|
174
|
+
afterTimestamp: { type: graphql_1.GraphQLInt },
|
|
175
|
+
last: { type: graphql_1.GraphQLInt },
|
|
176
|
+
filter: { type: RunTypes_1.RunFilterInput },
|
|
177
|
+
},
|
|
178
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(RunTypes_1.RunRecordType))),
|
|
179
|
+
resolve: (node, args, ctx) => {
|
|
180
|
+
const opts = ctx.introspector.buildRunOptionsForTask(node.id, args);
|
|
181
|
+
return ctx.live.getRuns(opts);
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
...(0, BaseElementCommon_1.baseElementCommonFields)(),
|
|
185
|
+
}),
|
|
186
|
+
});
|
|
187
|
+
// HookType has been moved to HookType.ts
|
|
188
|
+
//# sourceMappingURL=TaskType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskType.js","sourceRoot":"","sources":["../../../src/schema/types/TaskType.ts"],"names":[],"mappings":";;;AAAA,qCASiB;AAGjB,uCAAiD;AACjD,yCAAsC;AACtC,iDAA8C;AAE9C,2CAAwC;AACxC,qDAAsD;AACtD,yCAAsC;AAGtC,2DAA8D;AAG9D,2CAAgD;AAChD,yCAA8D;AAC9D,yCAA2D;AAK3D,gEAAgE;AACnD,QAAA,iBAAiB,GAG1B,IAAI,2BAAiB,CAGvB;IACA,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,GAGN,EAAE,CAAC,CAAC;QACJ,KAAK,EAAE;YACL,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,8BAAoB,CAAC,CAAC,CAC1D;YACD,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE,CACpB,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK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AS,EAAE,QAAQ,EAAE,GACzC,MAAM,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC/C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;YAC/C,CAAC;SACF;QAED,IAAI,EAAE;YACJ,WAAW,EAAE,qCAAqC;YAClD,IAAI,EAAE;gBACJ,cAAc,EAAE,EAAE,IAAI,EAAE,oBAAU,EAAE;gBACpC,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAU,EAAE;gBAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,yBAAc,EAAE;aACjC;YACD,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,wBAAa,CAAC,CAAC,CACnD;YACD,OAAO,EAAE,CAAC,IAAU,EAAE,IAAS,EAAE,GAAyB,EAAE,EAAE;gBAC5D,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;gBACpE,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAChC,CAAC;SACF;QAED,GAAG,IAAA,2CAAuB,GAAE;KAC7B,CAAC;CACH,CAAC,CAAC;AAEH,yCAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { AllType, BaseElementInterface } from "./AllType";
|
|
2
|
+
export { MetaType, MetaTagUsageType } from "./MetaType";
|
|
3
|
+
export { EventType } from "./EventType";
|
|
4
|
+
export { MiddlewareType, TaskMiddlewareType, ResourceMiddlewareType, } from "./MiddlewareType";
|
|
5
|
+
export { MiddlewareGlobalType } from "./middleware/common";
|
|
6
|
+
export { ResourceType } from "./ResourceType";
|
|
7
|
+
export { TaskType } from "./TaskType";
|
|
8
|
+
export { HookType } from "./HookType";
|
|
9
|
+
export { TagType } from "./TagType";
|
|
10
|
+
export { LiveType, LogEntryType, EmissionEntryType, ErrorEntryType, MemoryStatsType, CpuStatsType, EventLoopStatsType, GcStatsType, } from "./LiveType";
|
|
11
|
+
export { DiagnosticType } from "./DiagnosticsType";
|
|
12
|
+
export { EventFilterInput } from "./EventType";
|
|
13
|
+
export { SwapResultType, SwappedTaskType, InvokeResultType, EvalResultType, } from "./SwapType";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvalResultType = exports.InvokeResultType = exports.SwappedTaskType = exports.SwapResultType = exports.EventFilterInput = exports.DiagnosticType = exports.GcStatsType = exports.EventLoopStatsType = exports.CpuStatsType = exports.MemoryStatsType = exports.ErrorEntryType = exports.EmissionEntryType = exports.LogEntryType = exports.LiveType = exports.TagType = exports.HookType = exports.TaskType = exports.ResourceType = exports.MiddlewareGlobalType = exports.ResourceMiddlewareType = exports.TaskMiddlewareType = exports.MiddlewareType = exports.EventType = exports.MetaTagUsageType = exports.MetaType = exports.BaseElementInterface = exports.AllType = void 0;
|
|
4
|
+
var AllType_1 = require("./AllType");
|
|
5
|
+
Object.defineProperty(exports, "AllType", { enumerable: true, get: function () { return AllType_1.AllType; } });
|
|
6
|
+
Object.defineProperty(exports, "BaseElementInterface", { enumerable: true, get: function () { return AllType_1.BaseElementInterface; } });
|
|
7
|
+
var MetaType_1 = require("./MetaType");
|
|
8
|
+
Object.defineProperty(exports, "MetaType", { enumerable: true, get: function () { return MetaType_1.MetaType; } });
|
|
9
|
+
Object.defineProperty(exports, "MetaTagUsageType", { enumerable: true, get: function () { return MetaType_1.MetaTagUsageType; } });
|
|
10
|
+
var EventType_1 = require("./EventType");
|
|
11
|
+
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return EventType_1.EventType; } });
|
|
12
|
+
var MiddlewareType_1 = require("./MiddlewareType");
|
|
13
|
+
Object.defineProperty(exports, "MiddlewareType", { enumerable: true, get: function () { return MiddlewareType_1.MiddlewareType; } });
|
|
14
|
+
Object.defineProperty(exports, "TaskMiddlewareType", { enumerable: true, get: function () { return MiddlewareType_1.TaskMiddlewareType; } });
|
|
15
|
+
Object.defineProperty(exports, "ResourceMiddlewareType", { enumerable: true, get: function () { return MiddlewareType_1.ResourceMiddlewareType; } });
|
|
16
|
+
var common_1 = require("./middleware/common");
|
|
17
|
+
Object.defineProperty(exports, "MiddlewareGlobalType", { enumerable: true, get: function () { return common_1.MiddlewareGlobalType; } });
|
|
18
|
+
var ResourceType_1 = require("./ResourceType");
|
|
19
|
+
Object.defineProperty(exports, "ResourceType", { enumerable: true, get: function () { return ResourceType_1.ResourceType; } });
|
|
20
|
+
var TaskType_1 = require("./TaskType");
|
|
21
|
+
Object.defineProperty(exports, "TaskType", { enumerable: true, get: function () { return TaskType_1.TaskType; } });
|
|
22
|
+
var HookType_1 = require("./HookType");
|
|
23
|
+
Object.defineProperty(exports, "HookType", { enumerable: true, get: function () { return HookType_1.HookType; } });
|
|
24
|
+
var TagType_1 = require("./TagType");
|
|
25
|
+
Object.defineProperty(exports, "TagType", { enumerable: true, get: function () { return TagType_1.TagType; } });
|
|
26
|
+
var LiveType_1 = require("./LiveType");
|
|
27
|
+
Object.defineProperty(exports, "LiveType", { enumerable: true, get: function () { return LiveType_1.LiveType; } });
|
|
28
|
+
Object.defineProperty(exports, "LogEntryType", { enumerable: true, get: function () { return LiveType_1.LogEntryType; } });
|
|
29
|
+
Object.defineProperty(exports, "EmissionEntryType", { enumerable: true, get: function () { return LiveType_1.EmissionEntryType; } });
|
|
30
|
+
Object.defineProperty(exports, "ErrorEntryType", { enumerable: true, get: function () { return LiveType_1.ErrorEntryType; } });
|
|
31
|
+
Object.defineProperty(exports, "MemoryStatsType", { enumerable: true, get: function () { return LiveType_1.MemoryStatsType; } });
|
|
32
|
+
Object.defineProperty(exports, "CpuStatsType", { enumerable: true, get: function () { return LiveType_1.CpuStatsType; } });
|
|
33
|
+
Object.defineProperty(exports, "EventLoopStatsType", { enumerable: true, get: function () { return LiveType_1.EventLoopStatsType; } });
|
|
34
|
+
Object.defineProperty(exports, "GcStatsType", { enumerable: true, get: function () { return LiveType_1.GcStatsType; } });
|
|
35
|
+
var DiagnosticsType_1 = require("./DiagnosticsType");
|
|
36
|
+
Object.defineProperty(exports, "DiagnosticType", { enumerable: true, get: function () { return DiagnosticsType_1.DiagnosticType; } });
|
|
37
|
+
var EventType_2 = require("./EventType");
|
|
38
|
+
Object.defineProperty(exports, "EventFilterInput", { enumerable: true, get: function () { return EventType_2.EventFilterInput; } });
|
|
39
|
+
var SwapType_1 = require("./SwapType");
|
|
40
|
+
Object.defineProperty(exports, "SwapResultType", { enumerable: true, get: function () { return SwapType_1.SwapResultType; } });
|
|
41
|
+
Object.defineProperty(exports, "SwappedTaskType", { enumerable: true, get: function () { return SwapType_1.SwappedTaskType; } });
|
|
42
|
+
Object.defineProperty(exports, "InvokeResultType", { enumerable: true, get: function () { return SwapType_1.InvokeResultType; } });
|
|
43
|
+
Object.defineProperty(exports, "EvalResultType", { enumerable: true, get: function () { return SwapType_1.EvalResultType; } });
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/types/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0D;AAAjD,kGAAA,OAAO,OAAA;AAAE,+GAAA,oBAAoB,OAAA;AACtC,uCAAwD;AAA/C,oGAAA,QAAQ,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AACnC,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mDAI0B;AAHxB,gHAAA,cAAc,OAAA;AACd,oHAAA,kBAAkB,OAAA;AAClB,wHAAA,sBAAsB,OAAA;AAExB,8CAA2D;AAAlD,8GAAA,oBAAoB,OAAA;AAC7B,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,uCASoB;AARlB,oGAAA,QAAQ,OAAA;AACR,wGAAA,YAAY,OAAA;AACZ,6GAAA,iBAAiB,OAAA;AACjB,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,uGAAA,WAAW,OAAA;AAEb,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,yCAA+C;AAAtC,6GAAA,gBAAgB,OAAA;AACzB,uCAKoB;AAJlB,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MiddlewareResourceUsageType = exports.MiddlewareTaskUsageType = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
const ResourceType_1 = require("../ResourceType");
|
|
6
|
+
const TaskType_1 = require("../TaskType");
|
|
7
|
+
exports.MiddlewareTaskUsageType = new graphql_1.GraphQLObjectType({
|
|
8
|
+
name: "MiddlewareTaskUsage",
|
|
9
|
+
fields: () => ({
|
|
10
|
+
id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
|
|
11
|
+
config: { type: graphql_1.GraphQLID },
|
|
12
|
+
node: { type: new graphql_1.GraphQLNonNull(TaskType_1.TaskType) },
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
exports.MiddlewareResourceUsageType = new graphql_1.GraphQLObjectType({
|
|
16
|
+
name: "MiddlewareResourceUsage",
|
|
17
|
+
fields: () => ({
|
|
18
|
+
id: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
|
|
19
|
+
config: { type: graphql_1.GraphQLID },
|
|
20
|
+
node: { type: new graphql_1.GraphQLNonNull(ResourceType_1.ResourceType) },
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=UsageTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsageTypes.js","sourceRoot":"","sources":["../../../../src/schema/types/middleware/UsageTypes.ts"],"names":[],"mappings":";;;AAAA,qCAKiB;AAEjB,kDAA+C;AAC/C,0CAAuC;AAE1B,QAAA,uBAAuB,GAAsB,IAAI,2BAAiB,CAC7E;IACE,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,GAAoC,EAAE,CAAC,CAAC;QAC9C,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,mBAAS,CAAC,EAAE;QAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAS,EAAE;QAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,mBAAQ,CAAC,EAAE;KAC7C,CAAC;CACH,CACF,CAAC;AAEW,QAAA,2BAA2B,GACtC,IAAI,2BAAiB,CAAC;IACpB,IAAI,EAAE,yBAAyB;IAC/B,MAAM,EAAE,GAAoC,EAAE,CAAC,CAAC;QAC9C,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,mBAAS,CAAC,EAAE;QAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAS,EAAE;QAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,2BAAY,CAAC,EAAE;KACjD,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type GraphQLFieldConfigMap } from "graphql";
|
|
2
|
+
export declare const MiddlewareGlobalType: any;
|
|
3
|
+
export declare function middlewareCommonFields(): GraphQLFieldConfigMap<any, any>;
|
|
4
|
+
export declare function buildTaskMiddlewareFields(): GraphQLFieldConfigMap<any, any>;
|
|
5
|
+
export declare function buildResourceMiddlewareFields(): GraphQLFieldConfigMap<any, any>;
|
|
6
|
+
export declare function buildLegacyCombinedMiddlewareFields(): GraphQLFieldConfigMap<any, any>;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MiddlewareGlobalType = void 0;
|
|
4
|
+
exports.middlewareCommonFields = middlewareCommonFields;
|
|
5
|
+
exports.buildTaskMiddlewareFields = buildTaskMiddlewareFields;
|
|
6
|
+
exports.buildResourceMiddlewareFields = buildResourceMiddlewareFields;
|
|
7
|
+
exports.buildLegacyCombinedMiddlewareFields = buildLegacyCombinedMiddlewareFields;
|
|
8
|
+
const graphql_1 = require("graphql");
|
|
9
|
+
const MetaType_1 = require("../MetaType");
|
|
10
|
+
const EventType_1 = require("../EventType");
|
|
11
|
+
const ResourceType_1 = require("../ResourceType");
|
|
12
|
+
const BaseElementCommon_1 = require("../BaseElementCommon");
|
|
13
|
+
const path_1 = require("../../../utils/path");
|
|
14
|
+
const zod_1 = require("../../../utils/zod");
|
|
15
|
+
const UsageTypes_1 = require("./UsageTypes");
|
|
16
|
+
const TaskType_1 = require("../TaskType");
|
|
17
|
+
exports.MiddlewareGlobalType = new (require("graphql").GraphQLObjectType)({
|
|
18
|
+
name: "GlobalMiddleware",
|
|
19
|
+
fields: () => ({
|
|
20
|
+
enabled: {
|
|
21
|
+
description: "Whether the middleware is active globally",
|
|
22
|
+
type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean),
|
|
23
|
+
},
|
|
24
|
+
tasks: {
|
|
25
|
+
description: "Globally enabled for tasks",
|
|
26
|
+
type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean),
|
|
27
|
+
},
|
|
28
|
+
resources: {
|
|
29
|
+
description: "Globally enabled for resources",
|
|
30
|
+
type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean),
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
function middlewareCommonFields() {
|
|
35
|
+
return {
|
|
36
|
+
id: { description: "Middleware id", type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
|
|
37
|
+
meta: { description: "Middleware metadata", type: MetaType_1.MetaType },
|
|
38
|
+
filePath: {
|
|
39
|
+
description: "Path to middleware file",
|
|
40
|
+
type: graphql_1.GraphQLString,
|
|
41
|
+
resolve: (node) => (0, path_1.sanitizePath)(node?.filePath ?? null),
|
|
42
|
+
},
|
|
43
|
+
global: {
|
|
44
|
+
description: "Global middleware configuration",
|
|
45
|
+
type: exports.MiddlewareGlobalType,
|
|
46
|
+
},
|
|
47
|
+
emits: {
|
|
48
|
+
description: "Events emitted by task/hook nodes that use this middleware",
|
|
49
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
|
|
50
|
+
resolve: (node, _args, ctx) => ctx.introspector.getMiddlewareEmittedEvents(node.id),
|
|
51
|
+
},
|
|
52
|
+
overriddenBy: {
|
|
53
|
+
description: "Id of the resource that overrides this middleware (if any)",
|
|
54
|
+
type: graphql_1.GraphQLString,
|
|
55
|
+
},
|
|
56
|
+
registeredBy: {
|
|
57
|
+
description: "Id of the resource that registered this middleware (if any)",
|
|
58
|
+
type: graphql_1.GraphQLString,
|
|
59
|
+
resolve: (node, _args, ctx) => {
|
|
60
|
+
if (node.registeredBy)
|
|
61
|
+
return node.registeredBy;
|
|
62
|
+
const allResources = ctx.introspector.getResources();
|
|
63
|
+
const found = allResources.find((r) => (r.registers || []).includes(node.id));
|
|
64
|
+
return found?.id ?? null;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
registeredByResolved: {
|
|
68
|
+
description: "Resource that registered this middleware (resolved, if any)",
|
|
69
|
+
type: ResourceType_1.ResourceType,
|
|
70
|
+
resolve: (node, _args, ctx) => {
|
|
71
|
+
if (node.registeredBy)
|
|
72
|
+
return ctx.introspector.getResource(node.registeredBy);
|
|
73
|
+
const allResources = ctx.introspector.getResources();
|
|
74
|
+
return (allResources.find((r) => (r.registers || []).includes(node.id)) || null);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
configSchema: {
|
|
78
|
+
description: "Prettified Zod JSON structure for the middleware config schema, if provided",
|
|
79
|
+
type: graphql_1.GraphQLString,
|
|
80
|
+
},
|
|
81
|
+
configSchemaReadable: {
|
|
82
|
+
description: "Readable text representation of the middleware config schema, if provided",
|
|
83
|
+
type: graphql_1.GraphQLString,
|
|
84
|
+
resolve: (node) => (0, zod_1.convertJsonSchemaToReadable)(node.configSchema),
|
|
85
|
+
},
|
|
86
|
+
...(0, BaseElementCommon_1.baseElementCommonFields)(),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function buildTaskMiddlewareFields() {
|
|
90
|
+
return {
|
|
91
|
+
...middlewareCommonFields(),
|
|
92
|
+
usedBy: {
|
|
93
|
+
description: "Task nodes that use this middleware (resolved)",
|
|
94
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskType_1.TaskType))),
|
|
95
|
+
resolve: (node, _args, ctx) => ctx.introspector
|
|
96
|
+
.getTaskLikesUsingMiddleware(node.id)
|
|
97
|
+
.filter((n) => !("event" in (n || {}))),
|
|
98
|
+
},
|
|
99
|
+
usedByDetailed: {
|
|
100
|
+
description: "Detailed task/hook usages with per-usage config",
|
|
101
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(UsageTypes_1.MiddlewareTaskUsageType))),
|
|
102
|
+
resolve: (node, _args, ctx) => ctx.introspector.getTasksUsingMiddlewareDetailed(String(node.id)),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function buildResourceMiddlewareFields() {
|
|
107
|
+
return {
|
|
108
|
+
...middlewareCommonFields(),
|
|
109
|
+
usedBy: {
|
|
110
|
+
description: "Resources that use this middleware (resolved)",
|
|
111
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(ResourceType_1.ResourceType))),
|
|
112
|
+
resolve: (node, _args, ctx) => ctx.introspector.getResourcesByIds(node.usedByResources),
|
|
113
|
+
},
|
|
114
|
+
usedByDetailed: {
|
|
115
|
+
description: "Detailed resource usages with per-usage config",
|
|
116
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(UsageTypes_1.MiddlewareResourceUsageType))),
|
|
117
|
+
resolve: (node, _args, ctx) => ctx.introspector.getResourcesUsingMiddlewareDetailed(String(node.id)),
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function buildLegacyCombinedMiddlewareFields() {
|
|
122
|
+
return {
|
|
123
|
+
...middlewareCommonFields(),
|
|
124
|
+
usedByTasks: {
|
|
125
|
+
description: "Ids of task/hook nodes that use this middleware",
|
|
126
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
|
|
127
|
+
},
|
|
128
|
+
usedByTasksResolved: {
|
|
129
|
+
description: "Task/hook nodes that use this middleware (resolved)",
|
|
130
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskType_1.TaskType))),
|
|
131
|
+
resolve: (node, _args, ctx) => ctx.introspector
|
|
132
|
+
.getTaskLikesUsingMiddleware(node.id)
|
|
133
|
+
.filter((n) => !("event" in (n || {}))),
|
|
134
|
+
},
|
|
135
|
+
usedByResources: {
|
|
136
|
+
description: "Ids of resources that use this middleware",
|
|
137
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
|
|
138
|
+
},
|
|
139
|
+
usedByResourcesResolved: {
|
|
140
|
+
description: "Resources that use this middleware (resolved)",
|
|
141
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(ResourceType_1.ResourceType))),
|
|
142
|
+
resolve: (node, _args, ctx) => ctx.introspector.getResourcesByIds(node.usedByResources),
|
|
143
|
+
},
|
|
144
|
+
usedByTasksDetailed: {
|
|
145
|
+
description: "Detailed task/hook usages with per-usage config",
|
|
146
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(UsageTypes_1.MiddlewareTaskUsageType))),
|
|
147
|
+
resolve: (node, _args, ctx) => ctx.introspector.getTasksUsingMiddlewareDetailed(String(node.id)),
|
|
148
|
+
},
|
|
149
|
+
usedByResourcesDetailed: {
|
|
150
|
+
description: "Detailed resource usages with per-usage config",
|
|
151
|
+
type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(UsageTypes_1.MiddlewareResourceUsageType))),
|
|
152
|
+
resolve: (node, _args, ctx) => ctx.introspector.getResourcesUsingMiddlewareDetailed(String(node.id)),
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/schema/types/middleware/common.ts"],"names":[],"mappings":";;;AAwCA,wDAgEC;AAED,8DAoBC;AAED,sEAuBC;AAED,kFAmDC;AA5MD,qCAOiB;AAEjB,0CAAuC;AACvC,4CAAyC;AAEzC,kDAA+C;AAC/C,4DAA+D;AAC/D,8CAAmD;AACnD,4CAAiE;AACjE,6CAGsB;AACtB,0CAAuC;AAE1B,QAAA,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC7E,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,GAAoC,EAAE,CAAC,CAAC;QAC9C,OAAO,EAAE;YACP,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,IAAI,wBAAc,CAAC,wBAAc,CAAC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mB,EAAE;YACnB,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,oCAAuB,CAAC,CAAC,CAC7D;YACD,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAyB,EAAE,EAAE,CAClD,GAAG,CAAC,YAAY,CAAC,+BAA+B,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACpE;QACD,uBAAuB,EAAE;YACvB,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,wCAA2B,CAAC,CAAC,CACjE;YACD,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAyB,EAAE,EAAE,CAClD,GAAG,CAAC,YAAY,CAAC,mCAAmC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACxE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ReadFileOptions {
|
|
2
|
+
startLine?: number | null;
|
|
3
|
+
endLine?: number | null;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Reads a file from disk as UTF-8. When startLine and/or endLine are provided,
|
|
7
|
+
* returns only the inclusive slice of lines using 1-based line numbers.
|
|
8
|
+
* - Out-of-range values are clamped within [1, totalLines].
|
|
9
|
+
* - If startLine > endLine after clamping, returns an empty string.
|
|
10
|
+
* - Returns null if the file cannot be read.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readFile(filePath: string, options?: ReadFileOptions): Promise<string | null>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readFile = readFile;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
/**
|
|
6
|
+
* Reads a file from disk as UTF-8. When startLine and/or endLine are provided,
|
|
7
|
+
* returns only the inclusive slice of lines using 1-based line numbers.
|
|
8
|
+
* - Out-of-range values are clamped within [1, totalLines].
|
|
9
|
+
* - If startLine > endLine after clamping, returns an empty string.
|
|
10
|
+
* - Returns null if the file cannot be read.
|
|
11
|
+
*/
|
|
12
|
+
async function readFile(filePath, options) {
|
|
13
|
+
try {
|
|
14
|
+
const contents = await fs_1.promises.readFile(filePath, "utf8");
|
|
15
|
+
const hasStart = typeof options?.startLine === "number" && options.startLine != null;
|
|
16
|
+
const hasEnd = typeof options?.endLine === "number" && options.endLine != null;
|
|
17
|
+
if (!hasStart && !hasEnd) {
|
|
18
|
+
return contents;
|
|
19
|
+
}
|
|
20
|
+
const lines = contents.split(/\r?\n/);
|
|
21
|
+
const totalLines = lines.length;
|
|
22
|
+
const rawStart = (options?.startLine ?? 1);
|
|
23
|
+
const rawEnd = (options?.endLine ?? totalLines);
|
|
24
|
+
let start = Math.max(1, Math.min(rawStart, totalLines));
|
|
25
|
+
let end = Math.max(1, Math.min(rawEnd, totalLines));
|
|
26
|
+
if (start > end) {
|
|
27
|
+
return "";
|
|
28
|
+
}
|
|
29
|
+
return lines.slice(start - 1, end).join("\n");
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/schema/utils.ts"],"names":[],"mappings":";;AAcA,4BAiCC;AA/CD,2BAAoC;AAOpC;;;;;;GAMG;AACI,KAAK,UAAU,QAAQ,CAC5B,QAAgB,EAChB,OAAyB;IAEzB,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAErD,MAAM,QAAQ,GACZ,OAAO,OAAO,EAAE,SAAS,KAAK,QAAQ,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;QACtE,MAAM,MAAM,GACV,OAAO,OAAO,EAAE,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC;QAElE,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC;QAEhC,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,CAAW,CAAC;QACrD,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,OAAO,IAAI,UAAU,CAAW,CAAC;QAE1D,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;QACxD,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;QAEpD,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;YAChB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Runner Dev Documentation</title>
|
|
7
|
+
<meta name="description" content="Interactive documentation for your Runner application">
|
|
8
|
+
<script type="module" crossorigin src="/static/index-D-NS5aw1.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
<script>
|
|
13
|
+
// Runtime config placeholders - will be replaced by server
|
|
14
|
+
window.__RUNNER_DEV_CONFIG__ = {
|
|
15
|
+
API_URL: '__API_URL__',
|
|
16
|
+
INTROSPECTOR_DATA: '__INTROSPECTOR_DATA__'
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|