Convert meteor-accounts-saml to main module structure (#12486)

* First wave of removal of Meteor global

* Second wave of removal of Meteor global

* Third wave of removal of Meteor global

* Fix tests

* Remove global variable SHA256

* Remove global variable WebApp

* Remove global variable EJSON

* Remove global variable Email

* Remove global variable HTTP

* Remove global variable Random

* Remove global variable ReactiveDict

* Remove global variable ReactiveVar

* Remove global variable Accounts

* Remove globals variables Match and check

* Remove global variable Mongo

* Remove global variable moment

* Remove global variable Tracker

* Remove global variable Blaze

* Remove global variables FlowRouter and BlazeLayout

* Add FlowRouter to eslint global in tests file

* Remove global variable DDPRateLimiter

* Remove global variable Session

* Remove global variable UAParser

* Remove global variable Promise

* Remove global variable Reload

* Remove global variable CryptoJS

* Remove global variable Template

* Remove global variable TAPi18n

* Remove global variable TAPi18next

* Exposing t function from rocketchat:ui package

* Convert chatpal search to main module structure

* Fix ESLint

* Convert meteor-accounts-saml to main module structure

* ReAdd removed package dependecies

* Change export statement

* Fix lint issue in saml package
pull/12491/head^2
Marcos Spessatto Defendi 7 years ago committed by Rodrigo Nascimento
parent 3b3caafdf9
commit c5a14f2196
  1. 1
      packages/meteor-accounts-saml/client/index.js
  2. 1
      packages/meteor-accounts-saml/client/saml_client.js
  3. 20
      packages/meteor-accounts-saml/package.js
  4. 2
      packages/meteor-accounts-saml/server/index.js
  5. 3
      packages/meteor-accounts-saml/server/saml_rocketchat.js
  6. 5
      packages/meteor-accounts-saml/server/saml_server.js
  7. 5
      packages/meteor-accounts-saml/server/saml_utils.js

@ -2,6 +2,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Random } from 'meteor/random';
import { ServiceConfiguration } from 'meteor/service-configuration';
if (!Accounts.saml) {
Accounts.saml = {};

@ -6,12 +6,18 @@ Package.describe({
});
Package.on_use(function(api) {
api.use('rocketchat:lib', 'server');
api.use('ecmascript');
api.use(['routepolicy', 'webapp', 'service-configuration'], 'server');
api.use(['http', 'accounts-base'], ['client', 'server']);
api.use([
'ecmascript',
'http',
'accounts-base',
]);
api.use([
'routepolicy',
'webapp',
'rocketchat:lib',
'service-configuration',
], 'server');
api.add_files(['saml_server.js', 'saml_utils.js'], 'server');
api.add_files(['saml_rocketchat.js'], 'server');
api.add_files('saml_client.js', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -0,0 +1,2 @@
import './saml_rocketchat';
import './saml_server';

@ -1,5 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { RocketChat } from 'meteor/rocketchat:lib';
import { Logger } from 'meteor/rocketchat:logger';
import { ServiceConfiguration } from 'meteor/service-configuration';
const logger = new Logger('steffo:meteor-accounts-saml', {
methods: {

@ -1,9 +1,10 @@
/* globals RoutePolicy, SAML */
/* jshint newcap: false */
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Random } from 'meteor/random';
import { WebApp } from 'meteor/webapp';
import { RocketChat } from 'meteor/rocketchat:lib';
import { RoutePolicy } from 'meteor/routepolicy';
import { SAML } from './saml_utils';
import _ from 'underscore';
if (!Accounts.saml) {

@ -1,5 +1,3 @@
/* globals SAML:true */
import { Meteor } from 'meteor/meteor';
import zlib from 'zlib';
import xmlCrypto from 'xml-crypto';
@ -8,11 +6,10 @@ import xmldom from 'xmldom';
import querystring from 'querystring';
import xmlbuilder from 'xmlbuilder';
import array2string from 'arraybuffer-to-string';
// var prefixMatch = new RegExp(/(?!xmlns)^.*:/);
SAML = function(options) {
export const SAML = function(options) {
this.options = this.initialize(options);
};
Loading…
Cancel
Save