@groqorg/common 1.0.3 → 1.0.5

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/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
- type Value = {
2
- state: string;
3
- value: number;
4
- };
5
- interface Color {
6
- red: Value;
7
- blue: Value;
8
- green: Value;
9
- }
10
- declare const color: Color;
11
- export default color;
1
+ export * from './errors/bad-request-error';
2
+ export * from './errors/custom-error';
3
+ export * from './errors/database-connection-error';
4
+ export * from './errors/not-authorized-error';
5
+ export * from './errors/not-found-error';
6
+ export * from './errors/request-validation-error';
7
+ export * from './middlewares/current-user';
8
+ export * from './middlewares/error-handler';
9
+ export * from './middlewares/require-auth';
10
+ export * from './middlewares/validate-request';
12
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACL,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAA;CAChB,CAAA;AAEL,UAAU,KAAK;IACX,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,QAAA,MAAM,KAAK,EAAE,KAaZ,CAAA;AAID,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,oCAAoC,CAAA;AAClD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,mCAAmC,CAAA;AAEjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA"}
package/build/index.js CHANGED
@@ -1,19 +1,27 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const color = {
4
- red: {
5
- state: 'processing',
6
- value: 100
7
- },
8
- blue: {
9
- state: 'processing',
10
- value: 100
11
- },
12
- green: {
13
- state: 'processing',
14
- value: 100
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
7
  }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
15
  };
17
- console.log(color);
18
- exports.default = color;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./errors/bad-request-error"), exports);
18
+ __exportStar(require("./errors/custom-error"), exports);
19
+ __exportStar(require("./errors/database-connection-error"), exports);
20
+ __exportStar(require("./errors/not-authorized-error"), exports);
21
+ __exportStar(require("./errors/not-found-error"), exports);
22
+ __exportStar(require("./errors/request-validation-error"), exports);
23
+ __exportStar(require("./middlewares/current-user"), exports);
24
+ __exportStar(require("./middlewares/error-handler"), exports);
25
+ __exportStar(require("./middlewares/require-auth"), exports);
26
+ __exportStar(require("./middlewares/validate-request"), exports);
19
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAWA,MAAM,KAAK,GAAU;IACjB,GAAG,EAAE;QACD,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;KACb;IACD,IAAI,EAAE;QACF,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;KACb;IACD,KAAK,EAAE;QACH,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;KACb;CACJ,CAAA;AAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AAElB,kBAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C;AAC1C,wDAAqC;AACrC,qEAAkD;AAClD,gEAA6C;AAC7C,2DAAwC;AACxC,oEAAiD;AAEjD,6DAA0C;AAC1C,8DAA2C;AAC3C,6DAA0C;AAC1C,iEAA8C"}
@@ -1 +1 @@
1
- {"version":3,"file":"current-user.d.ts","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI9D,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,WAAW,CAAC,EAAE,WAAW,CAAA;SAC5B;KACJ;CACJ;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,SAa1E,CAAA"}
1
+ {"version":3,"file":"current-user.d.ts","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK9D,UAAU,WAAW;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,WAAW,CAAC,EAAE,WAAW,CAAA;SAC5B;KACJ;CACJ;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,SAa1E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"current-user.js","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":";;;;;;AACA,gEAA8B;AAgBvB,MAAM,WAAW,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IAC3E,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;QACpB,OAAO,IAAI,EAAE,CAAA;IACjB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,OAAQ,CAAgB,CAAA;QAChF,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC;IAC9B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;IAEf,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAA;AAbY,QAAA,WAAW,eAavB"}
1
+ {"version":3,"file":"current-user.js","sourceRoot":"","sources":["../../src/middlewares/current-user.ts"],"names":[],"mappings":";;;;;;AACA,gEAA8B;AAiBvB,MAAM,WAAW,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IAC3E,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC;QACpB,OAAO,IAAI,EAAE,CAAA;IACjB,CAAC;IAED,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,sBAAG,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,OAAQ,CAAgB,CAAA;QAChF,GAAG,CAAC,WAAW,GAAG,OAAO,CAAC;IAC9B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;IAEf,CAAC;IAED,IAAI,EAAE,CAAC;AACX,CAAC,CAAA;AAbY,QAAA,WAAW,eAavB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groqorg/common",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -21,10 +21,10 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@types/cookie-session": "^2.0.49",
24
- "@types/express": "^5.0.6",
24
+ "@types/express": "^4.17.25",
25
25
  "@types/jsonwebtoken": "^9.0.10",
26
26
  "cookie-session": "^2.1.1",
27
- "express": "^5.2.1",
27
+ "express": "^4.22.1",
28
28
  "express-validator": "^7.3.1",
29
29
  "jsonwebtoken": "^9.0.3"
30
30
  }