@actions/languageservice 0.3.30 → 0.3.32

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 (74) hide show
  1. package/dist/complete.d.ts.map +1 -1
  2. package/dist/complete.js +57 -40
  3. package/dist/complete.js.map +1 -1
  4. package/dist/context/action-context.d.ts +30 -0
  5. package/dist/context/action-context.d.ts.map +1 -0
  6. package/dist/context/action-context.js +86 -0
  7. package/dist/context/action-context.js.map +1 -0
  8. package/dist/context/workflow-context.d.ts +10 -0
  9. package/dist/context/workflow-context.d.ts.map +1 -1
  10. package/dist/context/workflow-context.js +10 -0
  11. package/dist/context/workflow-context.js.map +1 -1
  12. package/dist/context-providers/default.d.ts +10 -1
  13. package/dist/context-providers/default.d.ts.map +1 -1
  14. package/dist/context-providers/default.js +125 -27
  15. package/dist/context-providers/default.js.map +1 -1
  16. package/dist/context-providers/descriptions.min.json +1 -1
  17. package/dist/context-providers/github.d.ts +4 -1
  18. package/dist/context-providers/github.d.ts.map +1 -1
  19. package/dist/context-providers/github.js +6 -0
  20. package/dist/context-providers/github.js.map +1 -1
  21. package/dist/context-providers/job.d.ts +3 -0
  22. package/dist/context-providers/job.d.ts.map +1 -1
  23. package/dist/context-providers/job.js +23 -25
  24. package/dist/context-providers/job.js.map +1 -1
  25. package/dist/description-providers/reusable-job-inputs.d.ts +8 -0
  26. package/dist/description-providers/reusable-job-inputs.d.ts.map +1 -1
  27. package/dist/description-providers/reusable-job-inputs.js +8 -0
  28. package/dist/description-providers/reusable-job-inputs.js.map +1 -1
  29. package/dist/document-links.d.ts +3 -0
  30. package/dist/document-links.d.ts.map +1 -1
  31. package/dist/document-links.js +48 -3
  32. package/dist/document-links.js.map +1 -1
  33. package/dist/hover.d.ts +5 -1
  34. package/dist/hover.d.ts.map +1 -1
  35. package/dist/hover.js +81 -43
  36. package/dist/hover.js.map +1 -1
  37. package/dist/inlay-hints.d.ts.map +1 -1
  38. package/dist/inlay-hints.js +7 -2
  39. package/dist/inlay-hints.js.map +1 -1
  40. package/dist/utils/document-type.d.ts +22 -0
  41. package/dist/utils/document-type.d.ts.map +1 -0
  42. package/dist/utils/document-type.js +41 -0
  43. package/dist/utils/document-type.js.map +1 -0
  44. package/dist/utils/transform.d.ts +18 -0
  45. package/dist/utils/transform.d.ts.map +1 -1
  46. package/dist/utils/transform.js +18 -2
  47. package/dist/utils/transform.js.map +1 -1
  48. package/dist/utils/workflow-cache.d.ts +19 -6
  49. package/dist/utils/workflow-cache.d.ts.map +1 -1
  50. package/dist/utils/workflow-cache.js +51 -11
  51. package/dist/utils/workflow-cache.js.map +1 -1
  52. package/dist/validate-action-reference.d.ts +9 -0
  53. package/dist/validate-action-reference.d.ts.map +1 -0
  54. package/dist/validate-action-reference.js +82 -0
  55. package/dist/validate-action-reference.js.map +1 -0
  56. package/dist/validate-action.d.ts +12 -3
  57. package/dist/validate-action.d.ts.map +1 -1
  58. package/dist/validate-action.js +75 -57
  59. package/dist/validate-action.js.map +1 -1
  60. package/dist/validate.d.ts +1 -1
  61. package/dist/validate.d.ts.map +1 -1
  62. package/dist/validate.js +21 -8
  63. package/dist/validate.js.map +1 -1
  64. package/dist/value-providers/config.d.ts +2 -2
  65. package/dist/value-providers/config.d.ts.map +1 -1
  66. package/dist/value-providers/definition.d.ts +3 -1
  67. package/dist/value-providers/definition.d.ts.map +1 -1
  68. package/dist/value-providers/definition.js +12 -13
  69. package/dist/value-providers/definition.js.map +1 -1
  70. package/package.json +5 -5
  71. package/dist/context-providers/strategy.d.ts +0 -4
  72. package/dist/context-providers/strategy.d.ts.map +0 -1
  73. package/dist/context-providers/strategy.js +0 -40
  74. package/dist/context-providers/strategy.js.map +0 -1
@@ -3,18 +3,63 @@ import { isJob, isReusableWorkflowJob } from "@actions/workflow-parser/model/typ
3
3
  import { parseFileReference } from "@actions/workflow-parser/workflows/file-reference";
4
4
  import * as vscodeURI from "vscode-uri";
5
5
  import { actionUrl, parseActionReference } from "./action.js";
6
+ import { isActionDocument } from "./utils/document-type.js";
6
7
  import { mapRange } from "./utils/range.js";
7
- import { fetchOrConvertWorkflowTemplate, fetchOrParseWorkflow } from "./utils/workflow-cache.js";
8
+ import { getOrConvertActionTemplate, getOrConvertWorkflowTemplate, getOrParseAction, getOrParseWorkflow } from "./utils/workflow-cache.js";
9
+ /**
10
+ * Generates clickable links for action references and reusable workflows.
11
+ */
8
12
  export async function documentLinks(document, workspace) {
9
13
  const file = {
10
14
  name: document.uri,
11
15
  content: document.getText()
12
16
  };
13
- const parsedWorkflow = fetchOrParseWorkflow(file, document.uri);
17
+ return isActionDocument(document.uri)
18
+ ? actionDocumentLinks(file, document.uri)
19
+ : workflowDocumentLinks(file, document.uri, workspace);
20
+ }
21
+ /**
22
+ * Generates clickable links for action references in action.yml files.
23
+ */
24
+ function actionDocumentLinks(file, uri) {
25
+ const parsedAction = getOrParseAction(file, uri);
26
+ if (!parsedAction?.value) {
27
+ return [];
28
+ }
29
+ const template = getOrConvertActionTemplate(parsedAction.context, parsedAction.value, uri, {
30
+ errorPolicy: ErrorPolicy.TryConversion
31
+ });
32
+ const links = [];
33
+ // Only composite actions have steps
34
+ if (template?.runs?.using !== "composite") {
35
+ return links;
36
+ }
37
+ const steps = template.runs.steps ?? [];
38
+ for (const step of steps) {
39
+ if ("uses" in step) {
40
+ const actionRef = parseActionReference(step.uses.value);
41
+ if (!actionRef) {
42
+ continue;
43
+ }
44
+ const url = actionUrl(actionRef);
45
+ links.push({
46
+ range: mapRange(step.uses.range),
47
+ target: url,
48
+ tooltip: `Open action on GitHub`
49
+ });
50
+ }
51
+ }
52
+ return links;
53
+ }
54
+ /**
55
+ * Generates clickable links for action references and reusable workflows in workflow files.
56
+ */
57
+ async function workflowDocumentLinks(file, uri, workspace) {
58
+ const parsedWorkflow = getOrParseWorkflow(file, uri);
14
59
  if (!parsedWorkflow?.value) {
15
60
  return [];
16
61
  }
17
- const template = await fetchOrConvertWorkflowTemplate(parsedWorkflow.context, parsedWorkflow.value, document.uri, undefined, {
62
+ const template = await getOrConvertWorkflowTemplate(parsedWorkflow.context, parsedWorkflow.value, uri, undefined, {
18
63
  errorPolicy: ErrorPolicy.TryConversion
19
64
  });
20
65
  const links = [];
@@ -1 +1 @@
1
- {"version":3,"file":"document-links.js","sourceRoot":"","sources":["../src/document-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAC,KAAK,EAAE,qBAAqB,EAAC,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAC,kBAAkB,EAAC,MAAM,mDAAmD,CAAC;AAGrF,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,8BAA8B,EAAE,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAE/F,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,QAAsB,EAAE,SAA6B;IACvF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,QAAQ,CAAC,GAAG;QAClB,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE;KAC5B,CAAC;IAEF,MAAM,cAAc,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE;QAC1B,OAAO,EAAE,CAAC;KACX;IAED,MAAM,QAAQ,GAAG,MAAM,8BAA8B,CACnD,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,KAAK,EACpB,QAAQ,CAAC,GAAG,EACZ,SAAS,EACT;QACE,WAAW,EAAE,WAAW,CAAC,aAAa;KACvC,CACF,CAAC;IAEF,MAAM,KAAK,GAAmB,EAAE,CAAC;IAEjC,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE;Q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AS,CAAC;oBACpB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,IAAI,EAAE,GAAG,CAAC,UAAU;oBACpB,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,EAAE,GAAG,CAAC,OAAO;iBACjB,CAAC,CAAC;gBAEH,KAAK,CAAC,IAAI,CAAC;oBACT,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;oBAC9B,MAAM,EAAE,GAAG;oBACX,OAAO,EAAE,kCAAkC;iBAC5C,CAAC,CAAC;aACJ;iBAAM,IAAI,SAAS,EAAE;gBACpB,sDAAsD;gBACtD,0CAA0C;gBAC1C,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAErE,KAAK,CAAC,IAAI,CAAC;oBACT,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;oBAC9B,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;iBAC1B,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC"}
package/dist/hover.d.ts CHANGED
@@ -3,6 +3,7 @@ import { FileProvider } from "@actions/workflow-parser/workflows/file-provider";
3
3
  import { Position, TextDocument } from "vscode-languageserver-textdocument";
4
4
  import { Hover } from "vscode-languageserver-types";
5
5
  import { ContextProviderConfig } from "./context-providers/config.js";
6
+ import { ActionContext } from "./context/action-context.js";
6
7
  import { WorkflowContext } from "./context/workflow-context.js";
7
8
  export type HoverConfig = {
8
9
  descriptionProvider?: DescriptionProvider;
@@ -10,7 +11,10 @@ export type HoverConfig = {
10
11
  fileProvider?: FileProvider;
11
12
  };
12
13
  export type DescriptionProvider = {
13
- getDescription(context: WorkflowContext, token: TemplateToken, path: TemplateToken[]): Promise<string | undefined>;
14
+ getDescription(context: WorkflowContext | ActionContext, token: TemplateToken, path: TemplateToken[]): Promise<string | undefined>;
14
15
  };
16
+ /**
17
+ * Returns hover information for the token at the given position.
18
+ */
15
19
  export declare function hover(document: TextDocument, position: Position, config?: HoverConfig): Promise<Hover | null>;
16
20
  //# sourceMappingURL=hover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../src/hover.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,aAAa,EAAC,MAAM,0DAA0D,CAAC;AAGvF,OAAO,EAAC,YAAY,EAAC,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAGpE,OAAO,EAAqB,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAalF,MAAM,MAAM,WAAW,GAAG;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACpH,CAAC;AAEF,wBAAsB,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAoEnH"}
1
+ {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../src/hover.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,aAAa,EAAC,MAAM,0DAA0D,CAAC;AAGvF,OAAO,EAAC,YAAY,EAAC,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AAGpE,OAAO,EAAC,aAAa,EAAmB,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAqB,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAelF,MAAM,MAAM,WAAW,GAAG;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,CACZ,OAAO,EAAE,eAAe,GAAG,aAAa,EACxC,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,aAAa,EAAE,GACpB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,wBAAsB,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAuGnH"}
package/dist/hover.js CHANGED
@@ -1,70 +1,102 @@
1
1
  import { data, Parser } from "@actions/expressions";
2
2
  import { Lexer } from "@actions/expressions/lexer";
3
+ import { parseAction } from "@actions/workflow-parser/actions/action-parser";
3
4
  import { ErrorPolicy } from "@actions/workflow-parser/model/convert";
4
5
  import { splitAllowedContext } from "@actions/workflow-parser/templates/allowed-context";
5
6
  import { isBasicExpression } from "@actions/workflow-parser/templates/tokens/type-guards";
6
- import { getContext, Mode } from "./context-providers/default.js";
7
+ import { getActionExpressionContext, getWorkflowExpressionContext, Mode } from "./context-providers/default.js";
7
8
  import { getFunctionDescription } from "./context-providers/descriptions.js";
9
+ import { getActionContext } from "./context/action-context.js";
8
10
  import { getWorkflowContext } from "./context/workflow-context.js";
9
11
  import { getReusableWorkflowInputDescription, isReusableWorkflowJobInput } from "./description-providers/reusable-job-inputs.js";
10
12
  import { mapToExpressionPos } from "./expression-hover/expression-pos.js";
11
13
  import { HoverVisitor } from "./expression-hover/visitor.js";
12
14
  import { info } from "./log.js";
15
+ import { nullTrace } from "./nulltrace.js";
16
+ import { isActionDocument } from "./utils/document-type.js";
13
17
  import { isPotentiallyExpression } from "./utils/expression-detection.js";
14
18
  import { findToken } from "./utils/find-token.js";
15
19
  import { mapRange } from "./utils/range.js";
16
- import { fetchOrConvertWorkflowTemplate, fetchOrParseWorkflow } from "./utils/workflow-cache.js";
20
+ import { getOrConvertActionTemplate, getOrConvertWorkflowTemplate, getOrParseWorkflow } from "./utils/workflow-cache.js";
21
+ /**
22
+ * Returns hover information for the token at the given position.
23
+ */
17
24
  export async function hover(document, position, config) {
18
25
  const file = {
19
26
  name: document.uri,
20
27
  content: document.getText()
21
28
  };
22
- const parsedWorkflow = fetchOrParseWorkflow(file, document.uri);
23
- if (!parsedWorkflow?.value) {
29
+ // Determine document type based on file path (action.yml vs workflow file)
30
+ const isAction = isActionDocument(document.uri);
31
+ // Parse document
32
+ const parsedTemplate = isAction ? parseAction(file, nullTrace) : getOrParseWorkflow(file, document.uri);
33
+ if (!parsedTemplate?.value) {
24
34
  return null;
25
35
  }
26
- const template = await fetchOrConvertWorkflowTemplate(parsedWorkflow.context, parsedWorkflow.value, document.uri, config, {
27
- errorPolicy: ErrorPolicy.TryConversion,
28
- fetchReusableWorkflowDepth: config?.fileProvider ? 1 : 0
29
- });
30
- const tokenResult = findToken(position, parsedWorkflow.value);
36
+ // Find the token at the cursor position
37
+ const tokenResult = findToken(position, parsedTemplate.value);
31
38
  const { token, keyToken, parent } = tokenResult;
32
39
  const tokenDefinitionInfo = (keyToken || parent || token)?.definitionInfo;
33
- const workflowContext = getWorkflowContext(document.uri, template, tokenResult.path);
34
- if (token && tokenDefinitionInfo) {
35
- if (isBasicExpression(token) || isPotentiallyExpression(token)) {
36
- info(`Calculating expression hover for token with definition ${tokenDefinitionInfo.definition.key}`);
37
- const allowedContext = tokenDefinitionInfo.allowedContext || [];
38
- const { namedContexts, functions } = splitAllowedContext(allowedContext);
39
- const context = await getContext(namedContexts, config?.contextProviderConfig, workflowContext, Mode.Completion);
40
- for (const func of functions) {
41
- func.description = getFunctionDescription(func.name);
42
- }
43
- const exprPos = mapToExpressionPos(token, position);
44
- if (exprPos) {
45
- return expressionHover(exprPos, context, namedContexts, functions);
46
- }
40
+ // Early exit if there's nothing to provide hover for
41
+ const hoverToken = token || keyToken;
42
+ const isExpressionHover = token && tokenDefinitionInfo && (isBasicExpression(token) || isPotentiallyExpression(token));
43
+ if (!isExpressionHover && !hoverToken?.definition) {
44
+ return null;
45
+ }
46
+ // Build document context (jobs, steps, inputs, etc.) from the parsed template
47
+ const documentContext = isAction
48
+ ? getActionContext(document.uri, getOrConvertActionTemplate(parsedTemplate.context, parsedTemplate.value, document.uri, {
49
+ errorPolicy: ErrorPolicy.TryConversion
50
+ }), tokenResult.path)
51
+ : getWorkflowContext(document.uri, await getOrConvertWorkflowTemplate(parsedTemplate.context, parsedTemplate.value, document.uri, config, {
52
+ errorPolicy: ErrorPolicy.TryConversion,
53
+ fetchReusableWorkflowDepth: config?.fileProvider ? 1 : 0
54
+ }), tokenResult.path);
55
+ // Expression hover
56
+ if (isExpressionHover) {
57
+ info(`Calculating expression hover for token with definition ${tokenDefinitionInfo.definition.key}`);
58
+ const allowedContext = tokenDefinitionInfo.allowedContext || [];
59
+ const { namedContexts, functions } = splitAllowedContext(allowedContext);
60
+ // Build expression context with named contexts (github, env, etc.) and their descriptions
61
+ const expressionContext = isAction
62
+ ? getActionExpressionContext(namedContexts, config?.contextProviderConfig, documentContext, Mode.Hover)
63
+ : await getWorkflowExpressionContext(namedContexts, config?.contextProviderConfig, documentContext, Mode.Hover);
64
+ // Populate function descriptions for hover display
65
+ for (const func of functions) {
66
+ func.description = getFunctionDescription(func.name);
67
+ }
68
+ // Convert document position to expression-relative position
69
+ const exprPos = mapToExpressionPos(token, position);
70
+ if (exprPos) {
71
+ // Find the expression element at the cursor and return its description
72
+ return expressionHover(exprPos, expressionContext, namedContexts, functions);
47
73
  }
48
74
  }
49
- if (!token?.definition) {
75
+ if (!hoverToken?.definition) {
50
76
  return null;
51
77
  }
52
- info(`Calculating hover for token with definition ${token.definition.key}`);
53
- if (tokenResult.parent && isReusableWorkflowJobInput(tokenResult)) {
54
- let description = getReusableWorkflowInputDescription(workflowContext, tokenResult);
55
- description = appendContext(description, token.definitionInfo?.allowedContext);
56
- return {
57
- contents: description,
58
- range: mapRange(token.range)
59
- };
78
+ // Non-expression hover: show the schema description for the YAML key or value
79
+ info(`Calculating hover for token with definition ${hoverToken.definition.key}`);
80
+ let description;
81
+ if (!isAction && tokenResult.parent && isReusableWorkflowJobInput(tokenResult)) {
82
+ // Reusable workflow call: fetch the called workflow's input descriptions
83
+ description = getReusableWorkflowInputDescription(documentContext, tokenResult);
84
+ }
85
+ else {
86
+ // Default: use custom provider or token's schema description
87
+ description =
88
+ (await getDescription(config, documentContext, hoverToken, tokenResult.path)) || hoverToken.description || "";
60
89
  }
61
- let description = await getDescription(config, workflowContext, token, tokenResult.path);
62
- description = appendContext(description, token.definitionInfo?.allowedContext);
90
+ // Return hover with description and available expression contexts
63
91
  return {
64
- contents: description,
65
- range: mapRange(token.range)
92
+ contents: appendContext(description, hoverToken.definitionInfo?.allowedContext),
93
+ range: mapRange(hoverToken.range)
66
94
  };
67
95
  }
96
+ /**
97
+ * Appends available expression contexts and functions to a hover description.
98
+ * For example: "Available expression contexts: `github`, `env`"
99
+ */
68
100
  function appendContext(description, allowedContext) {
69
101
  if (!allowedContext || allowedContext.length == 0) {
70
102
  return description;
@@ -85,15 +117,21 @@ function appendContext(description, allowedContext) {
85
117
  }
86
118
  return `${description}${namedContextsString}${functionsString}`;
87
119
  }
88
- async function getDescription(config, workflowContext, token, path) {
89
- const defaultDescription = token.description || "";
120
+ /**
121
+ * Gets a custom description from the configured description provider.
122
+ * Used to fetch rich descriptions like action input docs from GitHub repos.
123
+ */
124
+ async function getDescription(config, documentContext, token, path) {
90
125
  if (!config?.descriptionProvider) {
91
- return defaultDescription;
126
+ return undefined;
92
127
  }
93
- const description = await config.descriptionProvider.getDescription(workflowContext, token, path);
94
- return description || defaultDescription;
128
+ return await config.descriptionProvider.getDescription(documentContext, token, path);
95
129
  }
96
- function expressionHover(exprPos, context, namedContexts, functions) {
130
+ /**
131
+ * Parses an expression and finds the element at the cursor position to show its description.
132
+ * For example, hovering over `github.actor` shows "The login of the user that triggered the workflow".
133
+ */
134
+ function expressionHover(exprPos, expressionContext, namedContexts, functions) {
97
135
  const { expression, position, documentRange } = exprPos;
98
136
  try {
99
137
  const l = new Lexer(expression);
@@ -107,7 +145,7 @@ function expressionHover(exprPos, context, namedContexts, functions) {
107
145
  call: () => new data.Null()
108
146
  });
109
147
  }
110
- const hv = new HoverVisitor(position, context, functionMap);
148
+ const hv = new HoverVisitor(position, expressionContext, functionMap);
111
149
  const hoverResult = hv.hover(expr);
112
150
  if (!hoverResult) {
113
151
  return null;
package/dist/hover.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hover.js","sourceRoot":"","sources":["../src/hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAyB,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAC,KAAK,EAAC,MAAM,4BAA4B,CAAC;AACjD,OAAO,EAAC,WAAW,EAAC,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAC,mBAAmB,EAAC,MAAM,oDAAoD,CAAC;AAEvF,OAAO,EAAC,iBAAiB,EAAC,MAAM,uDAAuD,CAAC;AAMxF,OAAO,EAAC,UAAU,EAAE,IA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hints.d.ts","sourceRoot":"","sources":["../src/inlay-hints.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAC,SAAS,EAAgB,MAAM,6BAA6B,CAAC;AAGrE;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,EAAE,CAuCjE"}
1
+ {"version":3,"file":"inlay-hints.d.ts","sourceRoot":"","sources":["../src/inlay-hints.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAC,SAAS,EAAgB,MAAM,6BAA6B,CAAC;AAIrE;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,EAAE,CA4CjE"}
@@ -2,7 +2,8 @@ import { isString } from "@actions/workflow-parser";
2
2
  import { getCronDescription } from "@actions/workflow-parser/model/converter/cron";
3
3
  import { TemplateToken } from "@actions/workflow-parser/templates/tokens/template-token";
4
4
  import { InlayHintKind } from "vscode-languageserver-types";
5
- import { fetchOrParseWorkflow } from "./utils/workflow-cache.js";
5
+ import { isActionDocument } from "./utils/document-type.js";
6
+ import { getOrParseWorkflow } from "./utils/workflow-cache.js";
6
7
  /**
7
8
  * Returns inlay hints for a workflow document.
8
9
  * Currently supports cron expressions, showing a human-readable description
@@ -12,11 +13,15 @@ import { fetchOrParseWorkflow } from "./utils/workflow-cache.js";
12
13
  * @returns Array of inlay hints
13
14
  */
14
15
  export function getInlayHints(document) {
16
+ // Inlay hints are only supported for workflow files (cron expressions)
17
+ if (isActionDocument(document.uri)) {
18
+ return [];
19
+ }
15
20
  const file = {
16
21
  name: document.uri,
17
22
  content: document.getText()
18
23
  };
19
- const result = fetchOrParseWorkflow(file, document.uri);
24
+ const result = getOrParseWorkflow(file, document.uri);
20
25
  if (!result?.value) {
21
26
  return [];
22
27
  }
@@ -1 +1 @@
1
- {"version":3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AK,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACvE,MAAM,eAAe,GAAG,GAAG,IAAI,MAAM,IAAI,KAAK,CAAC;QAC/C,MAAM,oBAAoB,GAAG,eAAe,CAAC,UAAU,CAAC;QAExD,gCAAgC;QAChC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,IAAI,oBAAoB,EAAE,GAAG,KAAK,cAAc,EAAE;YAClF,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;YAC9B,MAAM,WAAW,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;YAElD,IAAI,WAAW,EAAE;gBACf,iDAAiD;gBACjD,KAAK,CAAC,IAAI,CAAC;oBACT,QAAQ,EAAE;wBACR,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;wBAC9B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,kCAAkC;qBACzE;oBACD,KAAK,EAAE,KAAK,WAAW,EAAE;oBACzB,IAAI,EAAE,aAAa,CAAC,SAAS;oBAC7B,WAAW,EAAE,IAAI;iBAClB,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Document type detection for workflow and action files.
3
+ * Detection is based on file path/name only - content heuristics are not used
4
+ * because files in non-standard locations wouldn't work as workflows/actions anyway.
5
+ */
6
+ export type DocumentType = "workflow" | "action" | "unknown";
7
+ /**
8
+ * Detects whether a document is a workflow file, action file, or unknown based on its URI.
9
+ *
10
+ * @param uri The document URI or file path
11
+ * @returns The detected document type
12
+ */
13
+ export declare function detectDocumentType(uri: string): DocumentType;
14
+ /**
15
+ * Check if a document is an action file
16
+ */
17
+ export declare function isActionDocument(uri: string): boolean;
18
+ /**
19
+ * Check if a document is a workflow file
20
+ */
21
+ export declare function isWorkflowDocument(uri: string): boolean;
22
+ //# sourceMappingURL=document-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type.d.ts","sourceRoot":"","sources":["../../src/utils/document-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAmB5D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Document type detection for workflow and action files.
3
+ * Detection is based on file path/name only - content heuristics are not used
4
+ * because files in non-standard locations wouldn't work as workflows/actions anyway.
5
+ */
6
+ /**
7
+ * Detects whether a document is a workflow file, action file, or unknown based on its URI.
8
+ *
9
+ * @param uri The document URI or file path
10
+ * @returns The detected document type
11
+ */
12
+ export function detectDocumentType(uri) {
13
+ // Normalize path separators
14
+ const normalizedUri = uri.replace(/\\/g, "/");
15
+ // Check for workflow file patterns FIRST (more specific path takes precedence)
16
+ // Matches: .github/workflows/*.yml or .github/workflows/*.yaml
17
+ // Also matches: .github/workflows-lab/*.yml or .github/workflows-lab/*.yaml
18
+ // This ensures .github/workflows/action.yml is treated as a workflow, not an action
19
+ if (/\.github\/workflows(-lab)?\/[^/]+\.ya?ml$/i.test(normalizedUri)) {
20
+ return "workflow";
21
+ }
22
+ // Check for action.yml/action.yaml patterns
23
+ // Matches: action.yml, action.yaml, .github/actions/my-action/action.yml, etc.
24
+ if (/\/action\.ya?ml$/i.test(normalizedUri) || /^action\.ya?ml$/i.test(normalizedUri)) {
25
+ return "action";
26
+ }
27
+ return "unknown";
28
+ }
29
+ /**
30
+ * Check if a document is an action file
31
+ */
32
+ export function isActionDocument(uri) {
33
+ return detectDocumentType(uri) === "action";
34
+ }
35
+ /**
36
+ * Check if a document is a workflow file
37
+ */
38
+ export function isWorkflowDocument(uri) {
39
+ return detectDocumentType(uri) === "workflow";
40
+ }
41
+ //# sourceMappingURL=document-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type.js","sourceRoot":"","sources":["../../src/utils/document-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,4BAA4B;IAC5B,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE9C,+EAA+E;IAC/E,+DAA+D;IAC/D,4EAA4E;IAC5E,oFAAoF;IACpF,IAAI,4CAA4C,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QACpE,OAAO,UAAU,CAAC;KACnB;IAED,4CAA4C;IAC5C,+EAA+E;IAC/E,IAAI,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;QACrF,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,OAAO,kBAAkB,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,kBAAkB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC;AAChD,CAAC"}
@@ -1,6 +1,24 @@
1
1
  import { StringToken } from "@actions/workflow-parser/templates/tokens/string-token";
2
2
  import { TemplateToken } from "@actions/workflow-parser/templates/tokens/template-token";
3
3
  import { Position, TextDocument } from "vscode-languageserver-textdocument";
4
+ /**
5
+ * Transforms a document to make it valid YAML so the parser can understand
6
+ * the cursor position during auto-completion.
7
+ *
8
+ * When typing in an IDE, the document is usually invalid YAML:
9
+ * - `runs-on` without `:` isn't a valid key
10
+ * - Empty lines don't parse as anything
11
+ * - `- ` without a value isn't complete
12
+ *
13
+ * This function inserts placeholders to make the document parseable:
14
+ * - Empty line → inserts `key:` placeholder
15
+ * - Line without colon → appends `:`
16
+ * - Sequence item `- ` → inserts `key` after the dash
17
+ *
18
+ * Lines containing `${{` are skipped to avoid breaking multi-line strings.
19
+ *
20
+ * The `isPlaceholder()` helper filters out the fake entries from completions.
21
+ */
4
22
  export declare function transform(doc: TextDocument, pos: Position): [TextDocument, Position];
5
23
  export declare function isPlaceholder(key: StringToken, value: TemplateToken): boolean;
6
24
  //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/utils/transform.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAC,aAAa,EAAC,MAAM,0DAA0D,CAAC;AACvF,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAO1E,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAkEpF;AAGD,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,WAMnE"}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/utils/transform.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,wDAAwD,CAAC;AACnF,OAAO,EAAC,aAAa,EAAC,MAAM,0DAA0D,CAAC;AACvF,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAK1E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAkEpF;AAGD,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,WAMnE"}
@@ -1,8 +1,24 @@
1
1
  import { isString } from "@actions/workflow-parser";
2
2
  import { TextDocument } from "vscode-languageserver-textdocument";
3
3
  const PLACEHOLDER_KEY = "key";
4
- // Transform a document to work around YAML parsing issues
5
- // Based on `_transform` in https://github.com/cschleiden/github-actions-parser/blob/main/src/lib/parser/complete.ts#L311
4
+ /**
5
+ * Transforms a document to make it valid YAML so the parser can understand
6
+ * the cursor position during auto-completion.
7
+ *
8
+ * When typing in an IDE, the document is usually invalid YAML:
9
+ * - `runs-on` without `:` isn't a valid key
10
+ * - Empty lines don't parse as anything
11
+ * - `- ` without a value isn't complete
12
+ *
13
+ * This function inserts placeholders to make the document parseable:
14
+ * - Empty line → inserts `key:` placeholder
15
+ * - Line without colon → appends `:`
16
+ * - Sequence item `- ` → inserts `key` after the dash
17
+ *
18
+ * Lines containing `${{` are skipped to avoid breaking multi-line strings.
19
+ *
20
+ * The `isPlaceholder()` helper filters out the fake entries from completions.
21
+ */
6
22
  export function transform(doc, pos) {
7
23
  let offset = doc.offsetAt(pos);
8
24
  const lineRange = {
@@ -1 +1 @@
1
- {"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/utils/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAAW,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAG1E,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,0DAA0D;AAC1D,yHAAyH;AACzH,MAAM,UAAU,SAAS,CAAC,GAAiB,EAAE,GAAa;IACxD,IAAI,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAE/B,MAAM,SAAS,GA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C,EAAE;gBAC9C,MAAM,GAAG,GAAG,CAAC;gBACb,MAAM,EAAE,CAAC;aACV;YAED,IAAI;gBACF,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC;oBAC1B,MAAM;oBACN,eAAe;oBACf,CAAC,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;oBAChC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAE1B,sEAAsE;YACtE,MAAM,EAAE,CAAC;SACV;aAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACvC,yBAAyB;YACzB,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;SACnB;KACF;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAExF,YAAY,CAAC,MAAM,CACjB,MAAM,EACN;QACE;YACE,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,IAAI;SACX;KACF,EACD,MAAM,CAAC,OAAO,GAAG,CAAC,CACnB,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,aAAa,CAAC,GAAgB,EAAE,KAAoB;IAClE,IAAI,GAAG,CAAC,KAAK,KAAK,eAAe,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;QACzE,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,4 +1,5 @@
1
- import { ParseWorkflowResult, WorkflowTemplate } from "@actions/workflow-parser";
1
+ import { TemplateParseResult, WorkflowTemplate } from "@actions/workflow-parser";
2
+ import { ActionTemplate, ActionTemplateConverterOptions } from "@actions/workflow-parser/actions/action-template";
2
3
  import { WorkflowTemplateConverterOptions } from "@actions/workflow-parser/model/convert";
3
4
  import { TemplateContext } from "@actions/workflow-parser/templates/template-context";
4
5
  import { TemplateToken } from "@actions/workflow-parser/templates/tokens/template-token";
@@ -7,15 +8,27 @@ import { CompletionConfig } from "../complete.js";
7
8
  export declare function clearCacheEntry(uri: string): void;
8
9
  export declare function clearCache(): void;
9
10
  /**
10
- * Parses a workflow file and caches the result
11
+ * Parses a workflow file, returning cached result if available
11
12
  * @param transformed Indicates whether the workflow has been transformed before parsing
12
- * @returns the {@link ParseWorkflowResult}
13
+ * @returns the {@link TemplateParseResult}
13
14
  */
14
- export declare function fetchOrParseWorkflow(file: File, uri: string, transformed?: boolean): ParseWorkflowResult;
15
+ export declare function getOrParseWorkflow(file: File, uri: string, transformed?: boolean): TemplateParseResult;
15
16
  /**
16
- * Converts a workflow template and caches the result
17
+ * Parses an action file, returning cached result if available
18
+ * @param transformed Indicates whether the action has been transformed before parsing
19
+ * @returns the {@link TemplateParseResult}
20
+ */
21
+ export declare function getOrParseAction(file: File, uri: string, transformed?: boolean): TemplateParseResult;
22
+ /**
23
+ * Converts a workflow template, returning cached result if available
17
24
  * @param transformed Indicates whether the workflow has been transformed before parsing
18
25
  * @returns the converted {@link WorkflowTemplate}
19
26
  */
20
- export declare function fetchOrConvertWorkflowTemplate(context: TemplateContext, template: TemplateToken, uri: string, config?: CompletionConfig, options?: WorkflowTemplateConverterOptions, transformed?: boolean): Promise<WorkflowTemplate>;
27
+ export declare function getOrConvertWorkflowTemplate(context: TemplateContext, template: TemplateToken, uri: string, config?: CompletionConfig, options?: WorkflowTemplateConverterOptions, transformed?: boolean): Promise<WorkflowTemplate>;
28
+ /**
29
+ * Converts an action template, returning cached result if available
30
+ * @param transformed Indicates whether the action has been transformed before parsing
31
+ * @returns the converted {@link ActionTemplate}
32
+ */
33
+ export declare function getOrConvertActionTemplate(context: TemplateContext, template: TemplateToken, uri: string, options?: ActionTemplateConverterOptions, transformed?: boolean): ActionTemplate;
21
34
  //# sourceMappingURL=workflow-cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-cache.d.ts","sourceRoot":"","sources":["../../src/utils/workflow-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AACvH,OAAO,EAAC,gCAAgC,EAAC,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAC,eAAe,EAAC,MAAM,qDAAqD,CAAC;AACpF,OAAO,EAAC,aAAa,EAAC,MAAM,0DAA0D,CAAC;AACvF,OAAO,EAAC,IAAI,EAAC,MAAM,yCAAyC,CAAC;AAE7D,OAAO,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAMhD,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,QAK1C;AAED,wBAAgB,UAAU,SAGzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,mBAAmB,CAStG;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,aAAa,EACvB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,gCAAgC,EAC1C,WAAW,UAAQ,GAClB,OAAO,CAAC,gBAAgB,CAAC,CAS3B"}
1
+ {"version":3,"file":"workflow-cache.d.ts","sourceRoot":"","sources":["../../src/utils/workflow-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAEvH,OAAO,EACL,cAAc,EACd,8BAA8B,EAE/B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAC,gCAAgC,EAAC,MAAM,wCAAwC,CAAC;AACxF,OAA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