mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	UI: ember-auto-import (#4933)
* add auto-import * remove imports that we can and get rid of autosize shim * remove items from eslinrc * import base64js in shamir key
This commit is contained in:
		| @@ -3,9 +3,9 @@ module.exports = { | |||||||
|   parserOptions: { |   parserOptions: { | ||||||
|     ecmaVersion: 2017, |     ecmaVersion: 2017, | ||||||
|     sourceType: 'module', |     sourceType: 'module', | ||||||
|     "ecmaFeatures": { |     ecmaFeatures: { | ||||||
|       "experimentalObjectRestSpread": true |       experimentalObjectRestSpread: true, | ||||||
|     } |     }, | ||||||
|   }, |   }, | ||||||
|   extends: 'eslint:recommended', |   extends: 'eslint:recommended', | ||||||
|   env: { |   env: { | ||||||
| @@ -13,12 +13,10 @@ module.exports = { | |||||||
|     es6: true, |     es6: true, | ||||||
|   }, |   }, | ||||||
|   rules: { |   rules: { | ||||||
|     "no-unused-vars": ["error", { "ignoreRestSiblings": true }] |     'no-unused-vars': ['error', { ignoreRestSiblings: true }], | ||||||
|   }, |   }, | ||||||
|   globals: { |   globals: { | ||||||
|     base64js: true, |  | ||||||
|     TextEncoderLite: true, |     TextEncoderLite: true, | ||||||
|     TextDecoderLite: true, |     TextDecoderLite: true, | ||||||
|     Duration: true |   }, | ||||||
|   } |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| import Ember from 'ember'; | import Ember from 'ember'; | ||||||
|  | import base64js from 'base64-js'; | ||||||
|  |  | ||||||
| const { Component, inject, computed, get } = Ember; | const { Component, inject, computed, get } = Ember; | ||||||
| const { camelize } = Ember.String; | const { camelize } = Ember.String; | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| import Ember from 'ember'; | import Ember from 'ember'; | ||||||
|  | import Duration from 'Duration.js'; | ||||||
|  |  | ||||||
| const { computed, get, set } = Ember; | const { computed, get, set } = Ember; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| import keys from 'vault/lib/keycodes'; | import keys from 'vault/lib/keycodes'; | ||||||
| import argTokenizer from 'yargs-parser-tokenizer'; | import argTokenizer from 'yargs-parser/lib/tokenize-arg-string.js'; | ||||||
|  |  | ||||||
| const supportedCommands = ['read', 'write', 'list', 'delete']; | const supportedCommands = ['read', 'write', 'list', 'delete']; | ||||||
| const uiCommands = ['clearall', 'clear', 'fullscreen', 'refresh']; | const uiCommands = ['clearall', 'clear', 'fullscreen', 'refresh']; | ||||||
|   | |||||||
| @@ -1,3 +1,5 @@ | |||||||
|  | import base64js from 'base64-js'; | ||||||
|  |  | ||||||
| export function encodeString(string) { | export function encodeString(string) { | ||||||
|   var encoded = new TextEncoderLite('utf-8').encode(string); |   var encoded = new TextEncoderLite('utf-8').encode(string); | ||||||
|   return base64js.fromByteArray(encoded); |   return base64js.fromByteArray(encoded); | ||||||
|   | |||||||
| @@ -35,29 +35,25 @@ module.exports = function(defaults) { | |||||||
|       grid: true, |       grid: true, | ||||||
|       browsers: ['defaults', 'ie 11'], |       browsers: ['defaults', 'ie 11'], | ||||||
|     }, |     }, | ||||||
|  |     autoImport: { | ||||||
|  |       webpack: { | ||||||
|  |         // this makes `unsafe-eval` CSP unnecessary | ||||||
|  |         // see https://github.com/ef4/ember-auto-import/issues/50 | ||||||
|  |         // and https://github.com/webpack/webpack/issues/5627 | ||||||
|  |         devtool: 'inline-source-map', | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   app.import('vendor/string-includes.js'); |   app.import('vendor/string-includes.js'); | ||||||
|   app.import('node_modules/string.prototype.endswith/endswith.js'); |   app.import('node_modules/string.prototype.endswith/endswith.js'); | ||||||
|   app.import('node_modules/string.prototype.startswith/startswith.js'); |   app.import('node_modules/string.prototype.startswith/startswith.js'); | ||||||
|   app.import('node_modules/autosize/dist/autosize.js'); |  | ||||||
|   app.import('vendor/shims/autosize.js'); |  | ||||||
|  |  | ||||||
|   app.import('node_modules/jsonlint/lib/jsonlint.js'); |   app.import('node_modules/jsonlint/lib/jsonlint.js'); | ||||||
|   app.import('node_modules/codemirror/addon/lint/lint.css'); |   app.import('node_modules/codemirror/addon/lint/lint.css'); | ||||||
|   app.import('node_modules/codemirror/addon/lint/lint.js'); |   app.import('node_modules/codemirror/addon/lint/lint.js'); | ||||||
|   app.import('node_modules/codemirror/addon/lint/json-lint.js'); |   app.import('node_modules/codemirror/addon/lint/json-lint.js'); | ||||||
|   app.import('node_modules/base64-js/base64js.min.js'); |  | ||||||
|   app.import('node_modules/text-encoder-lite/index.js'); |   app.import('node_modules/text-encoder-lite/index.js'); | ||||||
|   app.import('node_modules/Duration.js/duration.js'); |  | ||||||
|  |  | ||||||
|   app.import('node_modules/columnify/columnify.js', { |  | ||||||
|     using: [{ transformation: 'cjs', as: 'columnify' }], |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   app.import('node_modules/yargs-parser/lib/tokenize-arg-string.js', { |  | ||||||
|     using: [{ transformation: 'cjs', as: 'yargs-parser-tokenizer' }], |  | ||||||
|   }); |  | ||||||
|  |  | ||||||
|   // Use `app.import` to add additional libraries to the generated |   // Use `app.import` to add additional libraries to the generated | ||||||
|   // output files. |   // output files. | ||||||
|   | |||||||
| @@ -47,12 +47,12 @@ | |||||||
|     "ember-ajax": "^3.0.0", |     "ember-ajax": "^3.0.0", | ||||||
|     "ember-angle-bracket-invocation-polyfill": "^1.0.2", |     "ember-angle-bracket-invocation-polyfill": "^1.0.2", | ||||||
|     "ember-api-actions": "^0.1.8", |     "ember-api-actions": "^0.1.8", | ||||||
|  |     "ember-auto-import": "^1.2.3", | ||||||
|     "ember-basic-dropdown": "^1.0.0", |     "ember-basic-dropdown": "^1.0.0", | ||||||
|     "ember-basic-dropdown-hover": "^0.5.0", |     "ember-basic-dropdown-hover": "^0.5.0", | ||||||
|     "ember-cli": "~2.16.0", |     "ember-cli": "~2.16.0", | ||||||
|     "ember-cli-autoprefixer": "^0.8.1", |     "ember-cli-autoprefixer": "^0.8.1", | ||||||
|     "ember-cli-babel": "^6.3.0", |     "ember-cli-babel": "^6.3.0", | ||||||
|     "ember-cli-cjs-transform": "^1.2.0", |  | ||||||
|     "ember-cli-clipboard": "^0.8.0", |     "ember-cli-clipboard": "^0.8.0", | ||||||
|     "ember-cli-content-security-policy": "^1.0.0", |     "ember-cli-content-security-policy": "^1.0.0", | ||||||
|     "ember-cli-dependency-checker": "^1.3.0", |     "ember-cli-dependency-checker": "^1.3.0", | ||||||
|   | |||||||
							
								
								
									
										9
									
								
								ui/vendor/shims/autosize.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								ui/vendor/shims/autosize.js
									
									
									
									
										vendored
									
									
								
							| @@ -1,9 +0,0 @@ | |||||||
| (function() { |  | ||||||
|   function vendorModule() { |  | ||||||
|     'use strict'; |  | ||||||
|  |  | ||||||
|     return { 'default': self['autosize'] }; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   define('autosize', [], vendorModule); |  | ||||||
| })(); |  | ||||||
							
								
								
									
										1398
									
								
								ui/yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										1398
									
								
								ui/yarn.lock
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user
	 Matthew Irish
					Matthew Irish