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

@vgs/collect-js

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vgs/collect-js - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

dist/utils/IConfig.d.ts

1

dist/constants/index.d.ts

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

import { IConfig } from '../utils/IConfig';
declare const MAIN_SCRIPT_DOMAIN = "https://js.verygoodvault.com";

@@ -2,0 +3,0 @@ declare const BACKUP_SCRIPT_DOMAIN = "https://js.verygoodvault.com";

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

import { IConfig } from './utils/IConfig';
declare const loadVGSCollect: (config?: IConfig) => Promise<unknown>;
export { loadVGSCollect };

@@ -0,3 +1,4 @@

import { IConfig } from './IConfig';
declare const setConfig: (params: IConfig) => void;
declare const getConfig: () => IConfig;
export { setConfig, getConfig };

@@ -0,3 +1,4 @@

import { IConfig } from './IConfig';
declare const registerScriptLoading: (params: IConfig) => void;
declare const trackEvent: (event: any) => void;
export { trackEvent, registerScriptLoading };

2

package.json
{
"name": "@vgs/collect-js",
"version": "0.3.0",
"version": "0.4.0",
"description": "VGS Collect.js script loading module",

@@ -5,0 +5,0 @@ "license": "MIT",

import { v4 as uuidv4 } from 'uuid';
import { IConfig } from '../utils/IConfig';

@@ -3,0 +4,0 @@ const MAIN_SCRIPT_DOMAIN = `https://js.verygoodvault.com`;

@@ -10,2 +10,3 @@ import { loadScript } from './utils/loadScript';

import { preConnect } from './sideEffects/preConnect';
import { IConfig } from './utils/IConfig';

@@ -12,0 +13,0 @@ // side effects

import { DEFAULT_CONFIG } from '../constants/index';
import { IConfig } from './IConfig';

@@ -3,0 +4,0 @@ let config = DEFAULT_CONFIG;

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

interface IStateCallback {
(state?: object): void;
}
const initCollect = (vaultId: string, environment: string): void => {

@@ -2,0 +6,0 @@ window.VGSCollect.init = (callback: IStateCallback = () => {}) => {

@@ -8,2 +8,3 @@ import axios from 'axios';

import { setConfig, getConfig } from './config';
import { IConfig } from './IConfig';
import { validateConfig } from './validation';

@@ -10,0 +11,0 @@

import { ERROR_MESSAGE } from '../constants';
type IConfigSchema = Record<string, (value: string) => boolean>;
const configSchema: IConfigSchema = {

@@ -4,0 +6,0 @@ vaultId: value => typeof value === 'string' && /^tnt.{8}$/.test(value),

Sorry, the diff of this file is not supported yet

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