🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gatsby-plugin-statsy

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-statsy - npm Package Compare versions

Comparing version

to
0.1.5

3

dist/gatsby-node.js

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

siteId: Joi.string().description(`Your Statsy site ID`).required(),
mode: Joi.string().description(
"The mode of tracking script. `production` or `development`. Defaults to `auto`."
).default("auto").valid("production", "development", "auto"),
trackingEndpointDomain: Joi.string().description(

@@ -8,0 +11,0 @@ `Your optional self hosted Statsy domain. If you are using the self hosted version of Statsy, you can set this to your domain.`

@@ -28,4 +28,24 @@ "use strict";

var import_minimatch = require("minimatch");
function isProduction() {
if (process.env.NODE_ENV === `production`) {
return true;
}
}
function isTest() {
if (process.env.NODE_ENV === `test`) {
return true;
}
}
var onRenderBody = async ({ setHeadComponents, setPostBodyComponents }, pluginOptions) => {
if (process.env.NODE_ENV !== `production` && process.env.NODE_ENV !== `test`)
let { mode } = pluginOptions;
if (!mode || mode === "auto") {
if (isProduction()) {
mode = `production`;
} else if (isTest()) {
mode = `development`;
} else {
mode = `development`;
}
}
if (mode === `development`)
return null;

@@ -32,0 +52,0 @@ const origin = `https://${pluginOptions.trackingEndpointDomain || `statsy.observer`}`;

4

package.json
{
"name": "gatsby-plugin-statsy",
"version": "0.1.4",
"version": "0.1.5",
"description": "",

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

"typescript": "^5.0.4",
"@statsy/analytics": "0.1.4"
"@statsy/analytics": "0.1.5"
},

@@ -28,0 +28,0 @@ "publishConfig": {

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

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