@effect/platform-browser 0.1.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.
Files changed (63) hide show
  1. package/Effectify.d.ts +19 -0
  2. package/Effectify.d.ts.map +1 -0
  3. package/Effectify.js +13 -0
  4. package/Effectify.js.map +1 -0
  5. package/Error.d.ts +30 -0
  6. package/Error.d.ts.map +1 -0
  7. package/Error.js +25 -0
  8. package/Error.js.map +1 -0
  9. package/HttpClient.d.ts +61 -0
  10. package/HttpClient.d.ts.map +1 -0
  11. package/HttpClient.js +23 -0
  12. package/HttpClient.js.map +1 -0
  13. package/KeyValueStore.d.ts +16 -0
  14. package/KeyValueStore.d.ts.map +1 -0
  15. package/KeyValueStore.js +48 -0
  16. package/KeyValueStore.js.map +1 -0
  17. package/LICENSE +21 -0
  18. package/Path.d.ts +7 -0
  19. package/Path.d.ts.map +1 -0
  20. package/Path.js +17 -0
  21. package/Path.js.map +1 -0
  22. package/README.md +3 -0
  23. package/Runtime.d.ts +10 -0
  24. package/Runtime.d.ts.map +1 -0
  25. package/Runtime.js +16 -0
  26. package/Runtime.js.map +1 -0
  27. package/internal/keyValueStore.d.ts +2 -0
  28. package/internal/keyValueStore.d.ts.map +1 -0
  29. package/internal/keyValueStore.js +107 -0
  30. package/internal/keyValueStore.js.map +1 -0
  31. package/internal/runtime.d.ts +2 -0
  32. package/internal/runtime.d.ts.map +1 -0
  33. package/internal/runtime.js +23 -0
  34. package/internal/runtime.js.map +1 -0
  35. package/mjs/Effectify.mjs +10 -0
  36. package/mjs/Effectify.mjs.map +1 -0
  37. package/mjs/Error.mjs +20 -0
  38. package/mjs/Error.mjs.map +1 -0
  39. package/mjs/HttpClient.mjs +61 -0
  40. package/mjs/HttpClient.mjs.map +1 -0
  41. package/mjs/KeyValueStore.mjs +22 -0
  42. package/mjs/KeyValueStore.mjs.map +1 -0
  43. package/mjs/Path.mjs +7 -0
  44. package/mjs/Path.mjs.map +1 -0
  45. package/mjs/Runtime.mjs +7 -0
  46. package/mjs/Runtime.mjs.map +1 -0
  47. package/mjs/internal/keyValueStore.mjs +97 -0
  48. package/mjs/internal/keyValueStore.mjs.map +1 -0
  49. package/mjs/internal/runtime.mjs +14 -0
  50. package/mjs/internal/runtime.mjs.map +1 -0
  51. package/package.json +32 -0
  52. package/src/Effectify.ts +22 -0
  53. package/src/Error.ts +31 -0
  54. package/src/HttpClient.ts +62 -0
  55. package/src/KeyValueStore.ts +24 -0
  56. package/src/Path.ts +7 -0
  57. package/src/Runtime.ts +11 -0
  58. package/src/internal/keyValueStore.ts +130 -0
  59. package/src/internal/runtime.ts +24 -0
  60. package/tsconfig.build.json +11 -0
  61. package/tsconfig.examples.json +12 -0
  62. package/tsconfig.json +11 -0
  63. package/tsconfig.test.json +17 -0
package/Effectify.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ export type {
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ Effectify,
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ EffectifyError } from "@effect/platform/Effectify";
13
+ export {
14
+ /**
15
+ * @since 1.0.0
16
+ * @category constructor
17
+ */
18
+ effectify } from "@effect/platform/Effectify";
19
+ //# sourceMappingURL=Effectify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Effectify.d.ts","sourceRoot":"","sources":["./src/Effectify.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY;AACV;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,cAAc,EACf,MAAM,4BAA4B,CAAA;AAEnC,OAAO;AACL;;;GAGG;AACH,SAAS,EACV,MAAM,4BAA4B,CAAA"}
package/Effectify.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "effectify", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Effectify.effectify;
10
+ }
11
+ });
12
+ var _Effectify = /*#__PURE__*/require("@effect/platform/Effectify");
13
+ //# sourceMappingURL=Effectify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Effectify.js","names":["_Effectify","require"],"sources":["./src/Effectify.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;AAeA,IAAAA,UAAA,gBAAAC,OAAA"}
package/Error.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ export {
5
+ /**
6
+ * @since 1.0.0
7
+ * @category error
8
+ */
9
+ BadArgument,
10
+ /**
11
+ * @since 1.0.0
12
+ * @category error
13
+ */
14
+ PlatformError,
15
+ /**
16
+ * @since 1.0.0
17
+ * @category type id
18
+ */
19
+ PlatformErrorTypeId,
20
+ /**
21
+ * @since 1.0.0
22
+ * @category error
23
+ */
24
+ SystemError,
25
+ /**
26
+ * @since 1.0.0
27
+ * @category model
28
+ */
29
+ SystemErrorReason } from "@effect/platform/Error";
30
+ //# sourceMappingURL=Error.d.ts.map
package/Error.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["./src/Error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO;AACL;;;GAGG;AACH,WAAW;AACX;;;GAGG;AACH,aAAa;AACb;;;GAGG;AACH,mBAAmB;AACnB;;;GAGG;AACH,WAAW;AACX;;;GAGG;AACH,iBAAiB,EAClB,MAAM,wBAAwB,CAAA"}
package/Error.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "BadArgument", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Error.BadArgument;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "PlatformErrorTypeId", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _Error.PlatformErrorTypeId;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SystemError", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _Error.SystemError;
22
+ }
23
+ });
24
+ var _Error = /*#__PURE__*/require("@effect/platform/Error");
25
+ //# sourceMappingURL=Error.js.map
package/Error.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.js","names":["_Error","require"],"sources":["./src/Error.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,MAAA,gBAAAC,OAAA"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import * as body from "@effect/platform/Http/Body";
5
+ import * as client from "@effect/platform/Http/Client";
6
+ import * as error from "@effect/platform/Http/ClientError";
7
+ import * as request from "@effect/platform/Http/ClientRequest";
8
+ import * as response from "@effect/platform/Http/ClientResponse";
9
+ import * as headers from "@effect/platform/Http/Headers";
10
+ import * as urlParams from "@effect/platform/Http/UrlParams";
11
+ export {
12
+ /**
13
+ * @since 1.0.0
14
+ *
15
+ * - Docs: [Http/Body](https://effect-ts.github.io/platform/platform/Http/Body.ts.html)
16
+ * - Module: `@effect/platform/Http/Body`
17
+ */
18
+ body,
19
+ /**
20
+ * @since 1.0.0
21
+ *
22
+ * - Docs: [Http/Client](https://effect-ts.github.io/platform/platform/Http/Client.ts.html)
23
+ * - Module: `@effect/platform/Http/Client`
24
+ */
25
+ client,
26
+ /**
27
+ * @since 1.0.0
28
+ *
29
+ * - Docs: [Http/ClientError](https://effect-ts.github.io/platform/platform/Http/ClientError.ts.html)
30
+ * - Module: `@effect/platform/Http/ClientError`
31
+ */
32
+ error,
33
+ /**
34
+ * @since 1.0.0
35
+ *
36
+ * - Docs: [Http/Headers](https://effect-ts.github.io/platform/platform/Http/Headers.ts.html)
37
+ * - Module: `@effect/platform/Http/Headers`
38
+ */
39
+ headers,
40
+ /**
41
+ * @since 1.0.0
42
+ *
43
+ * - Docs: [Http/ClientRequest](https://effect-ts.github.io/platform/platform/Http/ClientRequest.ts.html)
44
+ * - Module: `@effect/platform/Http/ClientRequest`
45
+ */
46
+ request,
47
+ /**
48
+ * @since 1.0.0
49
+ *
50
+ * - Docs: [Http/ClientResponse](https://effect-ts.github.io/platform/platform/Http/ClientResponse.ts.html)
51
+ * - Module: `@effect/platform/Http/ClientResponse`
52
+ */
53
+ response,
54
+ /**
55
+ * @since 1.0.0
56
+ *
57
+ * - Docs: [Http/UrlParams](https://effect-ts.github.io/platform/platform/Http/UrlParams.ts.html)
58
+ * - Module: `@effect/platform/Http/UrlParams`
59
+ */
60
+ urlParams };
61
+ //# sourceMappingURL=HttpClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["./src/HttpClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,OAAO,MAAM,qCAAqC,CAAA;AAC9D,OAAO,KAAK,QAAQ,MAAM,sCAAsC,CAAA;AAChE,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAA;AACxD,OAAO,KAAK,SAAS,MAAM,iCAAiC,CAAA;AAE5D,OAAO;AACL;;;;;GAKG;AACH,IAAI;AACJ;;;;;GAKG;AACH,MAAM;AACN;;;;;GAKG;AACH,KAAK;AACL;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,OAAO;AACP;;;;;GAKG;AACH,QAAQ;AACR;;;;;GAKG;AACH,SAAS,EACV,CAAA"}
package/HttpClient.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.urlParams = exports.response = exports.request = exports.headers = exports.error = exports.client = exports.body = void 0;
7
+ var body = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Body"));
8
+ exports.body = body;
9
+ var client = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Client"));
10
+ exports.client = client;
11
+ var error = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientError"));
12
+ exports.error = error;
13
+ var request = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientRequest"));
14
+ exports.request = request;
15
+ var response = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientResponse"));
16
+ exports.response = response;
17
+ var headers = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Headers"));
18
+ exports.headers = headers;
19
+ var urlParams = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/UrlParams"));
20
+ exports.urlParams = urlParams;
21
+ 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); }
22
+ 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; }
23
+ //# sourceMappingURL=HttpClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpClient.js","names":["body","_interopRequireWildcard","require","exports","client","error","request","response","headers","urlParams","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sources":["./src/HttpClient.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,IAAA,gBAAAC,uBAAA,eAAAC,OAAA;AAAkDC,OAAA,CAAAH,IAAA,GAAAA,IAAA;AAClD,IAAAI,MAAA,gBAAAH,uBAAA,eAAAC,OAAA;AAAsDC,OAAA,CAAAC,MAAA,GAAAA,MAAA;AACtD,IAAAC,KAAA,gBAAAJ,uBAAA,eAAAC,OAAA;AAA0DC,OAAA,CAAAE,KAAA,GAAAA,KAAA;AAC1D,IAAAC,OAAA,gBAAAL,uBAAA,eAAAC,OAAA;AAA8DC,OAAA,CAAAG,OAAA,GAAAA,OAAA;AAC9D,IAAAC,QAAA,gBAAAN,uBAAA,eAAAC,OAAA;AAAgEC,OAAA,CAAAI,QAAA,GAAAA,QAAA;AAChE,IAAAC,OAAA,gBAAAP,uBAAA,eAAAC,OAAA;AAAwDC,OAAA,CAAAK,OAAA,GAAAA,OAAA;AACxD,IAAAC,SAAA,gBAAAR,uBAAA,eAAAC,OAAA;AAA4DC,OAAA,CAAAM,SAAA,GAAAA,SAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAc,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
@@ -0,0 +1,16 @@
1
+ export * from "@effect/platform/KeyValueStore";
2
+ /**
3
+ * Creates a KeyValueStore layer that uses the browser's localStorage api. Values are stored between sessions.
4
+ *
5
+ * @since 1.0.0
6
+ * @category models
7
+ */
8
+ export declare const layerLocalStorage: import("@effect/io/Layer").Layer<never, never, import("@effect/platform/KeyValueStore").KeyValueStore>;
9
+ /**
10
+ * Creates a KeyValueStore layer that uses the browser's sessionStorage api. Values are stored only for the current session.
11
+ *
12
+ * @since 1.0.0
13
+ * @category models
14
+ */
15
+ export declare const layerSessionStorage: import("@effect/io/Layer").Layer<never, never, import("@effect/platform/KeyValueStore").KeyValueStore>;
16
+ //# sourceMappingURL=KeyValueStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["./src/KeyValueStore.ts"],"names":[],"mappings":"AAOA,cAAc,gCAAgC,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,wGAA6B,CAAA;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,wGAA+B,CAAA"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ layerLocalStorage: true,
8
+ layerSessionStorage: true
9
+ };
10
+ exports.layerSessionStorage = exports.layerLocalStorage = void 0;
11
+ var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform-browser/internal/keyValueStore"));
12
+ var _KeyValueStore = /*#__PURE__*/require("@effect/platform/KeyValueStore");
13
+ Object.keys(_KeyValueStore).forEach(function (key) {
14
+ if (key === "default" || key === "__esModule") return;
15
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
16
+ if (key in exports && exports[key] === _KeyValueStore[key]) return;
17
+ Object.defineProperty(exports, key, {
18
+ enumerable: true,
19
+ get: function () {
20
+ return _KeyValueStore[key];
21
+ }
22
+ });
23
+ });
24
+ 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); }
25
+ 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; }
26
+ /**
27
+ * @since 1.0.0
28
+ *
29
+ * Also includes exports from [`@effect/platform/KeyValueStore`](https://effect-ts.github.io/platform/platform/KeyValueStore.ts.html).
30
+ */
31
+
32
+ /**
33
+ * Creates a KeyValueStore layer that uses the browser's localStorage api. Values are stored between sessions.
34
+ *
35
+ * @since 1.0.0
36
+ * @category models
37
+ */
38
+ const layerLocalStorage = internal.layerLocalStorage;
39
+ /**
40
+ * Creates a KeyValueStore layer that uses the browser's sessionStorage api. Values are stored only for the current session.
41
+ *
42
+ * @since 1.0.0
43
+ * @category models
44
+ */
45
+ exports.layerLocalStorage = layerLocalStorage;
46
+ const layerSessionStorage = internal.layerSessionStorage;
47
+ exports.layerSessionStorage = layerSessionStorage;
48
+ //# sourceMappingURL=KeyValueStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueStore.js","names":["internal","_interopRequireWildcard","require","_KeyValueStore","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","layerLocalStorage","layerSessionStorage"],"sources":["./src/KeyValueStore.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;AAKA,IAAAA,QAAA,gBAAAC,uBAAA,eAAAC,OAAA;AAEA,IAAAC,cAAA,gBAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,cAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAA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,CAAAT,GAAA,EAAAK,MAAA,YAAAA,MAAA;AAP9C;;;;;;AASA;;;;;;AAMO,MAAMK,iBAAiB,GAAG/B,QAAQ,CAAC+B,iBAAiB;AAE3D;;;;;;AAAAnB,OAAA,CAAAmB,iBAAA,GAAAA,iBAAA;AAMO,MAAMC,mBAAmB,GAAGhC,QAAQ,CAACgC,mBAAmB;AAAApB,OAAA,CAAAoB,mBAAA,GAAAA,mBAAA"}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present The Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Path.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @since 1.0.0
3
+ *
4
+ * Also includes exports from [`@effect/platform/Path`](https://effect-ts.github.io/platform/platform/Path.ts.html).
5
+ */
6
+ export * from "@effect/platform/Path";
7
+ //# sourceMappingURL=Path.d.ts.map
package/Path.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["./src/Path.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,uBAAuB,CAAA"}
package/Path.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Path = /*#__PURE__*/require("@effect/platform/Path");
7
+ Object.keys(_Path).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Path[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Path[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=Path.js.map
package/Path.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Path.js","names":["_Path","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["./src/Path.ts"],"sourcesContent":[null],"mappings":";;;;;AAMA,IAAAA,KAAA,gBAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ WIP.
2
+
3
+ Docs: https://effect-ts.github.io/platform
package/Runtime.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Effect from "@effect/io/Effect";
5
+ /**
6
+ * @since 1.0.0
7
+ * @category runtime
8
+ */
9
+ export declare const runMain: <E, A>(effect: Effect.Effect<never, E, A>) => void;
10
+ //# sourceMappingURL=Runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Runtime.d.ts","sourceRoot":"","sources":["./src/Runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAGhD;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,IAAuB,CAAA"}
package/Runtime.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runMain = void 0;
7
+ var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform-browser/internal/runtime"));
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
+ * @since 1.0.0
12
+ * @category runtime
13
+ */
14
+ const runMain = internal.runMain;
15
+ exports.runMain = runMain;
16
+ //# sourceMappingURL=Runtime.js.map
package/Runtime.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Runtime.js","names":["internal","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","runMain","exports"],"sources":["./src/Runtime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAIA,IAAAA,QAAA,gBAAAC,uBAAA,eAAAC,OAAA;AAAqE,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAErE;;;;AAIO,MAAMW,OAAO,GAAuDzB,QAAQ,CAACyB,OAAO;AAAAC,OAAA,CAAAD,OAAA,GAAAA,OAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=keyValueStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyValueStore.d.ts","sourceRoot":"","sources":["../src/internal/keyValueStore.ts"],"names":[],"mappings":""}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.layerSessionStorage = exports.layerLocalStorage = void 0;
7
+ var Option = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Option"));
8
+ var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect"));
9
+ var Layer = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Layer"));
10
+ var PlatformError = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Error"));
11
+ var KeyValueStore = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/KeyValueStore"));
12
+ 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); }
13
+ 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; }
14
+ const storageError = props => PlatformError.SystemError({
15
+ reason: "PermissionDenied",
16
+ module: "KeyValueStore",
17
+ ...props
18
+ });
19
+ /** @internal */
20
+ const layerLocalStorage = /*#__PURE__*/Layer.succeed(KeyValueStore.KeyValueStore, /*#__PURE__*/KeyValueStore.make({
21
+ get: key => Effect.try({
22
+ try: () => Option.fromNullable(localStorage.getItem(key)),
23
+ catch: () => storageError({
24
+ pathOrDescriptor: "layerLocalStorage",
25
+ method: "get",
26
+ message: `Unable to get item with key ${key}`
27
+ })
28
+ }),
29
+ set: (key, value) => Effect.try({
30
+ try: () => localStorage.setItem(key, value),
31
+ catch: () => storageError({
32
+ pathOrDescriptor: "layerLocalStorage",
33
+ method: "set",
34
+ message: `Unable to set item with key ${key}`
35
+ })
36
+ }),
37
+ remove: key => Effect.try({
38
+ try: () => localStorage.removeItem(key),
39
+ catch: () => storageError({
40
+ pathOrDescriptor: "layerLocalStorage",
41
+ method: "remove",
42
+ message: `Unable to remove item with key ${key}`
43
+ })
44
+ }),
45
+ clear: /*#__PURE__*/Effect.try({
46
+ try: () => localStorage.clear(),
47
+ catch: () => storageError({
48
+ pathOrDescriptor: "layerLocalStorage",
49
+ method: "clear",
50
+ message: `Unable to clear storage`
51
+ })
52
+ }),
53
+ size: /*#__PURE__*/Effect.try({
54
+ try: () => localStorage.length,
55
+ catch: () => storageError({
56
+ pathOrDescriptor: "layerLocalStorage",
57
+ method: "size",
58
+ message: `Unable to get size`
59
+ })
60
+ })
61
+ }));
62
+ /** @internal */
63
+ exports.layerLocalStorage = layerLocalStorage;
64
+ const layerSessionStorage = /*#__PURE__*/Layer.succeed(KeyValueStore.KeyValueStore, /*#__PURE__*/KeyValueStore.make({
65
+ get: key => Effect.try({
66
+ try: () => Option.fromNullable(sessionStorage.getItem(key)),
67
+ catch: () => storageError({
68
+ pathOrDescriptor: "layerSessionStorage",
69
+ method: "get",
70
+ message: `Unable to get item with key ${key}`
71
+ })
72
+ }),
73
+ set: (key, value) => Effect.try({
74
+ try: () => sessionStorage.setItem(key, value),
75
+ catch: () => storageError({
76
+ pathOrDescriptor: "layerSessionStorage",
77
+ method: "set",
78
+ message: `Unable to set item with key ${key}`
79
+ })
80
+ }),
81
+ remove: key => Effect.try({
82
+ try: () => sessionStorage.removeItem(key),
83
+ catch: () => storageError({
84
+ pathOrDescriptor: "layerSessionStorage",
85
+ method: "remove",
86
+ message: `Unable to remove item with key ${key}`
87
+ })
88
+ }),
89
+ clear: /*#__PURE__*/Effect.try({
90
+ try: () => sessionStorage.clear(),
91
+ catch: () => storageError({
92
+ pathOrDescriptor: "layerSessionStorage",
93
+ method: "clear",
94
+ message: `Unable to clear storage`
95
+ })
96
+ }),
97
+ size: /*#__PURE__*/Effect.try({
98
+ try: () => sessionStorage.length,
99
+ catch: () => storageError({
100
+ pathOrDescriptor: "layerSessionStorage",
101
+ method: "size",
102
+ message: `Unable to get size`
103
+ })
104
+ })
105
+ }));
106
+ exports.layerSessionStorage = layerSessionStorage;
107
+ //# sourceMappingURL=keyValueStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyValueStore.js","names":["Option","_interopRequireWildcard","require","Effect","Layer","PlatformError","KeyValueStore","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","storageError","props","SystemError","reason","module","layerLocalStorage","succeed","make","try","fromNullable","localStorage","getItem","catch","pathOrDescriptor","method","message","value","setItem","remove","removeItem","clear","size","length","exports","layerSessionStorage","sessionStorage"],"sources":["../src/internal/keyValueStore.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,MAAA,gBAAAC,uBAAA,eAAAC,OAAA;AACA,IAAAC,MAAA,gBAAAF,uBAAA,eAAAC,OAAA;AACA,IAAAE,KAAA,gBAAAH,uBAAA,eAAAC,OAAA;AACA,IAAAG,aAAA,gBAAAJ,uBAAA,eAAAC,OAAA;AACA,IAAAI,aAAA,gBAAAL,uBAAA,eAAAC,OAAA;AAA+D,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAA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src/internal/runtime.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runMain = void 0;
7
+ var Effect = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Effect"));
8
+ var Fiber = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/io/Fiber"));
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
+ /** @internal */
12
+ const runMain = effect => {
13
+ const fiber = Effect.runFork(effect);
14
+ fiber.unsafeAddObserver(() => {
15
+ Effect.runFork(interruptAll(fiber.id()));
16
+ });
17
+ addEventListener("beforeunload", () => {
18
+ Effect.runFork(fiber.interruptAsFork(fiber.id()));
19
+ });
20
+ };
21
+ exports.runMain = runMain;
22
+ const interruptAll = id => Effect.flatMap(Fiber.roots, roots => Fiber.interruptAllAs(roots, id));
23
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","names":["Effect","_interopRequireWildcard","require","Fiber","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","runMain","effect","fiber","runFork","unsafeAddObserver","interruptAll","id","addEventListener","interruptAsFork","exports","flatMap","roots","interruptAllAs"],"sources":["../src/internal/runtime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,MAAA,gBAAAC,uBAAA,eAAAC,OAAA;AACA,IAAAC,KAAA,gBAAAF,uBAAA,eAAAC,OAAA;AAAyC,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAGzC;AACO,MAAMW,OAAO,GAClBC,MAAkC,IAChC;EACF,MAAMC,KAAK,GAAG5B,MAAM,CAAC6B,OAAO,CAACF,MAAM,CAAC;EAEpCC,KAAK,CAACE,iBAAiB,CAAC,MAAK;IAC3B9B,MAAM,CAAC6B,OAAO,CAACE,YAAY,CAACH,KAAK,CAACI,EAAE,EAAE,CAAC,CAAC;EAC1C,CAAC,CAAC;EAEFC,gBAAgB,CAAC,cAAc,EAAE,MAAK;IACpCjC,MAAM,CAAC6B,OAAO,CAACD,KAAK,CAACM,eAAe,CAACN,KAAK,CAACI,EAAE,EAAE,CAAC,CAAC;EACnD,CAAC,CAAC;AACJ,CAAC;AAAAG,OAAA,CAAAT,OAAA,GAAAA,OAAA;AAED,MAAMK,YAAY,GAAIC,EAAmB,IACvChC,MAAM,CAACoC,OAAO,CACZjC,KAAK,CAACkC,KAAK,EACVA,KAAK,IAAKlC,KAAK,CAACmC,cAAc,CAACD,KAAK,EAAEL,EAAE,CAAC,CAC3C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ export {
5
+ /**
6
+ * @since 1.0.0
7
+ * @category constructor
8
+ */
9
+ effectify } from "@effect/platform/Effectify";
10
+ //# sourceMappingURL=Effectify.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Effectify.mjs","names":["effectify"],"sources":["../src/Effectify.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAeA;AACE;;;;AAIAA,SAAS,QACJ,4BAA4B"}
package/mjs/Error.mjs ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ export {
5
+ /**
6
+ * @since 1.0.0
7
+ * @category error
8
+ */
9
+ BadArgument,
10
+ /**
11
+ * @since 1.0.0
12
+ * @category type id
13
+ */
14
+ PlatformErrorTypeId,
15
+ /**
16
+ * @since 1.0.0
17
+ * @category error
18
+ */
19
+ SystemError } from "@effect/platform/Error";
20
+ //# sourceMappingURL=Error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.mjs","names":["BadArgument","PlatformErrorTypeId","SystemError"],"sources":["../src/Error.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;AACE;;;;AAIAA,WAAW;AAMX;;;;AAIAC,mBAAmB;AACnB;;;;AAIAC,WAAW,QAMN,wBAAwB"}