New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

structor-tool-talentui

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

structor-tool-talentui - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

2

bin/cpDir.js

@@ -12,5 +12,5 @@ #!/usr/bin/env node

'move':move,
'setGroup':setGroup}
'setGroupUrl':setGroup}
return order[params[0]](params);

@@ -8,11 +8,14 @@ 'use strict';

function setGroup(params) {
if(!params[1]){
var url = params[1];
if(!url){
console.error('there must have a groupUrl which you have used in structor');
}
// var urlInfos = url.split('/') ? url.split('/') : url.split('\\') ;
writeFileAtomic('./groupUrl.txt', params[1], {chown:{uid:100,gid:50}}, function (err) {
if (err) throw err;
});
// return urlInfos[urlInfos.length-1];
}
module.exports = setGroup;
{
"name": "structor-tool-talentui",
"version": "1.1.7",
"version": "1.1.8",
"description": "It can be used to move structor components to talentui just can used by beisen company",

@@ -5,0 +5,0 @@ "author": "xhbisme",

@@ -8,3 +8,3 @@

> - cpDir setGroup:Use to set base group url in structor
> - cpDir setGroupUrl:Use to set base group url in structor

@@ -21,3 +21,3 @@ ---

> #### cpDir setGroup srcUrl
> #### cpDir setGroupUrl srcUrl
> - srcUrl: source url of the structor,it is a whole name of the group which you used in structor.

@@ -30,3 +30,3 @@

> - componentNames:use ',' to split,use 'all' to copy all of the components.
> - src:the source url of the file or folder,if you have used the command 'cpDir-setGroupUrl' seted a url,you can omit it.
> - src:the source url of the file or folder,if you have used the command 'cpDir setGroupUrl' seted a url,you can omit it.
> - tar:the target folder where you store the group,you should make sure the target url is not exist or you can omit is if your current url is the root url of the talentUI.

@@ -33,0 +33,0 @@ ---

var fs = require('fs')
var path = require('path')
var isJsx = require('./isJsx')
var reader = require('read-file');
var writeFileAtomic = require('write-file-atomic');

@@ -37,4 +39,34 @@ module.exports.sync = fixDirJsx

}
//修改文件内容,将‘../../../views/组名’改成‘.’
reader(newDest,{encoding: 'utf8'}, function (err,buffer){
if(err || buffer==''){
cosole.err('there is no default value of srcUrl(whole url of groupName in structor), please use "cpDir setGroup ... " to set it.');
return;
}
var urlInfo = newDest.split('/') ? newDest.split('/') : newDest.split('\\') ;
var groupName = urlInfo[urlInfo.length-3];
var tarString = '../../../views/'+groupName;
var tarBuffer = buffer.split(tarString);
var result = tarBuffer[0]+'..';
for(var i=1;i<tarBuffer.length;i++)
{
if(i == tarBuffer.length-1){
result=result +tarBuffer[i];
}else{
result=result +tarBuffer[i]+'..';
}
}
console.log(result);
writeFileAtomic(newDest, result, {chown:{uid:100,gid:50}}, function (err) {
if (err) throw err;
});
});
})
}
}
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