Skip to content

Commit 25fc8ff

Browse files
authored
Merge branch 'main' into renovate/tap-21.x
2 parents 74b5b5b + 461f9b7 commit 25fc8ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+141
-2311
lines changed

.buildkite/make.mjs

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
/* global $ argv */
@@ -123,7 +109,7 @@ async function codegen (args) {
123109
await $`rm -rf ${join(import.meta.url, '..', 'src', 'api')}`
124110
await $`mkdir ${join(import.meta.url, '..', 'src', 'api')}`
125111
await $`cp -R ${join(import.meta.url, '..', '..', 'elastic-client-generator-js', 'output')}/* ${join(import.meta.url, '..', 'src', 'api')}`
126-
await $`mv ${join(import.meta.url, '..', 'src', 'api', 'reference.asciidoc')} ${join(import.meta.url, '..', 'docs', 'reference.asciidoc')}`
112+
await $`mv ${join(import.meta.url, '..', 'src', 'api', 'reference.md')} ${join(import.meta.url, '..', 'docs', 'reference', 'api-reference.md')}`
127113
await $`npm run build`
128114

129115
// run docs example generation

.github/workflows/nodejs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ jobs:
8383
run: |
8484
npm run license-checker
8585
86+
- name: SPDX header check
87+
run: npm run license-header
88+
8689
test-bun:
8790
name: Test Bun
8891
runs-on: ${{ matrix.os }}

docs/examples/proxy/api/autocomplete.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
// IMPORTANT: this is not a production ready code & purely for demonstration purposes,

docs/examples/proxy/api/delete.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
// IMPORTANT: this is not a production ready code & purely for demonstration purposes,

docs/examples/proxy/api/index.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
// IMPORTANT: this is not a production ready code & purely for demonstration purposes,

docs/examples/proxy/api/search.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
// IMPORTANT: this is not a production ready code & purely for demonstration purposes,

docs/examples/proxy/utils/authorize.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
// IMPORTANT: this is not a production ready code & purely for demonstration purposes,

docs/examples/proxy/utils/prepare-elasticsearch.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
'use strict'

index.d.ts

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
import Client from './lib/client'

index.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
'use strict'

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"lint": "ts-standard src",
2323
"lint:fix": "ts-standard --fix src",
2424
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause;0BSD'",
25+
"license-header": "./scripts/check-spdx",
2526
"prebuild": "npm run clean-build && npm run lint",
2627
"build": "tsc && rm lib/package.json && mv lib/src/* lib/ && rm -rf lib/src",
2728
"clean-build": "rimraf ./lib && mkdir lib",
@@ -60,7 +61,7 @@
6061
"@sinonjs/fake-timers": "14.0.0",
6162
"@types/debug": "4.1.12",
6263
"@types/ms": "0.7.34",
63-
"@types/node": "22.13.9",
64+
"@types/node": "22.13.10",
6465
"@types/sinonjs__fake-timers": "8.1.5",
6566
"@types/split2": "4.2.3",
6667
"@types/stoppable": "1.1.3",
@@ -77,7 +78,7 @@
7778
"ora": "5.4.1",
7879
"proxy": "1.0.2",
7980
"rimraf": "3.0.2",
80-
"semver": "7.6.3",
81+
"semver": "7.7.1",
8182
"split2": "4.2.0",
8283
"stoppable": "1.1.0",
8384
"tap": "21.1.0",

scripts/check-spdx

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright Elasticsearch B.V. and contributors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
correct='/*
7+
* Copyright Elasticsearch B.V. and contributors
8+
* SPDX-License-Identifier: Apache-2.0
9+
*/'
10+
11+
the_exit=0
12+
13+
check_file() {
14+
if $(diff <(head -n4 "$1") <(echo "$correct") &>/dev/null); then
15+
echo "Correct: $1"
16+
else
17+
echo "Incorrect: $1"
18+
the_exit=1
19+
fi
20+
}
21+
22+
echo "SPDX license header check"
23+
for file in $(git ls-files | grep -E '\.(ts|js|mjs)$'); do
24+
check_file "$file"
25+
done
26+
27+
exit "$the_exit"

scripts/download-artifacts.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
'use strict'

scripts/generate-docs-examples.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
2-
* Licensed to Elasticsearch B.V. under one or more contributor
3-
* license agreements. See the NOTICE file distributed with
4-
* this work for additional information regarding copyright
5-
* ownership. Elasticsearch B.V. licenses this file to you under
6-
* the Apache License, Version 2.0 (the "License"); you may
7-
* not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing,
13-
* software distributed under the License is distributed on an
14-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
* KIND, either express or implied. See the License for the
16-
* specific language governing permissions and limitations
17-
* under the License.
2+
* Copyright Elasticsearch B.V. and contributors
3+
* SPDX-License-Identifier: Apache-2.0
184
*/
195

206
const { join } = require('path')

0 commit comments

Comments
 (0)