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

afix

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

afix - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

18

index.d.ts

@@ -1,11 +0,7 @@

declare const fs: any;
declare const path: any;
declare const premove: any;
declare const customAlphabet: any;
declare type Filepath = string;
declare type Content = string;
declare type Fixtures = {
export declare type Filepath = string;
export declare type Content = string;
export declare type Fixtures = {
[alias: string]: [Filepath, Content];
};
declare type Files = {
export declare type Files = {
[alias: string]: {

@@ -16,6 +12,6 @@ path: string;

};
declare function afix(fixtures: Fixtures): {
root: any;
export declare function afix(fixtures: Fixtures): {
root: string;
files: Files;
cleanup(): any;
cleanup(): Promise<boolean>;
};

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

const fs=require("fs"),path=require("path"),{premove}=require("premove"),{customAlphabet}=require("nanoid");function afix(i){const e={},n=path.join(__dirname,`./.afix-${customAlphabet("1234567890abcdef",10)()}`);fs.mkdirSync(n);for(const t of Object.keys(i))e[t]={path:path.join(n,i[t][0]),content:i[t][1]},fs.writeFileSync(e[t].path,e[t].content,"utf8");return{root:n,files:e,cleanup(){return premove(n)}}}module.exports={afix};
var f=Object.create;var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var s=t=>r(t,"__esModule",{value:!0});var F=(t,e)=>{s(t);for(var n in e)r(t,n,{get:e[n],enumerable:!0})},g=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of h(e))!y.call(t,o)&&o!=="default"&&r(t,o,{get:()=>e[o],enumerable:!(n=l(e,o))||n.enumerable});return t},i=t=>g(s(r(t!=null?f(x(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);F(exports,{afix:()=>u});var p=i(require("fs")),a=i(require("path")),c=i(require("premove")),m=i(require("nanoid"));function u(t){let e={},n=a.default.join(__dirname,`./.afix-${(0,m.customAlphabet)("1234567890abcdef",10)()}`);p.default.mkdirSync(n);for(let o of Object.keys(t))e[o]={path:a.default.join(n,t[o][0]),content:t[o][1]},p.default.writeFileSync(e[o].path,e[o].content,"utf8");return{root:n,files:e,cleanup(){return(0,c.premove)(n)}}}0&&(module.exports={afix});
{
"name": "afix",
"version": "1.1.0",
"version": "1.1.1",
"description": "Tiny fixture utility.",

@@ -5,0 +5,0 @@ "main": "./index.js",

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