@cedarjs/api 0.1.1-next.20 → 0.1.2-next.95
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/cache/clients/BaseClient.d.ts +1 -1
- package/dist/cache/clients/BaseClient.d.ts.map +1 -1
- package/dist/cache/clients/BaseClient.js +1 -1
- package/dist/cache/clients/InMemoryClient.d.ts +2 -2
- package/dist/cache/clients/InMemoryClient.d.ts.map +1 -1
- package/dist/cache/clients/InMemoryClient.js +2 -2
- package/dist/cache/clients/MemcachedClient.d.ts +2 -2
- package/dist/cache/clients/MemcachedClient.d.ts.map +1 -1
- package/dist/cache/clients/MemcachedClient.js +2 -2
- package/dist/cache/clients/RedisClient.d.ts +2 -2
- package/dist/cache/clients/RedisClient.d.ts.map +1 -1
- package/dist/cache/clients/RedisClient.js +2 -2
- package/dist/cache/index.d.ts +4 -4
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +6 -6
- package/dist/cjs/cache/clients/BaseClient.d.ts +1 -1
- package/dist/cjs/cache/clients/BaseClient.d.ts.map +1 -1
- package/dist/cjs/cache/clients/BaseClient.js +5 -1
- package/dist/cjs/cache/clients/InMemoryClient.d.ts +2 -2
- package/dist/cjs/cache/clients/InMemoryClient.d.ts.map +1 -1
- package/dist/cjs/cache/clients/InMemoryClient.js +7 -13
- package/dist/cjs/cache/clients/MemcachedClient.d.ts +2 -2
- package/dist/cjs/cache/clients/MemcachedClient.d.ts.map +1 -1
- package/dist/cjs/cache/clients/MemcachedClient.js +7 -3
- package/dist/cjs/cache/clients/RedisClient.d.ts +2 -2
- package/dist/cjs/cache/clients/RedisClient.d.ts.map +1 -1
- package/dist/cjs/cache/clients/RedisClient.js +7 -3
- package/dist/cjs/cache/index.d.ts +4 -4
- package/dist/cjs/cache/index.d.ts.map +1 -1
- package/dist/cjs/cache/index.js +6 -6
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/BaseClient.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/BaseClient.ts"],"names":[],"mappings":"AAAA,8BAAsB,UAAU;;IAK9B,UAAU,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnC,QAAQ,CAAC,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAGxC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAG9B,QAAQ,CAAC,GAAG,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAGrB,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,GAAG;CAClD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import BaseClient from './BaseClient.js';
|
|
1
|
+
import { BaseClient } from './BaseClient.js';
|
|
2
2
|
type CacheOptions = {
|
|
3
3
|
expires?: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export declare class InMemoryClient extends BaseClient {
|
|
6
6
|
storage: Record<string, {
|
|
7
7
|
expires: number;
|
|
8
8
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/InMemoryClient.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"InMemoryClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/InMemoryClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,YAAY,GAAG;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;gBAG/C,IAAI,KAAK;IAKrB;;;;;OAKG;IACH,IAAI,QAAQ,UAIX;IAGK,UAAU;IACV,OAAO;IAEP,GAAG,CAAC,GAAG,EAAE,MAAM;IAWf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB;IAU3D,GAAG,CAAC,GAAG,EAAE,MAAM;IASrB;;OAEG;IACG,KAAK;IAIX,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAU3B,QAAQ,CAAC,KAAK,EAAE,GAAG;CAGpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BaseClient from "./BaseClient.js";
|
|
1
|
+
import { BaseClient } from "./BaseClient.js";
|
|
2
2
|
class InMemoryClient extends BaseClient {
|
|
3
3
|
storage;
|
|
4
4
|
// initialize with pre-cached data if needed
|
|
@@ -66,5 +66,5 @@ class InMemoryClient extends BaseClient {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
export {
|
|
69
|
-
InMemoryClient
|
|
69
|
+
InMemoryClient
|
|
70
70
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client as ClientType, ClientOptions, ServerOptions } from 'memjs';
|
|
2
|
-
import BaseClient from './BaseClient.js';
|
|
3
|
-
export
|
|
2
|
+
import { BaseClient } from './BaseClient.js';
|
|
3
|
+
export declare class MemcachedClient extends BaseClient {
|
|
4
4
|
client?: ClientType | null;
|
|
5
5
|
servers: string;
|
|
6
6
|
options: (ClientOptions<string | Buffer, Buffer | null> & ServerOptions) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemcachedClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/MemcachedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE/E,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"MemcachedClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/MemcachedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IAC1B,OAAO,SAAA;IACP,OAAO,8EAAA;gBAEK,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,aAAa;IAM9D,OAAO;IAKP,UAAU;IAKV,GAAG,CAAC,GAAG,EAAE,MAAM;IAcf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAQ9D,GAAG,CAAC,GAAG,EAAE,MAAM;CAQtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BaseClient from "./BaseClient.js";
|
|
1
|
+
import { BaseClient } from "./BaseClient.js";
|
|
2
2
|
class MemcachedClient extends BaseClient {
|
|
3
3
|
client;
|
|
4
4
|
servers;
|
|
@@ -41,5 +41,5 @@ class MemcachedClient extends BaseClient {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
|
-
MemcachedClient
|
|
44
|
+
MemcachedClient
|
|
45
45
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RedisClientType, RedisClientOptions } from 'redis';
|
|
2
2
|
import type { Logger } from '../../logger/index.js';
|
|
3
|
-
import BaseClient from './BaseClient.js';
|
|
3
|
+
import { BaseClient } from './BaseClient.js';
|
|
4
4
|
type LoggerOptions = {
|
|
5
5
|
logger?: Logger;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export declare class RedisClient extends BaseClient {
|
|
8
8
|
client?: RedisClientType | null;
|
|
9
9
|
logger?: Logger;
|
|
10
10
|
redisOptions?: RedisClientOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/RedisClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"RedisClient.d.ts","sourceRoot":"","sources":["../../../src/cache/clients/RedisClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAM5C,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,kBAAkB,CAAA;gBAErB,OAAO,EAAE,kBAAkB,GAAG,aAAa;IAQjD,OAAO;IAiBP,GAAG,CAAC,GAAG,EAAE,MAAM;IAUf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAc9D,GAAG,CAAC,GAAG,EAAE,MAAM;CAQtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BaseClient from "./BaseClient.js";
|
|
1
|
+
import { BaseClient } from "./BaseClient.js";
|
|
2
2
|
class RedisClient extends BaseClient {
|
|
3
3
|
client;
|
|
4
4
|
logger;
|
|
@@ -45,5 +45,5 @@ class RedisClient extends BaseClient {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
export {
|
|
48
|
-
RedisClient
|
|
48
|
+
RedisClient
|
|
49
49
|
};
|
package/dist/cache/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Logger } from '../logger/index.js';
|
|
2
|
-
import type BaseClient from './clients/BaseClient.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
2
|
+
import type { BaseClient } from './clients/BaseClient.js';
|
|
3
|
+
export { MemcachedClient } from './clients/MemcachedClient.js';
|
|
4
|
+
export { RedisClient } from './clients/RedisClient.js';
|
|
5
|
+
export { InMemoryClient } from './clients/InMemoryClient.js';
|
|
6
6
|
export interface CreateCacheOptions {
|
|
7
7
|
logger?: Logger;
|
|
8
8
|
timeout?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB,CACnC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC7C,SAAQ,YAAY;IACpB,UAAU,CAAC,EAAE,aAAa,CAAA;CAC3B;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AACxC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;IAC/B,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;CACjC,CAAA;AAQD,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC,eAAO,MAAM,cAAc,QAAS,QAAQ,WAAW,MAAM,WAkB5D,CAAA;AAMD,eAAO,MAAM,WAAW,gBACT,UAAU,YACb,kBAAkB;YAQP,OAAO,OACrB,QAAQ,SACN,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAC7B,YAAY,KACrB,OAAO,CAAC,GAAG,CAAC;oBAqDc,SAAS,SAAS,eAAe,OACvD,QAAQ,SACN,SAAS,YACP,oBAAoB,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;0BAgDlC,QAAQ;CA0B5C,CAAA"}
|
package/dist/cache/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CacheTimeoutError } from "./errors.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { MemcachedClient } from "./clients/MemcachedClient.js";
|
|
3
|
+
import { RedisClient } from "./clients/RedisClient.js";
|
|
4
|
+
import { InMemoryClient } from "./clients/InMemoryClient.js";
|
|
5
5
|
const DEFAULT_LATEST_FIELDS = { id: "id", updatedAt: "updatedAt" };
|
|
6
6
|
const wait = (ms) => {
|
|
7
7
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -123,9 +123,9 @@ const createCache = (cacheClient, options) => {
|
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
125
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
InMemoryClient,
|
|
127
|
+
MemcachedClient,
|
|
128
|
+
RedisClient,
|
|
129
129
|
cacheKeySeparator,
|
|
130
130
|
createCache,
|
|
131
131
|
formatCacheKey
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/BaseClient.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"BaseClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/BaseClient.ts"],"names":[],"mappings":"AAAA,8BAAsB,UAAU;;IAK9B,UAAU,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnC,QAAQ,CAAC,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAGxC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAG9B,QAAQ,CAAC,GAAG,CACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;IAGrB,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,GAAG;CAClD"}
|
|
@@ -18,10 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var BaseClient_exports = {};
|
|
20
20
|
__export(BaseClient_exports, {
|
|
21
|
-
|
|
21
|
+
BaseClient: () => BaseClient
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(BaseClient_exports);
|
|
24
24
|
class BaseClient {
|
|
25
25
|
constructor() {
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
BaseClient
|
|
31
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import BaseClient from './BaseClient.js';
|
|
1
|
+
import { BaseClient } from './BaseClient.js';
|
|
2
2
|
type CacheOptions = {
|
|
3
3
|
expires?: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export declare class InMemoryClient extends BaseClient {
|
|
6
6
|
storage: Record<string, {
|
|
7
7
|
expires: number;
|
|
8
8
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/InMemoryClient.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"InMemoryClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/InMemoryClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,YAAY,GAAG;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;gBAG/C,IAAI,KAAK;IAKrB;;;;;OAKG;IACH,IAAI,QAAQ,UAIX;IAGK,UAAU;IACV,OAAO;IAEP,GAAG,CAAC,GAAG,EAAE,MAAM;IAWf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB;IAU3D,GAAG,CAAC,GAAG,EAAE,MAAM;IASrB;;OAEG;IACG,KAAK;IAIX,gBAAgB,CAAC,KAAK,EAAE,GAAG;IAU3B,QAAQ,CAAC,KAAK,EAAE,GAAG;CAGpB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,22 +15,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var InMemoryClient_exports = {};
|
|
30
20
|
__export(InMemoryClient_exports, {
|
|
31
|
-
|
|
21
|
+
InMemoryClient: () => InMemoryClient
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(InMemoryClient_exports);
|
|
34
|
-
var import_BaseClient =
|
|
35
|
-
class InMemoryClient extends import_BaseClient.
|
|
24
|
+
var import_BaseClient = require("./BaseClient.js");
|
|
25
|
+
class InMemoryClient extends import_BaseClient.BaseClient {
|
|
36
26
|
storage;
|
|
37
27
|
// initialize with pre-cached data if needed
|
|
38
28
|
constructor(data = {}) {
|
|
@@ -98,3 +88,7 @@ class InMemoryClient extends import_BaseClient.default {
|
|
|
98
88
|
return !!this.cacheKeyForValue(value);
|
|
99
89
|
}
|
|
100
90
|
}
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
InMemoryClient
|
|
94
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Client as ClientType, ClientOptions, ServerOptions } from 'memjs';
|
|
2
|
-
import BaseClient from './BaseClient.js';
|
|
3
|
-
export
|
|
2
|
+
import { BaseClient } from './BaseClient.js';
|
|
3
|
+
export declare class MemcachedClient extends BaseClient {
|
|
4
4
|
client?: ClientType | null;
|
|
5
5
|
servers: string;
|
|
6
6
|
options: (ClientOptions<string | Buffer, Buffer | null> & ServerOptions) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemcachedClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/MemcachedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE/E,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"MemcachedClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/MemcachedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IAC1B,OAAO,SAAA;IACP,OAAO,8EAAA;gBAEK,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,aAAa;IAM9D,OAAO;IAKP,UAAU;IAKV,GAAG,CAAC,GAAG,EAAE,MAAM;IAcf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAQ9D,GAAG,CAAC,GAAG,EAAE,MAAM;CAQtB"}
|
|
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var MemcachedClient_exports = {};
|
|
30
30
|
__export(MemcachedClient_exports, {
|
|
31
|
-
|
|
31
|
+
MemcachedClient: () => MemcachedClient
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(MemcachedClient_exports);
|
|
34
|
-
var import_BaseClient =
|
|
35
|
-
class MemcachedClient extends import_BaseClient.
|
|
34
|
+
var import_BaseClient = require("./BaseClient.js");
|
|
35
|
+
class MemcachedClient extends import_BaseClient.BaseClient {
|
|
36
36
|
client;
|
|
37
37
|
servers;
|
|
38
38
|
options;
|
|
@@ -73,3 +73,7 @@ class MemcachedClient extends import_BaseClient.default {
|
|
|
73
73
|
return this.client?.delete(key);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
77
|
+
0 && (module.exports = {
|
|
78
|
+
MemcachedClient
|
|
79
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RedisClientType, RedisClientOptions } from 'redis';
|
|
2
2
|
import type { Logger } from '../../logger/index.js';
|
|
3
|
-
import BaseClient from './BaseClient.js';
|
|
3
|
+
import { BaseClient } from './BaseClient.js';
|
|
4
4
|
type LoggerOptions = {
|
|
5
5
|
logger?: Logger;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export declare class RedisClient extends BaseClient {
|
|
8
8
|
client?: RedisClientType | null;
|
|
9
9
|
logger?: Logger;
|
|
10
10
|
redisOptions?: RedisClientOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/RedisClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,UAAU,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"RedisClient.d.ts","sourceRoot":"","sources":["../../../../src/cache/clients/RedisClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAM5C,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,kBAAkB,CAAA;gBAErB,OAAO,EAAE,kBAAkB,GAAG,aAAa;IAQjD,OAAO;IAiBP,GAAG,CAAC,GAAG,EAAE,MAAM;IAUf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAc9D,GAAG,CAAC,GAAG,EAAE,MAAM;CAQtB"}
|
|
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var RedisClient_exports = {};
|
|
30
30
|
__export(RedisClient_exports, {
|
|
31
|
-
|
|
31
|
+
RedisClient: () => RedisClient
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(RedisClient_exports);
|
|
34
|
-
var import_BaseClient =
|
|
35
|
-
class RedisClient extends import_BaseClient.
|
|
34
|
+
var import_BaseClient = require("./BaseClient.js");
|
|
35
|
+
class RedisClient extends import_BaseClient.BaseClient {
|
|
36
36
|
client;
|
|
37
37
|
logger;
|
|
38
38
|
redisOptions;
|
|
@@ -77,3 +77,7 @@ class RedisClient extends import_BaseClient.default {
|
|
|
77
77
|
return !!await this.client?.del([key]);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
+
0 && (module.exports = {
|
|
82
|
+
RedisClient
|
|
83
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Logger } from '../logger/index.js';
|
|
2
|
-
import type BaseClient from './clients/BaseClient.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
2
|
+
import type { BaseClient } from './clients/BaseClient.js';
|
|
3
|
+
export { MemcachedClient } from './clients/MemcachedClient.js';
|
|
4
|
+
export { RedisClient } from './clients/RedisClient.js';
|
|
5
|
+
export { InMemoryClient } from './clients/InMemoryClient.js';
|
|
6
6
|
export interface CreateCacheOptions {
|
|
7
7
|
logger?: Logger;
|
|
8
8
|
timeout?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB,CACnC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC7C,SAAQ,YAAY;IACpB,UAAU,CAAC,EAAE,aAAa,CAAA;CAC3B;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AACxC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;IAC/B,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;CACjC,CAAA;AAQD,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC,eAAO,MAAM,cAAc,QAAS,QAAQ,WAAW,MAAM,WAkB5D,CAAA;AAMD,eAAO,MAAM,WAAW,gBACT,UAAU,YACb,kBAAkB;YAQP,OAAO,OACrB,QAAQ,SACN,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAC7B,YAAY,KACrB,OAAO,CAAC,GAAG,CAAC;oBAqDc,SAAS,SAAS,eAAe,OACvD,QAAQ,SACN,SAAS,YACP,oBAAoB,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;0BAgDlC,QAAQ;CA0B5C,CAAA"}
|
package/dist/cjs/cache/index.js
CHANGED
|
@@ -28,18 +28,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var cache_exports = {};
|
|
30
30
|
__export(cache_exports, {
|
|
31
|
-
InMemoryClient: () => import_InMemoryClient.
|
|
32
|
-
MemcachedClient: () => import_MemcachedClient.
|
|
33
|
-
RedisClient: () => import_RedisClient.
|
|
31
|
+
InMemoryClient: () => import_InMemoryClient.InMemoryClient,
|
|
32
|
+
MemcachedClient: () => import_MemcachedClient.MemcachedClient,
|
|
33
|
+
RedisClient: () => import_RedisClient.RedisClient,
|
|
34
34
|
cacheKeySeparator: () => cacheKeySeparator,
|
|
35
35
|
createCache: () => createCache,
|
|
36
36
|
formatCacheKey: () => formatCacheKey
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(cache_exports);
|
|
39
39
|
var import_errors = require("./errors.js");
|
|
40
|
-
var import_MemcachedClient =
|
|
41
|
-
var import_RedisClient =
|
|
42
|
-
var import_InMemoryClient =
|
|
40
|
+
var import_MemcachedClient = require("./clients/MemcachedClient.js");
|
|
41
|
+
var import_RedisClient = require("./clients/RedisClient.js");
|
|
42
|
+
var import_InMemoryClient = require("./clients/InMemoryClient.js");
|
|
43
43
|
const DEFAULT_LATEST_FIELDS = { id: "id", updatedAt: "updatedAt" };
|
|
44
44
|
const wait = (ms) => {
|
|
45
45
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AA8B1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AA8B1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA;AAClD,eAAO,MAAM,cAAc,KAAuB,CAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
|
+
cedarjsVersion: () => cedarjsVersion,
|
|
32
33
|
prismaVersion: () => prismaVersion,
|
|
33
34
|
redwoodVersion: () => redwoodVersion
|
|
34
35
|
});
|
|
@@ -67,8 +68,10 @@ if (packageJson?.name !== "@cedarjs/api") {
|
|
|
67
68
|
}
|
|
68
69
|
const prismaVersion = packageJson?.dependencies["@prisma/client"];
|
|
69
70
|
const redwoodVersion = packageJson?.version;
|
|
71
|
+
const cedarjsVersion = packageJson?.version;
|
|
70
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
71
73
|
0 && (module.exports = {
|
|
74
|
+
cedarjsVersion,
|
|
72
75
|
prismaVersion,
|
|
73
76
|
redwoodVersion,
|
|
74
77
|
...require("./auth/index.js"),
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AA8B1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AA8B1B,eAAO,MAAM,aAAa,KAA8C,CAAA;AACxE,eAAO,MAAM,cAAc,KAAuB,CAAA;AAClD,eAAO,MAAM,cAAc,KAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,9 @@ if (packageJson?.name !== "@cedarjs/api") {
|
|
|
32
32
|
}
|
|
33
33
|
const prismaVersion = packageJson?.dependencies["@prisma/client"];
|
|
34
34
|
const redwoodVersion = packageJson?.version;
|
|
35
|
+
const cedarjsVersion = packageJson?.version;
|
|
35
36
|
export {
|
|
37
|
+
cedarjsVersion,
|
|
36
38
|
prismaVersion,
|
|
37
39
|
redwoodVersion
|
|
38
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2-next.95+a711c9cda",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"humanize-string": "2.1.0",
|
|
92
92
|
"jsonwebtoken": "9.0.2",
|
|
93
93
|
"pascalcase": "1.0.0",
|
|
94
|
-
"pino": "9.
|
|
94
|
+
"pino": "9.7.0",
|
|
95
95
|
"title-case": "3.0.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@cedarjs/framework-tools": "0.1.
|
|
98
|
+
"@cedarjs/framework-tools": "0.1.2-next.95",
|
|
99
99
|
"@types/aws-lambda": "8.10.145",
|
|
100
100
|
"@types/jsonwebtoken": "9.0.8",
|
|
101
101
|
"@types/memjs": "1",
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
"redis": "4.7.1",
|
|
108
108
|
"split2": "4.2.0",
|
|
109
109
|
"ts-toolbelt": "9.6.0",
|
|
110
|
-
"tsx": "4.19.
|
|
110
|
+
"tsx": "4.19.4",
|
|
111
111
|
"typescript": "5.6.2",
|
|
112
|
-
"vitest": "2.
|
|
112
|
+
"vitest": "3.2.4"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"memjs": "1.3.2",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"publishConfig": {
|
|
127
127
|
"access": "public"
|
|
128
128
|
},
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "a711c9cda09da9444fb0f6ff5d9dae804d6ba72b"
|
|
130
130
|
}
|