Skip to content

Commit 3267b00

Browse files
committed
fix: missing dsl definitions
1 parent 2d0049f commit 3267b00

2 files changed

Lines changed: 266 additions & 20 deletions

File tree

  • web/landing
    • assets/codemirror/completions
    • tests/Flow/Website/Tests/Fixtures/Completers

web/landing/assets/codemirror/completions/dsl.js

Lines changed: 133 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* CodeMirror Completer for Flow PHP DSL Functions
33
*
4-
* Total functions: 699
4+
* Total functions: 706
55
*
66
* This completer provides autocompletion for all Flow PHP DSL functions:
77
* - Extractors (flow-extractors)
@@ -1298,6 +1298,21 @@ const dslFunctions = [
12981298
},
12991299
apply: snippet("\\Flow\\ETL\\DSL\\chunks_from(" + "$" + "{" + "1:extractor" + "}" + ", " + "$" + "{" + "2:chunk_size" + "}" + ")"),
13001300
boost: 10
1301+
}, {
1302+
label: "clock",
1303+
type: "function",
1304+
detail: "flow\u002Ddsl\u002Dhelpers",
1305+
info: () => {
1306+
const div = document.createElement("div")
1307+
div.innerHTML = `
1308+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1309+
<span class=\"fn-name\">clock</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">string</span> <span class=\"fn-param\">$time_zone</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">&#039;UTC&#039;</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ClockInterface</span>
1310+
</div>
1311+
`
1312+
return div
1313+
},
1314+
apply: snippet("\\Flow\\ETL\\DSL\\clock(" + "$" + "{" + "1:time_zone" + "}" + ")"),
1315+
boost: 10
13011316
}, {
13021317
label: "close_cursor",
13031318
type: "function",
@@ -1891,15 +1906,51 @@ const dslFunctions = [
18911906
const div = document.createElement("div")
18921907
div.innerHTML = `
18931908
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1894-
<span class=\"fn-name\">console_log_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">,</span> <span class=\"fn-type\">int</span> <span class=\"fn-param\">$maxBodyLength</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">100</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleLogExporter</span>
1909+
<span class=\"fn-name\">console_log_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">,</span> <span class=\"fn-type\">int</span> <span class=\"fn-param\">$maxBodyLength</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">100</span><span class=\"fn-operator\">,</span> <span class=\"fn-type\">ConsoleLogOptions</span> <span class=\"fn-param\">$options</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">Flow\\Telemetry\\Provider\\Console\\ConsoleLogOptions::...</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleLogExporter</span>
1910+
</div>
1911+
<div style="color: #8b949e; font-size: 13px;">
1912+
Create a ConsoleLogExporter.<br>Outputs log records to the console with severity-based coloring.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)<br>@param null|int $maxBodyLength Maximum length for body+attributes column (null = no limit, default: 100)<br>@param ConsoleLogOptions $options Display options for the exporter
1913+
</div>
1914+
`
1915+
return div
1916+
},
1917+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_log_exporter(" + "$" + "{" + "1:colors" + "}" + ", " + "$" + "{" + "2:maxBodyLength" + "}" + ", " + "$" + "{" + "3:options" + "}" + ")"),
1918+
boost: 10
1919+
}, {
1920+
label: "console_log_options",
1921+
type: "function",
1922+
detail: "flow\u002Ddsl\u002Dhelpers",
1923+
info: () => {
1924+
const div = document.createElement("div")
1925+
div.innerHTML = `
1926+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1927+
<span class=\"fn-name\">console_log_options</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleLogOptions</span>
1928+
</div>
1929+
<div style="color: #8b949e; font-size: 13px;">
1930+
Create ConsoleLogOptions with all display options enabled (default behavior).
1931+
</div>
1932+
`
1933+
return div
1934+
},
1935+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_log_options()"),
1936+
boost: 10
1937+
}, {
1938+
label: "console_log_options_minimal",
1939+
type: "function",
1940+
detail: "flow\u002Ddsl\u002Dhelpers",
1941+
info: () => {
1942+
const div = document.createElement("div")
1943+
div.innerHTML = `
1944+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1945+
<span class=\"fn-name\">console_log_options_minimal</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleLogOptions</span>
18951946
</div>
18961947
<div style="color: #8b949e; font-size: 13px;">
1897-
Create a ConsoleLogExporter.<br>Outputs log records to the console with severity-based coloring.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)<br>@param null|int $maxBodyLength Maximum length for body+attributes column (null = no limit, default: 100)
1948+
Create ConsoleLogOptions with minimal display (legacy compact format).
18981949
</div>
18991950
`
19001951
return div
19011952
},
1902-
apply: snippet("\\Flow\\Telemetry\\DSL\\console_log_exporter(" + "$" + "{" + "1:colors" + "}" + ", " + "$" + "{" + "2:maxBodyLength" + "}" + ")"),
1953+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_log_options_minimal()"),
19031954
boost: 10
19041955
}, {
19051956
label: "console_metric_exporter",
@@ -1909,15 +1960,51 @@ const dslFunctions = [
19091960
const div = document.createElement("div")
19101961
div.innerHTML = `
19111962
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1912-
<span class=\"fn-name\">console_metric_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleMetricExporter</span>
1963+
<span class=\"fn-name\">console_metric_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">,</span> <span class=\"fn-type\">ConsoleMetricOptions</span> <span class=\"fn-param\">$options</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">Flow\\Telemetry\\Provider\\Console\\ConsoleMetricOptions::...</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleMetricExporter</span>
1964+
</div>
1965+
<div style="color: #8b949e; font-size: 13px;">
1966+
Create a ConsoleMetricExporter.<br>Outputs metrics to the console with ASCII table formatting.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)<br>@param ConsoleMetricOptions $options Display options for the exporter
1967+
</div>
1968+
`
1969+
return div
1970+
},
1971+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_metric_exporter(" + "$" + "{" + "1:colors" + "}" + ", " + "$" + "{" + "2:options" + "}" + ")"),
1972+
boost: 10
1973+
}, {
1974+
label: "console_metric_options",
1975+
type: "function",
1976+
detail: "flow\u002Ddsl\u002Dhelpers",
1977+
info: () => {
1978+
const div = document.createElement("div")
1979+
div.innerHTML = `
1980+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1981+
<span class=\"fn-name\">console_metric_options</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleMetricOptions</span>
1982+
</div>
1983+
<div style="color: #8b949e; font-size: 13px;">
1984+
Create ConsoleMetricOptions with all display options enabled (default behavior).
1985+
</div>
1986+
`
1987+
return div
1988+
},
1989+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_metric_options()"),
1990+
boost: 10
1991+
}, {
1992+
label: "console_metric_options_minimal",
1993+
type: "function",
1994+
detail: "flow\u002Ddsl\u002Dhelpers",
1995+
info: () => {
1996+
const div = document.createElement("div")
1997+
div.innerHTML = `
1998+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1999+
<span class=\"fn-name\">console_metric_options_minimal</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleMetricOptions</span>
19132000
</div>
19142001
<div style="color: #8b949e; font-size: 13px;">
1915-
Create a ConsoleMetricExporter.<br>Outputs metrics to the console with ASCII table formatting.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)
2002+
Create ConsoleMetricOptions with minimal display (legacy compact format).
19162003
</div>
19172004
`
19182005
return div
19192006
},
1920-
apply: snippet("\\Flow\\Telemetry\\DSL\\console_metric_exporter(" + "$" + "{" + "1:colors" + "}" + ")"),
2007+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_metric_options_minimal()"),
19212008
boost: 10
19222009
}, {
19232010
label: "console_span_exporter",
@@ -1927,15 +2014,51 @@ const dslFunctions = [
19272014
const div = document.createElement("div")
19282015
div.innerHTML = `
19292016
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
1930-
<span class=\"fn-name\">console_span_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleSpanExporter</span>
2017+
<span class=\"fn-name\">console_span_exporter</span><span class=\"fn-operator\">(</span><span class=\"fn-type\">bool</span> <span class=\"fn-param\">$colors</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">true</span><span class=\"fn-operator\">,</span> <span class=\"fn-type\">ConsoleSpanOptions</span> <span class=\"fn-param\">$options</span> <span class=\"fn-operator\">=</span> <span class=\"fn-default\">Flow\\Telemetry\\Provider\\Console\\ConsoleSpanOptions::...</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleSpanExporter</span>
2018+
</div>
2019+
<div style="color: #8b949e; font-size: 13px;">
2020+
Create a ConsoleSpanExporter.<br>Outputs spans to the console with ASCII table formatting.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)<br>@param ConsoleSpanOptions $options Display options for the exporter
2021+
</div>
2022+
`
2023+
return div
2024+
},
2025+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_span_exporter(" + "$" + "{" + "1:colors" + "}" + ", " + "$" + "{" + "2:options" + "}" + ")"),
2026+
boost: 10
2027+
}, {
2028+
label: "console_span_options",
2029+
type: "function",
2030+
detail: "flow\u002Ddsl\u002Dhelpers",
2031+
info: () => {
2032+
const div = document.createElement("div")
2033+
div.innerHTML = `
2034+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
2035+
<span class=\"fn-name\">console_span_options</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleSpanOptions</span>
2036+
</div>
2037+
<div style="color: #8b949e; font-size: 13px;">
2038+
Create ConsoleSpanOptions with all display options enabled (default behavior).
2039+
</div>
2040+
`
2041+
return div
2042+
},
2043+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_span_options()"),
2044+
boost: 10
2045+
}, {
2046+
label: "console_span_options_minimal",
2047+
type: "function",
2048+
detail: "flow\u002Ddsl\u002Dhelpers",
2049+
info: () => {
2050+
const div = document.createElement("div")
2051+
div.innerHTML = `
2052+
<div style="font-family: 'Fira Code', 'JetBrains Mono', monospace; margin-bottom: 8px;">
2053+
<span class=\"fn-name\">console_span_options_minimal</span><span class=\"fn-operator\">(</span><span class=\"fn-operator\">)</span> <span class=\"fn-operator\">:</span> <span class=\"fn-return\">ConsoleSpanOptions</span>
19312054
</div>
19322055
<div style="color: #8b949e; font-size: 13px;">
1933-
Create a ConsoleSpanExporter.<br>Outputs spans to the console with ASCII table formatting.<br>Useful for debugging and development.<br>@param bool $colors Whether to use ANSI colors (default: true)
2056+
Create ConsoleSpanOptions with minimal display (legacy compact format).
19342057
</div>
19352058
`
19362059
return div
19372060
},
1938-
apply: snippet("\\Flow\\Telemetry\\DSL\\console_span_exporter(" + "$" + "{" + "1:colors" + "}" + ")"),
2061+
apply: snippet("\\Flow\\Telemetry\\DSL\\console_span_options_minimal()"),
19392062
boost: 10
19402063
}, {
19412064
label: "constraint_sorted_by",

0 commit comments

Comments
 (0)