@verdaccio/store 6.0.0-6-next.21 → 6.0.0-6-next.24
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 +92 -0
- package/build/index.d.ts +5 -4
- package/build/index.js +31 -15
- package/build/index.js.map +1 -1
- package/build/lib/TransFormResults.d.ts +15 -0
- package/build/lib/TransFormResults.js +61 -0
- package/build/lib/TransFormResults.js.map +1 -0
- package/build/lib/search-utils.d.ts +4 -0
- package/build/lib/search-utils.js +59 -0
- package/build/lib/search-utils.js.map +1 -0
- package/build/lib/star-utils.d.ts +14 -0
- package/build/{star-utils.js → lib/star-utils.js} +16 -2
- package/build/lib/star-utils.js.map +1 -0
- package/build/lib/storage-utils.d.ts +82 -0
- package/build/{storage-utils.js → lib/storage-utils.js} +173 -60
- package/build/lib/storage-utils.js.map +1 -0
- package/build/lib/uplink-util.d.ts +10 -0
- package/build/lib/uplink-util.js +49 -0
- package/build/lib/uplink-util.js.map +1 -0
- package/build/lib/versions-utils.d.ts +28 -0
- package/build/lib/versions-utils.js +104 -0
- package/build/lib/versions-utils.js.map +1 -0
- package/build/local-storage.d.ts +3 -165
- package/build/local-storage.js +6 -1166
- package/build/local-storage.js.map +1 -1
- package/build/storage.d.ts +242 -86
- package/build/storage.js +1681 -548
- package/build/storage.js.map +1 -1
- package/build/type.d.ts +42 -19
- package/build/type.js.map +1 -1
- package/jest.config.js +8 -2
- package/package.json +71 -71
- package/src/index.ts +5 -4
- package/src/lib/TransFormResults.ts +42 -0
- package/src/lib/search-utils.ts +50 -0
- package/src/{star-utils.ts → lib/star-utils.ts} +16 -5
- package/src/lib/storage-utils.ts +362 -0
- package/src/lib/uplink-util.ts +41 -0
- package/src/lib/versions-utils.ts +87 -0
- package/src/local-storage.ts +7 -1217
- package/src/storage.ts +1683 -635
- package/src/type.ts +47 -21
- package/test/fixtures/config/getTarballNext-getupstream.yaml +17 -0
- package/test/fixtures/config/syncDoubleUplinksMetadata.yaml +25 -0
- package/test/fixtures/config/syncNoUplinksMetadata.yaml +17 -0
- package/test/fixtures/config/syncSingleUplinksMetadata.yaml +21 -0
- package/test/fixtures/config/updateManifest-1.yaml +16 -0
- package/test/fixtures/manifests/foo-npmjs.json +253 -0
- package/test/fixtures/manifests/foo-verdaccio.json +253 -0
- package/test/fixtures/tarball.tgz +0 -0
- package/test/helpers.ts +22 -0
- package/test/local-store.__disabled__.ts +553 -0
- package/test/search.spec.ts +4 -5
- package/test/star.spec.ts +31 -0
- package/test/storage-utils.spec.ts +129 -42
- package/test/storage.spec.ts +943 -33
- package/test/versions.spec.ts +109 -0
- package/tsconfig.json +6 -3
- package/build/search.d.ts +0 -35
- package/build/search.js +0 -198
- package/build/search.js.map +0 -1
- package/build/star-utils.d.ts +0 -9
- package/build/star-utils.js.map +0 -1
- package/build/storage-utils.d.ts +0 -39
- package/build/storage-utils.js.map +0 -1
- package/build/uplink-util.d.ts +0 -7
- package/build/uplink-util.js +0 -38
- package/build/uplink-util.js.map +0 -1
- package/src/search.ts +0 -175
- package/src/storage-utils.ts +0 -263
- package/src/uplink-util.ts +0 -32
- package/test/local-storage.spec.ts +0 -583
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_id": "foo",
|
|
3
|
+
"_rev": "18-216e297d46df22554bd6d962330269bd",
|
|
4
|
+
"name": "foo",
|
|
5
|
+
"description": "An opinionated git cli for oss",
|
|
6
|
+
"dist-tags": { "latest": "0.0.7" },
|
|
7
|
+
"versions": {
|
|
8
|
+
"1.0.0": {
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "AJ ONeal",
|
|
11
|
+
"email": "coolaj86@gmail.com",
|
|
12
|
+
"url": "http://coolaj86.info"
|
|
13
|
+
},
|
|
14
|
+
"name": "foo",
|
|
15
|
+
"description": "A test module with no `main`, `lib`, or `dependencies` specified",
|
|
16
|
+
"version": "1.0.0",
|
|
17
|
+
"repository": { "type": "git", "url": "git://github.com/coolaj86/node-pakman.git" },
|
|
18
|
+
"engines": { "node": ">= v0.2" },
|
|
19
|
+
"_npmUser": { "name": "coolaj86", "email": "coolaj86@gmail.com" },
|
|
20
|
+
"_id": "foo@1.0.0",
|
|
21
|
+
"dependencies": {},
|
|
22
|
+
"devDependencies": {},
|
|
23
|
+
"_engineSupported": true,
|
|
24
|
+
"_npmVersion": "1.0.101",
|
|
25
|
+
"_nodeVersion": "v0.4.8",
|
|
26
|
+
"_defaultsLoaded": true,
|
|
27
|
+
"dist": {
|
|
28
|
+
"shasum": "943e0ec03df00ebeb6273a5b94b916ba54b47581",
|
|
29
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-1.0.0.tgz"
|
|
30
|
+
},
|
|
31
|
+
"maintainers": [{ "name": "coolaj86", "email": "coolaj86@gmail.com" }],
|
|
32
|
+
"directories": {}
|
|
33
|
+
},
|
|
34
|
+
"0.0.3": {
|
|
35
|
+
"name": "foo",
|
|
36
|
+
"version": "0.0.3",
|
|
37
|
+
"description": "An opinionated git cli for oss",
|
|
38
|
+
"main": "index.js",
|
|
39
|
+
"bin": { "foo": "./bin/foo" },
|
|
40
|
+
"scripts": { "test": "jest" },
|
|
41
|
+
"repository": { "url": "git://github.com/devtools-html/foo.git", "type": "git" },
|
|
42
|
+
"author": { "name": "Jason Laster" },
|
|
43
|
+
"files": ["src", "index.js"],
|
|
44
|
+
"license": "ISC",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"commander": "^2.11.0",
|
|
47
|
+
"hankey": "^0.0.3",
|
|
48
|
+
"jest": "^21.2.1",
|
|
49
|
+
"node-pager": "^0.3.1",
|
|
50
|
+
"shelljs": "^0.7.8"
|
|
51
|
+
},
|
|
52
|
+
"gitHead": "518d46379d17319b354c1cb1d145174bb6f6c93a",
|
|
53
|
+
"bugs": { "url": "https://github.com/devtools-html/foo/issues" },
|
|
54
|
+
"homepage": "https://github.com/devtools-html/foo#readme",
|
|
55
|
+
"_id": "foo@0.0.3",
|
|
56
|
+
"_npmVersion": "5.4.2",
|
|
57
|
+
"_nodeVersion": "8.5.0",
|
|
58
|
+
"_npmUser": { "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" },
|
|
59
|
+
"dist": {
|
|
60
|
+
"integrity": "sha512-IFkwMdDXr3D48FHhrC79x9dFv/hc6liJaNkY4YlKfhZkIIlXlIa+X+ERMrQSn096IEEPRXpA12Ebit44gJQZlg==",
|
|
61
|
+
"shasum": "9dc6bd8406c6e2aa0ab804c42569f42312ee70a6",
|
|
62
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-0.0.3.tgz"
|
|
63
|
+
},
|
|
64
|
+
"maintainers": [{ "email": "jason.laster.11@gmail.com", "name": "jasonlaster11" }],
|
|
65
|
+
"_npmOperationalInternal": {
|
|
66
|
+
"host": "s3://npm-registry-packages",
|
|
67
|
+
"tmp": "tmp/foo-0.0.3.tgz_1509558625556_0.48447197722271085"
|
|
68
|
+
},
|
|
69
|
+
"directories": {}
|
|
70
|
+
},
|
|
71
|
+
"0.0.4": {
|
|
72
|
+
"name": "foo",
|
|
73
|
+
"version": "0.0.4",
|
|
74
|
+
"description": "An opinionated git cli for oss",
|
|
75
|
+
"main": "index.js",
|
|
76
|
+
"bin": { "foo": "./bin/foo" },
|
|
77
|
+
"scripts": { "test": "jest" },
|
|
78
|
+
"repository": { "url": "git://github.com/jasonLaster/foo.git", "type": "git" },
|
|
79
|
+
"author": { "name": "Jason Laster" },
|
|
80
|
+
"files": ["src", "index.js"],
|
|
81
|
+
"license": "ISC",
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"commander": "^2.11.0",
|
|
84
|
+
"hankey": "^0.0.3",
|
|
85
|
+
"jest": "^21.2.1",
|
|
86
|
+
"node-pager": "^0.3.1",
|
|
87
|
+
"shelljs": "^0.7.8"
|
|
88
|
+
},
|
|
89
|
+
"gitHead": "5e0fea032d7289e452b362ce7d0bdf3e3a27d47e",
|
|
90
|
+
"bugs": { "url": "https://github.com/jasonLaster/foo/issues" },
|
|
91
|
+
"homepage": "https://github.com/jasonLaster/foo#readme",
|
|
92
|
+
"_id": "foo@0.0.4",
|
|
93
|
+
"_npmVersion": "5.4.2",
|
|
94
|
+
"_nodeVersion": "8.5.0",
|
|
95
|
+
"_npmUser": { "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" },
|
|
96
|
+
"dist": {
|
|
97
|
+
"integrity": "sha512-K9zNKnhoFlnhed2e4IHfbwTsWgCnQtqx8h12xwAHdAD3drWsxiw4uRze+m0YpMnsMdhKtvexOssOnl776lmDQQ==",
|
|
98
|
+
"shasum": "6bd48a7db360e710bb17399b48970b0bace89072",
|
|
99
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-0.0.4.tgz"
|
|
100
|
+
},
|
|
101
|
+
"maintainers": [{ "email": "jason.laster.11@gmail.com", "name": "jasonlaster11" }],
|
|
102
|
+
"_npmOperationalInternal": {
|
|
103
|
+
"host": "s3://npm-registry-packages",
|
|
104
|
+
"tmp": "tmp/foo-0.0.4.tgz_1509558677201_0.8135302173905075"
|
|
105
|
+
},
|
|
106
|
+
"directories": {}
|
|
107
|
+
},
|
|
108
|
+
"0.0.5": {
|
|
109
|
+
"name": "foo",
|
|
110
|
+
"version": "0.0.5",
|
|
111
|
+
"description": "An opinionated git cli for oss",
|
|
112
|
+
"main": "index.js",
|
|
113
|
+
"bin": { "foo": "./bin/foo.js" },
|
|
114
|
+
"scripts": { "test": "jest" },
|
|
115
|
+
"repository": { "url": "git://github.com/jasonLaster/foo.git", "type": "git" },
|
|
116
|
+
"author": { "name": "Jason Laster" },
|
|
117
|
+
"files": ["src", "index.js"],
|
|
118
|
+
"license": "ISC",
|
|
119
|
+
"dependencies": {
|
|
120
|
+
"commander": "^2.11.0",
|
|
121
|
+
"hankey": "^0.0.3",
|
|
122
|
+
"jest": "^21.2.1",
|
|
123
|
+
"node-pager": "^0.3.1",
|
|
124
|
+
"shelljs": "^0.7.8"
|
|
125
|
+
},
|
|
126
|
+
"gitHead": "b17d994ae78b6ebfc48623132085787e99d8a0d9",
|
|
127
|
+
"bugs": { "url": "https://github.com/jasonLaster/foo/issues" },
|
|
128
|
+
"homepage": "https://github.com/jasonLaster/foo#readme",
|
|
129
|
+
"_id": "foo@0.0.5",
|
|
130
|
+
"_shasum": "c84cb90deb756f18ff45081e8930c2e8b308ddbf",
|
|
131
|
+
"_from": ".",
|
|
132
|
+
"_npmVersion": "4.2.0",
|
|
133
|
+
"_nodeVersion": "7.10.0",
|
|
134
|
+
"_npmUser": { "name": "bomsy", "email": "b4bomsy@gmail.com" },
|
|
135
|
+
"dist": {
|
|
136
|
+
"shasum": "c84cb90deb756f18ff45081e8930c2e8b308ddbf",
|
|
137
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-0.0.5.tgz"
|
|
138
|
+
},
|
|
139
|
+
"maintainers": [
|
|
140
|
+
{ "name": "bomsy", "email": "b4bomsy@gmail.com" },
|
|
141
|
+
{ "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" }
|
|
142
|
+
],
|
|
143
|
+
"_npmOperationalInternal": {
|
|
144
|
+
"host": "s3://npm-registry-packages",
|
|
145
|
+
"tmp": "tmp/foo-0.0.5.tgz_1509564029608_0.9241615766659379"
|
|
146
|
+
},
|
|
147
|
+
"directories": {}
|
|
148
|
+
},
|
|
149
|
+
"0.0.6": {
|
|
150
|
+
"name": "foo",
|
|
151
|
+
"version": "0.0.6",
|
|
152
|
+
"description": "An opinionated git cli for oss",
|
|
153
|
+
"main": "index.js",
|
|
154
|
+
"bin": { "foo": "./bin/foo.js" },
|
|
155
|
+
"scripts": { "test": "jest" },
|
|
156
|
+
"repository": { "url": "git://github.com/jasonLaster/foo.git", "type": "git" },
|
|
157
|
+
"author": { "name": "Jason Laster" },
|
|
158
|
+
"files": ["src", "bin", "index.js"],
|
|
159
|
+
"license": "ISC",
|
|
160
|
+
"dependencies": {
|
|
161
|
+
"commander": "^2.11.0",
|
|
162
|
+
"hankey": "^0.0.3",
|
|
163
|
+
"jest": "^21.2.1",
|
|
164
|
+
"node-pager": "^0.3.1",
|
|
165
|
+
"shelljs": "^0.7.8"
|
|
166
|
+
},
|
|
167
|
+
"gitHead": "b17d994ae78b6ebfc48623132085787e99d8a0d9",
|
|
168
|
+
"bugs": { "url": "https://github.com/jasonLaster/foo/issues" },
|
|
169
|
+
"homepage": "https://github.com/jasonLaster/foo#readme",
|
|
170
|
+
"_id": "foo@0.0.6",
|
|
171
|
+
"_npmVersion": "5.4.2",
|
|
172
|
+
"_nodeVersion": "8.5.0",
|
|
173
|
+
"_npmUser": { "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" },
|
|
174
|
+
"dist": {
|
|
175
|
+
"integrity": "sha512-7zqUo0JFgxP4enOqnRmOoBEX9/GmLHBZnqTcYoscOTXjE8H52JacKBNNhQ+jQXt49z7skmAtH8VTSfZ6NXxF4A==",
|
|
176
|
+
"shasum": "3d8959706a341a653a86dcf238ed437cf274cf5c",
|
|
177
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-0.0.6.tgz"
|
|
178
|
+
},
|
|
179
|
+
"maintainers": [
|
|
180
|
+
{ "name": "bomsy", "email": "b4bomsy@gmail.com" },
|
|
181
|
+
{ "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" }
|
|
182
|
+
],
|
|
183
|
+
"_npmOperationalInternal": {
|
|
184
|
+
"host": "s3://npm-registry-packages",
|
|
185
|
+
"tmp": "tmp/foo-0.0.6.tgz_1509567719527_0.14949515601620078"
|
|
186
|
+
},
|
|
187
|
+
"directories": {}
|
|
188
|
+
},
|
|
189
|
+
"0.0.7": {
|
|
190
|
+
"name": "foo",
|
|
191
|
+
"version": "0.0.7",
|
|
192
|
+
"description": "An opinionated git cli for oss",
|
|
193
|
+
"main": "index.js",
|
|
194
|
+
"bin": { "foo": "./bin/foo.js" },
|
|
195
|
+
"scripts": { "test": "jest" },
|
|
196
|
+
"repository": { "url": "git://github.com/jasonLaster/foo.git", "type": "git" },
|
|
197
|
+
"author": { "name": "Jason Laster" },
|
|
198
|
+
"files": ["src", "bin", "index.js"],
|
|
199
|
+
"license": "ISC",
|
|
200
|
+
"dependencies": {
|
|
201
|
+
"commander": "^2.11.0",
|
|
202
|
+
"hankey": "^0.0.3",
|
|
203
|
+
"jest": "^21.2.1",
|
|
204
|
+
"node-pager": "^0.3.1",
|
|
205
|
+
"shelljs": "^0.7.8"
|
|
206
|
+
},
|
|
207
|
+
"gitHead": "c8806dc86790375c795338a31c72806a9a5d6492",
|
|
208
|
+
"bugs": { "url": "https://github.com/jasonLaster/foo/issues" },
|
|
209
|
+
"homepage": "https://github.com/jasonLaster/foo#readme",
|
|
210
|
+
"_id": "foo@0.0.7",
|
|
211
|
+
"_npmVersion": "5.4.2",
|
|
212
|
+
"_nodeVersion": "8.5.0",
|
|
213
|
+
"_npmUser": { "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" },
|
|
214
|
+
"dist": {
|
|
215
|
+
"integrity": "sha512-sXEK8jkulv5gGs7z98MHihWOf0eiYnwQzSO9BH5Zro/9ABA52njlIt9iJhzXwHkupyajampMPNUmv9lCAiP8xw==",
|
|
216
|
+
"shasum": "7a27337c6c629fe9bed36961c697db15a689cab3",
|
|
217
|
+
"tarball": "https://registry.verdaccio.org/foo/-/foo-0.0.7.tgz"
|
|
218
|
+
},
|
|
219
|
+
"maintainers": [
|
|
220
|
+
{ "name": "bomsy", "email": "b4bomsy@gmail.com" },
|
|
221
|
+
{ "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" }
|
|
222
|
+
],
|
|
223
|
+
"_npmOperationalInternal": {
|
|
224
|
+
"host": "s3://npm-registry-packages",
|
|
225
|
+
"tmp": "tmp/foo-0.0.7.tgz_1509567920081_0.6064721783623099"
|
|
226
|
+
},
|
|
227
|
+
"directories": {}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"maintainers": [
|
|
231
|
+
{ "name": "bomsy", "email": "b4bomsy@gmail.com" },
|
|
232
|
+
{ "name": "jasonlaster11", "email": "jason.laster.11@gmail.com" }
|
|
233
|
+
],
|
|
234
|
+
"time": {
|
|
235
|
+
"modified": "2017-11-01T20:25:20.984Z",
|
|
236
|
+
"created": "2011-10-21T23:45:45.286Z",
|
|
237
|
+
"1.0.0": "2011-10-21T23:45:45.878Z",
|
|
238
|
+
"0.0.3": "2017-11-01T17:50:26.500Z",
|
|
239
|
+
"0.0.4": "2017-11-01T17:51:18.122Z",
|
|
240
|
+
"0.0.5": "2017-11-01T19:20:30.539Z",
|
|
241
|
+
"0.0.6": "2017-11-01T20:22:00.495Z",
|
|
242
|
+
"0.0.7": "2017-11-01T20:25:20.984Z"
|
|
243
|
+
},
|
|
244
|
+
"author": { "name": "Jason Laster" },
|
|
245
|
+
"repository": { "url": "git://github.com/jasonLaster/foo.git", "type": "git" },
|
|
246
|
+
"users": {},
|
|
247
|
+
"readme": "## Foo\n\nAn opinionated git cli for OSS.\n\n### How to install\n\n```js\nnpm install -g foo | yarn global add foo\n```\n\n### Checkout\n\nGets a remote branch. This will add a remote origin if it does not exist, fetches it and checkouts the specified PR branch.\n\n```bash\nfoo checkout <id|url|branch>\nfoo co <id|url|branch>\n```\n- `branch` - The username and branch e.g `@[user]/[branch]` or `@[user]:[branch]`\n- `id` - The pull request id e.g `4381` or `#4381` (in development)\n- `url` - The pull request url e.g `https://github.com/devtools-html/debugger.html/pull/4381` (in development)\n\n\n### Diff\n\nShows changes between commits, commit and working tree, etc\n\n```bash\nfoo diff\n```\n\n### Log\n\nShows the commit logs.\n\n```bash\nfoo log\n```\n\n### Push\n\nPushes your local branch to GH, regardless of remote.\n\n```bash\nfoo push\n```\n\n\n## Todo\n* **delete** delete local branches\n* **remote** add a new remote\n* **new** create a new branch\n* **update** update a branch\n* **squash** squash local commits\n",
|
|
248
|
+
"readmeFilename": "README.md",
|
|
249
|
+
"homepage": "https://github.com/jasonLaster/foo#readme",
|
|
250
|
+
"bugs": { "url": "https://github.com/jasonLaster/foo/issues" },
|
|
251
|
+
"license": "ISC",
|
|
252
|
+
"_attachments": {}
|
|
253
|
+
}
|
|
Binary file
|
package/test/helpers.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import buildDebug from 'debug';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
import { parseConfigFile } from '@verdaccio/config';
|
|
5
|
+
|
|
6
|
+
const debug = buildDebug('verdaccio:mock:config');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Override the default.yaml configuration file with any new config provided.
|
|
10
|
+
*/
|
|
11
|
+
function configExample(externalConfig: any = {}, configFile?: string, location?: string) {
|
|
12
|
+
let config = {};
|
|
13
|
+
if (location && configFile) {
|
|
14
|
+
const locationFile = path.join(location, configFile);
|
|
15
|
+
debug('config location: %s', locationFile);
|
|
16
|
+
config = parseConfigFile(locationFile);
|
|
17
|
+
debug('config file: %o', JSON.stringify(config));
|
|
18
|
+
}
|
|
19
|
+
return { ...externalConfig, ...config };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { configExample };
|