VimUnDor6R\. m7kJ* |]****N7_MzRequire graph builder.5_M~Module graph builder.5_MModule graph builder. 5_M Module graph builder. 5_ M5_  M ```sh5_ M  sh5_ M  5_  M Run `gra 5_  M 5_ M Run `gra5_ M  Run `graphquire` command on the 5_ M ,Run `graphquire` command on the package.json5_ -M -Run `graphquire` command on the `package.json5_ /M /Run `graphquire` command on the `package.json` 5_ 4M 4Run `graphquire` command on the `package.json` file.5_ 9M BRun `graphquire` command on the `package.json` file of js package.5_M5_$vM'55_4vM.55${ "name": "pckg1", "cachePath": "./node_modules",- "path": "test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1", "path": "./index.js", "requirements": {- "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": { "id": "http!foo.org/a.js",/ "path": "node_modules/http!foo.org/a.js",# "uri": "http://foo.org/a.js", "requirements": {0 "./nested/b": "http!foo.org/nested/b.js" } },! "http!foo.org/nested/b.js": {' "id": "http!foo.org/nested/b.js",6 "path": "node_modules/http!foo.org/nested/b.js",* "uri": "http://foo.org/nested/b.js", "requirements": {- "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": { "id": "http!bar.org/c.js",/ "path": "node_modules/http!bar.org/c.js",# "uri": "http://bar.org/c.js", "requirements": {} } }}5_4vM25%This will give output like following:5_54vMW55_64vMZ55_64vMf5If http!5_6 4vMg5 If `http!5_ 64vMl5 If `http!` 5_! 64vMr5#If module requires modules `http!` 5_ "!64vMu56,If module requires modules starting `http!` 5_!#"54vMw455_"$#4vMz4Module graph builder.5_#%$4vM|4Module graph builder.5_$&%<4vMFModule graph builder. This tool may be used to build module dependecy 5_%'&G4vM4GModule graph builder. This tool may be used to build module dependency 5_&('L4vMstarting form package4LModule graph builder. This tool may be used to build module dependency graph5_')(5vM5starting form package''5_(*)5vM5starting form package's 5_)+*$5vM5$starting form package's main module.5_*,+6vM 1. Relative: `require65_+-,8vM8 1. Relative: `require()5_,.-$8vM 8$ 1. Relative: `require('./foo/bar')5_-/.28vM 83 1. Relative: `require('./foo/bar')` or `require()5_.0/;8vM 8; 1. Relative: `require('./foo/bar')` or `require('../baz')5_/10;8vM  9  85_0219vM  9 2. 5_1329vM  9< 1. Relative: `require('./foo/bar')` or `require('../baz')`5_243:vM ! :5_354;vM & ;2 `require('./foo/bar')` or `require('../baz')`5_465<vM ; < `require('./foo/bar')`5_5763<vM C <4 `require('./foo/bar')` equivalent of `require()5_687=<vM H <= `require('./foo/bar')` equivalent of `require('foo/bar')5_798 <vM L =  <5_8:9 =vM Q = `require()5_9;: =vM \ = `require('http!foo.org/bar)5_:<; !=vM ` =! `require('http!foo.org/bar')5_;=<=vM c >  =5_<>= >vM g > `require()5_=?> >vM n  > `require('./bla.js')5_>@? >vM o > `require('./bla.js')`5_?A@ >vM u ?  >5_@BA?vM z ? `require()5_ACB$?vM  ?$ `require('https!bla.org/baz.js)5_BDC?vM @?5_CED@vM @ Notice ''5_DFEAvM ANotice `http!` prefix 5_EGFAvM Amodules:5_FHG AvM A module ids.5_GIH"AvM A"Notice `http!` prefix in absolute 5_HJI,AvM A-Notice `http!` prefix in absolute id ? That''5_IKJBvM This makes packages absolete 5_JLK vM!BThis makes packages obsolete 5_KMLvM!B"This makes idea packages obsolete 5_LOMvM!BThis makes packages obsolete 5_MPNO*vM!'B3This makes packages and it's dependencies obsolete 5_OQPvM!-BThis makes packages obsolete 5_PRQOvM!DBPNotice `http!` prefix in absolute id ? That's a way to define remote dependency.5_QSRvM!GC dependencies.This makes packages obsolete,CThis makes packages obsolete,5_RTS+!(vM!QB+dependencies. This makes packages obsolete,5_SUT!(vM!Dof nested dependencies 5_TVU !(vM!Dby nested dependencies 5_UWV !(vM!Dby introduceing dependencies 5_VXW!(vM!Dby introducing dependencies 5_WYX#!(vM!D#by introducing nested dependencies 5_XZY#!(vM!D#by introducing nested dependencies.5_Y[Z0!(vM!!(vM&TV?[another package](./test/fixtures/pckg2/package.json) and you''5_X !(vM&eWnon-cached modules 5_X!(vM&lWnon-cached absolute modules 5_Y!(vM&Xsource of the module.5_Y!(vM&Xmodule source of the module.5_Y!(vM&Xmodule source.5_00SvM^[/S6/1Y$ { "name": "pckg1",$ "cachePath": "./node_modules",1 "path": "test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1", "path": "./index.js", "requirements": {1 "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": {$ "id": "http!foo.org/a.js",3 "path": "node_modules/http!foo.org/a.js",' "uri": "http://foo.org/a.js", "requirements": {4 "./nested/b": "http!foo.org/nested/b.js" } },% "http!foo.org/nested/b.js": {+ "id": "http!foo.org/nested/b.js",: "path": "node_modules/http!foo.org/nested/b.js",. "uri": "http://foo.org/nested/b.js", "requirements": {1 "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": {$ "id": "http!bar.org/c.js",3 "path": "node_modules/http!bar.org/c.js",' "uri": "http://bar.org/c.js", "requirements": {} } } }5_0R0vM^_/SY#{ "name": "pckg1", "cachePath": "./node_modules",S "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1", "path": "./index.js", "requirements": {- "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": { "id": "http!foo.org/a.js",/ "path": "node_modules/http!foo.org/a.js",# "uri": "http://foo.org/a.js", "requirements": {0 "./nested/b": "http!foo.org/nested/b.js" } },! "http!foo.org/nested/b.js": {' "id": "http!foo.org/nested/b.js",6 "path": "node_modules/http!foo.org/nested/b.js",* "uri": "http://foo.org/nested/b.js", "requirements": {- "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": { "id": "http!bar.org/c.js",/ "path": "node_modules/http!bar.org/c.js"," "uri": "http://bar.org/c.js" } }}5_SR0vM^fRTY 5_Y R0vMm] YY5_^R0vMm(]T https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_^R0vMm,]W grahttps://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_^,, v Mm6]_ graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_,, v M^ 1. Relative:5_,, v M ^ `require('./foo/bar')`5_ ,, v M ^ `require('./bla.js')`5_ ,, v M ^ `require('../baz')`5_ ,, v M ^ 2. Absolute:5_ ",, v M ^" `require('http!foo.org/bar')`5_%,, v M ^% `require('https!bla.org/baz.js)`5_',, v M ^' `require('https!bla.org/baz.js)` 5_ ,, v M ^ `require('../baz')` 5_^,, v M'_aAnd you^ ^5_`,, v M-bc_ And you''5_,, v M75_ccvM<b){ "name": "pckg2", "version": "0.0.1",9 "description": "test package with remote dependencies", "cachePath": "./node_modules",a "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "modules": { "pckg2": {\ "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",Y "id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n", "requirements": {| "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },@ "https!github.com/Gozala/models/raw/master/lib/models.js": {F "id": "https!github.com/Gozala/models/raw/master/lib/models.js",U "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",I "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", E "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true, eqnull: true */\n/*global define: true */\n\n(typeof define === \"undefined\" ? function ($) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n", "requirements": {M "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },@ "https!github.com/Gozala/models/raw/master/lib/events.js": {F "id": "https!github.com/Gozala/models/raw/master/lib/events.js",U "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",I "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint newcap: true undef: true es5: true node: true devel: true\n forin: true */\n/*global define: true */\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nvar Extendable = require(\"./extendables\").Extendable;\nvar isArray = Array.isArray;\n\n// By default EventEmitters will print a warning if more than\n// 10 listeners are added to it. This is a useful default which\n// helps finding memory leaks.\n//\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nvar MAX_LISTENERS = 10;\nvar ERROR_TYEPE = 'error';\n\nexports.EventEmitter = Extendable.extend({\n setMaxListeners: function setMaxListeners(n) {\n if (!this._events) this._events = {};\n this._events.maxListeners = n;\n },\n emit: function emit(type) {\n var args = Array.prototype.slice.call(arguments, 1);\n this.listeners(type).forEach(function(listener) {\n try {\n listener.apply(this, args);\n } catch (error) {\n // We emit `error` event if listener threw an exception. If there are\n // no listeners for `error` events or if listener for `error` event\n // threw then we dump error directly to the console.\n if (type !== ERROR_TYEPE && this.listeners(ERROR_TYEPE).length)\n this.emit(ERROR_TYEPE, error);\n else\n console.error(error);\n }\n }, this);\n },\n on: function on(type, listener) {\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n var events = this._events[type];\n if (!events) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n\n // If listener is an array and if listener is not registered yet.\n } else if (isArray(events) && !~events.indexOf(listener)) {\n\n // Check for listener leak\n if (!events.warned) {\n var m = events.maxListeners !== undefined ? events.maxListeners :\n MAX_LISTENERS;\n\n if (m && m > 0 && events.length > m) {\n events.warned = true;\n console.error('warning: possible EventEmitter memory ' +\n 'leak detected. NaN listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n }\n }\n\n events.push(listener);\n\n // If it's not the same listener adding it\n } else if (events !== listener) {\n // Adding the second element, need to change to array.\n this._events[type] = [events, listener];\n }\n\n return this;\n },\n once: function once(type, listener) {\n var self = this;\n function g() {\n self.removeListener(type, g);\n listener.apply(self, arguments);\n }\n\n g.listener = listener;\n self.on(type, g);\n return this;\n },\n removeListener: function removeListener(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('removeListener only takes instances of Function');\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events || !this._events[type]) return this;\n\n var list = this._events[type];\n\n if (isArray(list)) {\n var position = -1;\n for (var i = 0, length = list.length; i < length; i++) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener))\n {\n position = i;\n break;\n }\n }\n\n if (position < 0) return this;\n list.splice(position, 1);\n if (list.length === 0)\n delete this._events[type];\n } else if (list === listener ||\n (list.listener && list.listener === listener))\n {\n delete this._events[type];\n }\n\n return this;\n },\n removeAllListeners: function removeAllListeners(type) {\n // does not use listeners(), so no side effect of creating _events[type]\n if (type && this._events && this._events[type]) this._events[type] = null;\n return this;\n },\n listeners: function listeners(type) {\n if (!this._events) this._events = {};\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type].slice(0);\n }\n});\n\nexports.version = \"0.1.0\";\n\n});\n", "requirements": {W "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },E "https!github.com/Gozala/models/raw/master/lib/extendables.js": {K "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",Z "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",N "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true latedef: false supernew: true */\n/*global define: true */\n\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\n\nfunction supplement(target, source) {\n var descriptors = {};\n var names = Object.getOwnPropertyNames(target);\n Object.getOwnPropertyNames(source).forEach(function(name) {\n if (!~names.indexOf(name)) {\n descriptors[name] = Object.getOwnPropertyDescriptor(source, name);\n }\n });\n return Object.defineProperties(target, descriptors);\n}\n\nfunction Constructor(base) {\n return function Extendable() {\n var value, extendable = this;\n if (!(extendable instanceof Extendable))\n extendable = Object.create(Extendable.prototype);\n\n value = base.apply(extendable, arguments);\n return value === undefined ? extendable : value;\n }\n}\nfunction Extendable() {\n return this instanceof Extendable ? this : Object.create(Extendable.prototype);\n}\n\nObject.defineProperties(Extendable, {\n extend: {\n value: function extend(source) {\n var constructor, descriptors = getOwnPropertyDescriptors(source || {});\n // If `constructor` is not defined by `source` then we generate a default\n // `constructor` that delegates to the `constructor` of the base class.\n if (typeof descriptors.constructor !== \"object\")\n descriptors.constructor = { value: new Constructor(this) };\n // Copying all the non-existing properties to the decedent.\n constructor = supplement(descriptors.constructor.value, this);\n // Override prototype of the decedent.\n constructor.prototype = Object.create(this.prototype, descriptors);\n return constructor;\n },\n enumerable: true\n }\n});\n\nexports.Extendable = Extendable;\nexports.version = \"0.1.2\";\n\n});\n" } }}5_v:cvMauw I "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true, eqnull: true */\n/*global define: true */\n\n(typeof define === \"undefined\" ? function ($) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n",5_v:cvMduw "source": "/* vim:set ts=2 sw=2 sts=2 expandtab $) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n",5_v:cvMeuw: "source": "/* vim:set ts=2 sw=2 sts=2 expandtab 5_cvMu~ "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint newcap: true undef: true es5: true node: true devel: true\n forin: true */\n/*global define: true */\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nvar Extendable = require(\"./extendables\").Extendable;\nvar isArray = Array.isArray;\n\n// By default EventEmitters will print a warning if more than\n// 10 listeners are added to it. This is a useful default which\n// helps finding memory leaks.\n//\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nvar MAX_LISTENERS = 10;\nvar ERROR_TYEPE = 'error';\n\nexports.EventEmitter = Extendable.extend({\n setMaxListeners: function setMaxListeners(n) {\n if (!this._events) this._events = {};\n this._events.maxListeners = n;\n },\n emit: function emit(type) {\n var args = Array.prototype.slice.call(arguments, 1);\n this.listeners(type).forEach(function(listener) {\n try {\n listener.apply(this, args);\n } catch (error) {\n // We emit `error` event if listener threw an exception. If there are\n // no listeners for `error` events or if listener for `error` event\n // threw then we dump error directly to the console.\n if (type !== ERROR_TYEPE && this.listeners(ERROR_TYEPE).length)\n this.emit(ERROR_TYEPE, error);\n else\n console.error(error);\n }\n }, this);\n },\n on: function on(type, listener) {\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n var events = this._events[type];\n if (!events) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n\n // If listener is an array and if listener is not registered yet.\n } else if (isArray(events) && !~events.indexOf(listener)) {\n\n // Check for listener leak\n if (!events.warned) {\n var m = events.maxListeners !== undefined ? events.maxListeners :\n MAX_LISTENERS;\n\n if (m && m > 0 && events.length > m) {\n events.warned = true;\n console.error('warning: possible EventEmitter memory ' +\n 'leak detected. NaN listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n }\n }\n\n events.push(listener);\n\n // If it's not the same listener adding it\n } else if (events !== listener) {\n // Adding the second element, need to change to array.\n this._events[type] = [events, listener];\n }\n\n return this;\n },\n once: function once(type, listener) {\n var self = this;\n function g() {\n self.removeListener(type, g);\n listener.apply(self, arguments);\n }\n\n g.listener = listener;\n self.on(type, g);\n return this;\n },\n removeListener: function removeListener(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('removeListener only takes instances of Function');\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events || !this._events[type]) return this;\n\n var list = this._events[type];\n\n if (isArray(list)) {\n var position = -1;\n for (var i = 0, length = list.length; i < length; i++) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener))\n {\n position = i;\n break;\n }\n }\n\n if (position < 0) return this;\n list.splice(position, 1);\n if (list.length === 0)\n delete this._events[type];\n } else if (list === listener ||\n (list.listener && list.listener === listener))\n {\n delete this._events[type];\n }\n\n return this;\n },\n removeAllListeners: function removeAllListeners(type) {\n // does not use listeners(), so no side effect of creating _events[type]\n if (type && this._events && this._events[type]) this._events[type] = null;\n return this;\n },\n listeners: function listeners(type) {\n if (!this._events) this._events = {};\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type].slice(0);\n }\n});\n\nexports.version = \"0.1.0\";\n\n});\n",5_cvMv~ "source": "5_cvM "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true latedef: false supernew: true */\n/*global define: true */\n\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\n\nfunction supplement(target, source) {\n var descriptors = {};\n var names = Object.getOwnPropertyNames(target);\n Object.getOwnPropertyNames(source).forEach(function(name) {\n if (!~names.indexOf(name)) {\n descriptors[name] = Object.getOwnPropertyDescriptor(source, name);\n }\n });\n return Object.defineProperties(target, descriptors);\n}\n\nfunction Constructor(base) {\n return function Extendable() {\n var value, extendable = this;\n if (!(extendable instanceof Extendable))\n extendable = Object.create(Extendable.prototype);\n\n value = base.apply(extendable, arguments);\n return value === undefined ? extendable : value;\n }\n}\nfunction Extendable() {\n return this instanceof Extendable ? this : Object.create(Extendable.prototype);\n}\n\nObject.defineProperties(Extendable, {\n extend: {\n value: function extend(source) {\n var constructor, descriptors = getOwnPropertyDescriptors(source || {});\n // If `constructor` is not defined by `source` then we generate a default\n // `constructor` that delegates to the `constructor` of the base class.\n if (typeof descriptors.constructor !== \"object\")\n descriptors.constructor = { value: new Constructor(this) };\n // Copying all the non-existing properties to the decedent.\n constructor = supplement(descriptors.constructor.value, this);\n // Override prototype of the decedent.\n constructor.prototype = Object.create(this.prototype, descriptors);\n return constructor;\n },\n enumerable: true\n }\n});\n\nexports.Extendable = Extendable;\nexports.version = \"0.1.2\";\n\n});\n"5_cvM "source": "5_mcvMln "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n",5_mcvMln "source": "5_mcvMln "source": ""5_vcvMuw? "source": "/* vim:set ts=2 sw=2 sts=2 expandtab ...."5_vcvMuw "source": "5_`cvM_bAnd you'll get something like:5_a dvM`bmodule in `source` 5_a dvM`bmodule under `source` 5_advM`bmodule under the `source` 5_a#dvM`b#module under the `source` attribute5_dvM5_[v[M25_[v[M2 5_M4a non problem: `require('http!jsm.org/underscore')`.5_(M(+(*5_+M)+gra*,5_*M)+gra5_* M*,absolute module id),!You can use `graphquire` as npm''5_+M-*,absolute module id''5_+>M=*.>absolute module id's in node today. All you need to do is add 5_,MH,.,.5_-M[,.1. Add graphquire 5_-M\,01. Add `graphquire 5_/Mx.3 5_/M{.0 "devDependencies": {5_002vM/3 "test": ">=0.0.10", "graphquire": ">=0.5.0" }5_202vM␂13 }5_002vM␄/0 "test": ">=0.0.10",5_001vM␄/1 "graphquire": ">=0.5.0"5_101vM␉14 135_301vM␞24*2. Add install script to your package.json5_3+01vM␞24+2. Add install script to your `package.json5_-01vM␦,.-1. Add `graphquire` to your dev dependencies:5_--01vM␨,.-1. Add `graphquire` to your dev-dependencies:5_-<01vM␬,.<1. Add `graphquire` to your dev-dependencies in package.json5_-001vM␯,.=1. Add `graphquire` to your dev-dependencies in package.json:5_-=01vM␰,.>1. Add `graphquire` to your dev-dependencies in `package.json:5_3,01vM␴36355_501vM49 5_801vM79 }, 5_801vM79 }5_558vM49 "scripts": {% "test": "node tests/test-jpm.js",+ "install": "graphquire --clean --write" }5_658vM57' "test": "node tests/test-jpm.js",5_558vM46 "scripts": {5_658vM57' "test": "node tests/test-jpm.js",5_858vM79 }5_658vM56' "test": "node tests/test-jpm.js",5_+57vM*,:absolute module id's in node today. All you need to do is:5_+;57vM*,79vMV>A>@5_@ 79vM`@B5_B79vMcAC&This will write output like following:5_B79vMkAC5You can use graThis will write output like following:5_B 79vMuAC>You can use graphquire aThis will write output like following:5_B79vMvAC?You can use `graphquire aThis will write output like following:5_B79vMxAE@You can use `graphquire` aThis will write output like following:5_D79vM⑎CE1. To 5_;;>vM⑹:<JRun `graphquire` command on the `package.json` file of javascript package./ graphquire test/fixtures/pckg1/package.json5_ ;;;vM⑺:;5_  =0;;vM⑿<>0You can use `graphquire` as a command line tool:5_   ?;;vM>D1. To analyze dependency graph5_   ?%;;vM>@l1. To analyze dependency graph by Run `graphquire` command on the `package.json` file of javascript package.5_   ?F;;vM>Ap1. To analyze dependency graph by running `graphquire` command on the `package.json` file of javascript package.5_  C;;vMBC5_ C;;vMBC5_C;;vMBC5_B;;vM!BD5_@*;;vM⒱?A*`package.json` file of javascript package.5_C;;vMⒾBD5_C;;vMBD 5_C;;vMBD 5_h;;vMgi5_h;;vMgi5_h5;;vMgi52. You can also analyze graphs on the remote packages5_h5;;vMhkhj5_i;;vM hj 5_j;;vM ik5_ttt_vMsu_ graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_jtt_vMil 5_llvvM3km LPlease note that in this case all the modules with absolute ids were already.cached locally. Go ahead and try the same withI[another package](./test/fixtures/pckg2/package.json) and you'll see thatMnon-cached absolute modules still will be in graph and they will even containmodule source.6In addition you can create graphs for remote packages: MAnd you'll get something like following but with an actual source code of the5_kllvM5kmkm5_ mmmvMYlmLnd you'll get something like following but with an actual source code of the5_! mmmvMZlm%module under the `source` attributes:5_ "!oovMgnp) { "name": "pckg2", "version": "0.0.1",= "description": "test package with remote dependencies",$ "cachePath": "./node_modules",e "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "modules": { "pckg2": {` "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",] "id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "source": "...." "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },D "https!github.com/Gozala/models/raw/master/lib/models.js": {J "id": "https!github.com/Gozala/models/raw/master/lib/models.js",Y "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",M "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", "source": "....." "requirements": {Q "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },D "https!github.com/Gozala/models/raw/master/lib/events.js": {J "id": "https!github.com/Gozala/models/raw/master/lib/events.js",Y "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",M "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "....." "requirements": {[ "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },I "https!github.com/Gozala/models/raw/master/lib/extendables.js": {O "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",^ "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",R "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "...." } } }5_!#"joovMikv jmu jlt5_"$#h5vMpgi62. You can also analyze graphs on the remote packages:5_#%$h7vMqgi92. You can also analyze graphs on the remote packages ():5_$&%h7vMⓉgiN2. You can also analyze graphs on the remote packages (source attributes are):5_%'&hOvMⓎgj_2. You can also analyze graphs on the remote packages (Please note that source attributes are):5_&('ivMⓐhjattributes are):5_')(ivMⓓ"hj attributes are):5_(*)vM⓭B3. Analyze and install missing dependencies into local filesystem:5_)+*vM⓯63. Install missing dependencies into local filesystem:5_*,+ vM⓳.3. Install dependencies into local filesystem:5_+-,vM⓽53. Install remote dependencies into local filesystem:5_,.-vM5_-/.vM 5_.0/vM gr5_/107vM83. Install missing dependencies to the local filesystem:5_0219vM;3. Install missing dependencies to the local filesystem ():5_132vM the node_modules ):5_243vM the `node_modules ):5_354vM the `node_modules` ):5_465vM graphquire --write5_576vMN3. Install missing dependencies to the local filesystem (will write modules to the `node_modules` for):5_687:vM :You can also write dependencies so that node can use them:5_798vM graphquire -w .5_8:9vM5_9;:vM5_:<;vM4. 5_;=<vM%4. Legacy depend5_<>= vM/.4. Legacy dependencies can be also cleaned up 5_=?> vM214. No longer dependencies can be also cleaned up 5_>@?6vM664. No longer used dependencies can be also cleaned up 5_?A@:vMn:<:<5_@BA;vMz:>### Browser ### 5_ACB<vM};= 5_BDC<vM~<>5_CEDGG!<vDM┌L`node_modules` folder so that, such packages will work fine in nodejs. There+is experimental browser based module loaderV[teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)Othat can load modules from both relative and absolute ids. In addition there is=0.5.0" }5_TVU,,.vMc+/ "scripts": {- "install": "graphquire --clean --write" }5_UWV,.vMf npm install graphquire5_VXW??cvMr>d%/ graphquire test/fixtures/pckg1/package.json { "name": "pckg1",$ "cachePath": "./node_modules",W "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1", "path": "./index.js", "requirements": {1 "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": {$ "id": "http!foo.org/a.js",3 "path": "node_modules/http!foo.org/a.js",' "uri": "http://foo.org/a.js", "requirements": {4 "./nested/b": "http!foo.org/nested/b.js" } },% "http!foo.org/nested/b.js": {+ "id": "http!foo.org/nested/b.js",: "path": "node_modules/http!foo.org/nested/b.js",. "uri": "http://foo.org/nested/b.js", "requirements": {1 "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": {$ "id": "http!bar.org/c.js",3 "path": "node_modules/http!bar.org/c.js",& "uri": "http://bar.org/c.js" } } }5_WYXhhvM|g+_ graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json { "name": "pckg2", "version": "0.0.1",= "description": "test package with remote dependencies",$ "cachePath": "./node_modules",e "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "modules": { "pckg2": {` "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",] "id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "source": "...." "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },D "https!github.com/Gozala/models/raw/master/lib/models.js": {J "id": "https!github.com/Gozala/models/raw/master/lib/models.js",Y "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",M "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", "source": "....." "requirements": {Q "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },D "https!github.com/Gozala/models/raw/master/lib/events.js": {J "id": "https!github.com/Gozala/models/raw/master/lib/events.js",Y "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",M "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "....." "requirements": {[ "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },I "https!github.com/Gozala/models/raw/master/lib/extendables.js": {O "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",^ "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",R "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "...." } } }5_XZYhvM⛀+ graphquire --write path/to/package.json5_Y[ZhvM⛂$3 graphquire --write --clean path/to/package.json5_Z\[hvM5 graphquire --write --clean path/to/package.json5_[]\hvM- graphquire --write path/to/package.json5_\^]hhvMg+a graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json { "name": "pckg2", "version": "0.0.1",? "description": "test package with remote dependencies",& "cachePath": "./node_modules",g "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "modules": { "pckg2": {b "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",_ "id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "source": "...." "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },F "https!github.com/Gozala/models/raw/master/lib/models.js": {L "id": "https!github.com/Gozala/models/raw/master/lib/models.js",[ "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",O "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", "source": "....." "requirements": {S "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },F "https!github.com/Gozala/models/raw/master/lib/events.js": {L "id": "https!github.com/Gozala/models/raw/master/lib/events.js",[ "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",O "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "....." "requirements": {] "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },K "https!github.com/Gozala/models/raw/master/lib/extendables.js": {Q "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",` "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",T "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "...." } } }5_]_^?c?vM>d%1 graphquire test/fixtures/pckg1/package.json { "name": "pckg1",& "cachePath": "./node_modules",Y "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1",! "path": "./index.js", "requirements": {3 "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": {& "id": "http!foo.org/a.js",5 "path": "node_modules/http!foo.org/a.js",) "uri": "http://foo.org/a.js", "requirements": {6 "./nested/b": "http!foo.org/nested/b.js" } },' "http!foo.org/nested/b.js": {- "id": "http!foo.org/nested/b.js",< "path": "node_modules/http!foo.org/nested/b.js",0 "uri": "http://foo.org/nested/b.js", "requirements": {3 "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": {& "id": "http!bar.org/c.js",5 "path": "node_modules/http!bar.org/c.js",( "uri": "http://bar.org/c.js" } } }5_^`_,,.vM+/ "scripts": {/ "install": "graphquire --clean --write" }5__b`&(&vM%%) "devDependencies": { "graphquire": ">=0.5.0" }5_`cabq q x v Mi#pr "pckg2": {d "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",a "id": "https!github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "source": "...." "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },5_bdcq q qv Mi$py5_cedqyqvMi)pz "./index.js": {_ "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "id": "./index.js", "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n", "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } }, 5_dfeqyqvMi+pr "./index.js": {5_egfyqxvMi4xy 5_fhgq x q v Mi9&py "./index.js": {c "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "id": "./index.js", "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n", "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },5_gihtttvMiVsu "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n",5_hjitttvMiW'su "source": "",5_ikjGHH v MieFH "id": "pckg1",5_jlkGHH v Mih)FH! "id": "./index.js",5_kmlEHH v MnDF "modules": {5_lnmpHH v Mn+oq "modules": {5_monEHH v MoEG EG5_npoF II v MoEG ""5_oqpF II v Mo EG "package.json"5_prqHHHvMo)GI) "./index.js": "./index.js",5_qsrGHHvMo-FH "pckg1": {5_rtsFHHvMo0EG "./package.json"5_sutFHHvMo1EH "./package.json": {}5_tvuG IIvMo3,FH }5_uwvs r v Mort "./index.js": {5_vxwrr v Mort rt5_wyxs r v Mort ""5_xzysr v Mort "./package.json"5_y{zsr v Moru "./package.json": {}5_z|{t r v Mosu }5_{}|s r v Mort "./package.json": {5_|~}t r v Mosu },5_}~u r v Motv "./index.js": {5_~llvMoktkm+ { "name": "pckg2", "version": "0.0.1",A "description": "test package with remote dependencies",( "cachePath": "./node_modules",i "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "manifest": {! "./package.json": { }, "./index.js": {e "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js"," "id": "./index.js",! "source": ".....", "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },H "https!github.com/Gozala/models/raw/master/lib/models.js": {N "id": "https!github.com/Gozala/models/raw/master/lib/models.js",] "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",Q "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", "source": "....." "requirements": {U "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },H "https!github.com/Gozala/models/raw/master/lib/events.js": {N "id": "https!github.com/Gozala/models/raw/master/lib/events.js",] "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",Q "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "....." "requirements": {_ "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },M "https!github.com/Gozala/models/raw/master/lib/extendables.js": {S "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",b "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",V "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "...." } } }5_llvMok-{ "name": "pckg2", "version": "0.0.1",: "description": "test package with remote dependencies",! "cachePath": "./node_modules",b "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "manifest": { "./package.json": {c "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "source": "{\n \"name\": \"pckg2\",\n \"version\": \"0.0.1\",\n \"description\": \"test package with remote dependencies\"\n}\n" }, "./index.js": {_ "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "id": "./index.js", "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n", "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },B "https!github.com/Gozala/models/raw/master/lib/models.js": {I "id": "https!github.com/Gozala/models/raw/master/lib/models.js",X "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",L "uri": "https://github.com/Gozala/models/raw/master/lib/models.js", H "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true, eqnull: true */\n/*global define: true */\n\n(typeof define === \"undefined\" ? function ($) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n", "requirements": {Q "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },B "https!github.com/Gozala/models/raw/master/lib/events.js": {I "id": "https!github.com/Gozala/models/raw/master/lib/events.js",X "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",L "uri": "https://github.com/Gozala/models/raw/master/lib/events.js", "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint newcap: true undef: true es5: true node: true devel: true\n forin: true */\n/*global define: true */\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nvar Extendable = require(\"./extendables\").Extendable;\nvar isArray = Array.isArray;\n\n// By default EventEmitters will print a warning if more than\n// 10 listeners are added to it. This is a useful default which\n// helps finding memory leaks.\n//\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nvar MAX_LISTENERS = 10;\nvar ERROR_TYEPE = 'error';\n\nexports.EventEmitter = Extendable.extend({\n setMaxListeners: function setMaxListeners(n) {\n if (!this._events) this._events = {};\n this._events.maxListeners = n;\n },\n emit: function emit(type) {\n var args = Array.prototype.slice.call(arguments, 1);\n this.listeners(type).forEach(function(listener) {\n try {\n listener.apply(this, args);\n } catch (error) {\n // We emit `error` event if listener threw an exception. If there are\n // no listeners for `error` events or if listener for `error` event\n // threw then we dump error directly to the console.\n if (type !== ERROR_TYEPE && this.listeners(ERROR_TYEPE).length)\n this.emit(ERROR_TYEPE, error);\n else\n console.error(error);\n }\n }, this);\n },\n on: function on(type, listener) {\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n var events = this._events[type];\n if (!events) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n\n // If listener is an array and if listener is not registered yet.\n } else if (isArray(events) && !~events.indexOf(listener)) {\n\n // Check for listener leak\n if (!events.warned) {\n var m = events.maxListeners !== undefined ? events.maxListeners :\n MAX_LISTENERS;\n\n if (m && m > 0 && events.length > m) {\n events.warned = true;\n console.error('warning: possible EventEmitter memory ' +\n 'leak detected. NaN listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n }\n }\n\n events.push(listener);\n\n // If it's not the same listener adding it\n } else if (events !== listener) {\n // Adding the second element, need to change to array.\n this._events[type] = [events, listener];\n }\n\n return this;\n },\n once: function once(type, listener) {\n var self = this;\n function g() {\n self.removeListener(type, g);\n listener.apply(self, arguments);\n }\n\n g.listener = listener;\n self.on(type, g);\n return this;\n },\n removeListener: function removeListener(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('removeListener only takes instances of Function');\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events || !this._events[type]) return this;\n\n var list = this._events[type];\n\n if (isArray(list)) {\n var position = -1;\n for (var i = 0, length = list.length; i < length; i++) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener))\n {\n position = i;\n break;\n }\n }\n\n if (position < 0) return this;\n list.splice(position, 1);\n if (list.length === 0)\n delete this._events[type];\n } else if (list === listener ||\n (list.listener && list.listener === listener))\n {\n delete this._events[type];\n }\n\n return this;\n },\n removeAllListeners: function removeAllListeners(type) {\n // does not use listeners(), so no side effect of creating _events[type]\n if (type && this._events && this._events[type]) this._events[type] = null;\n return this;\n },\n listeners: function listeners(type) {\n if (!this._events) this._events = {};\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type].slice(0);\n }\n});\n\nexports.version = \"0.1.0\";\n\n});\n", "requirements": {[ "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },G "https!github.com/Gozala/models/raw/master/lib/extendables.js": {N "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js",] "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",Q "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js", "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true latedef: false supernew: true */\n/*global define: true */\n\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\n\nfunction supplement(target, source) {\n var descriptors = {};\n var names = Object.getOwnPropertyNames(target);\n Object.getOwnPropertyNames(source).forEach(function(name) {\n if (!~names.indexOf(name)) {\n descriptors[name] = Object.getOwnPropertyDescriptor(source, name);\n }\n });\n return Object.defineProperties(target, descriptors);\n}\n\nfunction Constructor(base) {\n return function Extendable() {\n var value, extendable = this;\n if (!(extendable instanceof Extendable))\n extendable = Object.create(Extendable.prototype);\n\n value = base.apply(extendable, arguments);\n return value === undefined ? extendable : value;\n }\n}\nfunction Extendable() {\n return this instanceof Extendable ? this : Object.create(Extendable.prototype);\n}\n\nObject.defineProperties(Extendable, {\n extend: {\n value: function extend(source) {\n var constructor, descriptors = getOwnPropertyDescriptors(source || {});\n // If `constructor` is not defined by `source` then we generate a default\n // `constructor` that delegates to the `constructor` of the base class.\n if (typeof descriptors.constructor !== \"object\")\n descriptors.constructor = { value: new Constructor(this) };\n // Copying all the non-existing properties to the decedent.\n constructor = supplement(descriptors.constructor.value, this);\n // Override prototype of the decedent.\n constructor.prototype = Object.create(this.prototype, descriptors);\n return constructor;\n },\n enumerable: true\n }\n});\n\nexports.Extendable = Extendable;\nexports.version = \"0.1.2\";\n\n});\n" } }}5_ulvMotv "source": "{\n \"name\": \"pckg2\",\n \"version\": \"0.0.1\",\n \"description\": \"test package with remote dependencies\"\n}\n"5_ulvMo-tv "source": "\n"5_lvMp P "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true, eqnull: true */\n/*global define: true */\n\n(typeof define === \"undefined\" ? function ($) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n",5_lvMp "source": "5_zlvMp y{ "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n",5_zlvMp y{ "source": "5_z"lvMpy{" "source": "....."5_!lvMp! "source": "...."5_lvMp "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint newcap: true undef: true es5: true node: true devel: true\n forin: true */\n/*global define: true */\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nvar Extendable = require(\"./extendables\").Extendable;\nvar isArray = Array.isArray;\n\n// By default EventEmitters will print a warning if more than\n// 10 listeners are added to it. This is a useful default which\n// helps finding memory leaks.\n//\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nvar MAX_LISTENERS = 10;\nvar ERROR_TYEPE = 'error';\n\nexports.EventEmitter = Extendable.extend({\n setMaxListeners: function setMaxListeners(n) {\n if (!this._events) this._events = {};\n this._events.maxListeners = n;\n },\n emit: function emit(type) {\n var args = Array.prototype.slice.call(arguments, 1);\n this.listeners(type).forEach(function(listener) {\n try {\n listener.apply(this, args);\n } catch (error) {\n // We emit `error` event if listener threw an exception. If there are\n // no listeners for `error` events or if listener for `error` event\n // threw then we dump error directly to the console.\n if (type !== ERROR_TYEPE && this.listeners(ERROR_TYEPE).length)\n this.emit(ERROR_TYEPE, error);\n else\n console.error(error);\n }\n }, this);\n },\n on: function on(type, listener) {\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n var events = this._events[type];\n if (!events) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n\n // If listener is an array and if listener is not registered yet.\n } else if (isArray(events) && !~events.indexOf(listener)) {\n\n // Check for listener leak\n if (!events.warned) {\n var m = events.maxListeners !== undefined ? events.maxListeners :\n MAX_LISTENERS;\n\n if (m && m > 0 && events.length > m) {\n events.warned = true;\n console.error('warning: possible EventEmitter memory ' +\n 'leak detected. NaN listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n }\n }\n\n events.push(listener);\n\n // If it's not the same listener adding it\n } else if (events !== listener) {\n // Adding the second element, need to change to array.\n this._events[type] = [events, listener];\n }\n\n return this;\n },\n once: function once(type, listener) {\n var self = this;\n function g() {\n self.removeListener(type, g);\n listener.apply(self, arguments);\n }\n\n g.listener = listener;\n self.on(type, g);\n return this;\n },\n removeListener: function removeListener(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('removeListener only takes instances of Function');\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events || !this._events[type]) return this;\n\n var list = this._events[type];\n\n if (isArray(list)) {\n var position = -1;\n for (var i = 0, length = list.length; i < length; i++) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener))\n {\n position = i;\n break;\n }\n }\n\n if (position < 0) return this;\n list.splice(position, 1);\n if (list.length === 0)\n delete this._events[type];\n } else if (list === listener ||\n (list.listener && list.listener === listener))\n {\n delete this._events[type];\n }\n\n return this;\n },\n removeAllListeners: function removeAllListeners(type) {\n // does not use listeners(), so no side effect of creating _events[type]\n if (type && this._events && this._events[type]) this._events[type] = null;\n return this;\n },\n listeners: function listeners(type) {\n if (!this._events) this._events = {};\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type].slice(0);\n }\n});\n\nexports.version = \"0.1.0\";\n\n});\n",5_lvMp "source": "5_lvMp! "source": "/* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true latedef: false supernew: true */\n/*global define: true */\n\n(typeof define !== \"function\" ? function($){ $(require, exports, module); } : define)(function(require, exports, module, undefined) {\n\n\"use strict\";\n\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\n\nfunction supplement(target, source) {\n var descriptors = {};\n var names = Object.getOwnPropertyNames(target);\n Object.getOwnPropertyNames(source).forEach(function(name) {\n if (!~names.indexOf(name)) {\n descriptors[name] = Object.getOwnPropertyDescriptor(source, name);\n }\n });\n return Object.defineProperties(target, descriptors);\n}\n\nfunction Constructor(base) {\n return function Extendable() {\n var value, extendable = this;\n if (!(extendable instanceof Extendable))\n extendable = Object.create(Extendable.prototype);\n\n value = base.apply(extendable, arguments);\n return value === undefined ? extendable : value;\n }\n}\nfunction Extendable() {\n return this instanceof Extendable ? this : Object.create(Extendable.prototype);\n}\n\nObject.defineProperties(Extendable, {\n extend: {\n value: function extend(source) {\n var constructor, descriptors = getOwnPropertyDescriptors(source || {});\n // If `constructor` is not defined by `source` then we generate a default\n // `constructor` that delegates to the `constructor` of the base class.\n if (typeof descriptors.constructor !== \"object\")\n descriptors.constructor = { value: new Constructor(this) };\n // Copying all the non-existing properties to the decedent.\n constructor = supplement(descriptors.constructor.value, this);\n // Override prototype of the decedent.\n constructor.prototype = Object.create(this.prototype, descriptors);\n return constructor;\n },\n enumerable: true\n }\n});\n\nexports.Extendable = Extendable;\nexports.version = \"0.1.2\";\n\n});\n"5_lvMp! "source": "5_lvMp%. 5_AAevMpJ@e}@B% { "name": "pckg1",( "cachePath": "./node_modules",[ "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "manifest": { "./package.json": { }, "./index.js": {! "id": "./index.js",# "path": "./index.js", "requirements": {5 "http!foo.org/a": "http!foo.org/a.js" } }," "http!foo.org/a.js": {( "id": "http!foo.org/a.js",7 "path": "node_modules/http!foo.org/a.js",+ "uri": "http://foo.org/a.js", "requirements": {8 "./nested/b": "http!foo.org/nested/b.js" } },) "http!foo.org/nested/b.js": {/ "id": "http!foo.org/nested/b.js",> "path": "node_modules/http!foo.org/nested/b.js",2 "uri": "http://foo.org/nested/b.js", "requirements": {5 "http!bar.org/c": "http!bar.org/c.js" } }," "http!bar.org/c.js": {( "id": "http!bar.org/c.js",7 "path": "node_modules/http!bar.org/c.js",* "uri": "http://bar.org/c.js" } } }5_AdAvMpO/@e${ "name": "pckg1",! "cachePath": "./node_modules",T "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "manifest": { "./package.json": {}, "./index.js": { "id": "./index.js", "path": "./index.js", "requirements": {1 "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": {# "id": "http!foo.org/a.js",2 "path": "node_modules/http!foo.org/a.js",& "uri": "http://foo.org/a.js", "requirements": {4 "./nested/b": "http!foo.org/nested/b.js" } },# "http!foo.org/nested/b.js": {* "id": "http!foo.org/nested/b.js",9 "path": "node_modules/http!foo.org/nested/b.js",- "uri": "http://foo.org/nested/b.js", "requirements": {1 "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": {# "id": "http!bar.org/c.js",2 "path": "node_modules/http!bar.org/c.js",% "uri": "http://bar.org/c.js" } }}5_edAvMpX0df 5_r dAvMuO1qs "manifest": {5_sdAvMuTrs! "./package.json": {5_sdAvMuUrsk "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json",5_sdAvMuUrs! "source": "...."5_sdAvMuV2rs },5_E dAvMuDF "manifest": {5_FdAvMu3EF# "./package.json": {},5_DcAvMuDF DF5_E dAvMuDF ""5_EdAvMuDF "metadata"5_EdAvMuDG "metadata": {}5_F eAvMuEG }5_F eAvMuEG },5_F eAvMuEG },5_B B BvMuAC "name": "pckg1",5_B B BvMuAB ,5_D B BvMu4DF DF5_n n ovMumo "name": "pckg2", "version": "0.0.1",5_n n n'vMumn ,5_p n n'vMupr pr5_q n n'vMupr ""5_qn n'vMupr "metadata"5_qn n'vMups "metadata" {}5_r n n'vMuqs }5_r n n'vMuqs }5_q n n'vMuqt qs5_s n n'vMurt "version": "0.0.1"5_n n n@v@MumoB "description": "test package with remote dependencies",5_n n n@v@Mumn ,5_r n n@v@Mu6rt qt "version": "0.0.1"5_& Mi7%' "devDependencies": {5_'Mi8&(! "graphquire": ">=0.5.0"5_IMiHI$ "id": "./index.js",5_IMi9HI& "path": "./index.js",5_OMiNO: "path": "node_modules/http!foo.org/a.js",5_OMi;NO. "uri": "http://foo.org/a.js",5_UMiTUA "path": "node_modules/http!foo.org/nested/b.js",5_UMi<TU5 "uri": "http://foo.org/nested/b.js",5_[MiZ[: "path": "node_modules/http!bar.org/c.js",5_[Mi=Z[- "uri": "http://bar.org/c.js"5_oMjnog "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js",5_wMjvw` "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/models.js",5_wMj>vwT "uri": "https://github.com/Gozala/models/raw/master/lib/models.js",5_~Mj%}~` "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/events.js",5_~Mj&?}~T "uri": "https://github.com/Gozala/models/raw/master/lib/events.js",5_Mj.e "path": "node_modules/https!github.com/Gozala/models/raw/master/lib/extendables.js",5_Mj.@Y "uri": "https://github.com/Gozala/models/raw/master/lib/extendables.js",5_*MjeA7 graphquire --write --clean path/to/package.json 5_.M.3 .05_2M135_/M.05_/M.0a5_2M13You can use `gr5_2M13You can use `grap5_2FM+15GYou can use `graphquire` with jetpack, either via command line or npm''5_31MP245script. In both cases command to execute is folloing:5_4MR46465_5%Mm46. graphquire --clean --write --chache-path5_5-MnB46- graphquire --clean --write --cache-path5_5/Mp58 575_76M686Also like case of nodejs you can create install script5_7M68If you''5_7M69If you''5_8&M79&modify install script command so that 5_8,.vM9=7;modify install script:8:8:5_:,.vM9; "scripts": {5_5,.vM460 graphquire --clean --write --cache-path ./5_;05"51v1MC:<1 "install": "graphquire --clean --write"5_;25"51v1M D:<B "install": "graphquire --clean --write --cache-path ./"5_B 5"51v1MACLthat can load modules from both relative and absolute ids. This way packages5_BG5"51v1M/ACPthat can be used modules from both relative and absolute ids. This way packages5_@$5"51v1MC?A1There is experimental browser based module loader5_C5"51v1MGBCNthat don't depend on engine specific functionality can be shared among browser5_C5"51v1MGBC"nodejs and very soon with jetpack.5_B>5"51v1MIIAC>allowing you to load all this modules in the browser. packages5_ N  $ `require('http!foo.org/bar')` 5_N J % `require('https!bla.org/baz.js)`5_N K 1. Relative: 5_ N  1. Relative:5_ N  module ids:5_N  1. :5_N L 1. relative id:5_N  1. by relative id:5_N  1. relative id:5_ N   2. Absolute: 5_ N M  2. URL: 5_'N DNotice `http!` prefix in absolute id ? That's a way to define remote5_N !URLs may be used to define remotePdependencies. This makes packages obsolete, defining dependencies in the packagePdependencies. This makes packages obsolete, defining dependencies in the package5_NN NrURLs may be used to define remote dependencies. This makes packages obsolete, defining dependencies in the package5_/N  MURLs may be used to define remote dependencies. This makes packages obsolete,5_ N !AURLs may are good alternative to a traditional packages obsolete,5_<N *=URLs are good alternative to a traditional packages obsolete,5_4N ,4URLs are good alternative to a traditional packages,5_4N G4URLs are good alternative to a traditional packages.5_N i$defining dependencies in the package5_JN mJURLs are good alternative to a traditional packages, as this allows use to5_CN sOCURLs are good alternative to a traditional packages, as they allow 5_FN FURLs are good alternative to a traditional packages, as they allow to 5_N 5_N # graphquire #5_ N 5_RN QYWeb is awesome, it’s cross platform, fully distributed, yet connected via links / URLs.5_N 5_N 5_N I think we should be building ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_&N This project is an attempt to building ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_#N This project is an attempt to build ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_N This project is an attempt to build an ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_1N This project is an attempt, to build an ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_@N  This project is an attempt, to build an ecosystem, for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_2N "This project is an attempt, to build an ecosystem, for web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_:N %This project is an attempt, to build an ecosystem for web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_ 5N (RThis project is an attempt, to build an ecosystem for web with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_  DN 6This project is an attempt, to build an ecosystem of web with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_   QN 8This project is an attempt, to build an ecosystem of web with a same web spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_   4N EPThis project is an attempt, to build an ecosystem of web with a same web spirit:5_   9N GQThis project is an attempt, to build an ecosystem for web with a same web spirit:5_  N  5_ N []5_N [URL]5_N S[URL]()5_:N 5_N []5_N <[URL](http://en.wikipedia.org/wiki/Uniform_Resource_Locator)5_<N <[URL]:http://en.wikipedia.org/wiki/Uniform_Resource_Locator)5_N T[URI]5_N ?QWeb is awesome, it’s cross platform, fully distributed, yet connected via links5_N BQWeb is awesome: it’s cross platform, fully distributed, yet connected via links5_JN JJWeb is awesome: cross platform, fully distributed, yet connected via links5_GN PPWeb is awesome: cross platform, fully distributed, yet connected fully connected5_ N R connected5_N Uconnected via URL5_N VUconnected via [URL5_N XV/ URLs.5_ N ZWconnected via [URL]s5_! 3N tXFWeb is awesome: cross platform, fully distributed, yet connected fully5_ "!IN IWeb is awesome: cross platform, fully distributed and yet connected fully5_!#"N Y:Web is awesome: cross platform, fully distributed and yet connected via [URL]s.connected via [URL]s.5_"$#N ]This project is an attempt, to build an ecosystem for web development with a same web spirit:5_#%$N qThis project is an attempt, use same principles in build an ecosystem for web development with a same web spirit:5_$(%BN xThis project is an attempt, to promote same principles in build an ecosystem for web development with a same web spirit:5_%)&(&N This project is an attempt, to promote same principles in build a web itself. ecosystem for web development with a same web spirit:5_(*)7N This project is an attempt, to apply same principles in build a web itself. ecosystem for web development with a same web spirit:5_)+*>N This project is an attempt, to apply same principles for build a web itself. ecosystem for web development with a same web spirit:5_*,+PN This project is an attempt, to apply same principles for building a web itself. ecosystem for web development with a same web spirit:5_+-,N 5_,.-N 5_-/.2N D2Idea is to build a fully distributed ecosystem of 5_.0/;N Q;Idea is to build a fully distributed ecosystem without any 5_/10/N [JIdea is to build a fully distributed ecosystem without any type of central5_021 N ] authority 5_132 N ` authority)5_243N t5ecosystem for web development with a same web spirit:5_354eN {Z%authority) of cross platform modules URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony. ?cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_495N  authority) of cross platform modules connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_5:69IN  authority) of cross platform JavaScript modules connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_9;:(N [ doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_:<;)N  doing one thing only, but doing it well! No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_;=<*N  }doing one thing only, but doing it well! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_<>=EN  Mdoing one thing only, but doing it well! Something to start building harmony.5_=?>NN  Ndoing one thing only, but doing it well! Something to start building [harmony.5_>A?E EvEN  Mdoing one thing only, but doing it well! Something to start building [harmony5_?B@A2 EvEN '\ Mdoing one thing only, but doing it well! Something to start building [harmony5_ACB  EvEN 1] of our dreams]5_BDC EvEN 35_CED EvEN 5[harmonyof our dreams]of our dreams]5_DFE EvEN 6>[URI]:http://en.wikipedia.org/wiki/Uniform_Resource_Identifier5_EGF EvEN 7^[harmony of our dreams]5_FHG  EvEN ]_  5_GIH  EvEN l LModule graph builder. This tool may be used to build module dependency graph5_HJI  EvEN t VThis is a module graph builder. This tool may be used to build module dependency graph5_IKJ  EvEN y _This is a module graph builder / linker. This tool may be used to build module dependency graph5_JLK 0 EvEN }` hThis is a module linker / graph builder / linker. This tool may be used to build module dependency graph5_KML ( EvEN  _This is a module linker / graph builder. This tool may be used to build module dependency graph5_LNM J EvEN  ZThis is a module linker / graph builder, that may be used to build module dependency graph5_MON EvEN  dependency graphKstarting form package's main module. This prototype recognizes two types ofKstarting form package's main module. This prototype recognizes two types of5_NPO EvEN a \dependency graph starting form package's main module. This prototype recognizes two types of5_OQP< EvEN  ^dependency graph starting form a package's main module. This prototype recognizes two types of5_PRQM EvEN  edependency graph starting form a package's main module. Graphequire prototype recognizes two types of5_QSRO EvEN  [dependency graph starting form a package's main module. Graphequire recognizes two types of5_R]S EvEN d two types ofmodule requirements:module requirements:5_S^\] EvEN e 2. Absolute URL: 5_]_^ EvEN  5_^`_ EvEN All other type of require''5__a`5 EvEN 'f5All other type of require's are assumed to be engine 5_`ba EvEN ?iURLs are good alternative to a traditional packages, as they allow to building ecosystem for building web5_acb EvEN ?Nsaves few keystrokes but is pretty is unwebby as it brings a lot of complexity5_bdc EvEN @Kby introducing nested dependencies, encouraging code duplication instead of5_ced EvEN AJsharing. Of course we can employ some tools to handle this complexity, but5_dfe EvEN ANmaybe absolute URIs are not bad ?! Also public module registry would make this5_egf EvEN Bg4a non problem: `require('http!jsm.org/underscore')`.5_fig EvEN Ch5_gjhi$ EvEN d#%NYou can use `graphquire` as npm's install script. This way you can start using5_ikj$+ EvEN #%^You can use `graphquire` to install all URL npm's install script. This way you can start using5_jlk$8 EvEN #%kYou can use `graphquire` to install all URL type modules npm's install script. This way you can start using5_kml$K EvEN #&You can use `graphquire` to install all URL type modules that your project depends on npm's install script. This way you can start using5_lnm%  EvEN $&=depends on npm's install script. This way you can start using5_mon%* EvEN i$&Hdepends on as part of npm's install script. This way you can start using5_npo%F EvEN $&Fdepends on as part of npm's install step. This way you can start using5_oqp%< EvEN %'$'=0.6.0"5_{}|. EvEN -/-2. Add install script to your `package.json`:5_|~}. EvEN -/.2. Add `install script to your `package.json`:5_}~. EvEN -//2. Add `install` script to your `package.json`:5_~. EvEN n-/02. Add `install` `script to your `package.json`:5_. EvEN -/12. Add `install` `script` to your `package.json`:5_. EvEN $-/+2. Add `install` `script` in`package.json`:5_., EvEN %o-/,2. Add `install` `script` in `package.json`:5_6B EvEN B57OYou can use `graphquire` with jetpack, either via command line or npm's install5_6L EvEN D58SYou can use `graphquire` with jetpack, either via command line or via npm's install5_8 EvEN Ep68install6script. In both cases command to execute is following:796script. In both cases command to execute is following:5_7) EvEN Qq68>install script. In both cases command to execute is following:5_7> EvEN u68>install script. In both cases command to execute is following:5_6- EvEN 59KYou can use `graphquire` with jetpack, either via command line or via npm's5_8 EvEN 79 1. via command line or via npm's5_8 EvEN 79 1. Via command line or via npm's5_888!vN 79!1. Via command line: or via npm's5_;88!vN ;>;=5_<88!vN ;=2. or via npm's5_<88!vN ;=2. or via npm's5_<88!vN ;=2. Or via npm's5_<88!vN ;>2. Or via npm 5_>88!vN =>5_>88!vN =>MIf you'd like to use with jetpack via npm just follow nodejs instructions but5_>88!vN r=>modify install script:5_E#88!vN  DF#There is experimental module loader5_E#88!vN DF#You can use following module loader5_E$88!vN $DF$You can use following module loader 5_F88!vN 2DFYou can use browser based V[teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)EGV[teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E88!vN 6DFpYou can use browser based [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E88!vN >DF~You can use browser based module loader [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E 88!vN ?DFxYou can use browser module loader [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E"88!vN ADFyYou can use [browser module loader [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E$88!vN BDF|You can use [browser module loader]() [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E 88!vN IDFYou can use [browser module loader](http://jsm.io/jsm.js) [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_E(88!vN NDFYou can use on of [browser module loader](http://jsm.io/jsm.js) [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_EA88!vN XDFYou can use on of [browser module loaders](http://jsm.io/jsm.js) [teleport](https://github.com/Gozala/teleport/blob/experimental/npm-1.x.x/teleport.js)5_EA88!vN [sDFAYou can use on of [browser module loaders](http://jsm.io/jsm.js) 5_EA88!vN fDGAYou can use on of [browser module loaders](http://jsm.io/jsm.js).5_EL88!vN tDGOYou can use on of [browser module loaders](http://jsm.io/jsm.js) supporting AMD5_G88!vN vEGAMD / CommonJSFH / CommonJS5_F88!vN |EGAMD / CommonJS5_F88!vN EGAMD / CommonJS5_E88!vN DFKYou can use on of [browser module loaders](http://jsm.io/jsm.js) supporting5_E88!vN DFJYou can use on of browser module loaders](http://jsm.io/jsm.js) supporting5_E88!vN DFOYou can use on of many browser module loaders](http://jsm.io/jsm.js) supporting5_E88!vN DFPYou can use on of many browser [module loaders](http://jsm.io/jsm.js) supporting5_EQ88!vN DFQYou can use on of many CommonJS [module loaders](http://jsm.io/jsm.js) supporting5_EG88!vN DGGYou can use on of many CommonJS [module loaders](http://jsm.io/jsm.js) 5_G88!vN FGCommonJS5_G88!vN vFG5allowing you to load all this modules in the browser.5_QQmvN PqPR {) "cachePath": "./node_modules",\ "location": "/Users/gozala/Projects/graphquire/test/fixtures/pckg1/package.json", "metadata": { "name": "pckg1" }, "modules": { "./index.js": {" "requirements": {9 "http!foo.org/a": "http!foo.org/a.js" } },$ "http!foo.org/a.js": {+ "id": "http!foo.org/a.js"," "requirements": {< "./nested/b": "http!foo.org/nested/b.js" } },+ "http!foo.org/nested/b.js": {2 "id": "http!foo.org/nested/b.js"," "requirements": {9 "http!bar.org/c": "http!bar.org/c.js" } },$ "http!bar.org/c.js": {+ "id": "http!bar.org/c.js", } } }5_qqqvN pq 5_QpQvN Pq {V "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",! "cachePath": "./node_modules", "includesSource": true, "metadata": { "name": "pckg1" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {5 "http://foo.org/a": "http://foo.org/a.js" } }, "http://foo.org/a.js": {% "id": "http://foo.org/a.js", "requirements": {6 "./nested/b": "http://foo.org/nested/b.js" } },% "http://foo.org/nested/b.js": {, "id": "http://foo.org/nested/b.js", "requirements": {5 "http://bar.org/c": "http://bar.org/c.js" } }, "http://bar.org/c.js": {$ "id": "http://bar.org/c.js" } }}5_QQpvN yPq  {\ "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",' "cachePath": "./node_modules", "includesSource": true, "metadata": { "name": "pckg1" }, "modules": { "./index.js": {" "id": "./index.js", "requirements": {; "http://foo.org/a": "http://foo.org/a.js" } },$ "http://foo.org/a.js": {+ "id": "http://foo.org/a.js", "requirements": {< "./nested/b": "http://foo.org/nested/b.js" } },+ "http://foo.org/nested/b.js": {2 "id": "http://foo.org/nested/b.js", "requirements": {; "http://bar.org/c": "http://bar.org/c.js" } },$ "http://bar.org/c.js": {* "id": "http://bar.org/c.js" } } }5_sQpvN rtN2. You can also analyze graphs on the remote packages (Please note that source5_sNQpvN ruY2. You can also analyze dependency graphs on the remote packages (Please note that source5_tQpvN !su that source5_sMQpvN %rtM2. You can also analyze dependency graphs on the remote packages (Please note5_sBQpvN /rtB2. You can also analyze dependency graphs on the remote packages (5_sBQpvN 5rtM2. You can also analyze dependency graphs on the remote packages (--no-source5_sNQpvN 6rtN2. You can also analyze dependency graphs on the remote packages (`--no-source5_sBQpvN 9ruO2. You can also analyze dependency graphs on the remote packages (`--no-source`5_tQpvN Csu contain module `--no-source`5_t)QpvN Esu) contain module source if `--no-source`5_uQpvN Jtu that source5_uQpvN Ktu# attributes are replaced by ...):5_vQpvN Mzuwc graphquire https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_vbQpvN |{uwo graphquire --no-source https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json5_vvvwvN uw uww graphquire --no-source https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg-uncached/package.json5_v"vvwvN |uwz graphquire --no-source -v https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json5_vvvwvN vx5_xxvN wwy$ {) "cachePath": "./node_modules",j "location": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/package.json", "metadata" { "name": "pckg2",! "version": "0.0.1",D "description": "test package with remote dependencies" }, "modules": { "./index.js": {$ "id": "./index.js",# "source": "....."," "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },J "https!github.com/Gozala/models/raw/master/lib/models.js": {Q "id": "https!github.com/Gozala/models/raw/master/lib/models.js"," "source": "...."," "requirements": {Y "./events": "https!github.com/Gozala/models/raw/master/lib/events.js" } },J "https!github.com/Gozala/models/raw/master/lib/events.js": {Q "id": "https!github.com/Gozala/models/raw/master/lib/events.js"," "source": "...."," "requirements": {c "./extendables": "https!github.com/Gozala/models/raw/master/lib/extendables.js" } },O "https!github.com/Gozala/models/raw/master/lib/extendables.js": {V "id": "https!github.com/Gozala/models/raw/master/lib/extendables.js"," "source": "....." } } }5_vN  5_xxvN }w"{ "path": "./",e "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",! "cachePath": "./node_modules", "includesSource": false, "metadata": { "name": "pckg2", "version": "0.0.1",< "description": "test package with remote dependencies" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {| "https://raw.github.com/Gozala/models/master/models.js": "https://raw.github.com/Gozala/models/master/models.js" } },@ "https://raw.github.com/Gozala/models/master/models.js": {G "id": "https://raw.github.com/Gozala/models/master/models.js", "requirements": { "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js": "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js",x "https!raw.github.com/Gozala/events/v0.2.0/events.js": "https!raw.github.com/Gozala/events/v0.2.0/events.js" } },H "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js": {O "id": "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js", "isNative": true },> "https!raw.github.com/Gozala/events/v0.2.0/events.js": {E "id": "https!raw.github.com/Gozala/events/v0.2.0/events.js", "isNative": true } }}5_xvN  83. Install missing dependencies to the local filesystem:5_*xvN @3. You can install missing dependencies to the local filesystem:5_xvN E3. You can install missing dependencies of your the local filesystem:5_8xvN M3. You can install / cache missing dependencies of your the local filesystem:5_@xvN "U3. You can install / cache missing dependencies of your package the local filesystem:5_OxvN &~Z3. You can install / cache missing dependencies of your package into the local filesystem:5_xvN 6M4. No longer used dependencies can be also cleaned up by additional argument:5_xvN ;S4. Obsolete longer used dependencies can be also cleaned up by additional argument:5_2xvN EG4. Obsolete dependencies can be also cleaned up by additional argument:5_AxvN KJ4. Obsolete dependencies can be also cleaned up using additional argument:5_:#Ny9;2 graphquire --clean --write --cache-path ./5_@1Ny?AA "install": "graphquire --clean --write --cache-path ./"5_6Ny 5_Ny5_Ny5. You 5_Nz 5. Module cache by default is ''5_Nz3 value via `--cache-path` 5_$Nz5$ value via `--cache-path` argument5_N3'O5. Module cache by default is `node_modules` folder but can be set to different5_N3'% value via `--cache-path` argument.5_N3(5_N3q& `require('http://foo.org/bar')` 5_N3t' `require('https://bla.org/baz.js)`5_N3z `require('foo.org/bar')` 5_N3 `require('!bla.org/baz.js)`5_N3( `require('!bla.org/baz.js) // `5_"N3& `require('!bla.org/baz') // `5_'N3( `require('!bla.org/baz') // `5_NN3NAll other type of require's are assumed to be engine specific and are ignored.5_;,N3:<; graphquire --clean --write --encode --cache-path ./5_A9N3@BJ "install": "graphquire --clean --write --encode --cache-path ./"5_^N3]_= "http://foo.org/a": "http://foo.org/a.js"5_^)N3]_6 "foo.org/a": "http://foo.org/a.js"5_^.N3]_/ "foo.org/a": "foo.org/a.js"5_aN3`b& "http://foo.org/a.js": {5_aN3`b "foo.org/a.js": {5_bN4 ac- "id": "http://foo.org/a.js",5_ZZp v N4/Y[ "modules": { "./index.js": {$ "id": "./index.js"," "requirements": {, "foo.org/a": "foo.org/a" } }, "foo.org/a": {- "id": "http:/pfoo.org/a.js"," "requirements": {> "./nested/b": "http://foo.org/nested/b.js" } },- "http://foo.org/nested/b.js": {4 "id": "http://foo.org/nested/b.js"," "requirements": {= "http://bar.org/c": "http://bar.org/c.js" } },& "http://bar.org/c.js": {, "id": "http://bar.org/c.js" } }5_ZZZ!v N4:ZrZ\ Z\5_[[qvN4FZr{ "./index.js": { "id": "./index.js", "requirements": {$ "foo.org/a": "foo.org/a" } }, "foo.org/a": { "id": "foo.org/a", "requirements": {, "./nested/b": "foo.org/nested/b" } }, "foo.org/nested/b": {" "id": "foo.org/nested/b", "requirements": {& "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": { "id": "!bar.org/c" } }5_[[qvN4KY[ "modules": {Z\ {5_[ ZpvN4RZ\ "./index.js": {5_RZpvN4VQS {5_R ZpvN4ZQS {5_[ ZpvN4_Z\ "./index.js": {5_S ZpvN4dRT^ "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json",5_T ZpvN4fSU "uri": "./",5_RZpvN4lQR! {] "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",) "cachePath": "./node_modules"," "includesSource": true, "metadata": { "name": "pckg1" }, "modules": { "./index.js": {" "id": "./index.js", "requirements": {* "foo.org/a": "foo.org/a" } }, "foo.org/a": {! "id": "foo.org/a", "requirements": {2 "./nested/b": "foo.org/nested/b" } },! "foo.org/nested/b": {( "id": "foo.org/nested/b", "requirements": {, "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": {! "id": "!bar.org/c" } } }5_RRRvN4tQs5_RrRvN4yQs!{V "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",! "cachePath": "./node_modules", "includesSource": true, "escape": false, "metadata": { "name": "pckg1" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {$ "foo.org/a": "foo.org/a" } }, "foo.org/a": { "id": "foo.org/a", "requirements": {, "./nested/b": "foo.org/nested/b" } }, "foo.org/nested/b": {" "id": "foo.org/nested/b", "requirements": {& "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": { "id": "!bar.org/c" } }}5_RRrvN4}Qs! {\ "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",' "cachePath": "./node_modules", "includesSource": true, "escape": false, "metadata": { "name": "pckg1" }, "modules": { "./index.js": {" "id": "./index.js", "requirements": {* "foo.org/a": "foo.org/a" } }, "foo.org/a": {! "id": "foo.org/a", "requirements": {2 "./nested/b": "foo.org/nested/b" } },! "foo.org/nested/b": {( "id": "foo.org/nested/b", "requirements": {, "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": {! "id": "!bar.org/c" } } }5_zzvN6Ryy{" { "path": "./",m "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",) "cachePath": "./node_modules",# "includesSource": false, "metadata": { "name": "pckg2",! "version": "0.0.1",D "description": "test package with remote dependencies" }, "modules": { "./index.js": {$ "id": "./index.js"," "requirements": { "https://raw.github.com/Gozala/models/master/models.js": "https://raw.github.com/Gozala/models/master/models.js" } },H "https://raw.github.com/Gozala/models/master/models.js": {O "id": "https://raw.github.com/Gozala/models/master/models.js"," "requirements": { "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js": "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js", "https!raw.github.com/Gozala/events/v0.2.0/events.js": "https!raw.github.com/Gozala/events/v0.2.0/events.js" } },P "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js": {W "id": "https!raw.github.com/Gozala/extendables/v0.2.0/extendables.js",! "isNative": true },F "https!raw.github.com/Gozala/events/v0.2.0/events.js": {M "id": "https!raw.github.com/Gozala/events/v0.2.0/events.js",! "isNative": true } } }5_vN6S 5_zzvN6Wy#{ "path": "./",e "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",! "cachePath": "./node_modules", "includesSource": false, "escape": false, "metadata": { "name": "pckg2", "version": "0.0.1",< "description": "test package with remote dependencies" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {h "!raw.github.com/Gozala/models/master/models": "!raw.github.com/Gozala/models/master/models" } },6 "!raw.github.com/Gozala/models/master/models": {= "id": "!raw.github.com/Gozala/models/master/models", "requirements": {h "!raw.github.com/Gozala/events/v0.4.0/events": "!raw.github.com/Gozala/events/v0.4.0/events" } },6 "!raw.github.com/Gozala/events/v0.4.0/events": {= "id": "!raw.github.com/Gozala/events/v0.4.0/events", "requirements": {| "!raw.github.com/Gozala/extendables/v0.2.0/extendables": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } },@ "!raw.github.com/Gozala/extendables/v0.2.0/extendables": {F "id": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } }}5_zvN6|F5. You can specify cache location relative to the package defaults to  5_ GzvN6H5. You can specify cache location relative to the package defaults to ()5_  zvN6 (node_modules)5_   6v6N6  5_   6v6N67 graphquire --write --clean path/to/package.json5_   88v8N6E5. You can specify cache location relative to the package defaults to5_  88v8N6M5. You can specify package cache location relative to the package defaults to5_ 288v8N6V5. You can specify package relative cache location relative to the package defaults to5_F88v8N6R5. You can specify package relative cache path relative to the package defaults to5_88v8N6C5. You can specify package relative cache path relative defaults to(node_modules): (node_modules):5_E88v8N6S5. You can specify package relative cache path relative defaults to (node_modules):5_R88v8N6R5. You can specify package relative cache path relative defaults to node_modules):5_D88v8N6P5. You can specify package relative cache path relative defaults to node_modules5_Q88v8N6Q5. You can specify package relative cache path relative defaults to `node_modules5_D88v8N6R5. You can specify package relative cache path relative defaults to `node_modules`5_C88v8N6C5. You can specify package relative cache path relative defaults to5_/88v8N6/5. You can specify package relative cache path 5_088v8N615. You can specify package relative cache path ()5_88v8N6=5. You can specify package relative cache path (defaults to )`node_modules` `node_modules`5_J88v8N6J5. You can specify package relative cache path (defaults to `node_modules`5_788v8N67 graphquire --write --clean path/to/package.json5_8C8v8N6D graphquire --write --clean path/to/package.json --cache-path5_8C8v8N68 graphquire --write --clean path/to/package.json 5_"C8v8N67 graphquire --write --clean path/to/package.json5_!zzvN7y{# { "path": "./",m "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",) "cachePath": "./node_modules",# "includesSource": false, "escape": false, "metadata": { "name": "pckg2",! "version": "0.0.1",D "description": "test package with remote dependencies" }, "modules": { "./index.js": {$ "id": "./index.js"," "requirements": {p "!raw.github.com/Gozala/models/master/models": "!raw.github.com/Gozala/models/master/models" } },> "!raw.github.com/Gozala/models/master/models": {E "id": "!raw.github.com/Gozala/models/master/models"," "requirements": {p "!raw.github.com/Gozala/events/v0.4.0/events": "!raw.github.com/Gozala/events/v0.4.0/events" } },> "!raw.github.com/Gozala/events/v0.4.0/events": {E "id": "!raw.github.com/Gozala/events/v0.4.0/events"," "requirements": { "!raw.github.com/Gozala/extendables/v0.2.0/extendables": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } },H "!raw.github.com/Gozala/extendables/v0.2.0/extendables": {N "id": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } } }5_" !zzzvN7yy{ 5_!#"vN7 5_"$#zzvN7y"{ "path": "./",e "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",! "cachePath": "./node_modules", "includesSource": false, "metadata": { "name": "pckg2", "version": "0.0.1",< "description": "test package with remote dependencies" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {h "!raw.github.com/Gozala/models/master/models": "!raw.github.com/Gozala/models/master/models" } },6 "!raw.github.com/Gozala/models/master/models": {= "id": "!raw.github.com/Gozala/models/master/models", "requirements": {h "!raw.github.com/Gozala/events/v0.4.0/events": "!raw.github.com/Gozala/events/v0.4.0/events" } },6 "!raw.github.com/Gozala/events/v0.4.0/events": {= "id": "!raw.github.com/Gozala/events/v0.4.0/events", "requirements": {| "!raw.github.com/Gozala/extendables/v0.2.0/extendables": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } },@ "!raw.github.com/Gozala/extendables/v0.2.0/extendables": {F "id": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } }}5_#%$RRRvN7QR! {^ "path": "/Users/gozala/Projects/graphquire/test/fixtures/pckg-cached/package.json", "uri": "./",) "cachePath": "./node_modules"," "includesSource": true, "escape": false, "metadata": { "name": "pckg1" }, "modules": { "./index.js": {$ "id": "./index.js"," "requirements": {, "foo.org/a": "foo.org/a" } }, "foo.org/a": {# "id": "foo.org/a"," "requirements": {4 "./nested/b": "foo.org/nested/b" } },# "foo.org/nested/b": {* "id": "foo.org/nested/b"," "requirements": {. "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": {# "id": "!bar.org/c" } } }5_$&%PPP2v2N7OQ3 graphquire test/fixtures/pckg1/package.json5_%'&P8PP2v2N7QrPS PR5_&('rPP2v2N7qr 5_')(RqRvN7Qr {4 "path": "test/fixtures/pckg-cached/package.json", "uri": "./",! "cachePath": "./node_modules", "includesSource": true, "metadata": { "name": "pckg1" }, "modules": { "./index.js": { "id": "./index.js", "requirements": {$ "foo.org/a": "foo.org/a" } }, "foo.org/a": { "id": "foo.org/a", "requirements": {, "./nested/b": "foo.org/nested/b" } }, "foo.org/nested/b": {" "id": "foo.org/nested/b", "requirements": {& "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": { "id": "!bar.org/c" } }}5_(*)rqRvN7qr5_)*rqRvN7qr5_! zzzvN7y{# { "path": "./",m "uri": "https://raw.github.com/Gozala/graphquire/master/test/fixtures/pckg-uncached/package.json",) "cachePath": "./node_modules",# "includesSource": false, "escape": false, "metadata": { "name": "pckg2",! "version": "0.0.1",D "description": "test package with remote dependencies" }, "modules": { "./index.js": {$ "id": "./index.js"," "requirements": {p "!raw.github.com/Gozala/models/master/models": "!raw.github.com/Gozala/models/master/models" } },> "!raw.github.com/Gozala/models/master/models": {E "id": "!raw.github.com/Gozala/models/master/models"," "requirements": {p "!raw.github.com/Gozala/events/v0.4.0/events": "!raw.github.com/Gozala/events/v0.4.0/events" } },> "!raw.github.com/Gozala/events/v0.4.0/events": {E "id": "!raw.github.com/Gozala/events/v0.4.0/events"," "requirements": { "!raw.github.com/Gozala/extendables/v0.2.0/extendables": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } },H "!raw.github.com/Gozala/extendables/v0.2.0/extendables": {N "id": "!raw.github.com/Gozala/extendables/v0.2.0/extendables" } } }5_Zqq!v N47Y[ "modules": YZ{ "./index.js": { "id": "./index.js", "requirements": {$ "foo.org/a": "foo.org/a" } }, "foo.org/a": { "id": "foo.org/a", "requirements": {, "./nested/b": "foo.org/nested/b" } }, "foo.org/nested/b": {" "id": "foo.org/nested/b", "requirements": {& "!bar.org/c": "!bar.org/c" } }, "!bar.org/c": { "id": "!bar.org/c" } }5_ZZZ!v N4&Yq "modules": 5_ZZZ!v N4(Z[5_ N3to engine to deal.5_Nz8( value via `--cache-path ./` argument.5_Ny7 graphquire --write --clean path/to/package.json5_0xvN XN4. Obsolete dependencies can be also cleaned up, by using additional argument:5_9xvN [N4. Obsolete dependencies can be also cleaned up, by passi additional argument:5_E88!vN DFOYou can use on of many browser CommonJS [module loaders](http://jsm.io/jsm.js) 5_E88!vN DFUYou can use on of many browser based CommonJS [module loaders](http://jsm.io/jsm.js) 5_7 EvEN V68Ginstall script. In both cases you need command to execute is following:5_vxw( EvEN ')C1. Add `graphquire` to your package dependencies in `package.json`:5_gih$ EvEN V#%cYou can use `graphquire` to fetch all the remote npm's install script. This way you can start using5_ST]\ EvEN  `require('./foo/bar')`5_SU\T EvEN c5_TVU EvEN  require('./foo/bar')` 5_UWV EvEN  require('./bla.js')` 5_VXW EvEN  require('../baz')`5_WYX EvEN  require('./foo/bar')5_XZY EvEN  require('./bla.js')`5_Y[Z EvEN  require('./bla.js')5_Z[ EvEN  require('../baz')5_?A@; EvEN # Rdoing one thing only, but doing it well! Something to start with building [harmony5_5796DN Lauthority) of cross platform JavaScript modules connected via URLs. This wayeach doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_687N  each module doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_78N  each module can do one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_%'(&&N This project is an attempt, to build an ecosystem same principles in build a web itself. ecosystem for web development with a same web spirit:5_&'2N This project is an attempt, to build an ecosystem with same principles in build a web itself. ecosystem for web development with a same web spirit:5_ N 7[http://en.wikipedia.org/wiki/Uniform_Resource_Locator]5_$N This project is an attempt, to build, an ecosystem for building web, with a same spirit: cross-platform interoperable modules, that are fully distributed across the web, still connected via URLs. Each doing one thing only, but doing it well. No need for complicated module search logic or central authority for distribution! I’m very happy that, that’s exactly how modules are thought to work in Harmony.5_TN PQWeb is awesome, it’s cross platform, fully distributed, yet connected via URLs.5_N uBy URLs may be used to define remote dependencies. This makes packages obsolete, defining dependencies in the package5_DD5"51v1MWHCE### More CLI ###5_@5"51v1M'?A-e is experimental browser based module loader5_NMiMO5_NMi:MO5_`baq y yvMipzT "https!github.com/Gozala/models/raw/master/lib/models.js": {pq"./index.js": {_ "uri": "https://github.com/Gozala/graphquire/raw/master/test/fixtures/pckg2/index.js", "id": "./index.js", "source": "exports.name = \"main\";\nexports.dependency = require(\"https!github.com/Gozala/models/raw/master/lib/models.js\");\n", "requirements": { "https!github.com/Gozala/models/raw/master/lib/models.js": "https!github.com/Gozala/models/raw/master/lib/models.js" } },5_===.v.M⑤<> 5_;<<.v.M⑬:<5_;;;.v.M⑭:<5_;;;.v.M⑮:<5_;;;.v.M⑮:<5_vcvMSuw "source": "5_vcvMTuw "source": "...."5_v cvMOuw > /* vim:set ts=2 sw=2 sts=2 expandtab */\n/*jshint undef: true es5: true node: true devel: true\n forin: true, eqnull: true */\n/*global define: true */\n\n(typeof define === \"undefined\" ? function ($) { $(require, exports, module); } : define)(function (require, exports, module, undefined) {\n\n\"use strict\";\n\nvar EventEmitter = require(\"./events\").EventEmitter;\n\nexports.version = \"0.0.1\";\n\nvar isArray = Array.isArray;\nfunction isFunction(value) { return typeof value === \"function\"; }\nfunction getOwnPropertyDescriptors(object) {\n var descriptors = {};\n Object.getOwnPropertyNames(object).forEach(function(name) {\n descriptors[name] = Object.getOwnPropertyDescriptor(object, name);\n });\n return descriptors;\n}\nfunction extend(target) {\n Array.prototype.forEach.call(arguments, function(source) {\n if (source !== target)\n Object.defineProperties(target, getOwnPropertyDescriptors(source));\n });\n return target;\n}\n\nexports.Model = EventEmitter.extend({\n constructor: function Model(attributes, options) {\n if (!(this instanceof Model))\n return new Model(attributes, options);\n\n attributes = attributes || {};\n var defaults = this.defaults;\n if (defaults) {\n if (isFunction(defaults))\n defaults = defaults();\n attributes = extend({}, defaults, attributes);\n }\n this.attributes = {};\n this.set(attributes, { silent : true });\n if (options && 'collection' in options && options.collection)\n this.collection = options.collection;\n this.initialize(attributes, options);\n },\n isModel: true,\n isNew: function isNew() {\n return !this.id;\n },\n /**\n * The attributes property is the internal hash containing the model's state.\n * Please use set to update the attributes instead of modifying them\n * directly. If you'd like to retrieve and munge a copy of the model's\n * attributes, use `toJSON` instead.\n */\n attributes: null,\n /**\n * The defaults hash can be used to specify the default attributes for your\n * model. When creating an instance of the model, any unspecified attributes\n * will be set to their default value.\n */\n defaults: null,\n /**\n * A special property of models, the id is an arbitrary string (integer id\n * or UUID). If you set the id in the attributes hash, it will be copied onto\n * the model as a direct property. Models can be retrieved by id from\n * collections.\n */\n id: null,\n /**\n * Attribute name that is mapped to an `id` property of this model. Analog to\n * primary key in DB.\n */\n '@' : 'id',\n /**\n * Initialize is an empty function by default. Override it with your own\n * initialization logic.\n * @param {Object} attributes\n * @param {Object} options\n */\n initialize : function initialize(attributes, options) { return this; },\n /**\n * Consumer must implement custom validation logic in this method. Method is\n * called by a `set`, and is passed the attributes that are about to be\n * updated. If the model and attributes are valid, don't return anything from\n * validate. If the attributes are invalid, throw an Error of your choice. It\n * can be as simple `Error` with an error message to be displayed, or a\n * complete error object that describes the error programmatically. `set` and\n * save will not continue if validate returns an error.\n * Failed validations trigger an \"error\" event.\n * @param {Object} attributes\n * Map of key values that needs to be validated before they are set.\n */\n validate: function validate(attributes) { return attributes; },\n parse: function parse(data) { return data; },\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.attributes[attr] != null;\n },\n\n /**\n * Get the current value of an attribute from the model.\n */\n get: function get(key) {\n return this.attributes[key];\n },\n /**\n * Set a hash of attributes (one or many) on the model. If any of the\n * attributes change the models state, a \"change\" event will be triggered,\n * unless {silent: true} is passed as an option. Change events for specific\n * attributes are also triggered, and you can bind to those as well, for\n * example change:title, and change:content.\n */\n set: function set(attributes, options) {\n var changes, silent, id;\n // Validate all the attributes using internal validation mechanism. If\n // new attributes are returned that means that values were formated or\n // overridden by a validator.\n attributes = attributes.isModel ? attributes.attributes : attributes;\n attributes = this.validate(attributes);\n\n silent = options && options.silent;\n\n // Check for changes of `id`.\n if ((id = attributes[this['@']]))\n this.id = id;\n\n Object.keys(attributes).forEach(function(key) {\n var previous = this.attributes[key];\n var value = this.attributes[key] = attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }), this, options);\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes, this, options);\n\n return this;\n },\n\n clone: function clone() {\n return new this.constructor(this);\n },\n\n save: function save(attributes, options) {\n options = options || {};\n if (attributes)\n this.set(attributes, options);\n var action = this.isNew() ? \"create\" : \"update\";\n (this.constructor.sync || this.sync)(action, this, options);\n },\n\n fetch: function fetch(options) {\n options = options || {};\n var model = this;\n var success = options.success;\n options.success = function(response) {\n model.set(model.parse(response), options);\n if (success) success(model, response);\n };\n \n (this.constructor.sync || this.sync)(\"read\", this, options);\n },\n\n /**\n * Remove an attribute by deleting it from the internal attributes hash.\n * Fires a \"change\" event unless silent is passed as an option.\n */\n unset: function unset(attributes, options) {\n var changes, silent;\n\n silent = options && options.silent;\n (isArray(attributes) ? attributes : [attributes]).forEach(function(key) {\n // Check for changes of `id`.\n if (key === this['@'])\n this.id = null;\n\n var previous = this.attributes[key];\n delete this.attributes[key];\n var value = this.attributes[key];\n\n if (!silent && previous !== value) {\n this.emit(\"change:\" + key, ((changes || (changes = {}))[key] = {\n key: key, previous: previous, value: value\n }));\n }\n }, this);\n\n if (!silent && changes)\n this.emit(\"change\", changes);\n },\n /**\n * Removes all attributes from the model. Fires a \"change\" event unless\n * silent is passed as an option.\n */\n clear: function clear(options) {\n this.unset(Object.keys(this.attributes), options);\n },\n\n destroy: function destroy(options) {\n (this.constructor.sync || this.sync)(\"delete\", this, options);\n },\n\n /**\n * Return a copy of the model's attributes for JSON stringification. This can\n * be used for persistence, serialization, or for augmentation before being\n * handed off to a view. The name of this method is a bit confusing, as it\n * doesn't actually return a JSON string — but I'm afraid that it's the way\n * that the [JavaScript API for JSON.stringify works]\n * (https://developer.mozilla.org/en/JSON#toJSON()_method).\n */\n toJSON: function toJSON() {\n return JSON.parse(JSON.stringify(this.attributes));\n }\n});\n\n/**\nvar Model = require(\"mvc/model\").Model;\nvar Sidebar = Model.extend({\n promptColor: function(value) {\n this.set({ color: value });\n }\n});\n\nvar sidebar = Sidebar({ color: 'white' });\nsidebar.on('change:color', function(event) {\n console.log('color is no longer ' + event.previous + ' it is ' + event.value);\n});\nsidebar.promptColor('red');\n*/\n\n});\n",5_v cvMJuw5_ $,, v M ^! `require('http!foo.org/bar')5_ $,, v M ^! `require('http!foo.org/bar')5_ !(vM%!R5that can handle both types relative and absolute ids.5_MON)vM!BThis is an alternati obsolete 5_$M $ "name": "pckg1", "cachePath": "./node_modules",- "path": "test/fixtures/pckg1/package.json", "modules": { "pckg1": { "id": "pckg1", "path": "./index.js", "requirements": {- "http!foo.org/a": "http!foo.org/a.js" } }, "http!foo.org/a.js": { "id": "http!foo.org/a.js",/ "path": "node_modules/http!foo.org/a.js",# "uri": "http://foo.org/a.js", "requirements": {0 "./nested/b": "http!foo.org/nested/b.js" } },! "http!foo.org/nested/b.js": {' "id": "http!foo.org/nested/b.js",6 "path": "node_modules/http!foo.org/nested/b.js",* "uri": "http://foo.org/nested/b.js", "requirements": {- "http!bar.org/c": "http!bar.org/c.js" } }, "http!bar.org/c.js": { "id": "http!bar.org/c.js",/ "path": "node_modules/http!bar.org/c.js",# "uri": "http://bar.org/c.js", "requirements": {} } }}5_ M npm install graphquire5_ M sh5_ M  ```sh5_M  ```5