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

@collabland/common

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@collabland/common - npm Package Compare versions

Comparing version 0.41.0 to 0.41.1

25

dist/utils/env.d.ts

@@ -202,4 +202,27 @@ import type { AnyType } from '../types.js';

JobServer = "JobServer",
DiscordServer = "DiscordServer"
DiscordServer = "DiscordServer",
CronServer = "CronServer"
}
/**
* Job server types
*/
export declare enum JobServerType {
/**
* The job server that handles `join` flow
*/
join = "join",
/**
* The job server that runs background checks
*/
background = "background",
/**
* The job server that runs event-driven checks
*/
event = "event"
}
/**
* Get the job server type from the env var
* @returns
*/
export declare function getJobServerType(): string;
export declare function getCommandCenterURL(): string;

@@ -206,0 +229,0 @@ /**

@@ -7,3 +7,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getWalletConnectionDomain = exports.getWalletConnectionURL = exports.getApiServerURL = exports.getCommandCenterURL = exports.ServerType = exports.getResourceName = exports.unsetEnvVar = exports.setEnvVar = exports.getEnvVarAsObject = exports.getEnvVarAsBoolean = exports.getEnvVarAsNumber = exports.getEnvVar = exports.isDevelopment = exports.isProduction = exports.setEnv = exports.getEnv = exports.getEnvName = exports.AWSResources = exports.ResourceType = exports.EnvType = void 0;
exports.getWalletConnectionDomain = exports.getWalletConnectionURL = exports.getApiServerURL = exports.getCommandCenterURL = exports.getJobServerType = exports.JobServerType = exports.ServerType = exports.getResourceName = exports.unsetEnvVar = exports.setEnvVar = exports.getEnvVarAsObject = exports.getEnvVarAsBoolean = exports.getEnvVarAsNumber = exports.getEnvVar = exports.isDevelopment = exports.isProduction = exports.setEnv = exports.getEnv = exports.getEnvName = exports.AWSResources = exports.ResourceType = exports.EnvType = void 0;
const lodash_1 = require("lodash");

@@ -373,3 +373,38 @@ /**

ServerType["DiscordServer"] = "DiscordServer";
ServerType["CronServer"] = "CronServer";
})(ServerType = exports.ServerType || (exports.ServerType = {}));
/**
* Job server types
*/
var JobServerType;
(function (JobServerType) {
/**
* The job server that handles `join` flow
*/
JobServerType["join"] = "join";
/**
* The job server that runs background checks
*/
JobServerType["background"] = "background";
/**
* The job server that runs event-driven checks
*/
JobServerType["event"] = "event";
})(JobServerType = exports.JobServerType || (exports.JobServerType = {}));
/**
* Get the job server type from the env var
* @returns
*/
function getJobServerType() {
const jobServerType = getEnvVar('COLLABLAND_JOB_SERVER_TYPE', JobServerType.join);
switch (jobServerType.toLowerCase()) {
case JobServerType.join:
case JobServerType.background:
case JobServerType.event:
return jobServerType;
default:
return JobServerType.join;
}
}
exports.getJobServerType = getJobServerType;
function getCommandCenterURL() {

@@ -376,0 +411,0 @@ const url = isProduction()

4

package.json
{
"name": "@collabland/common",
"version": "0.41.0",
"version": "0.41.1",
"description": "CollabLand common utilities",

@@ -69,3 +69,3 @@ "main": "dist/index.js",

"author": "Abridged, Inc.",
"gitHead": "97e41e5be65c56f14bcfc77dab8b9ced315c8366"
"gitHead": "9c1f316621173811fa5e15026ebb9121a496741d"
}

@@ -447,4 +447,42 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved.

DiscordServer = 'DiscordServer',
CronServer = 'CronServer',
}
/**
* Job server types
*/
export enum JobServerType {
/**
* The job server that handles `join` flow
*/
join = 'join',
/**
* The job server that runs background checks
*/
background = 'background',
/**
* The job server that runs event-driven checks
*/
event = 'event',
}
/**
* Get the job server type from the env var
* @returns
*/
export function getJobServerType() {
const jobServerType = getEnvVar(
'COLLABLAND_JOB_SERVER_TYPE',
JobServerType.join,
);
switch (jobServerType.toLowerCase()) {
case JobServerType.join:
case JobServerType.background:
case JobServerType.event:
return jobServerType;
default:
return JobServerType.join;
}
}
export function getCommandCenterURL() {

@@ -451,0 +489,0 @@ const url = isProduction()

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