Skip to content

Commit 3069086

Browse files
authored
Merge branch 'main' into updatecli_main_bfbda0570cfbf1ebee5ba4801497a4b00fe1289653863b5c09f26db4b8c67c6e
2 parents bef3cee + 72314a0 commit 3069086

File tree

22 files changed

+794
-93
lines changed

22 files changed

+794
-93
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ updates:
1212
- package-ecosystem: npm
1313
directories:
1414
- '**/*'
15+
cooldown:
16+
default-days: 14
1517
schedule:
1618
interval: 'weekly'
1719
day: 'monday'

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ jobs:
5555
- name: Install dependencies
5656
run: npm ci
5757

58+
## https://semgrep.dev/blog/2025/security-advisory-npm-packages-using-secret-scanning-tools-to-steal-credentials/
59+
- name: Check shai-hulud attack
60+
run: |
61+
if find . -type f -name "*.js" -exec sha256sum {} \; | grep -q "46faab8ab153fae6e80e7cca38eab363075bb524edd79e42269217a083628f09"; then
62+
echo "Vulnerable version of serialize-javascript found in:"
63+
find . -type f -name "*.js" -exec sha256sum {} \; | grep "46faab8ab153fae6e80e7cca38eab363075bb524edd79e42269217a083628f09" | awk '{print $2}'
64+
exit 1
65+
fi
5866
- name: Lint
5967
run: npm run lint
6068

Directory.Packages.props

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,32 @@
55
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
89
</PropertyGroup>
910
<ItemGroup>
1011
<GlobalPackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
1112
</ItemGroup>
1213
<!-- AWS -->
1314
<ItemGroup>
1415
<PackageVersion Include="Amazon.Lambda.AspNetCoreServer.Hosting" Version="1.9.0" />
15-
<PackageVersion Include="Amazon.Lambda.RuntimeSupport" Version="1.13.0" />
16-
<PackageVersion Include="Amazon.Lambda.Core" Version="2.5.1" />
16+
<PackageVersion Include="Amazon.Lambda.RuntimeSupport" Version="1.13.1" />
17+
<PackageVersion Include="Amazon.Lambda.Core" Version="2.7.0" />
1718
<PackageVersion Include="Amazon.Lambda.S3Events" Version="3.1.0" />
1819
<PackageVersion Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4" />
1920
<PackageVersion Include="Amazon.Lambda.SQSEvents" Version="2.2.0" />
20-
<PackageVersion Include="Aspire.Hosting" Version="9.4.0" />
21-
<PackageVersion Include="Aspire.Hosting.Testing" Version="9.4.0" />
21+
<PackageVersion Include="Aspire.Hosting" Version="9.4.2" />
22+
<PackageVersion Include="Aspire.Hosting.Testing" Version="9.4.2" />
2223
<PackageVersion Include="AWSSDK.Core" Version="4.0.0.2" />
2324
<PackageVersion Include="AWSSDK.SQS" Version="4.0.0.1" />
2425
<PackageVersion Include="AWSSDK.S3" Version="4.0.0.1" />
26+
<PackageVersion Include="KubernetesClient" Version="17.0.14" />
2527
<PackageVersion Include="Elastic.Aspire.Hosting.Elasticsearch" Version="9.3.0" />
2628
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="9.1.4" />
2729
<PackageVersion Include="FakeItEasy" Version="8.3.0" />
2830
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.14.0" />
2931
<PackageVersion Include="InMemoryLogger" Version="1.0.66" />
3032
<PackageVersion Include="MartinCostello.Logging.XUnit.v3" Version="0.6.0" />
31-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />
33+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
3234
<PackageVersion Include="Microsoft.OpenApi" Version="2.0.0-preview9" />
3335
<PackageVersion Include="System.Text.Json" Version="9.0.5" />
3436
<PackageVersion Include="TUnit" Version="0.25.21" />
@@ -61,7 +63,7 @@
6163
<PackageVersion Include="Slugify.Core" Version="4.0.1" />
6264
<PackageVersion Include="SoftCircuits.IniFileParser" Version="2.7.0" />
6365
<PackageVersion Include="System.IO.Abstractions" Version="22.0.16" />
64-
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.4" />
66+
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.7" />
6567
<PackageVersion Include="Utf8StreamReader" Version="1.3.2" />
6668
<PackageVersion Include="Vecc.YamlDotNet.Analyzers.StaticGenerator" Version="16.1.3" PrivateAssets="All" />
6769
<PackageVersion Include="Westwind.AspNetCore.LiveReload" Version="0.5.2" />
@@ -79,7 +81,7 @@
7981
</ItemGroup>
8082
<!-- Test packages -->
8183
<ItemGroup>
82-
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.4.0" />
84+
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.4.2" />
8385
<PackageVersion Include="AngleSharp.Diffing" Version="1.0.0" />
8486
<PackageVersion Include="DiffPlex" Version="1.7.2" />
8587
<PackageVersion Include="FluentAssertions" Version="7.2.0" />
@@ -95,4 +97,4 @@
9597
</PackageVersion>
9698
<PackageVersion Include="xunit.v3" Version="2.0.2" />
9799
</ItemGroup>
98-
</Project>
100+
</Project>

NOTICE.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,5 +555,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
555555
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
556556
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
557557
SOFTWARE.
558-
559-

config/assembler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ environments:
3030
feature_flags:
3131
LAZY_LOAD_NAVIGATION: true
3232
SEARCH_OR_ASK_AI: true
33+
STAGING_ELASTIC_NAV: true
3334
dev:
3435
uri: http://localhost:4000
3536
content_source: current

docs/contribute/redirects.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ For API redirects, consult with the documentation engineering team on Slack (#el
1616

1717
For elastic.co/guide redirects, open a [web team request](http://ela.st/web-request).
1818

19+
## Add a redirect
20+
21+
To successfully implement a redirect:
22+
23+
1. Locate and open the `redirects.yml` file to edit.
24+
- Each docs repository powered by Docs V3 can have its own `redirects.yml` file. You must only edit the one in the repository that you're moving or removing files from.
25+
- It is at the same location as the `docset.yml` file. Depending on the repository, this is generally at the root or within the `/docs` folder of the repository.
26+
27+
:::{note}
28+
Some repositories might not yet have a `redirects.yml` file. In this case, create one next to the repo's `docset.yml` file. Refer to [](#file-location).
29+
:::
30+
31+
2. Edit the file. Refer to [](#syntax) to get details on the expected syntax.
32+
- All paths must be relative to the `redirects.yml` file.
33+
- You may need to adjust the syntax based on how you'd like to treat anchors within redirected files. Find examples in [](#syntax).
34+
35+
3. Fix all existing links to the moved or removed file within the repository where you're adding the redirect, by updating them to the new correct target, or by removing them if necessary. This is a best practice to keep our content healthy, and mandatory for your PR to pass CI checks.
36+
37+
4. Create a PR with all of the changes made through the previous steps.
38+
39+
CI checks run to validate the newly added redirect and the docs build.
40+
If you get validation errors about the redirect, double check that your changes follow all the steps in this procedure. If the errors persist after a writer reviewed the PR, ask @elastic/docs-engineering for assistance.
41+
1942
## Validation
2043

2144
Running `docs-builder diff validate` will give you feedback on whether all necessary redirect rules are in place after your changes. It will also run on pull requests.

docs/syntax/code.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,6 @@ project:
267267

268268
### Console code blocks
269269

270-
:::{note}
271-
This feature is still being developed.
272-
:::
273-
274270
We document a lot of API endpoints at Elastic. For these endpoints, we support `console` as a language. The term console relates to the dev console in kibana which users can link to directly from these code snippets.
275271

276272
In a console code block, the first line is highlighted as a dev console string and the remainder as json:
@@ -309,6 +305,54 @@ GET /mydocuments/_search
309305

310306
::::
311307

308+
Console code blocks now support multiple API calls within a single code block. When you have multiple console commands, they are displayed as separate sections within the same block with proper visual separation:
309+
310+
::::{tab-set}
311+
312+
:::{tab-item} Output
313+
314+
```console
315+
GET /mydocuments/_search
316+
{
317+
"from": 1,
318+
"query": {
319+
"match_all" {}
320+
}
321+
}
322+
323+
POST /mydocuments/_doc
324+
{
325+
"title": "New Document",
326+
"content": "This is a sample document"
327+
}
328+
```
329+
330+
:::
331+
332+
:::{tab-item} Markdown
333+
334+
````markdown
335+
```console
336+
GET /mydocuments/_search
337+
{
338+
"from": 1,
339+
"query": {
340+
"match_all" {}
341+
}
342+
}
343+
344+
POST /mydocuments/_doc
345+
{
346+
"title": "New Document",
347+
"content": "This is a sample document"
348+
}
349+
```
350+
````
351+
352+
:::
353+
354+
::::
355+
312356
### Code block substitutions
313357

314358
You can use substitutions to insert reusable values into your code block examples.

docs/testing/index.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,70 @@ The files in this directory are used for testing purposes. Do not edit these fil
3131
"key": "value"
3232
}
3333
```
34+
35+
```console
36+
PUT metricbeat-2016.05.30/_doc/1?refresh <1>
37+
{"system.cpu.idle.pct": 0.908}
38+
PUT metricbeat-2016.05.31/_doc/1?refresh <2>
39+
{"system.cpu.idle.pct": 0.105}
40+
```
41+
1. test 1
42+
2. test 2
43+
44+
```console
45+
POST _reindex
46+
{
47+
"max_docs": 10,
48+
"source": {
49+
"index": "my-index-000001",
50+
"query": {
51+
"function_score" : {
52+
"random_score" : {},
53+
"min_score" : 0.9
54+
}
55+
}
56+
},
57+
"dest": {
58+
"index": "my-new-index-000001"
59+
}
60+
}
61+
```
62+
63+
```console
64+
GET metricbeat-2016.05.30-1/_doc/1
65+
GET metricbeat-2016.05.31-1/_doc/1
66+
```
67+
68+
```console
69+
PUT my-index-000001
70+
{
71+
"mappings": {
72+
"enabled": false <1>
73+
}
74+
}
75+
76+
PUT my-index-000001/_doc/session_1
77+
{
78+
"user_id": "kimchy",
79+
"session_data": {
80+
"arbitrary_object": {
81+
"some_array": [ "foo", "bar", { "baz": 2 } ]
82+
}
83+
},
84+
"last_updated": "2015-12-06T18:20:22"
85+
}
86+
87+
GET my-index-000001/_doc/session_1 <2>
88+
89+
GET my-index-000001/_mapping <3>
90+
```
91+
92+
1. The entire mapping is disabled.
93+
2. The document can be retrieved.
94+
3. Checking the mapping reveals that no fields have been added.
95+
96+
```javascript
97+
const foo = "bar"; <1>
98+
```
99+
100+
1. This is a JavaScript code block.

src/Elastic.Documentation.Configuration/Builder/FeatureFlags.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ public bool SearchOrAskAiEnabled
3838
set => _featureFlags["search-or-ask-ai"] = value;
3939
}
4040

41+
public bool StagingElasticNavEnabled
42+
{
43+
get => IsEnabled("staging-elastic-nav");
44+
set => _featureFlags["staging-elastic-nav"] = value;
45+
}
46+
4147
private bool IsEnabled(string key)
4248
{
4349
var envKey = $"FEATURE_{key.ToUpperInvariant().Replace('-', '_')}";

src/Elastic.Documentation.Site/Assets/markdown/code.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@
1919
code:last-child {
2020
@apply rounded-b-sm;
2121
}
22-
code.language-apiheader {
23-
@apply border-b-grey-80 border-b-1;
22+
code.language-apiheader + code.language-json {
23+
@apply -mt-6 pt-0!;
24+
}
25+
26+
code.language-json + code.language-apiheader,
27+
code.language-apiheader + code.language-apiheader {
28+
@apply border-t-grey-100 border-t-1 border-dotted;
2429
}
2530
}
2631

0 commit comments

Comments
 (0)