envio 2.26.0-alpha.6 → 2.26.0-alpha.8
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/index.d.ts +2 -1
- package/index.js +1 -1
- package/package.json +5 -5
- package/src/Envio.res +10 -2
- package/src/Envio.res.js +7 -2
- package/src/bindings/BigInt.gen.ts +10 -0
- package/src/bindings/BigInt.res +1 -0
- package/src/bindings/Express.res +1 -1
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
} from "./src/Envio.gen.ts";
|
|
14
14
|
|
|
15
15
|
import { schema as bigDecimalSchema } from "./src/bindings/BigDecimal.gen.ts";
|
|
16
|
+
import { schema as bigintSchema } from "./src/bindings/BigInt.gen.ts";
|
|
16
17
|
import * as Sury from "rescript-schema";
|
|
17
18
|
|
|
18
19
|
type UnknownToOutput<T> = T extends Sury.Schema<unknown>
|
|
@@ -101,7 +102,7 @@ export declare namespace S {
|
|
|
101
102
|
export const boolean: typeof Sury.boolean;
|
|
102
103
|
export const int32: typeof Sury.int32;
|
|
103
104
|
export const number: typeof Sury.number;
|
|
104
|
-
export const bigint: typeof
|
|
105
|
+
export const bigint: typeof bigintSchema;
|
|
105
106
|
export const never: typeof Sury.never;
|
|
106
107
|
export const union: typeof Sury.union;
|
|
107
108
|
export const object: typeof Sury.object;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envio",
|
|
3
|
-
"version": "v2.26.0-alpha.
|
|
3
|
+
"version": "v2.26.0-alpha.8",
|
|
4
4
|
"description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
|
|
5
5
|
"bin": "./bin.js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://envio.dev",
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"envio-linux-x64": "v2.26.0-alpha.
|
|
29
|
-
"envio-linux-arm64": "v2.26.0-alpha.
|
|
30
|
-
"envio-darwin-x64": "v2.26.0-alpha.
|
|
31
|
-
"envio-darwin-arm64": "v2.26.0-alpha.
|
|
28
|
+
"envio-linux-x64": "v2.26.0-alpha.8",
|
|
29
|
+
"envio-linux-arm64": "v2.26.0-alpha.8",
|
|
30
|
+
"envio-darwin-x64": "v2.26.0-alpha.8",
|
|
31
|
+
"envio-darwin-arm64": "v2.26.0-alpha.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@envio-dev/hypersync-client": "0.6.5",
|
package/src/Envio.res
CHANGED
|
@@ -50,8 +50,16 @@ let experimental_createEffect = (
|
|
|
50
50
|
>
|
|
51
51
|
),
|
|
52
52
|
callsCount: 0,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
// This is the way to make the createEffect API
|
|
54
|
+
// work without the need for users to call S.schema themselves,
|
|
55
|
+
// but simply pass the desired object/tuple/etc.
|
|
56
|
+
// If they pass a schem, it'll also work.
|
|
57
|
+
input: S.schema(_ => options.input)->(
|
|
58
|
+
Utils.magic: S.t<S.t<'input>> => S.t<Internal.effectInput>
|
|
59
|
+
),
|
|
60
|
+
output: S.schema(_ => options.output)->(
|
|
61
|
+
Utils.magic: S.t<S.t<'output>> => S.t<Internal.effectOutput>
|
|
62
|
+
),
|
|
55
63
|
cache: options.cache->Belt.Option.getWithDefault(false),
|
|
56
64
|
}->(Utils.magic: Internal.effect => effect<'input, 'output>)
|
|
57
65
|
}
|
package/src/Envio.res.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var Prometheus = require("./Prometheus.res.js");
|
|
5
5
|
var Belt_Option = require("rescript/lib/js/belt_Option.js");
|
|
6
|
+
var S$RescriptSchema = require("rescript-schema/src/S.res.js");
|
|
6
7
|
|
|
7
8
|
function experimental_createEffect(options, handler) {
|
|
8
9
|
Prometheus.EffectCallsCount.set(0, options.name);
|
|
@@ -10,8 +11,12 @@ function experimental_createEffect(options, handler) {
|
|
|
10
11
|
name: options.name,
|
|
11
12
|
handler: handler,
|
|
12
13
|
cache: Belt_Option.getWithDefault(options.cache, false),
|
|
13
|
-
output:
|
|
14
|
-
|
|
14
|
+
output: S$RescriptSchema.schema(function (param) {
|
|
15
|
+
return options.output;
|
|
16
|
+
}),
|
|
17
|
+
input: S$RescriptSchema.schema(function (param) {
|
|
18
|
+
return options.input;
|
|
19
|
+
}),
|
|
15
20
|
callsCount: 0
|
|
16
21
|
};
|
|
17
22
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* TypeScript file generated from BigInt.res by genType. */
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
|
|
6
|
+
const BigIntJS = require('./BigInt.res.js');
|
|
7
|
+
|
|
8
|
+
import type {S_t as RescriptSchema_S_t} from 'rescript-schema/RescriptSchema.gen';
|
|
9
|
+
|
|
10
|
+
export const schema: RescriptSchema_S_t<bigint> = BigIntJS.schema as any;
|
package/src/bindings/BigInt.res
CHANGED
package/src/bindings/Express.res
CHANGED
|
@@ -27,7 +27,7 @@ type middleware = (req, res, unit => unit) => unit
|
|
|
27
27
|
|
|
28
28
|
type server
|
|
29
29
|
|
|
30
|
-
@send external listen: (app,
|
|
30
|
+
@send external listen: (app, int) => server = "listen"
|
|
31
31
|
|
|
32
32
|
// res methods
|
|
33
33
|
@send external sendStatus: (res, int) => unit = "sendStatus"
|