Skip to content

Commit

Permalink
Rename all elastic/elasticsearch/kibana references (#125)
Browse files Browse the repository at this point in the history
* Rename all elastic/elasticsearch/kibana references and clean up any remaining x-pack resources

Signed-off-by: Bishoy Boktor <[email protected]>

* Change opensearch-js reference back to elasticsearch-js since we're referencing elastic

Signed-off-by: Bishoy Boktor <[email protected]>

* Fix name mappings and spacing issues

Signed-off-by: Bishoy Boktor <[email protected]>

* Change OSAPI to OpenSearchAPI

Signed-off-by: Bishoy Boktor <[email protected]>

* Remove docs

Signed-off-by: Bishoy Boktor <[email protected]>

* Removed unused .ci file

Signed-off-by: Bishoy Boktor <[email protected]>

* Address PR comments

Signed-off-by: Bishoy Boktor <[email protected]>

* Address PR comments

Signed-off-by: Bishoy Boktor <[email protected]>

* Remove compatibility check code and tests, and changed some minor references

Signed-off-by: Bishoy Boktor <[email protected]>

* Minor OpenSearch reference

Signed-off-by: Bishoy Boktor <[email protected]>
  • Loading branch information
boktorbb authored Aug 20, 2021
1 parent 089c1bd commit c56751a
Show file tree
Hide file tree
Showing 95 changed files with 4,982 additions and 3,905 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
npm-debug.log
test/benchmarks
elasticsearch
opensearch
.git
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jspm_packages

package-lock.json

# elasticsearch repo or binary files
elasticsearch*
# opensearch repo or binary files
opensearch*

test/benchmarks/macro/fixtures/*

Expand Down
6 changes: 3 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jspm_packages

package-lock.json

# elasticsearch repo or binary files
elasticsearch*
# opensearch repo or binary files
opensearch*

# Generated typings, we don't commit them
# because we should copy them in the main .d.ts file
Expand All @@ -72,5 +72,5 @@ CODE_OF_CONDUCT.md
CONTRIBUTING.md

# CANARY-PACKAGE
api/kibana.d.ts
api/opensearch_dashboards.d.ts
# /CANARY-PACKAGE
84 changes: 42 additions & 42 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const kShutdown = Symbol('Shutdown')
const kSnapshot = Symbol('Snapshot')
const kTasks = Symbol('Tasks')

function ESAPI (opts) {
function OpenSearchAPI (opts) {
this[kConfigurationError] = opts.ConfigurationError
this[kCat] = null
this[kCluster] = null
Expand All @@ -106,47 +106,47 @@ function ESAPI (opts) {
this[kTasks] = null
}

ESAPI.prototype.bulk = bulkApi
ESAPI.prototype.clearScroll = clearScrollApi
ESAPI.prototype.count = countApi
ESAPI.prototype.create = createApi
ESAPI.prototype.delete = deleteApi
ESAPI.prototype.deleteByQuery = deleteByQueryApi
ESAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi
ESAPI.prototype.deleteScript = deleteScriptApi
ESAPI.prototype.exists = existsApi
ESAPI.prototype.existsSource = existsSourceApi
ESAPI.prototype.explain = explainApi
ESAPI.prototype.fieldCaps = fieldCapsApi
ESAPI.prototype.get = getApi
ESAPI.prototype.getScript = getScriptApi
ESAPI.prototype.getScriptContext = getScriptContextApi
ESAPI.prototype.getScriptLanguages = getScriptLanguagesApi
ESAPI.prototype.getSource = getSourceApi
ESAPI.prototype.index = indexApi
ESAPI.prototype.info = infoApi
ESAPI.prototype.mget = mgetApi
ESAPI.prototype.msearch = msearchApi
ESAPI.prototype.msearchTemplate = msearchTemplateApi
ESAPI.prototype.mtermvectors = mtermvectorsApi
ESAPI.prototype.ping = pingApi
ESAPI.prototype.putScript = putScriptApi
ESAPI.prototype.rankEval = rankEvalApi
ESAPI.prototype.reindex = reindexApi
ESAPI.prototype.reindexRethrottle = reindexRethrottleApi
ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
ESAPI.prototype.scroll = scrollApi
ESAPI.prototype.search = searchApi
ESAPI.prototype.searchShards = searchShardsApi
ESAPI.prototype.searchTemplate = searchTemplateApi
ESAPI.prototype.termsEnum = termsEnumApi
ESAPI.prototype.termvectors = termvectorsApi
ESAPI.prototype.update = updateApi
ESAPI.prototype.updateByQuery = updateByQueryApi
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
OpenSearchAPI.prototype.bulk = bulkApi
OpenSearchAPI.prototype.clearScroll = clearScrollApi
OpenSearchAPI.prototype.count = countApi
OpenSearchAPI.prototype.create = createApi
OpenSearchAPI.prototype.delete = deleteApi
OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi
OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi
OpenSearchAPI.prototype.deleteScript = deleteScriptApi
OpenSearchAPI.prototype.exists = existsApi
OpenSearchAPI.prototype.existsSource = existsSourceApi
OpenSearchAPI.prototype.explain = explainApi
OpenSearchAPI.prototype.fieldCaps = fieldCapsApi
OpenSearchAPI.prototype.get = getApi
OpenSearchAPI.prototype.getScript = getScriptApi
OpenSearchAPI.prototype.getScriptContext = getScriptContextApi
OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi
OpenSearchAPI.prototype.getSource = getSourceApi
OpenSearchAPI.prototype.index = indexApi
OpenSearchAPI.prototype.info = infoApi
OpenSearchAPI.prototype.mget = mgetApi
OpenSearchAPI.prototype.msearch = msearchApi
OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi
OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi
OpenSearchAPI.prototype.ping = pingApi
OpenSearchAPI.prototype.putScript = putScriptApi
OpenSearchAPI.prototype.rankEval = rankEvalApi
OpenSearchAPI.prototype.reindex = reindexApi
OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi
OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
OpenSearchAPI.prototype.scroll = scrollApi
OpenSearchAPI.prototype.search = searchApi
OpenSearchAPI.prototype.searchShards = searchShardsApi
OpenSearchAPI.prototype.searchTemplate = searchTemplateApi
OpenSearchAPI.prototype.termsEnum = termsEnumApi
OpenSearchAPI.prototype.termvectors = termvectorsApi
OpenSearchAPI.prototype.update = updateApi
OpenSearchAPI.prototype.updateByQuery = updateByQueryApi
OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi

Object.defineProperties(ESAPI.prototype, {
Object.defineProperties(OpenSearchAPI.prototype, {
cat: {
get () {
if (this[kCat] === null) {
Expand Down Expand Up @@ -251,4 +251,4 @@ Object.defineProperties(ESAPI.prototype, {
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }
})

module.exports = ESAPI
module.exports = OpenSearchAPI
Loading

0 comments on commit c56751a

Please sign in to comment.