Convert imports to relative paths (#13740)

pull/13723/head^2
Rodrigo Nascimento 7 years ago committed by GitHub
parent 0665caab86
commit ed092fbe49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/2fa/client/TOTPPassword.js
  2. 6
      app/2fa/client/accountSecurity.js
  3. 4
      app/2fa/server/lib/totp.js
  4. 4
      app/2fa/server/loginHandler.js
  5. 2
      app/2fa/server/methods/disable.js
  6. 2
      app/2fa/server/methods/enable.js
  7. 2
      app/2fa/server/methods/regenerateCodes.js
  8. 2
      app/2fa/server/methods/validateTempToken.js
  9. 2
      app/2fa/server/startup/settings.js
  10. 2
      app/action-links/both/lib/actionLinks.js
  11. 4
      app/action-links/client/init.js
  12. 2
      app/action-links/client/lib/actionLinks.js
  13. 2
      app/analytics/client/loadScript.js
  14. 6
      app/analytics/client/trackEvents.js
  15. 2
      app/analytics/server/settings.js
  16. 10
      app/api/server/api.js
  17. 4
      app/api/server/default/info.js
  18. 2
      app/api/server/helpers/composeRoomWithLastMessage.js
  19. 2
      app/api/server/helpers/getLoggedInUser.js
  20. 2
      app/api/server/helpers/getPaginationItems.js
  21. 2
      app/api/server/helpers/getUserFromParams.js
  22. 4
      app/api/server/helpers/getUserInfo.js
  23. 2
      app/api/server/helpers/insertUserObject.js
  24. 2
      app/api/server/helpers/parseJsonQuery.js
  25. 2
      app/api/server/settings.js
  26. 2
      app/api/server/v1/assets.js
  27. 6
      app/api/server/v1/channels.js
  28. 8
      app/api/server/v1/chat.js
  29. 4
      app/api/server/v1/commands.js
  30. 2
      app/api/server/v1/emoji-custom.js
  31. 6
      app/api/server/v1/groups.js
  32. 10
      app/api/server/v1/im.js
  33. 4
      app/api/server/v1/integrations.js
  34. 8
      app/api/server/v1/misc.js
  35. 4
      app/api/server/v1/permissions.js
  36. 2
      app/api/server/v1/roles.js
  37. 4
      app/api/server/v1/rooms.js
  38. 4
      app/api/server/v1/settings.js
  39. 4
      app/api/server/v1/stats.js
  40. 2
      app/api/server/v1/subscriptions.js
  41. 10
      app/api/server/v1/users.js
  42. 2
      app/api/server/v1/video-conference.js
  43. 2
      app/apps/client/admin/appInstall.js
  44. 2
      app/apps/client/admin/appLogs.js
  45. 6
      app/apps/client/admin/appManage.js
  46. 2
      app/apps/client/admin/apps.js
  47. 4
      app/apps/client/communication/websockets.js
  48. 8
      app/apps/client/orchestrator.js
  49. 2
      app/apps/server/bridges/commands.js
  50. 2
      app/apps/server/bridges/internal.js
  51. 6
      app/apps/server/bridges/messages.js
  52. 4
      app/apps/server/bridges/rooms.js
  53. 2
      app/apps/server/bridges/settings.js
  54. 4
      app/apps/server/communication/methods.js
  55. 2
      app/apps/server/communication/rest.js
  56. 2
      app/apps/server/converters/messages.js
  57. 2
      app/apps/server/converters/rooms.js
  58. 2
      app/apps/server/converters/settings.js
  59. 2
      app/apps/server/converters/users.js
  60. 4
      app/apps/server/orchestrator.js
  61. 10
      app/assets/server/assets.js
  62. 2
      app/authorization/client/hasPermission.js
  63. 2
      app/authorization/client/hasRole.js
  64. 2
      app/authorization/client/lib/ChatPermissions.js
  65. 2
      app/authorization/client/route.js
  66. 4
      app/authorization/client/startup.js
  67. 4
      app/authorization/client/usersNameChanged.js
  68. 2
      app/authorization/client/views/permissions.js
  69. 6
      app/authorization/client/views/permissionsRole.js
  70. 2
      app/authorization/server/functions/addUserRoles.js
  71. 4
      app/authorization/server/functions/canAccessRoom.js
  72. 2
      app/authorization/server/functions/getRoles.js
  73. 2
      app/authorization/server/functions/getUsersInRole.js
  74. 2
      app/authorization/server/functions/hasPermission.js
  75. 2
      app/authorization/server/functions/hasRole.js
  76. 2
      app/authorization/server/functions/removeUserFromRoles.js
  77. 2
      app/authorization/server/methods/addPermissionToRole.js
  78. 6
      app/authorization/server/methods/addUserToRole.js
  79. 2
      app/authorization/server/methods/deleteRole.js
  80. 2
      app/authorization/server/methods/removeRoleFromPermission.js
  81. 6
      app/authorization/server/methods/removeUserFromRole.js
  82. 6
      app/authorization/server/methods/saveRole.js
  83. 4
      app/authorization/server/publications/permissions.js
  84. 2
      app/authorization/server/publications/roles.js
  85. 2
      app/authorization/server/startup.js
  86. 4
      app/autolinker/client/client.js
  87. 2
      app/autolinker/server/settings.js
  88. 8
      app/autotranslate/client/lib/actionButton.js
  89. 10
      app/autotranslate/client/lib/autotranslate.js
  90. 6
      app/autotranslate/client/lib/tabBar.js
  91. 4
      app/autotranslate/client/views/autoTranslateFlexTab.js
  92. 8
      app/autotranslate/server/autotranslate.js
  93. 2
      app/autotranslate/server/methods/getSupportedLanguages.js
  94. 4
      app/autotranslate/server/methods/saveSettings.js
  95. 2
      app/autotranslate/server/methods/translateMessage.js
  96. 2
      app/autotranslate/server/permissions.js
  97. 2
      app/autotranslate/server/settings.js
  98. 2
      app/blockstack/server/logger.js
  99. 6
      app/blockstack/server/loginHandler.js
  100. 4
      app/blockstack/server/routes.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { modal } from '/app/ui-utils';
import { t } from '/app/utils';
import { modal } from '../../ui-utils';
import { t } from '../../utils';
import toastr from 'toastr';
function reportError(error, callback) {

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { modal } from '/app/ui-utils';
import { settings } from '/app/settings';
import { t } from '/app/utils';
import { modal } from '../../ui-utils';
import { settings } from '../../settings';
import { t } from '../../utils';
import toastr from 'toastr';
import qrcode from 'yaqrcode';

@ -1,7 +1,7 @@
import { SHA256 } from 'meteor/sha';
import { Random } from 'meteor/random';
import { Users } from '/app/models';
import { settings } from '/app/settings';
import { Users } from '../../../models';
import { settings } from '../../../settings';
import speakeasy from 'speakeasy';
export const TOTP = {

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { settings } from '/app/settings';
import { callbacks } from '/app/callbacks';
import { settings } from '../../settings';
import { callbacks } from '../../callbacks';
import { TOTP } from './lib/totp';
Accounts.registerLoginHandler('totp', function(options) {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { TOTP } from '../lib/totp';
Meteor.methods({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { TOTP } from '../lib/totp';
Meteor.methods({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { TOTP } from '../lib/totp';
Meteor.methods({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { TOTP } from '../lib/totp';
Meteor.methods({

@ -1,4 +1,4 @@
import { settings } from '/app/settings';
import { settings } from '../../../settings';
settings.addGroup('Accounts', function() {
this.section('Two Factor Authentication', function() {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Messages, Subscriptions } from '/app/models';
import { Messages, Subscriptions } from '../../../models';
// Action Links namespace creation.
export const actionLinks = {

@ -1,7 +1,7 @@
import { Blaze } from 'meteor/blaze';
import { Template } from 'meteor/templating';
import { handleError } from '/app/utils';
import { fireGlobalEvent, Layout } from '/app/ui-utils';
import { handleError } from '../../utils';
import { fireGlobalEvent, Layout } from '../../ui-utils';
import { actionLinks } from '../both/lib/actionLinks';
Template.room.events({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { handleError } from '/app/utils';
import { handleError } from '../../../utils';
import { actionLinks } from '../../both/lib/actionLinks';
// Action Links Handler. This method will be called off the client.

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { Template } from 'meteor/templating';
import { settings } from '/app/settings';
import { settings } from '../../settings';
Template.body.onRendered(() => {
Tracker.autorun((c) => {

@ -1,8 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { settings } from '/app/settings';
import { callbacks } from '/app/callbacks';
import { ChatRoom } from '/app/models';
import { settings } from '../../settings';
import { callbacks } from '../../callbacks';
import { ChatRoom } from '../../models';
import { Tracker } from 'meteor/tracker';
function trackEvent(category, action, label) {

@ -1,4 +1,4 @@
import { settings } from '/app/settings';
import { settings } from '../../settings';
settings.addGroup('Analytics', function addSettings() {
this.section('Piwik', function() {

@ -3,12 +3,12 @@ import { DDPCommon } from 'meteor/ddp-common';
import { DDP } from 'meteor/ddp';
import { Accounts } from 'meteor/accounts-base';
import { Restivus } from 'meteor/nimble:restivus';
import { Logger } from '/app/logger';
import { settings } from '/app/settings';
import { metrics } from '/app/metrics';
import { hasPermission } from '/app/authorization';
import { Logger } from '../../logger';
import { settings } from '../../settings';
import { metrics } from '../../metrics';
import { hasPermission } from '../../authorization';
import { RateLimiter } from 'meteor/rate-limit';
import { hasAllPermission } from '/app/authorization';
import { hasAllPermission } from '../../authorization';
import _ from 'underscore';
const logger = new Logger('API', {});

@ -1,5 +1,5 @@
import { hasRole } from '/app/authorization';
import { Info } from '/app/utils';
import { hasRole } from '../../../authorization';
import { Info } from '../../../utils';
import { API } from '../api';
API.default.addRoute('info', { authRequired: false }, {

@ -1,4 +1,4 @@
import { composeMessageObjectWithUser } from '/app/utils';
import { composeMessageObjectWithUser } from '../../../utils';
import { API } from '../api';
API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room, userId) {

@ -1,5 +1,5 @@
import { Accounts } from 'meteor/accounts-base';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { API } from '../api';
API.helperMethods.set('getLoggedInUser', function _getLoggedInUser() {

@ -1,7 +1,7 @@
// If the count query param is higher than the "API_Upper_Count_Limit" setting, then we limit that
// If the count query param isn't defined, then we set it to the "API_Default_Count" setting
// If the count is zero, then that means unlimited and is only allowed if the setting "API_Allow_Infinite_Count" is true
import { settings } from '/app/settings';
import { settings } from '../../../settings';
import { API } from '../api';
API.helperMethods.set('getPaginationItems', function _getPaginationItems() {

@ -1,6 +1,6 @@
// Convenience method, almost need to turn it into a middleware of sorts
import { Meteor } from 'meteor/meteor';
import { Users } from '/app/models';
import { Users } from '../../../models';
import { API } from '../api';
API.helperMethods.set('getUserFromParams', function _getUserFromParams() {

@ -1,5 +1,5 @@
import { settings } from '/app/settings';
import { getUserPreference } from '/app/utils';
import { settings } from '../../../settings';
import { getUserPreference } from '../../../utils';
import { API } from '../api';
const getInfoFromUserObject = (user) => {

@ -1,4 +1,4 @@
import { Users } from '/app/models';
import { Users } from '../../../models';
import { API } from '../api';
API.helperMethods.set('insertUserObject', function _addUserToObject({ object, userId }) {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { hasPermission } from '/app/authorization';
import { hasPermission } from '../../../authorization';
import { EJSON } from 'meteor/ejson';
import { API } from '../api';

@ -1,4 +1,4 @@
import { settings } from '/app/settings';
import { settings } from '../../settings';
settings.addGroup('General', function() {
this.section('REST API', function() {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { RocketChatAssets } from '/app/assets';
import { RocketChatAssets } from '../../../assets';
import Busboy from 'busboy';
import { API } from '../api';

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Rooms, Subscriptions, Messages, Uploads, Integrations, Users } from '/app/models';
import { hasPermission } from '/app/authorization';
import { composeMessageObjectWithUser } from '/app/utils';
import { Rooms, Subscriptions, Messages, Uploads, Integrations, Users } from '../../../models';
import { hasPermission } from '../../../authorization';
import { composeMessageObjectWithUser } from '../../../utils';
import { API } from '../api';
import _ from 'underscore';

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { Messages } from '/app/models';
import { hasPermission } from '/app/authorization';
import { composeMessageObjectWithUser } from '/app/utils';
import { processWebhookMessage } from '/app/lib';
import { Messages } from '../../../models';
import { hasPermission } from '../../../authorization';
import { composeMessageObjectWithUser } from '../../../utils';
import { processWebhookMessage } from '../../../lib';
import { API } from '../api';
API.v1.addRoute('chat.delete', { authRequired: true }, {

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
import { slashCommands } from '/app/utils';
import { Rooms } from '/app/models';
import { slashCommands } from '../../../utils';
import { Rooms } from '../../../models';
import { API } from '../api';
API.v1.addRoute('commands.get', { authRequired: true }, {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { EmojiCustom } from '/app/models';
import { EmojiCustom } from '../../../models';
import { API } from '../api';
import Busboy from 'busboy';

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Subscriptions, Rooms, Messages, Uploads, Integrations, Users } from '/app/models';
import { hasPermission } from '/app/authorization';
import { composeMessageObjectWithUser } from '/app/utils';
import { Subscriptions, Rooms, Messages, Uploads, Integrations, Users } from '../../../models';
import { hasPermission } from '../../../authorization';
import { composeMessageObjectWithUser } from '../../../utils';
import { API } from '../api';
import _ from 'underscore';

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { getRoomByNameOrIdWithOptionToJoin } from '/app/lib';
import { Subscriptions, Uploads, Users, Messages, Rooms } from '/app/models';
import { hasPermission } from '/app/authorization';
import { composeMessageObjectWithUser } from '/app/utils';
import { settings } from '/app/settings';
import { getRoomByNameOrIdWithOptionToJoin } from '../../../lib';
import { Subscriptions, Uploads, Users, Messages, Rooms } from '../../../models';
import { hasPermission } from '../../../authorization';
import { composeMessageObjectWithUser } from '../../../utils';
import { settings } from '../../../settings';
import { API } from '../api';
function findDirectMessageRoom(params, user) {

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { hasPermission } from '/app/authorization';
import { IntegrationHistory, Integrations } from '/app/models';
import { hasPermission } from '../../../authorization';
import { IntegrationHistory, Integrations } from '../../../models';
import { API } from '../api';
API.v1.addRoute('integrations.create', { authRequired: true }, {

@ -1,10 +1,10 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { TAPi18n } from 'meteor/tap:i18n';
import { hasRole } from '/app/authorization';
import { Info } from '/app/utils';
import { Users } from '/app/models';
import { settings } from '/app/settings';
import { hasRole } from '../../../authorization';
import { Info } from '../../../utils';
import { Users } from '../../../models';
import { settings } from '../../../settings';
import { API } from '../api';
API.v1.addRoute('info', { authRequired: false }, {

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { hasPermission } from '/app/authorization';
import { Permissions, Roles } from '/app/models';
import { hasPermission } from '../../../authorization';
import { Permissions, Roles } from '../../../models';
import { API } from '../api';
/**

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { Roles } from '/app/models';
import { Roles } from '../../../models';
import { API } from '../api';
API.v1.addRoute('roles.list', { authRequired: true }, {

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { FileUpload } from '/app/file-upload';
import { Rooms } from '/app/models';
import { FileUpload } from '../../../file-upload';
import { Rooms } from '../../../models';
import Busboy from 'busboy';
import { API } from '../api';

@ -1,8 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { ServiceConfiguration } from 'meteor/service-configuration';
import { Settings } from '/app/models';
import { hasPermission } from '/app/authorization';
import { Settings } from '../../../models';
import { hasPermission } from '../../../authorization';
import { API } from '../api';
import _ from 'underscore';

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { hasPermission } from '/app/authorization';
import { Statistics } from '/app/models';
import { hasPermission } from '../../../authorization';
import { Statistics } from '../../../models';
import { API } from '../api';
API.v1.addRoute('statistics', { authRequired: true }, {

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { Subscriptions } from '/app/models';
import { Subscriptions } from '../../../models';
import { API } from '../api';
API.v1.addRoute('subscriptions.get', { authRequired: true }, {

@ -1,10 +1,10 @@
import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { TAPi18n } from 'meteor/tap:i18n';
import { Users, Subscriptions } from '/app/models';
import { hasPermission } from '/app/authorization';
import { settings } from '/app/settings';
import { getURL } from '/app/utils';
import { Users, Subscriptions } from '../../../models';
import { hasPermission } from '../../../authorization';
import { settings } from '../../../settings';
import { getURL } from '../../../utils';
import {
validateCustomFields,
saveUser,
@ -12,7 +12,7 @@ import {
checkUsernameAvailability,
setUserAvatar,
saveCustomFields,
} from '/app/lib';
} from '../../../lib';
import { API } from '../api';
import _ from 'underscore';
import Busboy from 'busboy';

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Rooms } from '/app/models';
import { Rooms } from '../../../models';
import { API } from '../api';
API.v1.addRoute('video-conference/jitsi.update-timeout', { authRequired: true }, {

@ -10,7 +10,7 @@
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { APIClient } from '/app/utils';
import { APIClient } from '../../../utils';
Template.appInstall.helpers({
appFile() {

@ -2,7 +2,7 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { APIClient } from '/app/utils';
import { APIClient } from '../../../utils';
import moment from 'moment';
import hljs from 'highlight.js';

@ -4,9 +4,9 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { TAPi18next } from 'meteor/tap:i18n';
import { isEmail, Info, APIClient } from '/app/utils';
import { settings } from '/app/settings';
import { Markdown } from '/app/markdown';
import { isEmail, Info, APIClient } from '../../../utils';
import { settings } from '../../../settings';
import { Markdown } from '../../../markdown';
import _ from 'underscore';
import s from 'underscore.string';
import toastr from 'toastr';

@ -2,7 +2,7 @@ import toastr from 'toastr';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t, Info, APIClient } from '/app/utils';
import { t, Info, APIClient } from '../../../utils';
import { AppEvents } from '../communication';
import { Apps } from '../orchestrator';

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { slashCommands, APIClient } from '/app/utils';
import { CachedCollectionManager } from '/app/ui-cached-collection';
import { slashCommands, APIClient } from '../../../utils';
import { CachedCollectionManager } from '../../../ui-cached-collection';
export const AppEvents = Object.freeze({
APP_ADDED: 'app/added',

@ -4,10 +4,10 @@ import { Utilities } from '../lib/misc/Utilities';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { TAPi18next } from 'meteor/tap:i18n';
import { APIClient } from '/app/utils';
import { AdminBox } from '/app/ui-utils';
import { CachedCollectionManager } from '/app/ui-cached-collection';
import { hasAtLeastOnePermission } from '/app/authorization';
import { APIClient } from '../../utils';
import { AdminBox } from '../../ui-utils';
import { CachedCollectionManager } from '../../ui-cached-collection';
import { hasAtLeastOnePermission } from '../../authorization';
export let Apps;

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { slashCommands } from '/app/utils';
import { slashCommands } from '../../../utils';
import { SlashCommandContext } from '@rocket.chat/apps-engine/definition/slashcommands';
import { Utilities } from '../../lib/misc/Utilities';

@ -1,4 +1,4 @@
import { Subscriptions } from '/app/models';
import { Subscriptions } from '../../../models';
export class AppInternalBridge {
constructor(orch) {

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
import { Messages, Users, Subscriptions } from '/app/models';
import { Notifications } from '/app/notifications';
import { Messages, Users, Subscriptions } from '../../../models';
import { Notifications } from '../../../notifications';
export class AppMessageBridge {
constructor(orch) {
@ -29,7 +29,7 @@ export class AppMessageBridge {
async update(message, appId) {
console.log(`The App ${ appId } is updating a message.`);
if (!this.updateMessage) {
const { updateMessage } = await import('/app/lib');
const { updateMessage } = await import('../../../lib');
this.updateMessage = updateMessage;
}

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Rooms, Subscriptions, Users } from '/app/models';
import { Rooms, Subscriptions, Users } from '../../../models';
import { RoomType } from '@rocket.chat/apps-engine/definition/rooms';
export class AppRoomBridge {
@ -102,7 +102,7 @@ export class AppRoomBridge {
console.log(`The App ${ appId } is updating a room.`);
if (!this.addUserToRoom) {
const { addUserToRoom } = await import('/app/lib');
const { addUserToRoom } = await import('../../../lib');
this.addUserToRoom = addUserToRoom;
}

@ -1,4 +1,4 @@
import { Settings } from '/app/models';
import { Settings } from '../../../models';
export class AppSettingBridge {
constructor(orch) {

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { settings } from '/app/settings';
import { hasPermission } from '/app/authorization';
import { settings } from '../../../settings';
import { hasPermission } from '../../../authorization';
const waitToLoad = function(orch) {
return new Promise((resolve) => {

@ -33,7 +33,7 @@ export class AppsRestApi {
}
async loadAPI() {
const { API } = await import('/app/api');
const { API } = await import('../../../api');
_API = API;
this.api = new API.ApiClass({
version: 'apps',

@ -1,5 +1,5 @@
import { Random } from 'meteor/random';
import { Messages, Rooms, Users } from '/app/models';
import { Messages, Rooms, Users } from '../../../models';
export class AppMessagesConverter {
constructor(orch) {

@ -1,4 +1,4 @@
import { Rooms, Users } from '/app/models';
import { Rooms, Users } from '../../../models';
import { RoomType } from '@rocket.chat/apps-engine/definition/rooms';
export class AppRoomsConverter {

@ -1,4 +1,4 @@
import { Settings } from '/app/models';
import { Settings } from '../../../models';
import { SettingType } from '@rocket.chat/apps-engine/definition/settings';
export class AppSettingsConverter {

@ -1,4 +1,4 @@
import { Users } from '/app/models';
import { Users } from '../../../models';
import { UserStatusConnection, UserType } from '@rocket.chat/apps-engine/definition/users';
export class AppUsersConverter {

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Permissions, AppsLogsModel, AppsModel, AppsPersistenceModel } from '/app/models';
import { settings } from '/app/settings';
import { Permissions, AppsLogsModel, AppsModel, AppsPersistenceModel } from '../../models';
import { settings } from '../../settings';
import { RealAppBridges } from './bridges';
import { AppMethods, AppsRestApi, AppServerNotifier } from './communication';
import { AppMessagesConverter, AppRoomsConverter, AppSettingsConverter, AppUsersConverter } from './converters';

@ -1,10 +1,10 @@
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';
import { settings } from '/app/settings';
import { Settings } from '/app/models';
import { getURL } from '/app/utils';
import { hasPermission } from '/app/authorization';
import { RocketChatFile } from '/app/file';
import { settings } from '../../settings';
import { Settings } from '../../models';
import { getURL } from '../../utils';
import { hasPermission } from '../../authorization';
import { RocketChatFile } from '../../file';
import { WebAppHashing } from 'meteor/webapp-hashing';
import { WebAppInternals } from 'meteor/webapp';
import _ from 'underscore';

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import * as Models from '/app/models';
import * as Models from '../../models';
import { ChatPermissions } from './lib/ChatPermissions';
function atLeastOne(permissions = [], scope) {

@ -1,4 +1,4 @@
import { Roles } from '/app/models';
import { Roles } from '../../models';
export const hasRole = (userId, roleNames, scope) => {
roleNames = [].concat(roleNames);

@ -1,3 +1,3 @@
import { AuthzCachedCollection } from '/app/models';
import { AuthzCachedCollection } from '../../../models';
export const ChatPermissions = AuthzCachedCollection.collection;

@ -1,6 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from '/app/utils';
import { t } from '../../utils';
FlowRouter.route('/admin/permissions', {
name: 'admin-permissions',

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { CachedCollectionManager } from '/app/ui-cached-collection';
import { CachedCollectionManager } from '../../ui-cached-collection';
import { hasAllPermission } from './hasPermission';
Meteor.startup(async() => {
const { AdminBox } = await import('/app/ui-utils');
const { AdminBox } = await import('../../ui-utils');
CachedCollectionManager.onLogin(() => Meteor.subscribe('roles'));

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Notifications } from '/app/notifications';
import { RoomRoles } from '/app/models';
import { Notifications } from '../../notifications';
import { RoomRoles } from '../../models';
Meteor.startup(function() {
Notifications.onLogged('Users:NameChanged', function({ _id, name }) {

@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { Template } from 'meteor/templating';
import { Roles } from '/app/models';
import { Roles } from '../../../models';
import { ChatPermissions } from '../lib/ChatPermissions';
import { hasAllPermission } from '../hasPermission';

@ -2,8 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t, handleError } from '/app/utils';
import { Roles } from '/app/models';
import { t, handleError } from '../../../utils';
import { Roles } from '../../../models';
import { hasAllPermission } from '../hasPermission';
import toastr from 'toastr';
@ -114,7 +114,7 @@ Template.permissionsRole.helpers({
Template.permissionsRole.events({
async 'click .remove-user'(e, instance) {
if (!_modal) {
const { modal } = await import('/app/ui-utils');
const { modal } = await import('../../../ui-utils');
_modal = modal;
}
e.preventDefault();

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users, Roles } from '/app/models';
import { Users, Roles } from '../../../models';
import { getRoles } from './getRoles';
import _ from 'underscore';

@ -1,5 +1,5 @@
import { settings } from '/app/settings';
import { Subscriptions } from '/app/models';
import { settings } from '../../../settings';
import { Subscriptions } from '../../../models';
import { hasPermission } from './hasPermission';
export const roomAccessValidators = [

@ -1,3 +1,3 @@
import { Roles } from '/app/models';
import { Roles } from '../../../models';
export const getRoles = () => Roles.find().fetch();

@ -1,4 +1,4 @@
import { Roles } from '/app/models';
import { Roles } from '../../../models';
export const getUsersInRole = (roleName, scope, options) => Roles.findUsersInRole(roleName, scope, options);

@ -1,4 +1,4 @@
import { Roles, Permissions } from '/app/models';
import { Roles, Permissions } from '../../../models';
function atLeastOne(userId, permissions = [], scope) {
return permissions.some((permissionId) => {

@ -1,4 +1,4 @@
import { Roles } from '/app/models';
import { Roles } from '../../../models';
export const hasRole = (userId, roleNames, scope) => {
roleNames = [].concat(roleNames);

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Users, Roles } from '/app/models';
import { Users, Roles } from '../../../models';
import { getRoles } from './getRoles';
import _ from 'underscore';

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Permissions } from '/app/models';
import { Permissions } from '../../../models';
import { hasPermission } from '../functions/hasPermission';
Meteor.methods({

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Users, Roles } from '/app/models';
import { settings } from '/app/settings';
import { Notifications } from '/app/notifications';
import { Users, Roles } from '../../../models';
import { settings } from '../../../settings';
import { Notifications } from '../../../notifications';
import { hasPermission } from '../functions/hasPermission';
import _ from 'underscore';

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import * as Models from '/app/models';
import * as Models from '../../../models';
import { hasPermission } from '../functions/hasPermission';
Meteor.methods({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Permissions } from '/app/models';
import { Permissions } from '../../../models';
import { hasPermission } from '../functions/hasPermission';
Meteor.methods({

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Roles } from '/app/models';
import { settings } from '/app/settings';
import { Notifications } from '/app/notifications';
import { Roles } from '../../../models';
import { settings } from '../../../settings';
import { Notifications } from '../../../notifications';
import { hasPermission } from '../functions/hasPermission';
import _ from 'underscore';

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Roles } from '/app/models';
import { settings } from '/app/settings';
import { Notifications } from '/app/notifications';
import { Roles } from '../../../models';
import { settings } from '../../../settings';
import { Notifications } from '../../../notifications';
import { hasPermission } from '../functions/hasPermission';
Meteor.methods({

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { Permissions } from '/app/models';
import { Notifications } from '/app/notifications';
import { Permissions } from '../../../models';
import { Notifications } from '../../../notifications';
Meteor.methods({
'permissions/get'(updatedAt) {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Roles } from '/app/models';
import { Roles } from '../../../models';
Meteor.publish('roles', function() {
if (!this.userId) {

@ -1,6 +1,6 @@
/* eslint no-multi-spaces: 0 */
import { Meteor } from 'meteor/meteor';
import { Roles, Permissions } from '/app/models';
import { Roles, Permissions } from '../../models';
Meteor.startup(function() {
// Note:

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import s from 'underscore.string';
import { settings } from '/app/settings';
import { callbacks } from '/app/callbacks';
import { settings } from '../../settings';
import { callbacks } from '../../callbacks';
import Autolinker from 'autolinker';
const createAutolinker = () => {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { settings } from '/app/settings';
import { settings } from '../../settings';
Meteor.startup(function() {
const enableQuery = {

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { settings } from '/app/settings';
import { hasAtLeastOnePermission } from '/app/authorization';
import { MessageAction } from '/app/ui-utils';
import { Messages } from '/app/models';
import { settings } from '../../../settings';
import { hasAtLeastOnePermission } from '../../../authorization';
import { MessageAction } from '../../../ui-utils';
import { Messages } from '../../../models';
import { AutoTranslate } from './autotranslate';
Meteor.startup(function() {

@ -1,10 +1,10 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { Subscriptions, Messages } from '/app/models';
import { callbacks } from '/app/callbacks';
import { settings } from '/app/settings';
import { hasAtLeastOnePermission } from '/app/authorization';
import { CachedCollectionManager } from '/app/ui-cached-collection';
import { Subscriptions, Messages } from '../../../models';
import { callbacks } from '../../../callbacks';
import { settings } from '../../../settings';
import { hasAtLeastOnePermission } from '../../../authorization';
import { CachedCollectionManager } from '../../../ui-cached-collection';
import _ from 'underscore';
import mem from 'mem';

@ -1,8 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { settings } from '/app/settings';
import { hasAtLeastOnePermission } from '/app/authorization';
import { TabBar } from '/app/ui-utils';
import { settings } from '../../../settings';
import { hasAtLeastOnePermission } from '../../../authorization';
import { TabBar } from '../../../ui-utils';
Meteor.startup(function() {
Tracker.autorun(function() {

@ -2,8 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Random } from 'meteor/random';
import { Template } from 'meteor/templating';
import { ChatSubscription, Subscriptions, Messages } from '/app/models';
import { t, handleError } from '/app/utils';
import { ChatSubscription, Subscriptions, Messages } from '../../../models';
import { t, handleError } from '../../../utils';
import _ from 'underscore';
import toastr from 'toastr';

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { HTTP } from 'meteor/http';
import { settings } from '/app/settings';
import { callbacks } from '/app/callbacks';
import { Subscriptions, Messages } from '/app/models';
import { Markdown } from '/app/markdown';
import { settings } from '../../settings';
import { callbacks } from '../../callbacks';
import { Subscriptions, Messages } from '../../models';
import { Markdown } from '../../markdown';
import _ from 'underscore';
import s from 'underscore.string';

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter';
import { hasPermission } from '/app/authorization';
import { hasPermission } from '../../../authorization';
import AutoTranslate from '../autotranslate';
Meteor.methods({

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { hasPermission } from '/app/authorization';
import { Subscriptions } from '/app/models';
import { hasPermission } from '../../../authorization';
import { Subscriptions } from '../../../models';
Meteor.methods({
'autoTranslate.saveSettings'(rid, field, value, options) {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Rooms } from '/app/models';
import { Rooms } from '../../../models';
import AutoTranslate from '../autotranslate';
Meteor.methods({

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { Permissions } from '/app/models';
import { Permissions } from '../../models';
Meteor.startup(() => {
if (Permissions) {

@ -1,5 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { settings } from '/app/settings';
import { settings } from '../../settings';
Meteor.startup(function() {
settings.add('AutoTranslate_Enabled', false, { type: 'boolean', group: 'Message', section: 'AutoTranslate', public: true });

@ -1,3 +1,3 @@
import { Logger } from '/app/logger';
import { Logger } from '../../logger';
export const logger = new Logger('Blockstack');

@ -1,8 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { settings } from '/app/settings';
import { Users } from '/app/models';
import { setUserAvatar } from '/app/lib';
import { settings } from '../../settings';
import { Users } from '../../models';
import { setUserAvatar } from '../../lib';
import { updateOrCreateUser } from './userHandler';
import { handleAccessToken } from './tokenHandler';
import { logger } from './logger';

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { WebApp } from 'meteor/webapp';
import { settings } from '/app/settings';
import { RocketChatAssets } from '/app/assets';
import { settings } from '../../settings';
import { RocketChatAssets } from '../../assets';
WebApp.connectHandlers.use('/_blockstack/manifest', Meteor.bindEnvironment(function(req, res) {
const name = settings.get('Site_Name');

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save