Socket
Socket
Sign inDemoInstall

@effect/rpc

Package Overview
Dependencies
Maintainers
3
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/rpc - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

6

Client.js

@@ -16,3 +16,3 @@ "use strict";

*/
const make = internal.make;
const make = exports.make = internal.make;
/**

@@ -24,5 +24,3 @@ * Creates an RPC client with the specified resolver

*/
exports.make = make;
const makeWithResolver = internal.makeWithResolver;
exports.makeWithResolver = makeWithResolver;
const makeWithResolver = exports.makeWithResolver = internal.makeWithResolver;
//# sourceMappingURL=Client.js.map

@@ -15,3 +15,3 @@ "use strict";

*/
const RpcNotFound = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
const RpcNotFound = exports.RpcNotFound = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
_tag: /*#__PURE__*/Schema.literal("RpcNotFound"),

@@ -24,4 +24,3 @@ method: Schema.string

*/
exports.RpcNotFound = RpcNotFound;
const RpcDecodeFailure = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
const RpcDecodeFailure = exports.RpcDecodeFailure = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
_tag: /*#__PURE__*/Schema.literal("RpcDecodeFailure"),

@@ -34,4 +33,3 @@ errors: /*#__PURE__*/Schema.nonEmptyArray(Schema.any)

*/
exports.RpcDecodeFailure = RpcDecodeFailure;
const RpcEncodeFailure = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
const RpcEncodeFailure = exports.RpcEncodeFailure = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
_tag: /*#__PURE__*/Schema.literal("RpcEncodeFailure"),

@@ -44,4 +42,3 @@ errors: /*#__PURE__*/Schema.nonEmptyArray(Schema.any)

*/
exports.RpcEncodeFailure = RpcEncodeFailure;
const RpcTransportError = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
const RpcTransportError = exports.RpcTransportError = /*#__PURE__*/(0, _SchemaC.withConstructorTagged)( /*#__PURE__*/Schema.struct({
_tag: /*#__PURE__*/Schema.literal("RpcTransportError"),

@@ -54,5 +51,3 @@ error: Schema.unknown

*/
exports.RpcTransportError = RpcTransportError;
const RpcError = /*#__PURE__*/Schema.union(RpcDecodeFailure, RpcEncodeFailure, RpcNotFound, RpcTransportError);
exports.RpcError = RpcError;
const RpcError = exports.RpcError = /*#__PURE__*/Schema.union(RpcDecodeFailure, RpcEncodeFailure, RpcNotFound, RpcTransportError);
//# sourceMappingURL=Error.js.map

@@ -31,3 +31,3 @@ "use strict";

/** @internal */
const provideServiceEffect = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, effect) => {
const provideServiceEffect = exports.provideServiceEffect = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, effect) => {
return {

@@ -39,8 +39,5 @@ ...self,

/** @internal */
exports.provideServiceEffect = provideServiceEffect;
const provideServiceSync = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => provideServiceEffect(self, tag, Effect.sync(service)));
const provideServiceSync = exports.provideServiceSync = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => provideServiceEffect(self, tag, Effect.sync(service)));
/** @internal */
exports.provideServiceSync = provideServiceSync;
const provideService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => provideServiceEffect(self, tag, Effect.succeed(service)));
exports.provideService = provideService;
const provideService = exports.provideService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => provideServiceEffect(self, tag, Effect.succeed(service)));
//# sourceMappingURL=router.js.map

@@ -13,8 +13,6 @@ "use strict";

/** @internal */
const RpcServiceId = /*#__PURE__*/Symbol.for("@effect/rpc/Schema/RpcService");
const RpcServiceId = exports.RpcServiceId = /*#__PURE__*/Symbol.for("@effect/rpc/Schema/RpcService");
/** @internal */
exports.RpcServiceId = RpcServiceId;
const RpcServiceErrorId = /*#__PURE__*/Symbol.for("@effect/rpc/Schema/RpcServiceErrorId");
const RpcServiceErrorId = exports.RpcServiceErrorId = /*#__PURE__*/Symbol.for("@effect/rpc/Schema/RpcServiceErrorId");
/** @internal */
exports.RpcServiceErrorId = RpcServiceErrorId;
const schemasToUnion = schemas => {

@@ -48,6 +46,5 @@ schemas = schemas.filter(s => s !== Schema.never);

exports.methodSchemaTransform = methodSchemaTransform;
const methodSchemas = /*#__PURE__*/methodSchemaTransform(_Function.identity);
const methodSchemas = exports.methodSchemas = /*#__PURE__*/methodSchemaTransform(_Function.identity);
/** @internal */
exports.methodSchemas = methodSchemas;
const methodCodecs = /*#__PURE__*/methodSchemaTransform(schema => ({
const methodCodecs = exports.methodCodecs = /*#__PURE__*/methodSchemaTransform(schema => ({
input: schema.input ? (0, _codec.decode)(schema.input) : undefined,

@@ -58,4 +55,3 @@ output: (0, _codec.encode)(schema.output),

/** @internal */
exports.methodCodecs = methodCodecs;
const methodClientCodecs = /*#__PURE__*/methodSchemaTransform(schema => ({
const methodClientCodecs = exports.methodClientCodecs = /*#__PURE__*/methodSchemaTransform(schema => ({
input: schema.input ? (0, _codec.encode)(schema.input) : undefined,

@@ -66,3 +62,2 @@ output: (0, _codec.decode)(schema.output),

/** @internal */
exports.methodClientCodecs = methodClientCodecs;
const inputEncodeMap = (schemas, prefix = "") => Object.entries(schemas).reduce((acc, [method, schema]) => {

@@ -84,7 +79,6 @@ if (RpcServiceId in schema) {

exports.inputEncodeMap = inputEncodeMap;
const withServiceError = /*#__PURE__*/(0, _Function.dual)(2, (self, error) => ({
const withServiceError = exports.withServiceError = /*#__PURE__*/(0, _Function.dual)(2, (self, error) => ({
...self,
[RpcServiceErrorId]: schemasToUnion([self[RpcServiceErrorId], error])
}));
exports.withServiceError = withServiceError;
//# sourceMappingURL=schema.js.map

@@ -75,3 +75,3 @@ "use strict";

})),
onSome: ctx => Effect.provideSomeContext(effect, ctx)
onSome: ctx => Effect.provide(effect, ctx)
}))(Ref.get(contextRef)) : effect));

@@ -78,0 +78,0 @@ })(Effect.bind("input", ({

{
"name": "@effect/rpc",
"version": "0.6.0",
"version": "0.7.0",
"description": "",

@@ -28,6 +28,6 @@ "license": "MIT",

"peerDependencies": {
"@effect/data": "^0.18.4",
"@effect/io": "^0.40.0",
"@effect/data": "^0.18.6",
"@effect/io": "^0.41.0",
"@effect/schema": "^0.35.0"
}
}

@@ -19,3 +19,3 @@ "use strict";

*/
const RpcResolver = /*#__PURE__*/(0, _Context.Tag)( /*#__PURE__*/Symbol.for("@effect/rpc/RpcResolver"));
const RpcResolver = exports.RpcResolver = /*#__PURE__*/(0, _Context.Tag)( /*#__PURE__*/Symbol.for("@effect/rpc/RpcResolver"));
/**

@@ -25,4 +25,3 @@ * @category constructors

*/
exports.RpcResolver = RpcResolver;
const make = internal.make;
const make = exports.make = internal.make;
/**

@@ -32,4 +31,3 @@ * @category constructors

*/
exports.make = make;
const makeWithSchema = internal.makeWithSchema;
const makeWithSchema = exports.makeWithSchema = internal.makeWithSchema;
/**

@@ -39,4 +37,3 @@ * @category constructors

*/
exports.makeWithSchema = makeWithSchema;
const makeSingle = internal.makeSingle;
const makeSingle = exports.makeSingle = internal.makeSingle;
/**

@@ -46,5 +43,3 @@ * @category constructors

*/
exports.makeSingle = makeSingle;
const makeSingleWithSchema = internal.makeSingleWithSchema;
exports.makeSingleWithSchema = makeSingleWithSchema;
const makeSingleWithSchema = exports.makeSingleWithSchema = internal.makeSingleWithSchema;
//# sourceMappingURL=Resolver.js.map

@@ -14,3 +14,3 @@ "use strict";

*/
const make = internal.make;
const make = exports.make = internal.make;
/**

@@ -20,4 +20,3 @@ * @category router combinators

*/
exports.make = make;
const provideService = internal.provideService;
const provideService = exports.provideService = internal.provideService;
/**

@@ -27,4 +26,3 @@ * @category router combinators

*/
exports.provideService = provideService;
const provideServiceEffect = internal.provideServiceEffect;
const provideServiceEffect = exports.provideServiceEffect = internal.provideServiceEffect;
/**

@@ -34,5 +32,3 @@ * @category router combinators

*/
exports.provideServiceEffect = provideServiceEffect;
const provideServiceSync = internal.provideServiceSync;
exports.provideServiceSync = provideServiceSync;
const provideServiceSync = exports.provideServiceSync = internal.provideServiceSync;
//# sourceMappingURL=Router.js.map

@@ -14,8 +14,7 @@ "use strict";

*/
const RpcServiceId = internal.RpcServiceId;
const RpcServiceId = exports.RpcServiceId = internal.RpcServiceId;
/**
* @since 1.0.0
*/
exports.RpcServiceId = RpcServiceId;
const RpcServiceErrorId = internal.RpcServiceErrorId;
const RpcServiceErrorId = exports.RpcServiceErrorId = internal.RpcServiceErrorId;
/**

@@ -25,3 +24,2 @@ * @category constructors

*/
exports.RpcServiceErrorId = RpcServiceErrorId;
const makeWith = () => schema => ({

@@ -39,3 +37,3 @@ ...schema,

exports.makeWith = makeWith;
const make = /*#__PURE__*/makeWith();
const make = exports.make = /*#__PURE__*/makeWith();
/**

@@ -47,4 +45,3 @@ * Add a service level error, which can then be used with `Router.provideServiceEffect`.

*/
exports.make = make;
const withServiceError = internal.withServiceError;
const withServiceError = exports.withServiceError = internal.withServiceError;
/**

@@ -54,3 +51,2 @@ * @category constructors

*/
exports.withServiceError = withServiceError;
const context = () => Schema.any;

@@ -57,0 +53,0 @@ /**

@@ -20,3 +20,3 @@ "use strict";

*/
const withConstructor = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
const withConstructor = exports.withConstructor = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => {
const validate = Schema.validateSync(self);

@@ -45,3 +45,2 @@ const validateEither = Schema.validateEither(self);

*/
exports.withConstructor = withConstructor;
const withConstructorSelf = self => withConstructor(self, _Function.identity);

@@ -53,3 +52,3 @@ /**

exports.withConstructorSelf = withConstructorSelf;
const withConstructorTagged = /*#__PURE__*/(0, _Function.dual)(2, (self, tag) => withConstructor(self, input => ({
const withConstructorTagged = exports.withConstructorTagged = /*#__PURE__*/(0, _Function.dual)(2, (self, tag) => withConstructor(self, input => ({
_tag: tag,

@@ -62,4 +61,3 @@ ...input

*/
exports.withConstructorTagged = withConstructorTagged;
const withConstructorDataTagged = /*#__PURE__*/(0, _Function.dual)(2, (self, tag) => withConstructor(Schema.data(self), Data.tagged(tag)));
const withConstructorDataTagged = exports.withConstructorDataTagged = /*#__PURE__*/(0, _Function.dual)(2, (self, tag) => withConstructor(Schema.data(self), Data.tagged(tag)));
/**

@@ -69,5 +67,4 @@ * @category combinators

*/
exports.withConstructorDataTagged = withConstructorDataTagged;
const withTo = () => self => self;
exports.withTo = withTo;
//# sourceMappingURL=SchemaC.js.map

@@ -14,3 +14,3 @@ "use strict";

*/
const handler = internal.handler;
const handler = exports.handler = internal.handler;
/**

@@ -20,4 +20,3 @@ * @category constructors

*/
exports.handler = handler;
const handlerRaw = internal.handlerRaw;
const handlerRaw = exports.handlerRaw = internal.handlerRaw;
/**

@@ -27,4 +26,3 @@ * @category constructors

*/
exports.handlerRaw = handlerRaw;
const handleSingle = internal.handleSingle;
const handleSingle = exports.handleSingle = internal.handleSingle;
/**

@@ -34,4 +32,3 @@ * @category constructors

*/
exports.handleSingle = handleSingle;
const handleSingleWithSchema = internal.handleSingleWithSchema;
const handleSingleWithSchema = exports.handleSingleWithSchema = internal.handleSingleWithSchema;
/**

@@ -41,5 +38,3 @@ * @category constructors

*/
exports.handleSingleWithSchema = handleSingleWithSchema;
const makeUndecodedClient = internal.makeUndecodedClient;
exports.makeUndecodedClient = makeUndecodedClient;
const makeUndecodedClient = exports.makeUndecodedClient = internal.makeUndecodedClient;
//# sourceMappingURL=Server.js.map

@@ -117,3 +117,3 @@ import * as Context from "@effect/data/Context"

),
onSome: (ctx) => Effect.provideSomeContext(effect, ctx)
onSome: (ctx) => Effect.provide(effect, ctx)
})

@@ -120,0 +120,0 @@ )

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc