mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
#205983 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Eyo Okon Eyo <eyo.eyo@elastic.co> Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
This commit is contained in:
parent
84086cd2a1
commit
2ed577ba9f
34 changed files with 127 additions and 71 deletions
|
@ -13,7 +13,7 @@ steps:
|
|||
agents:
|
||||
machineType: n2-standard-8
|
||||
preemptible: true
|
||||
diskSizeGb: 125
|
||||
diskSizeGb: 150
|
||||
key: build
|
||||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
|
||||
timeout_in_minutes: 90
|
||||
|
|
|
@ -31,7 +31,7 @@ elif [[ "$UNAME" == "Darwin" ]]; then
|
|||
fi
|
||||
echo " -- Running on OS: $OS"
|
||||
|
||||
NODE_VARIANT=""
|
||||
NODE_VARIANT="node-glibc-217/"
|
||||
if [[ "${CI_FORCE_NODE_POINTER_COMPRESSION:-}" = "true" ]]; then
|
||||
NODE_VARIANT="node-pointer-compression/"
|
||||
# Node.js 20.15.1 with pointer compression enabled
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -105,6 +105,8 @@ npm-debug.log*
|
|||
# transpiled cypress config
|
||||
x-pack/platform/plugins/shared/fleet/cypress.config.d.ts
|
||||
x-pack/platform/plugins/shared/fleet/cypress.config.js
|
||||
x-pack/platform/plugins/shared/fleet/cypress.config.space_awareness.d.ts
|
||||
x-pack/platform/plugins/shared/fleet/cypress.config.space_awareness.js
|
||||
x-pack/platform/plugins/shared/osquery/cypress.config.d.ts
|
||||
x-pack/platform/plugins/shared/osquery/cypress.config.js
|
||||
x-pack/solutions/search/plugins/enterprise_search/cypress.config.d.ts
|
||||
|
|
|
@ -1 +1 @@
|
|||
20.19.2
|
||||
22.16.0
|
||||
|
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
|||
20.19.2
|
||||
22.16.0
|
||||
|
|
|
@ -22,15 +22,15 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
|
|||
# Setup the Node.js toolchain for the architectures we want to support
|
||||
node_repositories(
|
||||
node_repositories = {
|
||||
"20.19.2-darwin_amd64": ("node-v20.19.2-darwin-x64.tar.gz", "node-v20.19.2-darwin-x64", "29f91e05992a7d81498ab1d04938a184313cb4aaccab95bb4636e30e6424eae3"),
|
||||
"20.19.2-darwin_arm64": ("node-v20.19.2-darwin-arm64.tar.gz", "node-v20.19.2-darwin-arm64", "5f96c725cd2be1151f08b25c05bf5a21866a2dc7db3803d351a6ea19fcc53665"),
|
||||
"20.19.2-linux_arm64": ("node-v20.19.2-linux-arm64.tar.xz", "node-v20.19.2-linux-arm64", "7886dc7e151d2dda49b0837bb93dca233a9d3b7f5005ebbcbff9bd1a5ba4981c"),
|
||||
"20.19.2-linux_amd64": ("node-v20.19.2-linux-x64.tar.xz", "node-v20.19.2-linux-x64", "3a3b6ccb3d687b60cc8a142e179d7a9cc6a04c7374ba0f782363a26176d6ea74"),
|
||||
"20.19.2-windows_amd64": ("node-v20.19.2-win-x64.zip", "node-v20.19.2-win-x64", "8735c9940b97548f6d9d4dda7cf5fd4471c062f15f44c2b890c9b0b430460feb"),
|
||||
"22.16.0-darwin_amd64": ("node-v22.16.0-darwin-x64.tar.gz", "node-v22.16.0-darwin-x64", "838d400f7e66c804e5d11e2ecb61d6e9e878611146baff69d6a2def3cc23f4ac"),
|
||||
"22.16.0-darwin_arm64": ("node-v22.16.0-darwin-arm64.tar.gz", "node-v22.16.0-darwin-arm64", "1d7f34ec4c03e12d8b33481e5c4560432d7dc31a0ef3ff5a4d9a8ada7cf6ecc9"),
|
||||
"22.16.0-linux_arm64": ("node-v22.16.0-linux-arm64.tar.xz", "node-v22.16.0-linux-arm64", "073eb4febbed18267a5ba60be6ff1bca2eee7e4d5a42e2aae654fcb1589a13d6"),
|
||||
"22.16.0-linux_amd64": ("node-v22.16.0-linux-x64.tar.xz", "node-v22.16.0-linux-x64", "f3050672ef884765055b8d8f7c5a1cd0dfb4ffa07e03703a924d698bc9a223b3"),
|
||||
"22.16.0-windows_amd64": ("node-v22.16.0-win-x64.zip", "node-v22.16.0-win-x64", "21c2d9735c80b8f86dab19305aa6a9f6f59bbc808f68de3eef09d5832e3bfbbd"),
|
||||
},
|
||||
node_version = "20.19.2",
|
||||
node_version = "22.16.0",
|
||||
node_urls = [
|
||||
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
|
||||
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-glibc-217/dist/v{version}/{filename}",
|
||||
],
|
||||
yarn_repositories = {
|
||||
"1.22.21": ("yarn-v1.22.21.tar.gz", "yarn-v1.22.21", "a55bb4e85405f5dfd6e7154a444e7e33ad305d7ca858bad8546e932a6688df08"),
|
||||
|
|
11
package.json
11
package.json
|
@ -73,7 +73,7 @@
|
|||
"url": "https://github.com/elastic/kibana.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20.19.2",
|
||||
"node": "22.16.0",
|
||||
"yarn": "^1.22.19"
|
||||
},
|
||||
"resolutions": {
|
||||
|
@ -82,7 +82,7 @@
|
|||
"**/@hello-pangea/dnd": "16.6.0",
|
||||
"**/@langchain/core": "^0.3.57",
|
||||
"**/@langchain/google-common": "^0.1.8",
|
||||
"**/@types/node": "20.10.5",
|
||||
"**/@types/node": "22.15.3",
|
||||
"**/@typescript-eslint/utils": "5.62.0",
|
||||
"**/chokidar": "^3.5.3",
|
||||
"**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1",
|
||||
|
@ -94,6 +94,7 @@
|
|||
"**/sharp": "0.32.6",
|
||||
"**/typescript": "5.1.6",
|
||||
"**/util": "^0.12.5",
|
||||
"**/yauzl": "^3.2.0",
|
||||
"@aws-sdk/client-bedrock-agent-runtime": "^3.744.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "^3.744.0",
|
||||
"@aws-sdk/client-kendra": "3.744.0",
|
||||
|
@ -1349,7 +1350,7 @@
|
|||
"xstate5": "npm:xstate@^5.19.2",
|
||||
"xterm": "^5.3.0",
|
||||
"yaml": "^2.5.1",
|
||||
"yauzl": "^2.10.0",
|
||||
"yauzl": "^3.2.0",
|
||||
"yazl": "^2.5.1",
|
||||
"zod": "^3.22.3",
|
||||
"zod-to-json-schema": "^3.23.0"
|
||||
|
@ -1691,7 +1692,7 @@
|
|||
"@types/moment-duration-format": "^2.2.6",
|
||||
"@types/mustache": "^4.2.5",
|
||||
"@types/nock": "^10.0.3",
|
||||
"@types/node": "20.10.5",
|
||||
"@types/node": "22.10.5",
|
||||
"@types/node-fetch": "2.6.4",
|
||||
"@types/node-forge": "^1.3.11",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
|
@ -1746,7 +1747,7 @@
|
|||
"@types/webpack-sources": "^3.2.3",
|
||||
"@types/xml2js": "^0.4.11",
|
||||
"@types/yargs": "^15.0.0",
|
||||
"@types/yauzl": "^2.9.1",
|
||||
"@types/yauzl": "^2.10.3",
|
||||
"@types/yazl": "^2.4.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
||||
"@typescript-eslint/parser": "^5.62.0",
|
||||
|
|
|
@ -94,7 +94,7 @@ describe('kibana cli', function () {
|
|||
await expect(
|
||||
extractArchive(path.resolve(repliesPath, 'corrupt.zip'))
|
||||
).rejects.toThrowErrorMatchingInlineSnapshot(
|
||||
`"end of central directory record signature not found"`
|
||||
`"End of central directory record signature not found. Either not a zip file, or file is truncated."`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -67,7 +67,7 @@ export async function createZipFile(entries: ZipEntry[], destination: string): P
|
|||
// import them directly due to `tsconfig` limitations in the `kibana/src/` directory.
|
||||
function yauzlFromBuffer(buffer: Buffer, opts: yauzl.Options): Promise<yauzl.ZipFile> {
|
||||
return new Promise((resolve, reject) =>
|
||||
yauzl.fromBuffer(buffer, opts, (err?: Error, handle?: yauzl.ZipFile) =>
|
||||
yauzl.fromBuffer(buffer, opts, (err: Error | null, handle?: yauzl.ZipFile) =>
|
||||
err ? reject(err) : resolve(handle!)
|
||||
)
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ function getZipReadStream(
|
|||
entry: yauzl.Entry
|
||||
): Promise<NodeJS.ReadableStream> {
|
||||
return new Promise((resolve, reject) =>
|
||||
zipfile.openReadStream(entry, (err?: Error, readStream?: NodeJS.ReadableStream) =>
|
||||
zipfile.openReadStream(entry, (err: Error | null, readStream?: NodeJS.ReadableStream) =>
|
||||
err ? reject(err) : resolve(readStream!)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -33,6 +33,7 @@ export function getNodeDownloadInfo(config: Config, platform: Platform) {
|
|||
|
||||
let variantPath = '';
|
||||
if (variant === 'pointer-compression') variantPath = 'node-pointer-compression/';
|
||||
if (variant === 'glibc-217') variantPath = 'node-glibc-217/';
|
||||
const url = `https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/${variantPath}dist/v${version}/${downloadName}`;
|
||||
const downloadPath = config.resolveFromRepo(
|
||||
'.node_binaries',
|
||||
|
|
|
@ -15,6 +15,7 @@ const cache: Record<string, Record<string, string>> = {};
|
|||
export async function getNodeShasums(log: ToolingLog, nodeVersion: string, variant: string | null) {
|
||||
let variantPath = '';
|
||||
if (variant === 'pointer-compression') variantPath = 'node-pointer-compression/';
|
||||
if (variant === 'glibc-217') variantPath = 'node-glibc-217/';
|
||||
const url = `https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/${variantPath}dist/v${nodeVersion}/SHASUMS256.txt`;
|
||||
|
||||
if (cache[url]) {
|
||||
|
|
|
@ -53,8 +53,8 @@ export function apmPipeline(logger: Logger, version: string, includeSerializatio
|
|||
: [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
getIntakeDefaultsTransform(),
|
||||
fork(new PassThrough({ objectMode: true }), ...aggregators),
|
||||
|
|
|
@ -24,8 +24,8 @@ export function apmToOtelPipeline(
|
|||
const serializationTransform = includeSerialization ? [getSerializeTransform()] : [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
getIntakeDefaultsTransform(),
|
||||
getApmServerMetadataTransform(version),
|
||||
|
|
|
@ -48,8 +48,8 @@ export function otelToApmPipeline(logger: Logger, includeSerialization: boolean
|
|||
const serializationTransform = includeSerialization ? [getSerializeTransform()] : [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
getOtelToApmTransform(),
|
||||
...getOtelTransforms(),
|
||||
|
|
|
@ -44,8 +44,8 @@ function entitiesPipeline({ includeSerialization }: Pipeline = { includeSerializ
|
|||
const serializationTransform = includeSerialization ? [getSerializeTransform()] : [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
lastSeenTimestampTransform(),
|
||||
getRoutingTransform(),
|
||||
|
|
|
@ -51,8 +51,8 @@ function infraPipeline({ includeSerialization = true }: Pipeline) {
|
|||
const serializationTransform = includeSerialization ? [getSerializeTransform()] : [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
getRoutingTransform(),
|
||||
getDedotTransform(),
|
||||
|
|
|
@ -180,8 +180,8 @@ function logsPipeline({ includeSerialization = true }: Pipeline) {
|
|||
: [];
|
||||
|
||||
return pipeline(
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
base,
|
||||
// @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests!
|
||||
...serializationTransform,
|
||||
getRoutingTransform('logs'),
|
||||
(err: unknown) => {
|
||||
|
|
|
@ -99,7 +99,9 @@ describe('esArchiver createParseArchiveStreams', () => {
|
|||
] as [Readable, ...Writable[]]);
|
||||
throw new Error('should have failed');
|
||||
} catch (err) {
|
||||
expect(err.message).toEqual(`Expected property name or '}' in JSON at position 1`);
|
||||
expect(err.message).toEqual(
|
||||
`Expected property name or '}' in JSON at position 1 (line 1 column 2)`
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -18,7 +18,6 @@ const protocolMap = new Map<string, number>([
|
|||
[TLS_V1, cryptoConstants.SSL_OP_NO_TLSv1],
|
||||
[TLS_V1_1, cryptoConstants.SSL_OP_NO_TLSv1_1],
|
||||
[TLS_V1_2, cryptoConstants.SSL_OP_NO_TLSv1_2],
|
||||
// @ts-expect-error According to the docs SSL_OP_NO_TLSv1_3 should exist (https://nodejs.org/docs/latest-v12.x/api/crypto.html)
|
||||
[TLS_V1_3, cryptoConstants.SSL_OP_NO_TLSv1_3],
|
||||
]);
|
||||
|
||||
|
|
|
@ -104,8 +104,9 @@ describe('promiseFromStreams', () => {
|
|||
this.push('c');
|
||||
this.push(null);
|
||||
},
|
||||
destroy() {
|
||||
destroy(_err, done) {
|
||||
destroyCalled = true;
|
||||
done();
|
||||
},
|
||||
});
|
||||
const transformStream = new Transform({
|
||||
|
|
|
@ -76,6 +76,19 @@ var IGNORE_WARNINGS = [
|
|||
message:
|
||||
"Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.",
|
||||
},
|
||||
// from node_modules/node-fetch, fix available but requires es modules, or yarn resolution on whatwg-url
|
||||
// from node_modules/tough-cookie < 5. fix requires yarn resolution
|
||||
{
|
||||
name: 'DeprecationWarning',
|
||||
code: 'DEP0040',
|
||||
message: 'The `punycode` module is deprecated. Please use a userland alternative instead.',
|
||||
},
|
||||
// from node_modules/http-proxy, no fix available
|
||||
{
|
||||
name: 'DeprecationWarning',
|
||||
code: 'DEP0060',
|
||||
message: 'The `util._extend` API is deprecated. Please use Object.assign() instead.',
|
||||
},
|
||||
];
|
||||
|
||||
if (process.noProcessWarnings !== true) {
|
||||
|
|
|
@ -254,7 +254,7 @@ describe('user action migrations', () => {
|
|||
const log = context.log as jest.Mocked<SavedObjectsMigrationLogger>;
|
||||
expect(log.error.mock.calls[0]).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"Failed to migrate user action connector with doc id: 1 version: 8.0.0 error: Expected property name or '}' in JSON at position 1",
|
||||
"Failed to migrate user action connector with doc id: 1 version: 8.0.0 error: Expected property name or '}' in JSON at position 1 (line 1 column 2)",
|
||||
Object {
|
||||
"migrations": Object {
|
||||
"userAction": Object {
|
||||
|
@ -448,7 +448,7 @@ describe('user action migrations', () => {
|
|||
const log = context.log as jest.Mocked<SavedObjectsMigrationLogger>;
|
||||
expect(log.error.mock.calls[0]).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"Failed to migrate user action connector with doc id: 1 version: 8.0.0 error: Expected property name or '}' in JSON at position 1",
|
||||
"Failed to migrate user action connector with doc id: 1 version: 8.0.0 error: Expected property name or '}' in JSON at position 1 (line 1 column 2)",
|
||||
Object {
|
||||
"migrations": Object {
|
||||
"userAction": Object {
|
||||
|
|
|
@ -86,7 +86,7 @@ export function getBufferExtractor(
|
|||
|
||||
function yauzlFromBuffer(buffer: Buffer, opts: yauzl.Options): Promise<yauzl.ZipFile> {
|
||||
return new Promise((resolve, reject) =>
|
||||
yauzl.fromBuffer(buffer, opts, (err?: Error, handle?: yauzl.ZipFile) =>
|
||||
yauzl.fromBuffer(buffer, opts, (err: Error | null, handle?: yauzl.ZipFile) =>
|
||||
err ? reject(err) : resolve(handle!)
|
||||
)
|
||||
);
|
||||
|
@ -97,7 +97,7 @@ function getZipReadStream(
|
|||
entry: yauzl.Entry
|
||||
): Promise<NodeJS.ReadableStream> {
|
||||
return new Promise((resolve, reject) =>
|
||||
zipfile.openReadStream(entry, (err?: Error, readStream?: NodeJS.ReadableStream) =>
|
||||
zipfile.openReadStream(entry, (err: Error | null, readStream?: NodeJS.ReadableStream) =>
|
||||
err ? reject(err) : resolve(readStream!)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -140,18 +140,24 @@ export class PdfMaker {
|
|||
image: Buffer,
|
||||
opts: { title?: string; description?: string } = { title: '', description: '' }
|
||||
) {
|
||||
this.logger.debug(`Adding image to PDF. Image size: ${image.byteLength}`); // prettier-ignore
|
||||
// Convert the image buffer to a transferable buffer.
|
||||
// See https://github.com/nodejs/node/issues/55593 for the rationale behind this decision.
|
||||
const _transferableImage = new ArrayBuffer(image.byteLength);
|
||||
new Uint8Array(_transferableImage).set(new Uint8Array(image));
|
||||
|
||||
this.logger.debug(`Adding image to PDF. Image size: ${_transferableImage.byteLength}`); // prettier-ignore
|
||||
const size = this.layout.getPdfImageSize();
|
||||
const img = {
|
||||
// The typings are incomplete for the image property.
|
||||
// It's possible to pass a Buffer as the image data.
|
||||
// @see https://github.com/bpampuch/pdfmake/blob/0.2/src/printer.js#L654
|
||||
image,
|
||||
image: _transferableImage,
|
||||
alignment: 'center' as 'center',
|
||||
height: size.height,
|
||||
width: size.width,
|
||||
} as unknown as ContentImage;
|
||||
this.transferList.push(image.buffer);
|
||||
|
||||
this.transferList.push(_transferableImage);
|
||||
|
||||
if (this.layout.useReportingBranding) {
|
||||
return this.addBrandedImage(img, opts);
|
||||
|
@ -254,6 +260,7 @@ export class PdfMaker {
|
|||
const generatePdfRequest: GeneratePdfRequest = {
|
||||
data: this.getGeneratePdfRequestData(),
|
||||
};
|
||||
|
||||
myPort.postMessage(generatePdfRequest, this.transferList);
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -12,7 +12,9 @@ describe('checkForParseErrors', function () {
|
|||
it('returns error from bad JSON', function () {
|
||||
const json = '{"foo": {"bar": {"baz": "buzz}}}';
|
||||
const result = checkForParseErrors(json);
|
||||
expect(result.error.message).to.be(`Unterminated string in JSON at position 32`);
|
||||
expect(result.error.message).to.be(
|
||||
`Unterminated string in JSON at position 32 (line 1 column 33)`
|
||||
);
|
||||
});
|
||||
|
||||
it('returns parsed value from good JSON', function () {
|
||||
|
|
|
@ -282,7 +282,7 @@ describe('handles errors during migrations', () => {
|
|||
migration800(taskInstance, migrationContext);
|
||||
}).toThrowError();
|
||||
expect(migrationContext.log.error).toHaveBeenCalledWith(
|
||||
`savedObject 8.0.0 migration failed for task instance ${taskInstance.id} with error: Expected property name or '}' in JSON at position 2`,
|
||||
`savedObject 8.0.0 migration failed for task instance ${taskInstance.id} with error: Expected property name or '}' in JSON at position 2 (line 1 column 3)`,
|
||||
{
|
||||
migrations: {
|
||||
taskInstanceDocument: {
|
||||
|
|
|
@ -34,7 +34,9 @@ export default function (providerContext: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
if (response instanceof BadRequestError) {
|
||||
expect(response.message).to.be("Expected property name or '}' in JSON at position 1");
|
||||
expect(response.message).to.be(
|
||||
"Expected property name or '}' in JSON at position 1 (line 1 column 2)"
|
||||
);
|
||||
} else {
|
||||
expect().fail('Expected BadRequestError');
|
||||
}
|
||||
|
|
|
@ -33,7 +33,9 @@ export default function (providerContext: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
if (response instanceof BadRequestError) {
|
||||
expect(response.message).to.be("Expected property name or '}' in JSON at position 1");
|
||||
expect(response.message).to.be(
|
||||
"Expected property name or '}' in JSON at position 1 (line 1 column 2)"
|
||||
);
|
||||
} else {
|
||||
expect().fail('Expected BadRequestError');
|
||||
}
|
||||
|
|
|
@ -34,7 +34,9 @@ export default function (providerContext: FtrProviderContext) {
|
|||
},
|
||||
});
|
||||
if (response instanceof BadRequestError) {
|
||||
expect(response.message).to.be("Expected property name or '}' in JSON at position 1");
|
||||
expect(response.message).to.be(
|
||||
"Expected property name or '}' in JSON at position 1 (line 1 column 2)"
|
||||
);
|
||||
} else {
|
||||
expect().fail('Expected BadRequestError');
|
||||
}
|
||||
|
|
|
@ -664,7 +664,8 @@ describe('normalizeAPIConfig', () => {
|
|||
},
|
||||
});
|
||||
expect(normalizeAPIConfig({ type: 'browser', params: '{d}' } as any)).toEqual({
|
||||
errorMessage: "Invalid params: Expected property name or '}' in JSON at position 1",
|
||||
errorMessage:
|
||||
"Invalid params: Expected property name or '}' in JSON at position 1 (line 1 column 2)",
|
||||
formattedConfig: {
|
||||
type: 'browser',
|
||||
params: '{d}',
|
||||
|
@ -702,7 +703,7 @@ describe('normalizeAPIConfig', () => {
|
|||
});
|
||||
expect(normalizeAPIConfig({ type: 'browser', playwright_options: '{d}' } as any)).toEqual({
|
||||
errorMessage:
|
||||
"Invalid playwright_options: Expected property name or '}' in JSON at position 1",
|
||||
"Invalid playwright_options: Expected property name or '}' in JSON at position 1 (line 1 column 2)",
|
||||
formattedConfig: {
|
||||
playwright_options: '{d}',
|
||||
type: 'browser',
|
||||
|
|
|
@ -18,7 +18,9 @@ describe('useFormWithWarn', () => {
|
|||
it('is `undefined` initially', async () => {
|
||||
render(<TestForm warningValidationCodes={['warning']} />);
|
||||
|
||||
expect(screen.getByText('isValid: "undefined"')).toBeInTheDocument();
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('isValid: "undefined"')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it('is `true` when input is valid', async () => {
|
||||
|
@ -38,7 +40,9 @@ describe('useFormWithWarn', () => {
|
|||
await typeText('warning');
|
||||
await submitForm();
|
||||
|
||||
expect(screen.getByText('isValid: true')).toBeInTheDocument();
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('isValid: true')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it('is `false` when input has error', async () => {
|
||||
|
@ -47,7 +51,9 @@ describe('useFormWithWarn', () => {
|
|||
await typeText('error');
|
||||
await submitForm();
|
||||
|
||||
expect(screen.getByText('isValid: false')).toBeInTheDocument();
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('isValid: false')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -244,7 +244,9 @@ describe('createPromiseFromRuleImportStream', () => {
|
|||
interval: '5m',
|
||||
type: 'query',
|
||||
});
|
||||
expect(resultOrError[1].message).toEqual(`Expected property name or '}' in JSON at position 1`);
|
||||
expect(resultOrError[1].message).toEqual(
|
||||
`Expected property name or '}' in JSON at position 1 (line 1 column 2)`
|
||||
);
|
||||
expect(resultOrError[2]).toEqual({
|
||||
rule_id: 'rule-2',
|
||||
output_index: '.siem-signals',
|
||||
|
|
|
@ -209,7 +209,7 @@ export default function (providerContext: FtrProviderContext) {
|
|||
.send(buf)
|
||||
.expect(400);
|
||||
expect((res.error as HTTPError).text).to.equal(
|
||||
'{"statusCode":400,"error":"Bad Request","message":"Error during extraction of package: Error: end of central directory record signature not found. Assumed content type was application/zip, check if this matches the archive type."}'
|
||||
'{"statusCode":400,"error":"Bad Request","message":"Error during extraction of package: Error: End of central directory record signature not found. Either not a zip file, or file is truncated.. Assumed content type was application/zip, check if this matches the archive type."}'
|
||||
);
|
||||
});
|
||||
|
||||
|
|
60
yarn.lock
60
yarn.lock
|
@ -11892,12 +11892,19 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node@*", "@types/node@14 || 16 || 17", "@types/node@20.10.5", "@types/node@>=13.7.0", "@types/node@>=18.0.0", "@types/node@^18.0.0", "@types/node@^18.11.18", "@types/node@^20.13.0":
|
||||
version "20.10.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.5.tgz#47ad460b514096b7ed63a1dae26fad0914ed3ab2"
|
||||
integrity sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==
|
||||
"@types/node@*", "@types/node@14 || 16 || 17", "@types/node@22.15.3", "@types/node@>=13.7.0", "@types/node@>=18.0.0", "@types/node@^18.0.0", "@types/node@^18.11.18", "@types/node@^20.13.0":
|
||||
version "22.15.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.3.tgz#b7fb9396a8ec5b5dfb1345d8ac2502060e9af68b"
|
||||
integrity sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
undici-types "~6.21.0"
|
||||
|
||||
"@types/node@22.10.5":
|
||||
version "22.10.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b"
|
||||
integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==
|
||||
dependencies:
|
||||
undici-types "~6.20.0"
|
||||
|
||||
"@types/nodemailer@^6.4.0":
|
||||
version "6.4.0"
|
||||
|
@ -12609,6 +12616,13 @@
|
|||
dependencies:
|
||||
"@types/yargs-parser" "*"
|
||||
|
||||
"@types/yauzl@^2.10.3":
|
||||
version "2.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999"
|
||||
integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/yauzl@^2.9.1":
|
||||
version "2.9.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af"
|
||||
|
@ -18583,13 +18597,6 @@ fd-package-json@^1.2.0:
|
|||
dependencies:
|
||||
walk-up-path "^3.0.1"
|
||||
|
||||
fd-slicer@~1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
||||
integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
|
||||
dependencies:
|
||||
pend "~1.2.0"
|
||||
|
||||
fdir@^6.4.4:
|
||||
version "6.4.5"
|
||||
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.5.tgz#328e280f3a23699362f95f2e82acf978a0c0cb49"
|
||||
|
@ -26327,9 +26334,9 @@ punycode@^1.4.1:
|
|||
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
|
||||
|
||||
punycode@^2.1.0, punycode@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
|
||||
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
|
||||
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
|
||||
|
||||
puppeteer-core@24.10.1, puppeteer-core@^24.10.0:
|
||||
version "24.10.1"
|
||||
|
@ -30629,10 +30636,15 @@ unc-path-regex@^0.1.2:
|
|||
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
|
||||
integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo=
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
undici-types@~6.20.0:
|
||||
version "6.20.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
|
||||
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
|
||||
|
||||
undici-types@~6.21.0:
|
||||
version "6.21.0"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
|
||||
integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
|
||||
|
||||
undici@^5.28.3:
|
||||
version "5.29.0"
|
||||
|
@ -32392,13 +32404,13 @@ yarn-deduplicate@^6.0.2:
|
|||
semver "^7.5.0"
|
||||
tslib "^2.5.0"
|
||||
|
||||
yauzl@^2.10.0:
|
||||
version "2.10.0"
|
||||
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
||||
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
||||
yauzl@^2.10.0, yauzl@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.2.0.tgz#7b6cb548f09a48a6177ea0be8ece48deb7da45c0"
|
||||
integrity sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==
|
||||
dependencies:
|
||||
buffer-crc32 "~0.2.3"
|
||||
fd-slicer "~1.1.0"
|
||||
pend "~1.2.0"
|
||||
|
||||
yazl@^2.5.1:
|
||||
version "2.5.1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue