From 8387d4e3a31a85dc7043075a5cafdabb1ee91a43 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Fri, 1 Jun 2018 14:13:51 -0700 Subject: [PATCH] Build with TypeScript --- .gitignore | 1 + HACKING.md | 3 + bin/pump | 10 +- bin/pump-authorize | 2 +- bin/pump-create-group | 2 +- bin/pump-delete | 2 +- bin/pump-follow | 2 +- bin/pump-import-collection | 24 ++-- bin/pump-import-email | 16 +-- bin/pump-post-file | 2 +- bin/pump-post-note | 2 +- bin/pump-register-app | 2 +- bin/pump-register-user | 2 +- bin/pump-set-password | 6 +- bin/pump-show-group-inbox | 2 +- bin/pump-show-inbox | 2 +- bin/pump-show-outbox | 2 +- bin/pump-stop-following | 2 +- lib/{scrubber.js => scrubber.ts} | 19 +-- lib/version.js | 4 +- npm-shrinkwrap.json | 5 + package.json | 3 +- test/accesstoken-unit-test.js | 4 +- test/activity-api-e2e-test.js | 2 +- test/activity-content-unit-test.js | 14 +-- test/activity-unit-test.js | 56 ++++----- test/activityobject-feeds-unit-test.js | 6 +- test/activityobject-unit-test.js | 108 +++++++++--------- test/activityobject-validation-unit-test.js | 6 +- test/alert-unit-test.js | 2 +- test/app-e2e-test.js | 4 +- test/application-unit-test.js | 2 +- test/article-unit-test.js | 2 +- test/as2-unit-test.js | 2 +- test/audio-unit-test.js | 2 +- test/authc-oauth2-unit-test.js | 10 +- test/authorizationcode-unit-test.js | 2 +- test/badge-unit-test.js | 2 +- test/bearertoken-unit-test.js | 2 +- test/binary-unit-test.js | 2 +- test/bookmark-unit-test.js | 2 +- test/client-unit-test.js | 4 +- test/collection-unit-test.js | 6 +- test/comment-unit-test.js | 2 +- test/config-unit-test.js | 2 +- test/credentials-test-as-root.js | 4 +- test/credentials-unit-test.js | 2 +- test/device-unit-test.js | 2 +- test/dispatch-unit-test.js | 2 +- test/edge-unit-test.js | 2 +- test/event-unit-test.js | 2 +- test/favorite-unit-test.js | 2 +- test/file-unit-test.js | 2 +- test/filteredstream-unit-test.js | 16 +-- ...firehose-todo-test-as-root.js-unit-test.js | 2 +- test/game-unit-test.js | 2 +- test/group-inbox-api-test-as-root.js | 2 +- test/group-unit-test.js | 2 +- test/host-test-as-root.js | 6 +- test/host-unit-test.js | 4 +- test/hsts-header-e2e-test.js | 2 +- test/httperror-unit-test.js | 2 +- test/idmaker-unit-test.js | 2 +- test/image-unit-test.js | 2 +- test/issue-unit-test.js | 2 +- test/job-unit-test.js | 2 +- test/lib/app-standalone.js | 6 +- test/lib/app.js | 2 +- test/lib/http.js | 2 +- test/lib/model.js | 6 +- test/lib/oauth.js | 2 +- test/mailer-unit-test.js | 4 +- test/membership-unit-test.js | 10 +- test/middleware-unit-test.js | 8 +- test/nonce-unit-test.js | 4 +- test/note-unit-test.js | 2 +- test/oauth-authorization-e2e-test.js | 2 +- test/offer-unit-test.js | 2 +- test/organization-unit-test.js | 2 +- test/other-unit-test.js | 2 +- test/page-unit-test.js | 2 +- test/person-get-inbox-test-as-root.js | 4 +- test/person-unit-test.js | 12 +- test/place-unit-test.js | 2 +- test/plugin-e2e-test.js | 4 +- test/process-unit-test.js | 2 +- test/product-unit-test.js | 2 +- test/provider-configured-client-unit-test.js | 16 +-- test/provider-unit-test.js | 16 +-- test/proxy-route-e2e-test.js | 2 +- test/proxy-unit-test.js | 2 +- test/pumpclient-unit-test.js | 2 +- test/question-unit-test.js | 2 +- test/randomstring-unit-test.js | 2 +- test/recovery-unit-test.js | 2 +- test/remoterequesttoken-unit-test.js | 2 +- test/repair-user-unit-test.js | 10 +- test/replies-unit-test.js | 28 ++--- test/requesttoken-unit-test.js | 2 +- test/restricted-post-e2e-test.js | 2 +- test/review-unit-test.js | 2 +- test/schema-unit-test.js | 2 +- test/scrubber-unit-test.js | 2 +- test/security-headers-e2e-test.js | 2 +- test/server-header-e2e-test.js | 2 +- test/service-unit-test.js | 2 +- test/share-unit-test.js | 2 +- test/stamper-unit-test.js | 2 +- test/stream-each-unit-test.js | 6 +- test/stream-has-object-unit-test.js | 6 +- test/stream-index-unit-test.js | 6 +- test/stream-objects-unit-test.js | 12 +- test/stream-unit-test.js | 16 +-- test/task-unit-test.js | 4 +- test/update-object-e2e-test.js | 2 +- test/urlmaker-unit-test.js | 20 ++-- test/user-favorite-unit-test.js | 14 +-- test/user-inbox-api-test-as-root.js | 2 +- test/user-list-api-e2e-test.js | 2 +- test/user-list-unit-test.js | 10 +- test/user-rest-e2e-test.js | 2 +- test/user-rest-settings-e2e-test.js | 2 +- test/user-unit-test.js | 30 ++--- test/user-virtual-collection-unit-test.js | 8 +- test/uuidv5-unit-test.js | 2 +- test/video-unit-test.js | 2 +- test/web-unit-test.js | 2 +- test/xssblacklist-e2e-test.js | 2 +- tsconfig.json | 11 ++ 129 files changed, 397 insertions(+), 373 deletions(-) rename lib/{scrubber.js => scrubber.ts} (91%) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index a3b4020f0..c98c0c473 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ jspm_packages # pump.io stuff public/template/*.jade.js +dist/ diff --git a/HACKING.md b/HACKING.md index a9e73d2ea..f66c41514 100644 --- a/HACKING.md +++ b/HACKING.md @@ -9,11 +9,14 @@ Some quick documentation for hackery of pump.io. * 4-character indent, spaces only (no tabs). * double-quotes for strings. * No internal space for parentheses; so "if (foo)", not "if ( foo )". +* Use [TypeScript](http://www.typescriptlang.org/). * Use [Step](https://github.com/creationix/step). * Use [Lodash](https://lodash.com/). * Use [databank](https://github.com/evanp/databank). Don't write to some storage engine's API. * Use [vows](http://vowsjs.org/). +TypeScript is built with `npm run build`. + You can check for (most) style violations with `npm run lint:jscs`, and you can check for JSHint errors with `npm run lint:jshint`. ## TEMPLATES diff --git a/bin/pump b/bin/pump index 59f74c668..25143375f 100755 --- a/bin/pump +++ b/bin/pump @@ -30,8 +30,8 @@ var cluster = require("cluster"), Logger = require("bunyan"), _ = require("lodash"), importFresh = require("import-fresh"), - configUtil = require("../lib/config"), - restartEpoch = require("../lib/zerodowntime"), + configUtil = require("../dist/lib/config"), + restartEpoch = require("../dist/lib/zerodowntime"), restartInflight = false, abortedRestart = false, restartedWorker = null, @@ -84,8 +84,8 @@ var cluster = require("cluster"), .alias("version", "v") .version() .argv, - Dispatch = require("../lib/dispatch"), - makeApp = require("../lib/app").makeApp; + Dispatch = require("../dist/lib/dispatch"), + makeApp = require("../dist/lib/app").makeApp; // We first get config files and launch some cluster apps @@ -171,7 +171,7 @@ var launchApps = function(configBase) { clusterLog.debug("Determining zero-downtime restart eligibility..."); - var newEpoch = importFresh("../lib/zerodowntime"); + var newEpoch = importFresh("../dist/lib/zerodowntime"); if (newEpoch !== restartEpoch) { clusterLog.warn("Refusing zero-downtime restart because the new version says it's incompatible with us."); return; diff --git a/bin/pump-authorize b/bin/pump-authorize index c5f88fc73..a24eb84e0 100755 --- a/bin/pump-authorize +++ b/bin/pump-authorize @@ -28,7 +28,7 @@ var urlfmt = require("url").format, _ = require("lodash"), Step = require("step"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), clientCred = common.clientCred, setUserCred = common.setUserCred, OAuth = require("oauth-evanp").OAuth, diff --git a/bin/pump-create-group b/bin/pump-create-group index 832ffadf1..f0a0e12f2 100755 --- a/bin/pump-create-group +++ b/bin/pump-create-group @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, argv = require("optimist") diff --git a/bin/pump-delete b/bin/pump-delete index aff696f37..a86908b81 100755 --- a/bin/pump-delete +++ b/bin/pump-delete @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, delJSON = common.delJSON, diff --git a/bin/pump-follow b/bin/pump-follow index 58b8f1aac..b9fa7c47c 100755 --- a/bin/pump-follow +++ b/bin/pump-follow @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, argv = require("optimist") diff --git a/bin/pump-import-collection b/bin/pump-import-collection index a8ffc3004..021bd0523 100755 --- a/bin/pump-import-collection +++ b/bin/pump-import-collection @@ -32,18 +32,18 @@ var fs = require("fs"), databank = require("databank"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - randomString = require("../lib/randomstring").randomString, - IDMaker = require("../lib/idmaker").IDMaker, - Distributor = require("../lib/distributor").Distributor, - schema = require("../lib/schema").schema, - Activity = require("../lib/model/activity").Activity, - Stream = require("../lib/model/stream").Stream, - Person = require("../lib/model/person").Person, - Group = require("../lib/model/group").Group, - Collection = require("../lib/model/collection").Collection, - ActivityObject = require("../lib/model/activityobject").ActivityObject, - URLMaker = require("../lib/urlmaker").URLMaker, - User = require("../lib/model/user").User, + randomString = require("../dist/lib/randomstring").randomString, + IDMaker = require("../dist/lib/idmaker").IDMaker, + Distributor = require("../dist/lib/distributor").Distributor, + schema = require("../dist/lib/schema").schema, + Activity = require("../dist/lib/model/activity").Activity, + Stream = require("../dist/lib/model/stream").Stream, + Person = require("../dist/lib/model/person").Person, + Group = require("../dist/lib/model/group").Group, + Collection = require("../dist/lib/model/collection").Collection, + ActivityObject = require("../dist/lib/model/activityobject").ActivityObject, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + User = require("../dist/lib/model/user").User, argv = require("optimist") .usage("Usage: $0 -f or $0 -d ") .alias("f", "file") diff --git a/bin/pump-import-email b/bin/pump-import-email index cb9623822..c7dadf54f 100755 --- a/bin/pump-import-email +++ b/bin/pump-import-email @@ -32,14 +32,14 @@ var fs = require("fs"), databank = require("databank"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - randomString = require("../lib/randomstring").randomString, - Distributor = require("../lib/distributor").Distributor, - schema = require("../lib/schema").schema, - Activity = require("../lib/model/activity").Activity, - Stream = require("../lib/model/stream").Stream, - ActivityObject = require("../lib/model/activityobject").ActivityObject, - URLMaker = require("../lib/urlmaker").URLMaker, - User = require("../lib/model/user").User, + randomString = require("../dist/lib/randomstring").randomString, + Distributor = require("../dist/lib/distributor").Distributor, + schema = require("../dist/lib/schema").schema, + Activity = require("../dist/lib/model/activity").Activity, + Stream = require("../dist/lib/model/stream").Stream, + ActivityObject = require("../dist/lib/model/activityobject").ActivityObject, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + User = require("../dist/lib/model/user").User, argv = require("optimist") .usage("Usage: $0 -f ") .demand(["f"]) diff --git a/bin/pump-post-file b/bin/pump-post-file index 123762772..e4c28d92c 100755 --- a/bin/pump-post-file +++ b/bin/pump-post-file @@ -27,7 +27,7 @@ var fs = require("fs"), _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, postData = common.postData, diff --git a/bin/pump-post-note b/bin/pump-post-note index 98894bfe8..9c9c66fb1 100755 --- a/bin/pump-post-note +++ b/bin/pump-post-note @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, argv = require("optimist") diff --git a/bin/pump-register-app b/bin/pump-register-app index a9543d6fc..0fb026191 100755 --- a/bin/pump-register-app +++ b/bin/pump-register-app @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), postArgs = common.postArgs, setClientCred = common.setClientCred; diff --git a/bin/pump-register-user b/bin/pump-register-user index 3080f36c1..3dda5fede 100755 --- a/bin/pump-register-user +++ b/bin/pump-register-user @@ -26,7 +26,7 @@ var _ = require("lodash"), url = require("url"), Step = require("step"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), clientCred = common.clientCred, setUserCred = common.setUserCred, postJSON = common.postJSON, diff --git a/bin/pump-set-password b/bin/pump-set-password index 8276d2765..57b844139 100755 --- a/bin/pump-set-password +++ b/bin/pump-set-password @@ -31,9 +31,9 @@ var fs = require("fs"), databank = require("databank"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, - User = require("../lib/model/user").User, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + User = require("../dist/lib/model/user").User, argv = require("optimist") .usage("Usage: $0 -u -p ") .demand(["u", "p"]) diff --git a/bin/pump-show-group-inbox b/bin/pump-show-group-inbox index 6bcfc52bb..d6f246036 100755 --- a/bin/pump-show-group-inbox +++ b/bin/pump-show-group-inbox @@ -27,7 +27,7 @@ var fs = require("fs"), _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, getJSON = common.getJSON, argv = require("optimist") diff --git a/bin/pump-show-inbox b/bin/pump-show-inbox index f731ae2b4..eeb1d9ff2 100755 --- a/bin/pump-show-inbox +++ b/bin/pump-show-inbox @@ -27,7 +27,7 @@ var fs = require("fs"), _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, getJSON = common.getJSON, argv = require("optimist") diff --git a/bin/pump-show-outbox b/bin/pump-show-outbox index 44983fb9b..f397a7eef 100755 --- a/bin/pump-show-outbox +++ b/bin/pump-show-outbox @@ -27,7 +27,7 @@ var fs = require("fs"), _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, getJSON = common.getJSON, argv = require("optimist") diff --git a/bin/pump-stop-following b/bin/pump-stop-following index 8e8a995b9..f10561c76 100755 --- a/bin/pump-stop-following +++ b/bin/pump-stop-following @@ -25,7 +25,7 @@ var _ = require("lodash"), Step = require("step"), url = require("url"), - common = require("../lib/pumpclient"), + common = require("../dist/lib/pumpclient"), userCred = common.userCred, postJSON = common.postJSON, argv = require("optimist") diff --git a/lib/scrubber.js b/lib/scrubber.ts similarity index 91% rename from lib/scrubber.js rename to lib/scrubber.ts index a1230ac0f..973614679 100644 --- a/lib/scrubber.js +++ b/lib/scrubber.ts @@ -19,15 +19,19 @@ "use strict"; -var _ = require("lodash"), - jsdom = require("jsdom/lib/old-api.js"), - window = jsdom.jsdom("", { +import _ = require("lodash"); +import jsdom = require("jsdom/lib/old-api.js"); + +var window = jsdom.jsdom("", { features: { FetchExternalResources: false, ProcessExternalResources: false } - }).defaultView, - DOMPurify = require("dompurify")(window); + }).defaultView; + +import DOMPurifyInit = require("dompurify") + +var DOMPurify = DOMPurifyInit(window); var Scrubber = { scrub: DOMPurify.sanitize, @@ -124,8 +128,5 @@ var Scrubber = { } }; -// So you can require("scrubber").Scrubber or just require("scrubber") - -Scrubber.Scrubber = Scrubber; +export = Scrubber; -module.exports = Scrubber; diff --git a/lib/version.js b/lib/version.js index 5c6431e69..cf8b02bca 100644 --- a/lib/version.js +++ b/lib/version.js @@ -18,4 +18,6 @@ "use strict"; -module.exports.version = require("../package.json").version; +// Weird path because this ends up in dist/ + +module.exports.version = require("../../package.json").version; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 12420a602..6e6ea26e2 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -7333,6 +7333,11 @@ "mime-types": "~2.1.18" } }, + "typescript": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", + "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==" + }, "ua-parser-js": { "version": "0.7.18", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", diff --git a/package.json b/package.json index cddf5e083..53d5139ed 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "sockjs": "0.3.x", "ssl-config": "^1.0.0", "step": "^1.0.0", + "typescript": "2.9.1", "ua-parser-js": "^0.7.10", "uuid": "^3.0.0", "validator": "^10.0.0", @@ -77,7 +78,7 @@ "./doc/pump.1" ], "scripts": { - "build": "jade --client --extension jade.js --no-debug public/template/*.jade", + "build": "tsc && jade --client --extension jade.js --no-debug public/template/*.jade", "fullbuild": "npm run build && echo 'use `npm run build` instead next time' 1>&2", "test": "npm run lint && nyc -r lcov npm run test:vows", "test:oauth2": "vows test/authenticationcode-test.js test/bearertoken-test.js test/oauth2-authorization-test.js test/schema-test.js test/authc-oauth2-test.js", diff --git a/test/accesstoken-unit-test.js b/test/accesstoken-unit-test.js index fa0d37852..b20994f46 100644 --- a/test/accesstoken-unit-test.js +++ b/test/accesstoken-unit-test.js @@ -21,9 +21,9 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, - AccessToken = require("../lib/model/accesstoken").AccessToken, + AccessToken = require("../dist/lib/model/accesstoken").AccessToken, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/activity-api-e2e-test.js b/test/activity-api-e2e-test.js index b5385db26..5dd4ddf63 100644 --- a/test/activity-api-e2e-test.js +++ b/test/activity-api-e2e-test.js @@ -23,7 +23,7 @@ var assert = require("assert"), Step = require("step"), _ = require("lodash"), http = require("http"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, urlparse = require("url").parse, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), diff --git a/test/activity-content-unit-test.js b/test/activity-content-unit-test.js index 1ee79a390..0744022ce 100644 --- a/test/activity-content-unit-test.js +++ b/test/activity-content-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), _ = require("lodash"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -39,7 +39,7 @@ var contentCheck = function(actor, verb, object, expected) { return { topic: function(Activity) { var callback = this.callback, - Collection = require("../lib/model/collection").Collection, + Collection = require("../dist/lib/model/collection").Collection, thePublic = { objectType: "collection", id: Collection.PUBLIC @@ -110,7 +110,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/activity"); + mod = require("../dist/lib/model/activity"); if (!mod) { cb(new Error("No module"), null); @@ -180,7 +180,7 @@ suite.addBatch({ "Lorrie Tynan posted a comment in reply to an image"), "and we create a person": { topic: function(Activity) { - var Person = require("../lib/model/person").Person, + var Person = require("../dist/lib/model/person").Person, callback = this.callback; Person.create({id: "urn:uuid:3e2273f4-fec7-11e2-9db1-32b36b1a1850", displayName: "Endicott Pettibone"}, @@ -202,7 +202,7 @@ suite.addBatch({ }, "and we create an image": { topic: function(Activity) { - var Image = require("../lib/model/image").Image, + var Image = require("../dist/lib/model/image").Image, callback = this.callback; Image.create({id: "urn:uuid:1731d374-fec8-11e2-87ba-32b36b1a1850", displayName: "John the Baptist"}, @@ -224,7 +224,7 @@ suite.addBatch({ }, "and we create an article": { topic: function(Activity) { - var Article = require("../lib/model/article").Article, + var Article = require("../dist/lib/model/article").Article, callback = this.callback; Article.create({id: "urn:uuid:af6ecc82-fec8-11e2-ac18-32b36b1a1850", displayName: "The End of History"}, diff --git a/test/activity-unit-test.js b/test/activity-unit-test.js index 35ed4ee66..c36724869 100644 --- a/test/activity-unit-test.js +++ b/test/activity-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), _ = require("lodash"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -234,7 +234,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/activity"); + mod = require("../dist/lib/model/activity"); if (!mod) { cb(new Error("No module"), null); @@ -322,7 +322,7 @@ suite.addBatch({ }, "and we fetch its object": { topic: function(activity) { - var Note = require("../lib/model/note").Note; + var Note = require("../dist/lib/model/note").Note; Note.get(activity.object.id, this.callback); }, "it exists": function(err, note) { @@ -348,7 +348,7 @@ suite.addBatch({ assert.ifError(err); assert.isObject(activity); assert.instanceOf(activity, - require("../lib/model/activity").Activity); + require("../dist/lib/model/activity").Activity); }, "its object properties have ids": function(err, activity) { assert.isString(activity.actor.id); @@ -356,9 +356,9 @@ suite.addBatch({ }, "its object properties are objects": function(err, activity) { assert.isObject(activity.actor); - assert.instanceOf(activity.actor, require("../lib/model/person").Person); + assert.instanceOf(activity.actor, require("../dist/lib/model/person").Person); assert.isObject(activity.object); - assert.instanceOf(activity.object, require("../lib/model/note").Note); + assert.instanceOf(activity.object, require("../dist/lib/model/note").Note); }, "its object properties are expanded": function(err, activity) { assert.isString(activity.actor.displayName); @@ -387,9 +387,9 @@ suite.addBatch({ }, "its object properties are objects": function(err, activity) { assert.isObject(activity.actor); - assert.instanceOf(activity.actor, require("../lib/model/person").Person); + assert.instanceOf(activity.actor, require("../dist/lib/model/person").Person); assert.isObject(activity.object); - assert.instanceOf(activity.object, require("../lib/model/note").Note); + assert.instanceOf(activity.object, require("../dist/lib/model/note").Note); }, "its object property has a likes property": function(err, activity) { assert.ifError(err); @@ -405,7 +405,7 @@ suite.addBatch({ }, "and we apply() a new follow activity": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, users = {}, cb = this.callback; @@ -540,7 +540,7 @@ suite.addBatch({ }, "and we sanitize() an activity for the actor": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, user, cb = this.callback; @@ -606,7 +606,7 @@ suite.addBatch({ }, "and we sanitize() an activity for another user": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, user1, user2, cb = this.callback; @@ -674,7 +674,7 @@ suite.addBatch({ }, "and we sanitize() an activity for anonymous user": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, cb = this.callback; Step( @@ -738,7 +738,7 @@ suite.addBatch({ }, "and we check if a direct addressee is a recipient": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, cb = this.callback, p1 = { objectType: "person", @@ -781,8 +781,8 @@ suite.addBatch({ }, "and we check if empty user is a recipient of a public activity": { topic: function(Activity) { - var User = require("../lib/model/user").User, - Collection = require("../lib/model/collection").Collection, + var User = require("../dist/lib/model/user").User, + Collection = require("../dist/lib/model/collection").Collection, cb = this.callback, p1 = { objectType: "person", @@ -825,8 +825,8 @@ suite.addBatch({ }, "and we check if a random user is a recipient of a public activity": { topic: function(Activity) { - var User = require("../lib/model/user").User, - Collection = require("../lib/model/collection").Collection, + var User = require("../dist/lib/model/user").User, + Collection = require("../dist/lib/model/collection").Collection, cb = this.callback, p1 = { objectType: "person", @@ -873,7 +873,7 @@ suite.addBatch({ }, "and we check if a random person is a recipient of a directed activity": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, cb = this.callback, p1 = { objectType: "person", @@ -920,8 +920,8 @@ suite.addBatch({ }, "and we check if a list member is a recipient of an activity sent to a list": { topic: function(Activity) { - var User = require("../lib/model/user").User, - Collection = require("../lib/model/collection").Collection, + var User = require("../dist/lib/model/user").User, + Collection = require("../dist/lib/model/collection").Collection, cb = this.callback, user1, user2, @@ -993,7 +993,7 @@ suite.addBatch({ }, "and we check if a follower is a recipient of an activity sent to followers": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, cb = this.callback, user1, user2; @@ -1058,7 +1058,7 @@ suite.addBatch({ }, "and we check if a non-follower is a recipient of an activity sent to followers": { topic: function(Activity) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, cb = this.callback, user1, user2; @@ -1119,8 +1119,8 @@ suite.addBatch({ }, "and we check if a list non-member is a recipient of an activity sent to a list": { topic: function(Activity) { - var User = require("../lib/model/user").User, - Collection = require("../lib/model/collection").Collection, + var User = require("../dist/lib/model/user").User, + Collection = require("../dist/lib/model/collection").Collection, cb = this.callback, user1, user2, @@ -1182,7 +1182,7 @@ suite.addBatch({ }, "and we look for the post activity of a known object": { topic: function(Activity) { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, cb = this.callback, p1 = { objectType: "person", @@ -1231,7 +1231,7 @@ suite.addBatch({ }, "and we look for the post activity of an unposted object": { topic: function(Activity) { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, cb = this.callback; Step( @@ -1417,7 +1417,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/activity"); + mod = require("../dist/lib/model/activity"); if (!mod) { cb(new Error("No module"), null); diff --git a/test/activityobject-feeds-unit-test.js b/test/activityobject-feeds-unit-test.js index 374e02916..47d8aa5f8 100644 --- a/test/activityobject-feeds-unit-test.js +++ b/test/activityobject-feeds-unit-test.js @@ -27,8 +27,8 @@ var assert = require("assert"), path = require("path"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker; + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker; var suite = vows.describe("activityobject feeds interface"); @@ -53,7 +53,7 @@ suite.addBatch({ DatabankObject.bank = db; - cls = require("../lib/model/activityobject").ActivityObject; + cls = require("../dist/lib/model/activityobject").ActivityObject; cb(null, cls); }); diff --git a/test/activityobject-unit-test.js b/test/activityobject-unit-test.js index b594795bf..3e431385d 100644 --- a/test/activityobject-unit-test.js +++ b/test/activityobject-unit-test.js @@ -27,8 +27,8 @@ var assert = require("assert"), path = require("path"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker; + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker; var suite = vows.describe("activityobject class interface"); @@ -53,7 +53,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/activityobject") || null; + mod = require("../dist/lib/model/activityobject") || null; cb(null, mod); }); @@ -163,7 +163,7 @@ suite.addBatch({ return ActivityObject.toClass(ActivityObject.VIDEO); }, "it returns the right one": function(Video) { - assert.equal(Video, require("../lib/model/video").Video); + assert.equal(Video, require("../dist/lib/model/video").Video); } }, "and we get a class by unknown typename": { @@ -171,7 +171,7 @@ suite.addBatch({ return ActivityObject.toClass("http://underwear.example/type/boxer-briefs"); }, "it returns the Other": function(Other) { - assert.equal(Other, require("../lib/model/other").Other); + assert.equal(Other, require("../dist/lib/model/other").Other); } }, "and we get an object by properties": { @@ -187,7 +187,7 @@ suite.addBatch({ assert.isObject(review); }, "it is the right type": function(review) { - assert.instanceOf(review, require("../lib/model/review").Review); + assert.instanceOf(review, require("../dist/lib/model/review").Review); }, "it has the right properties": function(review) { assert.equal(review.objectType, "review"); @@ -234,7 +234,7 @@ suite.addBatch({ return ActivityObject.toObject(props); }, "it is an Other": function(user) { - assert.instanceOf(user, require("../lib/model/other").Other); + assert.instanceOf(user, require("../dist/lib/model/other").Other); assert.equal(user.objectType, "user"); } }, @@ -247,7 +247,7 @@ suite.addBatch({ return ActivityObject.toObject(props); }, "it is an Other": function(cinnamon) { - assert.instanceOf(cinnamon, require("../lib/model/other").Other); + assert.instanceOf(cinnamon, require("../dist/lib/model/other").Other); assert.equal(cinnamon.objectType, "http://condiment.example/type/spice"); } }, @@ -271,7 +271,7 @@ suite.addBatch({ assert.isObject(article); }, "it has the right class": function(err, article) { - assert.instanceOf(article, require("../lib/model/article").Article); + assert.instanceOf(article, require("../dist/lib/model/article").Article); }, "it has the right passed-in attributes": function(err, article) { assert.equal(article.objectType, "article"); @@ -293,7 +293,7 @@ suite.addBatch({ assert.isObject(article); }, "it has the right class": function(err, article) { - assert.instanceOf(article, require("../lib/model/article").Article); + assert.instanceOf(article, require("../dist/lib/model/article").Article); }, "it has the right passed-in attributes": function(err, article) { assert.equal(article.objectType, "article"); @@ -317,7 +317,7 @@ suite.addBatch({ "it works": function(err, seed) { assert.ifError(err); assert.isObject(seed); - assert.instanceOf(seed, require("../lib/model/other").Other); + assert.instanceOf(seed, require("../dist/lib/model/other").Other); assert.equal(seed.objectType, "http://orange.example/type/seed"); } }, @@ -342,7 +342,7 @@ suite.addBatch({ assert.isObject(group); }, "it has the right class": function(err, group) { - assert.instanceOf(group, require("../lib/model/group").Group); + assert.instanceOf(group, require("../dist/lib/model/group").Group); }, "it has the right passed-in attributes": function(err, group) { assert.equal(group.objectType, "group"); @@ -355,7 +355,7 @@ suite.addBatch({ "and we ensure an existing activityobject object": { topic: function(ActivityObject) { var cb = this.callback, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, props = { objectType: ActivityObject.COMMENT, content: "FIRST POST", @@ -387,7 +387,7 @@ suite.addBatch({ assert.isObject(comment); }, "it has the right class": function(err, comment) { - assert.instanceOf(comment, require("../lib/model/comment").Comment); + assert.instanceOf(comment, require("../dist/lib/model/comment").Comment); }, "it has the right passed-in attributes": function(err, comment) { assert.equal(comment.objectType, "comment"); @@ -419,15 +419,15 @@ suite.addBatch({ assert.isObject(spoon); }, "it has the right class": function(err, spoon) { - assert.instanceOf(spoon, require("../lib/model/other").Other); + assert.instanceOf(spoon, require("../dist/lib/model/other").Other); assert.equal(spoon.objectType, "http://utensil.example/type/spoon"); } }, "and we ensure an existing object property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, - Person = require("../lib/model/person").Person, + Image = require("../dist/lib/model/image").Image, + Person = require("../dist/lib/model/person").Person, image = new Image({ author: { id: "urn:uuid:c3a7bd6e-fecb-11e2-ae9d-32b36b1a1850", @@ -451,7 +451,7 @@ suite.addBatch({ assert.ifError(err); assert.include(image, "author"); assert.isObject(image.author); - assert.instanceOf(image.author, require("../lib/model/person").Person); + assert.instanceOf(image.author, require("../dist/lib/model/person").Person); assert.include(image.author, "id"); assert.isString(image.author.id); assert.equal(image.author.id, "urn:uuid:c3a7bd6e-fecb-11e2-ae9d-32b36b1a1850"); @@ -464,8 +464,8 @@ suite.addBatch({ "and we compress an existing object property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, - Person = require("../lib/model/person").Person, + Image = require("../dist/lib/model/image").Image, + Person = require("../dist/lib/model/person").Person, image = new Image({ author: { id: "urn:uuid:8a9d0e92-3210-4ea3-920f-3950ca8d5306", @@ -489,7 +489,7 @@ suite.addBatch({ assert.ifError(err); assert.include(image, "author"); assert.isObject(image.author); - assert.instanceOf(image.author, require("../lib/model/person").Person); + assert.instanceOf(image.author, require("../dist/lib/model/person").Person); assert.include(image.author, "id"); assert.isString(image.author.id); assert.equal(image.author.id, "urn:uuid:8a9d0e92-3210-4ea3-920f-3950ca8d5306"); @@ -502,7 +502,7 @@ suite.addBatch({ "and we compress a non-existent object property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, + Image = require("../dist/lib/model/image").Image, image = new Image({ url: "http://example.net/images/2.jpg" }); @@ -525,8 +525,8 @@ suite.addBatch({ "and we expand an existing object property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, - Person = require("../lib/model/person").Person, + Image = require("../dist/lib/model/image").Image, + Person = require("../dist/lib/model/person").Person, image; Step( @@ -559,7 +559,7 @@ suite.addBatch({ assert.ifError(err); assert.include(image, "author"); assert.isObject(image.author); - assert.instanceOf(image.author, require("../lib/model/person").Person); + assert.instanceOf(image.author, require("../dist/lib/model/person").Person); assert.include(image.author, "id"); assert.isString(image.author.id); assert.equal(image.author.id, "urn:uuid:bbd313d1-6f8d-4d72-bc05-bde69ba795d7"); @@ -574,7 +574,7 @@ suite.addBatch({ "and we expand a non-existent object property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, + Image = require("../dist/lib/model/image").Image, image = new Image({ url: "http://example.net/images/4.jpg" }); @@ -597,7 +597,7 @@ suite.addBatch({ "and we compress a scalar property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, + Image = require("../dist/lib/model/image").Image, image = new Image({ url: "http://example.net/images/5.jpg" }); @@ -621,7 +621,7 @@ suite.addBatch({ "and we expand a scalar property of an object": { topic: function(ActivityObject) { var cb = this.callback, - Image = require("../lib/model/image").Image, + Image = require("../dist/lib/model/image").Image, image = new Image({ url: "http://example.net/images/6.jpg" }); @@ -645,8 +645,8 @@ suite.addBatch({ "and we create an activityobject with an author": { topic: function(ActivityObject) { var cb = this.callback, - Note = require("../lib/model/note").Note, - Person = require("../lib/model/person").Person, + Note = require("../dist/lib/model/note").Note, + Person = require("../dist/lib/model/person").Person, props = { objectType: ActivityObject.NOTE, content: "HELLO WORLD" @@ -683,8 +683,8 @@ suite.addBatch({ "and we create an activityobject with an author reference": { topic: function(ActivityObject) { var cb = this.callback, - Note = require("../lib/model/note").Note, - Person = require("../lib/model/person").Person, + Note = require("../dist/lib/model/note").Note, + Person = require("../dist/lib/model/person").Person, props = { objectType: ActivityObject.NOTE, content: "HELLO WORLD" @@ -722,8 +722,8 @@ suite.addBatch({ "and we update an activityobject with an author": { topic: function(ActivityObject) { var cb = this.callback, - Note = require("../lib/model/note").Note, - Person = require("../lib/model/person").Person, + Note = require("../dist/lib/model/note").Note, + Person = require("../dist/lib/model/person").Person, props = { objectType: ActivityObject.NOTE, content: "HELLO WORLD" @@ -764,8 +764,8 @@ suite.addBatch({ "and we update an activityobject with an author reference": { topic: function(ActivityObject) { var cb = this.callback, - Note = require("../lib/model/note").Note, - Person = require("../lib/model/person").Person, + Note = require("../dist/lib/model/note").Note, + Person = require("../dist/lib/model/person").Person, props = { objectType: ActivityObject.NOTE, content: "HELLO WORLD" @@ -821,7 +821,7 @@ suite.addBatch({ "and we get an empty object stream": { topic: function(ActivityObject) { var cb = this.callback, - Stream = require("../lib/model/stream").Stream; + Stream = require("../dist/lib/model/stream").Stream; Step( function() { @@ -845,8 +845,8 @@ suite.addBatch({ "and we get an object stream with stuff in it": { topic: function(ActivityObject) { var cb = this.callback, - Stream = require("../lib/model/stream").Stream, - Service = require("../lib/model/service").Service, + Stream = require("../dist/lib/model/stream").Stream, + Service = require("../dist/lib/model/service").Service, stream; Step( @@ -883,7 +883,7 @@ suite.addBatch({ assert.lengthOf(objects, 20); }, "members are the correct type": function(err, objects) { - var Service = require("../lib/model/service").Service; + var Service = require("../dist/lib/model/service").Service; assert.ifError(err); for (var i = 0; i < objects.length; i++) { assert.isObject(objects[i]); @@ -894,7 +894,7 @@ suite.addBatch({ "and we get the favoriters of a brand-new object": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place; + Place = require("../dist/lib/model/place").Place; Step( function() { @@ -927,7 +927,7 @@ suite.addBatch({ "and we get the favoriters count of a brand-new object": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place; + Place = require("../dist/lib/model/place").Place; Step( function() { @@ -959,8 +959,8 @@ suite.addBatch({ "and we add a favoriter for an object": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place, - Person = require("../lib/model/person").Person, + Place = require("../dist/lib/model/place").Place, + Person = require("../dist/lib/model/person").Person, place = null, person = null; @@ -1026,8 +1026,8 @@ suite.addBatch({ "and we add then remove a favoriter for an object": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place, - Person = require("../lib/model/person").Person, + Place = require("../dist/lib/model/place").Place, + Person = require("../dist/lib/model/person").Person, place = null, person = null; @@ -1090,7 +1090,7 @@ suite.addBatch({ "and we expand the feeds for an object": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place, + Place = require("../dist/lib/model/place").Place, place = null; Step( @@ -1129,7 +1129,7 @@ suite.addBatch({ "and we create then efface an object": { topic: function(ActivityObject) { var cb = this.callback, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, comment; Step( @@ -1219,7 +1219,7 @@ suite.addBatch({ }, "and we check if a person is followable": { topic: function(ActivityObject) { - var Person = require("../lib/model/person").Person, + var Person = require("../dist/lib/model/person").Person, joey = new Person({displayName: "Joey", objectType: "person"}); return joey.isFollowable(); }, @@ -1229,7 +1229,7 @@ suite.addBatch({ }, "and we check if a review is followable": { topic: function(ActivityObject) { - var Review = require("../lib/model/review").Review, + var Review = require("../dist/lib/model/review").Review, badReview = new Review({displayName: "You suck", objectType: "review"}); return badReview.isFollowable(); }, @@ -1239,7 +1239,7 @@ suite.addBatch({ }, "and we check if an object with an activity outbox is followable": { topic: function(ActivityObject) { - var Review = require("../lib/model/review").Review, + var Review = require("../dist/lib/model/review").Review, badReview = new Review({displayName: "You suck", objectType: "review", links: { @@ -1306,7 +1306,7 @@ suite.addBatch({ "and we get a stream of favoriters": { topic: function(ActivityObject) { var cb = this.callback, - Place = require("../lib/model/place").Place, + Place = require("../dist/lib/model/place").Place, place = null; Step( @@ -1336,7 +1336,7 @@ suite.addBatch({ }, "and we get the string of an object with no id": { topic: function(ActivityObject) { - var Game = require("../lib/model/game").Game, + var Game = require("../dist/lib/model/game").Game, game = new Game({objectType: "game"}); return game.toString(); @@ -1347,7 +1347,7 @@ suite.addBatch({ }, "and we get the string of an object with an id": { topic: function(ActivityObject) { - var Game = require("../lib/model/game").Game, + var Game = require("../dist/lib/model/game").Game, game = new Game({objectType: "game", id: "urn:uuid:c52b69b6-b717-11e2-9d1e-2c8158efb9e9"}); diff --git a/test/activityobject-validation-unit-test.js b/test/activityobject-validation-unit-test.js index 4513c920b..7512a597d 100644 --- a/test/activityobject-validation-unit-test.js +++ b/test/activityobject-validation-unit-test.js @@ -27,8 +27,8 @@ var assert = require("assert"), path = require("path"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker; + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker; var suite = vows.describe("activityobject class interface"); @@ -53,7 +53,7 @@ suite.addBatch({ DatabankObject.bank = db; - cls = require("../lib/model/activityobject").ActivityObject || null; + cls = require("../dist/lib/model/activityobject").ActivityObject || null; cb(null, cls); }); diff --git a/test/alert-unit-test.js b/test/alert-unit-test.js index 5c60ea916..3dcb07b13 100644 --- a/test/alert-unit-test.js +++ b/test/alert-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/app-e2e-test.js b/test/app-e2e-test.js index 04ac6ea8d..27e927d83 100644 --- a/test/app-e2e-test.js +++ b/test/app-e2e-test.js @@ -35,7 +35,7 @@ suite.addBatch({ "When we get the app module": { topic: function() { // lib/app.js expects to be run in a cluster worker with cluster.worker.on, etc. - return proxyquire("../lib/app", { + return proxyquire("../dist/lib/app", { cluster: { worker: { on: ignore, @@ -67,7 +67,7 @@ suite.addBatch({ nologger: true, sockjs: false }, - makeApp = require("../lib/app").makeApp; + makeApp = require("../dist/lib/app").makeApp; process.env.NODE_ENV = "test"; diff --git a/test/application-unit-test.js b/test/application-unit-test.js index 4b94f3f9d..7a9c2305f 100644 --- a/test/application-unit-test.js +++ b/test/application-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/article-unit-test.js b/test/article-unit-test.js index 85d294370..986dde93a 100644 --- a/test/article-unit-test.js +++ b/test/article-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/as2-unit-test.js b/test/as2-unit-test.js index fcfb1ac76..0a200ab54 100644 --- a/test/as2-unit-test.js +++ b/test/as2-unit-test.js @@ -56,7 +56,7 @@ var testVocabConversion = function(verb, newVerb) { suite.addBatch({ "When we get the AS2 conversion module": { topic: function() { - return require("../lib/as2"); + return require("../dist/lib/as2"); }, "it works": function(err, as2) { assert.ifError(err); diff --git a/test/audio-unit-test.js b/test/audio-unit-test.js index b68c90058..4a52682a1 100644 --- a/test/audio-unit-test.js +++ b/test/audio-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/authc-oauth2-unit-test.js b/test/authc-oauth2-unit-test.js index 1694d283c..7a421bf48 100644 --- a/test/authc-oauth2-unit-test.js +++ b/test/authc-oauth2-unit-test.js @@ -23,11 +23,11 @@ var assert = require("assert"); var Step = require("step"); var _ = require("lodash"); var db = require("databank"); -var authc = require("../lib/authc"); -var User = require("../lib/model/user").User; -var Client = require("../lib/model/client").Client; -var BearerToken = require("../lib/model/bearertoken").BearerToken; -var URLMaker = require("../lib/urlmaker").URLMaker; +var authc = require("../dist/lib/authc"); +var User = require("../dist/lib/model/user").User; +var Client = require("../dist/lib/model/client").Client; +var BearerToken = require("../dist/lib/model/bearertoken").BearerToken; +var URLMaker = require("../dist/lib/urlmaker").URLMaker; var Databank = db.Databank; var DatabankObject = db.DatabankObject; diff --git a/test/authorizationcode-unit-test.js b/test/authorizationcode-unit-test.js index f0a6ed087..bc8a76efe 100644 --- a/test/authorizationcode-unit-test.js +++ b/test/authorizationcode-unit-test.js @@ -37,7 +37,7 @@ vows.describe("AuthorizationCode data type") "When we load the module": { topic: function() { try { - var mod = require("../lib/model/authorizationcode"); + var mod = require("../dist/lib/model/authorizationcode"); var AuthorizationCode = mod.AuthorizationCode; this.callback(null, AuthorizationCode); } catch (err) { diff --git a/test/badge-unit-test.js b/test/badge-unit-test.js index 24c5804ce..cc43b4f63 100644 --- a/test/badge-unit-test.js +++ b/test/badge-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/bearertoken-unit-test.js b/test/bearertoken-unit-test.js index 6039fb3d4..cf9c05e6c 100644 --- a/test/bearertoken-unit-test.js +++ b/test/bearertoken-unit-test.js @@ -37,7 +37,7 @@ vows.describe("BearerToken data type") "When we load the module": { topic: function() { try { - var mod = require("../lib/model/bearertoken"); + var mod = require("../dist/lib/model/bearertoken"); var BearerToken = mod.BearerToken; this.callback(null, BearerToken); } catch (err) { diff --git a/test/binary-unit-test.js b/test/binary-unit-test.js index 7892f428e..721a27082 100644 --- a/test/binary-unit-test.js +++ b/test/binary-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/bookmark-unit-test.js b/test/bookmark-unit-test.js index a678e3302..32cc84c8c 100644 --- a/test/bookmark-unit-test.js +++ b/test/bookmark-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/client-unit-test.js b/test/client-unit-test.js index 828f21b37..28fdce17f 100644 --- a/test/client-unit-test.js +++ b/test/client-unit-test.js @@ -22,7 +22,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), Step = require("step"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -75,7 +75,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Client class": { topic: function() { - return require("../lib/model/client").Client; + return require("../dist/lib/model/client").Client; }, "it works": function(Client) { assert.isFunction(Client); diff --git a/test/collection-unit-test.js b/test/collection-unit-test.js index 121c130e4..a98b5722c 100644 --- a/test/collection-unit-test.js +++ b/test/collection-unit-test.js @@ -22,7 +22,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), Step = require("step"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -75,7 +75,7 @@ suite.addBatch(modelBatch("collection", "Collection", testSchema, testData)); suite.addBatch({ "When we get the Collection class": { topic: function() { - return require("../lib/model/collection").Collection; + return require("../dist/lib/model/collection").Collection; }, "it exists": function(Collection) { assert.isFunction(Collection); @@ -92,7 +92,7 @@ suite.addBatch({ }, "and we create a user": { topic: function(Collection) { - var User = require("../lib/model/user").User; + var User = require("../dist/lib/model/user").User; Step( function() { var props = { diff --git a/test/comment-unit-test.js b/test/comment-unit-test.js index e7787d4d8..4f41c8d02 100644 --- a/test/comment-unit-test.js +++ b/test/comment-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/config-unit-test.js b/test/config-unit-test.js index 75e4163f4..4f05919dd 100644 --- a/test/config-unit-test.js +++ b/test/config-unit-test.js @@ -58,7 +58,7 @@ suite.addBatch({ "When we get the config module and mock out os.cpus()": { topic: function() { os.cpus = () => [{}, {}, {}, {}]; - return require("../lib/config"); + return require("../dist/lib/config"); }, teardown: function() { os.cpus = cpus; diff --git a/test/credentials-test-as-root.js b/test/credentials-test-as-root.js index d866f54f6..ff94269c0 100644 --- a/test/credentials-test-as-root.js +++ b/test/credentials-test-as-root.js @@ -30,7 +30,7 @@ var assert = require("assert"), databank = require("databank"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - Credentials = require("../lib/model/credentials").Credentials, + Credentials = require("../dist/lib/model/credentials").Credentials, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), @@ -194,7 +194,7 @@ suite.addBatch({ "and we try to get host credentials for a valid Host object": { topic: function() { var callback = this.callback, - Host = require("../lib/model/host").Host; + Host = require("../dist/lib/model/host").Host; Step( function() { diff --git a/test/credentials-unit-test.js b/test/credentials-unit-test.js index fc101d3e1..9f58a91f8 100644 --- a/test/credentials-unit-test.js +++ b/test/credentials-unit-test.js @@ -22,7 +22,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), Step = require("step"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/device-unit-test.js b/test/device-unit-test.js index 8be607b50..9cdc4dea5 100644 --- a/test/device-unit-test.js +++ b/test/device-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/dispatch-unit-test.js b/test/dispatch-unit-test.js index ad095e429..86cd1b1f2 100644 --- a/test/dispatch-unit-test.js +++ b/test/dispatch-unit-test.js @@ -27,7 +27,7 @@ var suite = vows.describe("dispatch module interface"); suite.addBatch({ "When we require the dispatch module": { topic: function() { - return require("../lib/dispatch"); + return require("../dist/lib/dispatch"); }, "it returns an object": function(Dispatch) { assert.isObject(Dispatch); diff --git a/test/edge-unit-test.js b/test/edge-unit-test.js index feeb9e18c..4072e0d21 100644 --- a/test/edge-unit-test.js +++ b/test/edge-unit-test.js @@ -73,7 +73,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Edge class": { topic: function() { - return require("../lib/model/edge").Edge; + return require("../dist/lib/model/edge").Edge; }, "it exists": function(Edge) { assert.isFunction(Edge); diff --git a/test/event-unit-test.js b/test/event-unit-test.js index b62996df9..2a3a7e879 100644 --- a/test/event-unit-test.js +++ b/test/event-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/favorite-unit-test.js b/test/favorite-unit-test.js index 2e4b33a9e..31c2214a3 100644 --- a/test/favorite-unit-test.js +++ b/test/favorite-unit-test.js @@ -73,7 +73,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Favorite class": { topic: function() { - return require("../lib/model/favorite").Favorite; + return require("../dist/lib/model/favorite").Favorite; }, "it exists": function(Favorite) { assert.isFunction(Favorite); diff --git a/test/file-unit-test.js b/test/file-unit-test.js index 5e461db4b..bfb1968a8 100644 --- a/test/file-unit-test.js +++ b/test/file-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/filteredstream-unit-test.js b/test/filteredstream-unit-test.js index 8cb325b6e..1125b1ed5 100644 --- a/test/filteredstream-unit-test.js +++ b/test/filteredstream-unit-test.js @@ -26,10 +26,10 @@ var assert = require("assert"), fs = require("fs"), path = require("path"), Queue = require("jankyqueue"), - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, - Stream = require("../lib/model/stream").Stream, - Activity = require("../lib/model/activity").Activity, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + Stream = require("../dist/lib/model/stream").Stream, + Activity = require("../dist/lib/model/activity").Activity, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -65,7 +65,7 @@ suite.addBatch({ }, "and we load the filteredstream module": { topic: function() { - return require("../lib/filteredstream"); + return require("../dist/lib/filteredstream"); }, "it works": function(mod) { assert.isObject(mod); @@ -396,7 +396,7 @@ suite.addBatch({ "and we create a stream with a lot of objects": { topic: function(FilteredStream) { var callback = this.callback, - Person = require("../lib/model/person").Person, + Person = require("../dist/lib/model/person").Person, names = { "Norma Lakin": "f", "Jason Pegram": "m", @@ -476,7 +476,7 @@ suite.addBatch({ }, "and we create a filtered stream of those objects": { topic: function(str, FilteredStream) { - var Person = require("../lib/model/person").Person, + var Person = require("../dist/lib/model/person").Person, isFemale = function(item, callback) { var ref; try { @@ -508,7 +508,7 @@ suite.addBatch({ "and we try to get 10 items": { topic: function(filtered) { var callback = this.callback, - Person = require("../lib/model/person").Person; + Person = require("../dist/lib/model/person").Person; Step( function() { diff --git a/test/firehose-todo-test-as-root.js-unit-test.js b/test/firehose-todo-test-as-root.js-unit-test.js index dfa76585f..aaa940acc 100644 --- a/test/firehose-todo-test-as-root.js-unit-test.js +++ b/test/firehose-todo-test-as-root.js-unit-test.js @@ -30,7 +30,7 @@ var suite = vows.describe("firehose module interface"); suite.addBatch({ "When we require the firehose module": { topic: function() { - return require("../lib/firehose"); + return require("../dist/lib/firehose"); }, "it returns an object": function(Firehose) { assert.isObject(Firehose); diff --git a/test/game-unit-test.js b/test/game-unit-test.js index 2d027eee9..34c434970 100644 --- a/test/game-unit-test.js +++ b/test/game-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/group-inbox-api-test-as-root.js b/test/group-inbox-api-test-as-root.js index 2300cd0cd..660e8c9e4 100644 --- a/test/group-inbox-api-test-as-root.js +++ b/test/group-inbox-api-test-as-root.js @@ -26,7 +26,7 @@ var assert = require("assert"), http = require("http"), querystring = require("querystring"), _ = require("lodash"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/group-unit-test.js b/test/group-unit-test.js index 3bc2561ba..d69cbb8d6 100644 --- a/test/group-unit-test.js +++ b/test/group-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/host-test-as-root.js b/test/host-test-as-root.js index 76a04fa1c..9b715d294 100644 --- a/test/host-test-as-root.js +++ b/test/host-test-as-root.js @@ -27,13 +27,13 @@ var assert = require("assert"), path = require("path"), express = require("express"), Browser = require("zombie"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, DialbackClient = require("dialback-client"), databank = require("databank"), Databank = databank.Databank, DatabankObject = databank.DatabankObject, - Host = require("../lib/model/host").Host, - Credentials = require("../lib/model/credentials").Credentials, + Host = require("../dist/lib/model/host").Host, + Credentials = require("../dist/lib/model/credentials").Credentials, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/host-unit-test.js b/test/host-unit-test.js index 008c3bee7..e77239315 100644 --- a/test/host-unit-test.js +++ b/test/host-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -80,7 +80,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Host class": { topic: function() { - return require("../lib/model/host").Host; + return require("../dist/lib/model/host").Host; }, "it works": function(Host) { assert.isFunction(Host); diff --git a/test/hsts-header-e2e-test.js b/test/hsts-header-e2e-test.js index 975fd6028..78521d298 100644 --- a/test/hsts-header-e2e-test.js +++ b/test/hsts-header-e2e-test.js @@ -22,7 +22,7 @@ var assert = require("assert"), vows = require("vows"), fs = require("fs"), path = require("path"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), httputil = require("./lib/http"), diff --git a/test/httperror-unit-test.js b/test/httperror-unit-test.js index c3ccd1601..80d088373 100644 --- a/test/httperror-unit-test.js +++ b/test/httperror-unit-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), vows.describe("httperror module interface").addBatch({ "When we require the http error module": { topic: function() { - return require("../lib/httperror"); + return require("../dist/lib/httperror"); }, "we get an object": function(httperror) { assert.isObject(httperror); diff --git a/test/idmaker-unit-test.js b/test/idmaker-unit-test.js index 3873763e6..1355d24af 100644 --- a/test/idmaker-unit-test.js +++ b/test/idmaker-unit-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), vows.describe("idmaker module interface").addBatch({ "When we require the idmaker module": { topic: function() { - return require("../lib/idmaker"); + return require("../dist/lib/idmaker"); }, "it works": function(idmaker) { assert.isObject(idmaker); diff --git a/test/image-unit-test.js b/test/image-unit-test.js index 7deb3c12c..d03bd6ab6 100644 --- a/test/image-unit-test.js +++ b/test/image-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/issue-unit-test.js b/test/issue-unit-test.js index 2b482edcf..9149bec33 100644 --- a/test/issue-unit-test.js +++ b/test/issue-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/job-unit-test.js b/test/job-unit-test.js index 2ffdccc06..c51965ce2 100644 --- a/test/job-unit-test.js +++ b/test/job-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/lib/app-standalone.js b/test/lib/app-standalone.js index 08e35b136..77526f754 100644 --- a/test/lib/app-standalone.js +++ b/test/lib/app-standalone.js @@ -21,10 +21,10 @@ var _ = require("lodash"), Step = require("step"), cluster = require("cluster"), - mod = require("../../lib/app"), + mod = require("../../dist/lib/app"), fs = require("fs"), path = require("path"), - Dispatch = require("../../lib/dispatch"), + Dispatch = require("../../dist/lib/dispatch"), makeApp = mod.makeApp; var tc = JSON.parse(fs.readFileSync(path.resolve(__dirname, "..", "config.json"))); @@ -104,7 +104,7 @@ if (cluster.isMaster) { // so we essentially do that. Step( function() { - var client = require("../../lib/model/client"), + var client = require("../../dist/lib/model/client"), Client = client.Client; Client.search({webfinger: msg.webfinger}, this); }, diff --git a/test/lib/app.js b/test/lib/app.js index ebf15e56e..ba3987ef8 100644 --- a/test/lib/app.js +++ b/test/lib/app.js @@ -137,7 +137,7 @@ var withAppSetup = function(batchConfig) { }; // lib/app.js expects to be run in a cluster worker with cluster.worker.on, etc. -var proxyquiredMakeApp = proxyquire("../../lib/app", { +var proxyquiredMakeApp = proxyquire("../../dist/lib/app", { cluster: { worker: { on: noop, diff --git a/test/lib/http.js b/test/lib/http.js index 230877a12..5a1dbada5 100644 --- a/test/lib/http.js +++ b/test/lib/http.js @@ -26,7 +26,7 @@ var http = require("http"), Step = require("step"), fs = require("fs"), express = require("express"), - version = require("../../lib/version").version, + version = require("../../dist/lib/version").version, OAuth = require("oauth-evanp").OAuth, urlparse = require("url").parse; diff --git a/test/lib/model.js b/test/lib/model.js index 1a7580382..952df950a 100644 --- a/test/lib/model.js +++ b/test/lib/model.js @@ -25,8 +25,8 @@ var assert = require("assert"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../../lib/urlmaker").URLMaker, - schema = require("../../lib/schema").schema, + URLMaker = require("../../dist/lib/urlmaker").URLMaker, + schema = require("../../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -64,7 +64,7 @@ var modelBatch = function(typeName, className, testSchema, testData) { DatabankObject.bank = db; - mod = require("../../lib/model/"+typeName) || null; + mod = require("../../dist/lib/model/"+typeName) || null; cb(null, mod); }); diff --git a/test/lib/oauth.js b/test/lib/oauth.js index 67afbab86..397865fbc 100644 --- a/test/lib/oauth.js +++ b/test/lib/oauth.js @@ -23,7 +23,7 @@ var urlfmt = require("url").format, Step = require("step"), _ = require("lodash"), http = require("http"), - version = require("../../lib/version").version, + version = require("../../dist/lib/version").version, OAuth = require("oauth-evanp").OAuth, Browser = require("zombie"), httputil = require("./http"); diff --git a/test/mailer-unit-test.js b/test/mailer-unit-test.js index c242e0544..eea79dec6 100644 --- a/test/mailer-unit-test.js +++ b/test/mailer-unit-test.js @@ -27,7 +27,7 @@ var assert = require("assert"), simplesmtp = require("simplesmtp"), Step = require("step"), emailutil = require("./lib/email"), - configutil = require("../lib/config"), + configutil = require("../dist/lib/config"), oneEmail = emailutil.oneEmail; var suite = vows.describe("mailer module interface").addBatch({ @@ -59,7 +59,7 @@ var suite = vows.describe("mailer module interface").addBatch({ }, "and we require the mailer module": { topic: function() { - return require("../lib/mailer"); + return require("../dist/lib/mailer"); }, "it works": function(Mailer) { assert.isObject(Mailer); diff --git a/test/membership-unit-test.js b/test/membership-unit-test.js index c07c8f3c0..96a69b0af 100644 --- a/test/membership-unit-test.js +++ b/test/membership-unit-test.js @@ -73,7 +73,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Membership class": { topic: function() { - return require("../lib/model/membership").Membership; + return require("../dist/lib/model/membership").Membership; }, "it exists": function(Membership) { assert.isFunction(Membership); @@ -96,8 +96,8 @@ suite.addBatch({ }, "and we check for a membership that doesn't exist": { topic: function(Membership) { - var Person = require("../lib/model/person").Person, - Group = require("../lib/model/group").Group, + var Person = require("../dist/lib/model/person").Person, + Group = require("../dist/lib/model/group").Group, person = new Person({id: "http://example.com/user/2"}), group = new Group({id: "http://example.net/group/42"}); @@ -110,8 +110,8 @@ suite.addBatch({ }, "and we check for a membership that exists": { topic: function(Membership) { - var Person = require("../lib/model/person").Person, - Group = require("../lib/model/group").Group, + var Person = require("../dist/lib/model/person").Person, + Group = require("../dist/lib/model/group").Group, person = new Person({id: "http://example.com/user/3", objectType: "person"}), group = new Group({id: "http://example.net/group/23", objectType: "group"}), callback = this.callback; diff --git a/test/middleware-unit-test.js b/test/middleware-unit-test.js index 895c482d5..5739e53af 100644 --- a/test/middleware-unit-test.js +++ b/test/middleware-unit-test.js @@ -26,9 +26,9 @@ var assert = require("assert"), path = require("path"), httpMocks = require("node-mocks-http"), _ = require("lodash"), - schema = require("../lib/schema"), - URLMaker = require("../lib/urlmaker").URLMaker, - User = require("../lib/model/user").User, + schema = require("../dist/lib/schema"), + URLMaker = require("../dist/lib/urlmaker").URLMaker, + User = require("../dist/lib/model/user").User, methodContext = require("./lib/methods").methodContext, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -71,7 +71,7 @@ vows.describe("middleware module interface").addBatch({ } else { robby = user1; maya = user2; - mw = require("../lib/middleware"); + mw = require("../dist/lib/middleware"); cb(null, mw); } } diff --git a/test/nonce-unit-test.js b/test/nonce-unit-test.js index 80b017b41..485fe9a18 100644 --- a/test/nonce-unit-test.js +++ b/test/nonce-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -88,7 +88,7 @@ var TIMESTAMP4 = Math.floor(Date.now()/1000) + 15; suite.addBatch({ "When we get the Nonce class": { topic: function() { - return require("../lib/model/nonce").Nonce; + return require("../dist/lib/model/nonce").Nonce; }, "it works": function(Nonce) { assert.isFunction(Nonce); diff --git a/test/note-unit-test.js b/test/note-unit-test.js index a4f657425..83bf9d7ba 100644 --- a/test/note-unit-test.js +++ b/test/note-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/oauth-authorization-e2e-test.js b/test/oauth-authorization-e2e-test.js index 4a5a5e3cf..4b3914a56 100644 --- a/test/oauth-authorization-e2e-test.js +++ b/test/oauth-authorization-e2e-test.js @@ -28,7 +28,7 @@ var assert = require("assert"), path = require("path"), OAuth = require("oauth-evanp").OAuth, Browser = require("zombie"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/offer-unit-test.js b/test/offer-unit-test.js index c3d2fb725..826d88538 100644 --- a/test/offer-unit-test.js +++ b/test/offer-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/organization-unit-test.js b/test/organization-unit-test.js index f723a5267..dff46560a 100644 --- a/test/organization-unit-test.js +++ b/test/organization-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/other-unit-test.js b/test/other-unit-test.js index 9de64c3d9..89412b522 100644 --- a/test/other-unit-test.js +++ b/test/other-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/page-unit-test.js b/test/page-unit-test.js index ec846a570..6b10f636c 100644 --- a/test/page-unit-test.js +++ b/test/page-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/person-get-inbox-test-as-root.js b/test/person-get-inbox-test-as-root.js index ccdfa3039..ade0dce92 100644 --- a/test/person-get-inbox-test-as-root.js +++ b/test/person-get-inbox-test-as-root.js @@ -26,7 +26,7 @@ var assert = require("assert"), _ = require("lodash"), fs = require("fs"), path = require("path"), - Person = require("../lib/model/person").Person, + Person = require("../dist/lib/model/person").Person, databank = require("databank"), httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), @@ -39,7 +39,7 @@ var assert = require("assert"), setupAppConfig = apputil.setupAppConfig, Databank = databank.Databank, DatabankObject = databank.DatabankObject, - URLMaker = require("../lib/urlmaker").URLMaker; + URLMaker = require("../dist/lib/urlmaker").URLMaker; var suite = vows.describe("test discovery of endpoint for a user"); diff --git a/test/person-unit-test.js b/test/person-unit-test.js index 8ff197813..7a172e914 100644 --- a/test/person-unit-test.js +++ b/test/person-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), path = require("path"), Step = require("step"), _ = require("lodash"), - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -103,7 +103,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/person"); + mod = require("../dist/lib/model/person"); if (!mod) { cb(new Error("No module"), null); @@ -124,7 +124,7 @@ suite.addBatch({ "it works": function(err, person) { assert.ifError(err); assert.isObject(person); - assert.instanceOf(person, require("../lib/model/person").Person); + assert.instanceOf(person, require("../dist/lib/model/person").Person); }, "it has a followersURL() method": function(err, person) { assert.ifError(err); @@ -151,7 +151,7 @@ suite.addBatch({ }, "and we create a user": { topic: function(Person) { - var User = require("../lib/model/user").User; + var User = require("../dist/lib/model/user").User; User.create({nickname: "evan", password: "one23four56"}, this.callback); @@ -190,7 +190,7 @@ suite.addBatch({ }, "and we create a user and expand the profile": { topic: function(Person) { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, user, callback = this.callback; diff --git a/test/place-unit-test.js b/test/place-unit-test.js index bb84fcc96..2f8c78485 100644 --- a/test/place-unit-test.js +++ b/test/place-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/plugin-e2e-test.js b/test/plugin-e2e-test.js index af67a46d5..cd4cabb8a 100644 --- a/test/plugin-e2e-test.js +++ b/test/plugin-e2e-test.js @@ -34,7 +34,7 @@ var suite = vows.describe("plugin system"); suite.addBatch({ "When we get the app module": { topic: function() { - return require("../lib/app"); + return require("../dist/lib/app"); }, "there is one": function(mod) { assert.isObject(mod); @@ -58,7 +58,7 @@ suite.addBatch({ sockjs: false, plugins: ["../test/lib/plugin"] }, - makeApp = require("../lib/app").makeApp; + makeApp = require("../dist/lib/app").makeApp; process.env.NODE_ENV = "test"; diff --git a/test/process-unit-test.js b/test/process-unit-test.js index 45b57ac70..8c84d828c 100644 --- a/test/process-unit-test.js +++ b/test/process-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/product-unit-test.js b/test/product-unit-test.js index 6284d837c..51530bbec 100644 --- a/test/product-unit-test.js +++ b/test/product-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/provider-configured-client-unit-test.js b/test/provider-configured-client-unit-test.js index 61e77bd0a..63cd66ba6 100644 --- a/test/provider-configured-client-unit-test.js +++ b/test/provider-configured-client-unit-test.js @@ -25,13 +25,13 @@ var assert = require("assert"), _ = require("lodash"), fs = require("fs"), path = require("path"), - schema = require("../lib/schema"), - URLMaker = require("../lib/urlmaker").URLMaker, - randomString = require("../lib/randomstring").randomString, - Client = require("../lib/model/client").Client, - RequestToken = require("../lib/model/requesttoken").RequestToken, - AccessToken = require("../lib/model/accesstoken").AccessToken, - User = require("../lib/model/user").User, + schema = require("../dist/lib/schema"), + URLMaker = require("../dist/lib/urlmaker").URLMaker, + randomString = require("../dist/lib/randomstring").randomString, + Client = require("../dist/lib/model/client").Client, + RequestToken = require("../dist/lib/model/requesttoken").RequestToken, + AccessToken = require("../dist/lib/model/accesstoken").AccessToken, + User = require("../dist/lib/model/user").User, methodContext = require("./lib/methods").methodContext, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -56,7 +56,7 @@ vows.describe("provider module interface").addBatch({ db.connect({}, function(err) { - var mod = require("../lib/provider"); + var mod = require("../dist/lib/provider"); DatabankObject.bank = db; diff --git a/test/provider-unit-test.js b/test/provider-unit-test.js index 91dc9b88d..00a0600e4 100644 --- a/test/provider-unit-test.js +++ b/test/provider-unit-test.js @@ -25,13 +25,13 @@ var assert = require("assert"), _ = require("lodash"), fs = require("fs"), path = require("path"), - schema = require("../lib/schema"), - URLMaker = require("../lib/urlmaker").URLMaker, - randomString = require("../lib/randomstring").randomString, - Client = require("../lib/model/client").Client, - RequestToken = require("../lib/model/requesttoken").RequestToken, - AccessToken = require("../lib/model/accesstoken").AccessToken, - User = require("../lib/model/user").User, + schema = require("../dist/lib/schema"), + URLMaker = require("../dist/lib/urlmaker").URLMaker, + randomString = require("../dist/lib/randomstring").randomString, + Client = require("../dist/lib/model/client").Client, + RequestToken = require("../dist/lib/model/requesttoken").RequestToken, + AccessToken = require("../dist/lib/model/accesstoken").AccessToken, + User = require("../dist/lib/model/user").User, methodContext = require("./lib/methods").methodContext, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -67,7 +67,7 @@ vows.describe("provider module interface").addBatch({ cb(err, null); } else { testClient = client; - mod = require("../lib/provider"); + mod = require("../dist/lib/provider"); cb(null, mod); } }); diff --git a/test/proxy-route-e2e-test.js b/test/proxy-route-e2e-test.js index 890c983d1..fe0b3d767 100644 --- a/test/proxy-route-e2e-test.js +++ b/test/proxy-route-e2e-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/proxy-unit-test.js b/test/proxy-unit-test.js index f02e4a03f..ea0ed5bb9 100644 --- a/test/proxy-unit-test.js +++ b/test/proxy-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/pumpclient-unit-test.js b/test/pumpclient-unit-test.js index ad5a3c993..a694df546 100644 --- a/test/pumpclient-unit-test.js +++ b/test/pumpclient-unit-test.js @@ -34,7 +34,7 @@ var suite = vows.describe("pumpclient module interface"); suite.addBatch({ "When we get the pumpclient module": { topic: function() { - return require("../lib/pumpclient"); + return require("../dist/lib/pumpclient"); }, "it exports an object": function(err, pumpclient) { assert.isObject(pumpclient); diff --git a/test/question-unit-test.js b/test/question-unit-test.js index 2b5ca94d0..f3d8ad56a 100644 --- a/test/question-unit-test.js +++ b/test/question-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/randomstring-unit-test.js b/test/randomstring-unit-test.js index e2c6060a3..a1b258df0 100644 --- a/test/randomstring-unit-test.js +++ b/test/randomstring-unit-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), vows.describe("randomstring module interface").addBatch({ "When we require the randomstring module": { topic: function() { - return require("../lib/randomstring"); + return require("../dist/lib/randomstring"); }, "we get a module back": function(rs) { assert.ok(rs); diff --git a/test/recovery-unit-test.js b/test/recovery-unit-test.js index 7ab57e9fa..71471dbe8 100644 --- a/test/recovery-unit-test.js +++ b/test/recovery-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/remoterequesttoken-unit-test.js b/test/remoterequesttoken-unit-test.js index 43b771e96..1c3ccaba7 100644 --- a/test/remoterequesttoken-unit-test.js +++ b/test/remoterequesttoken-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/repair-user-unit-test.js b/test/repair-user-unit-test.js index f7e113384..dfb0e6ec8 100644 --- a/test/repair-user-unit-test.js +++ b/test/repair-user-unit-test.js @@ -26,11 +26,11 @@ var fs = require("fs"), databank = require("databank"), _ = require("lodash"), Step = require("step"), - Activity = require("../lib/model/activity").Activity, - User = require("../lib/model/user").User, - Person = require("../lib/model/person").Person, - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, + Activity = require("../dist/lib/model/activity").Activity, + User = require("../dist/lib/model/user").User, + Person = require("../dist/lib/model/person").Person, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/replies-unit-test.js b/test/replies-unit-test.js index 932658dd1..96d9d5f62 100644 --- a/test/replies-unit-test.js +++ b/test/replies-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), Step = require("step"), fs = require("fs"), path = require("path"), - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -63,7 +63,7 @@ suite.addBatch({ }, "and we create a new object": { topic: function() { - var Note = require("../lib/model/note").Note; + var Note = require("../dist/lib/model/note").Note; Note.create({content: "This sucks."}, this.callback); }, "it works": function(err, note) { @@ -88,9 +88,9 @@ suite.addBatch({ }, "and we create a new object and post a reply": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, cb = this.callback; Step( @@ -137,9 +137,9 @@ suite.addBatch({ }, "and we create a new object and post a reply and remove the reply": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, cb = this.callback; Step( @@ -185,9 +185,9 @@ suite.addBatch({ }, "and we create a new object and post a reply and post a reply to that": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, cb = this.callback, comment1 = null; @@ -237,9 +237,9 @@ suite.addBatch({ }, "and we create a new object and post a lot of replies": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, cb = this.callback, comments = null; @@ -296,7 +296,7 @@ suite.addBatch({ }, "and we create a new object and expand its feeds": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, cb = this.callback; @@ -334,9 +334,9 @@ suite.addBatch({ }, "and we create a new object and post a reply and expand the object's feeds": { topic: function() { - var Note = require("../lib/model/note").Note, + var Note = require("../dist/lib/model/note").Note, note = null, - Comment = require("../lib/model/comment").Comment, + Comment = require("../dist/lib/model/comment").Comment, cb = this.callback, comment = null; diff --git a/test/requesttoken-unit-test.js b/test/requesttoken-unit-test.js index 2736b2a03..d81abf475 100644 --- a/test/requesttoken-unit-test.js +++ b/test/requesttoken-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/restricted-post-e2e-test.js b/test/restricted-post-e2e-test.js index 0c56fded3..e48360a4e 100644 --- a/test/restricted-post-e2e-test.js +++ b/test/restricted-post-e2e-test.js @@ -618,7 +618,7 @@ suite.addBatch( httputil.postJSON(url, cred, act, this); }, function(err, doc, resp) { - var url, cred, act, Collection = require("../lib/model/collection").Collection; + var url, cred, act, Collection = require("../dist/lib/model/collection").Collection; if (err) throw err; cred = makeCred(cl, users.captain.pair); act = { diff --git a/test/review-unit-test.js b/test/review-unit-test.js index 1eabbf9d0..3daa21077 100644 --- a/test/review-unit-test.js +++ b/test/review-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/schema-unit-test.js b/test/schema-unit-test.js index 3372deb70..1762354e5 100644 --- a/test/schema-unit-test.js +++ b/test/schema-unit-test.js @@ -87,7 +87,7 @@ var types = [ vows.describe("schema module interface").addBatch({ "When we require the schema module": { topic: function() { - return require("../lib/schema"); + return require("../dist/lib/schema"); }, "we get a module": function(schemamodule) { assert.isObject(schemamodule); diff --git a/test/scrubber-unit-test.js b/test/scrubber-unit-test.js index cbefe890e..8ec3c8379 100644 --- a/test/scrubber-unit-test.js +++ b/test/scrubber-unit-test.js @@ -28,7 +28,7 @@ var HARMLESS = "This is a harmless string."; vows.describe("scrubber module interface").addBatch({ "When we require the scrubber module": { topic: function() { - return require("../lib/scrubber"); + return require("../dist/lib/scrubber"); }, "it works": function(stamper) { assert.isObject(stamper); diff --git a/test/security-headers-e2e-test.js b/test/security-headers-e2e-test.js index 5df02882c..6990adbde 100644 --- a/test/security-headers-e2e-test.js +++ b/test/security-headers-e2e-test.js @@ -23,7 +23,7 @@ var assert = require("assert"), fs = require("fs"), path = require("path"), _ = require("lodash"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), httputil = require("./lib/http"), diff --git a/test/server-header-e2e-test.js b/test/server-header-e2e-test.js index 23cf01f09..bf9a7660d 100644 --- a/test/server-header-e2e-test.js +++ b/test/server-header-e2e-test.js @@ -23,7 +23,7 @@ var assert = require("assert"), fs = require("fs"), path = require("path"), _ = require("lodash"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), httputil = require("./lib/http"), diff --git a/test/service-unit-test.js b/test/service-unit-test.js index 044756f0f..4e58f9b09 100644 --- a/test/service-unit-test.js +++ b/test/service-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/share-unit-test.js b/test/share-unit-test.js index e87d0c61b..61f4e70fd 100644 --- a/test/share-unit-test.js +++ b/test/share-unit-test.js @@ -74,7 +74,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the Share class": { topic: function() { - return require("../lib/model/share").Share; + return require("../dist/lib/model/share").Share; }, "it exists": function(Share) { assert.isFunction(Share); diff --git a/test/stamper-unit-test.js b/test/stamper-unit-test.js index 4b17c3286..b79cc0191 100644 --- a/test/stamper-unit-test.js +++ b/test/stamper-unit-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), vows.describe("stamper module interface").addBatch({ "When we require the stamper module": { topic: function() { - return require("../lib/stamper"); + return require("../dist/lib/stamper"); }, "it works": function(stamper) { assert.isObject(stamper); diff --git a/test/stream-each-unit-test.js b/test/stream-each-unit-test.js index b2093e235..e2b408995 100644 --- a/test/stream-each-unit-test.js +++ b/test/stream-each-unit-test.js @@ -25,9 +25,9 @@ var _ = require("lodash"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, - schema = require("../lib/schema").schema, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -62,7 +62,7 @@ suite.addBatch({ DatabankObject.bank = db; - var Stream = require("../lib/model/stream").Stream; + var Stream = require("../dist/lib/model/stream").Stream; cb(null, Stream); }); }, diff --git a/test/stream-has-object-unit-test.js b/test/stream-has-object-unit-test.js index be67b92dd..6aac13a67 100644 --- a/test/stream-has-object-unit-test.js +++ b/test/stream-has-object-unit-test.js @@ -25,9 +25,9 @@ var _ = require("lodash"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, - schema = require("../lib/schema").schema, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -61,7 +61,7 @@ suite.addBatch({ DatabankObject.bank = db; - var Stream = require("../lib/model/stream").Stream; + var Stream = require("../dist/lib/model/stream").Stream; Stream.create({name: "has-object-test"}, this); }, diff --git a/test/stream-index-unit-test.js b/test/stream-index-unit-test.js index 0f1e4b898..dc6f03bb9 100644 --- a/test/stream-index-unit-test.js +++ b/test/stream-index-unit-test.js @@ -25,8 +25,8 @@ var _ = require("lodash"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -62,7 +62,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/stream"); + mod = require("../dist/lib/model/stream"); if (!mod) { cb(new Error("No module"), null); diff --git a/test/stream-objects-unit-test.js b/test/stream-objects-unit-test.js index b598ffbdf..3416f34e0 100644 --- a/test/stream-objects-unit-test.js +++ b/test/stream-objects-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), fs = require("fs"), path = require("path"), _ = require("lodash"), - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -63,7 +63,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/stream"); + mod = require("../dist/lib/model/stream"); if (!mod) { cb(new Error("No module"), null); @@ -123,7 +123,7 @@ suite.addBatch({ "and we get objects with indexes greater than some object": { topic: function(stream) { var cb = this.callback, - NotInStreamError = require("../lib/model/stream").NotInStreamError; + NotInStreamError = require("../dist/lib/model/stream").NotInStreamError; stream.getObjectsGreaterThan({a: "b"}, 10, function(err, objects) { if (err && err instanceof NotInStreamError) { @@ -142,7 +142,7 @@ suite.addBatch({ "and we get objects with indexes less than some object": { topic: function(stream) { var cb = this.callback, - NotInStreamError = require("../lib/model/stream").NotInStreamError; + NotInStreamError = require("../dist/lib/model/stream").NotInStreamError; stream.getObjectsLessThan({a: "b"}, 10, function(err, objects) { if (err && err instanceof NotInStreamError) { @@ -161,7 +161,7 @@ suite.addBatch({ "and we remove an object that doesn't exist": { topic: function(stream) { var cb = this.callback, - NotInStreamError = require("../lib/model/stream").NotInStreamError; + NotInStreamError = require("../dist/lib/model/stream").NotInStreamError; stream.removeObject({a: "b"}, function(err) { if (err && err instanceof NotInStreamError) { diff --git a/test/stream-unit-test.js b/test/stream-unit-test.js index 20859d3c4..12df920ca 100644 --- a/test/stream-unit-test.js +++ b/test/stream-unit-test.js @@ -25,9 +25,9 @@ var _ = require("lodash"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, - schema = require("../lib/schema").schema, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -109,7 +109,7 @@ suite.addBatch({ DatabankObject.bank = db; - mod = require("../lib/model/stream"); + mod = require("../dist/lib/model/stream"); if (!mod) { cb(new Error("No module"), null); @@ -150,7 +150,7 @@ suite.addBatch({ }, "and we create a single activity": { topic: function(stream) { - var Activity = require("../lib/model/activity").Activity, + var Activity = require("../dist/lib/model/activity").Activity, props = { actor: { id: "urn:uuid:8f64087d-fffc-4fe0-9848-c18ae611cafd", @@ -207,7 +207,7 @@ suite.addBatch({ }, "and we count the stream's activities with Stream.count()": { topic: function(activity, stream) { - var Stream = require("../lib/model/stream").Stream; + var Stream = require("../dist/lib/model/stream").Stream; Stream.count(stream.name, this.callback); }, "it works": function(err, cnt) { @@ -249,7 +249,7 @@ suite.addBatch({ DatabankObject.bank = db; - var Stream = require("../lib/model/stream").Stream; + var Stream = require("../dist/lib/model/stream").Stream; cb(null, Stream); }); }, @@ -389,7 +389,7 @@ suite.addBatch({ "When we deliver a lot of activities to a stream": { topic: function() { var cb = this.callback, - Activity = require("../lib/model/activity").Activity, + Activity = require("../dist/lib/model/activity").Activity, actor = { id: "urn:uuid:c484d84e-6afa-4c51-ac9a-f8738d48569c", displayName: "Counter", @@ -417,7 +417,7 @@ suite.addBatch({ DatabankObject.bank = db; - var Stream = require("../lib/model/stream").Stream; + var Stream = require("../dist/lib/model/stream").Stream; Stream.create({name: "scale-test"}, this); }, diff --git a/test/task-unit-test.js b/test/task-unit-test.js index cd25c481e..7a62cf95f 100644 --- a/test/task-unit-test.js +++ b/test/task-unit-test.js @@ -21,8 +21,8 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - version = require("../lib/version").version, - URLMaker = require("../lib/urlmaker").URLMaker, + version = require("../dist/lib/version").version, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/update-object-e2e-test.js b/test/update-object-e2e-test.js index 6df6e73eb..d3a1f6af1 100644 --- a/test/update-object-e2e-test.js +++ b/test/update-object-e2e-test.js @@ -23,7 +23,7 @@ var assert = require("assert"), Step = require("step"), _ = require("lodash"), http = require("http"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, urlparse = require("url").parse, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), diff --git a/test/urlmaker-unit-test.js b/test/urlmaker-unit-test.js index b6eae596b..d403afc8a 100644 --- a/test/urlmaker-unit-test.js +++ b/test/urlmaker-unit-test.js @@ -28,7 +28,7 @@ var suite = vows.describe("urlmaker module interface"); suite.addBatch({ "When we require the urlmaker module": { topic: function() { - return require("../lib/urlmaker"); + return require("../dist/lib/urlmaker"); }, "it exists": function(urlmaker) { assert.isObject(urlmaker); @@ -57,7 +57,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; return URLMaker; @@ -91,7 +91,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker with the default port": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 80; return URLMaker; @@ -126,7 +126,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 2342; return URLMaker; @@ -174,7 +174,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker with a prefix path": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; URLMaker.path = "pumpio"; @@ -209,7 +209,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; return URLMaker; @@ -236,7 +236,7 @@ suite.addBatch({ suite.addBatch({ "When we set up the URLMaker with a prefix path": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; URLMaker.path = "pumpio"; @@ -264,7 +264,7 @@ suite.addBatch({ suite.addBatch({ "When we set up URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; return URLMaker; @@ -319,7 +319,7 @@ suite.addBatch({ suite.addBatch({ "When we set up URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; return URLMaker; @@ -365,7 +365,7 @@ suite.addBatch({ suite.addBatch({ "When we set up URLMaker": { topic: function() { - var URLMaker = require("../lib/urlmaker").URLMaker; + var URLMaker = require("../dist/lib/urlmaker").URLMaker; URLMaker.hostname = "example.com"; URLMaker.port = 3001; return URLMaker; diff --git a/test/user-favorite-unit-test.js b/test/user-favorite-unit-test.js index 4bcf51e73..eb4c3e2e6 100644 --- a/test/user-favorite-unit-test.js +++ b/test/user-favorite-unit-test.js @@ -25,8 +25,8 @@ var assert = require("assert"), Step = require("step"), fs = require("fs"), path = require("path"), - schema = require("../lib/schema").schema, - URLMaker = require("../lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, + URLMaker = require("../dist/lib/urlmaker").URLMaker, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -64,7 +64,7 @@ suite.addBatch({ DatabankObject.bank = db; - User = require("../lib/model/user").User || null; + User = require("../dist/lib/model/user").User || null; cb(null, User); }); @@ -91,7 +91,7 @@ suite.addBatch({ "and it favorites a known object": { topic: function(user) { var cb = this.callback, - Image = require("../lib/model/image").Image, + Image = require("../dist/lib/model/image").Image, obj; Step( @@ -146,7 +146,7 @@ suite.addBatch({ "and it unfavorites an object it never favorited": { topic: function(user) { var cb = this.callback, - Audio = require("../lib/model/audio").Audio; + Audio = require("../dist/lib/model/audio").Audio; Step( function() { @@ -276,7 +276,7 @@ suite.addBatch({ User.create({nickname: "ernie", password: "rubber duckie"}, this); }, function(err, results) { - var Image = require("../lib/model/image").Image; + var Image = require("../dist/lib/model/image").Image; if (err) throw err; user = results; Image.create({displayName: "Evan's avatar", @@ -347,7 +347,7 @@ suite.addBatch({ User.create({nickname: "count", password: "one,two,three,four"}, this); }, function(err, results) { - var Image = require("../lib/model/image").Image, + var Image = require("../dist/lib/model/image").Image, i = 0, group = this.group(); if (err) throw err; diff --git a/test/user-inbox-api-test-as-root.js b/test/user-inbox-api-test-as-root.js index 5cf3a80f4..2e9d97be4 100644 --- a/test/user-inbox-api-test-as-root.js +++ b/test/user-inbox-api-test-as-root.js @@ -24,7 +24,7 @@ var assert = require("assert"), http = require("http"), querystring = require("querystring"), _ = require("lodash"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/user-list-api-e2e-test.js b/test/user-list-api-e2e-test.js index 286e05ad6..610839eb8 100644 --- a/test/user-list-api-e2e-test.js +++ b/test/user-list-api-e2e-test.js @@ -25,7 +25,7 @@ var assert = require("assert"), fs = require("fs"), path = require("path"), querystring = require("querystring"), - version = require("../lib/version").version, + version = require("../dist/lib/version").version, OAuth = require("oauth-evanp").OAuth, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), diff --git a/test/user-list-unit-test.js b/test/user-list-unit-test.js index e8d4248ca..052990227 100644 --- a/test/user-list-unit-test.js +++ b/test/user-list-unit-test.js @@ -25,10 +25,10 @@ var assert = require("assert"), Step = require("step"), fs = require("fs"), path = require("path"), - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, - Stream = require("../lib/model/stream").Stream, - NotInStreamError = require("../lib/model/stream").NotInStreamError, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, + Stream = require("../dist/lib/model/stream").Stream, + NotInStreamError = require("../dist/lib/model/stream").NotInStreamError, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -56,7 +56,7 @@ suite.addBatch({ DatabankObject.bank = db; - User = require("../lib/model/user").User || null; + User = require("../dist/lib/model/user").User || null; cb(null, User); }); diff --git a/test/user-rest-e2e-test.js b/test/user-rest-e2e-test.js index fb780fec2..342d731cb 100644 --- a/test/user-rest-e2e-test.js +++ b/test/user-rest-e2e-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), Step = require("step"), _ = require("lodash"), OAuth = require("oauth-evanp").OAuth, - version = require("../lib/version").version, + version = require("../dist/lib/version").version, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/user-rest-settings-e2e-test.js b/test/user-rest-settings-e2e-test.js index 74d71f81f..47e0f9c5c 100644 --- a/test/user-rest-settings-e2e-test.js +++ b/test/user-rest-settings-e2e-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), Step = require("step"), _ = require("lodash"), OAuth = require("oauth-evanp").OAuth, - version = require("../lib/version").version, + version = require("../dist/lib/version").version, httputil = require("./lib/http"), oauthutil = require("./lib/oauth"), apputil = require("./lib/app"), diff --git a/test/user-unit-test.js b/test/user-unit-test.js index ce275bf60..1cf95f8cb 100644 --- a/test/user-unit-test.js +++ b/test/user-unit-test.js @@ -23,7 +23,7 @@ var assert = require("assert"), databank = require("databank"), _ = require("lodash"), Step = require("step"), - Activity = require("../lib/model/activity").Activity, + Activity = require("../dist/lib/model/activity").Activity, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -87,7 +87,7 @@ suite.addBatch(mb); suite.addBatch({ "When we get the User class": { topic: function() { - return require("../lib/model/user").User; + return require("../dist/lib/model/user").User; }, "it exists": function(User) { assert.isFunction(User); @@ -225,7 +225,7 @@ suite.addBatch({ }, "it has a profile attribute": function(user) { assert.isObject(user.profile); - assert.instanceOf(user.profile, require("../lib/model/person").Person); + assert.instanceOf(user.profile, require("../dist/lib/model/person").Person); assert.isString(user.profile.id); }, "and we check the credentials with the right password": { @@ -265,7 +265,7 @@ suite.addBatch({ assert.ifError(err); assert.isObject(profile); assert.instanceOf(profile, - require("../lib/model/person").Person); + require("../dist/lib/model/person").Person); } } }, @@ -368,7 +368,7 @@ suite.addBatch({ } } }, - Activity = require("../lib/model/activity").Activity, + Activity = require("../dist/lib/model/activity").Activity, act = new Activity(props); Step( @@ -583,7 +583,7 @@ suite.addBatch({ content: "Remember to get eggs, bread, and milk." } }, - Activity = require("../lib/model/activity").Activity, + Activity = require("../dist/lib/model/activity").Activity, act = new Activity(props); Step( @@ -1080,7 +1080,7 @@ var notInStreamContext = function(streamgetter) { suite.addBatch({ "When we create a new user": { topic: function() { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, props = { nickname: "archie", password: "B0Y|the/way|Glenn+Miller|played" @@ -1109,7 +1109,7 @@ suite.addBatch({ }, "When we create another user": { topic: function() { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, props = { nickname: "edith", password: "s0ngz|that|made|Th3|h1t|P4r4de" @@ -1174,7 +1174,7 @@ suite.addBatch({ }, "When we create yet another user": { topic: function() { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, props = { nickname: "gloria", password: "0h,d4DDY!" @@ -1244,7 +1244,7 @@ suite.addBatch({ var goodNickname = function(nickname) { return { topic: function() { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, props = { nickname: nickname, password: "Kei1goos" @@ -1266,7 +1266,7 @@ var goodNickname = function(nickname) { var badNickname = function(nickname) { return { topic: function() { - var User = require("../lib/model/user").User, + var User = require("../dist/lib/model/user").User, props = { nickname: nickname, password: "AQuah5co" @@ -1320,7 +1320,7 @@ var activityMakerContext = function(maker, rest) { var ctx = { topic: function(toUser, fromUser) { - var Activity = require("../lib/model/activity").Activity, + var Activity = require("../dist/lib/model/activity").Activity, callback = this.callback, theAct; @@ -1355,7 +1355,7 @@ var activityMakerContext = function(maker, rest) { suite.addBatch({ "When we get the User class": { topic: function() { - return require("../lib/model/user").User; + return require("../dist/lib/model/user").User; }, "it works": function(User) { assert.isFunction(User); @@ -1609,7 +1609,7 @@ suite.addBatch({ suite.addBatch({ "When we get the User class": { topic: function() { - return require("../lib/model/user").User; + return require("../dist/lib/model/user").User; }, "it works": function(User) { assert.isFunction(User); @@ -1638,7 +1638,7 @@ suite.addBatch({ suite.addBatch({ "When we get the User class": { topic: function() { - return require("../lib/model/user").User; + return require("../dist/lib/model/user").User; }, "it works": function(User) { assert.isFunction(User); diff --git a/test/user-virtual-collection-unit-test.js b/test/user-virtual-collection-unit-test.js index b3333895f..43fb4e9f5 100644 --- a/test/user-virtual-collection-unit-test.js +++ b/test/user-virtual-collection-unit-test.js @@ -25,9 +25,9 @@ var assert = require("assert"), databank = require("databank"), _ = require("lodash"), Step = require("step"), - Collection = require("../lib/model/collection").Collection, - URLMaker = require("../lib/urlmaker").URLMaker, - schema = require("../lib/schema").schema, + Collection = require("../dist/lib/model/collection").Collection, + URLMaker = require("../dist/lib/urlmaker").URLMaker, + schema = require("../dist/lib/schema").schema, Databank = databank.Databank, DatabankObject = databank.DatabankObject; @@ -56,7 +56,7 @@ suite.addBatch({ DatabankObject.bank = db; - User = require("../lib/model/user").User || null; + User = require("../dist/lib/model/user").User || null; cb(null, User); }); diff --git a/test/uuidv5-unit-test.js b/test/uuidv5-unit-test.js index 64e75eaf5..742e744fa 100644 --- a/test/uuidv5-unit-test.js +++ b/test/uuidv5-unit-test.js @@ -24,7 +24,7 @@ var assert = require("assert"), vows.describe("uuidv5 module interface").addBatch({ "When we require the uuidv5 module": { topic: function() { - return require("../lib/uuidv5"); + return require("../dist/lib/uuidv5"); }, "it works": function(uuidv5) { assert.isFunction(uuidv5); diff --git a/test/video-unit-test.js b/test/video-unit-test.js index 154b5dbb9..328d7b844 100644 --- a/test/video-unit-test.js +++ b/test/video-unit-test.js @@ -21,7 +21,7 @@ var assert = require("assert"), vows = require("vows"), databank = require("databank"), - URLMaker = require("../lib/urlmaker").URLMaker, + URLMaker = require("../dist/lib/urlmaker").URLMaker, modelBatch = require("./lib/model").modelBatch, Databank = databank.Databank, DatabankObject = databank.DatabankObject; diff --git a/test/web-unit-test.js b/test/web-unit-test.js index 524e5b768..1209157ec 100644 --- a/test/web-unit-test.js +++ b/test/web-unit-test.js @@ -36,7 +36,7 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; suite.addBatch({ "When we require the web module": { topic: function() { - return require("../lib/web"); + return require("../dist/lib/web"); }, "it returns an object": function(web) { assert.isObject(web); diff --git a/test/xssblacklist-e2e-test.js b/test/xssblacklist-e2e-test.js index 43df1ecb2..90ebbfa01 100644 --- a/test/xssblacklist-e2e-test.js +++ b/test/xssblacklist-e2e-test.js @@ -32,7 +32,7 @@ var assert = require("assert"), vows.describe("XSS blacklist middleware module").addBatch({ "When we require the XSS blacklist middleware": { topic: function() { - return require("../lib/xssblacklist.js"); + return require("../dist/lib/xssblacklist.js"); }, "it works": function(middleware) { assert.isObject(middleware); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..9c58e7645 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "outDir": "./dist", + "allowJs": true, + "target": "es5" + }, + "include": [ + "./lib/**/*", + "./routes/**/*" + ] +}