generator-verdaccio-plugin 3.0.1 → 4.0.0-next.0

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.
Files changed (73) hide show
  1. package/README.md +1 -1
  2. package/build/app/index.js +133 -0
  3. package/build/app/index.js.map +1 -0
  4. package/build/app/templates/typescript/auth/_package.json +34 -0
  5. package/{generators/app/templates/typescript/auth/src/index.ts → build/app/templates/typescript/auth/src/index.js} +21 -20
  6. package/build/app/templates/typescript/auth/src/index.js.map +1 -0
  7. package/build/app/templates/typescript/auth/types/index.js +6 -0
  8. package/build/app/templates/typescript/auth/types/index.js.map +1 -0
  9. package/{generators/app/templates/javascript → build/app/templates/typescript}/common/README.md +0 -0
  10. package/{generators/app/templates/javascript → build/app/templates/typescript}/common/editorconfig +0 -0
  11. package/{generators/app/templates/javascript → build/app/templates/typescript}/common/eslintignore +0 -0
  12. package/build/app/templates/typescript/common/eslintrc +12 -0
  13. package/{generators/app/templates/javascript → build/app/templates/typescript}/common/gitignore +0 -0
  14. package/build/app/templates/typescript/common/index.js +14 -0
  15. package/build/app/templates/typescript/common/index.js.map +1 -0
  16. package/build/app/templates/typescript/common/jest.config.js +4 -0
  17. package/{generators/app/templates/javascript → build/app/templates/typescript}/common/npmignore +1 -2
  18. package/{generators → build}/app/templates/typescript/common/tsconfig.json +2 -1
  19. package/build/app/templates/typescript/middleware/_package.json +35 -0
  20. package/build/app/templates/typescript/middleware/src/index.js +36 -0
  21. package/build/app/templates/typescript/middleware/src/index.js.map +1 -0
  22. package/build/app/templates/typescript/middleware/types/index.js +6 -0
  23. package/build/app/templates/typescript/middleware/types/index.js.map +1 -0
  24. package/build/app/templates/typescript/storage/_package.json +35 -0
  25. package/{generators/app/templates/javascript → build/app/templates/typescript}/storage/src/PackageStorage.js +35 -20
  26. package/build/app/templates/typescript/storage/src/PackageStorage.js.map +1 -0
  27. package/build/app/templates/typescript/storage/src/index.js +16 -0
  28. package/build/app/templates/typescript/storage/src/index.js.map +1 -0
  29. package/{generators/app/templates/javascript → build/app/templates/typescript}/storage/src/plugin.js +41 -18
  30. package/build/app/templates/typescript/storage/src/plugin.js.map +1 -0
  31. package/build/app/templates/typescript/storage/types/index.js +6 -0
  32. package/build/app/templates/typescript/storage/types/index.js.map +1 -0
  33. package/package.json +81 -39
  34. package/CHANGELOG.md +0 -106
  35. package/generators/app/index.d.ts +0 -11
  36. package/generators/app/index.js +0 -134
  37. package/generators/app/index.ts +0 -215
  38. package/generators/app/templates/.eslintrc +0 -5
  39. package/generators/app/templates/javascript/.eslintrc +0 -5
  40. package/generators/app/templates/javascript/auth/_package.json +0 -33
  41. package/generators/app/templates/javascript/auth/src/index.js +0 -35
  42. package/generators/app/templates/javascript/common/babelrc +0 -3
  43. package/generators/app/templates/javascript/common/eslintrc +0 -3
  44. package/generators/app/templates/javascript/common/index.js +0 -1
  45. package/generators/app/templates/javascript/common/jest.config.js +0 -10
  46. package/generators/app/templates/javascript/common/travis.yml +0 -6
  47. package/generators/app/templates/javascript/middleware/_package.json +0 -34
  48. package/generators/app/templates/javascript/middleware/src/index.js +0 -8
  49. package/generators/app/templates/javascript/storage/_package.json +0 -33
  50. package/generators/app/templates/javascript/storage/src/index.js +0 -1
  51. package/generators/app/templates/typescript/auth/_package.json +0 -40
  52. package/generators/app/templates/typescript/auth/types/index.ts +0 -5
  53. package/generators/app/templates/typescript/common/README.md +0 -22
  54. package/generators/app/templates/typescript/common/babelrc +0 -3
  55. package/generators/app/templates/typescript/common/editorconfig +0 -12
  56. package/generators/app/templates/typescript/common/eslintignore +0 -2
  57. package/generators/app/templates/typescript/common/eslintrc +0 -3
  58. package/generators/app/templates/typescript/common/gitignore +0 -3
  59. package/generators/app/templates/typescript/common/index.ts +0 -3
  60. package/generators/app/templates/typescript/common/jest.config.js +0 -10
  61. package/generators/app/templates/typescript/common/npmignore +0 -4
  62. package/generators/app/templates/typescript/common/travis.yml +0 -6
  63. package/generators/app/templates/typescript/middleware/_package.json +0 -41
  64. package/generators/app/templates/typescript/middleware/src/index.ts +0 -35
  65. package/generators/app/templates/typescript/middleware/types/index.ts +0 -5
  66. package/generators/app/templates/typescript/storage/_package.json +0 -40
  67. package/generators/app/templates/typescript/storage/src/PackageStorage.ts +0 -183
  68. package/generators/app/templates/typescript/storage/src/index.ts +0 -1
  69. package/generators/app/templates/typescript/storage/src/plugin.ts +0 -140
  70. package/generators/app/templates/typescript/storage/types/index.ts +0 -5
  71. package/generators/app/types.d.ts +0 -10
  72. package/generators/app/types.js +0 -2
  73. package/generators/app/types.ts +0 -10
@@ -1,134 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const path_1 = require("path");
7
- const yeoman_generator_1 = __importDefault(require("yeoman-generator"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const lodash_1 = __importDefault(require("lodash"));
10
- const yosay = require("yosay");
11
- class VerdaccioPluginGenerator extends yeoman_generator_1.default {
12
- constructor(args, opts) {
13
- super(args, opts);
14
- this.projectName = "verdaccio-";
15
- this.destinationPathName = "verdaccio-";
16
- this.props = {};
17
- }
18
- prompting() {
19
- // Have Yeoman greet the user.
20
- this.log(yosay("Welcome to " +
21
- chalk_1.default.red("generator-verdaccio-plugin") +
22
- " plugin generator!"));
23
- const prompts = [
24
- {
25
- type: "input",
26
- name: "name",
27
- require: true,
28
- message: "What is the name of your plugin?",
29
- default: "customname",
30
- validate: function (input) {
31
- return input !== "";
32
- }
33
- },
34
- {
35
- type: "list",
36
- name: "lang",
37
- require: true,
38
- message: "Select Language",
39
- default: "typescript",
40
- store: true,
41
- choices: [{ value: "typescript" }, { value: "javascript" }]
42
- },
43
- {
44
- type: "list",
45
- name: "pluginType",
46
- require: true,
47
- message: "What kind of plugin you want to create?",
48
- store: true,
49
- choices: [
50
- { value: "auth" },
51
- { value: "storage" },
52
- { value: "middleware" }
53
- ]
54
- },
55
- {
56
- type: "input",
57
- name: "description",
58
- message: "Please, describe your plugin",
59
- default: "An amazing verdaccio plugin"
60
- },
61
- {
62
- name: "githubUsername",
63
- message: "GitHub username or organization",
64
- validate: function (input) {
65
- return input !== "";
66
- }
67
- },
68
- {
69
- name: "authorName",
70
- message: "Author's Name",
71
- store: true
72
- },
73
- {
74
- name: "authorEmail",
75
- message: "Author's Email",
76
- store: true
77
- },
78
- {
79
- name: "keywords",
80
- message: "Key your keywords (comma to split)",
81
- filter: function (keywords) {
82
- return lodash_1.default.uniq(lodash_1.default.words(keywords).concat(["verdaccio-"]));
83
- }
84
- }
85
- ];
86
- return this.prompt(prompts).then(function (_props) {
87
- // To access props later use this.props.someAnswer;
88
- // @ts-ignore
89
- this.props = _props;
90
- const { name, githubUsername } = _props;
91
- // @ts-ignore
92
- this.props.license = "MIT";
93
- if (githubUsername) {
94
- // @ts-ignore
95
- this.props.repository = githubUsername + "/" + name;
96
- }
97
- // @ts-ignore
98
- this.projectName = `verdaccio-${name}`;
99
- // @ts-ignore
100
- this.destinationPathName = path_1.resolve(this.projectName);
101
- // @ts-ignore
102
- this.props.name = this.projectName;
103
- }.bind(this));
104
- }
105
- packageJSON() {
106
- const { lang, pluginType } = this.props;
107
- const pkgJsonLocation = `${lang}/${pluginType}/_package.json`;
108
- this.fs.copyTpl(this.templatePath(pkgJsonLocation), this.destinationPath(path_1.resolve(this.destinationPathName, "package.json")), this.props);
109
- }
110
- writing() {
111
- const { lang } = this.props;
112
- this.fs.copy(this.templatePath(`${lang}/common/gitignore`), this.destinationPath(path_1.resolve(this.destinationPathName, ".gitignore")));
113
- this.fs.copy(this.templatePath(`${lang}/common/npmignore`), this.destinationPath(path_1.resolve(this.destinationPathName, ".npmignore")));
114
- this.fs.copy(this.templatePath(`${lang}/common/jest.config.js`), this.destinationPath(path_1.resolve(this.destinationPathName, "jest.config.js")));
115
- this.fs.copy(this.templatePath(`${lang}/common/babelrc`), this.destinationPath(path_1.resolve(this.destinationPathName, ".babelrc")));
116
- this.fs.copy(this.templatePath(`${lang}/common/travis.yml`), this.destinationPath(path_1.resolve(this.destinationPathName, ".travis.yml")));
117
- this.fs.copy(this.templatePath(`${lang}/common/travis.yml`), this.destinationPath(path_1.resolve(this.destinationPathName, ".travis.yml")));
118
- this.fs.copyTpl(this.templatePath(`${lang}/common/README.md`), this.destinationPath(path_1.resolve(this.destinationPathName, "README.md")), this.props);
119
- this.fs.copyTpl(this.templatePath(`${lang}/common/eslintrc`), this.destinationPath(path_1.resolve(this.destinationPathName, ".eslintrc")), this.props);
120
- this.fs.copyTpl(this.templatePath(`${lang}/common/eslintignore`), this.destinationPath(path_1.resolve(this.destinationPathName, ".eslintignore")), this.props);
121
- this.fs.copy(this.templatePath(`${lang}/${this.props.pluginType}/src`), this.destinationPath(path_1.resolve(this.destinationPathName, "src")), this.props);
122
- this.fs.copy(this.templatePath(`${lang}/common/index.${lang == "typescript" ? "ts" : "js"}`), this.destinationPath(path_1.resolve(this.destinationPathName, `index.${lang == "typescript" ? "ts" : "js"}`)), this.props);
123
- if (lang == "typescript") {
124
- this.fs.copy(this.templatePath(`${lang}/common/tsconfig.json`), this.destinationPath(path_1.resolve(this.destinationPathName, "tsconfig.json")), this.props);
125
- this.fs.copy(this.templatePath(`${lang}/${this.props.pluginType}/types`), this.destinationPath(path_1.resolve(this.destinationPathName, "types")), this.props);
126
- }
127
- this.fs.copy(this.templatePath(`${lang}/common/editorconfig`), this.destinationPath(path_1.resolve(this.destinationPathName, ".editorconfig")), this.props);
128
- }
129
- install() {
130
- process.chdir(this.projectName);
131
- this.installDependencies({ npm: true, bower: false });
132
- }
133
- }
134
- exports.default = VerdaccioPluginGenerator;
@@ -1,215 +0,0 @@
1
- import { resolve } from "path";
2
-
3
- import Generator from "yeoman-generator";
4
- import chalk from "chalk";
5
- import _ from "lodash";
6
-
7
- import { propsTypes } from "./types";
8
-
9
- const yosay = require("yosay");
10
-
11
- export default class VerdaccioPluginGenerator extends Generator {
12
- private props: propsTypes;
13
- private projectName: string = "verdaccio-";
14
- private destinationPathName: string = "verdaccio-";
15
- constructor(args, opts) {
16
- super(args, opts);
17
- this.props = {};
18
- }
19
-
20
- prompting() {
21
- // Have Yeoman greet the user.
22
- this.log(
23
- yosay(
24
- "Welcome to " +
25
- chalk.red("generator-verdaccio-plugin") +
26
- " plugin generator!"
27
- )
28
- );
29
-
30
- const prompts = [
31
- {
32
- type: "input",
33
- name: "name",
34
- require: true,
35
- message: "What is the name of your plugin?",
36
- default: "customname",
37
- validate: function(input) {
38
- return input !== "";
39
- }
40
- },
41
- {
42
- type: "list",
43
- name: "lang",
44
- require: true,
45
- message: "Select Language",
46
- default: "typescript",
47
- store: true,
48
- choices: [{ value: "typescript" }, { value: "javascript" }]
49
- },
50
- {
51
- type: "list",
52
- name: "pluginType",
53
- require: true,
54
- message: "What kind of plugin you want to create?",
55
- store: true,
56
- choices: [
57
- { value: "auth" },
58
- { value: "storage" },
59
- { value: "middleware" }
60
- ]
61
- },
62
- {
63
- type: "input",
64
- name: "description",
65
- message: "Please, describe your plugin",
66
- default: "An amazing verdaccio plugin"
67
- },
68
- {
69
- name: "githubUsername",
70
- message: "GitHub username or organization",
71
- validate: function(input) {
72
- return input !== "";
73
- }
74
- },
75
- {
76
- name: "authorName",
77
- message: "Author's Name",
78
- store: true
79
- },
80
- {
81
- name: "authorEmail",
82
- message: "Author's Email",
83
- store: true
84
- },
85
- {
86
- name: "keywords",
87
- message: "Key your keywords (comma to split)",
88
- filter: function(keywords) {
89
- return _.uniq(_.words(keywords).concat(["verdaccio-"]));
90
- }
91
- }
92
- ];
93
-
94
- return this.prompt(prompts).then(
95
- function(_props) {
96
- // To access props later use this.props.someAnswer;
97
- // @ts-ignore
98
- this.props = _props;
99
- const { name, githubUsername } = _props;
100
- // @ts-ignore
101
- this.props.license = "MIT";
102
- if (githubUsername) {
103
- // @ts-ignore
104
- this.props.repository = githubUsername + "/" + name;
105
- }
106
-
107
- // @ts-ignore
108
- this.projectName = `verdaccio-${name}`;
109
-
110
- // @ts-ignore
111
- this.destinationPathName = resolve(this.projectName);
112
- // @ts-ignore
113
- this.props.name = this.projectName;
114
- }.bind(this)
115
- );
116
- }
117
-
118
- packageJSON() {
119
- const { lang, pluginType } = this.props;
120
- const pkgJsonLocation = `${lang}/${pluginType}/_package.json`;
121
- this.fs.copyTpl(
122
- this.templatePath(pkgJsonLocation),
123
- this.destinationPath(resolve(this.destinationPathName, "package.json")),
124
- this.props
125
- );
126
- }
127
-
128
- writing() {
129
- const { lang } = this.props;
130
- this.fs.copy(
131
- this.templatePath(`${lang}/common/gitignore`),
132
- this.destinationPath(resolve(this.destinationPathName, ".gitignore"))
133
- );
134
- this.fs.copy(
135
- this.templatePath(`${lang}/common/npmignore`),
136
- this.destinationPath(resolve(this.destinationPathName, ".npmignore"))
137
- );
138
- this.fs.copy(
139
- this.templatePath(`${lang}/common/jest.config.js`),
140
- this.destinationPath(resolve(this.destinationPathName, "jest.config.js"))
141
- );
142
- this.fs.copy(
143
- this.templatePath(`${lang}/common/babelrc`),
144
- this.destinationPath(resolve(this.destinationPathName, ".babelrc"))
145
- );
146
- this.fs.copy(
147
- this.templatePath(`${lang}/common/travis.yml`),
148
- this.destinationPath(resolve(this.destinationPathName, ".travis.yml"))
149
- );
150
- this.fs.copy(
151
- this.templatePath(`${lang}/common/travis.yml`),
152
- this.destinationPath(resolve(this.destinationPathName, ".travis.yml"))
153
- );
154
- this.fs.copyTpl(
155
- this.templatePath(`${lang}/common/README.md`),
156
- this.destinationPath(resolve(this.destinationPathName, "README.md")),
157
- this.props
158
- );
159
- this.fs.copyTpl(
160
- this.templatePath(`${lang}/common/eslintrc`),
161
- this.destinationPath(resolve(this.destinationPathName, ".eslintrc")),
162
- this.props
163
- );
164
- this.fs.copyTpl(
165
- this.templatePath(`${lang}/common/eslintignore`),
166
- this.destinationPath(resolve(this.destinationPathName, ".eslintignore")),
167
- this.props
168
- );
169
-
170
- this.fs.copy(
171
- this.templatePath(`${lang}/${this.props.pluginType}/src`),
172
- this.destinationPath(resolve(this.destinationPathName, "src")),
173
- this.props
174
- );
175
-
176
- this.fs.copy(
177
- this.templatePath(
178
- `${lang}/common/index.${lang == "typescript" ? "ts" : "js"}`
179
- ),
180
- this.destinationPath(
181
- resolve(
182
- this.destinationPathName,
183
- `index.${lang == "typescript" ? "ts" : "js"}`
184
- )
185
- ),
186
- this.props
187
- );
188
-
189
- if (lang == "typescript") {
190
- this.fs.copy(
191
- this.templatePath(`${lang}/common/tsconfig.json`),
192
- this.destinationPath(
193
- resolve(this.destinationPathName, "tsconfig.json")
194
- ),
195
- this.props
196
- );
197
- this.fs.copy(
198
- this.templatePath(`${lang}/${this.props.pluginType}/types`),
199
- this.destinationPath(resolve(this.destinationPathName, "types")),
200
- this.props
201
- );
202
- }
203
-
204
- this.fs.copy(
205
- this.templatePath(`${lang}/common/editorconfig`),
206
- this.destinationPath(resolve(this.destinationPathName, ".editorconfig")),
207
- this.props
208
- );
209
- }
210
-
211
- install() {
212
- process.chdir(this.projectName);
213
- this.installDependencies({ npm: true, bower: false });
214
- }
215
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "@typescript-eslint/no-unused-vars": 0
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "no-unused-vars": 0
4
- }
5
- }
@@ -1,33 +0,0 @@
1
- {
2
- "name": "<%= name %>",
3
- "version": "0.0.1",
4
- "description": "<%= description %>",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "files": ["lib/"],
8
- "engines": {
9
- "node": ">=10"
10
- },
11
- "dependencies": {
12
- "@verdaccio/commons-api": "^9.6.1"
13
- },
14
- "devDependencies": {
15
- "@verdaccio/babel-preset": "^9.6.1",
16
- "@verdaccio/eslint-config": "^9.3.2",
17
- "eslint": "^6.6.0",
18
- "jest": "^26.0.1 ",
19
- "prettier": "^1.19.1",
20
- "standard-version": "^8.0.0"
21
- },
22
- "keywords": "[<%= keywords %>]",
23
- "license": "<%= license %>",
24
- "repository": "<%= repository %>",
25
- "author": "<%= authorName %> <<%= authorEmail %>>",
26
- "scripts": {
27
- "build": "npm run build:types && npm run build:js",
28
- "build:js": "babel src/ --out-dir lib --extensions \".ts,.tsx\"",
29
- "build:types": "tsc --emitDeclarationOnly",
30
- "test": "jest",
31
- "lint": "eslint \"**/*.{js,ts}\""
32
- }
33
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * Custom Verdaccio Authenticate Plugin.
3
- */
4
- class AuthCustomPlugin {
5
- constructor(config, options) {
6
- return this;
7
- }
8
- /**
9
- * Authenticate an user.
10
- * @param user user to log
11
- * @param password provided password
12
- * @param cb callback function
13
- */
14
- authenticate(user, password, cb) {
15
- // here your code
16
- }
17
-
18
- /**
19
- * check grants for such user.
20
- */
21
- allow_access() {
22
- // in case of restrict the access
23
- }
24
-
25
- /**
26
- * check grants to publish
27
- */
28
- allow_publish() {
29
- // in cass to check if has permission to publish
30
- }
31
- }
32
-
33
- module.exports = (config, options) => {
34
- return new AuthCustomPlugin(config, options);
35
- };
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@verdaccio", {typescript: false} ]
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["@verdaccio"]
3
- }
@@ -1 +0,0 @@
1
- module.exports = require('./lib/index.js');
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- name: 'verdaccio-<%= name %>',
3
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
4
- transform: {
5
- '^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
6
- },
7
- verbose: true,
8
- collectCoverage: true,
9
- coveragePathIgnorePatterns: ['node_modules'],
10
- };
@@ -1,6 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "8"
4
- - "10"
5
- sudo: false
6
- script: npm install . && npm run test
@@ -1,34 +0,0 @@
1
- {
2
- "name": "<%= name %>",
3
- "version": "0.0.1",
4
- "description": "<%= description %>",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "files": ["lib/"],
8
- "engines": {
9
- "node": ">=10"
10
- },
11
- "dependencies": {
12
- "@verdaccio/commons-api": "^9.6.1",
13
- "express": "^4.17.1"
14
- },
15
- "devDependencies": {
16
- "@verdaccio/babel-preset": "^9.6.1",
17
- "@verdaccio/eslint-config": "^9.3.2",
18
- "eslint": "^6.6.0",
19
- "jest": "^26.0.1 ",
20
- "prettier": "^1.19.1",
21
- "standard-version": "^8.0.0"
22
- },
23
- "keywords": "[<%= keywords %>]",
24
- "license": "<%= license %>",
25
- "repository": "<%= repository %>",
26
- "author": "<%= authorName %> <<%= authorEmail %>>",
27
- "scripts": {
28
- "build": "npm run build:types && npm run build:js",
29
- "build:js": "babel src/ --out-dir lib --extensions \".ts,.tsx\"",
30
- "build:types": "tsc --emitDeclarationOnly",
31
- "test": "jest",
32
- "lint": "eslint \"**/*.{js,ts}\""
33
- }
34
- }
@@ -1,8 +0,0 @@
1
- class VerdaccioMiddlewarePlugin {
2
- constructor(config, options) {}
3
- register_middlewares(app, auth, storage) {}
4
- }
5
-
6
- module.exports = (config, options) => {
7
- return new VerdaccioMiddlewarePlugin(config, options);
8
- };
@@ -1,33 +0,0 @@
1
- {
2
- "name": "<%= name %>",
3
- "version": "0.0.1",
4
- "description": "<%= description %>",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "files": ["lib/"],
8
- "engines": {
9
- "node": ">=10"
10
- },
11
- "dependencies": {
12
- "@verdaccio/commons-api": "^9.6.1"
13
- },
14
- "devDependencies": {
15
- "@verdaccio/babel-preset": "^9.6.1",
16
- "@verdaccio/eslint-config": "^9.3.2",
17
- "eslint": "^6.6.0",
18
- "jest": "^26.0.1 ",
19
- "prettier": "^1.19.1",
20
- "standard-version": "^8.0.0"
21
- },
22
- "keywords": "[<%= keywords %>]",
23
- "license": "<%= license %>",
24
- "repository": "<%= repository %>",
25
- "author": "<%= authorName %> <<%= authorEmail %>>",
26
- "scripts": {
27
- "build": "npm run build:types && npm run build:js",
28
- "build:js": "babel src/ --out-dir lib --extensions \".ts,.tsx\"",
29
- "build:types": "tsc --emitDeclarationOnly",
30
- "test": "jest",
31
- "lint": "eslint \"**/*.{js,ts}\""
32
- }
33
- }
@@ -1 +0,0 @@
1
- export { default } from './plugin';
@@ -1,40 +0,0 @@
1
- {
2
- "name": "<%= name %>",
3
- "version": "0.0.1",
4
- "description": "<%= description %>",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "files": ["lib/"],
8
- "engines": {
9
- "node": ">=10"
10
- },
11
- "dependencies": {
12
- "@verdaccio/commons-api": "^9.6.1"
13
- },
14
- "devDependencies": {
15
- "@types/jest": "^24.0.21",
16
- "@types/node": "^12.12.5",
17
- "@types/express": "^4.17.1",
18
- "@typescript-eslint/eslint-plugin": "^2.12.0",
19
- "@verdaccio/babel-preset": "^9.6.1",
20
- "@verdaccio/eslint-config": "^9.3.2",
21
- "@verdaccio/types": "^9.5.0",
22
- "eslint": "^6.6.0",
23
- "jest": "^26.0.1 ",
24
- "prettier": "^1.19.1",
25
- "standard-version": "^8.0.0",
26
- "typescript": "^3.9.5"
27
- },
28
- "keywords": ["<%= keywords %>]"],
29
- "license": "<%= license %>",
30
- "repository": "<%= repository %>",
31
- "author": "<%= authorName %> <<%= authorEmail %>>",
32
- "scripts": {
33
- "release": "standard-version -a -s",
34
- "build": "npm run build:types && npm run build:js",
35
- "build:js": "babel src/ --out-dir lib --extensions \".ts,.tsx\"",
36
- "build:types": "tsc --emitDeclarationOnly",
37
- "test": "jest",
38
- "lint": "eslint \"**/*.{js,ts}\""
39
- }
40
- }
@@ -1,5 +0,0 @@
1
- import { Config } from '@verdaccio/types';
2
-
3
- export interface CustomConfig extends Config {
4
- foo: string;
5
- }
@@ -1,22 +0,0 @@
1
- # <%= name %>
2
-
3
- <%- (description || '').split('\n').map(function (line) {
4
- return '> ' + line
5
- }).join('\n') %>
6
-
7
- ---
8
-
9
- ## development
10
-
11
- See the [verdaccio contributing guide](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.
12
- Once you have completed that, use the following npm tasks.
13
-
14
- - `npm run build`
15
-
16
- Build a distributable archive
17
-
18
- - `npm run test`
19
-
20
- Run unit test
21
-
22
- For more information about any of these commands run `npm run ${task} -- --help`.
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@verdaccio"]
3
- }
@@ -1,12 +0,0 @@
1
- # top-most EditorConfig file
2
- root = true
3
-
4
- # Unix-style newlines with a newline ending every file
5
- [*]
6
- end_of_line = lf
7
- insert_final_newline = true
8
-
9
- # 2 space indentation
10
- [{.,}*.{js,yml,yaml}]
11
- indent_style = space
12
- indent_size = 2
@@ -1,2 +0,0 @@
1
- node_modules
2
- lib
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["@verdaccio"]
3
- }
@@ -1,3 +0,0 @@
1
- npm-debug.log*
2
- node_modules
3
- /lib/
@@ -1,3 +0,0 @@
1
- import VerdaccioPlugin from './lib/index';
2
-
3
- export default VerdaccioPlugin;
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- name: 'verdaccio-<%= name %>',
3
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
4
- transform: {
5
- '^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
6
- },
7
- verbose: true,
8
- collectCoverage: true,
9
- coveragePathIgnorePatterns: ['node_modules'],
10
- };
@@ -1,4 +0,0 @@
1
- src/
2
- .eslintrc
3
- .babelrc
4
- test/