<commit_before>/******************************************************************************
 * Copyright © 2016 The Waves Developers.                                     *
 *                                                                            *
 * See the LICENSE files at                                                   *
 * the top-level directory of this distribution for the individual copyright  *
 * holder information and the developer policies on copyright and licensing.  *
 *                                                                            *
 * Unless otherwise agreed in a custom licensing agreement, no part of the    *
 * Waves software, including this file, may be copied, modified, propagated,  *
 * or distributed except according to the terms contained in the LICENSE      *
 * file.                                                                      *
 *                                                                            *
 * Removal or modification of this copyright notice is prohibited.            *
 *                                                                            *
 ******************************************************************************/
/**
 * @depends {3rdparty/jquery-2.1.0.js}
 * @depends {3rdparty/big.js}
 * @depends {3rdparty/jsbn.js}
 * @depends {3rdparty/jsbn2.js}
 * @depends {3rdparty/webdb.js}
 * @depends {3rdparty/jquery.growl.js}
 * @depends {3rdparty/clipboard.js}
 * @depends {crypto/curve25519.js}
 * @depends {crypto/curve25519_.js}
 * @depends {crypto/base58.js}
 * @depends {crypto/blake32.js}
 * @depends {crypto/keccak32.js}
 * @depends {crypto/passphrasegenerator.js}
 * @depends {crypto/sha256worker.js}
 * @depends {crypto/3rdparty/cryptojs/aes.js}
 * @depends {crypto/3rdparty/cryptojs/sha256.js}
 * @depends {crypto/3rdparty/jssha256.js}
 * @depends {crypto/3rdparty/seedrandom.js}
 * @depends {util/converters.js}
 * @depends {util/extensions.js}
 * @depends {waves.js}
 */
var Waves = (function(Waves, $, undefined) {
	"use strict";

    Waves.balance  = 0;
    Waves.hasLocalStorage = false;
    Waves.update;
    Waves.blockUpdate;
    Waves.blockHeight;

    Waves.pages = {
        'mBB-wallet': function updateWallet () {

            Waves.loadAddressBalance(Waves.address, function (balance) {

                var formatBalance = Waves.formatAmount(balance);

                $("#wavesbalance").html(formatBalance);
                $("#balancespan").html(formatBalance +' Waves');
                $('.balancewaves').html(formatBalance + ' Waves');
                $(".wB-add").html(Waves.address);
                $("#wavesAccountAddress").html(Waves.address);

                console.log('Balance: '+formatBalance);

            });

        },
        'mBB-portfolio': function updatePortfolio () {
            console.log('Update Portfolio');
        },
        'mBB-exchange': function updateExchange() {
            console.log('Update Exchange');
        },
        'mBB-voting' : function updateVoting() {
            console.log('Update Voting');
        },
        'mBB-history': function updateHistory() {

            Waves.getAddressHistory(Waves.address, function(history) {

                var transactionHistory = history[0];
                var appContainer;

                transactionHistory.reverse();

                $.each(transactionHistory, function(historyKey, historyValue) {

                        appContainer += '
';
                        appContainer += ''+Waves.formatTimestamp(historyValue.timestamp)+'	';
                        appContainer += ''+historyValue.type+'	';
                        appContainer += ''+historyValue.sender+'	';
                        appContainer += ''+historyValue.recipient+'	';
                        appContainer += ''+historyValue.fee+'	';
                        appContainer += ''+Waves.formatAmount(historyValue.amount)+' Waves	';
                        appContainer += '
';

                });

                $("#transactionhistory").html(appContainer);

            });

        },
        'mBB-messages': function updateMessages () {
            console.log('Update Messages');
        },
        'mBB-community': function updateCommunity () {

            var row = '';
            var endBlock = Waves.blockHeight;
            var startBlock = endBlock - 9;
            Waves.apiRequest(Waves.api.blocks.lastBlocks(startBlock, endBlock), function(response) {

                response.reverse();
                console.log(response);

                $.each(response, function(blockKey, blockData) {

                    var block = Waves.blockHeight - blockKey;
                    row += '
'+
                        ''+block+'	'+
                        ''+Waves.formatTimestamp(blockData.timestamp)+'	'+
                        ''+blockData.transactions.length+'	'+
                        ''+blockData.generator+'	'+
                    '
';

                });

                $("#latestBlocksTable").html(row);

            });

        }
    };

    Waves.updateDOM = function (page) {

        var interval = Waves.stateIntervalSeconds * 1000;
       if (Waves.pages[page]) {
            Waves.pages[page]();
            Waves.update = setInterval(function() { Waves.pages[page](); }, interval);
        }
    }

    // Show/hide different sections on tab activation
    // The ROUTING
    $('input[type=radio]').click(function(){

        $('.mBB-content, .LBmBB-content').fadeOut(200).delay(400);
        $('#' + $(this).val()).fadeIn(800);
        $('#LB' + $(this).val()).fadeIn(800);

        var linkType = $(this).val();

        clearInterval(Waves.update);
        Waves.updateDOM($(this).val());

        switch(linkType) {
            case 'mBB-portfolio':
                Waves.loadPayment();
            break;
        }
    });

    $("#wavessend").on("click", function(e) {
        e.preventDefault();

        $("#errorpayment").html('');
        var currentBalance = $("#wavesbalance").html();
        var maxSend = (currentBalance * Math.pow(10,8) ) - 1;
        maxSend = maxSend / Math.pow(10,8);
        var sendAmount = $("#wavessendamount").val().replace(/\s+/g, '');

        if(sendAmount > maxSend) {

            $("#errorpayment").html('Not enough funds');
            return;

        }

        var amount = Math.round(Number(sendAmount * 100000000));

        var senderPassphrase = converters.stringToByteArray(Waves.passphrase);
        var senderPublic = Base58.decode(Waves.publicKey);
        var senderPrivate = Base58.decode(Waves.privateKey);
        var recipient = $("#wavesrecipient").val().replace(/\s+/g, '');

        var wavesTime = Number(Waves.getTime());

        var signature;
        var fee = Number(1);

        var signatureData = Waves.signatureData(Waves.publicKey, recipient, amount, fee, wavesTime);
        console.log(signatureData);

        var signature = Array.from(Waves.curve25519.sign(senderPrivate, signatureData));
        console.log(signature);
        signature = Base58.encode(signature);

        var verify = Waves.curve25519.verify(senderPublic, signatureData, Base58.decode(signature));
        console.log(verify);

        var data = {
          "recipient": recipient,
          "timestamp": wavesTime,
          "signature": signature,
          "amount": amount,
          "senderPublicKey": Waves.publicKey,
          "fee": fee
        }

        Waves.apiRequest(Waves.api.waves.broadcastTransaction, JSON.stringify(data), function(response) {

            console.log(response);

            $("#sentpayment").html(JSON.stringify(data));

            $("#errorpayment").html(JSON.stringify(response));

        });

    });

    $("#addContact").on("click", function(e) {
        e.preventDefault();

        $("#contactForm").toggle();
    });

    $("#addContactSubmit").on("click", function(e) {
        e.preventDefault();

        var name = $("#contactname").val();
        var address = $("#contactaddress").val();
        var email = $("#contactemail").val();

        var accountData = {
            name: name,
            address: address,
            email: email
        };

        if(Waves.hasLocalStorage) {

            var currentAccounts = localStorage.getItem('WavesContacts');
                currentAccounts = JSON.parse(currentAccounts);

            if(currentAccounts !== undefined && currentAccounts !== null) {

                currentAccounts.contacts.push(accountData);
                localStorage.setItem('WavesContacts', JSON.stringify(currentAccounts));
                var row = Waves.contactRow(accountData);
                $("#contactTable").append(row);

            } else {

                var accountArray = { contacts: [accountData] };
                localStorage.setItem('WavesContacts', JSON.stringify(accountArray));
                var row = Waves.contactRow(accountData);
                $("#contactTable").append(row);
            }

        }

    });

    $("#tabs-Icons-community").on("click", function(e) {

        var currentAccounts = localStorage.getItem('WavesContacts');
            currentAccounts = JSON.parse(currentAccounts);

        var row;
        $.each(currentAccounts.contacts, function(contactKey, contactData) {

            row += Waves.contactRow(contactData);

        });

        $("#contactTable").html(row);

    });

    $('#uiTB-iconset-logout').click(function() {
        Waves.logout();
    });

    //Add Copy-to-Clipboard to class clipSpan
    var clipboard = new Clipboard('.clipSpan');

    clipboard.on('success', function(e) {

         $.growl.notice({ message: "Address successfully copied to clipboard." });

        e.clearSelection();
    });

    clipboard.on('error', function(e) {
         $.growl.warning({ message: "Could not copy address to clipboard." });
    });

    //How to growl:
    /*
      $.growl({ title: "Growl", message: "The kitten is awake!", url: "/kittens" });
      $.growl.error({ message: "The kitten is attacking!" });
      $.growl.notice({ message: "The kitten is cute!" });
      $.growl.warning({ message: "The kitten is ugly!" });
  */

	return Waves;
}(Waves || {}, jQuery));

$(document).ready(function(){

    Waves.initApp();
    $('.tooltip').tooltipster();

    $('#tooltipTest').tooltipster({
        content: $(' This text is in bold case !')
    });

    $('.tooltip-1').tooltipster({
        theme: 'tooltipster-theme1',
        delay: 1000,
        contentAsHTML: true
    });

    $('.tooltip-2').tooltipster({
        theme: 'tooltipster-theme2',
        delay: 1000
    });

    $('.tooltip-3').tooltipster({
        theme: 'tooltipster-theme3',
        delay: 1000,
        contentAsHTML: true
    });

});

<commit_msg>less blocks in table<commit_after>/******************************************************************************
 * Copyright © 2016 The Waves Developers.                                     *
 *                                                                            *
 * See the LICENSE files at                                                   *
 * the top-level directory of this distribution for the individual copyright  *
 * holder information and the developer policies on copyright and licensing.  *
 *                                                                            *
 * Unless otherwise agreed in a custom licensing agreement, no part of the    *
 * Waves software, including this file, may be copied, modified, propagated,  *
 * or distributed except according to the terms contained in the LICENSE      *
 * file.                                                                      *
 *                                                                            *
 * Removal or modification of this copyright notice is prohibited.            *
 *                                                                            *
 ******************************************************************************/
/**
 * @depends {3rdparty/jquery-2.1.0.js}
 * @depends {3rdparty/big.js}
 * @depends {3rdparty/jsbn.js}
 * @depends {3rdparty/jsbn2.js}
 * @depends {3rdparty/webdb.js}
 * @depends {3rdparty/jquery.growl.js}
 * @depends {3rdparty/clipboard.js}
 * @depends {crypto/curve25519.js}
 * @depends {crypto/curve25519_.js}
 * @depends {crypto/base58.js}
 * @depends {crypto/blake32.js}
 * @depends {crypto/keccak32.js}
 * @depends {crypto/passphrasegenerator.js}
 * @depends {crypto/sha256worker.js}
 * @depends {crypto/3rdparty/cryptojs/aes.js}
 * @depends {crypto/3rdparty/cryptojs/sha256.js}
 * @depends {crypto/3rdparty/jssha256.js}
 * @depends {crypto/3rdparty/seedrandom.js}
 * @depends {util/converters.js}
 * @depends {util/extensions.js}
 * @depends {waves.js}
 */
var Waves = (function(Waves, $, undefined) {
	"use strict";

    Waves.balance  = 0;
    Waves.hasLocalStorage = false;
    Waves.update;
    Waves.blockUpdate;
    Waves.blockHeight;

    Waves.pages = {
        'mBB-wallet': function updateWallet () {

            Waves.loadAddressBalance(Waves.address, function (balance) {

                var formatBalance = Waves.formatAmount(balance);

                $("#wavesbalance").html(formatBalance);
                $("#balancespan").html(formatBalance +' Waves');
                $('.balancewaves').html(formatBalance + ' Waves');
                $(".wB-add").html(Waves.address);
                $("#wavesAccountAddress").html(Waves.address);

                console.log('Balance: '+formatBalance);

            });

        },
        'mBB-portfolio': function updatePortfolio () {
            console.log('Update Portfolio');
        },
        'mBB-exchange': function updateExchange() {
            console.log('Update Exchange');
        },
        'mBB-voting' : function updateVoting() {
            console.log('Update Voting');
        },
        'mBB-history': function updateHistory() {

            Waves.getAddressHistory(Waves.address, function(history) {

                var transactionHistory = history[0];
                var appContainer;

                transactionHistory.reverse();

                $.each(transactionHistory, function(historyKey, historyValue) {

                        appContainer += '
';
                        appContainer += ''+Waves.formatTimestamp(historyValue.timestamp)+'	';
                        appContainer += ''+historyValue.type+'	';
                        appContainer += ''+historyValue.sender+'	';
                        appContainer += ''+historyValue.recipient+'	';
                        appContainer += ''+historyValue.fee+'	';
                        appContainer += ''+Waves.formatAmount(historyValue.amount)+' Waves	';
                        appContainer += '
';

                });

                $("#transactionhistory").html(appContainer);

            });

        },
        'mBB-messages': function updateMessages () {
            console.log('Update Messages');
        },
        'mBB-community': function updateCommunity () {

            var row = '';
            var endBlock = Waves.blockHeight;
            var startBlock = endBlock - 6;
            Waves.apiRequest(Waves.api.blocks.lastBlocks(startBlock, endBlock), function(response) {

                response.reverse();
                console.log(response);

                $.each(response, function(blockKey, blockData) {

                    var block = Waves.blockHeight - blockKey;
                    row += '
'+
                        ''+block+'	'+
                        ''+Waves.formatTimestamp(blockData.timestamp)+'	'+
                        ''+blockData.transactions.length+'	'+
                        ''+blockData.generator+'	'+
                    '
';

                });

                $("#latestBlocksTable").html(row);

            });

        }
    };

    Waves.updateDOM = function (page) {

        var interval = Waves.stateIntervalSeconds * 1000;
       if (Waves.pages[page]) {
            Waves.pages[page]();
            Waves.update = setInterval(function() { Waves.pages[page](); }, interval);
        }
    }

    // Show/hide different sections on tab activation
    // The ROUTING
    $('input[type=radio]').click(function(){

        $('.mBB-content, .LBmBB-content').fadeOut(200).delay(400);
        $('#' + $(this).val()).fadeIn(800);
        $('#LB' + $(this).val()).fadeIn(800);

        var linkType = $(this).val();

        clearInterval(Waves.update);
        Waves.updateDOM($(this).val());

        switch(linkType) {
            case 'mBB-portfolio':
                Waves.loadPayment();
            break;
        }
    });

    $("#wavessend").on("click", function(e) {
        e.preventDefault();

        $("#errorpayment").html('');
        var currentBalance = $("#wavesbalance").html();
        var maxSend = (currentBalance * Math.pow(10,8) ) - 1;
        maxSend = maxSend / Math.pow(10,8);
        var sendAmount = $("#wavessendamount").val().replace(/\s+/g, '');

        if(sendAmount > maxSend) {

            $("#errorpayment").html('Not enough funds');
            return;

        }

        var amount = Math.round(Number(sendAmount * 100000000));

        var senderPassphrase = converters.stringToByteArray(Waves.passphrase);
        var senderPublic = Base58.decode(Waves.publicKey);
        var senderPrivate = Base58.decode(Waves.privateKey);
        var recipient = $("#wavesrecipient").val().replace(/\s+/g, '');

        var wavesTime = Number(Waves.getTime());

        var signature;
        var fee = Number(1);

        var signatureData = Waves.signatureData(Waves.publicKey, recipient, amount, fee, wavesTime);
        console.log(signatureData);

        var signature = Array.from(Waves.curve25519.sign(senderPrivate, signatureData));
        console.log(signature);
        signature = Base58.encode(signature);

        var verify = Waves.curve25519.verify(senderPublic, signatureData, Base58.decode(signature));
        console.log(verify);

        var data = {
          "recipient": recipient,
          "timestamp": wavesTime,
          "signature": signature,
          "amount": amount,
          "senderPublicKey": Waves.publicKey,
          "fee": fee
        }

        Waves.apiRequest(Waves.api.waves.broadcastTransaction, JSON.stringify(data), function(response) {

            console.log(response);

            $("#sentpayment").html(JSON.stringify(data));

            $("#errorpayment").html(JSON.stringify(response));

        });

    });

    $("#addContact").on("click", function(e) {
        e.preventDefault();

        $("#contactForm").toggle();
    });

    $("#addContactSubmit").on("click", function(e) {
        e.preventDefault();

        var name = $("#contactname").val();
        var address = $("#contactaddress").val();
        var email = $("#contactemail").val();

        var accountData = {
            name: name,
            address: address,
            email: email
        };

        if(Waves.hasLocalStorage) {

            var currentAccounts = localStorage.getItem('WavesContacts');
                currentAccounts = JSON.parse(currentAccounts);

            if(currentAccounts !== undefined && currentAccounts !== null) {

                currentAccounts.contacts.push(accountData);
                localStorage.setItem('WavesContacts', JSON.stringify(currentAccounts));
                var row = Waves.contactRow(accountData);
                $("#contactTable").append(row);

            } else {

                var accountArray = { contacts: [accountData] };
                localStorage.setItem('WavesContacts', JSON.stringify(accountArray));
                var row = Waves.contactRow(accountData);
                $("#contactTable").append(row);
            }

        }

    });

    $("#tabs-Icons-community").on("click", function(e) {

        var currentAccounts = localStorage.getItem('WavesContacts');
            currentAccounts = JSON.parse(currentAccounts);

        var row;
        $.each(currentAccounts.contacts, function(contactKey, contactData) {

            row += Waves.contactRow(contactData);

        });

        $("#contactTable").html(row);

    });

    $('#uiTB-iconset-logout').click(function() {
        Waves.logout();
    });

    //Add Copy-to-Clipboard to class clipSpan
    var clipboard = new Clipboard('.clipSpan');

    clipboard.on('success', function(e) {

         $.growl.notice({ message: "Address successfully copied to clipboard." });

        e.clearSelection();
    });

    clipboard.on('error', function(e) {
         $.growl.warning({ message: "Could not copy address to clipboard." });
    });

    //How to growl:
    /*
      $.growl({ title: "Growl", message: "The kitten is awake!", url: "/kittens" });
      $.growl.error({ message: "The kitten is attacking!" });
      $.growl.notice({ message: "The kitten is cute!" });
      $.growl.warning({ message: "The kitten is ugly!" });
  */

	return Waves;
}(Waves || {}, jQuery));

$(document).ready(function(){

    Waves.initApp();
    $('.tooltip').tooltipster();

    $('#tooltipTest').tooltipster({
        content: $(' This text is in bold case !')
    });

    $('.tooltip-1').tooltipster({
        theme: 'tooltipster-theme1',
        delay: 1000,
        contentAsHTML: true
    });

    $('.tooltip-2').tooltipster({
        theme: 'tooltipster-theme2',
        delay: 1000
    });

    $('.tooltip-3').tooltipster({
        theme: 'tooltipster-theme3',
        delay: 1000,
        contentAsHTML: true
    });

});

<|endoftext|>


<commit_before>var mdlVersion = '1.1.1';
var revision = 0;
var assetRevision = 0;
var mdiVersion = '2.1.3';

var packageVersion = (revision > 0) ? mdlVersion + '_' + revision : mdlVersion,
    assetPackageVersion = (assetRevision > 0) ? mdlVersion + '_' + assetRevision : mdlVersion;

Package.describe({
  name: 'zodiase:mdl',
  version: packageVersion,
  summary: 'A wrapper package for Google\'s Material Design Lite.',
  git: 'https://github.com/Zodiase/meteor-mdl.git',
  documentation: 'README.md'
});

Package.onUse(function (api) {
  'use strict';
  api.versionsFrom('1.2.1');
  api.use([
    'ecmascript',
    'isobuild:compiler-plugin@1.0.0',
    'fourseven:scss@3.4.1'
  ]);
  // `check` package is still in testing phase, lock version to prevent BC.
  api.use('zodiase:check@=0.0.4');
  // MDL Assets package has to match strictly.
  api.imply('zodiase:mdl-assets@=' + assetPackageVersion);
  // MDI can be freely updated.
  api.imply('zodiase:material-design-icons-fonts@' + mdiVersion);

  api.export(['MDl'], 'client');

  api.addFiles([
    'setup.js',
    'check.js'
  ], 'client');

  // Patches.
  api.addFiles([
    'patch/autoUpgrade.js'
  ], 'client');

  // Add helper scss file for fixing asset loading path.
  api.addFiles('theme.scss', 'client', {isImport: true});
});

Package.onTest(function (api) {
  api.use([
    'ecmascript',
    'tinytest',
    'jquery',
    'zodiase:function-bind@0.0.1', // Polyfill for PhantomJS.
    'zodiase:mdl'
  ]);
  api.addFiles([
    'zodiase-mdl.json',
    'tests/export.js',
    'tests/patch-autoUpgrade.js'
  ], 'client');
});

Package.registerBuildPlugin({
  name: 'build',
  use: [
    'caching-compiler@1.0.0',
    'ecmascript',
    'zodiase:check@=0.0.4',
    'zodiase:mdl-assets@=' + assetPackageVersion
  ],
  sources: [
    'plugin/build.js'
  ],
  npmDependencies: {
    'extend': '3.0.0',
    'clone': '1.0.2'
  }
});

var logLabel = 'zodiase:mdl';
var log = function () {
  var args = sliceArguments(arguments);
  args.unshift('*', logLabel, '>');
  console.log.apply(console, args);
};
var sliceArguments = function (_arguments) {
  var args = new Array(_arguments.length);
  for (var i = 0, n = _arguments.length; i < n; i++) {
    args[i] = _arguments[i];
  }
  return args;
};
<commit_msg>Bump revision.<commit_after>var mdlVersion = '1.1.1';
var revision = 1;
var assetRevision = 0;
var mdiVersion = '2.1.3';

var packageVersion = (revision > 0) ? mdlVersion + '_' + revision : mdlVersion,
    assetPackageVersion = (assetRevision > 0) ? mdlVersion + '_' + assetRevision : mdlVersion;

Package.describe({
  name: 'zodiase:mdl',
  version: packageVersion,
  summary: 'A wrapper package for Google\'s Material Design Lite.',
  git: 'https://github.com/Zodiase/meteor-mdl.git',
  documentation: 'README.md'
});

Package.onUse(function (api) {
  'use strict';
  api.versionsFrom('1.2.1');
  api.use([
    'ecmascript',
    'isobuild:compiler-plugin@1.0.0',
    'fourseven:scss@3.4.1'
  ]);
  // `check` package is still in testing phase, lock version to prevent BC.
  api.use('zodiase:check@=0.0.4');
  // MDL Assets package has to match strictly.
  api.imply('zodiase:mdl-assets@=' + assetPackageVersion);
  // MDI can be freely updated.
  api.imply('zodiase:material-design-icons-fonts@' + mdiVersion);

  api.export(['MDl'], 'client');

  api.addFiles([
    'setup.js',
    'check.js'
  ], 'client');

  // Patches.
  api.addFiles([
    'patch/autoUpgrade.js'
  ], 'client');

  // Add helper scss file for fixing asset loading path.
  api.addFiles('theme.scss', 'client', {isImport: true});
});

Package.onTest(function (api) {
  api.use([
    'ecmascript',
    'tinytest',
    'jquery',
    'zodiase:function-bind@0.0.1', // Polyfill for PhantomJS.
    'zodiase:mdl'
  ]);
  api.addFiles([
    'zodiase-mdl.json',
    'tests/export.js',
    'tests/patch-autoUpgrade.js'
  ], 'client');
});

Package.registerBuildPlugin({
  name: 'build',
  use: [
    'caching-compiler@1.0.0',
    'ecmascript',
    'zodiase:check@=0.0.4',
    'zodiase:mdl-assets@=' + assetPackageVersion
  ],
  sources: [
    'plugin/build.js'
  ],
  npmDependencies: {
    'extend': '3.0.0',
    'clone': '1.0.2'
  }
});

var logLabel = 'zodiase:mdl';
var log = function () {
  var args = sliceArguments(arguments);
  args.unshift('*', logLabel, '>');
  console.log.apply(console, args);
};
var sliceArguments = function (_arguments) {
  var args = new Array(_arguments.length);
  for (var i = 0, n = _arguments.length; i < n; i++) {
    args[i] = _arguments[i];
  }
  return args;
};
<|endoftext|>


<commit_before>;(function (yolo_sql, $, undefined) {

    // Private variables
    var site_url = '',
        editor = CodeMirror.fromTextArea(document.getElementById('code'), {
                mode: 'text/x-mysql',
                indentWithTabs: true,
                smartIndent: true,
                lineNumbers: true,
                matchBrackets : true,
                autofocus: true,
                extraKeys: {"Ctrl-Space": "autocomplete"},
        }),
        table_html = '

';

    // Public variables
    yolo_sql.VERSION = '';
    yolo_sql.AUTHORS = ['Ossama Edbali'];

    // Bind events
    $('#select-statement').click(function() {
        editor.setValue("SELECT * FROM tbl_name;");
    });

    $('#insert-statement').click(function() {
        editor.setValue("INSERT INTO tbl_name (some_column) VALUES (some_value);");
    });

    $('#update-statement').click(function() {
        editor.setValue("UPDATE tbl_name SET column1=value1 WHERE some_column=some_value;");
    });

    $('#delete-statement').click(function() {
        editor.setValue("DELETE FROM tbl_name WHERE some_column=some_value;");
    });

    // Private functions
    var
    process_data = function(data) {
        console.log(data);

        var status = data.status,
            type = data.type,
            content = data.content;

        // Remove previous content
        $('#output-section').html('');

        if (!status) {
            $('#output-section').html('
Error! ' + content + '
');
        } else {
            if (type === 'r') {
                if (content.length > 0) {
                    var pivot = content[0],
                        columns = [];

                    // Store column names
                    for (column in pivot) {
                        columns.push(column);
                    }

                    // Build HTML for table
                    $('#output-section').append(table_html);
                    $('#output-table').html(get_columns_html(columns) + get_rows_html(content));
                } else {
                    // Empty set
                    $('#output-section').append('
Empty set returned. Please insert some rows.
');
                }
            } else if (type === 'w') {
                $('#output-section').html('
Affected rows: ' + content + '
');
            }
        }
    },

    get_columns_html = function(columns) {
        var html = '
',
            clen = columns.length,
            i = 0;

        for (i = 0; i < clen; i++) {
            html += ''  + columns[i] + '	';
        }
        html += '
';

        return html;
    },

    get_rows_html = function(content) {
        var html = '
',
            clen = content.length,
            i;

        for (i = 0; i < clen; i++) {
            html += '
';
            for (column in content[i]) {
                html += '' + content[i][column] + '	';
            }
            html += '
';
        }

        return html;
    };

    // Public API
    yolo_sql.set_site_url = function(surl) {
        site_url = surl;
    };

    yolo_sql.use_schema = function() {
        $('a.database').removeClass('active');

        var db_name = $(this).data('schema'); // Check

        $.post(site_url + 'index.php/home/use_database', {'db_name' : db_name}, function(data) {
            $('#' + data).addClass('active');
        });
    };

    yolo_sql.execute = function(query) {
        $.post(site_url + 'index.php/home/execute_statements', {'content': query}, process_data);
    };

    yolo_sql.execute_on_cursor = function() {
        var cursor = editor.getCursor(),
                    content = editor.getLine(cursor.line);

        if (content === '') {
            return;
        }

        $.post(site_url + 'index.php/home/execute_statements', {'content': content}, process_data);
    };

    yolo_sql.execute_selected = function() {
        var content = editor.getSelection();

        if (content === '') {
            return;
        }

        $.post(site_url + 'index.php/home/execute_statements', {'content': content}, process_data);
    };

    yolo_sql.create_schema = function(e) {
        e.preventDefault();

        var $el = $(this);
        $.post($el.attr('action'), $el.serialize(), function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }

            // Dismiss modal
            $('#createSchemaModal').modal('hide');
        });
    };

    yolo_sql.drop_schema = function(schema) {
        $.post(site_url + 'index.php/home/drop_schema', {'schema': schema}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.add_field = function() {
        var str =
                '
' +
                    '<input data-field="name" type="text" class="form-control">	' +
                    '<input data-field="type" type="text" class="form-control">	' +
                    '<input data-field="pk" type="checkbox">	' +
                    '<input data-field="nn" type="checkbox">	' +
                    '<input data-field="ai" type="checkbox">	' +
                    '<input data-field="default" type="text" class="form-control">	' +
                    '<button class="create-table-delete-field btn btn-xs btn-danger">⨯</button>	' +
                '
';

        $('#create-table-cols').append(str);
    };

    yolo_sql.create_table = function() {
        var db_name = $('#create-table-schema-name').val(),
            table_name = $('#create-table-table-name').val(),
            engine = $('#create-table-engine').val(),
            $rows = $('#create-table-cols').children(),
            sql = 'CREATE TABLE `' + db_name + '`.`' + table_name + '` (';

        $rows.each(function() {
            var def = $(this).find('[data-field="default"]').val(),
                pk = $(this).find('[data-field="pk"]').is(':checked'),
                nn = $(this).find('[data-field="nn"]').is(':checked'),
                ai = $(this).find('[data-field="ai"]').is(':checked');

            // Insert fields
            sql += $(this).find('[data-field="name"]').val() + ' ';
            sql += $(this).find('[data-field="type"]').val() + ' ';

            if (pk) {
                sql += 'PRIMARY KEY ';
            }

            if (pk && ai) {
                sql += 'AUTO_INCREMENT ';
            }

            sql += (!pk && !ai && !nn) ? 'NULL ' : 'NOT NULL ';
            sql += (def !== '' ? 'DEFAULT ' + "'" + def + "'" : '') + ' ';

            sql.trim();
            sql += ',';
        });

        // Remove trailing comma
        sql = sql.slice(0, -1);

        sql += ') ENGINE = ' + engine;
        $.post(site_url + 'index.php/home/create_table', {'sql': sql}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                //location = site_url + 'index.php/home';
                $('#create-table-success-alert').removeAttr('hidden');
            } else {
                $('#create-table-error-alert')
                        .append('
Error! ' + content + '
')
                        .removeAttr('hidden');
            }
        });

        console.log(sql);
    };

    yolo_sql.drop_table = function(table) {
        $.post(site_url + 'index.php/home/drop_table', {'table': table}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.truncate_table = function(table) {
        $.post(site_url + 'index.php/home/truncate_table', {'table': table}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                $('#output-section').html('
Table "' + table + '" truncated successfully. Refresh to see changes.
');
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.save_sql_file = function() {
        var content = editor.getValue();

        var newForm = $('<form>', {
                'action': site_url + 'index.php/home/save_sql_file',
                'target': '_top',
                'method': 'post'
            }).append($('<input>', {
                'name': 'content',
                'value': content,
                'type': 'hidden'
            }));

        newForm.submit();
    };

    yolo_sql.set_insert_rows_form = function(table) {
        $('#insert-rows-body').html('');
        $('#output-table').remove();

        $.post(site_url + 'index.php/home/execute_statements', {'content': 'SELECT * FROM ' + table}, function (data) {
            if (status) {
                var html = '', content = data.content;

                for (var i = 0; i < content.length; i++) {
                    html += '
';
                    html += '';
                    html += '
';
                }

                $('#insert-rows-body').append(table_html);
                $('#output-table').html('');
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });

        $('#insertRowsModal').modal('show');
    };

    yolo_sql.parse_er_diagram = function() {

    };

})(window.yolo_sql = window.yolo_sql || {}, jQuery);<commit_msg>Added insert rows (GUI).<commit_after>;(function (yolo_sql, $, undefined) {

    // Private variables
    var site_url = '',
        editor = CodeMirror.fromTextArea(document.getElementById('code'), {
                mode: 'text/x-mysql',
                indentWithTabs: true,
                smartIndent: true,
                lineNumbers: true,
                matchBrackets : true,
                autofocus: true,
                extraKeys: {"Ctrl-Space": "autocomplete"},
        }),
        table_html = '

';

    // Public variables
    yolo_sql.VERSION = '';
    yolo_sql.AUTHORS = ['Ossama Edbali'];

    // Bind events
    $('#select-statement').click(function() {
        editor.setValue("SELECT * FROM tbl_name;");
    });

    $('#insert-statement').click(function() {
        editor.setValue("INSERT INTO tbl_name (some_column) VALUES (some_value);");
    });

    $('#update-statement').click(function() {
        editor.setValue("UPDATE tbl_name SET column1=value1 WHERE some_column=some_value;");
    });

    $('#delete-statement').click(function() {
        editor.setValue("DELETE FROM tbl_name WHERE some_column=some_value;");
    });

    // Private functions
    var
    process_data = function(data) {
        console.log(data);

        var status = data.status,
            type = data.type,
            content = data.content;

        // Remove previous content
        $('#output-section').html('');

        if (!status) {
            $('#output-section').html('
Error! ' + content + '
');
        } else {
            if (type === 'r') {
                if (content.length > 0) {
                    var pivot = content[0],
                        columns = [];

                    // Store column names
                    for (var column in pivot) {
                        columns.push(column);
                    }

                    // Build HTML for table
                    $('#output-section').append(table_html);
                    $('#output-table').html(get_columns_html(columns) + get_rows_html(content));
                } else {
                    // Empty set
                    $('#output-section').append('
Empty set returned. Please insert some rows.
');
                }
            } else if (type === 'w') {
                $('#output-section').html('
Affected rows: ' + content + '
');
            }
        }
    },

    get_columns_html = function(columns) {
        var html = '
',
            clen = columns.length,
            i = 0;

        for (i = 0; i < clen; i++) {
            html += ''  + columns[i] + '	';
        }
        html += '
';

        return html;
    },

    get_rows_html = function(content) {
        var html = '
',
            clen = content.length,
            i;

        for (i = 0; i < clen; i++) {
            html += '
';
            for (column in content[i]) {
                html += '' + content[i][column] + '	';
            }
            html += '
';
        }

        return html;
    };

    // Public API
    yolo_sql.set_site_url = function(surl) {
        site_url = surl;
    };

    yolo_sql.use_schema = function() {
        $('a.database').removeClass('active');

        var db_name = $(this).data('schema'); // Check

        $.post(site_url + 'index.php/home/use_database', {'db_name' : db_name}, function(data) {
            $('#' + data).addClass('active');
        });
    };

    yolo_sql.execute = function(query) {
        $.post(site_url + 'index.php/home/execute_statements', {'content': query}, process_data);
    };

    yolo_sql.execute_on_cursor = function() {
        var cursor = editor.getCursor(),
                    content = editor.getLine(cursor.line);

        if (content === '') {
            return;
        }

        $.post(site_url + 'index.php/home/execute_statements', {'content': content}, process_data);
    };

    yolo_sql.execute_selected = function() {
        var content = editor.getSelection();

        if (content === '') {
            return;
        }

        $.post(site_url + 'index.php/home/execute_statements', {'content': content}, process_data);
    };

    yolo_sql.create_schema = function(e) {
        e.preventDefault();

        var $el = $(this);
        $.post($el.attr('action'), $el.serialize(), function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }

            // Dismiss modal
            $('#createSchemaModal').modal('hide');
        });
    };

    yolo_sql.drop_schema = function(schema) {
        $.post(site_url + 'index.php/home/drop_schema', {'schema': schema}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.add_field = function() {
        var str =
                '
' +
                    '<input data-field="name" type="text" class="form-control">	' +
                    '<input data-field="type" type="text" class="form-control">	' +
                    '<input data-field="pk" type="checkbox">	' +
                    '<input data-field="nn" type="checkbox">	' +
                    '<input data-field="ai" type="checkbox">	' +
                    '<input data-field="default" type="text" class="form-control">	' +
                    '<button class="create-table-delete-field btn btn-xs btn-danger">⨯</button>	' +
                '
';

        $('#create-table-cols').append(str);
    };

    yolo_sql.add_row = function() {
        var str = '';

        $('#insert-rows-table').append(str);
    };

    yolo_sql.create_table = function() {
        var db_name = $('#create-table-schema-name').val(),
            table_name = $('#create-table-table-name').val(),
            engine = $('#create-table-engine').val(),
            $rows = $('#create-table-cols').children(),
            sql = 'CREATE TABLE `' + db_name + '`.`' + table_name + '` (';

        $('#create-table-success-alert').attr('hidden', '');
        $('#create-table-error-alert').attr('hidden', '');
        $('#create-table-error-alert p').remove();

        $rows.each(function() {
            var def = $(this).find('[data-field="default"]').val(),
                pk = $(this).find('[data-field="pk"]').is(':checked'),
                nn = $(this).find('[data-field="nn"]').is(':checked'),
                ai = $(this).find('[data-field="ai"]').is(':checked');

            // Insert fields
            sql += $(this).find('[data-field="name"]').val() + ' ';
            sql += $(this).find('[data-field="type"]').val() + ' ';

            if (pk) {
                sql += 'PRIMARY KEY ';
            }

            if (pk && ai) {
                sql += 'AUTO_INCREMENT ';
            }

            sql += (!pk && !ai && !nn) ? 'NULL ' : 'NOT NULL ';
            sql += (def !== '' ? 'DEFAULT ' + "'" + def + "'" : '') + ' ';

            sql.trim();
            sql += ',';
        });

        // Remove trailing comma
        sql = sql.slice(0, -1);

        sql += ') ENGINE = ' + engine;
        $.post(site_url + 'index.php/home/create_table', {'sql': sql}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                //location = site_url + 'index.php/home';
                $('#create-table-success-alert').removeAttr('hidden');
            } else {
                $('#create-table-error-alert')
                        .append('
Error! ' + content + '
')
                        .removeAttr('hidden');
            }
        });

        console.log(sql);
    };

    yolo_sql.drop_table = function(table) {
        $.post(site_url + 'index.php/home/drop_table', {'table': table}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                location = site_url + 'index.php/home';
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.truncate_table = function(table) {
        $.post(site_url + 'index.php/home/truncate_table', {'table': table}, function(data) {
            var status = data.status,
                content = data.content;

            if (status) {
                $('#output-section').html('
Table "' + table + '" truncated successfully. Refresh to see changes.
');
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });
    };

    yolo_sql.save_sql_file = function() {
        var content = editor.getValue();

        var newForm = $('<form>', {
                'action': site_url + 'index.php/home/save_sql_file',
                'target': '_top',
                'method': 'post'
            }).append($('<input>', {
                'name': 'content',
                'value': content,
                'type': 'hidden'
            }));

        newForm.submit();
    };

    yolo_sql.set_insert_rows_form = function(table) {
        $('#insert-rows-body').html('');
        $('#output-table').remove();

        $.post(site_url + 'index.php/home/execute_statements', {'content': 'DESCRIBE `' + table + '`'}, function (data) {
            var status = data.status,
                content = data.content;

            if (status) {
                var content = data.content,
                    columns = [],
                    html = '

';

                for (var i = 0; i < content.length; i++) {
                    var row = content[i];

                    columns.push(row.field);

                    html += '' + row.field + '	';
                }

                html += '

';

                $('#insert-rows-body').append(table_html);
                $('#output-table').html(get_columns_html(columns) + get_rows_html(content));
            } else {
                $('#output-section').html('
Error! ' + content + '
');
            }
        });

        $('#insertRowsModal').modal('show');
    };

    yolo_sql.parse_er_diagram = function() {

    };

})(window.yolo_sql = window.yolo_sql || {}, jQuery);<|endoftext|>


<commit_before>Package.describe({
  name: 'nyan-cat',
  version: '1.0.0',
  summary: 'Nyan cat in your console!',
  git: 'https://github.com/JSSolutions/meteor-nyan-cat',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('1.1.0.2');
  api.addFiles('nyan-cat.js', 'client');
});
<commit_msg>Changed package name.<commit_after>Package.describe({
  name: 'jss:nyan-cat',
  version: '1.0.0',
  summary: 'Nyan cat in your console!',
  git: 'https://github.com/JSSolutions/meteor-nyan-cat',
  documentation: 'README.md'
});

Package.onUse(function(api) {
  api.versionsFrom('1.1.0.2');
  api.addFiles('nyan-cat.js', 'client');
});
<|endoftext|>


<commit_before>Package.describe({
  name: 'gcampax:accounts-box',
  summary: 'OAuth2 integration with Box cloud storage service',
  version: '1.0.0',
  git: 'https://github.com/gcampax/meteor-accounts-box'
});

Package.onUse(function(api) {
    api.versionsFrom('0.9.4');
    api.use('accounts-base', ['client', 'server']);
    // Export Accounts (etc) to packages using this one.
    api.imply('accounts-base', ['client', 'server']);
    api.use('accounts-oauth', ['client', 'server']);
    api.use('oauth2', ['client', 'server']);
    api.use('oauth', ['client', 'server']);
    api.use('http', ['server']);
    api.use(['underscore', 'service-configuration'], ['client', 'server']);
    api.use(['random', 'templating'], 'client');

    api.export('Box');

    api.addFiles(['box_configure.html', 'box_configure.js'],'client');
    api.addFiles('box_server.js', 'server');
    api.addFiles('box_client.js', 'client');
    api.addFiles('box.js', ['client', 'server']);
});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('gcampax:accounts-box');

  api.addFiles('box-tests.js');
});
<commit_msg>Bump version for republish<commit_after>Package.describe({
  name: 'gcampax:accounts-box',
  summary: 'OAuth2 integration with Box cloud storage service',
  version: '1.0.1',
  git: 'https://github.com/gcampax/meteor-accounts-box'
});

Package.onUse(function(api) {
    api.versionsFrom('0.9.4');
    api.use('accounts-base', ['client', 'server']);
    // Export Accounts (etc) to packages using this one.
    api.imply('accounts-base', ['client', 'server']);
    api.use('accounts-oauth', ['client', 'server']);
    api.use('oauth2', ['client', 'server']);
    api.use('oauth', ['client', 'server']);
    api.use('http', ['server']);
    api.use(['underscore', 'service-configuration'], ['client', 'server']);
    api.use(['random', 'templating'], 'client');

    api.export('Box');

    api.addFiles(['box_configure.html', 'box_configure.js'],'client');
    api.addFiles('box_server.js', 'server');
    api.addFiles('box_client.js', 'client');
    api.addFiles('box.js', ['client', 'server']);
});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('gcampax:accounts-box');

  api.addFiles('box-tests.js');
});
<|endoftext|>


<commit_before>/* eslint no-shadow: 0, func-names: 0, no-unused-vars: 0, no-console: 0 */
var os = require('os');
var webpack = require('webpack');
var cfg = require('./webpack.config.production.js');
var packager = require('electron-packager');
var assign = require('object-assign');
var del = require('del');
var exec = require('child_process').exec;
var argv = require('minimist')(process.argv.slice(2));
var devDeps = Object.keys(require('./package.json').devDependencies);

var appName = argv.name || argv.n || 'FromScratch';
var shouldUseAsar = argv.asar || argv.a || true;
var shouldBuildAll = argv.all || false;

var DEFAULT_OPTS = {
  dir: './',
  name: appName,
  asar: shouldUseAsar,
  ignore: [
    '/README.md',
    '/server.js',
    '/webpack.*',
    '/app/mainApp.jsx',
    '/app/containers($|/)',
    '/app/assets/style($|/)',
    '/build($|/)',
    '/test($|/)',
    '/tools($|/)',
    '/release($|/)'
  ].concat(devDeps.map(function(name) { return '/node_modules/' + name + '($|/)'; }))
};

var icon = argv.icon || argv.i || 'build/icon';

if (icon) {
  DEFAULT_OPTS.icon = icon;
}

var version = argv.version || argv.v || "1.4.12";
DEFAULT_OPTS.version = version;
startPack();

function startPack() {
  console.log('start pack...');
  webpack(cfg, function runWebpackBuild(err, stats) {
    if (err) return console.error(err);
    del('release')
    .then(function(paths) {
      if (shouldBuildAll) {
        // build for all platforms
        var archs = ['ia32', 'x64'];
        var platforms = ['linux', 'win32', 'darwin'];

        platforms.forEach(function(plat) {
          archs.forEach(function(arch) {
            pack(plat, arch, log(plat, arch));
          });
        });
      } else {
        // build for current platform only
        pack(os.platform(), os.arch(), log(os.platform(), os.arch()));
      }
    })
    .catch(function(err) {
      console.error(err);
    });
  });
}

function pack(plat, arch, cb) {
  // there is no darwin ia32 electron
  if (plat === 'darwin' && arch === 'ia32') return;

  var iconObj = {
    icon: DEFAULT_OPTS.icon + (() => {
      var extension = '.png';
      if (plat === 'darwin') {
        extension = '.icns';
      } else if (plat === 'win32') {
        extension = '.ico';
      }
      return extension;
    })()
  };

  var opts = assign({}, DEFAULT_OPTS, iconObj, {
    platform: plat,
    arch: arch,
    out: 'release/' + plat + '-' + arch
  });

  packager(opts, cb);
}

function log(plat, arch) {
  return function(err, filepath) {
    if (err) return console.error(err);
    console.log(plat + '-' + arch + ' finished!');
  };
}
<commit_msg>Added FileDescription version string to package<commit_after>/* eslint no-shadow: 0, func-names: 0, no-unused-vars: 0, no-console: 0 */
var os = require('os');
var webpack = require('webpack');
var cfg = require('./webpack.config.production.js');
var packager = require('electron-packager');
var assign = require('object-assign');
var del = require('del');
var exec = require('child_process').exec;
var argv = require('minimist')(process.argv.slice(2));
var devDeps = Object.keys(require('./package.json').devDependencies);

var appName = argv.name || argv.n || 'FromScratch';
var shouldUseAsar = argv.asar || argv.a || true;
var shouldBuildAll = argv.all || false;

var DEFAULT_OPTS = {
  dir: './',
  name: appName,
  'version-string': {
    FileDescription: appName,
  },
  asar: shouldUseAsar,
  ignore: [
    '/README.md',
    '/server.js',
    '/webpack.*',
    '/app/mainApp.jsx',
    '/app/containers($|/)',
    '/app/assets/style($|/)',
    '/build($|/)',
    '/test($|/)',
    '/tools($|/)',
    '/release($|/)'
  ].concat(devDeps.map(function(name) { return '/node_modules/' + name + '($|/)'; }))
};

var icon = argv.icon || argv.i || 'build/icon';

if (icon) {
  DEFAULT_OPTS.icon = icon;
}

var version = argv.version || argv.v || "1.4.12";
DEFAULT_OPTS.version = version;
startPack();

function startPack() {
  console.log('start pack...');
  webpack(cfg, function runWebpackBuild(err, stats) {
    if (err) return console.error(err);
    del('release')
    .then(function(paths) {
      if (shouldBuildAll) {
        // build for all platforms
        var archs = ['ia32', 'x64'];
        var platforms = ['linux', 'win32', 'darwin'];

        platforms.forEach(function(plat) {
          archs.forEach(function(arch) {
            pack(plat, arch, log(plat, arch));
          });
        });
      } else {
        // build for current platform only
        pack(os.platform(), os.arch(), log(os.platform(), os.arch()));
      }
    })
    .catch(function(err) {
      console.error(err);
    });
  });
}

function pack(plat, arch, cb) {
  // there is no darwin ia32 electron
  if (plat === 'darwin' && arch === 'ia32') return;

  var iconObj = {
    icon: DEFAULT_OPTS.icon + (() => {
      var extension = '.png';
      if (plat === 'darwin') {
        extension = '.icns';
      } else if (plat === 'win32') {
        extension = '.ico';
      }
      return extension;
    })()
  };

  var opts = assign({}, DEFAULT_OPTS, iconObj, {
    platform: plat,
    arch: arch,
    out: 'release/' + plat + '-' + arch
  });

  packager(opts, cb);
}

function log(plat, arch) {
  return function(err, filepath) {
    if (err) return console.error(err);
    console.log(plat + '-' + arch + ' finished!');
  };
}
<|endoftext|>


<commit_before>Package.describe({
  name: 'toystars:elasticsearch-sync',
  version: '0.0.9',
  // Brief, one-line summary of the package.
  summary: 'ElasticSearch utility wrapper for mongoDB integration and sync',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/toystars/elasticsearch-sync',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md'
});

Npm.depends({
  'mongo-oplog': '1.0.1',
  'elasticsearch': '10.0.1',
  'mongodb': '2.1.16',
  'dot-object': '1.4.1'
});

Package.onUse(function(api) {

  api.versionsFrom('1.2.1');

  api.use([
    'ecmascript',
    'underscore'
  ]);

  api.addFiles([
    'lib/util.js',
    "lib/index.js"
  ], ['server']);

  api.export("ESMongoSync", 'server');
});
<commit_msg>Update library version to 0.1.0<commit_after>Package.describe({
  name: 'toystars:elasticsearch-sync',
  version: '0.1.0',
  // Brief, one-line summary of the package.
  summary: 'ElasticSearch utility wrapper for mongoDB integration and sync',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/toystars/elasticsearch-sync',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md'
});

Npm.depends({
  'mongo-oplog': '1.0.1',
  'elasticsearch': '10.0.1',
  'mongodb': '2.1.16',
  'dot-object': '1.4.1'
});

Package.onUse(function(api) {

  api.versionsFrom('1.2.1');

  api.use([
    'ecmascript',
    'underscore'
  ]);

  api.addFiles([
    'lib/util.js',
    "lib/index.js"
  ], ['server']);

  api.export("ESMongoSync", 'server');
});
<|endoftext|>


<commit_before>Package.describe({
  name: "dburles:collection-helpers",
  summary: "Transform your collections with helpers that you define",
  version: "1.0.3",
  documentation: "README.md",
  git: "https://github.com/dburles/meteor-collection-helpers.git",
});

Package.onUse(function(api) {
  api.versionsFrom('1.2.0.2');
  api.use([
    'underscore',
    'mongo']);

  api.addFiles('collection-helpers.js');
});

Package.onTest(function(api) {
  api.use([
    'tinytest',
    'underscore',
    'mongo',
    'dburles:collection-helpers']);
  api.addFiles('collection-helpers_tests.js');
});
<commit_msg>version bump<commit_after>Package.describe({
  name: "dburles:collection-helpers",
  summary: "Transform your collections with helpers that you define",
  version: "1.0.4",
  documentation: "README.md",
  git: "https://github.com/dburles/meteor-collection-helpers.git",
});

Package.onUse(function(api) {
  api.versionsFrom('1.2.0.2');
  api.use([
    'underscore',
    'mongo']);

  api.addFiles('collection-helpers.js');
});

Package.onTest(function(api) {
  api.use([
    'tinytest',
    'underscore',
    'mongo',
    'dburles:collection-helpers']);
  api.addFiles('collection-helpers_tests.js');
});
<|endoftext|>


<commit_before>'use strict';
Package.describe({
	summary: 'Mailgun API - Mailgun api implementation for Meteor.',
	version: '1.1.0',
	git: 'https://github.com/gfk-ba/meteor-mailgun-api'
});

Npm.depends({
	'mailgun-js': '0.7.0',
	'mkdirp': '0.3.5'
});

Package.onUse(function(api) {
	api.versionsFrom('METEOR@1.0');

	api.add_files('mailgun-api.js', ['server']);

	api.export('Mailgun', ['server']);
});

Package.onTest(function (api) {
	api.use(['gfk:mailgun-api', 'tinytest', 'practicalmeteor:munit@2.1.2'], 'server');

	api.add_files('mailgun-api_tests.js', ['server']);
});
<commit_msg>Bumped mailgun version to 0.7.7<commit_after>'use strict';
Package.describe({
	summary: 'Mailgun API - Mailgun api implementation for Meteor.',
	version: '1.1.0',
	git: 'https://github.com/gfk-ba/meteor-mailgun-api'
});

Npm.depends({
	'mailgun-js': '0.7.7',
	'mkdirp': '0.3.5'
});

Package.onUse(function(api) {
	api.versionsFrom('METEOR@1.0');

	api.add_files('mailgun-api.js', ['server']);

	api.export('Mailgun', ['server']);
});

Package.onTest(function (api) {
	api.use(['gfk:mailgun-api', 'tinytest', 'practicalmeteor:munit@2.1.2'], 'server');

	api.add_files('mailgun-api_tests.js', ['server']);
});
<|endoftext|>


<commit_before>/**
 * Copyright (c) 2015 IBM Corporation
 * Copyright (C) 2011--2015 Meteor Development Group
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 *  without limitation the rights to use, copy, modify, merge, publish,
 *  distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so,
 *  subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

Package.describe({
  name: 'cloudant:couchdb',
  version: '0.0.2',
  // Brief, one-line summary of the package.
  summary: 'Full stack database driver for CouchDB/Cloudant in Meteor',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/cloudant/meteor-couchdb',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md'
});

Npm.depends({
  cloudant: "1.2.0",
  "double-ended-queue": "2.1.0-0",
  "collections": "1.2.2"

});

Package.onUse(function(api) {
  api.versionsFrom('1.2');
  api.use(['random', 'ejson',  'underscore',  'minimongo', 'logging',
           'ddp', 'tracker', 'diff-sequence', 'mongo-id'],
          ['client', 'server']);

  api.use('check', ['client', 'server']);

  // Binary Heap data structure is used to optimize oplog observe driver
  // performance.
  api.use('binary-heap', 'server');

   // Allow us to detect 'insecure'.
  api.use('insecure', {weak: true});

  // Allow us to detect 'autopublish', and publish collections if it's loaded.
  api.use('autopublish', 'server', {weak: true});

   // defaultRemoteCollectionDriver gets its deployConfig from something that is
  // (for questionable reasons) initialized by the webapp package.
  api.use('webapp', 'server', {weak: true});

  // If the facts package is loaded, publish some statistics.
  api.use('facts', 'server', {weak: true});

  api.use('callback-hook', 'server');

  // Stuff that should be exposed via a real API, but we haven't yet.
  api.export('CouchDBInternals', 'server');
  // For tests only.
  api.export('CouchDB');
  api.export('CouchDBTest');

  api.addFiles(['couchdb_driver.js','changes_tailing.js',
                'observe_multiplex.js','changes_observe_driver.js',
                'polling_observe_driver.js','doc_fetcher.js'],
                'server');

  api.addFiles('local_collection_driver.js', ['client', 'server']);
  api.addFiles('remote_collection_driver.js', 'server');
  api.addFiles('collection.js', ['client', 'server']);

});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('check');
  api.use('cloudant:couchdb');
  api.use(['tinytest', 'underscore', 'test-helpers', 'ejson', 'random',
           'ddp', 'base64']);
  api.addFiles('allow_tests.js', ['client', 'server']);
  api.addFiles('doc_fetcher_tests.js', 'server');
  api.addFiles('collection_tests.js', ['client', 'server']);
  api.addFiles('oplog_tests.js', 'server');
  api.addFiles('observe_changes_tests.js', ['client', 'server']);
  api.addFiles('couchdb_livedata_tests.js', ['client', 'server']);
  api.addFiles('callbackloggercouch.js', ['client', 'server']);
});
<commit_msg>bump version to 0.0.3<commit_after>/**
 * Copyright (c) 2015 IBM Corporation
 * Copyright (C) 2011--2015 Meteor Development Group
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 *  without limitation the rights to use, copy, modify, merge, publish,
 *  distribute, sublicense, and/or sell copies of the Software, and to
 *  permit persons to whom the Software is furnished to do so,
 *  subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

Package.describe({
  name: 'cloudant:couchdb',
  version: '0.0.3',
  // Brief, one-line summary of the package.
  summary: 'Full stack database driver for CouchDB/Cloudant in Meteor',
  // URL to the Git repository containing the source code for this package.
  git: 'https://github.com/cloudant/meteor-couchdb',
  // By default, Meteor will default to using README.md for documentation.
  // To avoid submitting documentation, set this field to null.
  documentation: 'README.md'
});

Npm.depends({
  cloudant: "1.2.0",
  "double-ended-queue": "2.1.0-0",
  "collections": "1.2.2"

});

Package.onUse(function(api) {
  api.versionsFrom('1.2');
  api.use(['random', 'ejson',  'underscore',  'minimongo', 'logging',
           'ddp', 'tracker', 'diff-sequence', 'mongo-id'],
          ['client', 'server']);

  api.use('check', ['client', 'server']);

  // Binary Heap data structure is used to optimize oplog observe driver
  // performance.
  api.use('binary-heap', 'server');

   // Allow us to detect 'insecure'.
  api.use('insecure', {weak: true});

  // Allow us to detect 'autopublish', and publish collections if it's loaded.
  api.use('autopublish', 'server', {weak: true});

   // defaultRemoteCollectionDriver gets its deployConfig from something that is
  // (for questionable reasons) initialized by the webapp package.
  api.use('webapp', 'server', {weak: true});

  // If the facts package is loaded, publish some statistics.
  api.use('facts', 'server', {weak: true});

  api.use('callback-hook', 'server');

  // Stuff that should be exposed via a real API, but we haven't yet.
  api.export('CouchDBInternals', 'server');
  // For tests only.
  api.export('CouchDB');
  api.export('CouchDBTest');

  api.addFiles(['couchdb_driver.js','changes_tailing.js',
                'observe_multiplex.js','changes_observe_driver.js',
                'polling_observe_driver.js','doc_fetcher.js'],
                'server');

  api.addFiles('local_collection_driver.js', ['client', 'server']);
  api.addFiles('remote_collection_driver.js', 'server');
  api.addFiles('collection.js', ['client', 'server']);

});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('check');
  api.use('cloudant:couchdb');
  api.use(['tinytest', 'underscore', 'test-helpers', 'ejson', 'random',
           'ddp', 'base64']);
  api.addFiles('allow_tests.js', ['client', 'server']);
  api.addFiles('doc_fetcher_tests.js', 'server');
  api.addFiles('collection_tests.js', ['client', 'server']);
  api.addFiles('oplog_tests.js', 'server');
  api.addFiles('observe_changes_tests.js', ['client', 'server']);
  api.addFiles('couchdb_livedata_tests.js', ['client', 'server']);
  api.addFiles('callbackloggercouch.js', ['client', 'server']);
});
<|endoftext|>


<commit_before>Package.describe({
  name: 'vsivsi:orion-file-collection',
  summary: 'MongoDB gridFS support for orion:filesystem',
  version: '0.1.0',
  git: 'https://github.com/vsivsi/orion-file-collection'
});

Package.onUse(function(api) {
  api.versionsFrom('1.0');

  api.use([
    'orionjs:core@1.0.0',
    'orionjs:filesystem@1.0.1',
    'vsivsi:file-collection@1.1.1'
    ]);

  api.addFiles([
    'index.js'
    ]);

});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('orionjs:filesystem');
});
<commit_msg>Correct name of orionjs<commit_after>Package.describe({
  name: 'vsivsi:orion-file-collection',
  summary: 'MongoDB gridFS support for orionjs:filesystem',
  version: '0.1.0',
  git: 'https://github.com/vsivsi/orion-file-collection'
});

Package.onUse(function(api) {
  api.versionsFrom('1.0');

  api.use([
    'orionjs:core@1.0.0',
    'orionjs:filesystem@1.0.1',
    'vsivsi:file-collection@1.1.1'
    ]);

  api.addFiles([
    'index.js'
    ]);

});

Package.onTest(function(api) {
  api.use('tinytest');
  api.use('orionjs:filesystem');
});
<|endoftext|>


<commit_before>Package.describe({
	name: "hellstad:colourise",
	summary: "Design quicker. Click to change any element's colours!",
	version: "0.1.3",
	git: "https://github.com/hellstad/meteor-colourise",
	debugOnly: true
});

Package.onUse(function(api) {
	api.versionsFrom("1.0.1");
	api.use(["meteor", "ddp", "jquery", "mongo", "templating", "session", "tracker"]);
	api.use(["iron:router@0.9.0"], ["client"], {weak: true});

	serverFiles = [
		"server/colourise.js"
	];

	clientFiles = [
		"client/colourise.css",
		"client/colourise.html",
		"client/colourise.js",
	];

	api.addFiles(serverFiles, "server");
	api.addFiles(clientFiles, "client");

	//api.export("Colourise");
});<commit_msg>change version constraint for router<commit_after>Package.describe({
	name: "hellstad:colourise",
	summary: "Design quicker. Click to change any element's colours!",
	version: "0.1.3",
	git: "https://github.com/hellstad/meteor-colourise",
	debugOnly: true
});

Package.onUse(function(api) {
	api.versionsFrom("1.0.1");
	api.use(["meteor", "ddp", "jquery", "mongo", "templating", "session", "tracker"]);
	api.use(["iron:router@1.0.0"], ["client"], {weak: true});

	serverFiles = [
		"server/colourise.js"
	];

	clientFiles = [
		"client/colourise.css",
		"client/colourise.html",
		"client/colourise.js",
	];

	api.addFiles(serverFiles, "server");
	api.addFiles(clientFiles, "client");

	//api.export("Colourise");
});<|endoftext|>


<commit_before>Package.describe({
  summary: "Speed up multiple inserts by using MongoDB batch insert",
  version: "1.1.0",
  name: "mikowals:batch-insert",
  git: "https://github.com/mikowals/batch-insert.git"
});

Package.onUse( function( api ) {
  api.versionsFrom('METEOR@0.9.3');
  api.use(['mongo', 'underscore']);
  api.addFiles('batch-insert.js');
});

Package.onTest( function( api ) {
  api.use(['tinytest','test-helpers', 'random', 'mongo']);
  api.use('mikowals:batch-insert');
  api.addFiles('batch-insert-tests.js');
});
<commit_msg>push changes to package description<commit_after>Package.describe({
  summary: "Insert multiple documents to mongo collection with one db call.",
  version: "1.1.0",
  name: "mikowals:batch-insert",
  git: "https://github.com/mikowals/batch-insert.git"
});

Package.onUse( function( api ) {
  api.versionsFrom('METEOR@0.9.3');
  api.use(['mongo', 'underscore']);
  api.addFiles('batch-insert.js');
});

Package.onTest( function( api ) {
  api.use(['tinytest','test-helpers', 'random', 'mongo']);
  api.use('mikowals:batch-insert');
  api.addFiles('batch-insert-tests.js');
});
<|endoftext|>


<commit_before>Package.describe({
  git: 'https://github.com/zimme/meteor-iron-router-active.git',
  name: 'zimme:iron-router-active',
  summary: 'Active route/path template helpers for iron:router',
  version: '0.3.0-pre.1'
});

Package.onUse(function(api) {
  api.versionsFrom('0.9.4');

  api.use([
    'check',
    'coffeescript',
    'templating',
    'underscore'
  ]);

  api.use([
    'iron:router@0.9.4',
    'wizonesolutions:underscore-string@1.0.0'
  ]);

  api.addFiles('client/helpers.coffee', 'client');
});
<commit_msg>Version bump<commit_after>Package.describe({
  git: 'https://github.com/zimme/meteor-iron-router-active.git',
  name: 'zimme:iron-router-active',
  summary: 'Active route/path template helpers for iron:router',
  version: '0.3.0'
});

Package.onUse(function(api) {
  api.versionsFrom('0.9.4');

  api.use([
    'check',
    'coffeescript',
    'templating',
    'underscore'
  ]);

  api.use([
    'iron:router@0.9.4',
    'wizonesolutions:underscore-string@1.0.0'
  ]);

  api.addFiles('client/helpers.coffee', 'client');
});
<|endoftext|>


<commit_before>/**
 * This file is referenced by the `dojoBuild` key in `package.json` and provides extra hinting specific to the Dojo
 * build system about how certain files in the package need to be handled at build time. Build profiles for the
 * application itself are stored in the `profiles` directory.
 */

var profile = (function() {
	var excludes = {
		'Gruntfile': 1,
		'package': 1
	};
  return {
    // Resource tags are functions that provide hints to the build system about the way files should be processed.
    // Each of these functions is called once for every file in the package directory. The first argument passed to
    // the function is the filename of the file, and the second argument is the computed AMD module ID of the file.
    resourceTags: {
      // Files that contain test code and should be excluded when the `copyTests` build flag exists and is `false`.
      // It is strongly recommended that the `mini` build flag be used instead of `copyTests`. Therefore, no files
      // are marked with the `test` tag here.
      test: function(filename, mid) {
        return false;
      },

      // Files that should be copied as-is without being modified by the build system.
      // All files in the `app/resources` directory that are not CSS files are marked as copy-only, since these files
      // are typically binaries (images, etc.) and may be corrupted by the build system if it attempts to process
      // them and naively assumes they are scripts.
      copyOnly: function(filename, mid) {
        return (/\/(images)\//.test(mid) && !/\.css$/.test(filename)) ||
          /\/node_modules\//.test(mid) ||
					filename in excludes;
      },

      // Files that are AMD modules.
      // All JavaScript in this package should be AMD modules if you are starting a new project. If you are copying
      // any legacy scripts from an existing project, those legacy scripts should not be given the `amd` tag.
      amd: function(filename, mid) {
        return !this.copyOnly(filename, mid) && /\.js$/.test(filename);
      },

      // Files that should not be copied when the `mini` build flag is set to true.
      // In this case, we are excluding this package configuration file which is not necessary in a built copy of
      // the application.
      miniExclude: function(filename, mid) {
        return filename in excludes;
      }
    }
  };
})();
<commit_msg>Add more rules to the package.js<commit_after>/**
 * This file is referenced by the `dojoBuild` key in `package.json` and provides extra hinting specific to the Dojo
 * build system about how certain files in the package need to be handled at build time. Build profiles for the
 * application itself are stored in the `profiles` directory.
 */

var profile = (function() {
	//only copy files matching these expressions
	//this prevents them from being evaluated as amd modules
  var reCopyOnly = [
    /Gruntfile/,
    /package/
  ];
	//exclude from builds completely
	var reMiniExclude = [
	    /Gruntfile/,
	    /package/
	];
  //non-amd modules
  var reNonAmd = [
    /plugins\/Google/
  ];
  return {
    // Resource tags are functions that provide hints to the build system about the way files should be processed.
    // Each of these functions is called once for every file in the package directory. The first argument passed to
    // the function is the filename of the file, and the second argument is the computed AMD module ID of the file.
    resourceTags: {
      // Files that contain test code and should be excluded when the `copyTests` build flag exists and is `false`.
      // It is strongly recommended that the `mini` build flag be used instead of `copyTests`. Therefore, no files
      // are marked with the `test` tag here.
      test: function(filename, mid) {
        return false;
      },

      // Files that should be copied as-is without being modified by the build system.
      // All files in the `app/resources` directory that are not CSS files are marked as copy-only, since these files
      // are typically binaries (images, etc.) and may be corrupted by the build system if it attempts to process
      // them and naively assumes they are scripts.
      copyOnly: function(filename, mid) {
        for (var i = 0; i < reCopyOnly.length; i++) {
          if (reCopyOnly[i].test(filename)) {
            return true;
          }
        }
        return (/\/(images)\//.test(mid) && !/\.css$/.test(filename)) ||
          /\/node_modules\//.test(mid);
      },

      // Files that are AMD modules.
      // All JavaScript in this package should be AMD modules if you are starting a new project. If you are copying
      // any legacy scripts from an existing project, those legacy scripts should not be given the `amd` tag.
      amd: function(filename, mid) {
        for (var i = 0; i < reNonAmd.length; i++) {
          if (reNonAmd[i].test(filename)) {
            return false;
          }
        }
        return !this.copyOnly(filename, mid) && /\.js$/.test(filename);
      },

      // Files that should not be copied when the `mini` build flag is set to true.
      // In this case, we are excluding this package configuration file which is not necessary in a built copy of
      // the application.
      miniExclude: function(filename, mid) {
				for (var i = 0; i < reMiniExclude.length; i++) {
					if (reMiniExclude[i].test(filename)) {
						return true;
					}
				}
        return false;
      }
    }
  };
})();
<|endoftext|>


<commit_before>Package.describe({
  name: "aldeed:autoform",
  summary: "Easily create forms with automatic insert and update, and automatic reactive validation.",
  git: "https://github.com/gregory/meteor-autoform.git",
  version: "5.8.1"
});

Package.onUse(function(api) {
  // Dependencies
  api.versionsFrom(['METEOR@0.9.3', 'METEOR@0.9.4', 'METEOR@1.0']);
  // common
  api.use('aldeed:simple-schema@1.1.0');
  api.use('check');
  // client
  api.use(['livedata', 'underscore', 'deps', 'templating', 'ui', 'blaze', 'ejson', 'reactive-var', 'reactive-dict', 'random', 'jquery'], 'client');
  api.use('momentjs:moment@2.10.6', 'client');
  api.use('mrt:moment-timezone@0.2.1', 'client', {weak: true});
  api.use('aldeed:moment-timezone@0.4.0', 'client', {weak: true});
  api.use(['aldeed:collection2@2.0.0', 'reload'], 'client', {weak: true});

  // Imply SS to make sure SimpleSchema object is available to app
  api.imply('aldeed:simple-schema');

  // Exports
  api.export('AutoForm', 'client');
  api.add_files(['utility.js']);
  api.export('Utility', ['client', 'server']);

  // Common Files
  api.addFiles(['autoform-common.js']);

  // Client Files
  api.addFiles([
    // utilities and general init
    'utility.js',
    'form-preserve.js',
    'autoform-hooks.js',
    'autoform-formdata.js',
    'autoform-arrays.js',
    'autoform.js',
    // global helpers
    'autoform-helpers.js',
    // validation
    'autoform-validation.js',
    // inputs
    'autoform-inputs.js',
    // public API
    'autoform-api.js',
    // form types
    'formTypes/insert.js',
    'formTypes/update.js',
    'formTypes/update-pushArray.js',
    'formTypes/method.js',
    'formTypes/method-update.js',
    'formTypes/normal.js',
    'formTypes/readonly.js',
    'formTypes/disabled.js',
    // input types
    'inputTypes/value-converters.js',
    'inputTypes/boolean-checkbox/boolean-checkbox.html',
    'inputTypes/boolean-checkbox/boolean-checkbox.js',
    'inputTypes/boolean-radios/boolean-radios.html',
    'inputTypes/boolean-radios/boolean-radios.js',
    'inputTypes/boolean-select/boolean-select.html',
    'inputTypes/boolean-select/boolean-select.js',
    'inputTypes/button/button.html',
    'inputTypes/button/button.js',
    'inputTypes/color/color.html',
    'inputTypes/color/color.js',
    'inputTypes/contenteditable/contenteditable.html',
    'inputTypes/contenteditable/contenteditable.js',
    'inputTypes/date/date.html',
    'inputTypes/date/date.js',
    'inputTypes/datetime/datetime.html',
    'inputTypes/datetime/datetime.js',
    'inputTypes/datetime-local/datetime-local.html',
    'inputTypes/datetime-local/datetime-local.js',
    'inputTypes/email/email.html',
    'inputTypes/email/email.js',
    'inputTypes/file/file.html',
    'inputTypes/file/file.js',
    'inputTypes/hidden/hidden.html',
    'inputTypes/hidden/hidden.js',
    'inputTypes/image/image.html',
    'inputTypes/image/image.js',
    'inputTypes/month/month.html',
    'inputTypes/month/month.js',
    'inputTypes/number/number.html',
    'inputTypes/number/number.js',
    'inputTypes/password/password.html',
    'inputTypes/password/password.js',
    'inputTypes/radio/radio.html',
    'inputTypes/radio/radio.js',
    'inputTypes/range/range.html',
    'inputTypes/range/range.js',
    'inputTypes/reset/reset.html',
    'inputTypes/reset/reset.js',
    'inputTypes/search/search.html',
    'inputTypes/search/search.js',
    'inputTypes/select/select.html',
    'inputTypes/select/select.js',
    'inputTypes/select-checkbox/select-checkbox.html',
    'inputTypes/select-checkbox/select-checkbox.js',
    'inputTypes/select-checkbox-inline/select-checkbox-inline.html',
    'inputTypes/select-checkbox-inline/select-checkbox-inline.js',
    'inputTypes/select-multiple/select-multiple.html',
    'inputTypes/select-multiple/select-multiple.js',
    'inputTypes/select-radio/select-radio.html',
    'inputTypes/select-radio/select-radio.js',
    'inputTypes/select-radio-inline/select-radio-inline.html',
    'inputTypes/select-radio-inline/select-radio-inline.js',
    'inputTypes/submit/submit.html',
    'inputTypes/submit/submit.js',
    'inputTypes/tel/tel.html',
    'inputTypes/tel/tel.js',
    'inputTypes/text/text.html',
    'inputTypes/text/text.js',
    'inputTypes/textarea/textarea.html',
    'inputTypes/textarea/textarea.js',
    'inputTypes/time/time.html',
    'inputTypes/time/time.js',
    'inputTypes/url/url.html',
    'inputTypes/url/url.js',
    'inputTypes/week/week.html',
    'inputTypes/week/week.js',
    // components that render a form
    'components/autoForm/autoForm.html',
    'components/autoForm/autoForm.js',
    'components/quickForm/quickForm.html',
    'components/quickForm/quickForm.js',
    // components that render controls within a form
    'components/afArrayField/afArrayField.html',
    'components/afArrayField/afArrayField.js',
    'components/afEachArrayItem/afEachArrayItem.html',
    'components/afEachArrayItem/afEachArrayItem.js',
    'components/afFieldInput/afFieldInput.html',
    'components/afFieldInput/afFieldInput.js',
    'components/afFormGroup/afFormGroup.html',
    'components/afFormGroup/afFormGroup.js',
    'components/afObjectField/afObjectField.html',
    'components/afObjectField/afObjectField.js',
    'components/afQuickField/afQuickField.html',
    'components/afQuickField/afQuickField.js',
    'components/afQuickFields/afQuickFields.html',
    'components/afQuickFields/afQuickFields.js',
    // event handling
    'autoform-events.js',
    // bootstrap3 Template - General
    'templates/bootstrap3/bootstrap3.js',
    // bootstrap3 Template - Components
    'templates/bootstrap3/components/quickForm/quickForm.html',
    'templates/bootstrap3/components/quickForm/quickForm.js',
    'templates/bootstrap3/components/afArrayField/afArrayField.html',
    'templates/bootstrap3/components/afArrayField/afArrayField.css',
    'templates/bootstrap3/components/afFormGroup/afFormGroup.html',
    'templates/bootstrap3/components/afFormGroup/afFormGroup.js',
    'templates/bootstrap3/components/afObjectField/afObjectField.html',
    'templates/bootstrap3/components/afObjectField/afObjectField.js',
    // bootstrap3 Template - Input Types
    'templates/bootstrap3/inputTypes/boolean-checkbox/boolean-checkbox.html',
    'templates/bootstrap3/inputTypes/boolean-radios/boolean-radios.html',
    'templates/bootstrap3/inputTypes/boolean-radios/boolean-radios.js',
    'templates/bootstrap3/inputTypes/boolean-select/boolean-select.html',
    'templates/bootstrap3/inputTypes/button/button.html',
    'templates/bootstrap3/inputTypes/color/color.html',
    'templates/bootstrap3/inputTypes/date/date.html',
    'templates/bootstrap3/inputTypes/datetime/datetime.html',
    'templates/bootstrap3/inputTypes/datetime-local/datetime-local.html',
    'templates/bootstrap3/inputTypes/email/email.html',
    'templates/bootstrap3/inputTypes/month/month.html',
    'templates/bootstrap3/inputTypes/number/number.html',
    'templates/bootstrap3/inputTypes/password/password.html',
    'templates/bootstrap3/inputTypes/radio/radio.html',
    'templates/bootstrap3/inputTypes/radio/radio.js',
    'templates/bootstrap3/inputTypes/range/range.html',
    'templates/bootstrap3/inputTypes/reset/reset.html',
    'templates/bootstrap3/inputTypes/search/search.html',
    'templates/bootstrap3/inputTypes/select/select.html',
    'templates/bootstrap3/inputTypes/select-checkbox/select-checkbox.html',
    'templates/bootstrap3/inputTypes/select-checkbox/select-checkbox.js',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.html',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.js',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.css',
    'templates/bootstrap3/inputTypes/select-multiple/select-multiple.html',
    'templates/bootstrap3/inputTypes/select-radio/select-radio.html',
    'templates/bootstrap3/inputTypes/select-radio/select-radio.js',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.html',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.js',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.css',
    'templates/bootstrap3/inputTypes/submit/submit.html',
    'templates/bootstrap3/inputTypes/tel/tel.html',
    'templates/bootstrap3/inputTypes/text/text.html',
    'templates/bootstrap3/inputTypes/textarea/textarea.html',
    'templates/bootstrap3/inputTypes/time/time.html',
    'templates/bootstrap3/inputTypes/url/url.html',
    'templates/bootstrap3/inputTypes/week/week.html',
    // bootstrap3-horizontal Template - General
    'templates/bootstrap3-horizontal/bootstrap3-horizontal.css',
    // bootstrap3-horizontal Template - Components
    'templates/bootstrap3-horizontal/components/quickForm/quickForm.html',
    'templates/bootstrap3-horizontal/components/quickForm/quickForm.js',
    'templates/bootstrap3-horizontal/components/afArrayField/afArrayField.html',
    'templates/bootstrap3-horizontal/components/afArrayField/afArrayField.js',
    'templates/bootstrap3-horizontal/components/afFormGroup/afFormGroup.html',
    'templates/bootstrap3-horizontal/components/afFormGroup/afFormGroup.js',
    'templates/bootstrap3-horizontal/components/afObjectField/afObjectField.html',
    'templates/bootstrap3-horizontal/components/afObjectField/afObjectField.js',
    // bootstrap3-horizontal Template - Input Types
    'templates/bootstrap3-horizontal/inputTypes/boolean-checkbox/boolean-checkbox.html',
    'templates/bootstrap3-horizontal/inputTypes/boolean-checkbox/boolean-checkbox.js',
    // bootstrap3-inline Template
    'templates/bootstrap3-inline/bootstrap3-inline.html',
    'templates/bootstrap3-inline/bootstrap3-inline.js',
    'templates/bootstrap3-inline/bootstrap3-inline.css',
    // plain Template
    'templates/plain/components/quickForm/quickForm.html',
    'templates/plain/components/quickForm/quickForm.js',
    'templates/plain/components/afArrayField/afArrayField.html',
    'templates/plain/components/afFormGroup/afFormGroup.html',
    'templates/plain/components/afObjectField/afObjectField.html',
    'templates/plain/components/afObjectField/afObjectField.js',
    // plain-fieldset Template
    'templates/plain-fieldset/plain-fieldset.html',
    'templates/plain-fieldset/plain-fieldset.js',
  ], 'client');
});

Package.onTest(function (api) {
  api.use(['aldeed:autoform', 'tinytest', 'underscore', 'mongo']);
  api.use('momentjs:moment', 'client');
  api.addFiles(['tests/utility-tests.js', 'tests/autoform-tests.js']);
});
<commit_msg>remove duplicate utility file<commit_after>Package.describe({
  name: "aldeed:autoform",
  summary: "Easily create forms with automatic insert and update, and automatic reactive validation.",
  git: "https://github.com/gregory/meteor-autoform.git",
  version: "5.8.1"
});

Package.onUse(function(api) {
  // Dependencies
  api.versionsFrom(['METEOR@0.9.3', 'METEOR@0.9.4', 'METEOR@1.0']);
  // common
  api.use('aldeed:simple-schema@1.1.0');
  api.use('check');
  // client
  api.use(['livedata', 'underscore', 'deps', 'templating', 'ui', 'blaze', 'ejson', 'reactive-var', 'reactive-dict', 'random', 'jquery'], 'client');
  api.use('momentjs:moment@2.10.6', 'client');
  api.use('mrt:moment-timezone@0.2.1', 'client', {weak: true});
  api.use('aldeed:moment-timezone@0.4.0', 'client', {weak: true});
  api.use(['aldeed:collection2@2.0.0', 'reload'], 'client', {weak: true});

  // Imply SS to make sure SimpleSchema object is available to app
  api.imply('aldeed:simple-schema');

  // Exports
  api.export('AutoForm', 'client');
  api.export('Utility', ['client', 'server']);

  // Common Files
  api.addFiles(['autoform-common.js']);

  // Client Files
  api.addFiles([
    // utilities and general init
    'utility.js',
    'form-preserve.js',
    'autoform-hooks.js',
    'autoform-formdata.js',
    'autoform-arrays.js',
    'autoform.js',
    // global helpers
    'autoform-helpers.js',
    // validation
    'autoform-validation.js',
    // inputs
    'autoform-inputs.js',
    // public API
    'autoform-api.js',
    // form types
    'formTypes/insert.js',
    'formTypes/update.js',
    'formTypes/update-pushArray.js',
    'formTypes/method.js',
    'formTypes/method-update.js',
    'formTypes/normal.js',
    'formTypes/readonly.js',
    'formTypes/disabled.js',
    // input types
    'inputTypes/value-converters.js',
    'inputTypes/boolean-checkbox/boolean-checkbox.html',
    'inputTypes/boolean-checkbox/boolean-checkbox.js',
    'inputTypes/boolean-radios/boolean-radios.html',
    'inputTypes/boolean-radios/boolean-radios.js',
    'inputTypes/boolean-select/boolean-select.html',
    'inputTypes/boolean-select/boolean-select.js',
    'inputTypes/button/button.html',
    'inputTypes/button/button.js',
    'inputTypes/color/color.html',
    'inputTypes/color/color.js',
    'inputTypes/contenteditable/contenteditable.html',
    'inputTypes/contenteditable/contenteditable.js',
    'inputTypes/date/date.html',
    'inputTypes/date/date.js',
    'inputTypes/datetime/datetime.html',
    'inputTypes/datetime/datetime.js',
    'inputTypes/datetime-local/datetime-local.html',
    'inputTypes/datetime-local/datetime-local.js',
    'inputTypes/email/email.html',
    'inputTypes/email/email.js',
    'inputTypes/file/file.html',
    'inputTypes/file/file.js',
    'inputTypes/hidden/hidden.html',
    'inputTypes/hidden/hidden.js',
    'inputTypes/image/image.html',
    'inputTypes/image/image.js',
    'inputTypes/month/month.html',
    'inputTypes/month/month.js',
    'inputTypes/number/number.html',
    'inputTypes/number/number.js',
    'inputTypes/password/password.html',
    'inputTypes/password/password.js',
    'inputTypes/radio/radio.html',
    'inputTypes/radio/radio.js',
    'inputTypes/range/range.html',
    'inputTypes/range/range.js',
    'inputTypes/reset/reset.html',
    'inputTypes/reset/reset.js',
    'inputTypes/search/search.html',
    'inputTypes/search/search.js',
    'inputTypes/select/select.html',
    'inputTypes/select/select.js',
    'inputTypes/select-checkbox/select-checkbox.html',
    'inputTypes/select-checkbox/select-checkbox.js',
    'inputTypes/select-checkbox-inline/select-checkbox-inline.html',
    'inputTypes/select-checkbox-inline/select-checkbox-inline.js',
    'inputTypes/select-multiple/select-multiple.html',
    'inputTypes/select-multiple/select-multiple.js',
    'inputTypes/select-radio/select-radio.html',
    'inputTypes/select-radio/select-radio.js',
    'inputTypes/select-radio-inline/select-radio-inline.html',
    'inputTypes/select-radio-inline/select-radio-inline.js',
    'inputTypes/submit/submit.html',
    'inputTypes/submit/submit.js',
    'inputTypes/tel/tel.html',
    'inputTypes/tel/tel.js',
    'inputTypes/text/text.html',
    'inputTypes/text/text.js',
    'inputTypes/textarea/textarea.html',
    'inputTypes/textarea/textarea.js',
    'inputTypes/time/time.html',
    'inputTypes/time/time.js',
    'inputTypes/url/url.html',
    'inputTypes/url/url.js',
    'inputTypes/week/week.html',
    'inputTypes/week/week.js',
    // components that render a form
    'components/autoForm/autoForm.html',
    'components/autoForm/autoForm.js',
    'components/quickForm/quickForm.html',
    'components/quickForm/quickForm.js',
    // components that render controls within a form
    'components/afArrayField/afArrayField.html',
    'components/afArrayField/afArrayField.js',
    'components/afEachArrayItem/afEachArrayItem.html',
    'components/afEachArrayItem/afEachArrayItem.js',
    'components/afFieldInput/afFieldInput.html',
    'components/afFieldInput/afFieldInput.js',
    'components/afFormGroup/afFormGroup.html',
    'components/afFormGroup/afFormGroup.js',
    'components/afObjectField/afObjectField.html',
    'components/afObjectField/afObjectField.js',
    'components/afQuickField/afQuickField.html',
    'components/afQuickField/afQuickField.js',
    'components/afQuickFields/afQuickFields.html',
    'components/afQuickFields/afQuickFields.js',
    // event handling
    'autoform-events.js',
    // bootstrap3 Template - General
    'templates/bootstrap3/bootstrap3.js',
    // bootstrap3 Template - Components
    'templates/bootstrap3/components/quickForm/quickForm.html',
    'templates/bootstrap3/components/quickForm/quickForm.js',
    'templates/bootstrap3/components/afArrayField/afArrayField.html',
    'templates/bootstrap3/components/afArrayField/afArrayField.css',
    'templates/bootstrap3/components/afFormGroup/afFormGroup.html',
    'templates/bootstrap3/components/afFormGroup/afFormGroup.js',
    'templates/bootstrap3/components/afObjectField/afObjectField.html',
    'templates/bootstrap3/components/afObjectField/afObjectField.js',
    // bootstrap3 Template - Input Types
    'templates/bootstrap3/inputTypes/boolean-checkbox/boolean-checkbox.html',
    'templates/bootstrap3/inputTypes/boolean-radios/boolean-radios.html',
    'templates/bootstrap3/inputTypes/boolean-radios/boolean-radios.js',
    'templates/bootstrap3/inputTypes/boolean-select/boolean-select.html',
    'templates/bootstrap3/inputTypes/button/button.html',
    'templates/bootstrap3/inputTypes/color/color.html',
    'templates/bootstrap3/inputTypes/date/date.html',
    'templates/bootstrap3/inputTypes/datetime/datetime.html',
    'templates/bootstrap3/inputTypes/datetime-local/datetime-local.html',
    'templates/bootstrap3/inputTypes/email/email.html',
    'templates/bootstrap3/inputTypes/month/month.html',
    'templates/bootstrap3/inputTypes/number/number.html',
    'templates/bootstrap3/inputTypes/password/password.html',
    'templates/bootstrap3/inputTypes/radio/radio.html',
    'templates/bootstrap3/inputTypes/radio/radio.js',
    'templates/bootstrap3/inputTypes/range/range.html',
    'templates/bootstrap3/inputTypes/reset/reset.html',
    'templates/bootstrap3/inputTypes/search/search.html',
    'templates/bootstrap3/inputTypes/select/select.html',
    'templates/bootstrap3/inputTypes/select-checkbox/select-checkbox.html',
    'templates/bootstrap3/inputTypes/select-checkbox/select-checkbox.js',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.html',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.js',
    'templates/bootstrap3/inputTypes/select-checkbox-inline/select-checkbox-inline.css',
    'templates/bootstrap3/inputTypes/select-multiple/select-multiple.html',
    'templates/bootstrap3/inputTypes/select-radio/select-radio.html',
    'templates/bootstrap3/inputTypes/select-radio/select-radio.js',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.html',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.js',
    'templates/bootstrap3/inputTypes/select-radio-inline/select-radio-inline.css',
    'templates/bootstrap3/inputTypes/submit/submit.html',
    'templates/bootstrap3/inputTypes/tel/tel.html',
    'templates/bootstrap3/inputTypes/text/text.html',
    'templates/bootstrap3/inputTypes/textarea/textarea.html',
    'templates/bootstrap3/inputTypes/time/time.html',
    'templates/bootstrap3/inputTypes/url/url.html',
    'templates/bootstrap3/inputTypes/week/week.html',
    // bootstrap3-horizontal Template - General
    'templates/bootstrap3-horizontal/bootstrap3-horizontal.css',
    // bootstrap3-horizontal Template - Components
    'templates/bootstrap3-horizontal/components/quickForm/quickForm.html',
    'templates/bootstrap3-horizontal/components/quickForm/quickForm.js',
    'templates/bootstrap3-horizontal/components/afArrayField/afArrayField.html',
    'templates/bootstrap3-horizontal/components/afArrayField/afArrayField.js',
    'templates/bootstrap3-horizontal/components/afFormGroup/afFormGroup.html',
    'templates/bootstrap3-horizontal/components/afFormGroup/afFormGroup.js',
    'templates/bootstrap3-horizontal/components/afObjectField/afObjectField.html',
    'templates/bootstrap3-horizontal/components/afObjectField/afObjectField.js',
    // bootstrap3-horizontal Template - Input Types
    'templates/bootstrap3-horizontal/inputTypes/boolean-checkbox/boolean-checkbox.html',
    'templates/bootstrap3-horizontal/inputTypes/boolean-checkbox/boolean-checkbox.js',
    // bootstrap3-inline Template
    'templates/bootstrap3-inline/bootstrap3-inline.html',
    'templates/bootstrap3-inline/bootstrap3-inline.js',
    'templates/bootstrap3-inline/bootstrap3-inline.css',
    // plain Template
    'templates/plain/components/quickForm/quickForm.html',
    'templates/plain/components/quickForm/quickForm.js',
    'templates/plain/components/afArrayField/afArrayField.html',
    'templates/plain/components/afFormGroup/afFormGroup.html',
    'templates/plain/components/afObjectField/afObjectField.html',
    'templates/plain/components/afObjectField/afObjectField.js',
    // plain-fieldset Template
    'templates/plain-fieldset/plain-fieldset.html',
    'templates/plain-fieldset/plain-fieldset.js',
  ], 'client');
});

Package.onTest(function (api) {
  api.use(['aldeed:autoform', 'tinytest', 'underscore', 'mongo']);
  api.use('momentjs:moment', 'client');
  api.addFiles(['tests/utility-tests.js', 'tests/autoform-tests.js']);
});
<|endoftext|>