@certik/skynet 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.2
4
+
5
+ - BREAKING: remove appName from search.js interface
6
+
3
7
  ## 0.18.1
4
8
 
5
9
  - BREAKING: opensearch feature has been replaced by elastic search
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Skynet Shared JS library",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/search.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export function sendToSearch<T>(
2
- appName: string,
3
2
  indexPrefix: string,
4
3
  record: string,
5
4
  throws?: boolean,
package/search.js CHANGED
@@ -3,7 +3,7 @@ import { inline } from "./log.js";
3
3
  import { Client } from "@elastic/elasticsearch";
4
4
  import osModule from "os";
5
5
 
6
- export async function sendToSearch(appName, indexPrefix, record, throws = false) {
6
+ export async function sendToSearch(indexPrefix, record, throws = false) {
7
7
  const client = new Client({
8
8
  cloud: { id: process.env.SKYNET_ELASTICSEARCH_CLOUD_ID },
9
9
  auth: { apiKey: process.env.SKYNET_ELASTICSEARCH_API_KEY },
@@ -17,7 +17,7 @@ export async function sendToSearch(appName, indexPrefix, record, throws = false)
17
17
  try {
18
18
  await client.index({
19
19
  index: indexName,
20
- document: { app: appName, instance: osModule.hostname(), timestamp: now, record },
20
+ document: { instance: osModule.hostname(), timestamp: now, record },
21
21
  });
22
22
  } catch (err) {
23
23
  inline.error(err);