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

ta-scripts

Package Overview
Dependencies
Maintainers
13
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ta-scripts - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

14

aws/stage.js
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const sh = require('shelljs')

@@ -115,5 +116,5 @@ const path = require('path')

const stagedPath = getStagedPath(repo, branch)
const newTagPath = `="/${stagedPath}/`
const absPathRegEx = /(="\/)(?!\/)/g
const pathRegExp = /(href="|src=")\/?(?!\/)(.*?")/g
// cache file contents so we can restore them
const cache = {}
sh.cd(dir)

@@ -124,3 +125,6 @@ const indexFiles = sh.find('.').filter((file) => /\.html$/.test(file))

sh.echo('...monkey patching html paths')
indexFiles.forEach((file) => sh.sed('-i', absPathRegEx, newTagPath, file))
indexFiles.forEach((file) => {
cache[file] = sh.cat(file)
sh.sed('-i', pathRegExp, (group, g1, g2) => `${g1}/${stagedPath}/${g2}`, file)
})

@@ -134,3 +138,3 @@ // sync

sh.echo('...cleanup')
indexFiles.forEach((file) => sh.sed('-i', newTagPath, '="/', file))
indexFiles.forEach((file) => fs.writeFileSync(file, cache[file], 'utf8'))
}

@@ -137,0 +141,0 @@

{
"name": "ta-scripts",
"version": "2.3.0",
"version": "2.3.1",
"description": "CI/CD scripts",

@@ -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