Skip to content

Commit

Permalink
issue #254 - recompiled
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed Mar 14, 2015
1 parent 85e44c6 commit 59f381f
Show file tree
Hide file tree
Showing 12 changed files with 3,198 additions and 4,273 deletions.
626 changes: 313 additions & 313 deletions lib/callbacks/builtins.js

Large diffs are not rendered by default.

753 changes: 377 additions & 376 deletions lib/callbacks/compile.js

Large diffs are not rendered by default.

646 changes: 323 additions & 323 deletions lib/callbacks/flows.js

Large diffs are not rendered by default.

626 changes: 313 additions & 313 deletions lib/callbacks/runtime-all.js

Large diffs are not rendered by default.

664 changes: 341 additions & 323 deletions lib/callbacks/transform-all.js

Large diffs are not rendered by default.

547 changes: 0 additions & 547 deletions lib/generators/runtime-all.js

Large diffs are not rendered by default.

547 changes: 0 additions & 547 deletions lib/generators/transform-all.js

Large diffs are not rendered by default.

276 changes: 138 additions & 138 deletions lib/streams/client/streams.js
Original file line number Diff line number Diff line change
@@ -1,142 +1,142 @@
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('../callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb;












function DataBuffer(options) {
var _chunks = [];

this.read = function read__1(_, len) { var chunks, total, chunk; var __frame = { name: 'read__1', line: 17 }; return __func(_, this, arguments, read__1, 0, __frame, function __$read__1() {
if (len < 0) { len = Infinity; }
if (len == 0) { return _(null, ''); } chunks = [];
total = 0;
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('../callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb;












function DataBuffer(options) {
var _chunks = [];

this.read = function read__1(_, len) { var chunks, total, chunk; var __frame = { name: 'read__1', line: 17 }; return __func(_, this, arguments, read__1, 0, __frame, function __$read__1() {
if (len < 0) { len = Infinity; }
if (len == 0) { return _(null, ''); } chunks = [];
total = 0;

while (total < len) { chunk = _chunks.splice(0, 1)[0];

while (total < len) { chunk = _chunks.splice(0, 1)[0];
if (!chunk) { return _(null, chunks.length == 0 ? null : chunks.join('')); }
if (total + chunk.length <= len) {
chunks.push(chunk);
total += chunk.length; } else {

if (!chunk) { return _(null, chunks.length == 0 ? null : chunks.join('')); }
if (total + chunk.length <= len) {
chunks.push(chunk);
total += chunk.length; } else {

chunks.push(chunk.substring(0, len - total));
_chunks.splice(0, 0, chunk.substring(len - total));
total = len; } }
chunks.push(chunk.substring(0, len - total));
_chunks.splice(0, 0, chunk.substring(len - total));
total = len; } }


return _(null, chunks.join('')); }); };




this.readAll = function readAll__2(_) { var __this = this; var __frame = { name: 'readAll__2', line: 39 }; return __func(_, this, arguments, readAll__2, 0, __frame, function __$readAll__2() {
return __this.read(__cb(_, __frame, 1, 0, _, true, false), -1); }); };




this.unread = function (chunk) {
_chunks.splice(0, 0, chunk);
return this; };


this.write = function write__3(_, data, enc) { var __this = this; var __frame = { name: 'write__3', line: 50 }; return __func(_, this, arguments, write__3, 0, __frame, function __$write__3() {
_chunks.push(data);
return _(null, __this); }); };


this.end = function (data, enc) {
if (data) _chunks.push(data);
return this; };


this.contents = function () {
return _chunks.join(''); }; }



function HttpError(statusCode, message) {
this.statusCode = statusCode;
this.message = message;
this.stack = new Error().stack; }


function _fixHttpClientOptions(options) {
if (!options) throw new Error('request error: no options');
if (typeof options === 'string') options = { url: options };


return options; }





















function HttpClientRequest(options) {
options = _fixHttpClientOptions(options);
DataBuffer.call(this, options);
var _xhr;
this.response = function (callback) {
if (!callback) return __future.call(this, this.response, arguments, 0);
$.ajax({ url: options.url, headers: options.headers, type: options.method, data: this.contents(), dataType: 'text', beforeSend: function (xhr) {


return _(null, chunks.join('')); }); };




this.readAll = function readAll__2(_) { var __this = this; var __frame = { name: 'readAll__2', line: 39 }; return __func(_, this, arguments, readAll__2, 0, __frame, function __$readAll__2() {
return __this.read(__cb(_, __frame, 1, 0, _, true, false), -1); }); };




this.unread = function (chunk) {
_chunks.splice(0, 0, chunk);
return this; };


this.write = function write__3(_, data, enc) { var __this = this; var __frame = { name: 'write__3', line: 50 }; return __func(_, this, arguments, write__3, 0, __frame, function __$write__3() {
_chunks.push(data);
return _(null, __this); }); };


this.end = function (data, enc) {
if (data) _chunks.push(data);
return this; };


this.contents = function () {
return _chunks.join(''); }; }



function HttpError(statusCode, message) {
this.statusCode = statusCode;
this.message = message;
this.stack = new Error().stack; }


function _fixHttpClientOptions(options) {
if (!options) throw new Error('request error: no options');
if (typeof options === 'string') options = { url: options };


return options; }





















function HttpClientRequest(options) {
options = _fixHttpClientOptions(options);
DataBuffer.call(this, options);
var _xhr;
this.response = function (callback) {
if (!callback) return __future.call(this, this.response, arguments, 0);
$.ajax({ url: options.url, headers: options.headers, type: options.method, data: this.contents(), dataType: 'text', beforeSend: function (xhr) {







_xhr = xhr; }, success: function (data, statusText, xhr) {


callback(null, new HttpClientResponse(data, xhr)); }, error: function (xhr, statusText, message) {


if (statusText == 'error') callback(new HttpError(xhr.status, statusText + ': ' + message)); else callback(new HttpError(400, statusText + ': ' + message)); } }); };




this.abort = function () {
_xhr && _xhr.abort();
_xhr = null; }; }



function HttpClientResponse(data, xhr) {
DataBuffer.call(this);
this.end(data);
this.statusCode = xhr.status;
this.headers = {};
var self = this;
xhr.getAllResponseHeaders().replace(/\r\n/g, '\n').split('\n').forEach(function (header) {
var pair = header.split(':');
self.headers[pair[0].toLowerCase()] = pair[1] && pair[1].trim(); }); }



exports.httpRequest = function (options) {
return new HttpClientRequest(options); };





_xhr = xhr; }, success: function (data, statusText, xhr) {


callback(null, new HttpClientResponse(data, xhr)); }, error: function (xhr, statusText, message) {


if (statusText == 'error') callback(new HttpError(xhr.status, statusText + ': ' + message)); else callback(new HttpError(400, statusText + ': ' + message)); } }); };




this.abort = function () {
_xhr && _xhr.abort();
_xhr = null; }; }



function HttpClientResponse(data, xhr) {
DataBuffer.call(this);
this.end(data);
this.statusCode = xhr.status;
this.headers = {};
var self = this;
xhr.getAllResponseHeaders().replace(/\r\n/g, '\n').split('\n').forEach(function (header) {
var pair = header.split(':');
self.headers[pair[0].toLowerCase()] = pair[1] && pair[1].trim(); }); }



exports.httpRequest = function (options) {
return new HttpClientRequest(options); };
Loading

0 comments on commit 59f381f

Please sign in to comment.