Skip to content

Commit

Permalink
Renamed items to osd-ace
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Mar 3, 2021
1 parent 93327d2 commit 8d5b5a7
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 14 deletions.
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.

0 comments on commit 8d5b5a7

Please sign in to comment.