@kwiz/common 1.0.155 → 1.0.156

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.
@@ -1,16 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReleaseStatus = exports.IsLocalDev = exports.BuildNumber = void 0;
3
+ exports.ReleaseStatus = exports.IsProduction = exports.IsFastRing = exports.IsLocalDev = exports.BuildNumber = void 0;
4
4
  exports.SetDependencies = SetDependencies;
5
5
  exports.BuildNumber = "unset";
6
+ /** release status = dev */
6
7
  exports.IsLocalDev = false;
8
+ /** release status = fastring */
9
+ exports.IsFastRing = false;
10
+ /** release status is something else */
11
+ exports.IsProduction = true;
7
12
  exports.ReleaseStatus = "npm";
8
13
  function SetDependencies(params) {
9
14
  if (typeof params.BuildNumber === "string")
10
15
  exports.BuildNumber = params.BuildNumber;
11
- if (typeof params.IsLocalDev === "boolean")
12
- exports.IsLocalDev = params.IsLocalDev;
13
16
  if (typeof params.ReleaseStatus === "string")
14
17
  exports.ReleaseStatus = params.ReleaseStatus;
18
+ exports.IsLocalDev = exports.ReleaseStatus === "dev";
19
+ exports.IsFastRing = exports.ReleaseStatus === "fastring";
20
+ exports.IsProduction = exports.ReleaseStatus !== "dev" && exports.ReleaseStatus !== "fastring";
15
21
  }
16
22
  //# sourceMappingURL=_dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_dependencies.js","sourceRoot":"","sources":["../../src/_dependencies.ts"],"names":[],"mappings":";;;AAIA,0CAQC;AAXU,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,aAAa,GAAG,KAAK,CAAC;AACjC,SAAgB,eAAe,CAAC,MAI/B;IACG,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;QAAE,mBAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7E,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,SAAS;QAAE,kBAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC3E,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;QAAE,qBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACvF,CAAC"}
1
+ {"version":3,"file":"_dependencies.js","sourceRoot":"","sources":["../../src/_dependencies.ts"],"names":[],"mappings":";;;AAUA,0CASC;AAjBU,QAAA,WAAW,GAAG,OAAO,CAAC;AACjC,2BAA2B;AAChB,QAAA,UAAU,GAAG,KAAK,CAAC;AAC9B,gCAAgC;AACrB,QAAA,UAAU,GAAG,KAAK,CAAC;AAC9B,uCAAuC;AAC5B,QAAA,YAAY,GAAG,IAAI,CAAC;AACpB,QAAA,aAAa,GAAiB,KAAK,CAAC;AAC/C,SAAgB,eAAe,CAAC,MAG/B;IACG,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;QAAE,mBAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7E,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;QAAE,qBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IACnF,kBAAU,GAAG,qBAAa,KAAK,KAAK,CAAC;IACrC,kBAAU,GAAG,qBAAa,KAAK,UAAU,CAAC;IAC1C,oBAAY,GAAG,qBAAa,KAAK,KAAK,IAAI,qBAAa,KAAK,UAAU,CAAC;AAC3E,CAAC"}
package/lib/cjs/config.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.config = config;
4
4
  const _dependencies_1 = require("./_dependencies");
5
5
  const consolelogger_1 = require("./utils/consolelogger");
6
+ ;
6
7
  function config(params) {
7
8
  (0, _dependencies_1.SetDependencies)(params);
8
9
  function GetLogger(name) {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;AAGA,wBAeC;AAlBD,mDAAkD;AAClD,yDAAsD;AAEtD,SAAgB,MAAM,CAAC,MAKtB;IACG,IAAA,+BAAe,EAAC,MAAM,CAAC,CAAC;IACxB,SAAS,SAAS,CAAC,IAAY;QAC3B,OAAO,6BAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IACD,OAAO;QACH,SAAS;QACT,uEAAuE;QACvE,MAAM,EAAE,SAAS;KACpB,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":";;AAQA,wBAcC;AAtBD,mDAAkD;AAElD,yDAAsD;AAKrD,CAAC;AACF,SAAgB,MAAM,CAAC,MAItB;IACG,IAAA,+BAAe,EAAC,MAAM,CAAC,CAAC;IACxB,SAAS,SAAS,CAAC,IAAY;QAC3B,OAAO,6BAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IACD,OAAO;QACH,SAAS;QACT,uEAAuE;QACvE,MAAM,EAAE,SAAS;KACpB,CAAA;AACL,CAAC"}
@@ -1,12 +1,18 @@
1
1
  export var BuildNumber = "unset";
2
+ /** release status = dev */
2
3
  export var IsLocalDev = false;
4
+ /** release status = fastring */
5
+ export var IsFastRing = false;
6
+ /** release status is something else */
7
+ export var IsProduction = true;
3
8
  export var ReleaseStatus = "npm";
4
9
  export function SetDependencies(params) {
5
10
  if (typeof params.BuildNumber === "string")
6
11
  BuildNumber = params.BuildNumber;
7
- if (typeof params.IsLocalDev === "boolean")
8
- IsLocalDev = params.IsLocalDev;
9
12
  if (typeof params.ReleaseStatus === "string")
10
13
  ReleaseStatus = params.ReleaseStatus;
14
+ IsLocalDev = ReleaseStatus === "dev";
15
+ IsFastRing = ReleaseStatus === "fastring";
16
+ IsProduction = ReleaseStatus !== "dev" && ReleaseStatus !== "fastring";
11
17
  }
12
18
  //# sourceMappingURL=_dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_dependencies.js","sourceRoot":"","sources":["../../src/_dependencies.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,IAAI,WAAW,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,IAAI,UAAU,GAAG,KAAK,CAAC;AAC9B,MAAM,CAAC,IAAI,aAAa,GAAG,KAAK,CAAC;AACjC,MAAM,UAAU,eAAe,CAAC,MAI/B;IACG,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;QAAE,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7E,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,SAAS;QAAE,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC3E,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;QAAE,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACvF,CAAC"}
1
+ {"version":3,"file":"_dependencies.js","sourceRoot":"","sources":["../../src/_dependencies.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,WAAW,GAAG,OAAO,CAAC;AACjC,2BAA2B;AAC3B,MAAM,CAAC,IAAI,UAAU,GAAG,KAAK,CAAC;AAC9B,gCAAgC;AAChC,MAAM,CAAC,IAAI,UAAU,GAAG,KAAK,CAAC;AAC9B,uCAAuC;AACvC,MAAM,CAAC,IAAI,YAAY,GAAG,IAAI,CAAC;AAC/B,MAAM,CAAC,IAAI,aAAa,GAAiB,KAAK,CAAC;AAC/C,MAAM,UAAU,eAAe,CAAC,MAG/B;IACG,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;QAAE,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7E,IAAI,OAAO,MAAM,CAAC,aAAa,KAAK,QAAQ;QAAE,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IACnF,UAAU,GAAG,aAAa,KAAK,KAAK,CAAC;IACrC,UAAU,GAAG,aAAa,KAAK,UAAU,CAAC;IAC1C,YAAY,GAAG,aAAa,KAAK,KAAK,IAAI,aAAa,KAAK,UAAU,CAAC;AAC3E,CAAC"}
package/lib/esm/config.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { SetDependencies } from './_dependencies';
2
2
  import { ConsoleLogger } from './utils/consolelogger';
3
+ ;
3
4
  export function config(params) {
4
5
  SetDependencies(params);
5
6
  function GetLogger(name) {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,UAAU,MAAM,CAAC,MAKtB;IACG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,SAAS,CAAC,IAAY;QAC3B,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IACD,OAAO;QACH,SAAS;QACT,uEAAuE;QACvE,MAAM,EAAE,SAAS;KACpB,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKrD,CAAC;AACF,MAAM,UAAU,MAAM,CAAC,MAItB;IACG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,SAAS,CAAC,IAAY;QAC3B,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;IACD,OAAO;QACH,SAAS;QACT,uEAAuE;QACvE,MAAM,EAAE,SAAS;KACpB,CAAA;AACL,CAAC"}
@@ -1,8 +1,13 @@
1
+ import { releasetypes } from "./exports-index";
1
2
  export declare var BuildNumber: string;
3
+ /** release status = dev */
2
4
  export declare var IsLocalDev: boolean;
3
- export declare var ReleaseStatus: string;
5
+ /** release status = fastring */
6
+ export declare var IsFastRing: boolean;
7
+ /** release status is something else */
8
+ export declare var IsProduction: boolean;
9
+ export declare var ReleaseStatus: releasetypes;
4
10
  export declare function SetDependencies(params: {
5
11
  BuildNumber?: string;
6
- IsLocalDev?: boolean;
7
- ReleaseStatus?: string;
12
+ ReleaseStatus?: releasetypes;
8
13
  }): void;
@@ -1,9 +1,13 @@
1
+ import { releasetypes } from './exports-index';
1
2
  import { ConsoleLogger } from './utils/consolelogger';
2
- export declare function config(params: {
3
+ export interface iConfigParams {
3
4
  BuildNumber?: string;
4
- IsLocalDev?: boolean;
5
- ReleaseStatus?: string;
5
+ ReleaseStatus?: releasetypes;
6
+ }
7
+ export declare function config(params: iConfigParams & {
6
8
  ProjectName?: string;
9
+ /** @deprecated use ReleaseStatus="dev" */
10
+ IsLocalDev?: boolean;
7
11
  }): {
8
12
  GetLogger: (name: string) => ConsoleLogger;
9
13
  /** @deprecated exported as GetLogger, which is how is used anyways */
@@ -1,3 +1,4 @@
1
+ export type releasetypes = "dev" | "fastring" | "production" | "npm";
1
2
  export interface IDictionary<valueType> {
2
3
  [key: string]: valueType;
3
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwiz/common",
3
- "version": "1.0.155",
3
+ "version": "1.0.156",
4
4
  "description": "KWIZ common utilities and helpers for M365 platform",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.js",