diff --git a/.drone.star b/.drone.star index 9efabcd..cbe5ada 100644 --- a/.drone.star +++ b/.drone.star @@ -135,7 +135,7 @@ def website(ctx): }, { 'name': 'test', - 'image': 'webhippie/hugo:latest', + 'image': 'owncloudci/hugo:0.71.0', 'commands': [ 'cd hugo', 'hugo', @@ -245,7 +245,7 @@ def tests(ctx): 'steps': [ { 'name': 'install', - 'image': 'owncloudci/nodejs:11', + 'image': 'owncloudci/nodejs:12', 'pull': 'always', 'commands': [ 'yarn install --frozen-lockfile', @@ -253,7 +253,7 @@ def tests(ctx): }, { 'name': 'lint', - 'image': 'owncloudci/nodejs:11', + 'image': 'owncloudci/nodejs:12', 'pull': 'always', 'commands': [ 'yarn lint', @@ -261,7 +261,7 @@ def tests(ctx): }, { 'name': 'build', - 'image': 'owncloudci/nodejs:11', + 'image': 'owncloudci/nodejs:12', 'pull': 'always', 'commands': [ 'yarn build', @@ -269,7 +269,7 @@ def tests(ctx): }, { 'name': 'unit', - 'image': 'owncloudci/nodejs:11', + 'image': 'owncloudci/nodejs:12', 'pull': 'always', 'commands': [ 'yarn test:unit' diff --git a/.eslintrc.js b/.eslintrc.js index b23239d..8c4a4df 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,9 @@ module.exports = { }, extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'], parserOptions: { - parser: 'babel-eslint' + parser: "@babel/eslint-parser", + ecmaVersion: 6, + sourceType: "module" }, rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', diff --git a/changelog/unreleased/enhancement-config-json b/changelog/unreleased/enhancement-config-json new file mode 100644 index 0000000..fc3b76f --- /dev/null +++ b/changelog/unreleased/enhancement-config-json @@ -0,0 +1,5 @@ +Enhancement: Allow string as configObject attribute + +The property/attribute "configObject" is now allowed to be a string. We'll parse it as JSON. + +https://github.com/owncloud/file-picker/pull/27 diff --git a/jest.config.js b/jest.config.js index ce17839..de132d8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,5 +6,6 @@ module.exports = { '!./src/main.js', '!./src/services/auth.js', '!./src/assets/**/*' - ] + ], + setupFiles: ['./tests/unit/config/jest.init.js'] } diff --git a/package.json b/package.json index 072b76a..749a1c4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "author": "ownclouders ", "description": "Easily integrate ownCloud into your existing products", - "type": "module", + "type": "commonjs", "module": "dist/file-picker.js", "main": "dist/file-picker.js", "unpkg": "dist/file-picker.min.js", @@ -44,6 +44,7 @@ "vue-virtual-scroller": "^1.0.10" }, "devDependencies": { + "@babel/eslint-parser": "^7.13.14", "@babel/polyfill": "^7.10.4", "@vue/cli-plugin-babel": "^4.4.0", "@vue/cli-plugin-eslint": "^4.4.0", @@ -51,10 +52,10 @@ "@vue/cli-service": "^4.4.0", "@vue/eslint-config-prettier": "^6.0.0", "@vue/test-utils": "^1.0.3", - "babel-eslint": "^10.1.0", "eslint": "^6.7.2", - "eslint-plugin-prettier": "^3.1.3", + "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^6.2.2", + "jest-fetch-mock": "^3.0.3", "prettier": "^1.19.1", "vue": "^2.6.12", "vue-template-compiler": "^2.6.12" diff --git a/src/App.vue b/src/App.vue index e1272c0..569455b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,6 +23,7 @@ import DesignSystem from 'owncloud-design-system' import initVueAuthenticate from './services/auth' import FilePicker from './components/FilePicker.vue' import Login from './components/Login.vue' +import { loadConfig } from './helpers/config' // Init sdk and design system /* global Vue */ @@ -58,7 +59,7 @@ export default { default: null }, configObject: { - type: Object, + type: [Object, String], required: false, default: null }, @@ -104,13 +105,7 @@ export default { }, async initAuthentication() { - // If configObject is passed - use that one instead of fetching one - if (this.configObject !== null) { - this.config = this.configObject - } else { - let config = await fetch(this.configLocation) - this.config = await config.json() - } + this.config = await loadConfig(this.configObject, this.configLocation) if (this.bearerToken) { return this.initApp() diff --git a/src/helpers/config.js b/src/helpers/config.js new file mode 100644 index 0000000..929c177 --- /dev/null +++ b/src/helpers/config.js @@ -0,0 +1,20 @@ +/** + * Identify which way of configuring the file picker was chosen and return a config object from it, + * either by fetching, parsing or plain returning it. + * + * @param configObject object|string|null Either an object or a json string holding the config + * @param configLocation string A config url + * @returns {Promise} + */ +export async function loadConfig(configObject, configLocation) { + if (configObject === null) { + const config = await fetch(configLocation) + return await config.json() + } + + if (typeof configObject === 'string') { + return JSON.parse(configObject) + } + + return configObject +} diff --git a/tests/unit/__snapshots__/filePicker.spec.js.snap b/tests/unit/__snapshots__/filePicker.spec.js.snap index 0fb2d15..b1fd30a 100644 --- a/tests/unit/__snapshots__/filePicker.spec.js.snap +++ b/tests/unit/__snapshots__/filePicker.spec.js.snap @@ -28,7 +28,7 @@ exports[`File picker renders list of resources 1`] = `
0 B - Last modified - 11 hours ago + 16 hours ago
@@ -49,7 +49,7 @@ exports[`File picker renders list of resources 1`] = `
1.3 MB - Last modified - 11 hours ago + 16 hours ago
@@ -68,7 +68,7 @@ exports[`File picker renders list of resources 1`] = `
ownCloud Manual.pdf
5.8 MB - Last modified - 11 hours ago + 16 hours ago
diff --git a/tests/unit/config/jest.init.js b/tests/unit/config/jest.init.js new file mode 100644 index 0000000..fb257eb --- /dev/null +++ b/tests/unit/config/jest.init.js @@ -0,0 +1,2 @@ +import fetchMock from 'jest-fetch-mock' +fetchMock.enableMocks() diff --git a/tests/unit/helpers/config.spec.js b/tests/unit/helpers/config.spec.js new file mode 100644 index 0000000..84105a4 --- /dev/null +++ b/tests/unit/helpers/config.spec.js @@ -0,0 +1,28 @@ +import { loadConfig } from '@/helpers/config' + +const exampleConfig = { + server: 'https://own.cloud/', + auth: { + clientId: 'rWgSlOtLJCO6QBtEVgDdXWlUOrEt2CBL9F48c6TQKt3ZGG5ofazNhEJjp6TlyanT', + url: 'https://own.cloud/index.php/apps/oauth2/api/v1/token', + authUrl: 'https://own.cloud/index.php/apps/oauth2/authorize' + } +} + +describe('FilePicker config', () => { + describe('loadConfig', () => { + it('When no configObject is provided, then the config is fetched from the configLocation', async () => { + fetch.mockResponseOnce(JSON.stringify(exampleConfig)) + const config = await loadConfig(null, 'https://whatever.location/config.json') + expect(config).toEqual(exampleConfig) + }) + it('When a configObject is provided and of type string, it is parsed as JSON', async () => { + const config = await loadConfig(JSON.stringify(exampleConfig), null) + expect(config).toEqual(exampleConfig) + }) + it('When a configObject is provided and not of type string, it is returned without modification', async () => { + const config = await loadConfig(exampleConfig, null) + expect(config).toEqual(exampleConfig) + }) + }) +}) diff --git a/yarn.lock b/yarn.lock index f7c28ce..155dfbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,6 +40,15 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/eslint-parser@^7.13.14": + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.13.14.tgz#f80fd23bdd839537221914cb5d17720a5ea6ba3a" + integrity sha512-I0HweR36D73Ibn/FfrRDMKlMqJHFwidIUgYdMpH+aXYuQC+waq59YaJ6t9e9N36axJ82v1jR041wwqDrDXEwRA== + dependencies: + eslint-scope "^5.1.0" + eslint-visitor-keys "^1.3.0" + semver "^6.3.0" + "@babel/generator@^7.11.0", "@babel/generator@^7.4.0": version "7.11.0" resolved "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.11.0.tgz?cache=0&sync_timestamp=1596142747014&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.11.0.tgz#4b90c78d8c12825024568cbe83ee6c9af193585c" @@ -258,7 +267,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.4.3": version "7.11.0" resolved "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.11.0.tgz?cache=0&sync_timestamp=1596140948272&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.11.0.tgz#a9d7e11aead25d3b422d17b2c6502c8dddef6a5d" integrity sha1-qdfhGurSXTtCLReyxlAsjd3val0= @@ -847,7 +856,7 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.4.3": version "7.11.0" resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.11.0.tgz?cache=0&sync_timestamp=1596144735118&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" integrity sha1-m5ls4bmPU/fD5BdRFWBdVu0H3SQ= @@ -862,7 +871,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4": version "7.11.0" resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.11.0.tgz?cache=0&sync_timestamp=1596143011319&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" integrity sha1-Kua/G6mujDxDgk5YYSaYcbIG6Q0= @@ -1997,18 +2006,6 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.npm.taobao.org/babel-core/download/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha1-laSS3dkPm06aSh2hTrM1uHtjTs4= -babel-eslint@^10.1.0: - version "10.1.0" - resolved "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - integrity sha1-aWjlaKkQt4+zd5zdi2rC9HmUMjI= - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - babel-jest@^24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/babel-jest/download/babel-jest-24.9.0.tgz?cache=0&sync_timestamp=1596194011120&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-jest%2Fdownload%2Fbabel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" @@ -2571,9 +2568,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001109: - version "1.0.30001109" - resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001109.tgz?cache=0&sync_timestamp=1596086078422&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001109.tgz#a9f3f26a0c3753b063d7acbb48dfb9c0e46f2b19" - integrity sha1-qfPyagw3U7Bj16y7SN+5wORvKxk= + version "1.0.30001208" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz" + integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA== capture-exit@^2.0.0: version "2.0.0" @@ -3098,6 +3095,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-fetch@^3.0.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" + integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== + dependencies: + node-fetch "2.6.1" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -3895,10 +3899,10 @@ eslint-loader@^2.2.1: object-hash "^1.1.4" rimraf "^2.6.1" -eslint-plugin-prettier@^3.1.3: - version "3.1.4" - resolved "https://registry.npm.taobao.org/eslint-plugin-prettier/download/eslint-plugin-prettier-3.1.4.tgz?cache=0&sync_timestamp=1592177899658&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-plugin-prettier%2Fdownload%2Feslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2" - integrity sha1-Foq0MVTi6lfbmSos0JfIKBcfdcI= +eslint-plugin-prettier@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -3927,6 +3931,14 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.4.3.tgz?cache=0&sync_timestamp=1592222218942&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" @@ -3934,10 +3946,10 @@ eslint-utils@^1.4.3: dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" - resolved "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz?cache=0&sync_timestamp=1592583470232&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-visitor-keys%2Fdownload%2Feslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha1-MOvR73wv3/AcOk8VEESvJfqwUj4= + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint@^6.7.2: version "6.8.0" @@ -4010,6 +4022,13 @@ esrecurse@^4.1.0: dependencies: estraverse "^4.1.0" +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz?cache=0&sync_timestamp=1586968904028&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" @@ -4020,6 +4039,11 @@ estraverse@^5.1.0: resolved "https://registry.npm.taobao.org/estraverse/download/estraverse-5.1.0.tgz?cache=0&sync_timestamp=1586968904028&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Festraverse%2Fdownload%2Festraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" integrity sha1-N0MJ05/ZNa5QDnuS6Ka0xyDllkI= +estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -5668,6 +5692,14 @@ jest-environment-node@^24.9.0: jest-mock "^24.9.0" jest-util "^24.9.0" +jest-fetch-mock@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz#31749c456ae27b8919d69824f1c2bd85fe0a1f3b" + integrity sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw== + dependencies: + cross-fetch "^3.0.4" + promise-polyfill "^8.1.3" + jest-get-type@^24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" @@ -6748,6 +6780,11 @@ node-cache@^4.1.1: clone "2.x" lodash "^4.17.15" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-forge@0.9.0: version "0.9.0" resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" @@ -7920,6 +7957,11 @@ promise-inflight@^1.0.1: resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= +promise-polyfill@^8.1.3: + version "8.2.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.2.0.tgz#367394726da7561457aba2133c9ceefbd6267da0" + integrity sha512-k/TC0mIcPVF6yHhUvwAp7cvL6I2fFV7TzF1DuGPI8mBh4QQazf36xCKEHKTZKRysEoTQoQdKyP25J8MPJp7j5g== + promise@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" @@ -8356,7 +8398,7 @@ resolve@1.1.7: resolved "https://registry.npm.taobao.org/resolve/download/resolve-1.1.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.x, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: +resolve@1.x, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.8.1: version "1.17.0" resolved "https://registry.npm.taobao.org/resolve/download/resolve-1.17.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha1-sllBtUloIxzC0bt2p5y38sC/hEQ=