@syswatch/core 1.0.0 → 1.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ # @syswatch/core
2
+
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3ff9f37: correction type
package/jest.config.ts ADDED
@@ -0,0 +1,9 @@
1
+ import type { Config } from "jest";
2
+
3
+ const config: Config = {
4
+ preset: "ts-jest",
5
+ testEnvironment: "node",
6
+ testMatch: ["**/*.spec.ts"],
7
+ };
8
+
9
+ export default config;
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@syswatch/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc"
10
+ "build": "tsc",
11
+ "test": "jest"
11
12
  },
12
13
  "devDependencies": {
14
+ "@types/jest": "^30.0.0",
15
+ "jest": "^30.2.0",
16
+ "ts-jest": "^29.4.6",
13
17
  "typescript": "^5.0.0"
14
18
  }
15
19
  }
@@ -1,5 +1,4 @@
1
1
  import { SysWatch } from "./client";
2
- import { LogLevel } from "./types";
3
2
  import { Logs } from "./logs";
4
3
 
5
4
  // Mock global fetch
@@ -8,7 +7,7 @@ global.fetch = mockFetch;
8
7
 
9
8
  describe("SysWatch", () => {
10
9
  const apiKey = "test-api-key";
11
- const defaultBaseUrl = "http://localhost:8080/v1";
10
+ const defaultBaseUrl = "https://syswatchapp.discloud.app/v1";
12
11
 
13
12
  beforeEach(() => {
14
13
  mockFetch.mockClear();
@@ -32,7 +31,6 @@ describe("SysWatch", () => {
32
31
  apiKey,
33
32
  defaultMeta,
34
33
  defaultTags,
35
- environment: "staging",
36
34
  });
37
35
 
38
36
  expect(client["defaultMeta"]).toEqual(defaultMeta);
@@ -57,6 +55,7 @@ describe("SysWatch", () => {
57
55
  headers: {
58
56
  "Content-Type": "application/json",
59
57
  "x-api-key": apiKey,
58
+ "user-agent": "NodeJS SysWatch SDK ",
60
59
  },
61
60
  body: expect.stringContaining('"level":"INFO"'),
62
61
  })
@@ -110,6 +109,7 @@ describe("SysWatch", () => {
110
109
  headers: {
111
110
  "Content-Type": "application/json",
112
111
  "x-api-key": apiKey,
112
+ "user-agent": "NodeJS SysWatch SDK ",
113
113
  },
114
114
  body: expect.any(String),
115
115
  });
package/src/client.ts CHANGED
@@ -5,7 +5,6 @@ export interface SysWatchConfig {
5
5
  apiKey: string;
6
6
  defaultMeta?: Record<string, any>;
7
7
  defaultTags?: string[];
8
- environment?: string;
9
8
  }
10
9
 
11
10
  export class SysWatch {
package/jest.config.js DELETED
@@ -1,6 +0,0 @@
1
- /** @type {import('ts-jest').JestConfigWithTsJest} */
2
- module.exports = {
3
- preset: 'ts-jest',
4
- testEnvironment: 'node',
5
- testMatch: ['**/*.spec.ts'],
6
- };