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

@microsoft/gscan

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/gscan - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

1

lib/src/configuration.d.ts

@@ -11,3 +11,4 @@ export interface IConfigSchema {

output: ("json" | "csv")[];
proxyUrl: string | null;
}
export declare function sanitizeConfig(config: Partial<IConfigSchema>): IConfigSchema;

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

const fs_1 = require("fs");
const fetch_1 = require("./fetch");
function sanitizeConfig(config) {

@@ -16,2 +17,3 @@ const d = new Date();

output: ["json"],
proxyUrl: null,
useDefaultLogging: true,

@@ -29,2 +31,5 @@ verbose: false,

}
if (!common_1.stringIsNullOrEmpty(saneConfig.proxyUrl)) {
fetch_1.setProxyUrl(saneConfig.proxyUrl);
}
return saneConfig;

@@ -31,0 +36,0 @@ }

import { RequestInit, Response } from "node-fetch";
export declare function setProxyUrl(url: string): void;
export declare function useProxy(v: boolean): void;
export default function (url: string, options: RequestInit): Promise<Response>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_fetch_1 = require("node-fetch");
const proxy = require("https-proxy-agent");
const common_1 = require("@pnp/common");
let enableProxy = false;
let proxyUrl = null;
function setProxyUrl(url) {
proxyUrl = url;
enableProxy = true;
}
exports.setProxyUrl = setProxyUrl;
function useProxy(v) {
enableProxy = v;
}
exports.useProxy = useProxy;
function default_1(url, options) {
if (enableProxy && !common_1.stringIsNullOrEmpty(proxyUrl)) {
options.agent = new proxy(proxyUrl);
}
return node_fetch_1.default(url, options);

@@ -6,0 +22,0 @@ }

3

package.json
{
"name": "@microsoft/gscan",
"version": "0.0.2",
"version": "0.0.3",
"bin": {

@@ -20,2 +20,3 @@ "gscan": "./lib/bin/gscan.js"

"googleapis": "^39.2.0",
"https-proxy-agent": "^2.2.2",
"interpret": "^1.2.0",

@@ -22,0 +23,0 @@ "liftoff": "^3.1.0",

@@ -25,3 +25,3 @@ # Google Site Scanner

The behavior of the cli tool is controlled by a JavaScript configuration file. This allows you some flexibility as you can use code in the configuration. This file should be located in your app working directoy. The application expects a single export with the following structure. "credentialPath", "domain", and "impersonatingAccount" are required, the rest are optional.
The behavior of the cli tool is controlled by a JavaScript configuration file named `gscan-config.js`. This allows you some flexibility as you can use code in the configuration. This file should be located in your app working directory and be named `gscan-config.js`. The application expects a single export with the following structure. "credentialPath", "domain", and "impersonatingAccount" are required, the rest are optional.

@@ -38,3 +38,4 @@ ```JavaScript

useDefaultLogging: boolean,
logFileName: string
logFileName: string,
proxyUrl: string,
}

@@ -66,2 +67,3 @@ ```

logFileName: "mylog.txt",
proxyUrl: "https://my.proxy.url",
};

@@ -91,2 +93,3 @@ ```

|logFileName|[Optional, default 'gscan_log_{timestamp}.txt'] Name of the log file, set to empty string to supress log file generation.|
|proxyUrl|[Optional]Url to a network proxy (added in 0.0.3)|

@@ -93,0 +96,0 @@ ###

Sorry, the diff of this file is not supported yet

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