@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.
Files changed (215) hide show
  1. package/AI.md +411 -0
  2. package/README.md +1103 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +58 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/client/documentation.d.ts +8 -0
  7. package/dist/client/documentation.js +144 -0
  8. package/dist/client/documentation.js.map +1 -0
  9. package/dist/components/Documentation/Documentation.d.ts +8 -0
  10. package/dist/components/Documentation/Documentation.js +283 -0
  11. package/dist/components/Documentation/Documentation.js.map +1 -0
  12. package/dist/components/Documentation/components/DiagnosticsPanel.d.ts +7 -0
  13. package/dist/components/Documentation/components/DiagnosticsPanel.js +126 -0
  14. package/dist/components/Documentation/components/DiagnosticsPanel.js.map +1 -0
  15. package/dist/components/Documentation/components/EventCard.d.ts +8 -0
  16. package/dist/components/Documentation/components/EventCard.js +164 -0
  17. package/dist/components/Documentation/components/EventCard.js.map +1 -0
  18. package/dist/components/Documentation/components/HookCard.d.ts +8 -0
  19. package/dist/components/Documentation/components/HookCard.js +111 -0
  20. package/dist/components/Documentation/components/HookCard.js.map +1 -0
  21. package/dist/components/Documentation/components/MiddlewareCard.d.ts +8 -0
  22. package/dist/components/Documentation/components/MiddlewareCard.js +159 -0
  23. package/dist/components/Documentation/components/MiddlewareCard.js.map +1 -0
  24. package/dist/components/Documentation/components/ResourceCard.d.ts +8 -0
  25. package/dist/components/Documentation/components/ResourceCard.js +94 -0
  26. package/dist/components/Documentation/components/ResourceCard.js.map +1 -0
  27. package/dist/components/Documentation/components/Sidebar.d.ts +13 -0
  28. package/dist/components/Documentation/components/Sidebar.js +129 -0
  29. package/dist/components/Documentation/components/Sidebar.js.map +1 -0
  30. package/dist/components/Documentation/components/TagCard.d.ts +7 -0
  31. package/dist/components/Documentation/components/TagCard.js +75 -0
  32. package/dist/components/Documentation/components/TagCard.js.map +1 -0
  33. package/dist/components/Documentation/components/TaskCard.d.ts +8 -0
  34. package/dist/components/Documentation/components/TaskCard.js +77 -0
  35. package/dist/components/Documentation/components/TaskCard.js.map +1 -0
  36. package/dist/components/Documentation/index.d.ts +2 -0
  37. package/dist/components/Documentation/index.js +6 -0
  38. package/dist/components/Documentation/index.js.map +1 -0
  39. package/dist/components/Documentation/utils/formatting.d.ts +8 -0
  40. package/dist/components/Documentation/utils/formatting.js +84 -0
  41. package/dist/components/Documentation/utils/formatting.js.map +1 -0
  42. package/dist/components/ExampleComponent.d.ts +10 -0
  43. package/dist/components/ExampleComponent.js +48 -0
  44. package/dist/components/ExampleComponent.js.map +1 -0
  45. package/dist/generated/resolvers-types.d.ts +1523 -0
  46. package/dist/generated/resolvers-types.js +3 -0
  47. package/dist/generated/resolvers-types.js.map +1 -0
  48. package/dist/index.d.ts +61 -0
  49. package/dist/index.js +22 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/main.d.ts +1 -0
  52. package/dist/main.js +3 -0
  53. package/dist/main.js.map +1 -0
  54. package/dist/mcp/env.d.ts +5 -0
  55. package/dist/mcp/env.js +42 -0
  56. package/dist/mcp/env.js.map +1 -0
  57. package/dist/mcp/format.d.ts +50 -0
  58. package/dist/mcp/format.js +249 -0
  59. package/dist/mcp/format.js.map +1 -0
  60. package/dist/mcp/help.d.ts +20 -0
  61. package/dist/mcp/help.js +121 -0
  62. package/dist/mcp/help.js.map +1 -0
  63. package/dist/mcp/http.d.ts +6 -0
  64. package/dist/mcp/http.js +47 -0
  65. package/dist/mcp/http.js.map +1 -0
  66. package/dist/mcp/projectOverview.d.ts +2 -0
  67. package/dist/mcp/projectOverview.js +210 -0
  68. package/dist/mcp/projectOverview.js.map +1 -0
  69. package/dist/mcp/schema.d.ts +1 -0
  70. package/dist/mcp/schema.js +17 -0
  71. package/dist/mcp/schema.js.map +1 -0
  72. package/dist/mcp/tools/graphql.introspect.d.ts +2 -0
  73. package/dist/mcp/tools/graphql.introspect.js +19 -0
  74. package/dist/mcp/tools/graphql.introspect.js.map +1 -0
  75. package/dist/mcp/tools/graphql.mutation.d.ts +2 -0
  76. package/dist/mcp/tools/graphql.mutation.js +43 -0
  77. package/dist/mcp/tools/graphql.mutation.js.map +1 -0
  78. package/dist/mcp/tools/graphql.ping.d.ts +2 -0
  79. package/dist/mcp/tools/graphql.ping.js +23 -0
  80. package/dist/mcp/tools/graphql.ping.js.map +1 -0
  81. package/dist/mcp/tools/graphql.query.d.ts +2 -0
  82. package/dist/mcp/tools/graphql.query.js +42 -0
  83. package/dist/mcp/tools/graphql.query.js.map +1 -0
  84. package/dist/mcp/tools/graphql.schemaSdl.d.ts +2 -0
  85. package/dist/mcp/tools/graphql.schemaSdl.js +15 -0
  86. package/dist/mcp/tools/graphql.schemaSdl.js.map +1 -0
  87. package/dist/mcp/tools/help.read.d.ts +2 -0
  88. package/dist/mcp/tools/help.read.js +67 -0
  89. package/dist/mcp/tools/help.read.js.map +1 -0
  90. package/dist/mcp/tools/help.runner.d.ts +2 -0
  91. package/dist/mcp/tools/help.runner.js +55 -0
  92. package/dist/mcp/tools/help.runner.js.map +1 -0
  93. package/dist/mcp/tools/help.runnerDev.d.ts +2 -0
  94. package/dist/mcp/tools/help.runnerDev.js +56 -0
  95. package/dist/mcp/tools/help.runnerDev.js.map +1 -0
  96. package/dist/mcp.d.ts +1 -0
  97. package/dist/mcp.js +75 -0
  98. package/dist/mcp.js.map +1 -0
  99. package/dist/resources/dev.resource.d.ts +5 -0
  100. package/dist/resources/dev.resource.js +26 -0
  101. package/dist/resources/dev.resource.js.map +1 -0
  102. package/dist/resources/docs.generator.resource.d.ts +17 -0
  103. package/dist/resources/docs.generator.resource.js +230 -0
  104. package/dist/resources/docs.generator.resource.js.map +1 -0
  105. package/dist/resources/graphql-accumulator.resource.d.ts +7 -0
  106. package/dist/resources/graphql-accumulator.resource.js +41 -0
  107. package/dist/resources/graphql-accumulator.resource.js.map +1 -0
  108. package/dist/resources/introspector.resource.d.ts +129 -0
  109. package/dist/resources/introspector.resource.js +266 -0
  110. package/dist/resources/introspector.resource.js.map +1 -0
  111. package/dist/resources/introspector.tools.d.ts +47 -0
  112. package/dist/resources/introspector.tools.js +505 -0
  113. package/dist/resources/introspector.tools.js.map +1 -0
  114. package/dist/resources/live.resource.d.ts +80 -0
  115. package/dist/resources/live.resource.js +231 -0
  116. package/dist/resources/live.resource.js.map +1 -0
  117. package/dist/resources/server.resource.d.ts +38 -0
  118. package/dist/resources/server.resource.js +106 -0
  119. package/dist/resources/server.resource.js.map +1 -0
  120. package/dist/resources/swap.resource.d.ts +43 -0
  121. package/dist/resources/swap.resource.js +251 -0
  122. package/dist/resources/swap.resource.js.map +1 -0
  123. package/dist/resources/swap.tools.d.ts +31 -0
  124. package/dist/resources/swap.tools.js +207 -0
  125. package/dist/resources/swap.tools.js.map +1 -0
  126. package/dist/resources/telemetry.chain.d.ts +13 -0
  127. package/dist/resources/telemetry.chain.js +32 -0
  128. package/dist/resources/telemetry.chain.js.map +1 -0
  129. package/dist/resources/telemetry.resource.d.ts +1 -0
  130. package/dist/resources/telemetry.resource.js +90 -0
  131. package/dist/resources/telemetry.resource.js.map +1 -0
  132. package/dist/schema/context.d.ts +11 -0
  133. package/dist/schema/context.js +3 -0
  134. package/dist/schema/context.js.map +1 -0
  135. package/dist/schema/index.d.ts +7 -0
  136. package/dist/schema/index.js +72 -0
  137. package/dist/schema/index.js.map +1 -0
  138. package/dist/schema/model.d.ts +97 -0
  139. package/dist/schema/model.js +5 -0
  140. package/dist/schema/model.js.map +1 -0
  141. package/dist/schema/mutation.d.ts +3 -0
  142. package/dist/schema/mutation.js +112 -0
  143. package/dist/schema/mutation.js.map +1 -0
  144. package/dist/schema/query.d.ts +3 -0
  145. package/dist/schema/query.js +295 -0
  146. package/dist/schema/query.js.map +1 -0
  147. package/dist/schema/types/AllType.d.ts +3 -0
  148. package/dist/schema/types/AllType.js +149 -0
  149. package/dist/schema/types/AllType.js.map +1 -0
  150. package/dist/schema/types/BaseElementCommon.d.ts +11 -0
  151. package/dist/schema/types/BaseElementCommon.js +61 -0
  152. package/dist/schema/types/BaseElementCommon.js.map +1 -0
  153. package/dist/schema/types/DiagnosticsType.d.ts +2 -0
  154. package/dist/schema/types/DiagnosticsType.js +15 -0
  155. package/dist/schema/types/DiagnosticsType.js.map +1 -0
  156. package/dist/schema/types/EventType.d.ts +4 -0
  157. package/dist/schema/types/EventType.js +97 -0
  158. package/dist/schema/types/EventType.js.map +1 -0
  159. package/dist/schema/types/HookType.d.ts +4 -0
  160. package/dist/schema/types/HookType.js +123 -0
  161. package/dist/schema/types/HookType.js.map +1 -0
  162. package/dist/schema/types/LiveType.d.ts +33 -0
  163. package/dist/schema/types/LiveType.js +553 -0
  164. package/dist/schema/types/LiveType.js.map +1 -0
  165. package/dist/schema/types/MetaType.d.ts +3 -0
  166. package/dist/schema/types/MetaType.js +31 -0
  167. package/dist/schema/types/MetaType.js.map +1 -0
  168. package/dist/schema/types/MiddlewareType.d.ts +4 -0
  169. package/dist/schema/types/MiddlewareType.js +26 -0
  170. package/dist/schema/types/MiddlewareType.js.map +1 -0
  171. package/dist/schema/types/ResourceType.d.ts +2 -0
  172. package/dist/schema/types/ResourceType.js +145 -0
  173. package/dist/schema/types/ResourceType.js.map +1 -0
  174. package/dist/schema/types/RunTypes.d.ts +7 -0
  175. package/dist/schema/types/RunTypes.js +95 -0
  176. package/dist/schema/types/RunTypes.js.map +1 -0
  177. package/dist/schema/types/SwapType.d.ts +5 -0
  178. package/dist/schema/types/SwapType.js +42 -0
  179. package/dist/schema/types/SwapType.js.map +1 -0
  180. package/dist/schema/types/TagType.d.ts +6 -0
  181. package/dist/schema/types/TagType.js +48 -0
  182. package/dist/schema/types/TagType.js.map +1 -0
  183. package/dist/schema/types/TaskLikeCommon.d.ts +7 -0
  184. package/dist/schema/types/TaskLikeCommon.js +86 -0
  185. package/dist/schema/types/TaskLikeCommon.js.map +1 -0
  186. package/dist/schema/types/TaskType.d.ts +11 -0
  187. package/dist/schema/types/TaskType.js +188 -0
  188. package/dist/schema/types/TaskType.js.map +1 -0
  189. package/dist/schema/types/index.d.ts +13 -0
  190. package/dist/schema/types/index.js +44 -0
  191. package/dist/schema/types/index.js.map +1 -0
  192. package/dist/schema/types/middleware/UsageTypes.d.ts +3 -0
  193. package/dist/schema/types/middleware/UsageTypes.js +23 -0
  194. package/dist/schema/types/middleware/UsageTypes.js.map +1 -0
  195. package/dist/schema/types/middleware/common.d.ts +6 -0
  196. package/dist/schema/types/middleware/common.js +156 -0
  197. package/dist/schema/types/middleware/common.js.map +1 -0
  198. package/dist/schema/utils.d.ts +12 -0
  199. package/dist/schema/utils.js +35 -0
  200. package/dist/schema/utils.js.map +1 -0
  201. package/dist/ui/index.html +20 -0
  202. package/dist/ui/static/index-D-NS5aw1.js +40 -0
  203. package/dist/utils/json-schema-to-readable.d.ts +1 -0
  204. package/dist/utils/json-schema-to-readable.js +256 -0
  205. package/dist/utils/json-schema-to-readable.js.map +1 -0
  206. package/dist/utils/path.d.ts +16 -0
  207. package/dist/utils/path.js +101 -0
  208. package/dist/utils/path.js.map +1 -0
  209. package/dist/utils/react-ssr.d.ts +9 -0
  210. package/dist/utils/react-ssr.js +36 -0
  211. package/dist/utils/react-ssr.js.map +1 -0
  212. package/dist/utils/zod.d.ts +6 -0
  213. package/dist/utils/zod.js +39 -0
  214. package/dist/utils/zod.js.map +1 -0
  215. package/package.json +83 -0
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceType = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const AllType_1 = require("./AllType");
6
+ const MetaType_1 = require("./MetaType");
7
+ const MiddlewareType_1 = require("./MiddlewareType");
8
+ const TaskType_1 = require("./TaskType");
9
+ const EventType_1 = require("./EventType");
10
+ const TaskType_2 = require("./TaskType");
11
+ const BaseElementCommon_1 = require("./BaseElementCommon");
12
+ const path_1 = require("../../utils/path");
13
+ const zod_1 = require("../../utils/zod");
14
+ exports.ResourceType = new graphql_1.GraphQLObjectType({
15
+ name: "Resource",
16
+ interfaces: () => [AllType_1.BaseElementInterface],
17
+ isTypeOf: (value) => Array.isArray(value?.registers) &&
18
+ Array.isArray(value?.overrides),
19
+ fields: () => ({
20
+ id: { description: "Resource id", type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLID) },
21
+ meta: { description: "Resource metadata", type: MetaType_1.MetaType },
22
+ filePath: {
23
+ description: "Path to resource file",
24
+ type: graphql_1.GraphQLString,
25
+ resolve: (node) => (0, path_1.sanitizePath)(node?.filePath ?? null),
26
+ },
27
+ dependsOn: {
28
+ description: "Ids of resources this resource depends on",
29
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
30
+ },
31
+ dependsOnResolved: {
32
+ description: "Resources this resource depends on (resolved)",
33
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(exports.ResourceType))),
34
+ resolve: async (node, _args, ctx) => {
35
+ return ctx.introspector.getResourcesByIds(node.dependsOn);
36
+ },
37
+ },
38
+ config: {
39
+ description: "Serialized resource config (if any)",
40
+ type: graphql_1.GraphQLString,
41
+ },
42
+ configSchema: {
43
+ description: "Prettified Zod JSON structure for the resource config schema, if provided",
44
+ type: graphql_1.GraphQLString,
45
+ },
46
+ configSchemaReadable: {
47
+ description: "Readable text representation of the resource config schema, if provided",
48
+ type: graphql_1.GraphQLString,
49
+ resolve: (node) => (0, zod_1.convertJsonSchemaToReadable)(node.configSchema),
50
+ },
51
+ middleware: {
52
+ description: "Ids of middlewares applied to this resource",
53
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
54
+ },
55
+ middlewareResolved: {
56
+ description: "Middlewares applied to this resource (resolved)",
57
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(MiddlewareType_1.ResourceMiddlewareType))),
58
+ resolve: async (node, _args, ctx) => {
59
+ return ctx.introspector.getMiddlewaresByIds(node.middleware);
60
+ },
61
+ },
62
+ middlewareResolvedDetailed: {
63
+ description: "Middlewares applied to this resource with per-usage config",
64
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskType_2.TaskMiddlewareUsageType))),
65
+ resolve: (node, _args, ctx) => ctx.introspector.getMiddlewareUsagesForResource(node.id),
66
+ },
67
+ overrides: {
68
+ description: "Ids of items this resource overrides",
69
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
70
+ },
71
+ overridesResolved: {
72
+ description: "The registerable items this resource overrides (resolved)",
73
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(AllType_1.BaseElementInterface))),
74
+ resolve: async (node, _args, ctx) => {
75
+ // We only have ids; return what we can resolve (tasks/hooks/resources/middleware)
76
+ const ids = node.overrides;
77
+ const tasks = ctx.introspector.getTasksByIds(ids);
78
+ const hooks = ctx.introspector.getHooksByIds(ids);
79
+ const resources = ctx.introspector.getResourcesByIds(ids);
80
+ const middlewares = ctx.introspector.getMiddlewaresByIds(ids);
81
+ return [...tasks, ...hooks, ...resources, ...middlewares];
82
+ },
83
+ },
84
+ registers: {
85
+ description: "Ids of items this resource registers",
86
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
87
+ },
88
+ registersResolved: {
89
+ description: "The items registered by this resource (resolved)",
90
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(AllType_1.BaseElementInterface))),
91
+ resolve: async (node, _args, ctx) => {
92
+ const ids = node.registers;
93
+ const tasks = ctx.introspector.getTasksByIds(ids);
94
+ const hooks = ctx.introspector.getHooksByIds(ids);
95
+ const resources = ctx.introspector.getResourcesByIds(ids);
96
+ const middlewares = ctx.introspector.getMiddlewaresByIds(ids);
97
+ const events = ctx.introspector.getEventsByIds(ids);
98
+ return [...tasks, ...hooks, ...resources, ...middlewares, ...events];
99
+ },
100
+ },
101
+ usedBy: {
102
+ description: "Task nodes using this resource (resolved)",
103
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskType_1.TaskType))),
104
+ resolve: async (node, _args, ctx) => {
105
+ return ctx.introspector
106
+ .getTasksUsingResource(node.id)
107
+ .filter((n) => !("event" in (n || {})));
108
+ },
109
+ },
110
+ emits: {
111
+ description: "Events emitted by tasks/hooks that depend on this resource",
112
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
113
+ resolve: (node, _args, ctx) => ctx.introspector.getEmittedEventsForResource(node.id),
114
+ },
115
+ context: {
116
+ description: "Serialized context (if any)",
117
+ type: graphql_1.GraphQLString,
118
+ },
119
+ registeredBy: {
120
+ description: "Id of the resource that registered this resource (if any)",
121
+ type: graphql_1.GraphQLString,
122
+ resolve: (node, _args, ctx) => {
123
+ if (node.registeredBy)
124
+ return node.registeredBy;
125
+ const allResources = ctx.introspector.getResources();
126
+ const found = allResources.find((r) => (r.registers || []).includes(node.id));
127
+ return found?.id ?? null;
128
+ },
129
+ },
130
+ registeredByResolved: {
131
+ description: "Resource that registered this resource (resolved, if any)",
132
+ type: exports.ResourceType,
133
+ resolve: (node, _args, ctx) => {
134
+ if (node.registeredBy) {
135
+ return ctx.introspector.getResource(node.registeredBy);
136
+ }
137
+ const allResources = ctx.introspector.getResources();
138
+ return (allResources.find((r) => (r.registers || []).includes(node.id)) ||
139
+ null);
140
+ },
141
+ },
142
+ ...(0, BaseElementCommon_1.baseElementCommonFields)(),
143
+ }),
144
+ });
145
+ //# sourceMappingURL=ResourceType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceType.js","sourceRoot":"","s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ACH,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GraphQLEnumType, GraphQLObjectType } from "graphql";
2
+ import type { CustomGraphQLContext } from "../context";
3
+ import type { RunRecord as LiveRunRecord } from "../../resources/live.resource";
4
+ export declare const NodeKindEnum: GraphQLEnumType;
5
+ export declare const RunRecordType: GraphQLObjectType<LiveRunRecord, CustomGraphQLContext>;
6
+ import { GraphQLInputObjectType } from "graphql";
7
+ export declare const RunFilterInput: GraphQLInputObjectType;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RunFilterInput = exports.RunRecordType = exports.NodeKindEnum = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const AllType_1 = require("./AllType");
6
+ exports.NodeKindEnum = new graphql_1.GraphQLEnumType({
7
+ name: "NodeKindEnum",
8
+ description: "Kinds of executable nodes",
9
+ values: {
10
+ TASK: { value: "TASK" },
11
+ HOOK: { value: "HOOK" },
12
+ },
13
+ });
14
+ exports.RunRecordType = new graphql_1.GraphQLObjectType({
15
+ name: "RunRecord",
16
+ fields: () => ({
17
+ timestampMs: {
18
+ description: "Run end time (milliseconds since epoch)",
19
+ type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLFloat),
20
+ },
21
+ nodeId: {
22
+ description: "Id of the executed node",
23
+ type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
24
+ },
25
+ nodeKind: {
26
+ description: "Kind of executed node",
27
+ type: new graphql_1.GraphQLNonNull(exports.NodeKindEnum),
28
+ },
29
+ durationMs: {
30
+ description: "Execution duration in milliseconds",
31
+ type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLFloat),
32
+ },
33
+ ok: {
34
+ description: "Whether execution succeeded",
35
+ type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean),
36
+ },
37
+ error: { description: "Error message (if failed)", type: graphql_1.GraphQLString },
38
+ parentId: {
39
+ description: "Immediate parent caller id if available",
40
+ type: graphql_1.GraphQLString,
41
+ },
42
+ rootId: {
43
+ description: "Root caller id that initiated the chain",
44
+ type: graphql_1.GraphQLString,
45
+ },
46
+ correlationId: {
47
+ description: "Correlation id for tracing",
48
+ type: graphql_1.GraphQLString,
49
+ },
50
+ nodeResolved: {
51
+ description: "Resolved executed node (task/hook)",
52
+ type: AllType_1.BaseElementInterface,
53
+ resolve: (node, _args, ctx) => {
54
+ const id = String(node.nodeId);
55
+ if (node.nodeKind === "TASK") {
56
+ return ctx.introspector.getTask(id);
57
+ }
58
+ else if (node.nodeKind === "HOOK") {
59
+ return ctx.introspector.getHook(id);
60
+ }
61
+ return null;
62
+ },
63
+ },
64
+ }),
65
+ });
66
+ // We keep RunFilterInput definition here to reuse across Live/Task/Hook
67
+ const graphql_2 = require("graphql");
68
+ exports.RunFilterInput = new graphql_2.GraphQLInputObjectType({
69
+ name: "RunFilterInput",
70
+ description: "Filters for execution run records",
71
+ fields: {
72
+ nodeKinds: {
73
+ description: "Only include specific node kinds",
74
+ type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(exports.NodeKindEnum)),
75
+ },
76
+ nodeIds: {
77
+ description: "Only include specific node ids",
78
+ type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString)),
79
+ },
80
+ ok: { description: "Filter by success status", type: graphql_1.GraphQLBoolean },
81
+ parentIds: {
82
+ description: "Only include runs with specific parent ids",
83
+ type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString)),
84
+ },
85
+ rootIds: {
86
+ description: "Only include runs with specific root ids",
87
+ type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString)),
88
+ },
89
+ correlationIds: {
90
+ description: "Filter by correlation ids",
91
+ type: new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString)),
92
+ },
93
+ },
94
+ });
95
+ //# sourceMappingURL=RunTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunTypes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AAC,uBAAa,CAAC,CAAC;SACzD;QACD,cAAc,EAAE;YACd,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,uBAAa,CAAC,CAAC;SACzD;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { GraphQLObjectType } from "graphql";
2
+ export declare const SwapResultType: GraphQLObjectType<any, any>;
3
+ export declare const SwappedTaskType: GraphQLObjectType<any, any>;
4
+ export declare const InvokeResultType: GraphQLObjectType<any, any>;
5
+ export declare const EvalResultType: GraphQLObjectType<any, any>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EvalResultType = exports.InvokeResultType = exports.SwappedTaskType = exports.SwapResultType = void 0;
4
+ const graphql_1 = require("graphql");
5
+ exports.SwapResultType = new graphql_1.GraphQLObjectType({
6
+ name: "SwapResult",
7
+ fields: () => ({
8
+ success: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) },
9
+ error: { type: graphql_1.GraphQLString },
10
+ taskId: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
11
+ }),
12
+ });
13
+ exports.SwappedTaskType = new graphql_1.GraphQLObjectType({
14
+ name: "SwappedTask",
15
+ fields: () => ({
16
+ taskId: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
17
+ swappedAt: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLFloat) },
18
+ originalCode: { type: graphql_1.GraphQLString },
19
+ }),
20
+ });
21
+ exports.InvokeResultType = new graphql_1.GraphQLObjectType({
22
+ name: "InvokeResult",
23
+ fields: () => ({
24
+ success: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) },
25
+ error: { type: graphql_1.GraphQLString },
26
+ taskId: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString) },
27
+ result: { type: graphql_1.GraphQLString },
28
+ executionTimeMs: { type: graphql_1.GraphQLFloat },
29
+ invocationId: { type: graphql_1.GraphQLString },
30
+ }),
31
+ });
32
+ exports.EvalResultType = new graphql_1.GraphQLObjectType({
33
+ name: "EvalResult",
34
+ fields: () => ({
35
+ success: { type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLBoolean) },
36
+ error: { type: graphql_1.GraphQLString },
37
+ result: { type: graphql_1.GraphQLString },
38
+ executionTimeMs: { type: graphql_1.GraphQLFloat },
39
+ invocationId: { type: graphql_1.GraphQLString },
40
+ }),
41
+ });
42
+ //# sourceMappingURL=SwapType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwapType.js","sourceRoot":"","sources":["../../../src/schema/types/SwapType.ts"],"names":[],"mappings":";;;AAAA,qCASiB;AAEJ,QAAA,cAAc,GAAG,IAAI,2BAAiB,CAAC;IAClD,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,wBAAc,CAAC,EAAE;QACrD,KAAK,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,uBAAa,CAAC,EAAE;KACpD,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,IAAI,2BAAiB,CAAC;IACnD,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,uBAAa,CAAC,EAAE;QACnD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,sBAAY,CAAC,EAAE;QACrD,YAAY,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;KACtC,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,IAAI,2BAAiB,CAAC;IACpD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,wBAAc,CAAC,EAAE;QACrD,KAAK,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,uBAAa,CAAC,EAAE;QACnD,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC/B,eAAe,EAAE,EAAE,IAAI,EAAE,sBAAY,EAAE;QACvC,YAAY,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;KACtC,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAI,2BAAiB,CAAC;IAClD,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,wBAAc,CAAC,wBAAc,CAAC,EAAE;QACrD,KAAK,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;QAC/B,eAAe,EAAE,EAAE,IAAI,EAAE,sBAAY,EAAE;QACvC,YAAY,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;KACtC,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { GraphQLObjectType } from "graphql";
2
+ import type { Tag } from "../model";
3
+ import type { Introspector } from "../../resources/introspector.resource";
4
+ export declare const TagType: GraphQLObjectType<Tag, {
5
+ introspector: Introspector;
6
+ }>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagType = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const HookType_1 = require("./HookType");
6
+ const TaskType_1 = require("./TaskType");
7
+ const ResourceType_1 = require("./ResourceType");
8
+ const MiddlewareType_1 = require("./MiddlewareType");
9
+ const EventType_1 = require("./EventType");
10
+ exports.TagType = new graphql_1.GraphQLObjectType({
11
+ name: "Tag",
12
+ fields: () => ({
13
+ id: {
14
+ type: new graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
15
+ },
16
+ tasks: {
17
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskType_1.TaskType))),
18
+ resolve: (tag, _, { introspector }) => {
19
+ return introspector.getTasksWithTag(tag.id);
20
+ },
21
+ },
22
+ hooks: {
23
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(HookType_1.HookType))),
24
+ resolve: (tag, _, { introspector }) => {
25
+ return introspector.getHooksWithTag(tag.id);
26
+ },
27
+ },
28
+ resources: {
29
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(ResourceType_1.ResourceType))),
30
+ resolve: (tag, _, { introspector }) => {
31
+ return introspector.getResourcesWithTag(tag.id);
32
+ },
33
+ },
34
+ middlewares: {
35
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(MiddlewareType_1.MiddlewareType))),
36
+ resolve: (tag, _, { introspector }) => {
37
+ return introspector.getMiddlewaresWithTag(tag.id);
38
+ },
39
+ },
40
+ events: {
41
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
42
+ resolve: (tag, _, { introspector }) => {
43
+ return introspector.getEventsWithTag(tag.id);
44
+ },
45
+ },
46
+ }),
47
+ });
48
+ //# sourceMappingURL=TagType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagType.js","sourceRoot":"","sources":["../../../src/schema/types/TagType.ts"],"names":[],"mappings":";;;AAAA,qCAKiB;AAEjB,yCAAsC;AACtC,yCAAsC;AACtC,iDAA8C;AAC9C,qDAAkD;AAClD,2CAAwC;AAG3B,QAAA,OAAO,GAClB,IAAI,2BAAiB,CAAC;IACpB,IAAI,EAAE,KAA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C;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,qBAAS,CAAC,CAAC,CAC/C;YACD,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;gBACpC,OAAO,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC/C,CAAC;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GraphQLObjectType, type GraphQLFieldConfigMap, type GraphQLFieldResolver } from "graphql";
2
+ import type { CustomGraphQLContext } from "../context";
3
+ export declare function taskLikeCommonFields(params: {
4
+ ResourceType: GraphQLObjectType;
5
+ TaskMiddlewareUsageType: GraphQLObjectType;
6
+ middlewareDetailedResolver?: GraphQLFieldResolver<any, CustomGraphQLContext>;
7
+ }): GraphQLFieldConfigMap<any, CustomGraphQLContext>;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.taskLikeCommonFields = taskLikeCommonFields;
4
+ const graphql_1 = require("graphql");
5
+ const MiddlewareType_1 = require("./MiddlewareType");
6
+ const EventType_1 = require("./EventType");
7
+ const AllType_1 = require("./AllType");
8
+ const zod_1 = require("../../utils/zod");
9
+ function taskLikeCommonFields(params) {
10
+ const { ResourceType, TaskMiddlewareUsageType, middlewareDetailedResolver } = params;
11
+ return {
12
+ inputSchema: {
13
+ description: "Prettified Zod JSON structure for the input schema, if provided",
14
+ type: graphql_1.GraphQLString,
15
+ },
16
+ inputSchemaReadable: {
17
+ description: "Readable text representation of the input schema, if provided",
18
+ type: graphql_1.GraphQLString,
19
+ resolve: (node) => (0, zod_1.convertJsonSchemaToReadable)(node.inputSchema),
20
+ },
21
+ emits: {
22
+ description: "Event ids this task-like may emit (from dependencies)",
23
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
24
+ },
25
+ dependsOn: {
26
+ description: "Ids of resources/tasks this task-like depends on",
27
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
28
+ },
29
+ middleware: {
30
+ description: "Ids of middlewares applied to this task-like",
31
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(graphql_1.GraphQLString))),
32
+ },
33
+ middlewareResolved: {
34
+ description: "Middlewares applied to this task-like (resolved)",
35
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(MiddlewareType_1.TaskMiddlewareType))),
36
+ resolve: (node, _args, ctx) => ctx.introspector.getMiddlewaresByIds(node.middleware),
37
+ },
38
+ middlewareResolvedDetailed: {
39
+ description: "Middlewares applied to this task-like with per-usage config",
40
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(TaskMiddlewareUsageType))),
41
+ resolve: middlewareDetailedResolver ||
42
+ ((node, _args, ctx) => ctx.introspector.getMiddlewareUsagesForTask(node.id)),
43
+ },
44
+ emitsResolved: {
45
+ description: "Events emitted by this task-like (resolved)",
46
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(EventType_1.EventType))),
47
+ resolve: (node, _args, ctx) => ctx.introspector.getEventsByIds(node.emits),
48
+ },
49
+ overriddenBy: {
50
+ description: "Id of the resource that overrides this task-like (if any)",
51
+ type: graphql_1.GraphQLString,
52
+ },
53
+ registeredBy: {
54
+ description: "Id of the resource that registered this task-like (if any)",
55
+ type: graphql_1.GraphQLString,
56
+ resolve: (node, _args, ctx) => {
57
+ if (node.registeredBy)
58
+ return node.registeredBy;
59
+ const allResources = ctx.introspector.getResources();
60
+ const found = allResources.find((r) => (r.registers || []).includes(node.id));
61
+ return found?.id ?? null;
62
+ },
63
+ },
64
+ registeredByResolved: {
65
+ description: "Resource that registered this task-like (resolved, if any)",
66
+ type: ResourceType,
67
+ resolve: (node, _args, ctx) => {
68
+ if (node.registeredBy) {
69
+ return ctx.introspector.getResource(node.registeredBy);
70
+ }
71
+ const allResources = ctx.introspector.getResources();
72
+ return (allResources.find((r) => (r.registers || []).includes(node.id)) ||
73
+ null);
74
+ },
75
+ },
76
+ dependsOnResolved: {
77
+ description: "Flattened dependencies resolved to BaseElement (tasks, hooks, resources)",
78
+ type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(AllType_1.BaseElementInterface))),
79
+ resolve: async (node, _args, ctx) => {
80
+ const { tasks, hooks, resources } = await ctx.introspector.getDependencies(node);
81
+ return [...tasks, ...hooks, ...resources];
82
+ },
83
+ },
84
+ };
85
+ }
86
+ //# sourceMappingURL=TaskLikeCommon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskLikeCommon.js","sourceRoot":"","sources":["../../../src/schema/types/TaskLikeCommon.ts"],"names":[],"mappings":";;AAgBA,oDA0GC;AA1HD,qCAQiB;AAGjB,qDAAsD;AACtD,2CAAwC;AACxC,uCAAiD;AACjD,yCAA8D;AAE9D,SAAgB,oBAAoB,CAAC,MAIpC;IACC,MAAM,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,GACzE,MAAM,CAAC;IAET,OAAO;QACL,WAAW,EAAE;YACX,WAAW,EACT,iEAAiE;YACnE,IAAI,EAAE,uBAAa;SACpB;QACD,mBAAmB,EAAE;YACnB,WAAW,EACT,+DAA+D;YACjE,IAAI,EAAE,uBAAa;YACnB,OAAO,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,IAAA,iCAA2B,EAAC,IAAI,CAAC,WAAW,CAAC;SACtE;QACD,KAAK,EAAE;YACL,WAAW,EAAE,uDAAuD;YACpE,IAAI,EAAE,IAAI,wBAAc,CACtB,IAAI,qBAAW,CAAC,IAAI,wBAAc,CAAC,uBAAa,C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AAc,CAAC,8BAAoB,CAAC,CAAC,CAC1D;YACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAyB,EAAE,EAAE;gBACxD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAC/B,MAAM,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC/C,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,SAAS,CAAC,CAAC;YAC5C,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { GraphQLObjectType } from "graphql";
2
+ import type { Hook, Task } from "../model";
3
+ import type { CustomGraphQLContext } from "../context";
4
+ export declare let TaskType: GraphQLObjectType<Task, CustomGraphQLContext>;
5
+ export declare const TaskDependsOnType: GraphQLObjectType<{
6
+ tasks: Task[];
7
+ hooks: Hook[];
8
+ resources: any[];
9
+ emitters: any[];
10
+ }, CustomGraphQLContext>;
11
+ export declare const TaskMiddlewareUsageType: GraphQLObjectType<any, any>;