@verdaccio/loaders 6.0.0-6-next.11 → 6.0.0-6-next.14
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.
- package/CHANGELOG.md +47 -0
- package/build/index.js.map +1 -1
- package/build/plugin-loader.js +4 -2
- package/build/plugin-loader.js.map +1 -1
- package/jest.config.js +8 -1
- package/package.json +55 -55
- package/src/plugin-loader.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @verdaccio/loaders
|
|
2
2
|
|
|
3
|
+
## 6.0.0-6-next.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 351aeeaa: fix(deps): @verdaccio/utils should be a prod dep of local-storage
|
|
8
|
+
- Updated dependencies [351aeeaa]
|
|
9
|
+
- @verdaccio/logger@6.0.0-6-next.13
|
|
10
|
+
|
|
11
|
+
## 6.0.0-6-next.13
|
|
12
|
+
|
|
13
|
+
### Major Changes
|
|
14
|
+
|
|
15
|
+
- 292c0a37: feat!: replace deprecated request dependency by got
|
|
16
|
+
|
|
17
|
+
This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
- Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
|
|
22
|
+
- Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
|
|
23
|
+
- Refactor with promises instead callback wherever is possible
|
|
24
|
+
- ~Document the API~
|
|
25
|
+
- Improve testing, integration tests
|
|
26
|
+
- Bugfix
|
|
27
|
+
- Clean up old validations
|
|
28
|
+
- Improve performance
|
|
29
|
+
|
|
30
|
+
## 💥 Breaking changes
|
|
31
|
+
|
|
32
|
+
- Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
|
|
33
|
+
- Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
|
|
34
|
+
- `@verdaccio/streams` stream abort support is legacy is being deprecated removed
|
|
35
|
+
- Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [292c0a37]
|
|
40
|
+
- Updated dependencies [a3a209b5]
|
|
41
|
+
- @verdaccio/logger@6.0.0-6-next.12
|
|
42
|
+
|
|
43
|
+
## 6.0.0-6-next.12
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [82cb0f2b]
|
|
48
|
+
- @verdaccio/logger@6.0.0-6-next.11
|
|
49
|
+
|
|
3
50
|
## 6.0.0-6-next.11
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './plugin-loader';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/build/plugin-loader.js
CHANGED
|
@@ -104,8 +104,10 @@ function loadPlugin(config, pluginConfigs = {}, params, sanityCheck, prefix = 'v
|
|
|
104
104
|
} // relative to config path
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
debug('config path: %s', config.configPath);
|
|
108
|
+
|
|
109
|
+
if (plugin === null && pluginId.match(/^\.\.?($|\/)/) && config.configPath) {
|
|
110
|
+
plugin = tryLoad(_path.default.resolve(_path.default.dirname(config.configPath), pluginId));
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
if (plugin === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"plugin-loader.js","names":["debug","buildDebug","MODULE_NOT_FOUND","tryLoad","path","require","err","code","mergeConfig","appConfig","pluginConfig","_","merge","isValid","plugin","isFunction","default","isES6","Object","keys","includes","loadPlugin","config","pluginConfigs","params","sanityCheck","prefix","map","pluginId","localPlugin","Path","resolve","__dirname","plugins","pluginDir","externalFilePlugin","match","configPath","dirname","logger","error","content","Error"],"sources":["../src/plugin-loader.ts"],"sourcesContent":["import buildDebug from 'debug';\nimport _ from 'lodash';\nimport Path from 'path';\n\nimport { logger } from '@verdaccio/logger';\nimport { Config, IPlugin } from '@verdaccio/types';\n\nconst debug = buildDebug('verdaccio:plugin:loader');\n\nexport const MODULE_NOT_FOUND = 'MODULE_NOT_FOUND';\n\n/**\n * Requires a module.\n * @param {*} path the module's path\n * @return {Object}\n */\nfunction tryLoad(path: string): any {\n try {\n return require(path);\n } catch (err: any) {\n if (err.code === MODULE_NOT_FOUND) {\n return null;\n }\n throw err;\n }\n}\n\nfunction mergeConfig(appConfig, pluginConfig): Config {\n return _.merge(appConfig, pluginConfig);\n}\n\nfunction isValid(plugin): boolean {\n return _.isFunction(plugin) || _.isFunction(plugin.default);\n}\n\nfunction isES6(plugin): boolean {\n return Object.keys(plugin).includes('default');\n}\n\n// export type PluginGeneric<R, T extends IPlugin<R> = ;\n\n/**\n * Load a plugin following the rules\n * - First try to load from the internal directory plugins (which will disappear soon or later).\n * - A second attempt from the external plugin directory\n * - A third attempt from node_modules, in case to have multiple match as for instance\n * verdaccio-ldap\n * and sinopia-ldap. All verdaccio prefix will have preferences.\n * @param {*} config a reference of the configuration settings\n * @param {*} pluginConfigs\n * @param {*} params a set of params to initialize the plugin\n * @param {*} sanityCheck callback that check the shape that should fulfill the plugin\n * @return {Array} list of plugins\n */\nexport function loadPlugin<T extends IPlugin<T>>(\n config: Config,\n pluginConfigs: any = {},\n params: any,\n sanityCheck: any,\n prefix: string = 'verdaccio'\n): any[] {\n return Object.keys(pluginConfigs).map((pluginId: string): IPlugin<T> => {\n let plugin;\n\n const localPlugin = Path.resolve(__dirname + '/../plugins', pluginId);\n // try local plugins first\n plugin = tryLoad(localPlugin);\n\n // try the external plugin directory\n if (plugin === null && config.plugins) {\n const pluginDir = config.plugins;\n const externalFilePlugin = Path.resolve(pluginDir, pluginId);\n plugin = tryLoad(externalFilePlugin);\n\n // npm package\n if (plugin === null && pluginId.match(/^[^\\.\\/]/)) {\n plugin = tryLoad(Path.resolve(pluginDir, `${prefix}-${pluginId}`));\n // compatibility for old sinopia plugins\n if (!plugin) {\n plugin = tryLoad(Path.resolve(pluginDir, `sinopia-${pluginId}`));\n }\n }\n }\n\n // npm package\n if (plugin === null && pluginId.match(/^[^\\.\\/]/)) {\n plugin = tryLoad(`${prefix}-${pluginId}`);\n // compatibility for old sinopia plugins\n if (!plugin) {\n plugin = tryLoad(`sinopia-${pluginId}`);\n }\n }\n\n if (plugin === null) {\n plugin = tryLoad(pluginId);\n }\n\n // relative to config path\n debug('config path: %s', config.configPath);\n if (plugin === null && pluginId.match(/^\\.\\.?($|\\/)/) && config.configPath) {\n plugin = tryLoad(Path.resolve(Path.dirname(config.configPath), pluginId));\n }\n\n if (plugin === null) {\n logger.error(\n { content: pluginId, prefix },\n 'plugin not found. try npm install @{prefix}-@{content}'\n );\n throw Error(`\n ${prefix}-${pluginId} plugin not found. try \"npm install ${prefix}-${pluginId}\"`);\n }\n\n if (!isValid(plugin)) {\n logger.error(\n { content: pluginId },\n '@{prefix}-@{content} plugin does not have the right code structure'\n );\n throw Error(`\"${pluginId}\" plugin does not have the right code structure`);\n }\n\n /* eslint new-cap:off */\n try {\n plugin = isES6(plugin)\n ? new plugin.default(mergeConfig(config, pluginConfigs[pluginId]), params)\n : new plugin(pluginConfigs[pluginId], params);\n } catch (error: any) {\n plugin = null;\n logger.error({ error, pluginId }, 'error loading a plugin @{pluginId}: @{error}');\n }\n /* eslint new-cap:off */\n\n if (plugin === null || !sanityCheck(plugin)) {\n logger.error(\n { content: pluginId, prefix },\n \"@{prefix}-@{content} doesn't look like a valid plugin\"\n );\n throw Error(`sanity check has failed, \"${pluginId}\" is not a valid plugin`);\n }\n\n debug('Plugin successfully loaded: %o-%o', pluginId, prefix);\n return plugin;\n });\n}\n"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;AAGA,MAAMA,KAAK,GAAG,IAAAC,cAAA,EAAW,yBAAX,CAAd;AAEO,MAAMC,gBAAgB,GAAG,kBAAzB;AAEP;AACA;AACA;AACA;AACA;;;;AACA,SAASC,OAAT,CAAiBC,IAAjB,EAAoC;EAClC,IAAI;IACF,OAAOC,OAAO,CAACD,IAAD,CAAd;EACD,CAFD,CAEE,OAAOE,GAAP,EAAiB;IACjB,IAAIA,GAAG,CAACC,IAAJ,KAAaL,gBAAjB,EAAmC;MACjC,OAAO,IAAP;IACD;;IACD,MAAMI,GAAN;EACD;AACF;;AAED,SAASE,WAAT,CAAqBC,SAArB,EAAgCC,YAAhC,EAAsD;EACpD,OAAOC,eAAA,CAAEC,KAAF,CAAQH,SAAR,EAAmBC,YAAnB,CAAP;AACD;;AAED,SAASG,OAAT,CAAiBC,MAAjB,EAAkC;EAChC,OAAOH,eAAA,CAAEI,UAAF,CAAaD,MAAb,KAAwBH,eAAA,CAAEI,UAAF,CAAaD,MAAM,CAACE,OAApB,CAA/B;AACD;;AAED,SAASC,KAAT,CAAeH,MAAf,EAAgC;EAC9B,OAAOI,MAAM,CAACC,IAAP,CAAYL,MAAZ,EAAoBM,QAApB,CAA6B,SAA7B,CAAP;AACD,C,CAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,UAAT,CACLC,MADK,EAELC,aAAkB,GAAG,EAFhB,EAGLC,MAHK,EAILC,WAJK,EAKLC,MAAc,GAAG,WALZ,EAME;EACP,OAAOR,MAAM,CAACC,IAAP,CAAYI,aAAZ,EAA2BI,GAA3B,CAAgCC,QAAD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C;MAC3CyB,cAAA,CAAOC,KAAP,CACE;QAAEC,OAAO,EAAEb,QAAX;QAAqBF;MAArB,CADF,EAEE,uDAFF;;MAIA,MAAMgB,KAAK,CAAE,6BAA4Bd,QAAS,yBAAvC,CAAX;IACD;;IAED5B,KAAK,CAAC,mCAAD,EAAsC4B,QAAtC,EAAgDF,MAAhD,CAAL;IACA,OAAOZ,MAAP;EACD,CAhFM,CAAP;AAiFD"}
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
2
|
+
"name": "@verdaccio/loaders",
|
|
3
|
+
"version": "6.0.0-6-next.14",
|
|
4
|
+
"description": "loaders logic",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "build/index.d.ts",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Juan Picado",
|
|
9
|
+
"email": "juanpicado19@gmail.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "https",
|
|
13
|
+
"url": "https://github.com/verdaccio/verdaccio"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@verdaccio/logger": "6.0.0-6-next.13",
|
|
17
|
+
"debug": "4.3.4",
|
|
18
|
+
"lodash": "4.17.21"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@verdaccio/core": "6.0.0-6-next.7",
|
|
22
|
+
"@verdaccio/config": "6.0.0-6-next.16",
|
|
23
|
+
"@verdaccio/types": "11.0.0-6-next.15"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://verdaccio.org",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"private",
|
|
28
|
+
"package",
|
|
29
|
+
"repository",
|
|
30
|
+
"registry",
|
|
31
|
+
"enterprise",
|
|
32
|
+
"modules",
|
|
33
|
+
"proxy",
|
|
34
|
+
"server",
|
|
35
|
+
"verdaccio"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=14",
|
|
39
|
+
"npm": ">=6"
|
|
40
|
+
},
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"funding": {
|
|
43
|
+
"type": "opencollective",
|
|
44
|
+
"url": "https://opencollective.com/verdaccio"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"clean": "rimraf ./build",
|
|
48
|
+
"test": "jest",
|
|
49
|
+
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
|
50
|
+
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
51
|
+
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
|
|
52
|
+
"watch": "pnpm build:js -- --watch",
|
|
53
|
+
"build": "pnpm run build:js && pnpm run build:types"
|
|
54
|
+
},
|
|
55
|
+
"readme": "# @verdaccio/loaders\n\n[](https://opencollective.com/verdaccio)\n[](https://stackshare.io/verdaccio)\n[](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n[](https://crowdin.com/project/verdaccio)\n[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)\n\n[](https://twitter.com/verdaccio_npm)\n[](https://github.com/verdaccio/verdaccio/stargazers)\n\n## Donations\n\nVerdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉\n\n**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from _\\$1/month_ or just one single contribution.\n\n## Report a vulnerability\n\nIf you want to report a security vulnerability, please follow the steps which we have defined for you in our [security policy](https://github.com/verdaccio/verdaccio/security/policy).\n\n## Open Collective Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio#sponsor)]\n\n[](https://opencollective.com/verdaccio/sponsor/0/website)\n[](https://opencollective.com/verdaccio/sponsor/1/website)\n[](https://opencollective.com/verdaccio/sponsor/2/website)\n[](https://opencollective.com/verdaccio/sponsor/3/website)\n[](https://opencollective.com/verdaccio/sponsor/4/website)\n[](https://opencollective.com/verdaccio/sponsor/5/website)\n[](https://opencollective.com/verdaccio/sponsor/6/website)\n[](https://opencollective.com/verdaccio/sponsor/7/website)\n[](https://opencollective.com/verdaccio/sponsor/8/website)\n[](https://opencollective.com/verdaccio/sponsor/9/website)\n\n## Open Collective Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio#backer)]\n\n[](https://opencollective.com/verdaccio#backers)\n\n## Special Thanks\n\nThanks to the following companies to help us to achieve our goals providing free open source licenses.\n\n[](https://www.jetbrains.com/)\n[](https://crowdin.com/)\n[](https://balsamiq.com/)\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n[](../../graphs/contributors)\n\n### FAQ / Contact / Troubleshoot\n\nIf you have any issue you can try the following options, do no desist to ask or check our issues database, perhaps someone has asked already what you are looking for.\n\n- [Blog](https://verdaccio.org/blog/)\n- [Donations](https://opencollective.com/verdaccio)\n- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)\n- [Running discussions](https://github.com/verdaccio/verdaccio/issues?q=is%3Aissue+is%3Aopen+label%3Adiscuss)\n- [Chat](http://chat.verdaccio.org/)\n- [Logos](https://verdaccio.org/docs/en/logo)\n- [Docker Examples](https://github.com/verdaccio/docker-examples)\n- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)\n\n### License\n\nVerdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n\nThe Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is\n[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).\n"
|
|
56
|
+
}
|
package/src/plugin-loader.ts
CHANGED
|
@@ -96,8 +96,9 @@ export function loadPlugin<T extends IPlugin<T>>(
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// relative to config path
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
debug('config path: %s', config.configPath);
|
|
100
|
+
if (plugin === null && pluginId.match(/^\.\.?($|\/)/) && config.configPath) {
|
|
101
|
+
plugin = tryLoad(Path.resolve(Path.dirname(config.configPath), pluginId));
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
if (plugin === null) {
|