@nsshunt/stsutils 1.14.6 → 1.15.0

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/.eslintrc.json CHANGED
@@ -23,8 +23,5 @@
23
23
  //"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
24
24
  "no-mixed-spaces-and-tabs": 0, // disable rule
25
25
  "@typescript-eslint/no-var-requires": "warn"
26
- },
27
- "globals": {
28
- "$stsapp": true
29
26
  }
30
27
  }
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,9 +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.$stsgdf = exports.$stsgd = void 0;
24
25
  __exportStar(require("./errorhandling"), exports);
25
26
  __exportStar(require("./stsoptionsbase"), exports);
26
27
  __exportStar(require("./sleep"), exports);
27
28
  __exportStar(require("./validate"), exports);
28
29
  __exportStar(require("./oauth2terms"), exports);
30
+ //export type myfunc = () => Record<string, any>;
31
+ exports.$stsgd = {};
32
+ function $stsgdf() {
33
+ return exports.$stsgd;
34
+ }
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
+ */
29
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"}
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.6",
3
+ "version": "1.15.0",
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
@@ -15,3 +15,36 @@ export * from './stsoptionsbase'
15
15
  export * from './sleep'
16
16
  export * from './validate'
17
17
  export * from './oauth2terms'
18
+
19
+ //export type myfunc = () => Record<string, any>;
20
+
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
+ }
49
+ }
50
+ */
package/types/index.d.ts CHANGED
@@ -6,4 +6,6 @@ export * from './stsoptionsbase';
6
6
  export * from './sleep';
7
7
  export * from './validate';
8
8
  export * from './oauth2terms';
9
+ export declare const $stsgd: Record<string, any>;
10
+ export declare function $stsgdf<T>(): Record<string, T>;
9
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"}
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"}