fetch-json-cache 1.2.55 → 1.2.56
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/dist/cjs/Cache.d.cts +3 -3
- package/dist/cjs/Cache.d.ts +3 -3
- package/dist/cjs/Cache.js.map +1 -1
- package/dist/cjs/get.d.cts +1 -1
- package/dist/cjs/get.d.ts +1 -1
- package/dist/cjs/get.js.map +1 -1
- package/dist/cjs/getSync.d.cts +1 -1
- package/dist/cjs/getSync.d.ts +1 -1
- package/dist/cjs/getSync.js.map +1 -1
- package/dist/cjs/types.d.cts +4 -4
- package/dist/cjs/types.d.ts +4 -4
- package/dist/cjs/update.d.cts +1 -1
- package/dist/cjs/update.d.ts +1 -1
- package/dist/cjs/update.js.map +1 -1
- package/dist/esm/Cache.d.ts +3 -3
- package/dist/esm/Cache.js.map +1 -1
- package/dist/esm/get.d.ts +1 -1
- package/dist/esm/get.js.map +1 -1
- package/dist/esm/getSync.d.ts +1 -1
- package/dist/esm/getSync.js.map +1 -1
- package/dist/esm/types.d.ts +4 -4
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/update.d.ts +1 -1
- package/dist/esm/update.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/Cache.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';
|
|
2
|
-
export default class Cache {
|
|
2
|
+
export default class Cache<T> {
|
|
3
3
|
cachePath: string;
|
|
4
4
|
options: CacheOptions;
|
|
5
5
|
constructor(cachePath: string, options?: CacheOptions);
|
|
6
|
-
get(endpoint: string, options?: GetOptions | GetCallback
|
|
7
|
-
getSync(endpoint: string):
|
|
6
|
+
get(endpoint: string, options?: GetOptions | GetCallback<T>, callback?: GetCallback<T>): undefined | Promise<object | null>;
|
|
7
|
+
getSync(endpoint: string): T | null;
|
|
8
8
|
clear(callback?: ClearCallback): undefined | Promise<undefined>;
|
|
9
9
|
}
|
package/dist/cjs/Cache.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';
|
|
2
|
-
export default class Cache {
|
|
2
|
+
export default class Cache<T> {
|
|
3
3
|
cachePath: string;
|
|
4
4
|
options: CacheOptions;
|
|
5
5
|
constructor(cachePath: string, options?: CacheOptions);
|
|
6
|
-
get(endpoint: string, options?: GetOptions | GetCallback
|
|
7
|
-
getSync(endpoint: string):
|
|
6
|
+
get(endpoint: string, options?: GetOptions | GetCallback<T>, callback?: GetCallback<T>): undefined | Promise<object | null>;
|
|
7
|
+
getSync(endpoint: string): T | null;
|
|
8
8
|
clear(callback?: ClearCallback): undefined | Promise<undefined>;
|
|
9
9
|
}
|
package/dist/cjs/Cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/Cache.ts"],"sourcesContent":["import rimraf2 from 'rimraf2';\n\nimport get from './get.ts';\nimport getSync from './getSync.ts';\nimport hash from './hash.ts';\nimport type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';\nimport update from './update.ts';\n\nexport default class Cache {\n cachePath: string;\n options: CacheOptions;\n\n constructor(cachePath: string, options: CacheOptions = {}) {\n if (!(this instanceof Cache)) throw new Error('Cache needs to be called with new');\n if (!cachePath) throw new Error('Cache needs cachePath');\n this.cachePath = cachePath;\n this.options = options;\n if (!this.options.hash) this.options.hash = hash;\n }\n\n get(endpoint: string, options?: GetOptions | GetCallback
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/Cache.ts"],"sourcesContent":["import rimraf2 from 'rimraf2';\n\nimport get from './get.ts';\nimport getSync from './getSync.ts';\nimport hash from './hash.ts';\nimport type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';\nimport update from './update.ts';\n\nexport default class Cache<T> {\n cachePath: string;\n options: CacheOptions;\n\n constructor(cachePath: string, options: CacheOptions = {}) {\n if (!(this instanceof Cache)) throw new Error('Cache needs to be called with new');\n if (!cachePath) throw new Error('Cache needs cachePath');\n this.cachePath = cachePath;\n this.options = options;\n if (!this.options.hash) this.options.hash = hash;\n }\n\n get(endpoint: string, options?: GetOptions | GetCallback<T>, callback?: GetCallback<T>): undefined | Promise<object | null> {\n if (typeof options === 'function') {\n callback = options as GetCallback<T>;\n options = null;\n }\n options = options || {};\n\n function worker(endpoint, options, callback) {\n (options as GetOptions).force ? update.call(this, endpoint, callback) : get.call(this, endpoint, callback);\n }\n\n if (typeof callback === 'function') return worker.call(this, endpoint, options, callback) as undefined;\n return new Promise((resolve, reject) => worker.call(this, endpoint, options, (err, json) => (err ? reject(err) : resolve(json))));\n }\n\n getSync(endpoint: string): T | null {\n // TODO: add async fetching\n return getSync.call(this, endpoint);\n }\n\n clear(callback?: ClearCallback): undefined | Promise<undefined> {\n function worker(callback) {\n // ignore errors since it is fine to delete a directory that doesn't exist from a cache standpoint\n rimraf2(this.cachePath, { disableGlob: true }, callback.bind(null, null));\n }\n\n if (typeof callback === 'function') return worker.call(this, callback);\n return new Promise((resolve, reject) =>\n worker.call(this, (err) => {\n err ? reject(err) : resolve(undefined);\n })\n );\n }\n}\n"],"names":["Cache","cachePath","options","Error","hash","get","endpoint","callback","worker","force","update","call","Promise","resolve","reject","err","json","getSync","clear","rimraf2","disableGlob","bind","undefined"],"mappings":";;;;;;;eAQqBA;;;8DARD;4DAEJ;gEACI;6DACH;+DAEE;;;;;;;;;;;;;;;;;;AAEJ,IAAA,AAAMA,sBAAN;;aAAMA,MAIPC,SAAiB;YAAEC,UAAAA,iEAAwB,CAAC;gCAJrCF;QAKjB,IAAI,CAAE,AAAI,YAAJ,IAAI,EALOA,QAKa,MAAM,IAAIG,MAAM;QAC9C,IAAI,CAACF,WAAW,MAAM,IAAIE,MAAM;QAChC,IAAI,CAACF,SAAS,GAAGA;QACjB,IAAI,CAACC,OAAO,GAAGA;QACf,IAAI,CAAC,IAAI,CAACA,OAAO,CAACE,IAAI,EAAE,IAAI,CAACF,OAAO,CAACE,IAAI,GAAGA,eAAI;;iBAT/BJ;IAYnBK,OAAAA,GAaC,GAbDA,SAAAA,IAAIC,QAAgB,EAAEJ,OAAqC,EAAEK,QAAyB;;QACpF,IAAI,OAAOL,YAAY,YAAY;YACjCK,WAAWL;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QAEtB,SAASM,OAAOF,QAAQ,EAAEJ,OAAO,EAAEK,QAAQ;YACxCL,QAAuBO,KAAK,GAAGC,iBAAM,CAACC,IAAI,CAAC,IAAI,EAAEL,UAAUC,YAAYF,cAAG,CAACM,IAAI,CAAC,IAAI,EAAEL,UAAUC;QACnG;QAEA,IAAI,OAAOA,aAAa,YAAY,OAAOC,OAAOG,IAAI,CAAC,IAAI,EAAEL,UAAUJ,SAASK;QAChF,OAAO,IAAIK,QAAQ,SAACC,SAASC;mBAAWN,OAAOG,IAAI,QAAOL,UAAUJ,SAAS,SAACa,KAAKC;uBAAUD,MAAMD,OAAOC,OAAOF,QAAQG;;;IAC3H;IAEAC,OAAAA,OAGC,GAHDA,SAAAA,QAAQX,QAAgB;QACtB,2BAA2B;QAC3B,OAAOW,kBAAO,CAACN,IAAI,CAAC,IAAI,EAAEL;IAC5B;IAEAY,OAAAA,KAYC,GAZDA,SAAAA,MAAMX,QAAwB;;QAC5B,SAASC,OAAOD,QAAQ;YACtB,kGAAkG;YAClGY,IAAAA,gBAAO,EAAC,IAAI,CAAClB,SAAS,EAAE;gBAAEmB,aAAa;YAAK,GAAGb,SAASc,IAAI,CAAC,MAAM;QACrE;QAEA,IAAI,OAAOd,aAAa,YAAY,OAAOC,OAAOG,IAAI,CAAC,IAAI,EAAEJ;QAC7D,OAAO,IAAIK,QAAQ,SAACC,SAASC;mBAC3BN,OAAOG,IAAI,QAAO,SAACI;gBACjBA,MAAMD,OAAOC,OAAOF,QAAQS;YAC9B;;IAEJ;WA5CmBtB"}
|
package/dist/cjs/get.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GetCallback } from './types.ts';
|
|
2
|
-
export default function getCache(endpoint: string, callback: GetCallback): undefined;
|
|
2
|
+
export default function getCache<T>(endpoint: string, callback: GetCallback<T>): undefined;
|
package/dist/cjs/get.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GetCallback } from './types.ts';
|
|
2
|
-
export default function getCache(endpoint: string, callback: GetCallback): undefined;
|
|
2
|
+
export default function getCache<T>(endpoint: string, callback: GetCallback<T>): undefined;
|
package/dist/cjs/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/get.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport path from 'path';\n\nimport update from './update.ts';\n\ninterface GetError {\n code?: string;\n}\n\ninterface GetHeaders {\n etag?: string;\n}\n\nimport type { GetCallback } from './types.ts';\n\nexport default function getCache(endpoint: string, callback: GetCallback): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n fs.readFile(fullPath, (err, contents) => {\n // doesn't exist so create\n if (err) {\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n }\n // check existing if etag changed and if so, recache\n else {\n const record = JSON.parse(contents.toString());\n get(endpoint).head((err, res) => {\n // not accessible\n if (err) {\n if ((err as GetError).code === 'ENOTFOUND' || err.message.indexOf('routines:SSL23_GET_SERVER_HELLO') >= 0) return callback(null, record.body);\n return callback(err);\n }\n if ((res.headers as GetHeaders).etag === record.headers.etag) return callback(null, record.body);\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n });\n }\n });\n}\n"],"names":["getCache","endpoint","callback","fullPath","path","join","cachePath","options","hash","fs","readFile","err","contents","update","call","json","record","JSON","parse","toString","get","head","res","code","message","indexOf","body","headers","etag"],"mappings":";;;;+BAgBA;;;eAAwBA;;;yDAhBT;gEACC;2DACC;+DAEE;;;;;;AAYJ,SAASA,
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/get.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport path from 'path';\n\nimport update from './update.ts';\n\ninterface GetError {\n code?: string;\n}\n\ninterface GetHeaders {\n etag?: string;\n}\n\nimport type { GetCallback } from './types.ts';\n\nexport default function getCache<T>(endpoint: string, callback: GetCallback<T>): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n fs.readFile(fullPath, (err, contents) => {\n // doesn't exist so create\n if (err) {\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n }\n // check existing if etag changed and if so, recache\n else {\n const record = JSON.parse(contents.toString());\n get(endpoint).head((err, res) => {\n // not accessible\n if (err) {\n if ((err as GetError).code === 'ENOTFOUND' || err.message.indexOf('routines:SSL23_GET_SERVER_HELLO') >= 0) return callback(null, record.body);\n return callback(err);\n }\n if ((res.headers as GetHeaders).etag === record.headers.etag) return callback(null, record.body);\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n });\n }\n });\n}\n"],"names":["getCache","endpoint","callback","fullPath","path","join","cachePath","options","hash","fs","readFile","err","contents","update","call","json","record","JSON","parse","toString","get","head","res","code","message","indexOf","body","headers","etag"],"mappings":";;;;+BAgBA;;;eAAwBA;;;yDAhBT;gEACC;2DACC;+DAEE;;;;;;AAYJ,SAASA,SAAYC,QAAgB,EAAEC,QAAwB;;IAC5E,IAAMC,WAAWC,aAAI,CAACC,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,AAAC,GAA8B,OAA5B,IAAI,CAACC,OAAO,CAACC,IAAI,CAACP,WAAU;IAC1EQ,WAAE,CAACC,QAAQ,CAACP,UAAU,SAACQ,KAAKC;QAC1B,0BAA0B;QAC1B,IAAID,KAAK;YACPE,iBAAM,CAACC,IAAI,QAAOb,UAAU,SAACU,KAAKI;gBAChCJ,MAAMT,SAASS,OAAOT,SAAS,MAAMa;YACvC;QACF,OAEK;YACH,IAAMC,SAASC,KAAKC,KAAK,CAACN,SAASO,QAAQ;YAC3CC,IAAAA,kBAAG,EAACnB,UAAUoB,IAAI,CAAC,SAACV,KAAKW;gBACvB,iBAAiB;gBACjB,IAAIX,KAAK;oBACP,IAAI,AAACA,IAAiBY,IAAI,KAAK,eAAeZ,IAAIa,OAAO,CAACC,OAAO,CAAC,sCAAsC,GAAG,OAAOvB,SAAS,MAAMc,OAAOU,IAAI;oBAC5I,OAAOxB,SAASS;gBAClB;gBACA,IAAI,AAACW,IAAIK,OAAO,CAAgBC,IAAI,KAAKZ,OAAOW,OAAO,CAACC,IAAI,EAAE,OAAO1B,SAAS,MAAMc,OAAOU,IAAI;gBAC/Fb,iBAAM,CAACC,IAAI,QAAOb,UAAU,SAACU,KAAKI;oBAChCJ,MAAMT,SAASS,OAAOT,SAAS,MAAMa;gBACvC;YACF;QACF;IACF;AACF"}
|
package/dist/cjs/getSync.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function getCacheAsync(endpoint: string):
|
|
1
|
+
export default function getCacheAsync<T>(endpoint: string): T;
|
package/dist/cjs/getSync.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function getCacheAsync(endpoint: string):
|
|
1
|
+
export default function getCacheAsync<T>(endpoint: string): T;
|
package/dist/cjs/getSync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/getSync.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nexport default function getCacheAsync(endpoint: string):
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/getSync.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nexport default function getCacheAsync<T>(endpoint: string): T {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n try {\n const contents = fs.readFileSync(fullPath, 'utf8');\n const record = JSON.parse(contents.toString());\n return record.body;\n } catch (_err) {\n return null;\n }\n}\n"],"names":["getCacheAsync","endpoint","fullPath","path","join","cachePath","options","hash","contents","fs","readFileSync","record","JSON","parse","toString","body","_err"],"mappings":";;;;+BAGA;;;eAAwBA;;;yDAHT;2DACE;;;;;;AAEF,SAASA,cAAiBC,QAAgB;IACvD,IAAMC,WAAWC,aAAI,CAACC,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,AAAC,GAA8B,OAA5B,IAAI,CAACC,OAAO,CAACC,IAAI,CAACN,WAAU;IAC1E,IAAI;QACF,IAAMO,WAAWC,WAAE,CAACC,YAAY,CAACR,UAAU;QAC3C,IAAMS,SAASC,KAAKC,KAAK,CAACL,SAASM,QAAQ;QAC3C,OAAOH,OAAOI,IAAI;IACpB,EAAE,OAAOC,MAAM;QACb,OAAO;IACT;AACF"}
|
package/dist/cjs/types.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface Record {
|
|
1
|
+
export interface Record<T> {
|
|
2
2
|
headers: object;
|
|
3
|
-
body:
|
|
3
|
+
body: T;
|
|
4
4
|
}
|
|
5
5
|
export interface CacheOptions {
|
|
6
6
|
hash?: (string: string) => string;
|
|
@@ -8,6 +8,6 @@ export interface CacheOptions {
|
|
|
8
8
|
export interface GetOptions {
|
|
9
9
|
force?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export type GetCallback = (error?: Error,
|
|
11
|
+
export type GetCallback<T> = (error?: Error, result?: T) => undefined;
|
|
12
12
|
export type ClearCallback = (error?: Error) => undefined;
|
|
13
|
-
export type UpdateCallback = (error?: Error,
|
|
13
|
+
export type UpdateCallback<T> = (error?: Error, result?: T) => undefined;
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface Record {
|
|
1
|
+
export interface Record<T> {
|
|
2
2
|
headers: object;
|
|
3
|
-
body:
|
|
3
|
+
body: T;
|
|
4
4
|
}
|
|
5
5
|
export interface CacheOptions {
|
|
6
6
|
hash?: (string: string) => string;
|
|
@@ -8,6 +8,6 @@ export interface CacheOptions {
|
|
|
8
8
|
export interface GetOptions {
|
|
9
9
|
force?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export type GetCallback = (error?: Error,
|
|
11
|
+
export type GetCallback<T> = (error?: Error, result?: T) => undefined;
|
|
12
12
|
export type ClearCallback = (error?: Error) => undefined;
|
|
13
|
-
export type UpdateCallback = (error?: Error,
|
|
13
|
+
export type UpdateCallback<T> = (error?: Error, result?: T) => undefined;
|
package/dist/cjs/update.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { UpdateCallback } from './types.ts';
|
|
2
|
-
export default function update(endpoint: string, callback: UpdateCallback): undefined;
|
|
2
|
+
export default function update<T>(endpoint: string, callback: UpdateCallback<T>): undefined;
|
package/dist/cjs/update.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { UpdateCallback } from './types.ts';
|
|
2
|
-
export default function update(endpoint: string, callback: UpdateCallback): undefined;
|
|
2
|
+
export default function update<T>(endpoint: string, callback: UpdateCallback<T>): undefined;
|
package/dist/cjs/update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/update.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport mkdirp from 'mkdirp-classic';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\nimport tempSuffix from 'temp-suffix';\n\nimport type { Record, UpdateCallback } from './types.ts';\n\nexport default function update(endpoint: string, callback: UpdateCallback): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n\n mkdirp(this.cachePath, (err) => {\n if (err && err.code !== 'EEXIST') return callback(err);\n\n get(endpoint).json((err, res) => {\n if (err) return callback(err);\n const record = { headers: res.headers, body: res.body } as Record
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/update.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport mkdirp from 'mkdirp-classic';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\nimport tempSuffix from 'temp-suffix';\n\nimport type { Record, UpdateCallback } from './types.ts';\n\nexport default function update<T>(endpoint: string, callback: UpdateCallback<T>): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n\n mkdirp(this.cachePath, (err) => {\n if (err && err.code !== 'EEXIST') return callback(err);\n\n get(endpoint).json((err, res) => {\n if (err) return callback(err);\n const record = { headers: res.headers, body: res.body } as Record<T>;\n const tempFile = `${fullPath}-${tempSuffix()}`;\n\n const queue = new Queue(1);\n queue.defer(fs.writeFile.bind(null, tempFile, JSON.stringify(record), 'utf8'));\n queue.defer((cb) => rimraf2(fullPath, { disableGlob: true }, cb.bind(null, null)));\n queue.defer(fs.rename.bind(null, tempFile, fullPath));\n queue.await((err) => {\n if (!err) return callback(null, record.body);\n // cleanup the temp file if the operation failed\n rimraf2(tempFile, { disableGlob: true }, callback.bind(err));\n });\n });\n });\n}\n"],"names":["update","endpoint","callback","fullPath","path","join","cachePath","options","hash","mkdirp","err","code","get","json","res","record","headers","body","tempFile","tempSuffix","queue","Queue","defer","fs","writeFile","bind","JSON","stringify","cb","rimraf2","disableGlob","rename","await"],"mappings":";;;;+BAUA;;;eAAwBA;;;yDAVT;gEACC;oEACG;2DACF;8DACC;8DACE;iEACG;;;;;;AAIR,SAASA,OAAUC,QAAgB,EAAEC,QAA2B;IAC7E,IAAMC,WAAWC,aAAI,CAACC,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,AAAC,GAA8B,OAA5B,IAAI,CAACC,OAAO,CAACC,IAAI,CAACP,WAAU;IAE1EQ,IAAAA,sBAAM,EAAC,IAAI,CAACH,SAAS,EAAE,SAACI;QACtB,IAAIA,OAAOA,IAAIC,IAAI,KAAK,UAAU,OAAOT,SAASQ;QAElDE,IAAAA,kBAAG,EAACX,UAAUY,IAAI,CAAC,SAACH,KAAKI;YACvB,IAAIJ,KAAK,OAAOR,SAASQ;YACzB,IAAMK,SAAS;gBAAEC,SAASF,IAAIE,OAAO;gBAAEC,MAAMH,IAAIG,IAAI;YAAC;YACtD,IAAMC,WAAW,AAAC,GAAcC,OAAZhB,UAAS,KAAgB,OAAbgB,IAAAA,mBAAU;YAE1C,IAAMC,QAAQ,IAAIC,gBAAK,CAAC;YACxBD,MAAME,KAAK,CAACC,WAAE,CAACC,SAAS,CAACC,IAAI,CAAC,MAAMP,UAAUQ,KAAKC,SAAS,CAACZ,SAAS;YACtEK,MAAME,KAAK,CAAC,SAACM;uBAAOC,IAAAA,gBAAO,EAAC1B,UAAU;oBAAE2B,aAAa;gBAAK,GAAGF,GAAGH,IAAI,CAAC,MAAM;;YAC3EL,MAAME,KAAK,CAACC,WAAE,CAACQ,MAAM,CAACN,IAAI,CAAC,MAAMP,UAAUf;YAC3CiB,MAAMY,KAAK,CAAC,SAACtB;gBACX,IAAI,CAACA,KAAK,OAAOR,SAAS,MAAMa,OAAOE,IAAI;gBAC3C,gDAAgD;gBAChDY,IAAAA,gBAAO,EAACX,UAAU;oBAAEY,aAAa;gBAAK,GAAG5B,SAASuB,IAAI,CAACf;YACzD;QACF;IACF;AACF"}
|
package/dist/esm/Cache.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';
|
|
2
|
-
export default class Cache {
|
|
2
|
+
export default class Cache<T> {
|
|
3
3
|
cachePath: string;
|
|
4
4
|
options: CacheOptions;
|
|
5
5
|
constructor(cachePath: string, options?: CacheOptions);
|
|
6
|
-
get(endpoint: string, options?: GetOptions | GetCallback
|
|
7
|
-
getSync(endpoint: string):
|
|
6
|
+
get(endpoint: string, options?: GetOptions | GetCallback<T>, callback?: GetCallback<T>): undefined | Promise<object | null>;
|
|
7
|
+
getSync(endpoint: string): T | null;
|
|
8
8
|
clear(callback?: ClearCallback): undefined | Promise<undefined>;
|
|
9
9
|
}
|
package/dist/esm/Cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/Cache.ts"],"sourcesContent":["import rimraf2 from 'rimraf2';\n\nimport get from './get.ts';\nimport getSync from './getSync.ts';\nimport hash from './hash.ts';\nimport type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';\nimport update from './update.ts';\n\nexport default class Cache {\n cachePath: string;\n options: CacheOptions;\n\n constructor(cachePath: string, options: CacheOptions = {}) {\n if (!(this instanceof Cache)) throw new Error('Cache needs to be called with new');\n if (!cachePath) throw new Error('Cache needs cachePath');\n this.cachePath = cachePath;\n this.options = options;\n if (!this.options.hash) this.options.hash = hash;\n }\n\n get(endpoint: string, options?: GetOptions | GetCallback
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/Cache.ts"],"sourcesContent":["import rimraf2 from 'rimraf2';\n\nimport get from './get.ts';\nimport getSync from './getSync.ts';\nimport hash from './hash.ts';\nimport type { CacheOptions, ClearCallback, GetCallback, GetOptions } from './types.ts';\nimport update from './update.ts';\n\nexport default class Cache<T> {\n cachePath: string;\n options: CacheOptions;\n\n constructor(cachePath: string, options: CacheOptions = {}) {\n if (!(this instanceof Cache)) throw new Error('Cache needs to be called with new');\n if (!cachePath) throw new Error('Cache needs cachePath');\n this.cachePath = cachePath;\n this.options = options;\n if (!this.options.hash) this.options.hash = hash;\n }\n\n get(endpoint: string, options?: GetOptions | GetCallback<T>, callback?: GetCallback<T>): undefined | Promise<object | null> {\n if (typeof options === 'function') {\n callback = options as GetCallback<T>;\n options = null;\n }\n options = options || {};\n\n function worker(endpoint, options, callback) {\n (options as GetOptions).force ? update.call(this, endpoint, callback) : get.call(this, endpoint, callback);\n }\n\n if (typeof callback === 'function') return worker.call(this, endpoint, options, callback) as undefined;\n return new Promise((resolve, reject) => worker.call(this, endpoint, options, (err, json) => (err ? reject(err) : resolve(json))));\n }\n\n getSync(endpoint: string): T | null {\n // TODO: add async fetching\n return getSync.call(this, endpoint);\n }\n\n clear(callback?: ClearCallback): undefined | Promise<undefined> {\n function worker(callback) {\n // ignore errors since it is fine to delete a directory that doesn't exist from a cache standpoint\n rimraf2(this.cachePath, { disableGlob: true }, callback.bind(null, null));\n }\n\n if (typeof callback === 'function') return worker.call(this, callback);\n return new Promise((resolve, reject) =>\n worker.call(this, (err) => {\n err ? reject(err) : resolve(undefined);\n })\n );\n }\n}\n"],"names":["rimraf2","get","getSync","hash","update","Cache","endpoint","options","callback","worker","force","call","Promise","resolve","reject","err","json","clear","cachePath","disableGlob","bind","undefined","Error"],"mappings":"AAAA,OAAOA,aAAa,UAAU;AAE9B,OAAOC,SAAS,WAAW;AAC3B,OAAOC,aAAa,eAAe;AACnC,OAAOC,UAAU,YAAY;AAE7B,OAAOC,YAAY,cAAc;AAElB,IAAA,AAAMC,QAAN,MAAMA;IAYnBJ,IAAIK,QAAgB,EAAEC,OAAqC,EAAEC,QAAyB,EAAsC;QAC1H,IAAI,OAAOD,YAAY,YAAY;YACjCC,WAAWD;YACXA,UAAU;QACZ;QACAA,UAAUA,WAAW,CAAC;QAEtB,SAASE,OAAOH,QAAQ,EAAEC,OAAO,EAAEC,QAAQ;YACxCD,QAAuBG,KAAK,GAAGN,OAAOO,IAAI,CAAC,IAAI,EAAEL,UAAUE,YAAYP,IAAIU,IAAI,CAAC,IAAI,EAAEL,UAAUE;QACnG;QAEA,IAAI,OAAOA,aAAa,YAAY,OAAOC,OAAOE,IAAI,CAAC,IAAI,EAAEL,UAAUC,SAASC;QAChF,OAAO,IAAII,QAAQ,CAACC,SAASC,SAAWL,OAAOE,IAAI,CAAC,IAAI,EAAEL,UAAUC,SAAS,CAACQ,KAAKC,OAAUD,MAAMD,OAAOC,OAAOF,QAAQG;IAC3H;IAEAd,QAAQI,QAAgB,EAAY;QAClC,2BAA2B;QAC3B,OAAOJ,QAAQS,IAAI,CAAC,IAAI,EAAEL;IAC5B;IAEAW,MAAMT,QAAwB,EAAkC;QAC9D,SAASC,OAAOD,QAAQ;YACtB,kGAAkG;YAClGR,QAAQ,IAAI,CAACkB,SAAS,EAAE;gBAAEC,aAAa;YAAK,GAAGX,SAASY,IAAI,CAAC,MAAM;QACrE;QAEA,IAAI,OAAOZ,aAAa,YAAY,OAAOC,OAAOE,IAAI,CAAC,IAAI,EAAEH;QAC7D,OAAO,IAAII,QAAQ,CAACC,SAASC,SAC3BL,OAAOE,IAAI,CAAC,IAAI,EAAE,CAACI;gBACjBA,MAAMD,OAAOC,OAAOF,QAAQQ;YAC9B;IAEJ;IAxCA,YAAYH,SAAiB,EAAEX,UAAwB,CAAC,CAAC,CAAE;QACzD,IAAI,CAAE,CAAA,IAAI,YAAYF,KAAI,GAAI,MAAM,IAAIiB,MAAM;QAC9C,IAAI,CAACJ,WAAW,MAAM,IAAII,MAAM;QAChC,IAAI,CAACJ,SAAS,GAAGA;QACjB,IAAI,CAACX,OAAO,GAAGA;QACf,IAAI,CAAC,IAAI,CAACA,OAAO,CAACJ,IAAI,EAAE,IAAI,CAACI,OAAO,CAACJ,IAAI,GAAGA;IAC9C;AAmCF;AA7CA,SAAqBE,mBA6CpB"}
|
package/dist/esm/get.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GetCallback } from './types.ts';
|
|
2
|
-
export default function getCache(endpoint: string, callback: GetCallback): undefined;
|
|
2
|
+
export default function getCache<T>(endpoint: string, callback: GetCallback<T>): undefined;
|
package/dist/esm/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/get.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport path from 'path';\n\nimport update from './update.ts';\n\ninterface GetError {\n code?: string;\n}\n\ninterface GetHeaders {\n etag?: string;\n}\n\nimport type { GetCallback } from './types.ts';\n\nexport default function getCache(endpoint: string, callback: GetCallback): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n fs.readFile(fullPath, (err, contents) => {\n // doesn't exist so create\n if (err) {\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n }\n // check existing if etag changed and if so, recache\n else {\n const record = JSON.parse(contents.toString());\n get(endpoint).head((err, res) => {\n // not accessible\n if (err) {\n if ((err as GetError).code === 'ENOTFOUND' || err.message.indexOf('routines:SSL23_GET_SERVER_HELLO') >= 0) return callback(null, record.body);\n return callback(err);\n }\n if ((res.headers as GetHeaders).etag === record.headers.etag) return callback(null, record.body);\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n });\n }\n });\n}\n"],"names":["fs","get","path","update","getCache","endpoint","callback","fullPath","join","cachePath","options","hash","readFile","err","contents","call","json","record","JSON","parse","toString","head","res","code","message","indexOf","body","headers","etag"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,SAAS,aAAa;AAC7B,OAAOC,UAAU,OAAO;AAExB,OAAOC,YAAY,cAAc;AAYjC,eAAe,SAASC,
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/get.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport path from 'path';\n\nimport update from './update.ts';\n\ninterface GetError {\n code?: string;\n}\n\ninterface GetHeaders {\n etag?: string;\n}\n\nimport type { GetCallback } from './types.ts';\n\nexport default function getCache<T>(endpoint: string, callback: GetCallback<T>): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n fs.readFile(fullPath, (err, contents) => {\n // doesn't exist so create\n if (err) {\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n }\n // check existing if etag changed and if so, recache\n else {\n const record = JSON.parse(contents.toString());\n get(endpoint).head((err, res) => {\n // not accessible\n if (err) {\n if ((err as GetError).code === 'ENOTFOUND' || err.message.indexOf('routines:SSL23_GET_SERVER_HELLO') >= 0) return callback(null, record.body);\n return callback(err);\n }\n if ((res.headers as GetHeaders).etag === record.headers.etag) return callback(null, record.body);\n update.call(this, endpoint, (err, json) => {\n err ? callback(err) : callback(null, json);\n });\n });\n }\n });\n}\n"],"names":["fs","get","path","update","getCache","endpoint","callback","fullPath","join","cachePath","options","hash","readFile","err","contents","call","json","record","JSON","parse","toString","head","res","code","message","indexOf","body","headers","etag"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,SAAS,aAAa;AAC7B,OAAOC,UAAU,OAAO;AAExB,OAAOC,YAAY,cAAc;AAYjC,eAAe,SAASC,SAAYC,QAAgB,EAAEC,QAAwB;IAC5E,MAAMC,WAAWL,KAAKM,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,GAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAACN,UAAU,KAAK,CAAC;IAChFL,GAAGY,QAAQ,CAACL,UAAU,CAACM,KAAKC;QAC1B,0BAA0B;QAC1B,IAAID,KAAK;YACPV,OAAOY,IAAI,CAAC,IAAI,EAAEV,UAAU,CAACQ,KAAKG;gBAChCH,MAAMP,SAASO,OAAOP,SAAS,MAAMU;YACvC;QACF,OAEK;YACH,MAAMC,SAASC,KAAKC,KAAK,CAACL,SAASM,QAAQ;YAC3CnB,IAAII,UAAUgB,IAAI,CAAC,CAACR,KAAKS;gBACvB,iBAAiB;gBACjB,IAAIT,KAAK;oBACP,IAAI,AAACA,IAAiBU,IAAI,KAAK,eAAeV,IAAIW,OAAO,CAACC,OAAO,CAAC,sCAAsC,GAAG,OAAOnB,SAAS,MAAMW,OAAOS,IAAI;oBAC5I,OAAOpB,SAASO;gBAClB;gBACA,IAAI,AAACS,IAAIK,OAAO,CAAgBC,IAAI,KAAKX,OAAOU,OAAO,CAACC,IAAI,EAAE,OAAOtB,SAAS,MAAMW,OAAOS,IAAI;gBAC/FvB,OAAOY,IAAI,CAAC,IAAI,EAAEV,UAAU,CAACQ,KAAKG;oBAChCH,MAAMP,SAASO,OAAOP,SAAS,MAAMU;gBACvC;YACF;QACF;IACF;AACF"}
|
package/dist/esm/getSync.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function getCacheAsync(endpoint: string):
|
|
1
|
+
export default function getCacheAsync<T>(endpoint: string): T;
|
package/dist/esm/getSync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/getSync.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nexport default function getCacheAsync(endpoint: string):
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/getSync.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nexport default function getCacheAsync<T>(endpoint: string): T {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n try {\n const contents = fs.readFileSync(fullPath, 'utf8');\n const record = JSON.parse(contents.toString());\n return record.body;\n } catch (_err) {\n return null;\n }\n}\n"],"names":["fs","path","getCacheAsync","endpoint","fullPath","join","cachePath","options","hash","contents","readFileSync","record","JSON","parse","toString","body","_err"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,UAAU,OAAO;AAExB,eAAe,SAASC,cAAiBC,QAAgB;IACvD,MAAMC,WAAWH,KAAKI,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,GAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAACL,UAAU,KAAK,CAAC;IAChF,IAAI;QACF,MAAMM,WAAWT,GAAGU,YAAY,CAACN,UAAU;QAC3C,MAAMO,SAASC,KAAKC,KAAK,CAACJ,SAASK,QAAQ;QAC3C,OAAOH,OAAOI,IAAI;IACpB,EAAE,OAAOC,MAAM;QACb,OAAO;IACT;AACF"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface Record {
|
|
1
|
+
export interface Record<T> {
|
|
2
2
|
headers: object;
|
|
3
|
-
body:
|
|
3
|
+
body: T;
|
|
4
4
|
}
|
|
5
5
|
export interface CacheOptions {
|
|
6
6
|
hash?: (string: string) => string;
|
|
@@ -8,6 +8,6 @@ export interface CacheOptions {
|
|
|
8
8
|
export interface GetOptions {
|
|
9
9
|
force?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export type GetCallback = (error?: Error,
|
|
11
|
+
export type GetCallback<T> = (error?: Error, result?: T) => undefined;
|
|
12
12
|
export type ClearCallback = (error?: Error) => undefined;
|
|
13
|
-
export type UpdateCallback = (error?: Error,
|
|
13
|
+
export type UpdateCallback<T> = (error?: Error, result?: T) => undefined;
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/types.ts"],"sourcesContent":["export interface Record {\n headers: object;\n body:
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/types.ts"],"sourcesContent":["export interface Record<T> {\n headers: object;\n body: T;\n}\n\nexport interface CacheOptions {\n hash?: (string: string) => string;\n}\n\nexport interface GetOptions {\n force?: boolean;\n}\nexport type GetCallback<T> = (error?: Error, result?: T) => undefined;\nexport type ClearCallback = (error?: Error) => undefined;\nexport type UpdateCallback<T> = (error?: Error, result?: T) => undefined;\n"],"names":[],"mappings":"AAcA,WAAyE"}
|
package/dist/esm/update.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { UpdateCallback } from './types.ts';
|
|
2
|
-
export default function update(endpoint: string, callback: UpdateCallback): undefined;
|
|
2
|
+
export default function update<T>(endpoint: string, callback: UpdateCallback<T>): undefined;
|
package/dist/esm/update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/update.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport mkdirp from 'mkdirp-classic';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\nimport tempSuffix from 'temp-suffix';\n\nimport type { Record, UpdateCallback } from './types.ts';\n\nexport default function update(endpoint: string, callback: UpdateCallback): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n\n mkdirp(this.cachePath, (err) => {\n if (err && err.code !== 'EEXIST') return callback(err);\n\n get(endpoint).json((err, res) => {\n if (err) return callback(err);\n const record = { headers: res.headers, body: res.body } as Record
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/fetch-json-cache/src/update.ts"],"sourcesContent":["import fs from 'fs';\nimport get from 'get-remote';\nimport mkdirp from 'mkdirp-classic';\nimport path from 'path';\nimport Queue from 'queue-cb';\nimport rimraf2 from 'rimraf2';\nimport tempSuffix from 'temp-suffix';\n\nimport type { Record, UpdateCallback } from './types.ts';\n\nexport default function update<T>(endpoint: string, callback: UpdateCallback<T>): undefined {\n const fullPath = path.join(this.cachePath, `${this.options.hash(endpoint)}.json`);\n\n mkdirp(this.cachePath, (err) => {\n if (err && err.code !== 'EEXIST') return callback(err);\n\n get(endpoint).json((err, res) => {\n if (err) return callback(err);\n const record = { headers: res.headers, body: res.body } as Record<T>;\n const tempFile = `${fullPath}-${tempSuffix()}`;\n\n const queue = new Queue(1);\n queue.defer(fs.writeFile.bind(null, tempFile, JSON.stringify(record), 'utf8'));\n queue.defer((cb) => rimraf2(fullPath, { disableGlob: true }, cb.bind(null, null)));\n queue.defer(fs.rename.bind(null, tempFile, fullPath));\n queue.await((err) => {\n if (!err) return callback(null, record.body);\n // cleanup the temp file if the operation failed\n rimraf2(tempFile, { disableGlob: true }, callback.bind(err));\n });\n });\n });\n}\n"],"names":["fs","get","mkdirp","path","Queue","rimraf2","tempSuffix","update","endpoint","callback","fullPath","join","cachePath","options","hash","err","code","json","res","record","headers","body","tempFile","queue","defer","writeFile","bind","JSON","stringify","cb","disableGlob","rename","await"],"mappings":"AAAA,OAAOA,QAAQ,KAAK;AACpB,OAAOC,SAAS,aAAa;AAC7B,OAAOC,YAAY,iBAAiB;AACpC,OAAOC,UAAU,OAAO;AACxB,OAAOC,WAAW,WAAW;AAC7B,OAAOC,aAAa,UAAU;AAC9B,OAAOC,gBAAgB,cAAc;AAIrC,eAAe,SAASC,OAAUC,QAAgB,EAAEC,QAA2B;IAC7E,MAAMC,WAAWP,KAAKQ,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE,GAAG,IAAI,CAACC,OAAO,CAACC,IAAI,CAACN,UAAU,KAAK,CAAC;IAEhFN,OAAO,IAAI,CAACU,SAAS,EAAE,CAACG;QACtB,IAAIA,OAAOA,IAAIC,IAAI,KAAK,UAAU,OAAOP,SAASM;QAElDd,IAAIO,UAAUS,IAAI,CAAC,CAACF,KAAKG;YACvB,IAAIH,KAAK,OAAON,SAASM;YACzB,MAAMI,SAAS;gBAAEC,SAASF,IAAIE,OAAO;gBAAEC,MAAMH,IAAIG,IAAI;YAAC;YACtD,MAAMC,WAAW,GAAGZ,SAAS,CAAC,EAAEJ,cAAc;YAE9C,MAAMiB,QAAQ,IAAInB,MAAM;YACxBmB,MAAMC,KAAK,CAACxB,GAAGyB,SAAS,CAACC,IAAI,CAAC,MAAMJ,UAAUK,KAAKC,SAAS,CAACT,SAAS;YACtEI,MAAMC,KAAK,CAAC,CAACK,KAAOxB,QAAQK,UAAU;oBAAEoB,aAAa;gBAAK,GAAGD,GAAGH,IAAI,CAAC,MAAM;YAC3EH,MAAMC,KAAK,CAACxB,GAAG+B,MAAM,CAACL,IAAI,CAAC,MAAMJ,UAAUZ;YAC3Ca,MAAMS,KAAK,CAAC,CAACjB;gBACX,IAAI,CAACA,KAAK,OAAON,SAAS,MAAMU,OAAOE,IAAI;gBAC3C,gDAAgD;gBAChDhB,QAAQiB,UAAU;oBAAEQ,aAAa;gBAAK,GAAGrB,SAASiB,IAAI,CAACX;YACzD;QACF;IACF;AACF"}
|
package/package.json
CHANGED