@coldsurf/shared-utils
Advanced tools
| const e=({maxAge:e,httpOnly:t=!0})=>({httpOnly:t,secure:process.env.NODE_ENV===`production`,maxAge:e,sameSite:`lax`,path:`/`,domain:void 0});exports.createCommonCookieOptions=e; |
| //#region src/next/index.d.ts | ||
| declare const createCommonCookieOptions: ({ | ||
| maxAge, | ||
| httpOnly | ||
| }: { | ||
| maxAge: number; | ||
| httpOnly?: boolean; | ||
| }) => { | ||
| readonly httpOnly: boolean; | ||
| readonly secure: boolean; | ||
| readonly maxAge: number; | ||
| readonly sameSite: "lax"; | ||
| readonly path: "/"; | ||
| readonly domain: undefined; | ||
| }; | ||
| //# sourceMappingURL=index.d.ts.map | ||
| //#endregion | ||
| export { createCommonCookieOptions }; | ||
| //# sourceMappingURL=index.d.cts.map |
| {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/src/next/index.ts"],"sourcesContent":[],"mappings":";cAAa;;;;EAAA,MAAA,EAAA,MAAA;EAeZ,QAAA,CAAA,EAAA,OAAA;CAAA,EAAA,GAAA;EAfyC,SAAA,QAAA,EAAA,OAAA;EAAA,SAAA,MAAA,EAAA,OAAA"} |
| //#region src/next/index.d.ts | ||
| declare const createCommonCookieOptions: ({ | ||
| maxAge, | ||
| httpOnly | ||
| }: { | ||
| maxAge: number; | ||
| httpOnly?: boolean; | ||
| }) => { | ||
| readonly httpOnly: boolean; | ||
| readonly secure: boolean; | ||
| readonly maxAge: number; | ||
| readonly sameSite: "lax"; | ||
| readonly path: "/"; | ||
| readonly domain: undefined; | ||
| }; | ||
| //# sourceMappingURL=index.d.ts.map | ||
| //#endregion | ||
| export { createCommonCookieOptions }; | ||
| //# sourceMappingURL=index.d.ts.map |
| {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/src/next/index.ts"],"sourcesContent":[],"mappings":";cAAa;;;;EAAA,MAAA,EAAA,MAAA;EAeZ,QAAA,CAAA,EAAA,OAAA;CAAA,EAAA,GAAA;EAfyC,SAAA,QAAA,EAAA,OAAA;EAAA,SAAA,MAAA,EAAA,OAAA"} |
| const e=({maxAge:e,httpOnly:t=!0})=>({httpOnly:t,secure:process.env.NODE_ENV===`production`,maxAge:e,sameSite:`lax`,path:`/`,domain:void 0});export{e as createCommonCookieOptions}; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","names":[],"sources":["../../src/next/index.ts"],"sourcesContent":["export const createCommonCookieOptions = ({\n maxAge,\n httpOnly = true,\n}: {\n maxAge: number;\n httpOnly?: boolean;\n}) => {\n return {\n httpOnly,\n secure: process.env.NODE_ENV === 'production',\n maxAge,\n sameSite: 'lax',\n path: '/',\n domain: undefined,\n } as const;\n};\n"],"mappings":"AAAA,MAAa,EAA4B,CAAC,CACxC,SACA,YAAW,EAIZ,IACQ,CACL,WACA,OAAQ,QAAQ,IAAI,WAAa,aACjC,SACA,SAAU,MACV,KAAM,IACN,WAAA,EACD"} |
| // This file is needed for projects that have `moduleResolution` set to `node` | ||
| // in their tsconfig.json to be able to `import {} from '@coldsurf/shared-utils/next'`. | ||
| // Other module resolution strategies will look for the `exports` in `package.json`, | ||
| // but with `node`, TypeScript will look for a .d.ts file with that name at the | ||
| // root of the package. | ||
| export * from '../dist/next'; |
+7
-1
@@ -8,3 +8,3 @@ { | ||
| }, | ||
| "version": "1.1.16", | ||
| "version": "1.2.0", | ||
| "license": "MIT", | ||
@@ -24,2 +24,7 @@ "bugs": { | ||
| "types": "./dist/index.d.ts" | ||
| }, | ||
| "./next": { | ||
| "import": "./dist/next/index.js", | ||
| "require": "./dist/next/index.cjs", | ||
| "types": "./next/index.d.ts" | ||
| } | ||
@@ -33,2 +38,3 @@ }, | ||
| "dist", | ||
| "next", | ||
| "package.json" | ||
@@ -35,0 +41,0 @@ ], |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
84113
3.47%17
88.89%508
5.18%4
33.33%3
200%