Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
"electron-squirrel-startup": "^0.1.4",
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.4.0.tar.gz",
"get-object-path": "azer/get-object-path#74eb42de0cfd02c14ffdd18552f295aba723d394",
"hadron-action": "^0.0.4",
"hadron-action": "^0.1.0",
"hadron-auto-update-manager": "^0.0.12",
"hadron-compile-cache": "^0.3.0",
"hadron-component-registry": "^0.4.0",
"hadron-app-registry": "^1.0.0",
"hadron-document": "^0.16.0",
"hadron-ipc": "^0.0.7",
"hadron-module-cache": "^0.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/documents/document-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var DocumentListView = View.extend({
}
},
initialize: function() {
this.documentList = app.componentRegistry.findByRole('Collection:DocumentList')[0];
this.documentList = app.appRegistry.getComponent('Component::CRUD::DocumentList');
this.listenTo(app.queryOptions, 'change:query', this.onQueryChanged.bind(this));
},
onQueryChanged: function() {
Expand Down
4 changes: 2 additions & 2 deletions src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var ModuleCache = require('hadron-module-cache');
ModuleCache.register(resourcePath);
ModuleCache.add(resourcePath);

var ComponentRegistry = require('hadron-component-registry');
var AppRegistry = require('hadron-app-registry');
var PackageManager = require('hadron-package-manager').PackageManager;

var pkg = require('../../package.json');
Expand Down Expand Up @@ -73,7 +73,7 @@ var debug = require('debug')('mongodb-compass:app');
// order to ensure that the compile cache has already been loaded and
// hooked into require.extensions. Otherwise, packages will not have
// use of the compile cache.
app.componentRegistry = new ComponentRegistry();
app.appRegistry = new AppRegistry();
app.packageManager = new PackageManager(path.join(__dirname, '..', 'internal-packages'));
app.packageManager.activate();

Expand Down
10 changes: 8 additions & 2 deletions src/internal-packages/crud/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@

const app = require('ampersand-app');
const DocumentList = require('./lib/component/document-list');
const Actions = require('./lib/actions');
const InsertDocumentStore = require('./lib/store/insert-document-store');

/**
* Activate all the components in the CRUD package.
*/
function activate() {
app.componentRegistry.register(DocumentList, { role: 'Collection:DocumentList' });
app.appRegistry.registerComponent('Component::CRUD::DocumentList', DocumentList);
app.appRegistry.registerAction('Action::CRUD::DocumentRemoved', Actions.documentRemoved);
app.appRegistry.registerStore('Store::CRUD::InsertDocumentStore', InsertDocumentStore);
}

/**
* Deactivate all the components in the CRUD package.
*/
function deactivate() {
app.componentRegistry.deregister(DocumentList);
app.appRegistry.deregisterComponent('Component::CRUD::DocumentList');
app.appRegistry.deregisterAction('Action::CRUD::DocumentRemoved');
app.appRegistry.deregisterStore('Store::CRUD::InsertDocumentStore');
}

module.exports.activate = activate;
Expand Down
2 changes: 1 addition & 1 deletion src/internal-packages/crud/lib/component/binary-value.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const React = require('react');
const truncate = require('hadron-component-registry').truncate;
const truncate = require('hadron-app-registry').truncate;

/**
* Base 64 constant.
Expand Down
2 changes: 1 addition & 1 deletion src/internal-packages/crud/lib/component/code-value.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const React = require('react');
const truncate = require('hadron-component-registry').truncate;
const truncate = require('hadron-app-registry').truncate;

/**
* The document value class.
Expand Down
2 changes: 1 addition & 1 deletion src/internal-packages/crud/lib/component/document.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const app = require('ampersand-app');
const React = require('react');
const Reflux = require('reflux');
const ElementFactory = require('hadron-component-registry').ElementFactory;
const ElementFactory = require('hadron-app-registry').ElementFactory;
const NamespaceStore = require('hadron-reflux-store').NamespaceStore;
const HadronDocument = require('hadron-document');
const Element = require('hadron-document').Element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const _ = require('lodash');
const React = require('react');
const inputSize = require('./utils').inputSize;
const ElementFactory = require('hadron-component-registry').ElementFactory;
const ElementFactory = require('hadron-app-registry').ElementFactory;
const TypeChecker = require('hadron-type-checker');

/**
Expand Down