@nsshunt/stsutils 1.14.7 → 1.15.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/build.sh ADDED
@@ -0,0 +1,29 @@
1
+ #!/bin/sh
2
+ rm -rf dist
3
+ rm -rf types
4
+ npm run build
5
+ RESULT=$?
6
+ if [ $RESULT -eq 0 ]; then
7
+ echo success build
8
+ npm run lint
9
+ RESULT=$?
10
+ if [ $RESULT -eq 0 ]; then
11
+ echo success lint
12
+ npm run test
13
+ RESULT=$?
14
+ if [ $RESULT -eq 0 ]; then
15
+ echo success test
16
+ git commit -a -m "changed"
17
+ npm version patch
18
+ npm i
19
+ git commit -a -m "changed"
20
+ git push
21
+ else
22
+ echo failed test
23
+ fi
24
+ else
25
+ echo failed lint
26
+ fi
27
+ else
28
+ echo failed build
29
+ fi
package/dist/index.js CHANGED
@@ -21,15 +21,39 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
21
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.$stsgd = void 0;
24
+ exports.$stsgdf = exports.$stsgd = void 0;
25
25
  __exportStar(require("./errorhandling"), exports);
26
26
  __exportStar(require("./stsoptionsbase"), exports);
27
27
  __exportStar(require("./sleep"), exports);
28
28
  __exportStar(require("./validate"), exports);
29
29
  __exportStar(require("./oauth2terms"), exports);
30
- const _stsgd = {};
31
- function $stsgd() {
32
- return _stsgd;
30
+ //export type myfunc = () => Record<string, any>;
31
+ exports.$stsgd = {};
32
+ function $stsgdf() {
33
+ return exports.$stsgd;
33
34
  }
34
- exports.$stsgd = $stsgd;
35
+ exports.$stsgdf = $stsgdf;
36
+ /*
37
+ declare global {
38
+ var $stsgd: Record<string, any>;
39
+ }
40
+
41
+ export function InitGlobalData(): void {
42
+ //global.$stsgd = _stsgd;
43
+ global.$stsgd = { };
44
+ }
45
+ */
46
+ /*
47
+ declare global {
48
+ var $stsgd: Record<string, any>;
49
+ var $stsgfex: myfunc;
50
+ }
51
+
52
+ export function InitGlobalData(): void {
53
+ global.$stsgd = _stsgd;
54
+ global.$stsgfex = (): Record<string, any> => {
55
+ return _stsgd;
56
+ }
57
+ }
58
+ */
35
59
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;;;;;;;;;;;;;;;AAMF,kDAA+B;AAC/B,mDAAgC;AAChC,0CAAuB;AACvB,6CAA0B;AAC1B,gDAA6B;AAE7B,MAAM,MAAM,GAAwB,EAAG,CAAC;AAExC,SAAgB,MAAM;IACrB,OAAO,MAA2B,CAAC;AACpC,CAAC;AAFD,wBAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;;;;;;;;;;;;;;;AAMF,kDAA+B;AAC/B,mDAAgC;AAChC,0CAAuB;AACvB,6CAA0B;AAC1B,gDAA6B;AAE7B,iDAAiD;AAEpC,QAAA,MAAM,GAAwB,EAAG,CAAC;AAE/C,SAAgB,OAAO;IACtB,OAAO,cAA2B,CAAC;AACpC,CAAC;AAFD,0BAEC;AAED;;;;;;;;;EASE;AAEF;;;;;;;;;;;;EAYE"}
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@nsshunt/stsutils",
3
- "version": "1.14.7",
3
+ "version": "1.15.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "./types/index.d.ts",
7
-
8
7
  "scripts": {
9
8
  "lint": "eslint . --ext js,jsx,ts,tsx --fix",
10
9
  "test": "jest --detectOpenHandles --no-cache",
@@ -25,21 +24,17 @@
25
24
  "parser": "@babel/eslint-parser"
26
25
  },
27
26
  "devDependencies": {
28
- "@babel/core": "^7.17.9",
29
- "@babel/eslint-parser": "^7.17.0",
30
- "@babel/plugin-proposal-class-properties": "^7.16.7",
31
- "@babel/plugin-proposal-private-methods": "^7.16.11",
32
- "@babel/preset-env": "^7.16.11",
33
- "@babel/preset-typescript": "^7.16.7",
34
- "@types/jest": "^27.4.1",
35
- "@typescript-eslint/eslint-plugin": "^5.21.0",
36
- "@typescript-eslint/parser": "^5.21.0",
27
+ "@babel/preset-env": "^7.18.2",
28
+ "@babel/preset-typescript": "^7.17.12",
29
+ "@tsconfig/node18": "^1.0.0",
37
30
  "@types/debug": "^4.1.7",
38
- "eslint": "^8.14.0",
31
+ "@types/jest": "^27.5.1",
32
+ "@typescript-eslint/eslint-plugin": "^5.27.0",
33
+ "@typescript-eslint/parser": "^5.27.0",
34
+ "eslint": "^8.16.0",
39
35
  "jest": "^28.0.2",
40
36
  "supertest": "^6.2.2",
41
- "typescript": "^4.6.4",
42
- "@tsconfig/node18": "^1.0.0"
37
+ "typescript": "^4.7.2"
43
38
  },
44
39
  "dependencies": {
45
40
  "ajv": "^8.11.0",
package/src/index.ts CHANGED
@@ -16,8 +16,35 @@ export * from './sleep'
16
16
  export * from './validate'
17
17
  export * from './oauth2terms'
18
18
 
19
- const _stsgd: Record<string, any> = { };
19
+ //export type myfunc = () => Record<string, any>;
20
20
 
21
- export function $stsgd<T>(): Record<string, T> {
22
- return _stsgd as Record<string, T>;
21
+ export const $stsgd: Record<string, any> = { };
22
+
23
+ export function $stsgdf<T>(): Record<string, T> {
24
+ return $stsgd as Record<string, T>;
25
+ }
26
+
27
+ /*
28
+ declare global {
29
+ var $stsgd: Record<string, any>;
30
+ }
31
+
32
+ export function InitGlobalData(): void {
33
+ //global.$stsgd = _stsgd;
34
+ global.$stsgd = { };
35
+ }
36
+ */
37
+
38
+ /*
39
+ declare global {
40
+ var $stsgd: Record<string, any>;
41
+ var $stsgfex: myfunc;
42
+ }
43
+
44
+ export function InitGlobalData(): void {
45
+ global.$stsgd = _stsgd;
46
+ global.$stsgfex = (): Record<string, any> => {
47
+ return _stsgd;
48
+ }
23
49
  }
50
+ */
package/types/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from './stsoptionsbase';
6
6
  export * from './sleep';
7
7
  export * from './validate';
8
8
  export * from './oauth2terms';
9
- export declare function $stsgd<T>(): Record<string, T>;
9
+ export declare const $stsgd: Record<string, any>;
10
+ export declare function $stsgdf<T>(): Record<string, T>;
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,UAAU;IACvB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,UAAU,GAAG,SAAS,CAAA;CAC5C;AAED,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAI7B,wBAAgB,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAE7C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,UAAU;IACvB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,UAAU,GAAG,SAAS,CAAA;CAC5C;AAED,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAI7B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAO,CAAC;AAE/C,wBAAgB,OAAO,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAE9C"}
package/types/z1.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export interface app {
2
- id: string;
3
- val: number;
4
- }
5
- export declare function $stsgd<T>(): Record<string, T>;
6
- export declare function $stsga(): app;
7
- export declare function $setstsga(): void;
8
- //# sourceMappingURL=z1.d.ts.map
package/types/z1.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"z1.d.ts","sourceRoot":"","sources":["../src/z1.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAE7C;AAED,wBAAgB,MAAM,IAAI,GAAG,CAE5B;AAED,wBAAgB,SAAS,IAAI,IAAI,CAKhC"}
package/types/z2.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function DoSomeWork(val: number): void;
2
- //# sourceMappingURL=z2.d.ts.map
package/types/z2.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"z2.d.ts","sourceRoot":"","sources":["../src/z2.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,QAGrC"}
package/types/z3.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=z3.d.ts.map
package/types/z3.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"z3.d.ts","sourceRoot":"","sources":["../src/z3.ts"],"names":[],"mappings":""}