You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

aicat

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.1.1 to 8.1.1

2

aicat.js

@@ -55,3 +55,3 @@ #!/usr/bin/env node

if (!function_call.arguments) break
let cleaned = function_call.arguments.replace(/[\x00-\x1F]+/g, '');
let cleaned = function_call.arguments; //.replace(/[\x00-\x1F]+/g, '');
console.error()

@@ -58,0 +58,0 @@ cleaned = JSON.parse(cleaned)

import fs from 'fs/promises'
import path from 'path'
export async function fileOut({filename, text}) {
const dir = path.dirname(filename)
const backupDir = path.join(dir, '.backup')
const baseName = path.basename(filename)
let index = 0
try {
await fs.access(backupDir)
} catch (err) {
await fs.mkdir(backupDir)
}
while (true) {
try {
await fs.access(path.join(backupDir, `${baseName}.${index}`))
index++
} catch (err) {
break
}
}
try {
const backupFile = path.join(backupDir, `${baseName}.${index}`)
await fs.rename(filename, backupFile)
console.error(`Backup file created: ${backupFile}`)
} catch (err) {
// File doesn't exist, do nothing
}
await fs.writeFile(filename, text, 'utf8')

@@ -5,0 +34,0 @@ }

{
"name": "aicat",
"version": "7.1.1",
"version": "8.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "aicat",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc