@nsshunt/stsappframework 3.1.124 → 3.1.125

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.
@@ -2,6 +2,33 @@
2
2
  /* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
3
3
  /* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ const stsutils_1 = require("@nsshunt/stsutils");
6
+ class SomeClass {
7
+ #configValue = 1;
8
+ DoSomethingWithConfigValue = async (n) => {
9
+ await (0, stsutils_1.Sleep)(500);
10
+ return n;
11
+ };
12
+ SomeFunc = async () => {
13
+ console.log(`Initial Result: [${await this.DoSomethingWithConfigValue(this.#configValue)}]`);
14
+ const configValueSnapshot = this.#configValue;
15
+ await (0, stsutils_1.Sleep)(1000);
16
+ return configValueSnapshot;
17
+ };
18
+ SetValue = (v) => {
19
+ this.#configValue = v;
20
+ return this;
21
+ };
22
+ }
23
+ const a = new SomeClass();
24
+ (async () => {
25
+ const ap = a.SetValue(10).SomeFunc();
26
+ const bp = a.SetValue(20).SomeFunc();
27
+ const cp = a.SetValue(30).SomeFunc();
28
+ console.log(await ap);
29
+ console.log(await bp);
30
+ console.log(await cp);
31
+ })();
5
32
  /*
6
33
  const someFunc = (val: number, ecb: (message: any) => void): Promise<number> => {
7
34
  return new Promise(async (resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"promiseTesting.js","sourceRoot":"","sources":["../../src/testing/promiseTesting.ts"],"names":[],"mappings":";AAAA,kDAAkD,CAAE,UAAU;AAC9D,iDAAiD,CAAE,UAAU;;AAK7D;;;;;;;;;;;;;;;;EAgBE;AAEF;;;;;;;;;;EAUE;AAEF;;;;;;;;;;;;;;;;EAgBE"}
1
+ {"version":3,"file":"promiseTesting.js","sourceRoot":"","sources":["../../src/testing/promiseTesting.ts"],"names":[],"mappings":";AAAA,kDAAkD,CAAE,UAAU;AAC9D,iDAAiD,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E;AAEF;;;;;;;;;;;;;;;;EAgBE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsappframework",
3
- "version": "3.1.124",
3
+ "version": "3.1.125",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "./types/index.d.ts",
@@ -34,24 +34,24 @@
34
34
  "@types/jest": "^29.5.12",
35
35
  "@types/jsonwebtoken": "^9.0.6",
36
36
  "@types/uuid": "^9.0.8",
37
- "@typescript-eslint/eslint-plugin": "^7.12.0",
38
- "@typescript-eslint/parser": "^7.12.0",
37
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
38
+ "@typescript-eslint/parser": "^7.13.1",
39
39
  "eslint": "^8.57.0",
40
40
  "jest": "^29.7.0",
41
41
  "testcontainers": "^10.9.0",
42
42
  "typescript": "^5.4.5",
43
- "vite": "^5.2.13",
43
+ "vite": "^5.3.1",
44
44
  "vitest": "^1.6.0"
45
45
  },
46
46
  "dependencies": {
47
- "@grpc/grpc-js": "^1.10.8",
47
+ "@grpc/grpc-js": "^1.10.9",
48
48
  "@grpc/proto-loader": "^0.7.13",
49
49
  "@influxdata/influxdb-client": "^1.33.2",
50
50
  "@influxdata/influxdb-client-apis": "^1.33.2",
51
- "@nsshunt/stsconfig": "^1.25.132",
52
- "@nsshunt/stsdatamanagement": "^1.18.59",
53
- "@nsshunt/stsobservability": "^1.0.30",
54
- "@nsshunt/stsutils": "^1.16.61",
51
+ "@nsshunt/stsconfig": "^1.25.133",
52
+ "@nsshunt/stsdatamanagement": "^1.18.60",
53
+ "@nsshunt/stsobservability": "^1.0.31",
54
+ "@nsshunt/stsutils": "^1.16.62",
55
55
  "@socket.io/cluster-adapter": "^0.2.2",
56
56
  "@socket.io/redis-streams-adapter": "^0.2.2",
57
57
  "@types/on-headers": "^1.0.3",
@@ -76,7 +76,7 @@
76
76
  "socket.io": "^4.7.5",
77
77
  "socket.io-client": "^4.7.5",
78
78
  "supports-color": "^9.4.0",
79
- "systeminformation": "^5.22.10",
79
+ "systeminformation": "^5.22.11",
80
80
  "tiny-emitter": "^2.1.0",
81
81
  "tough-cookie": "^4.1.4",
82
82
  "uuid": "^9.0.1",
@@ -4,6 +4,39 @@
4
4
  import { Sleep } from "@nsshunt/stsutils";
5
5
  import crypto from 'crypto';
6
6
 
7
+ class SomeClass {
8
+ #configValue = 1;
9
+
10
+ DoSomethingWithConfigValue = async (n: number) => {
11
+ await Sleep(500);
12
+ return n;
13
+ }
14
+
15
+ SomeFunc = async (): Promise<number> => {
16
+ console.log(`Initial Result: [${await this.DoSomethingWithConfigValue(this.#configValue)}]`);
17
+ const configValueSnapshot = this.#configValue;
18
+ await Sleep(1000);
19
+ return configValueSnapshot;
20
+ }
21
+
22
+ SetValue = (v: number): SomeClass => {
23
+ this.#configValue = v;
24
+ return this;
25
+ }
26
+ }
27
+
28
+ const a: SomeClass = new SomeClass();
29
+
30
+ (async () => {
31
+ const ap = a.SetValue(10).SomeFunc();
32
+ const bp = a.SetValue(20).SomeFunc();
33
+ const cp = a.SetValue(30).SomeFunc();
34
+
35
+ console.log(await ap);
36
+ console.log(await bp);
37
+ console.log(await cp);
38
+ })();
39
+
7
40
  /*
8
41
  const someFunc = (val: number, ecb: (message: any) => void): Promise<number> => {
9
42
  return new Promise(async (resolve, reject) => {