Skip to content

Commit 1dc72f5

Browse files
authored
[Event Grid] Initial Track 2 Client (Azure#10059)
This change updates the Event Grid client to follow the new Azure SDK Design guidelines. In addition, it exposes support for sending and processing events in the Cloud Events format, which the previous SDK did not support.
1 parent 89c6f1b commit 1dc72f5

File tree

61 files changed

+8529
-1989
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8529
-1989
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 65 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dataplane.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"name": "cosmos",
6161
"path": "sdk/cosmosdb/cosmos"
6262
},
63+
{
64+
"name": "eventgrid",
65+
"path": "sdk\\eventgrid\\eventgrid"
66+
},
6367
{
6468
"name": "event-hubs",
6569
"path": "sdk/eventhub/event-hubs"

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@
422422
"projectFolder": "common/tools/dev-tool",
423423
"versionPolicyName": "utility"
424424
},
425+
{
426+
"packageName": "@azure/eventgrid",
427+
"projectFolder": "sdk/eventgrid/eventgrid",
428+
"versionPolicyName": "client"
429+
},
425430
{
426431
"packageName": "@azure/event-hubs",
427432
"projectFolder": "sdk/eventhub/event-hubs",

sdk/eventgrid/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
3+
trigger:
4+
branches:
5+
include:
6+
- master
7+
- release/*
8+
- hotfix/*
9+
paths:
10+
include:
11+
- sdk/eventgrid/
12+
13+
pr:
14+
branches:
15+
include:
16+
- master
17+
- feature/*
18+
- release/*
19+
- hotfix/*
20+
paths:
21+
include:
22+
- sdk/eventgrid/
23+
24+
extends:
25+
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
26+
parameters:
27+
ServiceDirectory: eventgrid
28+
Artifacts:
29+
- name: azure-eventgrid
30+
safeName: azureeventgrid
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"plugins": ["@azure/azure-sdk"],
3+
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"]
4+
}

sdk/eventgrid/eventgrid/.nycrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"include": [
3+
"dist-esm/src/**/*.js"
4+
],
5+
"exclude": [
6+
"**/*.d.ts",
7+
"dist-esm/src/generated/*"
8+
],
9+
"exclude-after-remap": false,
10+
"sourceMap": true,
11+
"produce-source-map": true,
12+
"instrument": true,
13+
"all": true
14+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Debug Javascript Samples",
11+
"program": "${workspaceFolder}/samples/javascript/basic.js",
12+
"preLaunchTask": "npm: build:js-samples"
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Debug Typescript Samples",
18+
"program": "${workspaceFolder}/samples/typescript/basic.ts",
19+
"preLaunchTask": "npm: build:ts-samples",
20+
"outFiles": ["${workspaceFolder}/dist-esm/samples/typescript/*.js"]
21+
},
22+
{
23+
"type": "node",
24+
"request": "launch",
25+
"name": "Current TS File",
26+
"args": [
27+
"${fileBasename}"
28+
],
29+
"runtimeArgs": [
30+
"--nolazy",
31+
"-r",
32+
"ts-node/register"
33+
],
34+
"env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" },
35+
"cwd": "${fileDirname}",
36+
"sourceMaps": true,
37+
"protocol": "inspector"
38+
},
39+
{
40+
"type": "node",
41+
"request": "launch",
42+
"name": "Debug Mocha Test [Without Rollup]",
43+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
44+
"args": [
45+
"-r",
46+
"ts-node/register",
47+
"--timeout",
48+
"999999",
49+
"--colors",
50+
"${workspaceFolder}/test/*.spec.ts",
51+
"${workspaceFolder}/test/node/*.spec.ts"
52+
],
53+
"env": { "TS_NODE_COMPILER_OPTIONS": "{\"module\": \"commonjs\"}" },
54+
"envFile": "${workspaceFolder}/.env",
55+
"console": "integratedTerminal",
56+
"internalConsoleOptions": "neverOpen",
57+
"protocol": "inspector"
58+
},
59+
{
60+
"type": "node",
61+
"request": "launch",
62+
"name": "Debug Unit Tests",
63+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
64+
"args": [
65+
"-u",
66+
"tdd",
67+
"--timeout",
68+
"999999",
69+
"--colors",
70+
"${workspaceFolder}/dist-test/index.node.js"
71+
],
72+
"internalConsoleOptions": "openOnSessionStart",
73+
"preLaunchTask": "npm: build:test"
74+
}
75+
]
76+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"editor.detectIndentation": false,
3+
"editor.formatOnSave": true,
4+
"editor.insertSpaces": true,
5+
"editor.tabSize": 2,
6+
"files.insertFinalNewline": true,
7+
"files.trimFinalNewlines": true,
8+
"javascript.preferences.quoteStyle": "double",
9+
"typescript.preferences.quoteStyle": "double",
10+
"search.exclude": {
11+
"test-results*.xml": true,
12+
"**/temp/*": true,
13+
"**/dist/*": true,
14+
"**/*.map": true,
15+
"**/dist-*/*": true,
16+
"**/test-dist/*": true,
17+
"**/node_modules": true,
18+
"**/bower_components": true,
19+
"**/*.code-search": true,
20+
"**/types/*": true,
21+
"**/coverage/*": true,
22+
"**/*.d.ts": true,
23+
"**/test-browser/*": true
24+
},
25+
"typescript.tsdk": "..\\..\\core\\core-http\\node_modules\\typescript\\lib"
26+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release History
2+
3+
## 3.0.0-beta.1 (2020-09-08)
4+
5+
- This release is a preview of our efforts to create a client library that is user friendly and
6+
idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the
7+
[Azure SDK Design Guidelines for TypeScript](https://azuresdkspecs.z5.web.core.windows.net/TypeScriptSpec.html).

sdk/eventgrid/eventgrid/LICENSE.txt renamed to sdk/eventgrid/eventgrid/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Microsoft
3+
Copyright (c) 2020 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)