Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botbuilder

Package Overview
Dependencies
Maintainers
3
Versions
631
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder - npm Package Compare versions

Comparing version 4.21.1-rc to 4.21.1-rc2

2

_ts3.4/lib/interfaces/response.d.ts

@@ -13,3 +13,3 @@ /**

}
export declare const ResponseT: z.ZodType<Response, z.ZodTypeDef>;
export declare const ResponseT: z.ZodType<Response, z.ZodTypeDef, Response>;
//# sourceMappingURL=response.d.ts.map
import * as z from 'zod';
import { INodeBuffer, INodeSocket } from 'botframework-streaming';
import { TurnContext } from 'botbuilder-core';
export declare const INodeBufferT: z.ZodType<INodeBuffer, z.ZodTypeDef>;
export declare const INodeSocketT: z.ZodType<INodeSocket, z.ZodTypeDef>;
export declare const LogicT: z.ZodType<(context: TurnContext) => Promise<void>, z.ZodTypeDef>;
export declare const INodeBufferT: z.ZodType<INodeBuffer, z.ZodTypeDef, INodeBuffer>;
export declare const INodeSocketT: z.ZodType<INodeSocket, z.ZodTypeDef, INodeSocket>;
export declare const LogicT: z.ZodType<(context: TurnContext) => Promise<void>, z.ZodTypeDef, (context: TurnContext) => Promise<void>>;
//# sourceMappingURL=zod.d.ts.map

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

// Note: this is _okay_ because we pass the result through `validateAndFixActivity`. Should not be used otherwise.
const ActivityT = z.custom((val) => z.record(z.unknown()).check(val), { message: 'Activity' });
const ActivityT = z.custom((val) => z.record(z.unknown()).safeParse(val).success, { message: 'Activity' });
/**

@@ -70,3 +70,3 @@ * An adapter that implements the Bot Framework Protocol and can be hosted in different cloud environmens both public and private.

// to update their code and return an error.
if (!z.record(z.unknown()).check(req.body)) {
if (!z.record(z.unknown()).safeParse(req.body).success) {
return end(botbuilder_core_1.StatusCodes.BAD_REQUEST, '`req.body` not an object, make sure you are using middleware to parse incoming requests.');

@@ -73,0 +73,0 @@ }

@@ -13,3 +13,3 @@ /**

}
export declare const ResponseT: z.ZodType<Response, z.ZodTypeDef>;
export declare const ResponseT: z.ZodType<Response, z.ZodTypeDef, Response>;
//# sourceMappingURL=response.d.ts.map

@@ -23,12 +23,13 @@ "use strict";

const item = nodes.shift();
if (z
const itemParsed = z
.object({ tagName: z.string(), children: z.array(z.unknown()) })
.partial()
.nonstrict()
.check(item)) {
if (item.tagName === tag) {
.safeParse(item);
if (itemParsed.success) {
if (itemParsed.data.tagName === tag) {
return true;
}
if (item.children) {
nodes.push(...item.children);
if (itemParsed.data.children) {
nodes.push(...itemParsed.data.children);
}

@@ -35,0 +36,0 @@ }

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

const userTokenClient = context.turnState.get(context.adapter.UserTokenClientKey);
const exchangeToken = ExchangeToken.safeParse(context.adapter);
if (userTokenClient) {
tokenExchangeResponse = yield userTokenClient.exchangeToken(context.activity.from.id, this.oAuthConnectionName, context.activity.channelId, { token: tokenExchangeRequest.token });
}
else if (ExchangeToken.check(context.adapter)) {
tokenExchangeResponse = yield context.adapter.exchangeToken(context, this.oAuthConnectionName, context.activity.from.id, { token: tokenExchangeRequest.token });
else if (exchangeToken.success) {
tokenExchangeResponse = yield exchangeToken.data.exchangeToken(context, this.oAuthConnectionName, context.activity.from.id, { token: tokenExchangeRequest.token });
}

@@ -137,0 +138,0 @@ else {

import * as z from 'zod';
import { INodeBuffer, INodeSocket } from 'botframework-streaming';
import { TurnContext } from 'botbuilder-core';
export declare const INodeBufferT: z.ZodType<INodeBuffer, z.ZodTypeDef>;
export declare const INodeSocketT: z.ZodType<INodeSocket, z.ZodTypeDef>;
export declare const LogicT: z.ZodType<(context: TurnContext) => Promise<void>, z.ZodTypeDef>;
export declare const INodeBufferT: z.ZodType<INodeBuffer, z.ZodTypeDef, INodeBuffer>;
export declare const INodeSocketT: z.ZodType<INodeSocket, z.ZodTypeDef, INodeSocket>;
export declare const LogicT: z.ZodType<(context: TurnContext) => Promise<void>, z.ZodTypeDef, (context: TurnContext) => Promise<void>>;
//# sourceMappingURL=zod.d.ts.map

@@ -5,3 +5,3 @@ {

"description": "Bot Builder is a framework for building rich bots on virtually any platform.",
"version": "4.21.1-rc",
"version": "4.21.1-rc2",
"license": "MIT",

@@ -34,7 +34,7 @@ "keywords": [

"axios": "^0.25.0",
"botbuilder-core": "4.21.1-rc",
"botbuilder-stdlib": "4.21.1-rc.internal",
"botframework-connector": "4.21.1-rc",
"botframework-schema": "4.21.1-rc",
"botframework-streaming": "4.21.1-rc",
"botbuilder-core": "4.21.1-rc2",
"botbuilder-stdlib": "4.21.1-rc2.internal",
"botframework-connector": "4.21.1-rc2",
"botframework-schema": "4.21.1-rc2",
"botframework-streaming": "4.21.1-rc2",
"dayjs": "^1.10.3",

@@ -45,3 +45,3 @@ "filenamify": "^4.1.0",

"uuid": "^8.3.2",
"zod": "~1.11.17"
"zod": "^3.22.4"
},

@@ -48,0 +48,0 @@ "devDependencies": {

@@ -41,3 +41,3 @@ // Copyright (c) Microsoft Corporation.

// Note: this is _okay_ because we pass the result through `validateAndFixActivity`. Should not be used otherwise.
const ActivityT = z.custom<Activity>((val) => z.record(z.unknown()).check(val), { message: 'Activity' });
const ActivityT = z.custom<Activity>((val) => z.record(z.unknown()).safeParse(val).success, { message: 'Activity' });

@@ -122,3 +122,3 @@ /**

// to update their code and return an error.
if (!z.record(z.unknown()).check(req.body)) {
if (!z.record(z.unknown()).safeParse(req.body).success) {
return end(

@@ -125,0 +125,0 @@ StatusCodes.BAD_REQUEST,

@@ -14,16 +14,15 @@ // Copyright (c) Microsoft Corporation.

const item = nodes.shift();
const itemParsed = z
.object({ tagName: z.string(), children: z.array(z.unknown()) })
.partial()
.nonstrict()
.safeParse(item);
if (
z
.object({ tagName: z.string(), children: z.array(z.unknown()) })
.partial()
.nonstrict()
.check(item)
) {
if (item.tagName === tag) {
if (itemParsed.success) {
if (itemParsed.data.tagName === tag) {
return true;
}
if (item.children) {
nodes.push(...item.children);
if (itemParsed.data.children) {
nodes.push(...itemParsed.data.children);
}

@@ -30,0 +29,0 @@ }

@@ -147,2 +147,4 @@ // Copyright (c) Microsoft Corporation.

);
const exchangeToken = ExchangeToken.safeParse(context.adapter);
if (userTokenClient) {

@@ -155,4 +157,4 @@ tokenExchangeResponse = await userTokenClient.exchangeToken(

);
} else if (ExchangeToken.check(context.adapter)) {
tokenExchangeResponse = await context.adapter.exchangeToken(
} else if (exchangeToken.success) {
tokenExchangeResponse = await exchangeToken.data.exchangeToken(
context,

@@ -159,0 +161,0 @@ this.oAuthConnectionName,

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 too big to display

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 too big to display

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