@flatfile/listener 0.3.0 → 0.3.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @flatfile/listener@0.3.0 build
2
+ > @flatfile/listener@0.3.1 build
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,10 +8,10 @@
8
8
  CLI Target: es2020
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 16.00 KB
12
- ESM ⚡️ Build success in 103ms
13
- CJS dist/index.js 17.94 KB
14
- CJS ⚡️ Build success in 106ms
11
+ CJS dist/index.js 17.81 KB
12
+ CJS ⚡️ Build success in 142ms
13
+ ESM dist/index.mjs 15.87 KB
14
+ ESM ⚡️ Build success in 144ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1679ms
16
+ DTS ⚡️ Build success in 2435ms
17
17
  DTS dist/index.d.ts 7.14 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @flatfile/listener
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9ca9443: Event Cache Cleanup
8
+
3
9
  ## 0.3.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -165,10 +165,8 @@ var EventCache = class {
165
165
  }
166
166
  async init(key, callback) {
167
167
  if (this.eventCache.get(key)) {
168
- console.log(`Cache hit for ${key}`);
169
168
  return this.eventCache.get(key);
170
169
  } else {
171
- console.log(`no cache hit for ${key}`);
172
170
  const result = await callback();
173
171
  this.eventCache.set(key, result);
174
172
  return result;
@@ -176,7 +174,6 @@ var EventCache = class {
176
174
  }
177
175
  async set(key, callback) {
178
176
  if (this.eventCache.get(key)) {
179
- console.log(`cache set for ${key}`);
180
177
  const result = await callback();
181
178
  this.eventCache.set(key, result);
182
179
  return result;
package/dist/index.mjs CHANGED
@@ -122,10 +122,8 @@ var EventCache = class {
122
122
  }
123
123
  async init(key, callback) {
124
124
  if (this.eventCache.get(key)) {
125
- console.log(`Cache hit for ${key}`);
126
125
  return this.eventCache.get(key);
127
126
  } else {
128
- console.log(`no cache hit for ${key}`);
129
127
  const result = await callback();
130
128
  this.eventCache.set(key, result);
131
129
  return result;
@@ -133,7 +131,6 @@ var EventCache = class {
133
131
  }
134
132
  async set(key, callback) {
135
133
  if (this.eventCache.get(key)) {
136
- console.log(`cache set for ${key}`);
137
134
  const result = await callback();
138
135
  this.eventCache.set(key, result);
139
136
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatfile/listener",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A PubSub Listener for configuring and using Flatfile",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,7 +32,7 @@
32
32
  "flat": "^5.0.2"
33
33
  },
34
34
  "peerDependencies": {
35
- "@flatfile/api": "^1.4.5",
35
+ "@flatfile/api": "^1.4.9",
36
36
  "axios": "^1.4.0"
37
37
  }
38
38
  }
@@ -3,10 +3,8 @@ export class EventCache {
3
3
 
4
4
  async init<T>(key: string, callback: () => Promise<T>): Promise<T> {
5
5
  if (this.eventCache.get(key)) {
6
- console.log(`Cache hit for ${key}`)
7
6
  return this.eventCache.get(key)
8
7
  } else {
9
- console.log(`no cache hit for ${key}`)
10
8
  const result = await callback()
11
9
  this.eventCache.set(key, result)
12
10
  return result
@@ -15,7 +13,6 @@ export class EventCache {
15
13
 
16
14
  async set<T>(key: string, callback: () => Promise<T>): Promise<T> {
17
15
  if (this.eventCache.get(key)) {
18
- console.log(`cache set for ${key}`)
19
16
  const result = await callback()
20
17
  this.eventCache.set(key, result)
21
18
  return result