Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] kbn-ace package to osd-ace #40

Merged
merged 1 commit into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kbn-ace/README.md → packages/osd-ace/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @kbn/ace
# @osd/ace

This package contains the XJSON mode for brace. This is an extension of the `brace/mode/json` mode.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@kbn/ace",
"name": "@osd/ace",
"version": "1.0.0",
"private": true,
"main": "./target/index.js",
"license": "Apache-2.0",
"scripts": {
"build": "node ./scripts/build.js",
"kbn:bootstrap": "yarn build --dev"
"osd:bootstrap": "yarn build --dev"
},
"dependencies": {
"brace": "0.11.1"
},
"devDependencies": {
"@kbn/dev-utils": "1.0.0",
"@kbn/babel-preset": "1.0.0",
"@osd/dev-utils": "1.0.0",
"@osd/babel-preset": "1.0.0",
"raw-loader": "^3.1.0",
"typescript": "4.0.2"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const path = require('path');
const del = require('del');
const fs = require('fs');
const supportsColor = require('supports-color');
const { run } = require('@kbn/dev-utils');
const { run } = require('@osd/dev-utils');

const TARGET_BUILD_DIR = path.resolve(__dirname, '../target');
const ROOT_DIR = path.resolve(__dirname, '../');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

export {
ElasticsearchSqlHighlightRules,
OpenSearchSqlHighlightRules,
ScriptHighlightRules,
XJsonHighlightRules,
addXJsonToRules,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

export { ElasticsearchSqlHighlightRules } from './elasticsearch_sql_highlight_rules';
export { OpenSearchSqlHighlightRules } from './opensearch_sql_highlight_rules';
export { ScriptHighlightRules } from './script_highlight_rules';
export { XJsonHighlightRules, addToRules as addXJsonToRules } from './x_json_highlight_rules';
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import ace from 'brace';
const { TextHighlightRules } = ace.acequire('ace/mode/text_highlight_rules');
const oop = ace.acequire('ace/lib/oop');

export const ElasticsearchSqlHighlightRules = function (this: any) {
export const OpenSearchSqlHighlightRules = function (this: any) {
// See https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-commands.html
const keywords =
'describe|between|in|like|not|and|or|desc|select|from|where|having|group|by|order' +
Expand Down Expand Up @@ -110,4 +110,4 @@ export const ElasticsearchSqlHighlightRules = function (this: any) {
this.normalizeRules();
};

oop.inherits(ElasticsearchSqlHighlightRules, TextHighlightRules);
oop.inherits(OpenSearchSqlHighlightRules, TextHighlightRules);
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { defaultsDeep } from 'lodash';
import ace from 'brace';
import 'brace/mode/json';

import { ElasticsearchSqlHighlightRules } from './elasticsearch_sql_highlight_rules';
import { OpenSearchSqlHighlightRules } from './opensearch_sql_highlight_rules';
import { ScriptHighlightRules } from './script_highlight_rules';

const { JsonHighlightRules } = ace.acequire('ace/mode/json_highlight_rules');
Expand Down Expand Up @@ -164,7 +164,7 @@ export function XJsonHighlightRules(this: any) {
},
]);

this.embedRules(ElasticsearchSqlHighlightRules, 'sql-', [
this.embedRules(OpenSearchSqlHighlightRules, 'sql-', [
{
token: 'punctuation.end_triple_quote',
regex: '"""',
Expand All @@ -184,7 +184,7 @@ export function addToRules(otherRules: any, embedUnder: any) {
next: 'pop',
},
]);
otherRules.embedRules(ElasticsearchSqlHighlightRules, 'sql-', [
otherRules.embedRules(OpenSearchSqlHighlightRules, 'sql-', [
{
token: 'punctuation.end_triple_quote',
regex: '"""',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

export {
ElasticsearchSqlHighlightRules,
OpenSearchSqlHighlightRules,
ScriptHighlightRules,
XJsonHighlightRules,
addXJsonToRules,
Expand Down
File renamed without changes.
File renamed without changes.