diff --git a/.changeset/pre.json b/.changeset/pre.json index 25d24894..b3ce5791 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -5,6 +5,7 @@ "generator-verdaccio-plugin": "3.0.1" }, "changesets": [ - "early-ads-flow" + "early-ads-flow", + "fuzzy-eels-approve" ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 4996a05f..6898d0b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 4.0.0-next.1 +### Major Changes + +- 2cd418d5: fix: restore file configuration generator + ## 4.0.0-next.0 ### Major Changes diff --git a/generators/app/index.js.map b/generators/app/index.js.map new file mode 100644 index 00000000..edcb9a75 --- /dev/null +++ b/generators/app/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["yosay","require","VerdaccioPluginGenerator","Generator","projectName","destinationPathName","constructor","args","opts","props","prompting","log","chalk","red","prompts","type","name","message","default","validate","input","store","choices","value","filter","keywords","_","uniq","words","concat","prompt","then","_props","githubUsername","license","repository","resolve","bind","packageJSON","pluginType","pkgJsonLocation","fs","copyTpl","templatePath","destinationPath","writing","copy","install","process","chdir","module","exports"],"sources":["index.ts"],"sourcesContent":["import {resolve} from 'path';\n\nimport Generator from 'yeoman-generator';\nimport chalk from 'chalk';\nimport _ from 'lodash';\n\ntype propsTypes = {\n name?: string;\n pluginType?: string;\n description?: string;\n githubUsername?: string;\n authorName?: string;\n authorEmail?: string;\n keywords?: string[];\n};\n\nconst yosay = require('yosay');\n\nclass VerdaccioPluginGenerator extends Generator {\n private props: propsTypes;\n private projectName = 'verdaccio-';\n private destinationPathName = 'verdaccio-';\n constructor(args, opts) {\n super(args, opts);\n this.props = {};\n }\n\n prompting() {\n this.log(\n yosay(\n 'Welcome to ' +\n chalk.red('generator-verdaccio-plugin') +\n ' plugin generator!',\n ),\n );\n\n const prompts = [\n {\n type: 'input',\n name: 'name',\n require: true,\n message: 'What is the name of your plugin?',\n default: 'customname',\n validate: function(input) {\n return input !== '';\n },\n },\n {\n type: 'list',\n name: 'pluginType',\n require: true,\n message: 'What kind of plugin you want to create?',\n store: true,\n choices: [\n {value: 'auth'},\n {value: 'storage'},\n {value: 'middleware'},\n ],\n },\n {\n type: 'input',\n name: 'description',\n message: 'Please, describe your plugin',\n default: 'An amazing verdaccio plugin',\n },\n {\n name: 'githubUsername',\n message: 'GitHub username or Organization',\n validate: function(input) {\n return input !== '';\n },\n },\n {\n name: 'authorName',\n message: 'Author\\'s Name',\n store: true,\n },\n {\n name: 'authorEmail',\n message: 'Author\\'s Email',\n store: true,\n },\n {\n name: 'keywords',\n message: 'Key your keywords (comma to split)',\n filter: function(keywords) {\n return _.uniq(_.words(keywords).concat(['verdaccio-']));\n },\n },\n ];\n\n return this.prompt(prompts).then(\n function(_props) {\n // To access props later use this.props.someAnswer;\n // @ts-ignore\n this.props = _props;\n const {name, githubUsername} = _props;\n // @ts-ignore\n this.props.license = 'MIT';\n if (githubUsername) {\n // @ts-ignore\n this.props.repository = githubUsername + '/' + name;\n }\n\n // @ts-ignore\n this.projectName = `verdaccio-${name}`;\n\n // @ts-ignore\n this.destinationPathName = resolve(this.projectName);\n // @ts-ignore\n this.props.name = this.projectName;\n }.bind(this),\n );\n }\n\n packageJSON() {\n const {pluginType} = this.props;\n const pkgJsonLocation = `typescript/${pluginType}/_package.json`;\n this.fs.copyTpl(\n this.templatePath(pkgJsonLocation),\n this.destinationPath(resolve(this.destinationPathName, 'package.json')),\n this.props,\n );\n }\n\n writing() {\n this.fs.copy(\n this.templatePath(`typescript/common/gitignore`),\n this.destinationPath(resolve(this.destinationPathName, '.gitignore')),\n );\n this.fs.copy(\n this.templatePath(`typescript/common/npmignore`),\n this.destinationPath(resolve(this.destinationPathName, '.npmignore')),\n );\n this.fs.copy(\n this.templatePath(`typescript/common/jest.config.js`),\n this.destinationPath(resolve(this.destinationPathName, 'jest.config.js')),\n );\n this.fs.copyTpl(\n this.templatePath(`typescript/common/README.md`),\n this.destinationPath(resolve(this.destinationPathName, 'README.md')),\n this.props,\n );\n this.fs.copyTpl(\n this.templatePath(`typescript/common/eslintrc`),\n this.destinationPath(resolve(this.destinationPathName, '.eslintrc')),\n this.props,\n );\n this.fs.copyTpl(\n this.templatePath(`typescript/common/eslintignore`),\n this.destinationPath(resolve(this.destinationPathName, '.eslintignore')),\n this.props,\n );\n\n this.fs.copy(\n this.templatePath(`typescript/${this.props.pluginType}/src`),\n this.destinationPath(resolve(this.destinationPathName, 'src')),\n );\n\n this.fs.copy(\n this.templatePath(\n `typescript/common/index.ts`,\n ),\n this.destinationPath(\n resolve(\n this.destinationPathName,\n `index.ts`,\n ),\n ),\n );\n\n this.fs.copy(\n this.templatePath(`typescript/common/tsconfig.json`),\n this.destinationPath(\n resolve(this.destinationPathName, 'tsconfig.json'),\n ),\n );\n this.fs.copy(\n this.templatePath(`typescript/${this.props.pluginType}/types`),\n this.destinationPath(resolve(this.destinationPathName, 'types')),\n );\n\n this.fs.copy(\n this.templatePath(`typescript/common/editorconfig`),\n this.destinationPath(resolve(this.destinationPathName, '.editorconfig')),\n );\n }\n\n install() {\n process.chdir(this.projectName);\n // this.installDependencies({ npm: true, bower: false });\n }\n}\n\nmodule.exports = VerdaccioPluginGenerator;\n"],"mappings":";;AAAA;;AAEA;;AACA;;AACA;;;;AAYA,MAAMA,KAAK,GAAGC,OAAO,CAAC,OAAD,CAArB;;AAEA,MAAMC,wBAAN,SAAuCC,wBAAvC,CAAiD;EAEvCC,WAAW,GAAG,YAAH;EACXC,mBAAmB,GAAG,YAAH;;EAC3BC,WAAW,CAACC,IAAD,EAAOC,IAAP,EAAa;IACtB,MAAMD,IAAN,EAAYC,IAAZ;IACA,KAAKC,KAAL,GAAa,EAAb;EACD;;EAEDC,SAAS,GAAG;IACV,KAAKC,GAAL,CACIX,KAAK,CACD,gBACFY,cAAA,CAAMC,GAAN,CAAU,4BAAV,CADE,GAEF,oBAHG,CADT;IAQA,MAAMC,OAAO,GAAG,CACd;MACEC,IAAI,EAAE,O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CAAmB,cAAa,KAAKlC,KAAL,CAAW8B,UAAW,QAAtD,CADJ,EAEI,KAAKK,eAAL,CAAqB,IAAAR,aAAA,EAAQ,KAAK/B,mBAAb,EAAkC,OAAlC,CAArB,CAFJ;IAKA,KAAKoC,EAAL,CAAQK,IAAR,CACI,KAAKH,YAAL,CAAmB,gCAAnB,CADJ,EAEI,KAAKC,eAAL,CAAqB,IAAAR,aAAA,EAAQ,KAAK/B,mBAAb,EAAkC,eAAlC,CAArB,CAFJ;EAID;;EAED0C,OAAO,GAAG;IACRC,OAAO,CAACC,KAAR,CAAc,KAAK7C,WAAnB,EADQ,CAER;EACD;;AA7K8C;;AAgLjD8C,MAAM,CAACC,OAAP,GAAiBjD,wBAAjB"} \ No newline at end of file diff --git a/generators/app/templates/typescript/auth/src/index.js b/generators/app/templates/typescript/auth/src/index.js new file mode 100644 index 00000000..3b47aee2 --- /dev/null +++ b/generators/app/templates/typescript/auth/src/index.js @@ -0,0 +1,92 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/** + * Custom Verdaccio Authenticate Plugin. + */ +class AuthCustomPlugin { + constructor(config, options) { + this.logger = options.logger; + this.foo = config.foo; + return this; + } + /** + * Authenticate an user. + * @param user user to log + * @param password provided password + * @param cb callback function + */ + + + authenticate(user, password, cb) { + /** + * This code is just an example for demostration purpose + if (this.foo) { + cb(null, ['group-foo', 'group-bar']); + } else { + cb('error, try again', false); + } + */ + } + /** + * Triggered on each access request + * @param user + * @param pkg + * @param cb + */ + + + allow_access(user, pkg, cb) { + /** + * This code is just an example for demostration purpose + if (user.name === this.foo && pkg?.access?.includes[user.name]) { + this.logger.debug({name: user.name}, 'your package has been granted for @{name}'); + cb(null, true) + } else { + this.logger.error({name: user.name}, '@{name} is not allowed to access this package'); + cb('error, try again', false); + } + */ + } + /** + * Triggered on each publish request + * @param user + * @param pkg + * @param cb + */ + + + allow_publish(user, pkg, cb) { + /** + * This code is just an example for demostration purpose + if (user.name === this.foo && pkg?.access?.includes[user.name]) { + this.logger.debug({name: user.name}, '@{name} has been granted to publish'); + cb(null, true) + } else { + this.logger.error({name: user.name}, '@{name} is not allowed to publish this package'); + cb('error, try again', false); + } + */ + } + + allow_unpublish(user, pkg, cb) { + /** + * This code is just an example for demostration purpose + if (user.name === this.foo && pkg?.access?.includes[user.name]) { + this.logger.debug({name: user.name}, '@{name} has been granted to unpublish'); + cb(null, true) + } else { + this.logger.error({name: user.name}, '@{name} is not allowed to publish this package'); + cb('error, try again', false); + } + */ + } + +} + +exports.default = AuthCustomPlugin; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/auth/src/index.js.map b/generators/app/templates/typescript/auth/src/index.js.map new file mode 100644 index 00000000..859aaae7 --- /dev/null +++ b/generators/app/templates/typescript/auth/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["AuthCustomPlugin","constructor","config","options","logger","foo","authenticate","user","password","cb","allow_access","pkg","allow_publish","allow_unpublish"],"sources":["index.ts"],"sourcesContent":["import {\n PluginOptions,\n AuthAccessCallback,\n AuthCallback,\n PackageAccess,\n IPluginAuth,\n RemoteUser,\n Logger,\n} from '@verdaccio/types';\n\nimport {CustomConfig} from '../types/index';\n\n/**\n * Custom Verdaccio Authenticate Plugin.\n */\nexport default class AuthCustomPlugin implements IPluginAuth {\n public logger: Logger;\n private foo: string;\n public constructor(config: CustomConfig, options: PluginOptions) {\n this.logger = options.logger;\n this.foo = config.foo;\n return this;\n }\n /**\n * Authenticate an user.\n * @param user user to log\n * @param password provided password\n * @param cb callback function\n */\n public authenticate(user: string, password: string, cb: AuthCallback): void {\n /**\n * This code is just an example for demostration purpose\n if (this.foo) {\n cb(null, ['group-foo', 'group-bar']);\n } else {\n cb('error, try again', false);\n }\n */\n }\n\n /**\n * Triggered on each access request\n * @param user\n * @param pkg\n * @param cb\n */\n public allow_access(user: RemoteUser, pkg: PackageAccess, cb: AuthAccessCallback): void {\n /**\n * This code is just an example for demostration purpose\n if (user.name === this.foo && pkg?.access?.includes[user.name]) {\n this.logger.debug({name: user.name}, 'your package has been granted for @{name}');\n cb(null, true)\n } else {\n this.logger.error({name: user.name}, '@{name} is not allowed to access this package');\n cb('error, try again', false);\n }\n */\n }\n\n /**\n * Triggered on each publish request\n * @param user\n * @param pkg\n * @param cb\n */\n public allow_publish(user: RemoteUser, pkg: PackageAccess, cb: AuthAccessCallback): void {\n /**\n * This code is just an example for demostration purpose\n if (user.name === this.foo && pkg?.access?.includes[user.name]) {\n this.logger.debug({name: user.name}, '@{name} has been granted to publish');\n cb(null, true)\n } else {\n this.logger.error({name: user.name}, '@{name} is not allowed to publish this package');\n cb('error, try again', false);\n }\n */\n }\n\n public allow_unpublish(user: RemoteUser, pkg: PackageAccess, cb: AuthAccessCallback): void {\n /**\n * This code is just an example for demostration purpose\n if (user.name === this.foo && pkg?.access?.includes[user.name]) {\n this.logger.debug({name: user.name}, '@{name} has been granted to unpublish');\n cb(null, true)\n } else {\n this.logger.error({name: user.name}, '@{name} is not allowed to publish this package');\n cb('error, try again', false);\n }\n */\n }\n}\n"],"mappings":";;;;;;;AAYA;AACA;AACA;AACe,MAAMA,gBAAN,CAA4D;EAGlEC,WAAW,CAACC,MAAD,EAAuBC,OAAvB,EAA6D;IAC7E,KAAKC,MAAL,GAAcD,OAAO,CAACC,MAAtB;IACA,KAAKC,GAAL,GAAWH,MAAM,CAACG,GAAlB;IACA,OAAO,IAAP;EACD;EACD;AACF;AACA;AACA;AACA;AACA;;;EACSC,YAAY,CAACC,IAAD,EAAeC,QAAf,EAAiCC,EAAjC,EAAyD;IAC1E;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;AACA;;;EACSC,YAAY,CAACH,IAAD,EAAmBI,GAAnB,EAAuCF,EAAvC,EAAqE;IACtF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;AACA;;;EACSG,aAAa,CAACL,IAAD,EAAmBI,GAAnB,EAAuCF,EAAvC,EAAqE;IACvF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;;EAEMI,eAAe,CAACN,IAAD,EAAmBI,GAAnB,EAAuCF,EAAvC,EAAqE;IACzF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;;AA1EwE"} \ No newline at end of file diff --git a/generators/app/templates/typescript/auth/types/index.js b/generators/app/templates/typescript/auth/types/index.js new file mode 100644 index 00000000..951c783a --- /dev/null +++ b/generators/app/templates/typescript/auth/types/index.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/auth/types/index.js.map b/generators/app/templates/typescript/auth/types/index.js.map new file mode 100644 index 00000000..07805983 --- /dev/null +++ b/generators/app/templates/typescript/auth/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["import {Config} from '@verdaccio/types';\n\nexport interface CustomConfig extends Config {\n foo: string;\n}\n"],"mappings":""} \ No newline at end of file diff --git a/generators/app/templates/typescript/common/index.js b/generators/app/templates/typescript/common/index.js new file mode 100644 index 00000000..496d62cc --- /dev/null +++ b/generators/app/templates/typescript/common/index.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _index = _interopRequireDefault(require("./lib/index")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _default = _index.default; +exports.default = _default; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/common/index.js.map b/generators/app/templates/typescript/common/index.js.map new file mode 100644 index 00000000..c817125c --- /dev/null +++ b/generators/app/templates/typescript/common/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["VerdaccioPlugin"],"sources":["index.ts"],"sourcesContent":["import VerdaccioPlugin from './lib/index';\n\nexport default VerdaccioPlugin;\n"],"mappings":";;;;;;;AAAA;;;;eAEeA,c"} \ No newline at end of file diff --git a/generators/app/templates/typescript/middleware/src/index.js b/generators/app/templates/typescript/middleware/src/index.js new file mode 100644 index 00000000..adbac9e9 --- /dev/null +++ b/generators/app/templates/typescript/middleware/src/index.js @@ -0,0 +1,36 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +class VerdaccioMiddlewarePlugin { + constructor(config, options) { + this.foo = config.foo !== undefined ? config.strict_ssl : true; + this.logger = options.logger; + } + + register_middlewares(app, auth, + /* eslint @typescript-eslint/no-unused-vars: off */ + _storage) { + /** + * This is just an example of implementation + // eslint new-cap:off + const router = Router(); + router.post( + '/custom-endpoint', + (req: Request, res: Response & { report_error?: Function }, next: NextFunction): void => { + const encryptedString = auth.aesEncrypt(Buffer.from(this.foo, 'utf8')); + res.setHeader('X-Verdaccio-Token-Plugin', encryptedString.toString()); + next(); + } + ); + app.use('/-/npm/something-new', router); + */ + } + +} + +exports.default = VerdaccioMiddlewarePlugin; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/middleware/src/index.js.map b/generators/app/templates/typescript/middleware/src/index.js.map new file mode 100644 index 00000000..a56962f4 --- /dev/null +++ b/generators/app/templates/typescript/middleware/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":["VerdaccioMiddlewarePlugin","constructor","config","options","foo","undefined","strict_ssl","logger","register_middlewares","app","auth","_storage"],"sources":["index.ts"],"sourcesContent":["import {Logger, IPluginMiddleware, IBasicAuth, IStorageManager, PluginOptions} from '@verdaccio/types';\nimport {Router, Request, Response, NextFunction, Application} from 'express';\n\nimport {CustomConfig} from '../types/index';\n\nexport default class VerdaccioMiddlewarePlugin implements IPluginMiddleware {\n public logger: Logger;\n public foo: string;\n public constructor(config: CustomConfig, options: PluginOptions) {\n this.foo = config.foo !== undefined ? config.strict_ssl : true;\n this.logger = options.logger;\n }\n\n public register_middlewares(\n app: Application,\n auth: IBasicAuth,\n /* eslint @typescript-eslint/no-unused-vars: off */\n _storage: IStorageManager,\n ): void {\n /**\n * This is just an example of implementation\n // eslint new-cap:off\n const router = Router();\n router.post(\n '/custom-endpoint',\n (req: Request, res: Response & { report_error?: Function }, next: NextFunction): void => {\n const encryptedString = auth.aesEncrypt(Buffer.from(this.foo, 'utf8'));\n res.setHeader('X-Verdaccio-Token-Plugin', encryptedString.toString());\n next();\n }\n );\n app.use('/-/npm/something-new', router);\n */\n }\n}\n"],"mappings":";;;;;;;AAKe,MAAMA,yBAAN,CAA2E;EAGjFC,WAAW,CAACC,MAAD,EAAuBC,OAAvB,EAA6D;IAC7E,KAAKC,GAAL,GAAWF,MAAM,CAACE,GAAP,KAAeC,SAAf,GAA2BH,MAAM,CAACI,UAAlC,GAA+C,IAA1D;IACA,KAAKC,MAAL,GAAcJ,OAAO,CAACI,MAAtB;EACD;;EAEMC,oBAAoB,CACvBC,GADuB,EAEvBC,IAFuB;EAGvB;EACAC,QAJuB,EAKnB;IACN;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;;AA5BuF"} \ No newline at end of file diff --git a/generators/app/templates/typescript/middleware/types/index.js b/generators/app/templates/typescript/middleware/types/index.js new file mode 100644 index 00000000..951c783a --- /dev/null +++ b/generators/app/templates/typescript/middleware/types/index.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/middleware/types/index.js.map b/generators/app/templates/typescript/middleware/types/index.js.map new file mode 100644 index 00000000..07805983 --- /dev/null +++ b/generators/app/templates/typescript/middleware/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["import {Config} from '@verdaccio/types';\n\nexport interface CustomConfig extends Config {\n foo: string;\n}\n"],"mappings":""} \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/PackageStorage.js b/generators/app/templates/typescript/storage/src/PackageStorage.js new file mode 100644 index 00000000..c780db89 --- /dev/null +++ b/generators/app/templates/typescript/storage/src/PackageStorage.js @@ -0,0 +1,168 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +class StoragePluginManage { + constructor(config, packageName, logger) { + this.logger = logger; + this.packageName = packageName; + this.config = config; + } + /** + * Handle a metadata update and + * @param name + * @param updateHandler + * @param onWrite + * @param transformPackage + * @param onEnd + */ + + + updatePackage(name, updateHandler, onWrite, transformPackage, onEnd) { + /** + * Example of implementation: + this.customStore.get().then((pkg: Package) => { + updateHandler(pkg, function onUpdateFinish(err) { + if (err) { + onEnd(err); + } else { + onWrite(name, pkg, onEnd); + } + }) + }); + */ + } + /** + * Delete a specific file (tarball or package.json) + * @param fileName + * @param callback + */ + + + deletePackage(fileName, callback) { + /** + * Example of implementation: + this.customStore.delete(fileName, (err) => { + if (err) { + callback(err); + } else { + callback(null); + } + }) + */ + } + /** + * Delete a package (folder, path) + * This happens after all versions ar tarballs have been removed. + * @param callback + */ + + + removePackage(callback) { + /** + * Example of implementation: + this.customStore.removePackage((err) => { + if (err) { + callback(err); + } else { + callback(null); + } + }) + */ + } + /** + * Publish a new package (version). + * @param name + * @param data + * @param callback + */ + + + createPackage(name, data, callback) { + /** + * Example of implementation: + * this.customStore.create(name, data).then(err => { + if (err.notFound) { + callback(getNotFound()); + } else if (err.alreadyExist) { + callback(getConflict()); + } else { + callback(null); + } + }) + */ + } + /** + * Perform write anobject to the storage. + * Similar to updatePackage but without middleware handlers + * @param pkgName package name + * @param pkg package metadata + * @param callback + */ + + + savePackage(pkgName, pkg, callback) { + /* + Example of implementation: + this.cumstomStore.write(pkgName, pkgName).then(data => { + callback(null); + }).catch(err => { + callback(getInternalError(err.message)); + }) + */ + } + /** + * Read a package from storage + * @param pkgName package name + * @param callback + */ + + + readPackage(pkgName, callback) { + /** + * Example of implementation: + * this.customStorage.read(name, (err, pkg: Package) => { + if (err.fooError) { + callback(getInternalError(err)) + } else if (err.barError) { + callback(getNotFound()); + } else { + callback(null, pkg) + } + }); + */ + } + /** + * Create writtable stream (write a tarball) + * @param name + */ + + + writeTarball(name) { + /** + * Example of implementation: + * const stream = new UploadTarball({}); + return stream; + */ + } + /** + * Create a readable stream (read a from a tarball) + * @param name + */ + + + readTarball(name) { + /** + * Example of implementation: + * const stream = new ReadTarball({}); + return stream; + */ + } + +} + +exports.default = StoragePluginManage; +//# sourceMappingURL=PackageStorage.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/PackageStorage.js.map b/generators/app/templates/typescript/storage/src/PackageStorage.js.map new file mode 100644 index 00000000..dbfa115b --- /dev/null +++ b/generators/app/templates/typescript/storage/src/PackageStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PackageStorage.js","names":["StoragePluginManage","constructor","config","packageName","logger","updatePackage","name","updateHandler","onWrite","transformPackage","onEnd","deletePackage","fileName","callback","removePackage","createPackage","data","savePackage","pkgName","pkg","readPackage","writeTarball","readTarball"],"sources":["PackageStorage.ts"],"sourcesContent":["import {\n Callback,\n Logger,\n ILocalPackageManager,\n StorageUpdateCallback,\n PackageTransformer,\n StorageWriteCallback,\n CallbackAction,\n Package,\n ReadPackageCallback,\n} from '@verdaccio/types';\nimport {UploadTarball, ReadTarball} from '@verdaccio/streams';\nimport {getNotFound, getConflict, getInternalError} from '@verdaccio/commons-api';\n\nimport {CustomConfig} from '../types/index';\nexport default class StoragePluginManage implements ILocalPackageManager {\n public logger: Logger;\n public packageName: string;\n public config: CustomConfig;\n\n public constructor(\n config: CustomConfig,\n packageName: string,\n logger: Logger,\n ) {\n this.logger = logger;\n this.packageName = packageName;\n this.config = config;\n }\n\n /**\n * Handle a metadata update and\n * @param name\n * @param updateHandler\n * @param onWrite\n * @param transformPackage\n * @param onEnd\n */\n public updatePackage(\n name: string,\n updateHandler: StorageUpdateCallback,\n onWrite: StorageWriteCallback,\n transformPackage: PackageTransformer,\n onEnd: CallbackAction,\n ): void {\n /**\n * Example of implementation:\n this.customStore.get().then((pkg: Package) => {\n updateHandler(pkg, function onUpdateFinish(err) {\n if (err) {\n onEnd(err);\n } else {\n onWrite(name, pkg, onEnd);\n }\n })\n });\n */\n }\n\n /**\n * Delete a specific file (tarball or package.json)\n * @param fileName\n * @param callback\n */\n public deletePackage(fileName: string, callback: CallbackAction): void {\n /**\n * Example of implementation:\n this.customStore.delete(fileName, (err) => {\n if (err) {\n callback(err);\n } else {\n callback(null);\n }\n })\n */\n }\n\n /**\n * Delete a package (folder, path)\n * This happens after all versions ar tarballs have been removed.\n * @param callback\n */\n public removePackage(callback: CallbackAction): void {\n /**\n * Example of implementation:\n this.customStore.removePackage((err) => {\n if (err) {\n callback(err);\n } else {\n callback(null);\n }\n })\n */\n }\n\n /**\n * Publish a new package (version).\n * @param name\n * @param data\n * @param callback\n */\n public createPackage(\n name: string,\n data: Package,\n callback: CallbackAction,\n ): void {\n /**\n * Example of implementation:\n * this.customStore.create(name, data).then(err => {\n if (err.notFound) {\n callback(getNotFound());\n } else if (err.alreadyExist) {\n callback(getConflict());\n } else {\n callback(null);\n }\n })\n */\n }\n\n /**\n * Perform write anobject to the storage.\n * Similar to updatePackage but without middleware handlers\n * @param pkgName package name\n * @param pkg package metadata\n * @param callback\n */\n public savePackage(pkgName: string, pkg: Package, callback: CallbackAction): void {\n /*\n Example of implementation:\n this.cumstomStore.write(pkgName, pkgName).then(data => {\n callback(null);\n }).catch(err => {\n callback(getInternalError(err.message));\n })\n */\n }\n\n /**\n * Read a package from storage\n * @param pkgName package name\n * @param callback\n */\n public readPackage(pkgName: string, callback: ReadPackageCallback): void {\n /**\n * Example of implementation:\n * this.customStorage.read(name, (err, pkg: Package) => {\n if (err.fooError) {\n callback(getInternalError(err))\n } else if (err.barError) {\n callback(getNotFound());\n } else {\n callback(null, pkg)\n }\n });\n */\n }\n\n /**\n * Create writtable stream (write a tarball)\n * @param name\n */\n public writeTarball(name: string): UploadTarball {\n /**\n * Example of implementation:\n * const stream = new UploadTarball({});\n return stream;\n */\n\n }\n\n /**\n * Create a readable stream (read a from a tarball)\n * @param name\n */\n public readTarball(name: string): ReadTarball {\n /**\n * Example of implementation:\n * const stream = new ReadTarball({});\n return stream;\n */\n }\n}\n"],"mappings":";;;;;;;AAee,MAAMA,mBAAN,CAA0D;EAKhEC,WAAW,CACdC,MADc,EAEdC,WAFc,EAGdC,MAHc,EAIhB;IACA,KAAKA,MAAL,GAAcA,MAAd;IACA,KAAKD,WAAL,GAAmBA,WAAnB;IACA,KAAKD,MAAL,GAAcA,MAAd;EACD;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;;EACSG,aAAa,CAChBC,IADgB,EAEhBC,aAFgB,EAGhBC,OAHgB,EAIhBC,gBAJgB,EAKhBC,KALgB,EAMZ;IACN;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;;;EACSC,aAAa,CAACC,QAAD,EAAmBC,QAAnB,EAAmD;IACrE;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;;;EACSC,aAAa,CAACD,QAAD,EAAiC;IACnD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;AACA;;;EACSE,aAAa,CAChBT,IADgB,EAEhBU,IAFgB,EAGhBH,QAHgB,EAIZ;IACN;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;AACA;AACA;;;EACSI,WAAW,CAACC,OAAD,EAAkBC,GAAlB,EAAgCN,QAAhC,EAAgE;IAChF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;;;EACSO,WAAW,CAACF,OAAD,EAAkBL,QAAlB,EAAuD;IACvE;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;;;EACSQ,YAAY,CAACf,IAAD,EAA8B;IAC/C;AACJ;AACA;AACA;AACA;EAEG;EAED;AACF;AACA;AACA;;;EACSgB,WAAW,CAAChB,IAAD,EAA4B;IAC5C;AACJ;AACA;AACA;AACA;EACG;;AAtKsE"} \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/index.js b/generators/app/templates/typescript/storage/src/index.js new file mode 100644 index 00000000..c69faf70 --- /dev/null +++ b/generators/app/templates/typescript/storage/src/index.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function () { + return _plugin.default; + } +}); + +var _plugin = _interopRequireDefault(require("./plugin")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/index.js.map b/generators/app/templates/typescript/storage/src/index.js.map new file mode 100644 index 00000000..3e232307 --- /dev/null +++ b/generators/app/templates/typescript/storage/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["export {default} from './plugin';\n"],"mappings":";;;;;;;;;;;;AAAA"} \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/plugin.js b/generators/app/templates/typescript/storage/src/plugin.js new file mode 100644 index 00000000..33ac3e72 --- /dev/null +++ b/generators/app/templates/typescript/storage/src/plugin.js @@ -0,0 +1,129 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _PackageStorage = _interopRequireDefault(require("./PackageStorage")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +class VerdaccioStoragePlugin { + constructor(config, options) { + this.config = config; + this.logger = options.logger; + } + /** + * + */ + + + async getSecret() { + /** + * return await resolveSecret(); + */ + } + + async setSecret(secret) { + /** + * return await getYourSecret(); + */ + } + /** + * Add a new element. + * @param {*} name + * @return {Error|*} + */ + + + add(name, callback) {} + /** + * Perform a search in your registry + * @param onPackage + * @param onEnd + * @param validateName + */ + + + search(onPackage, onEnd, validateName) { + /** + * Example of implementation: + * try { + * someApi.getPackages((items) => { + * items.map(() => { + * if (validateName(item.name)) { + * onPackage(item); + * } + * }); + * onEnd(); + * } catch(err) { + * onEnd(err); + * } + * }); + */ + } + /** + * Remove an element from the database. + * @param {*} name + * @return {Error|*} + */ + + + remove(name, callback) { + /** + * Example of implementation + database.getPackage(name, (item, err) => { + if (err) { + callback(getInternalError('your own message here')); + } + // if all goes well we return nothing + callback(null); + } + */ + } + /** + * Return all database elements. + * @return {Array} + */ + + + get(callback) { + /* + Example of implementation + database.getAll((allItems, err) => { + callback(err, allItems); + }) + */ + } + /** + * Create an instance of the `PackageStorage` + * @param packageInfo + */ + + + getPackageStorage(packageInfo) { + return new _PackageStorage.default(this.config, packageInfo, this.logger); + } + /** + * All methods for npm token support + * more info here https://github.com/verdaccio/verdaccio/pull/1427 + */ + + + saveToken(token) { + throw new Error('Method not implemented.'); + } + + deleteToken(user, tokenKey) { + throw new Error('Method not implemented.'); + } + + readTokens(filter) { + throw new Error('Method not implemented.'); + } + +} + +exports.default = VerdaccioStoragePlugin; +//# sourceMappingURL=plugin.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/src/plugin.js.map b/generators/app/templates/typescript/storage/src/plugin.js.map new file mode 100644 index 00000000..0951c976 --- /dev/null +++ b/generators/app/templates/typescript/storage/src/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","names":["VerdaccioStoragePlugin","constructor","config","options","logger","getSecret","setSecret","secret","add","name","callback","search","onPackage","onEnd","validateName","remove","get","getPackageStorage","packageInfo","PackageStorage","saveToken","token","Error","deleteToken","user","tokenKey","readTokens","filter"],"sources":["plugin.ts"],"sourcesContent":["import {\n Logger,\n Callback,\n IPluginStorage,\n PluginOptions,\n IPackageStorage,\n TokenFilter,\n Token,\n Config,\n onEndSearchPackage,\n onSearchPackage,\n onValidatePackage,\n} from '@verdaccio/types';\nimport {getInternalError} from '@verdaccio/commons-api';\n\nimport {CustomConfig} from '../types/index';\n\nimport PackageStorage from './PackageStorage';\n\nexport default class VerdaccioStoragePlugin implements IPluginStorage {\n config: CustomConfig & Config;\n version?: string;\n public logger: Logger;\n public constructor(\n config: CustomConfig,\n options: PluginOptions,\n ) {\n this.config = config;\n this.logger = options.logger;\n }\n\n /**\n *\n */\n public async getSecret(): Promise {\n /**\n * return await resolveSecret();\n */\n }\n\n public async setSecret(secret: string): Promise {\n /**\n * return await getYourSecret();\n */\n }\n\n /**\n * Add a new element.\n * @param {*} name\n * @return {Error|*}\n */\n public add(name: string, callback: Callback): void {\n\n }\n\n /**\n * Perform a search in your registry\n * @param onPackage\n * @param onEnd\n * @param validateName\n */\n public search(\n onPackage: onSearchPackage,\n onEnd: onEndSearchPackage,\n validateName: onValidatePackage,\n ): void {\n /**\n * Example of implementation:\n * try {\n * someApi.getPackages((items) => {\n * items.map(() => {\n * if (validateName(item.name)) {\n * onPackage(item);\n * }\n * });\n * onEnd();\n * } catch(err) {\n * onEnd(err);\n * }\n * });\n */\n }\n\n /**\n * Remove an element from the database.\n * @param {*} name\n * @return {Error|*}\n */\n public remove(name: string, callback: Callback): void {\n /**\n * Example of implementation\n database.getPackage(name, (item, err) => {\n if (err) {\n callback(getInternalError('your own message here'));\n }\n\n // if all goes well we return nothing\n callback(null);\n }\n */\n }\n\n /**\n * Return all database elements.\n * @return {Array}\n */\n public get(callback: Callback): void {\n /*\n Example of implementation\n database.getAll((allItems, err) => {\n callback(err, allItems);\n })\n */\n }\n\n /**\n * Create an instance of the `PackageStorage`\n * @param packageInfo\n */\n public getPackageStorage(packageInfo: string): IPackageStorage {\n return new PackageStorage(this.config, packageInfo, this.logger);\n }\n\n /**\n * All methods for npm token support\n * more info here https://github.com/verdaccio/verdaccio/pull/1427\n */\n\n public saveToken(token: Token): Promise {\n throw new Error('Method not implemented.');\n }\n\n public deleteToken(user: string, tokenKey: string): Promise {\n throw new Error('Method not implemented.');\n }\n\n public readTokens(filter: TokenFilter): Promise {\n throw new Error('Method not implemented.');\n }\n}\n"],"mappings":";;;;;;;AAiBA;;;;AAEe,MAAMA,sBAAN,CAAqE;EAI3EC,WAAW,CACdC,MADc,EAEdC,OAFc,EAGhB;IACA,KAAKD,MAAL,GAAcA,MAAd;IACA,KAAKE,MAAL,GAAcD,OAAO,CAACC,MAAtB;EACD;EAED;AACF;AACA;;;EACwB,MAATC,SAAS,GAAoB;IACxC;AACJ;AACA;EACG;;EAEqB,MAATC,SAAS,CAACC,MAAD,EAA+B;IACnD;AACJ;AACA;EACG;EAED;AACF;AACA;AACA;AACA;;;EACSC,GAAG,CAACC,IAAD,EAAeC,QAAf,EAAyC,CAElD;EAED;AACF;AACA;AACA;AACA;AACA;;;EACSC,MAAM,CACTC,SADS,EAETC,KAFS,EAGTC,YAHS,EAIL;IACN;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;AACA;;;EACSC,MAAM,CAACN,IAAD,EAAeC,QAAf,EAAyC;IACpD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAEG;EAED;AACF;AACA;AACA;;;EACSM,GAAG,CAACN,QAAD,EAA2B;IACnC;AACJ;AACA;AACA;AACA;AACA;EACG;EAED;AACF;AACA;AACA;;;EACSO,iBAAiB,CAACC,WAAD,EAAuC;IAC7D,OAAO,IAAIC,uBAAJ,CAAmB,KAAKjB,MAAxB,EAAgCgB,WAAhC,EAA6C,KAAKd,MAAlD,CAAP;EACD;EAED;AACF;AACA;AACA;;;EAESgB,SAAS,CAACC,KAAD,EAA6B;IAC3C,MAAM,IAAIC,KAAJ,CAAU,yBAAV,CAAN;EACD;;EAEMC,WAAW,CAACC,IAAD,EAAeC,QAAf,EAA+C;IAC/D,MAAM,IAAIH,KAAJ,CAAU,yBAAV,CAAN;EACD;;EAEMI,UAAU,CAACC,MAAD,EAAwC;IACvD,MAAM,IAAIL,KAAJ,CAAU,yBAAV,CAAN;EACD;;AAvHiF"} \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/types/index.js b/generators/app/templates/typescript/storage/types/index.js new file mode 100644 index 00000000..951c783a --- /dev/null +++ b/generators/app/templates/typescript/storage/types/index.js @@ -0,0 +1,6 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/generators/app/templates/typescript/storage/types/index.js.map b/generators/app/templates/typescript/storage/types/index.js.map new file mode 100644 index 00000000..07805983 --- /dev/null +++ b/generators/app/templates/typescript/storage/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["import {Config} from '@verdaccio/types';\n\nexport interface CustomConfig extends Config {\n foo: string;\n}\n"],"mappings":""} \ No newline at end of file diff --git a/package.json b/package.json index f676e7c5..91133fd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-verdaccio-plugin", - "version": "4.0.0-next.0", + "version": "4.0.0-next.1", "description": "plugin generator for verdaccio", "homepage": "https://github.com/verdaccio", "author": {