@becollective/utils 2.0.5 → 2.0.7

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.
@@ -26,6 +26,8 @@ const fetchFeatureActive = async (feature, options) => {
26
26
  return isFeatureActive;
27
27
  };
28
28
  class FeatureFlag {
29
+ ttl;
30
+ expiry;
29
31
  constructor(ttl) {
30
32
  this.ttl = ttl || 1000 * 60 * 5; // default to 5 minutes
31
33
  this.expiry = Date.now() + ttl;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const subscriptions: {
2
2
  tierValues: {
3
3
  none: number;
4
4
  standard: number;
@@ -6,4 +6,4 @@ declare const _default: {
6
6
  pro: number;
7
7
  };
8
8
  };
9
- export default _default;
9
+ export default subscriptions;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
3
+ exports.subscriptions = void 0;
4
+ exports.subscriptions = {
4
5
  tierValues: {
5
6
  none: 0, // none of the below tiers
6
7
  standard: 1,
@@ -8,3 +9,4 @@ exports.default = {
8
9
  pro: 3,
9
10
  },
10
11
  };
12
+ exports.default = exports.subscriptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becollective/utils",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "Common utilities",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,4 +1,4 @@
1
- export default {
1
+ export const subscriptions = {
2
2
  tierValues: {
3
3
  none: 0, // none of the below tiers
4
4
  standard: 1,
@@ -6,3 +6,5 @@ export default {
6
6
  pro: 3,
7
7
  },
8
8
  };
9
+
10
+ export default subscriptions;
package/tsconfig.json CHANGED
@@ -1,19 +1,16 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "lib": ["es2020"],
4
- "target": "es2020",
5
- "module": "commonjs",
6
- "allowSyntheticDefaultImports": true,
4
+ "target": "es2022",
7
5
  "isolatedModules": true,
8
- "module": "node20",
6
+ "module": "node16",
9
7
  "moduleResolution": "node16",
10
8
  "declaration": true,
11
9
  "outDir": "./lib",
12
10
  "rootDir": "./src",
13
11
  "strict": true,
14
12
  "noImplicitAny": false,
15
- "types": ["node","jest"],
16
- "esModuleInterop": true
13
+ "types": ["node","jest"]
17
14
  },
18
15
  "include": ["src"],
19
16
  "exclude": ["node_modules", "**/tests/*", "setup.ts"]
Binary file