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

@t3-oss/env-nextjs

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@t3-oss/env-nextjs - npm Package Compare versions

Comparing version 0.3.1-canary.0371e4a to 0.3.1-canary.1a7afac

2

dist/index.js

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

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);function l(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(e.skipValidation)return r;let a=typeof e.client=="object"?e.client:{},o=_zod2.default.object(a),v=_zod2.default.object(e.server),s=_nullishCoalesce(e.isServer, () => (typeof window>"u")),d=v.merge(o),i=s?d.safeParse(r):o.safeParse(r),f=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),p=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return i.success===!1?f(i.error):new Proxy(i.data,{get(t,n){if(typeof n=="string")return!s&&!n.startsWith(e.clientPrefix)?p(n):t[n]}})}var u="NEXT_PUBLIC_";function C({runtimeEnv:e,...r}){return l({...r,clientPrefix:u,runtimeEnvStrict:e})}exports.createEnv = C;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);function T(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(!!e.skipValidation)return r;let c=typeof e.client=="object"?e.client:{},o=_zod2.default.object(c),l=_zod2.default.object(e.server),s=_nullishCoalesce(e.isServer, () => (typeof window>"u")),a=l.merge(o),i=s?a.safeParse(r):o.safeParse(r),v=_nullishCoalesce(e.onValidationError, () => ((n=>{throw console.error("\u274C Invalid environment variables:",n.flatten().fieldErrors),new Error("Invalid environment variables")}))),f=_nullishCoalesce(e.onInvalidAccess, () => ((n=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return i.success===!1?v(i.error):new Proxy(i.data,{get(n,t){if(typeof t=="string")return!s&&!t.startsWith(e.clientPrefix)?f(t):n[t]}})}var x="NEXT_PUBLIC_";function E({runtimeEnv:e,...r}){return T({...r,clientPrefix:x,runtimeEnvStrict:e})}exports.createEnv = E;
//# sourceMappingURL=index.js.map
{
"name": "@t3-oss/env-nextjs",
"version": "0.3.1-canary.0371e4a",
"version": "0.3.1-canary.1a7afac",
"keywords": [

@@ -5,0 +5,0 @@ "create-t3-app",

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