Skip to content

Commit

Permalink
Post release automated changes for web-pubsub releases (#18660)
Browse files Browse the repository at this point in the history
* Post release automated changes for azure-web-pubsub

* Post release automated changes for azure-web-pubsub-express
  • Loading branch information
azure-sdk committed Dec 15, 2021
1 parent 986a28c commit 2dcaf12
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 48 deletions.
10 changes: 10 additions & 0 deletions sdk/web-pubsub/web-pubsub-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 1.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0 (2021-11-11)

No changes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/web-pubsub/web-pubsub-express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/web-pubsub-express",
"version": "1.0.0",
"version": "1.0.1",
"description": "Azure Web PubSub CloudEvents handlers",
"sdk-type": "client",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ These sample programs show how to use the JavaScript client libraries for Azure

## Prerequisites

The sample programs are compatible with Node.js >=12.0.0.
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).

You need [an Azure subscription][freesub] to run these sample programs.

Expand Down Expand Up @@ -49,6 +49,11 @@ Alternatively, run a single sample with the correct environment variables set (s
npx cross-env node server.js
```

## Next Steps

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[server]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub-express/samples/v1/javascript/server.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/web-pubsub-express
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"version": "1.0.0",
"description": "Azure Web PubSub CloudEvents Handlers for Express client library samples for JavaScript",
"engine": {
"engines": {
"node": ">=12.0.0"
},
"repository": {
Expand All @@ -12,7 +12,7 @@
"directory": "sdk/web-pubsub/web-pubsub-express"
},
"keywords": [
"Azure",
"azure",
"cloud"
],
"author": "Microsoft Corporation",
Expand All @@ -22,8 +22,7 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub-express",
"dependencies": {
"@azure/web-pubsub-express": "next",
"dotenv": "latest",
"express": "^4.17.1"
"@azure/web-pubsub-express": "latest",
"dotenv": "latest"
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@


Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const express = require("express");
const handler = new WebPubSubEventHandler("chat", {
handleConnect(req, res) {
console.log(req);
// You can set the state for the connection, it lasts throughout the lifetime of the connection
res.setState("calledTime", 1);
res.success();
// or fail
// res.fail(401);
Expand All @@ -19,9 +21,13 @@ const handler = new WebPubSubEventHandler("chat", {
console.log(connectedRequest);
},
handleUserEvent(req, res) {
console.log(req);
var calledTime = req.context.states.calledTime++;
console.log(calledTime);
// You can also set the state here
res.setState("calledTime", calledTime);
res.success("Hello", "text");
}
},
allowedEndpoints: ["https://xxx.webpubsub.azure.com"]
});

const app = express();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ These sample programs show how to use the TypeScript client libraries for Azure

## Prerequisites

The sample programs are compatible with Node.js >=12.0.0.
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).

Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:

Expand Down Expand Up @@ -61,7 +61,12 @@ Alternatively, run a single sample with the correct environment variables set (s
npx cross-env node dist/server.js
```

## Next Steps

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[server]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub-express/samples/v1/typescript/src/server.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/web-pubsub-express
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub-express/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"version": "1.0.0",
"description": "Azure Web PubSub CloudEvents Handlers for Express client library samples for TypeScript",
"engine": {
"engines": {
"node": ">=12.0.0"
},
"scripts": {
Expand All @@ -16,7 +16,7 @@
"directory": "sdk/web-pubsub/web-pubsub-express"
},
"keywords": [
"Azure",
"azure",
"cloud"
],
"author": "Microsoft Corporation",
Expand All @@ -26,11 +26,12 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub-express",
"dependencies": {
"@azure/web-pubsub-express": "next",
"@azure/web-pubsub-express": "latest",
"dotenv": "latest"
},
"devDependencies": {
"typescript": "~4.2.0",
"@types/express": "^4.16.0",
"typescript": "~4.4.0",
"rimraf": "latest"
}
}
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import express from "express";
const handler = new WebPubSubEventHandler("chat", {
handleConnect(req, res) {
console.log(req);
// You can set the state for the connection, it lasts throughout the lifetime of the connection
res.setState("calledTime", 1);
res.success();
// or fail
// res.fail(401);
Expand All @@ -19,7 +21,10 @@ const handler = new WebPubSubEventHandler("chat", {
console.log(connectedRequest);
},
handleUserEvent(req, res) {
console.log(req);
var calledTime = req.context.states.calledTime++;
console.log(calledTime);
// You can also set the state here
res.setState("calledTime", calledTime);
res.success("Hello", "text");
},
allowedEndpoints: ["https://xxx.webpubsub.azure.com"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**.ts"]
"include": [
"src/**.ts"
]
}
10 changes: 10 additions & 0 deletions sdk/web-pubsub/web-pubsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 1.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0 (2021-11-11)

No changes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/web-pubsub/web-pubsub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/web-pubsub",
"version": "1.0.0",
"version": "1.0.1",
"description": "Azure client library for Azure Web PubSub",
"sdk-type": "client",
"main": "dist/index.js",
Expand Down
15 changes: 5 additions & 10 deletions sdk/web-pubsub/web-pubsub/samples/v1/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ products:
urlFragment: web-pubsub-javascript
---

# Azure Web PubSub service client library samples for JavaScript
# Azure Web PubSub client library samples for JavaScript

These sample programs show how to use the JavaScript client libraries for Azure Web PubSub in some common scenarios.

Expand All @@ -19,7 +19,7 @@ These sample programs show how to use the JavaScript client libraries for Azure

## Prerequisites

The sample programs are compatible with Node.js >=12.0.0.
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).

You need [an Azure subscription][freesub] to run these sample programs.

Expand Down Expand Up @@ -51,18 +51,13 @@ Alternatively, run a single sample with the correct environment variables set (s
npx cross-env WPS_CONNECTION_STRING="<wps connection string>" node broadcasting.js
```

## More samples

Check [more samples here][servicesample].

## Next Steps

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[broadcasting]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/javascript/broadcasting.js
[directmessage]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/javascript/directMessage.js
[managinggroups]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/javascript/managingGroups.js
[broadcasting]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/javascript/broadcasting.js
[directmessage]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/javascript/directMessage.js
[managinggroups]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/javascript/managingGroups.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/web-pubsub
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub/README.md
[servicesample]: https://github.com/Azure/azure-webpubsub/tree/main/samples/javascript
4 changes: 2 additions & 2 deletions sdk/web-pubsub/web-pubsub/samples/v1/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"directory": "sdk/web-pubsub/web-pubsub"
},
"keywords": [
"Azure",
"azure",
"cloud"
],
"author": "Microsoft Corporation",
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub",
"dependencies": {
"@azure/web-pubsub": "next",
"@azure/web-pubsub": "latest",
"dotenv": "latest"
}
}
17 changes: 6 additions & 11 deletions sdk/web-pubsub/web-pubsub/samples/v1/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ products:
urlFragment: web-pubsub-typescript
---

# Azure Web PubSub service client library samples for TypeScript
# Azure Web PubSub client library samples for TypeScript

These sample programs show how to use the TypeScript client libraries for Azure Web PubSub in some common scenarios.

Expand All @@ -19,7 +19,7 @@ These sample programs show how to use the TypeScript client libraries for Azure

## Prerequisites

The sample programs are compatible with Node.js >=12.0.0.
The sample programs are compatible with [LTS versions of Node.js](https://nodejs.org/about/releases/).

Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using:

Expand Down Expand Up @@ -63,19 +63,14 @@ Alternatively, run a single sample with the correct environment variables set (s
npx cross-env WPS_CONNECTION_STRING="<wps connection string>" node dist/broadcasting.js
```

## More samples

Check [more samples here][servicesample].

## Next Steps

Check [demos][demos]. Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.
Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[broadcasting]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/broadcasting.ts
[directmessage]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/directMessage.ts
[managinggroups]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/managingGroups.ts
[broadcasting]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/broadcasting.ts
[directmessage]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/directMessage.ts
[managinggroups]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/web-pubsub/web-pubsub/samples/v1/typescript/src/managingGroups.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/web-pubsub
[freesub]: https://azure.microsoft.com/free/
[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html
[servicesample]: https://github.com/Azure/azure-webpubsub/tree/main/samples/javascript
6 changes: 3 additions & 3 deletions sdk/web-pubsub/web-pubsub/samples/v1/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"directory": "sdk/web-pubsub/web-pubsub"
},
"keywords": [
"Azure",
"azure",
"cloud"
],
"author": "Microsoft Corporation",
Expand All @@ -26,11 +26,11 @@
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/web-pubsub/web-pubsub",
"dependencies": {
"@azure/web-pubsub": "next",
"@azure/web-pubsub": "latest",
"dotenv": "latest"
},
"devDependencies": {
"typescript": "~4.2.0",
"typescript": "~4.4.0",
"rimraf": "latest"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/web-pubsub/web-pubsub/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ output-folder: ../
source-code-folder-path: ./src/generated
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json
add-credentials: false
package-version: 1.0.0
package-version: 1.0.1
v3: true
hide-clients: true
use-core-v2: true
Expand Down

0 comments on commit 2dcaf12

Please sign in to comment.