@effect-app/infra 0.7.0 → 0.8.0
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/CHANGELOG.md +13 -0
- package/_cjs/errors.cjs +21 -22
- package/_cjs/errors.cjs.map +1 -1
- package/_cjs/lib/api/authorization.jwt.cjs +1 -1
- package/_cjs/{vendor/Cache/Cache/operations/makeWith.cjs → lib/api/codec.cjs} +16 -13
- package/_cjs/lib/api/codec.cjs.map +1 -0
- package/_cjs/{services/memQueue.cjs → lib/api/express/makeJsonSchema.cjs} +42 -22
- package/_cjs/lib/api/express/makeJsonSchema.cjs.map +1 -0
- package/_cjs/lib/api/express/makeOpenApiSpecs.cjs +66 -0
- package/_cjs/lib/api/express/makeOpenApiSpecs.cjs.map +1 -0
- package/_cjs/lib/api/express/schema/jwt.cjs +43 -0
- package/_cjs/lib/api/express/schema/jwt.cjs.map +1 -0
- package/_cjs/lib/api/express/schema/requestHandler.cjs +166 -0
- package/_cjs/lib/api/express/schema/requestHandler.cjs.map +1 -0
- package/_cjs/lib/api/express/schema/routing.cjs +121 -0
- package/_cjs/lib/api/express/schema/routing.cjs.map +1 -0
- package/_cjs/lib/api/routing.cjs +28 -28
- package/_cjs/lib/api/routing.cjs.map +1 -1
- package/_cjs/lib/api/writeDocs.cjs +4 -4
- package/_cjs/lib/api/writeDocs.cjs.map +1 -1
- package/_cjs/services/Store/Disk.cjs +1 -1
- package/_cjs/services/simpledb/cosmosdb.cjs +98 -0
- package/_cjs/services/simpledb/cosmosdb.cjs.map +1 -0
- package/_cjs/services/simpledb/diskdb.cjs +118 -0
- package/_cjs/services/simpledb/diskdb.cjs.map +1 -0
- package/_cjs/services/simpledb/fileutil.cjs +36 -0
- package/_cjs/services/simpledb/fileutil.cjs.map +1 -0
- package/_cjs/{vendor/Cache/Cache/_internal/CacheState.cjs → services/simpledb/index.cjs} +31 -24
- package/_cjs/services/simpledb/index.cjs.map +1 -0
- package/_cjs/services/simpledb/memdb.cjs +74 -0
- package/_cjs/services/simpledb/memdb.cjs.map +1 -0
- package/_cjs/services/simpledb/mongodb.cjs +86 -0
- package/_cjs/services/simpledb/mongodb.cjs.map +1 -0
- package/_cjs/services/simpledb/redisdb.cjs +120 -0
- package/_cjs/services/simpledb/redisdb.cjs.map +1 -0
- package/_cjs/services/simpledb/shared.cjs +80 -0
- package/_cjs/services/simpledb/shared.cjs.map +1 -0
- package/_cjs/services/simpledb/simpledb.cjs +77 -0
- package/_cjs/services/simpledb/simpledb.cjs.map +1 -0
- package/_src/_global.ext.ts +1 -1
- package/_src/errors.ts +12 -3
- package/_src/lib/api/app.ts.bak +125 -0
- package/_src/lib/api/authorization.jwt.ts +1 -1
- package/_src/lib/api/codec.ts +27 -0
- package/_src/lib/api/errors.ts.bak +20 -0
- package/_src/lib/api/express/makeJsonSchema.ts +49 -0
- package/_src/lib/api/express/makeOpenApiSpecs.ts +60 -0
- package/_src/lib/api/express/routing.ts.bak +460 -0
- package/_src/lib/api/express/schema/jwt.ts +38 -0
- package/_src/lib/api/express/schema/requestHandler.ts +360 -0
- package/_src/lib/api/express/schema/routing.ts +202 -0
- package/_src/lib/api/routing.ts +5 -10
- package/_src/lib/api/writeDocs.ts +4 -5
- package/_src/services/Store/Disk.ts +1 -1
- package/_src/services/simpledb/cosmosdb.ts +134 -0
- package/_src/services/simpledb/diskdb.ts +158 -0
- package/_src/services/simpledb/fileutil.ts +28 -0
- package/_src/services/simpledb/index.ts +6 -0
- package/_src/services/simpledb/memdb.ts +79 -0
- package/_src/services/simpledb/mongodb.ts +99 -0
- package/_src/services/simpledb/redisdb.ts +182 -0
- package/_src/services/simpledb/shared.ts +117 -0
- package/_src/services/simpledb/simpledb.ts +117 -0
- package/dist/_global.ext.d.ts +1 -1
- package/dist/_global.ext.d.ts.map +1 -1
- package/dist/errors.d.ts +11 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +17 -3
- package/dist/lib/api/authorization.jwt.d.ts +1 -1
- package/dist/lib/api/authorization.jwt.d.ts.map +1 -1
- package/dist/lib/api/authorization.jwt.js +2 -2
- package/dist/lib/api/codec.d.ts +7 -0
- package/dist/lib/api/codec.d.ts.map +1 -0
- package/dist/lib/api/codec.js +19 -0
- package/dist/lib/api/express/makeJsonSchema.d.ts +30 -0
- package/dist/lib/api/express/makeJsonSchema.d.ts.map +1 -0
- package/dist/lib/api/express/makeJsonSchema.js +40 -0
- package/dist/lib/api/express/makeOpenApiSpecs.d.ts +55 -0
- package/dist/lib/api/express/makeOpenApiSpecs.d.ts.map +1 -0
- package/dist/lib/api/express/makeOpenApiSpecs.js +56 -0
- package/dist/lib/api/express/schema/jwt.d.ts +5 -0
- package/dist/lib/api/express/schema/jwt.d.ts.map +1 -0
- package/dist/lib/api/express/schema/jwt.js +32 -0
- package/dist/lib/api/express/schema/requestHandler.d.ts +71 -0
- package/dist/lib/api/express/schema/requestHandler.d.ts.map +1 -0
- package/dist/lib/api/express/schema/requestHandler.js +140 -0
- package/dist/lib/api/express/schema/routing.d.ts +45 -0
- package/dist/lib/api/express/schema/routing.d.ts.map +1 -0
- package/dist/lib/api/express/schema/routing.js +95 -0
- package/dist/lib/api/routing.d.ts +4 -4
- package/dist/lib/api/routing.d.ts.map +1 -1
- package/dist/lib/api/routing.js +29 -28
- package/dist/lib/api/writeDocs.d.ts +1 -1
- package/dist/lib/api/writeDocs.d.ts.map +1 -1
- package/dist/lib/api/writeDocs.js +5 -5
- package/dist/services/Store/Disk.js +2 -2
- package/dist/services/simpledb/cosmosdb.d.ts +13 -0
- package/dist/services/simpledb/cosmosdb.d.ts.map +1 -0
- package/dist/services/simpledb/cosmosdb.js +88 -0
- package/dist/services/simpledb/diskdb.d.ts +12 -0
- package/dist/services/simpledb/diskdb.d.ts.map +1 -0
- package/dist/services/simpledb/diskdb.js +96 -0
- package/dist/services/simpledb/fileutil.d.ts +7 -0
- package/dist/services/simpledb/fileutil.d.ts.map +1 -0
- package/dist/services/simpledb/fileutil.js +25 -0
- package/dist/services/simpledb/index.d.ts +7 -0
- package/dist/services/simpledb/index.d.ts.map +1 -0
- package/dist/services/simpledb/index.js +7 -0
- package/dist/services/simpledb/memdb.d.ts +12 -0
- package/dist/services/simpledb/memdb.d.ts.map +1 -0
- package/dist/services/simpledb/memdb.js +55 -0
- package/dist/services/simpledb/mongodb.d.ts +13 -0
- package/dist/services/simpledb/mongodb.d.ts.map +1 -0
- package/dist/services/simpledb/mongodb.js +55 -0
- package/dist/services/simpledb/redisdb.d.ts +25 -0
- package/dist/services/simpledb/redisdb.d.ts.map +1 -0
- package/dist/services/simpledb/redisdb.js +105 -0
- package/dist/services/simpledb/shared.d.ts +63 -0
- package/dist/services/simpledb/shared.d.ts.map +1 -0
- package/dist/services/simpledb/shared.js +65 -0
- package/dist/services/simpledb/simpledb.d.ts +23 -0
- package/dist/services/simpledb/simpledb.d.ts.map +1 -0
- package/dist/services/simpledb/simpledb.js +56 -0
- package/package.json +126 -238
- package/_cjs/ext.cjs +0 -4
- package/_cjs/ext.cjs.map +0 -1
- package/_cjs/lib/fileUtil.cjs +0 -36
- package/_cjs/lib/fileUtil.cjs.map +0 -1
- package/_cjs/services/CUPS/service.cjs +0 -15
- package/_cjs/services/CUPS/service.cjs.map +0 -1
- package/_cjs/services/CUPS.cjs +0 -113
- package/_cjs/services/CUPS.cjs.map +0 -1
- package/_cjs/services/Cache.cjs +0 -39
- package/_cjs/services/Cache.cjs.map +0 -1
- package/_cjs/services/ServiceBus.cjs +0 -69
- package/_cjs/services/ServiceBus.cjs.map +0 -1
- package/_cjs/services/memQueue.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/AtomicBoolean.cjs +0 -14
- package/_cjs/vendor/Cache/Cache/_internal/AtomicBoolean.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/AtomicNumber.cjs +0 -29
- package/_cjs/vendor/Cache/Cache/_internal/AtomicNumber.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/AtomicReference.cjs +0 -32
- package/_cjs/vendor/Cache/Cache/_internal/AtomicReference.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/CacheInternal.cjs +0 -266
- package/_cjs/vendor/Cache/Cache/_internal/CacheInternal.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/CacheState.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/KeySet.cjs +0 -67
- package/_cjs/vendor/Cache/Cache/_internal/KeySet.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/MapKey.cjs +0 -44
- package/_cjs/vendor/Cache/Cache/_internal/MapKey.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/_internal/MapValue.cjs +0 -33
- package/_cjs/vendor/Cache/Cache/_internal/MapValue.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/definition.cjs +0 -13
- package/_cjs/vendor/Cache/Cache/definition.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/operations/make.cjs +0 -20
- package/_cjs/vendor/Cache/Cache/operations/make.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/operations/makeWith.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache/operations.cjs +0 -28
- package/_cjs/vendor/Cache/Cache/operations.cjs.map +0 -1
- package/_cjs/vendor/Cache/Cache.cjs +0 -28
- package/_cjs/vendor/Cache/Cache.cjs.map +0 -1
- package/_cjs/vendor/Cache/CacheStats/definition.cjs +0 -13
- package/_cjs/vendor/Cache/CacheStats/definition.cjs.map +0 -1
- package/_cjs/vendor/Cache/CacheStats.cjs +0 -17
- package/_cjs/vendor/Cache/CacheStats.cjs.map +0 -1
- package/_cjs/vendor/Cache/EntryStats/definition.cjs +0 -11
- package/_cjs/vendor/Cache/EntryStats/definition.cjs.map +0 -1
- package/_cjs/vendor/Cache/EntryStats.cjs +0 -17
- package/_cjs/vendor/Cache/EntryStats.cjs.map +0 -1
- package/_cjs/vendor/Cache/Lookup/definition.cjs +0 -6
- package/_cjs/vendor/Cache/Lookup/definition.cjs.map +0 -1
- package/_cjs/vendor/Cache/Lookup.cjs +0 -17
- package/_cjs/vendor/Cache/Lookup.cjs.map +0 -1
- package/_cjs/vendor/Cache/index.cjs +0 -17
- package/_cjs/vendor/Cache/index.cjs.map +0 -1
- package/_src/ext.ts +0 -1
- package/_src/lib/fileUtil.ts +0 -56
- package/_src/services/CUPS/service.ts +0 -16
- package/_src/services/CUPS.ts +0 -105
- package/_src/services/Cache.ts +0 -45
- package/_src/services/ServiceBus.ts +0 -111
- package/_src/services/memQueue.ts +0 -30
- package/_src/vendor/Cache/Cache/_internal/AtomicBoolean.ts +0 -7
- package/_src/vendor/Cache/Cache/_internal/AtomicNumber.ts +0 -28
- package/_src/vendor/Cache/Cache/_internal/AtomicReference.ts +0 -30
- package/_src/vendor/Cache/Cache/_internal/CacheInternal.ts +0 -293
- package/_src/vendor/Cache/Cache/_internal/CacheState.ts +0 -56
- package/_src/vendor/Cache/Cache/_internal/KeySet.ts +0 -58
- package/_src/vendor/Cache/Cache/_internal/MapKey.ts +0 -43
- package/_src/vendor/Cache/Cache/_internal/MapValue.ts +0 -39
- package/_src/vendor/Cache/Cache/definition.ts +0 -112
- package/_src/vendor/Cache/Cache/operations/make.ts +0 -17
- package/_src/vendor/Cache/Cache/operations/makeWith.ts +0 -32
- package/_src/vendor/Cache/Cache/operations.ts +0 -4
- package/_src/vendor/Cache/Cache.ts +0 -4
- package/_src/vendor/Cache/CacheStats/definition.ts +0 -23
- package/_src/vendor/Cache/CacheStats.ts +0 -3
- package/_src/vendor/Cache/EntryStats/definition.ts +0 -19
- package/_src/vendor/Cache/EntryStats.ts +0 -3
- package/_src/vendor/Cache/Lookup/definition.ts +0 -15
- package/_src/vendor/Cache/Lookup.ts +0 -3
- package/_src/vendor/Cache/global.ts.bak +0 -23
- package/_src/vendor/Cache/index.ts +0 -4
- package/dist/ext.d.ts +0 -2
- package/dist/ext.d.ts.map +0 -1
- package/dist/ext.js +0 -2
- package/dist/lib/fileUtil.d.ts +0 -22
- package/dist/lib/fileUtil.d.ts.map +0 -1
- package/dist/lib/fileUtil.js +0 -23
- package/dist/services/CUPS/service.d.ts +0 -19
- package/dist/services/CUPS/service.d.ts.map +0 -1
- package/dist/services/CUPS/service.js +0 -5
- package/dist/services/CUPS.d.ts +0 -10
- package/dist/services/CUPS.d.ts.map +0 -1
- package/dist/services/CUPS.js +0 -89
- package/dist/services/Cache.d.ts +0 -28
- package/dist/services/Cache.d.ts.map +0 -1
- package/dist/services/Cache.js +0 -28
- package/dist/services/ServiceBus.d.ts +0 -26
- package/dist/services/ServiceBus.d.ts.map +0 -1
- package/dist/services/ServiceBus.js +0 -53
- package/dist/services/memQueue.d.ts +0 -18
- package/dist/services/memQueue.d.ts.map +0 -1
- package/dist/services/memQueue.js +0 -24
- package/dist/vendor/Cache/Cache/_internal/AtomicBoolean.d.ts +0 -5
- package/dist/vendor/Cache/Cache/_internal/AtomicBoolean.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/AtomicBoolean.js +0 -7
- package/dist/vendor/Cache/Cache/_internal/AtomicNumber.d.ts +0 -8
- package/dist/vendor/Cache/Cache/_internal/AtomicNumber.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/AtomicNumber.js +0 -22
- package/dist/vendor/Cache/Cache/_internal/AtomicReference.d.ts +0 -10
- package/dist/vendor/Cache/Cache/_internal/AtomicReference.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/AtomicReference.js +0 -25
- package/dist/vendor/Cache/Cache/_internal/CacheInternal.d.ts +0 -51
- package/dist/vendor/Cache/Cache/_internal/CacheInternal.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/CacheInternal.js +0 -253
- package/dist/vendor/Cache/Cache/_internal/CacheState.d.ts +0 -33
- package/dist/vendor/Cache/Cache/_internal/CacheState.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/CacheState.js +0 -21
- package/dist/vendor/Cache/Cache/_internal/KeySet.d.ts +0 -20
- package/dist/vendor/Cache/Cache/_internal/KeySet.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/KeySet.js +0 -61
- package/dist/vendor/Cache/Cache/_internal/MapKey.d.ts +0 -24
- package/dist/vendor/Cache/Cache/_internal/MapKey.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/MapKey.js +0 -37
- package/dist/vendor/Cache/Cache/_internal/MapValue.d.ts +0 -32
- package/dist/vendor/Cache/Cache/_internal/MapValue.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/_internal/MapValue.js +0 -24
- package/dist/vendor/Cache/Cache/definition.d.ts +0 -100
- package/dist/vendor/Cache/Cache/definition.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/definition.js +0 -5
- package/dist/vendor/Cache/Cache/operations/make.d.ts +0 -12
- package/dist/vendor/Cache/Cache/operations/make.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/operations/make.js +0 -12
- package/dist/vendor/Cache/Cache/operations/makeWith.d.ts +0 -14
- package/dist/vendor/Cache/Cache/operations/makeWith.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/operations/makeWith.js +0 -15
- package/dist/vendor/Cache/Cache/operations.d.ts +0 -3
- package/dist/vendor/Cache/Cache/operations.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache/operations.js +0 -4
- package/dist/vendor/Cache/Cache.d.ts +0 -3
- package/dist/vendor/Cache/Cache.d.ts.map +0 -1
- package/dist/vendor/Cache/Cache.js +0 -4
- package/dist/vendor/Cache/CacheStats/definition.d.ts +0 -19
- package/dist/vendor/Cache/CacheStats/definition.d.ts.map +0 -1
- package/dist/vendor/Cache/CacheStats/definition.js +0 -6
- package/dist/vendor/Cache/CacheStats.d.ts +0 -2
- package/dist/vendor/Cache/CacheStats.d.ts.map +0 -1
- package/dist/vendor/Cache/CacheStats.js +0 -3
- package/dist/vendor/Cache/EntryStats/definition.d.ts +0 -17
- package/dist/vendor/Cache/EntryStats/definition.d.ts.map +0 -1
- package/dist/vendor/Cache/EntryStats/definition.js +0 -4
- package/dist/vendor/Cache/EntryStats.d.ts +0 -2
- package/dist/vendor/Cache/EntryStats.d.ts.map +0 -1
- package/dist/vendor/Cache/EntryStats.js +0 -3
- package/dist/vendor/Cache/Lookup/definition.d.ts +0 -17
- package/dist/vendor/Cache/Lookup/definition.d.ts.map +0 -1
- package/dist/vendor/Cache/Lookup/definition.js +0 -2
- package/dist/vendor/Cache/Lookup.d.ts +0 -2
- package/dist/vendor/Cache/Lookup.d.ts.map +0 -1
- package/dist/vendor/Cache/Lookup.js +0 -3
- package/dist/vendor/Cache/index.d.ts +0 -5
- package/dist/vendor/Cache/index.d.ts.map +0 -1
- package/dist/vendor/Cache/index.js +0 -5
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.KeySet = void 0;
|
|
7
|
-
var tsplus_module_1 = _interopRequireWildcard(require("@fp-ts/data/Equal"));
|
|
8
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
-
/**
|
|
11
|
-
* A `KeySet` is a sorted set of keys in the cache ordered by last access.
|
|
12
|
-
* For efficiency, the set is implemented in terms of a doubly linked list
|
|
13
|
-
* and is not safe for concurrent access.
|
|
14
|
-
*/
|
|
15
|
-
class KeySet {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.head = undefined;
|
|
18
|
-
this.tail = undefined;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Adds the specified key to the set.
|
|
22
|
-
*/
|
|
23
|
-
add(key) {
|
|
24
|
-
if (!tsplus_module_1.equals(key, this.tail)) {
|
|
25
|
-
if (this.tail != null) {
|
|
26
|
-
const previous = key.previous;
|
|
27
|
-
const next = key.next;
|
|
28
|
-
if (next != null) {
|
|
29
|
-
key.next = undefined;
|
|
30
|
-
if (previous != null) {
|
|
31
|
-
previous.next = next;
|
|
32
|
-
next.previous = previous;
|
|
33
|
-
} else {
|
|
34
|
-
this.head = next;
|
|
35
|
-
this.head.previous = undefined;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
this.tail.next = key;
|
|
39
|
-
key.previous = this.tail;
|
|
40
|
-
this.tail = key;
|
|
41
|
-
} else {
|
|
42
|
-
this.head = key;
|
|
43
|
-
this.tail = key;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Removes the lowest priority key from the set.
|
|
49
|
-
*/
|
|
50
|
-
remove() {
|
|
51
|
-
const key = this.head;
|
|
52
|
-
if (key != null) {
|
|
53
|
-
const next = key.next;
|
|
54
|
-
if (next) {
|
|
55
|
-
key.next = undefined;
|
|
56
|
-
this.head = next;
|
|
57
|
-
this.head.previous = undefined;
|
|
58
|
-
} else {
|
|
59
|
-
this.head = undefined;
|
|
60
|
-
this.tail = undefined;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return key;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.KeySet = KeySet;
|
|
67
|
-
//# sourceMappingURL=KeySet.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeySet.cjs","mappings":";;;;;;;;;AAEA;;;;;AAKM,MAAOA,MAAM;EAAnBC;IACE,SAAI,GAA4BC,SAAS;IACzC,SAAI,GAA4BA,SAAS;EAgD3C;EA9CE;;;EAGAC,GAAG,CAACC,GAAgB;IAClB,IAAI,CAACC,uBAAcD,GAAG,EAAE,IAAI,CAACE,IAAI,CAAC,EAAE;MAClC,IAAI,IAAI,CAACA,IAAI,IAAI,IAAI,EAAE;QACrB,MAAMC,QAAQ,GAAGH,GAAG,CAACG,QAAQ;QAC7B,MAAMC,IAAI,GAAGJ,GAAG,CAACI,IAAI;QACrB,IAAIA,IAAI,IAAI,IAAI,EAAE;UAChBJ,GAAG,CAACI,IAAI,GAAGN,SAAS;UACpB,IAAIK,QAAQ,IAAI,IAAI,EAAE;YACpBA,QAAQ,CAACC,IAAI,GAAGA,IAAI;YACpBA,IAAI,CAACD,QAAQ,GAAGA,QAAQ;WACzB,MAAM;YACL,IAAI,CAACE,IAAI,GAAGD,IAAI;YAChB,IAAI,CAACC,IAAI,CAACF,QAAQ,GAAGL,SAAS;;;QAGlC,IAAI,CAACI,IAAI,CAACE,IAAI,GAAGJ,GAAG;QACpBA,GAAG,CAACG,QAAQ,GAAG,IAAI,CAACD,IAAI;QACxB,IAAI,CAACA,IAAI,GAAGF,GAAG;OAChB,MAAM;QACL,IAAI,CAACK,IAAI,GAAGL,GAAG;QACf,IAAI,CAACE,IAAI,GAAGF,GAAG;;;EAGrB;EAEA;;;EAGAM,MAAM;IACJ,MAAMN,GAAG,GAAG,IAAI,CAACK,IAAI;IACrB,IAAIL,GAAG,IAAI,IAAI,EAAE;MACf,MAAMI,IAAI,GAAGJ,GAAG,CAACI,IAAI;MACrB,IAAIA,IAAI,EAAE;QACRJ,GAAG,CAACI,IAAI,GAAGN,SAAS;QACpB,IAAI,CAACO,IAAI,GAAGD,IAAI;QAChB,IAAI,CAACC,IAAI,CAACF,QAAQ,GAAGL,SAAS;OAC/B,MAAM;QACL,IAAI,CAACO,IAAI,GAAGP,SAAS;QACrB,IAAI,CAACI,IAAI,GAAGJ,SAAS;;;IAGzB,OAAOE,GAAG;EACZ;;AACD","names":["KeySet","constructor","undefined","add","key","tsplus_module_1","tail","previous","next","head","remove"],"sourceRoot":"","sources":["../../../../../_src/vendor/Cache/Cache/_internal/KeySet.ts"],"sourcesContent":[null]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isMapKey = exports.MapKeyURI = exports.MapKey = void 0;
|
|
7
|
-
var tsplus_module_1 = _interopRequireWildcard(require("@fp-ts/data/Equal"));
|
|
8
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
-
var _a;
|
|
11
|
-
const isMapKey = isMapKey_1;
|
|
12
|
-
exports.isMapKey = isMapKey;
|
|
13
|
-
const MapKeyURI = Symbol.for("@effect/cache/Cache/MapKey");
|
|
14
|
-
/**
|
|
15
|
-
* A `MapKey` represents a key in the cache. It contains mutable references
|
|
16
|
-
* to the previous key and next key in the `KeySet` to support an efficient
|
|
17
|
-
* implementation of a sorted set of keys.
|
|
18
|
-
*/
|
|
19
|
-
exports.MapKeyURI = MapKeyURI;
|
|
20
|
-
class MapKey {
|
|
21
|
-
constructor(value) {
|
|
22
|
-
this.value = value;
|
|
23
|
-
this[_a] = MapKeyURI;
|
|
24
|
-
this.previous = undefined;
|
|
25
|
-
this.next = undefined;
|
|
26
|
-
}
|
|
27
|
-
[(_a = MapKeyURI, tsplus_module_1.symbolHash)]() {
|
|
28
|
-
return tsplus_module_1.hashCombine(tsplus_module_1.hashCombine(tsplus_module_1.hash(this.next))(tsplus_module_1.hash(this.previous)))(tsplus_module_1.hash(this.value));
|
|
29
|
-
}
|
|
30
|
-
[tsplus_module_1.symbolEqual](that) {
|
|
31
|
-
if (this === that) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
return isMapKey_1(that) && tsplus_module_1.equals(this.value, that.value) && tsplus_module_1.equals(this.previous, that.previous) && tsplus_module_1.equals(this.next, that.next);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @tsplus static effect/cache/Cache/MapKey.Ops is
|
|
39
|
-
*/
|
|
40
|
-
exports.MapKey = MapKey;
|
|
41
|
-
function isMapKey_1(u) {
|
|
42
|
-
return typeof u === "object" && u != null && MapKeyURI in u;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=MapKey.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapKey.cjs","mappings":";;;;;;;;;;MAwCgBA,QAAQ;AAAA;AAtCjB,MAAMC,SAAS,GAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;AAGjE;;;;;AAAA;AAKM,MAAOC,MAAM;EAMjBC,YAAqBC,KAAU;IAAV,UAAK,GAALA,KAAK;IALjB,QAAW,GAAcL,SAAS;IAE3C,aAAQ,GAA4BM,SAAS;IAC7C,SAAI,GAA4BA,SAAS;EAEP;EAElC,OAPUN,SAAS,EAOlBO,0BAAU,KAAC;IACV,OAAOC,4BACLA,4BACEA,qBAAY,IAAI,CAACC,IAAI,CAAC,CACvB,CAACD,qBAAY,IAAI,CAACE,QAAQ,CAAC,CAAC,CAC9B,CAACF,qBAAY,IAAI,CAACH,KAAK,CAAC,CAAC;EAC5B;EAEA,CAACM,2BAAW,EAAEC,IAAa;IACzB,IAAI,IAAI,KAAKA,IAAI,EAAE;MACjB,OAAO,IAAI;;IAEb,OAAOC,WAASD,IAAI,CAAC,IACnBJ,uBAAc,IAAI,CAACH,KAAK,EAAEO,IAAI,CAACP,KAAK,CAAC,IACrCG,uBAAc,IAAI,CAACE,QAAQ,EAAEE,IAAI,CAACF,QAAQ,CAAC,IAC3CF,uBAAc,IAAI,CAACC,IAAI,EAAEG,IAAI,CAACH,IAAI,CAAC;EACvC;;AAGF;;;AAAA;AAGA,oBAAyBK,CAAU;EACjC,OAAO,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,IAAI,IAAI,IAAId,SAAS,IAAIc,CAAC;AAC7D","names":["isMapKey","MapKeyURI","Symbol","for","MapKey","constructor","value","undefined","symbolHash","tsplus_module_1","next","previous","symbolEqual","that","isMapKey_1","u"],"sourceRoot":"","sources":["../../../../../_src/vendor/Cache/Cache/_internal/MapKey.ts"],"sourcesContent":[null]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Refreshing = exports.Pending = exports.Complete = void 0;
|
|
7
|
-
class Pending {
|
|
8
|
-
constructor(key, deferred) {
|
|
9
|
-
this.key = key;
|
|
10
|
-
this.deferred = deferred;
|
|
11
|
-
this._tag = "Pending";
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.Pending = Pending;
|
|
15
|
-
class Complete {
|
|
16
|
-
constructor(key, exit, entryStats, timeToLiveMillis) {
|
|
17
|
-
this.key = key;
|
|
18
|
-
this.exit = exit;
|
|
19
|
-
this.entryStats = entryStats;
|
|
20
|
-
this.timeToLiveMillis = timeToLiveMillis;
|
|
21
|
-
this._tag = "Complete";
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.Complete = Complete;
|
|
25
|
-
class Refreshing {
|
|
26
|
-
constructor(deferred, complete) {
|
|
27
|
-
this.deferred = deferred;
|
|
28
|
-
this.complete = complete;
|
|
29
|
-
this._tag = "Refreshing";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.Refreshing = Refreshing;
|
|
33
|
-
//# sourceMappingURL=MapValue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapValue.cjs","mappings":";;;;;;AAcM,MAAOA,OAAO;EAElBC,YACWC,GAAgB,EAChBC,QAAgC;IADhC,QAAG,GAAHD,GAAG;IACH,aAAQ,GAARC,QAAQ;IAHV,SAAI,GAAG,SAAS;EAItB;;AACJ;AAEK,MAAOC,QAAQ;EAEnBH,YACWC,GAAgB,EAChBG,IAAwB,EACxBC,UAAsB,EACtBC,gBAAwB;IAHxB,QAAG,GAAHL,GAAG;IACH,SAAI,GAAJG,IAAI;IACJ,eAAU,GAAVC,UAAU;IACV,qBAAgB,GAAhBC,gBAAgB;IALlB,SAAI,GAAG,UAAU;EAMvB;;AACJ;AAEK,MAAOC,UAAU;EAErBP,YACWE,QAAgC,EAChCM,QAAqC;IADrC,aAAQ,GAARN,QAAQ;IACR,aAAQ,GAARM,QAAQ;IAHV,SAAI,GAAG,YAAY;EAIzB;;AACJ","names":["Pending","constructor","key","deferred","Complete","exit","entryStats","timeToLiveMillis","Refreshing","complete"],"sourceRoot":"","sources":["../../../../../_src/vendor/Cache/Cache/_internal/MapValue.ts"],"sourcesContent":[null]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CacheURI = exports.Cache = void 0;
|
|
7
|
-
const CacheURI = Symbol.for("@effect/cache/Cache");
|
|
8
|
-
exports.CacheURI = CacheURI;
|
|
9
|
-
const Cache = {
|
|
10
|
-
$: {}
|
|
11
|
-
};
|
|
12
|
-
exports.Cache = Cache;
|
|
13
|
-
//# sourceMappingURL=definition.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.cjs","mappings":";;;;;;AAGO,MAAMA,QAAQ,GAAGC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAAA;AAqGlD,MAAMC,KAAK,GAAa;EAC7BC,CAAC,EAAE;CACJ;AAAA","names":["CacheURI","Symbol","for","Cache","$"],"sourceRoot":"","sources":["../../../../_src/vendor/Cache/Cache/definition.ts"],"sourcesContent":[null]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.make = make;
|
|
7
|
-
var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/infra/vendor/Cache/Cache/operations/makeWith"));
|
|
8
|
-
require("../definition.cjs");
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a new cache with the specified capacity, time to live, and
|
|
13
|
-
* lookup function.
|
|
14
|
-
*
|
|
15
|
-
* @tsplus static effect/cache/Cache.Ops make
|
|
16
|
-
*/
|
|
17
|
-
function make(capacity, timeToLive, lookup, __tsplusTrace) {
|
|
18
|
-
return tsplus_module_1.makeWith(capacity, lookup, () => timeToLive, __tsplusTrace);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=make.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"make.cjs","mappings":";;;;;;;AACA;AAAwC;AAAA;AAExC;;;;;;AAMM,SAAUA,IAAI,CAClBC,QAAgB,EAChBC,UAAe,EACfC,MAA8C,EAC9CC,aAAsB;EAEtB,OAAOC,yBAAeJ,QAAQ,EAAEE,MAAM,EAAE,MAAMD,UAAU,EAFxDE,cAEyD;AAC3D","names":["make","capacity","timeToLive","lookup","__tsplusTrace","tsplus_module_1"],"sourceRoot":"","sources":["../../../../../_src/vendor/Cache/Cache/operations/make.ts"],"sourcesContent":[null]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"makeWith.cjs","mappings":";;;;;;;;AACA;AAA6D;AAAA;;AAG7D;;;;;;;AAOM,SAAUA,QAAQ,CACtBC,QAAgB,EAChBC,MAA8C,EAC9CC,UAA6C,EAC7CC,aAAsB;EAEtB,qDAAOC,0BAAiBC,KAAK,IAC3BC,sEAA0CC,WAAW,IACnDD,kEAAqBE,OAAO,IAC1B,IAAIC,4BAAa,CACfT,QAAQ,EACRC,MAAM,EACNC,UAAU,EACVG,KAAK,EACLE,WAAW,EACXC,OAAO,CACR,iDARHJ,yBAAgB,EASf,iDAVHA,6BAAiC,EAWhC,CACF;AACH","names":["makeWith","capacity","lookup","timeToLive","__tsplusTrace","tsplus_module_1","clock","tracer_1","environment","fiberId","CacheInternal"],"sourceRoot":"","sources":["../../../../../_src/vendor/Cache/Cache/operations/makeWith.ts"],"sourcesContent":[null]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _make = require("./operations/make.cjs");
|
|
7
|
-
Object.keys(_make).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _make[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _make[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _makeWith = require("./operations/makeWith.cjs");
|
|
18
|
-
Object.keys(_makeWith).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _makeWith[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _makeWith[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=operations.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations.cjs","mappings":";;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA","names":[],"sourceRoot":"","sources":["../../../../_src/vendor/Cache/Cache/operations.ts"],"sourcesContent":[null]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = require("./Cache/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _operations = require("./Cache/operations.cjs");
|
|
18
|
-
Object.keys(_operations).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _operations[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _operations[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=Cache.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.cjs","mappings":";;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA","names":[],"sourceRoot":"","sources":["../../../_src/vendor/Cache/Cache.ts"],"sourcesContent":[null]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CacheStats = void 0;
|
|
7
|
-
const CacheStats = (hits, misses, size) => ({
|
|
8
|
-
hits,
|
|
9
|
-
misses,
|
|
10
|
-
size
|
|
11
|
-
});
|
|
12
|
-
exports.CacheStats = CacheStats;
|
|
13
|
-
//# sourceMappingURL=definition.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.cjs","mappings":";;;;;;AAkBO,MAAMA,UAAU,GAAkB,CAACC,IAAI,EAAEC,MAAM,EAAEC,IAAI,MAAM;EAChEF,IAAI;EACJC,MAAM;EACNC;CACD,CAAC;AAAA","names":["CacheStats","hits","misses","size"],"sourceRoot":"","sources":["../../../../_src/vendor/Cache/CacheStats/definition.ts"],"sourcesContent":[null]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = require("./CacheStats/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=CacheStats.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CacheStats.cjs","mappings":";;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA","names":[],"sourceRoot":"","sources":["../../../_src/vendor/Cache/CacheStats.ts"],"sourcesContent":[null]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.cjs","mappings":";;;;;;AAgBO,MAAMA,UAAU,GAAmBC,YAAY,KAAM;EAC1DA;CACD,CAAC;AAAA","names":["EntryStats","loadedMillis"],"sourceRoot":"","sources":["../../../../_src/vendor/Cache/EntryStats/definition.ts"],"sourcesContent":[null]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = require("./EntryStats/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=EntryStats.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntryStats.cjs","mappings":";;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA","names":[],"sourceRoot":"","sources":["../../../_src/vendor/Cache/EntryStats.ts"],"sourcesContent":[null]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.cjs","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _definition = require("./Lookup/definition.cjs");
|
|
7
|
-
Object.keys(_definition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _definition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _definition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=Lookup.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Lookup.cjs","mappings":";;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA","names":[],"sourceRoot":"","sources":["../../../_src/vendor/Cache/Lookup.ts"],"sourcesContent":[null]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.lookup = exports.entryStats = exports.cacheStats = exports.cache = void 0;
|
|
7
|
-
var _cache = _interopRequireWildcard(require("./Cache.cjs"));
|
|
8
|
-
exports.cache = _cache;
|
|
9
|
-
var _cacheStats = _interopRequireWildcard(require("./CacheStats.cjs"));
|
|
10
|
-
exports.cacheStats = _cacheStats;
|
|
11
|
-
var _entryStats = _interopRequireWildcard(require("./EntryStats.cjs"));
|
|
12
|
-
exports.entryStats = _entryStats;
|
|
13
|
-
var _lookup = _interopRequireWildcard(require("./Lookup.cjs"));
|
|
14
|
-
exports.lookup = _lookup;
|
|
15
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
package/_src/ext.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./lib/ext/Array.js"
|
package/_src/lib/fileUtil.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import crypto from "crypto"
|
|
2
|
-
import type { Abortable } from "events"
|
|
3
|
-
import type { Mode, ObjectEncodingOptions, OpenMode } from "fs"
|
|
4
|
-
import fs from "fs/promises"
|
|
5
|
-
import os from "os"
|
|
6
|
-
import path from "path"
|
|
7
|
-
import type internal from "stream"
|
|
8
|
-
|
|
9
|
-
export function readFile(fileName: string) {
|
|
10
|
-
return Effect.tryPromise(() => fs.readFile(fileName))
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function createReadableStream(fileName: string) {
|
|
14
|
-
return openFile(fileName)
|
|
15
|
-
.map(file => file.createReadStream())
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function openFile(fileName: string) {
|
|
19
|
-
return Effect.tryPromise(() => fs.open(fileName)).acquireRelease(f => Effect.promise(() => f.close()))
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function tempFile(
|
|
23
|
-
folder: string
|
|
24
|
-
) {
|
|
25
|
-
return (prefix: string) => (data: Data, options?: Options) => tempFile_(folder, prefix, data, options)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type Data =
|
|
29
|
-
| string
|
|
30
|
-
| NodeJS.ArrayBufferView
|
|
31
|
-
| Iterable<string | NodeJS.ArrayBufferView>
|
|
32
|
-
| AsyncIterable<string | NodeJS.ArrayBufferView>
|
|
33
|
-
| internal.Stream
|
|
34
|
-
|
|
35
|
-
type Options =
|
|
36
|
-
| (ObjectEncodingOptions & {
|
|
37
|
-
mode?: Mode | undefined
|
|
38
|
-
flag?: OpenMode | undefined
|
|
39
|
-
} & Abortable)
|
|
40
|
-
| BufferEncoding
|
|
41
|
-
| null
|
|
42
|
-
export function tempFile_(
|
|
43
|
-
folder: string,
|
|
44
|
-
prefix: string,
|
|
45
|
-
data: Data,
|
|
46
|
-
options?: Options
|
|
47
|
-
) {
|
|
48
|
-
return Effect(() => path.join(os.tmpdir(), folder, `${prefix}-` + crypto.randomUUID()))
|
|
49
|
-
.flatMap(fp =>
|
|
50
|
-
Effect.tryPromise(() => fs.writeFile(fp, data, options))
|
|
51
|
-
.map(_ => fp)
|
|
52
|
-
.acquireRelease(
|
|
53
|
-
p => Effect.promise(() => fs.unlink(p))
|
|
54
|
-
)
|
|
55
|
-
)
|
|
56
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const PrinterId = ReasonableString
|
|
2
|
-
export type PrinterId = ReasonableString
|
|
3
|
-
|
|
4
|
-
export interface CUPS {
|
|
5
|
-
print: (buffer: ArrayBuffer, printerId: PrinterId, ...options: string[]) => Effect<never, unknown, {
|
|
6
|
-
stdout: string
|
|
7
|
-
stderr: string
|
|
8
|
-
}>
|
|
9
|
-
getAvailablePrinters: Effect<never, unknown, ReasonableString[]>
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @tsplus type CUPS.Ops
|
|
14
|
-
*/
|
|
15
|
-
export interface CUPSOps extends Tag<CUPS> {}
|
|
16
|
-
export const CUPS: CUPSOps = Tag<CUPS>()
|
package/_src/services/CUPS.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import cp from "child_process"
|
|
2
|
-
import util from "util"
|
|
3
|
-
import { tempFile } from "../lib/fileUtil.js"
|
|
4
|
-
|
|
5
|
-
import { isTruthy } from "@effect-app/core/utils"
|
|
6
|
-
import { ReasonableString } from "@effect-app/schema"
|
|
7
|
-
import { Effect } from "@effect/io/Effect"
|
|
8
|
-
import fs from "fs"
|
|
9
|
-
import os from "os"
|
|
10
|
-
import path from "path"
|
|
11
|
-
import type { PrinterId } from "./CUPS/service.js"
|
|
12
|
-
import { CUPS } from "./CUPS/service.js"
|
|
13
|
-
|
|
14
|
-
export * from "./CUPS/service.js"
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @tsplus static CUPS.Ops Live
|
|
18
|
-
*/
|
|
19
|
-
export function LiveCUPS(cupsServer?: URL) {
|
|
20
|
-
return makeCUPS(cupsServer).toLayer(CUPS)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function makeCUPS(cupsServer?: URL) {
|
|
24
|
-
return Effect(() => {
|
|
25
|
-
function print_(buffer: ArrayBuffer, printerId: PrinterId, ...options: string[]) {
|
|
26
|
-
const print = printBuffer({
|
|
27
|
-
id: printerId,
|
|
28
|
-
url: cupsServer
|
|
29
|
-
}, options)
|
|
30
|
-
return print(buffer)
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
print: print_,
|
|
34
|
-
getAvailablePrinters: getAvailablePrinters(cupsServer?.host)
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const exec_ = util.promisify(cp.exec)
|
|
40
|
-
const exec = (command: string) =>
|
|
41
|
-
Effect.logDebug(`Executing: ${command}`)
|
|
42
|
-
> Effect.tryPromise(() => exec_(command))
|
|
43
|
-
.tap(r => (Effect.logDebug(`Executed`).logAnnotate("result", r.$$.pretty)))
|
|
44
|
-
type PrinterConfig = { url?: URL; id: string }
|
|
45
|
-
|
|
46
|
-
function printFile(printer: PrinterConfig | undefined, options: string[]) {
|
|
47
|
-
return (filePath: string) => printFile_(filePath, printer, options)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function printFile_(filePath: string, printer: PrinterConfig | undefined, options: string[]) {
|
|
51
|
-
return exec(["lp", ...buildPrintArgs(filePath, printer, options)].join(" "))
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function* buildPrintArgs(filePath: string, printer: PrinterConfig | undefined, options: string[]) {
|
|
55
|
-
if (printer) {
|
|
56
|
-
if (printer.url) {
|
|
57
|
-
yield `-h ${printer.url.host}`
|
|
58
|
-
if (printer.url.username) {
|
|
59
|
-
yield `-U ${printer.url.username}`
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
yield `-d "${printer.id}"`
|
|
63
|
-
for (const o of options) {
|
|
64
|
-
yield `-o ${o}`
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
yield `"${filePath}"`
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const prepareTempDir = Effect(() => {
|
|
71
|
-
// TODO
|
|
72
|
-
try {
|
|
73
|
-
fs.mkdirSync(path.join(os.tmpdir(), "effect-ts-app"))
|
|
74
|
-
} catch (err) {
|
|
75
|
-
if (`${err}`.includes("EEXIST")) {
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
throw err
|
|
79
|
-
}
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
const makeTempFile = tempFile("effect-ts-app")
|
|
83
|
-
const makePrintJobTempFile = makeTempFile("print-job")
|
|
84
|
-
|
|
85
|
-
function printBuffer(printer: PrinterConfig, options: string[]) {
|
|
86
|
-
return (buffer: ArrayBuffer) =>
|
|
87
|
-
makePrintJobTempFile(Buffer.from(buffer))
|
|
88
|
-
.flatMapScoped(printFile(printer, options))
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getAvailablePrinters(host?: string) {
|
|
92
|
-
return Do($ => {
|
|
93
|
-
const { stdout } = $(exec(["lpstat", ...buildListArgs({ host }), "-s"].join(" ")))
|
|
94
|
-
return [...stdout.matchAll(/device for (\w+):/g)]
|
|
95
|
-
.map(_ => _[1])
|
|
96
|
-
.filter(isTruthy)
|
|
97
|
-
.map(ReasonableString)
|
|
98
|
-
})
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function* buildListArgs(config?: { host?: string }) {
|
|
102
|
-
if (config?.host) {
|
|
103
|
-
yield `-h ${config.host}`
|
|
104
|
-
}
|
|
105
|
-
}
|
package/_src/services/Cache.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Cache as _Cache } from "../vendor/Cache/Cache.js"
|
|
2
|
-
import { make as _make } from "../vendor/Cache/Cache.js"
|
|
3
|
-
import type { CacheState } from "../vendor/Cache/Cache/_internal/CacheState.js"
|
|
4
|
-
import type { Lookup } from "../vendor/Cache/Lookup.js"
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @tsplus type ets/cache/Cache
|
|
8
|
-
*/
|
|
9
|
-
export interface Cache<Key, Error, Value> extends _Cache<Key, Error, Value> {}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @tsplus type ets/cache/CacheOps
|
|
13
|
-
*/
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
15
|
-
export interface CacheOps {}
|
|
16
|
-
|
|
17
|
-
export const Cache: CacheOps = {}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @tsplus static ets/cache/CacheOps make
|
|
21
|
-
*/
|
|
22
|
-
export function make<Key, Environment, Error, Value>(
|
|
23
|
-
capacity: number,
|
|
24
|
-
duration: DUR,
|
|
25
|
-
lookup: Lookup<Key, Environment, Error, Value>
|
|
26
|
-
) {
|
|
27
|
-
return _make(capacity, duration, lookup) as Effect<Environment, never, Cache<Key, Error, Value>>
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @tsplus getter ets/cache/Cache results
|
|
32
|
-
*/
|
|
33
|
-
export function results<Key, Error, Value>(
|
|
34
|
-
self: Cache<Key, Error, Value>
|
|
35
|
-
): Effect<never, never, Chunk<[Key, Exit<Error, Value>]>> {
|
|
36
|
-
return Effect(() => {
|
|
37
|
-
const values: Array<[Key, Exit<Error, Value>]> = []
|
|
38
|
-
for (const [key, value] of ((self as any).cacheState as CacheState<Key, Error, Value>).map) {
|
|
39
|
-
if (value._tag === "Complete") {
|
|
40
|
-
values.push([key, value.exit])
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return Chunk.fromIterable(values)
|
|
44
|
-
})
|
|
45
|
-
}
|