Remove cloudevents-sdk (#43040)

This commit is contained in:
Michaël De Boey 2020-03-18 17:50:35 +01:00 committed by GitHub
parent 9c4dde3661
commit 0664856f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 81 deletions

View File

@ -564,6 +564,12 @@
"sourceRepoURL": "https://github.com/sindresorhus/clipboardy",
"asOfVersion": "2.0.0"
},
{
"libraryName": "cloudevents-sdk",
"typingsPackageName": "cloudevents-sdk",
"sourceRepoURL": "https://github.com/cloudevents/sdk-javascript",
"asOfVersion": "1.0.0"
},
{
"libraryName": "colors.js (colors)",
"typingsPackageName": "colors",
@ -5016,18 +5022,18 @@
"sourceRepoURL": "https://github.com/arendjr/text-clipper",
"asOfVersion": "1.3.0"
},
{
"libraryName": "theming",
"typingsPackageName": "theming",
"sourceRepoURL": "https://github.com/cssinjs/theming",
"asOfVersion": "2.0.0"
},
{
"libraryName": "theme-ui",
"typingsPackageName": "theme-ui__color",
"sourceRepoURL": "https://github.com/system-ui/theme-ui",
"asOfVersion": "0.3.1"
},
{
"libraryName": "theming",
"typingsPackageName": "theming",
"sourceRepoURL": "https://github.com/cssinjs/theming",
"asOfVersion": "2.0.0"
},
{
"libraryName": "three",
"typingsPackageName": "three",

View File

@ -1,14 +0,0 @@
import Cloudevent from 'cloudevents-sdk/v03';
function testEventBuilder() {
const event = Cloudevent.event()
.dataContentType('application/json')
.id('43')
.time(new Date())
.type('pull_request')
.source('github')
.data({ action: 'created' })
.format();
const { id, datacontenttype, time, type, source, data } = event;
}

View File

@ -1,36 +0,0 @@
// Type definitions for cloudevents-sdk 0.3
// Project: https://github.com/cloudevents/sdk-javascript (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.)
// Definitions by: Andy Cunningham <https://github.com/andycmaj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// tslint:disable-next-line no-declare-current-package no-single-declare-module cloudevents-sdk/v03 is the documented way to import the cloudevent builder
declare module 'cloudevents-sdk/v03' {
// v03 CloudEvent payload
// https://github.com/cloudevents/sdk-javascript/blob/master/lib/specs/spec_0_3.js#L11
interface CloudEvent {
id: string;
datacontenttype: 'application/json';
time: string;
type: string;
source: string;
data: {};
}
// Cloudevent fluent builder
// https://github.com/cloudevents/sdk-javascript/blob/master/lib/cloudevent.js
interface CloudEventBuilder {
type: (type: string) => CloudEventBuilder;
dataContentType: (contentType: string) => CloudEventBuilder;
id: (id: string) => CloudEventBuilder;
time: (timestamp: Date) => CloudEventBuilder;
source: (source: string) => CloudEventBuilder;
data: (data: any) => CloudEventBuilder;
format: () => CloudEvent;
toString: () => string;
}
// Cloudevent.event() static constructor
// https://github.com/cloudevents/sdk-javascript#an-easy-way-to-create-events
function event(): CloudEventBuilder;
}

View File

@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true
},
"files": [
"index.d.ts",
"cloudevents-sdk-tests.ts"
]
}

View File

@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}