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

@ethicdevs/fastify-git-server

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethicdevs/fastify-git-server - npm Package Compare versions

Comparing version 1.4.3 to 1.5.0

@types/index.d.ts

6

dist/pluginFactory.js

@@ -15,2 +15,3 @@ "use strict";

var sendStatelessRpc_1 = require("./helpers/sendStatelessRpc");
var spawnGit_1 = require("./helpers/spawnGit");
var logInfo = (0, debug_1.default)("fastifyGitServer:info");

@@ -21,4 +22,9 @@ var logTrace = (0, debug_1.default)("fastifyGitServer:trace");

var gitServerPluginAsync = function (server, opts) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var spawnGitCommand;
return tslib_1.__generator(this, function (_a) {
try {
spawnGitCommand = function (args, gitRepositoryDir) {
return (0, spawnGit_1.spawnGit)(opts, args, gitRepositoryDir);
};
server.decorateRequest("spawnGitCommand", spawnGitCommand);
server.addHook("onRequest", function (request, reply) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {

@@ -25,0 +31,0 @@ var service, requestMethod, packType, pathname, pathMatches, _a, _, org, repo, requestType, repoSlug, repoResult, authCredentials, authorization, _b, username, password, authorizationResult, gitStream, err_1, error, err_2, error;

5

dist/types.d.ts
/// <reference types="node" />
import type { PathLike } from "node:fs";
import { FastifyRequest, HTTPMethods } from "fastify";
import type { ChildProcessWithoutNullStreams } from "node:child_process";
import type { FastifyRequest } from "fastify";
import type { HTTPMethods } from "fastify/types/utils";
import { GitServerMessage } from "./helpers/GitServerMessage";

@@ -71,2 +73,3 @@ export declare namespace GitServer {

}
type SpawnGitCommandDecorator = (args: string[], gitRepositoryDir: PathLike) => ChildProcessWithoutNullStreams;
}

2

package.json
{
"name": "@ethicdevs/fastify-git-server",
"version": "1.4.3",
"version": "1.5.0",
"description": "A Fastify plugin to easily make one/many Git repositories available for clone/fetch/push.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -20,2 +20,3 @@ // std

import { sendStatelessRpc } from "./helpers/sendStatelessRpc";
import { spawnGit } from "./helpers/spawnGit";

@@ -30,2 +31,11 @@ const logInfo = debug("fastifyGitServer:info");

try {
const spawnGitCommand: GitServer.SpawnGitCommandDecorator = (
args,
gitRepositoryDir,
) => {
return spawnGit(opts, args, gitRepositoryDir);
};
server.decorateRequest("spawnGitCommand", spawnGitCommand);
server.addHook("onRequest", async (request, reply) => {

@@ -32,0 +42,0 @@ try {

// std
import type { PathLike } from "node:fs";
import type { ChildProcessWithoutNullStreams } from "node:child_process";
// 3rd-party
import { FastifyRequest, HTTPMethods } from "fastify";
import type { FastifyRequest } from "fastify";
import type { HTTPMethods } from "fastify/types/utils";
// lib

@@ -90,2 +92,7 @@ import { GitServerMessage } from "./helpers/GitServerMessage";

}
export type SpawnGitCommandDecorator = (
args: string[],
gitRepositoryDir: PathLike,
) => ChildProcessWithoutNullStreams;
}
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