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

atma

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atma - npm Package Compare versions

Comparing version 0.9.54 to 0.9.55

src/server/controllers/videostreamer.js

6

globals/projects.txt

@@ -5,2 +5,5 @@ {

"path": "file:///d:/libjs/"
},
"bootstrap": {
"path": "file:///d:/libjs/vendor/bootstrap/"
}

@@ -11,3 +14,4 @@ },

"atma_ruqq": "{atma}/ruqq/lib/{0}.js",
"atma_compo": "{atma}/compos/{0}/lib/{1}.js"
"atma_compo": "{atma}/compos/{0}/lib/{1}.js",
"bootstrap": "{bootstrap}/{0}.less"
},

@@ -14,0 +18,0 @@

9

package.json

@@ -7,5 +7,5 @@ {

"name": "Alexander Kit",
"email": "source.kit@gmail.com"
"email": "alex.kit@atmajs.com"
},
"version": "0.9.54",
"version": "0.9.55",
"bin": {

@@ -22,4 +22,5 @@ "atma": "atma"

"jshint": "~0.9.1",
"coffee-script": "~1.4.0",
"less": "~1.3.3",
"coffee-script": ">0.0.0",
"less": ">0.0.0",
"yamljs": ">0.0.0",
"openurl": "~1.1.0",

@@ -26,0 +27,0 @@ "socket.io-client": "~0.9.11",

@@ -16,5 +16,9 @@ include.exports = {

process: function(config, done) {
var script = config.script;
if (script && typeof script.process === 'function'){
script.process(config, done);
return;
}
if (config.args && !script) {

@@ -21,0 +25,0 @@ script = config.args[0];

@@ -69,5 +69,8 @@ include

jsAst: function(solution, stack, output) {
var cfg = solution.config,
fileName_IncludeJS = cfg && cfg.includejsFile || 'include.js';
var ast = UglifyJS.parse(''),
includeIndex = ruqq.arr.indexOf(stack, function(x) {
return x.url.indexOf('include.js') !== -1;
return x.url.indexOf(fileName_IncludeJS) !== -1;
});

@@ -74,0 +77,0 @@

@@ -33,3 +33,3 @@ (function() {

if (x[j][x[j].length - 1] === c) {
debugger;
var str = x.splice(index, j - index + 1).join(' ');

@@ -57,3 +57,3 @@

if (!command) {
if (command == null) {
this.done();

@@ -85,3 +85,3 @@ return;

logger
.error('Could not run command');
.error('Could not run the command', command);

@@ -88,0 +88,0 @@ this.process();

@@ -28,7 +28,7 @@ var resource = include;

resp.Cfg(app, function(obj) {
cfgObj_extend(app.config, obj);
self.resolve();
});
});
});

@@ -35,0 +35,0 @@ return self;

@@ -16,7 +16,7 @@ include.js({

read: function() {
if (this.images && this.content){
if (this.resources && this.content){
return this.content;
}
this.content = io.File.prototype.read.call(this);
this.images = CssParser.extractImages(global.solution.uri, this.uri, this.content);
this.resources = CssParser.extractResources(global.solution.uri, this.uri, this.content);

@@ -49,9 +49,12 @@ return this.content;

var solutionUri = global.solution.uri,
isSubDir = path_isSubDir(solutionUri.toString(), cssFile.uri.toString()),
images = cssFile.images,
dir = net.Uri.combine(targetUri.toLocalDir(), 'images/');
cssFilePath = cssFile.uri.toString(),
isSubDir = cssFilePath.indexOf('.reference/') === -1
? path_isSubDir(solutionUri.toString(), cssFilePath)
: true,
resources = cssFile.resources,
dir = net.Uri.combine(targetUri.toLocalDir(), 'resources/');
for (var i = 0, x, length = images.length; x = images[i], i < length; i++) {
resources.forEach(function(x){
if (isSubDir == false) {

@@ -64,2 +67,3 @@ var uri = new net.Uri(net.Uri.combine(dir, x.uri.file));

} else {
x.replaceWith = getRewritenPath(x.uri, x.href, targetUri.toLocalDir());

@@ -71,4 +75,4 @@ }

}
}
});
}
});
include.exports = {
extractImages: function(baseuri, uri, content) {
extractResources: function(baseuri, uri, content) {

@@ -12,6 +12,7 @@ var regexp = new RegExp(/url[\s]*\(('|")?([^)'"]+)('|")?\)/gi),

if (!href) {
console.error('NOT MATCHED', match);
}
if (!href)
logger.error('NOT MATCHED', match);
if (isAbsolute(href) === false) {

@@ -51,3 +52,9 @@

function isAbsolute(href) {
if (href == null)
return true;
if (/^\s*data:/.test(href))
return true;
return /^[\w]{1,8}:\/\//.exec(href) != null;
}
include
.js(
'static-reference.js::RefPath',
'videostreamer.js',
'../proxy.js'

@@ -8,3 +9,4 @@ )

var File = io.File;
var File = io.File,
Videostreamer = resp.videostreamer;

@@ -40,4 +42,12 @@ var path = app.current.file || net.Uri.combine(process.cwd(), 'temp.del'),

var mimeType = MimeTypes[file.uri.extension] || 'text/plain',
content = file.read('binary');
var mimeType = MimeTypes[file.uri.extension] || 'text/plain';
if (mimeType.indexOf('video/') === 0) {
Videostreamer(file.uri.toLocalFile(), request, response);
return;
}
var content = file.read('binary');

@@ -62,5 +72,5 @@

response.writeHeader(404, {
"Content-Type": "text/plain"
'Content-Type': 'text/plain'
});
response.end("404 Not Found - " + file.uri.toLocalFile());
response.end('404 Not Found - ' + file.uri.toLocalFile());

@@ -87,2 +97,12 @@ },

set('image/png', 'png');
set('image/svg+xml', 'svg');
set('video/mp4', 'mp4', 'f4v', 'f4p');
set('video/ogg', 'ogv');
set('video/webm', 'webm');
set('video/x-flv', 'flv');
set('video/mov', '/quicktime')
set('video/x-flv', 'flv')
set('application/x-shockwave-flash', 'swf');

@@ -89,0 +109,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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