-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iMerge branch 'master' into add-response-erros-to-nodes-version-compa…
…tibility
- Loading branch information
Showing
572 changed files
with
5,989 additions
and
3,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") | ||
|
||
PKG_BASE_NAME = "kbn-docs-utils" | ||
PKG_REQUIRE_NAME = "@kbn/docs-utils" | ||
|
||
SOURCE_FILES = glob( | ||
[ | ||
"src/**/*.ts", | ||
], | ||
exclude = [ | ||
"**/*.test.*", | ||
"**/__fixtures__/**", | ||
"**/snapshots/**", | ||
], | ||
) | ||
|
||
SRCS = SOURCE_FILES | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = SRCS, | ||
) | ||
|
||
NPM_MODULE_EXTRA_FILES = [ | ||
"package.json", | ||
] | ||
|
||
SRC_DEPS = [ | ||
"//packages/kbn-config", | ||
"//packages/kbn-dev-utils", | ||
"//packages/kbn-utils", | ||
"@npm//dedent", | ||
"@npm//ts-morph", | ||
] | ||
|
||
TYPES_DEPS = [ | ||
"@npm//@types/dedent", | ||
"@npm//@types/jest", | ||
"@npm//@types/node", | ||
] | ||
|
||
DEPS = SRC_DEPS + TYPES_DEPS | ||
|
||
ts_config( | ||
name = "tsconfig", | ||
src = "tsconfig.json", | ||
deps = [ | ||
"//:tsconfig.base.json", | ||
], | ||
) | ||
|
||
ts_project( | ||
name = "tsc", | ||
args = ['--pretty'], | ||
srcs = SRCS, | ||
deps = DEPS, | ||
declaration = True, | ||
declaration_map = True, | ||
incremental = True, | ||
out_dir = "target", | ||
source_map = True, | ||
root_dir = "src", | ||
tsconfig = ":tsconfig", | ||
) | ||
|
||
js_library( | ||
name = PKG_BASE_NAME, | ||
srcs = NPM_MODULE_EXTRA_FILES, | ||
deps = [":tsc"] + DEPS, | ||
package_name = PKG_REQUIRE_NAME, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm( | ||
name = "npm_module", | ||
deps = [ | ||
":%s" % PKG_BASE_NAME, | ||
] | ||
) | ||
|
||
filegroup( | ||
name = "build", | ||
srcs = [ | ||
":npm_module", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../..', | ||
roots: ['<rootDir>/packages/kbn-rule-data-utils'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "@kbn/rule-data-utils", | ||
"main": "./target/index.js", | ||
"types": "./target/index.d.ts", | ||
"version": "1.0.0", | ||
"license": "SSPL-1.0 OR Elastic License 2.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "../../node_modules/.bin/tsc", | ||
"kbn:bootstrap": "yarn build", | ||
"kbn:watch": "yarn build --watch" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export * from './technical_field_names'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { ValuesType } from 'utility-types'; | ||
|
||
const ALERT_NAMESPACE = 'kibana.rac.alert'; | ||
|
||
const TIMESTAMP = '@timestamp' as const; | ||
const EVENT_KIND = 'event.kind' as const; | ||
const EVENT_ACTION = 'event.action' as const; | ||
const RULE_UUID = 'rule.uuid' as const; | ||
const RULE_ID = 'rule.id' as const; | ||
const RULE_NAME = 'rule.name' as const; | ||
const RULE_CATEGORY = 'rule.category' as const; | ||
const TAGS = 'tags' as const; | ||
const PRODUCER = `${ALERT_NAMESPACE}.producer` as const; | ||
const ALERT_ID = `${ALERT_NAMESPACE}.id` as const; | ||
const ALERT_UUID = `${ALERT_NAMESPACE}.uuid` as const; | ||
const ALERT_START = `${ALERT_NAMESPACE}.start` as const; | ||
const ALERT_END = `${ALERT_NAMESPACE}.end` as const; | ||
const ALERT_DURATION = `${ALERT_NAMESPACE}.duration.us` as const; | ||
const ALERT_SEVERITY_LEVEL = `${ALERT_NAMESPACE}.severity.level` as const; | ||
const ALERT_SEVERITY_VALUE = `${ALERT_NAMESPACE}.severity.value` as const; | ||
const ALERT_STATUS = `${ALERT_NAMESPACE}.status` as const; | ||
const ALERT_EVALUATION_THRESHOLD = `${ALERT_NAMESPACE}.evaluation.threshold` as const; | ||
const ALERT_EVALUATION_VALUE = `${ALERT_NAMESPACE}.evaluation.value` as const; | ||
|
||
const fields = { | ||
TIMESTAMP, | ||
EVENT_KIND, | ||
EVENT_ACTION, | ||
RULE_UUID, | ||
RULE_ID, | ||
RULE_NAME, | ||
RULE_CATEGORY, | ||
TAGS, | ||
PRODUCER, | ||
ALERT_ID, | ||
ALERT_UUID, | ||
ALERT_START, | ||
ALERT_END, | ||
ALERT_DURATION, | ||
ALERT_SEVERITY_LEVEL, | ||
ALERT_SEVERITY_VALUE, | ||
ALERT_STATUS, | ||
ALERT_EVALUATION_THRESHOLD, | ||
ALERT_EVALUATION_VALUE, | ||
}; | ||
|
||
export { | ||
TIMESTAMP, | ||
EVENT_KIND, | ||
EVENT_ACTION, | ||
RULE_UUID, | ||
RULE_ID, | ||
RULE_NAME, | ||
RULE_CATEGORY, | ||
TAGS, | ||
PRODUCER, | ||
ALERT_ID, | ||
ALERT_UUID, | ||
ALERT_START, | ||
ALERT_END, | ||
ALERT_DURATION, | ||
ALERT_SEVERITY_LEVEL, | ||
ALERT_SEVERITY_VALUE, | ||
ALERT_STATUS, | ||
ALERT_EVALUATION_THRESHOLD, | ||
ALERT_EVALUATION_VALUE, | ||
}; | ||
|
||
export type TechnicalRuleDataFieldName = ValuesType<typeof fields>; |
Oops, something went wrong.