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

@octokit/app

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/app - npm Package Compare versions

Comparing version 10.2.2 to 10.3.0

17

dist-node/index.js

@@ -8,2 +8,3 @@ 'use strict';

var oauthApp = require('@octokit/oauth-app');
var deprecation = require('deprecation');
var authUnauthenticated = require('@octokit/auth-unauthenticated');

@@ -191,3 +192,3 @@ var webhooks$1 = require('@octokit/webhooks');

const VERSION = "10.2.2";
const VERSION = "10.3.0";

@@ -217,3 +218,4 @@ function webhooks(appOctokit, options // Explict return type for better debugability and performance,

installationId,
factory: auth => {
factory(auth) {
return new auth.octokit.constructor(_objectSpread2(_objectSpread2({}, auth.octokitOptions), {}, {

@@ -227,2 +229,3 @@ authStrategy: authApp.createAppAuth

}
});

@@ -470,3 +473,12 @@ return _objectSpread2(_objectSpread2({}, event), {}, {

App.VERSION = VERSION;
/**
* @deprecated use createNodeMiddleware()
*/
function getNodeMiddleware(app) {
app.log.warn( // @ts-expect-error
new deprecation.Deprecation("[@octokit/app] getNodeMiddleware is deprecated. Use createNodeMiddleware instead"));
return createNodeMiddleware(app);
}
function createNodeMiddleware(app) {
return oauthApp.getNodeMiddleware(app.oauth, {

@@ -480,3 +492,4 @@ onUnhandledRequest: (request, response) => {

exports.App = App;
exports.createNodeMiddleware = createNodeMiddleware;
exports.getNodeMiddleware = getNodeMiddleware;
//# sourceMappingURL=index.js.map
import { Octokit as OctokitCore } from "@octokit/core";
import { createAppAuth } from "@octokit/auth-app";
import { OAuthApp, getNodeMiddleware as oauthNodeMiddleware, } from "@octokit/oauth-app";
import { Deprecation } from "deprecation";
import { VERSION } from "./version";

@@ -63,3 +64,12 @@ import { webhooks } from "./webhooks";

App.VERSION = VERSION;
/**
* @deprecated use createNodeMiddleware()
*/
export function getNodeMiddleware(app) {
app.log.warn(
// @ts-expect-error
new Deprecation("[@octokit/app] getNodeMiddleware is deprecated. Use createNodeMiddleware instead"));
return createNodeMiddleware(app);
}
export function createNodeMiddleware(app) {
return oauthNodeMiddleware(app.oauth, {

@@ -66,0 +76,0 @@ onUnhandledRequest: (request, response) => {

2

dist-src/version.js

@@ -1,1 +0,1 @@

export const VERSION = "10.2.2";
export const VERSION = "10.3.0";

@@ -29,3 +29,3 @@ import { createAppAuth } from "@octokit/auth-app";

installationId,
factory: (auth) => {
factory(auth) {
return new auth.octokit.constructor({

@@ -32,0 +32,0 @@ ...auth.octokitOptions,

@@ -1,2 +0,1 @@

import { Octokit as OctokitCore } from "@octokit/core";
import { App } from "./index";

@@ -8,3 +7,3 @@ import { EachInstallationFunction, EachInstallationInterface } from "./types";

[Symbol.asyncIterator](): AsyncGenerator<{
octokit: OctokitCore;
octokit: import("@octokit/core").Octokit;
installation: {

@@ -11,0 +10,0 @@ id: number;

@@ -23,2 +23,6 @@ /// <reference types="node" />

}
/**
* @deprecated use createNodeMiddleware()
*/
export declare function getNodeMiddleware(app: App): (request: import("http").IncomingMessage, response: import("http").ServerResponse) => Promise<void>;
export declare function createNodeMiddleware(app: App): (request: import("http").IncomingMessage, response: import("http").ServerResponse) => Promise<void>;

@@ -1,1 +0,1 @@

export declare const VERSION = "10.2.2";
export declare const VERSION = "10.3.0";
{
"name": "@octokit/app",
"description": "GitHub Apps toolset for Node.js",
"version": "10.2.2",
"version": "10.3.0",
"license": "MIT",

@@ -12,3 +12,3 @@ "files": [

"sideEffects": false,
"repository": "https://github.com/octokit/app.js",
"repository": "github:octokit/app.js",
"dependencies": {

@@ -21,3 +21,4 @@ "@octokit/auth-app": "^3.0.0",

"@octokit/types": "^6.0.3",
"@octokit/webhooks": "^8.0.2"
"@octokit/webhooks": "^8.0.2",
"deprecation": "^2.3.1"
},

@@ -24,0 +25,0 @@ "devDependencies": {

@@ -21,3 +21,3 @@ # app.js

- [Middlewares](#middlewares)
- [`getNodeMiddleware(app, options)`](#getnodemiddlewareapp-options)
- [`createNodeMiddleware(app, options)`](#createnodemiddlewareapp-options)
- [Contributing](#contributing)

@@ -50,3 +50,3 @@ - [License](#license)

```js
const { App, getNodeMiddleware } = require("@octokit/app");
const { App, createNodeMiddleware } = require("@octokit/app");
```

@@ -99,3 +99,3 @@

require("http").createServer(getNodeMiddleware(app)).listen(3000);
require("http").createServer(createNodeMiddleware(app)).listen(3000);
// can now receive requests at /api/github/*

@@ -308,3 +308,3 @@ ```

### `getNodeMiddleware(app, options)`
### `createNodeMiddleware(app, options)`

@@ -314,3 +314,3 @@ Native http server middleware for Node.js

```js
const { App, getNodeMiddleware } = require("@octokit/app");
const { App, createNodeMiddleware } = require("@octokit/app");
const app = new App({

@@ -328,3 +328,3 @@ appId: 123,

const middleware = getNodeMiddleware(app);
const middleware = createNodeMiddleware(app);

@@ -331,0 +331,0 @@ require("http").createServer(middleware).listen(3000);

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