@guanjinke/artifact-client 1.0.1 → 1.1.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.
- package/README.md +173 -165
- package/dist/artifact-client.d.ts +15 -0
- package/dist/artifact-client.d.ts.map +1 -1
- package/dist/artifact-client.js +20 -0
- package/dist/artifact-client.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +25 -46
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/providers/azure-provider.d.ts +6 -18
- package/dist/providers/azure-provider.d.ts.map +1 -1
- package/dist/providers/azure-provider.js +100 -188
- package/dist/providers/azure-provider.js.map +1 -1
- package/dist/providers/oss-provider.d.ts +6 -17
- package/dist/providers/oss-provider.d.ts.map +1 -1
- package/dist/providers/oss-provider.js +106 -195
- package/dist/providers/oss-provider.js.map +1 -1
- package/dist/providers/storage-provider.d.ts +10 -0
- package/dist/providers/storage-provider.d.ts.map +1 -1
- package/dist/providers/storage-provider.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/semver.d.ts +6 -32
- package/dist/utils/semver.d.ts.map +1 -1
- package/dist/utils/semver.js +18 -55
- package/dist/utils/semver.js.map +1 -1
- package/package.json +43 -43
|
@@ -42,299 +42,210 @@ const path = __importStar(require("path"));
|
|
|
42
42
|
const ali_oss_1 = __importDefault(require("ali-oss"));
|
|
43
43
|
const storage_provider_1 = require("./storage-provider");
|
|
44
44
|
const semver_1 = require("../utils/semver");
|
|
45
|
+
const semver_2 = require("semver");
|
|
45
46
|
const format_1 = require("../utils/format");
|
|
46
|
-
const PLUGIN_ARTIFACTS_PREFIX = 'plugin_artifacts/';
|
|
47
|
-
/**
|
|
48
|
-
* Aliyun OSS (Object Storage Service) provider.
|
|
49
|
-
* Connects via access key ID + access key secret.
|
|
50
|
-
*/
|
|
51
47
|
class OSSProvider extends storage_provider_1.StorageProvider {
|
|
52
48
|
client;
|
|
49
|
+
base;
|
|
53
50
|
constructor(config) {
|
|
54
51
|
super();
|
|
55
|
-
if (!config.keyId || !config.key)
|
|
52
|
+
if (!config.keyId || !config.key)
|
|
56
53
|
throw new Error('OSS config requires both keyId and key.');
|
|
57
|
-
}
|
|
58
54
|
this.client = new ali_oss_1.default({
|
|
59
55
|
region: config.region || 'oss-cn-hangzhou',
|
|
60
|
-
endpoint: 'https://oss-cn-hangzhou.aliyuncs.com',
|
|
61
56
|
accessKeyId: config.keyId,
|
|
62
57
|
accessKeySecret: config.key,
|
|
63
58
|
bucket: config.bucket,
|
|
64
59
|
});
|
|
60
|
+
this.base = config.basePrefix ?? '';
|
|
65
61
|
}
|
|
66
|
-
// ============================================================
|
|
67
|
-
// listPlugins
|
|
68
|
-
// ============================================================
|
|
69
62
|
async listPlugins(options) {
|
|
70
|
-
const includeSize = options?.includeSize ?? false;
|
|
71
63
|
const plugins = [];
|
|
72
|
-
const
|
|
64
|
+
const prefix = this.base ? this.base + '/' : '';
|
|
65
|
+
const result = await this.client.list({ prefix, delimiter: '/' }, {});
|
|
73
66
|
if (result.prefixes) {
|
|
74
|
-
for (const
|
|
75
|
-
|
|
76
|
-
const name = prefix
|
|
77
|
-
.slice(PLUGIN_ARTIFACTS_PREFIX.length)
|
|
78
|
-
.replace(/\/$/, '');
|
|
67
|
+
for (const p of result.prefixes) {
|
|
68
|
+
const name = p.slice(prefix.length).replace(/\/$/, '');
|
|
79
69
|
if (!name)
|
|
80
70
|
continue;
|
|
81
|
-
const plugin = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
if (includeSize) {
|
|
86
|
-
plugin.totalSizeMB = await this.calculatePrefixSize(prefix);
|
|
87
|
-
}
|
|
71
|
+
const plugin = { name, path: p };
|
|
72
|
+
if (options?.includeSize)
|
|
73
|
+
plugin.totalSizeMB = await this.calculatePrefixSize(p);
|
|
88
74
|
plugins.push(plugin);
|
|
89
75
|
}
|
|
90
76
|
}
|
|
91
77
|
return plugins.sort((a, b) => a.name.localeCompare(b.name));
|
|
92
78
|
}
|
|
93
|
-
// ============================================================
|
|
94
|
-
// listMajorVersions
|
|
95
|
-
// ============================================================
|
|
96
79
|
async listMajorVersions(pluginName, options) {
|
|
97
|
-
const includeSize = options?.includeSize ?? false;
|
|
98
80
|
const majorMap = new Map();
|
|
99
|
-
const pluginPrefix = (0, semver_1.getPluginPrefix)(pluginName);
|
|
100
|
-
// List all entries under the plugin directory
|
|
81
|
+
const pluginPrefix = (0, semver_1.getPluginPrefix)(this.base, pluginName);
|
|
101
82
|
const result = await this.client.list({ prefix: pluginPrefix, delimiter: '/' }, {});
|
|
102
83
|
if (result.prefixes) {
|
|
103
|
-
for (const
|
|
104
|
-
const dirName =
|
|
105
|
-
.slice(pluginPrefix.length)
|
|
106
|
-
.replace(/\/$/, '');
|
|
84
|
+
for (const p of result.prefixes) {
|
|
85
|
+
const dirName = p.slice(pluginPrefix.length).replace(/\/$/, '');
|
|
107
86
|
if (!dirName)
|
|
108
87
|
continue;
|
|
109
88
|
const major = (0, semver_1.extractMajorMinor)(dirName);
|
|
110
89
|
if (!majorMap.has(major)) {
|
|
111
|
-
majorMap.set(major, {
|
|
112
|
-
majorVersion: major,
|
|
113
|
-
minorCount: 0,
|
|
114
|
-
path: `${pluginPrefix}${major}/`,
|
|
115
|
-
});
|
|
90
|
+
majorMap.set(major, { majorVersion: major, minorCount: 0, path: pluginPrefix + major + '/' });
|
|
116
91
|
}
|
|
117
92
|
const entry = majorMap.get(major);
|
|
118
93
|
entry.minorCount++;
|
|
119
|
-
if (includeSize) {
|
|
120
|
-
|
|
121
|
-
entry.totalSizeMB = (entry.totalSizeMB ?? 0) + dirSize;
|
|
94
|
+
if (options?.includeSize) {
|
|
95
|
+
entry.totalSizeMB = (entry.totalSizeMB ?? 0) + await this.calculatePrefixSize(p);
|
|
122
96
|
}
|
|
123
97
|
}
|
|
124
98
|
}
|
|
125
|
-
// Read latest version tags from version files
|
|
126
99
|
for (const [major, info] of majorMap) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
info.latestVersion = latestVersion;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
// Version file may not exist yet
|
|
135
|
-
}
|
|
100
|
+
const v = await this.readLatestVersion(pluginName, major);
|
|
101
|
+
if (v)
|
|
102
|
+
info.latestVersion = v;
|
|
136
103
|
}
|
|
137
104
|
const resultList = Array.from(majorMap.values());
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
resultList.sort((a, b) => {
|
|
150
|
-
if (a.majorVersion === 'dev')
|
|
151
|
-
return 1;
|
|
152
|
-
if (b.majorVersion === 'dev')
|
|
153
|
-
return -1;
|
|
154
|
-
return this.compareMajorVersions(a.majorVersion, b.majorVersion);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
105
|
+
resultList.sort((a, b) => {
|
|
106
|
+
if (a.majorVersion === 'dev')
|
|
107
|
+
return 1;
|
|
108
|
+
if (b.majorVersion === 'dev')
|
|
109
|
+
return -1;
|
|
110
|
+
const cmp = this.compareMajorVersions(a.majorVersion, b.majorVersion);
|
|
111
|
+
return options?.sortOrder === 'asc' ? cmp : -cmp;
|
|
112
|
+
});
|
|
157
113
|
return resultList;
|
|
158
114
|
}
|
|
159
|
-
// ============================================================
|
|
160
|
-
// getLatestVersion
|
|
161
|
-
// ============================================================
|
|
162
115
|
async getLatestVersion(pluginName, majorVersion, options) {
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
165
|
-
throw new Error(`No latest version found for plugin "${pluginName}" major "${majorVersion}"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const version = {
|
|
169
|
-
version: latestVersion,
|
|
170
|
-
path: (0, semver_1.getVersionPrefix)(pluginName, latestVersion),
|
|
171
|
-
};
|
|
172
|
-
if (options?.includeSize) {
|
|
116
|
+
const latest = await this.readLatestVersion(pluginName, majorVersion);
|
|
117
|
+
if (!latest)
|
|
118
|
+
throw new Error(`No latest version found for plugin "${pluginName}" major "${majorVersion}".`);
|
|
119
|
+
const version = { version: latest, path: (0, semver_1.getVersionPrefix)(this.base, pluginName, latest) };
|
|
120
|
+
if (options?.includeSize)
|
|
173
121
|
version.totalSizeMB = await this.calculatePrefixSize(version.path);
|
|
174
|
-
}
|
|
175
122
|
return version;
|
|
176
123
|
}
|
|
177
|
-
// ============================================================
|
|
178
|
-
// listMinorVersions
|
|
179
|
-
// ============================================================
|
|
180
124
|
async listMinorVersions(pluginName, majorVersion, options) {
|
|
181
|
-
const includeSize = options?.includeSize ?? false;
|
|
182
125
|
const versions = [];
|
|
183
|
-
const pluginPrefix = (0, semver_1.getPluginPrefix)(pluginName);
|
|
126
|
+
const pluginPrefix = (0, semver_1.getPluginPrefix)(this.base, pluginName);
|
|
184
127
|
const result = await this.client.list({ prefix: pluginPrefix, delimiter: '/' }, {});
|
|
185
128
|
if (result.prefixes) {
|
|
186
|
-
for (const
|
|
187
|
-
const dirName =
|
|
188
|
-
.slice(pluginPrefix.length)
|
|
189
|
-
.replace(/\/$/, '');
|
|
129
|
+
for (const p of result.prefixes) {
|
|
130
|
+
const dirName = p.slice(pluginPrefix.length).replace(/\/$/, '');
|
|
190
131
|
if (!dirName)
|
|
191
132
|
continue;
|
|
192
|
-
|
|
193
|
-
if (major !== majorVersion)
|
|
133
|
+
if ((0, semver_1.extractMajorMinor)(dirName) !== majorVersion)
|
|
194
134
|
continue;
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
if (includeSize) {
|
|
200
|
-
version.totalSizeMB = await this.calculatePrefixSize(prefix);
|
|
201
|
-
}
|
|
202
|
-
versions.push(version);
|
|
135
|
+
const v = { version: dirName, path: p };
|
|
136
|
+
if (options?.includeSize)
|
|
137
|
+
v.totalSizeMB = await this.calculatePrefixSize(p);
|
|
138
|
+
versions.push(v);
|
|
203
139
|
}
|
|
204
140
|
}
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
return sorted.map(v => versionMap.get(v)).filter(Boolean);
|
|
141
|
+
const sorted = (0, semver_1.sortVersions)(versions.map(v => v.version), options?.sortOrder ?? 'desc');
|
|
142
|
+
const map = new Map(versions.map(v => [v.version, v]));
|
|
143
|
+
return sorted.map(v => map.get(v)).filter(Boolean);
|
|
209
144
|
}
|
|
210
|
-
// ============================================================
|
|
211
|
-
// listArtifacts
|
|
212
|
-
// ============================================================
|
|
213
145
|
async listArtifacts(pluginName, version, options) {
|
|
214
|
-
const includeSize = options?.includeSize ?? false;
|
|
215
146
|
const artifacts = [];
|
|
216
|
-
const versionPrefix = (0, semver_1.getVersionPrefix)(pluginName, version);
|
|
217
|
-
const result = await this.client.list({ prefix: versionPrefix
|
|
147
|
+
const versionPrefix = (0, semver_1.getVersionPrefix)(this.base, pluginName, version);
|
|
148
|
+
const result = await this.client.list({ prefix: versionPrefix }, {});
|
|
218
149
|
if (result.objects) {
|
|
219
150
|
for (const obj of result.objects) {
|
|
220
151
|
const fileName = obj.name.slice(versionPrefix.length);
|
|
221
152
|
if (!fileName)
|
|
222
153
|
continue;
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (includeSize && obj.size !== undefined) {
|
|
228
|
-
artifact.sizeMB = (0, format_1.bytesToMB)(obj.size);
|
|
229
|
-
}
|
|
230
|
-
artifacts.push(artifact);
|
|
154
|
+
const a = { name: fileName, path: obj.name };
|
|
155
|
+
if (options?.includeSize && obj.size !== undefined)
|
|
156
|
+
a.sizeMB = (0, format_1.bytesToMB)(obj.size);
|
|
157
|
+
artifacts.push(a);
|
|
231
158
|
}
|
|
232
159
|
}
|
|
233
160
|
return artifacts.sort((a, b) => a.name.localeCompare(b.name));
|
|
234
161
|
}
|
|
235
|
-
// ============================================================
|
|
236
|
-
// uploadArtifact
|
|
237
|
-
// ============================================================
|
|
238
162
|
async uploadArtifact(pluginName, version, artifactName, localFilePath) {
|
|
239
|
-
const objectName = (0, semver_1.getArtifactPath)(pluginName, version, artifactName);
|
|
240
|
-
// Upload the file
|
|
163
|
+
const objectName = (0, semver_1.getArtifactPath)(this.base, pluginName, version, artifactName);
|
|
241
164
|
await this.client.put(objectName, localFilePath);
|
|
242
|
-
// Update the version file tag
|
|
243
165
|
const major = (0, semver_1.extractMajorMinor)(version);
|
|
244
166
|
await this.updateLatestVersion(pluginName, major, version);
|
|
245
167
|
}
|
|
246
|
-
// ============================================================
|
|
247
|
-
// downloadArtifactByPath
|
|
248
|
-
// ============================================================
|
|
249
168
|
async downloadArtifactByPath(fullPath, localDir) {
|
|
250
169
|
await fs.mkdir(localDir, { recursive: true });
|
|
170
|
+
const result = await this.client.get(fullPath);
|
|
251
171
|
const fileName = fullPath.split('/').pop() || 'artifact';
|
|
252
|
-
|
|
253
|
-
await this.client.get(fullPath, localPath);
|
|
172
|
+
await fs.writeFile(path.join(localDir, fileName), result.content);
|
|
254
173
|
}
|
|
255
|
-
// ============================================================
|
|
256
|
-
// downloadArtifact
|
|
257
|
-
// ============================================================
|
|
258
174
|
async downloadArtifact(pluginName, version, fileName, localDir) {
|
|
259
|
-
|
|
260
|
-
|
|
175
|
+
return this.downloadArtifactByPath((0, semver_1.getArtifactPath)(this.base, pluginName, version, fileName), localDir);
|
|
176
|
+
}
|
|
177
|
+
async downloadVersion(pluginName, version, localDir) {
|
|
178
|
+
const artifacts = await this.listArtifacts(pluginName, version);
|
|
179
|
+
const downloaded = [];
|
|
180
|
+
for (const a of artifacts) {
|
|
181
|
+
await this.downloadArtifactByPath(a.path, localDir);
|
|
182
|
+
downloaded.push(a.name);
|
|
183
|
+
}
|
|
184
|
+
return downloaded;
|
|
261
185
|
}
|
|
262
|
-
// ============================================================
|
|
263
|
-
// Private helpers
|
|
264
|
-
// ============================================================
|
|
265
|
-
/**
|
|
266
|
-
* Calculate the total size in MB of all objects under a given prefix.
|
|
267
|
-
*/
|
|
268
186
|
async calculatePrefixSize(prefix) {
|
|
269
|
-
let
|
|
270
|
-
let nextMarker;
|
|
187
|
+
let bytes = 0, marker;
|
|
271
188
|
do {
|
|
272
|
-
const result = await this.client.list({
|
|
273
|
-
|
|
274
|
-
'max-keys': 1000,
|
|
275
|
-
marker: nextMarker,
|
|
276
|
-
}, {});
|
|
277
|
-
if (result.objects) {
|
|
189
|
+
const result = await this.client.list({ prefix, 'max-keys': 1000, marker }, {});
|
|
190
|
+
if (result.objects)
|
|
278
191
|
for (const obj of result.objects) {
|
|
279
|
-
if (obj.size)
|
|
280
|
-
|
|
281
|
-
}
|
|
192
|
+
if (obj.size)
|
|
193
|
+
bytes += obj.size;
|
|
282
194
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
return (0, format_1.bytesToMB)(totalBytes);
|
|
195
|
+
marker = result.nextMarker || undefined;
|
|
196
|
+
} while (marker);
|
|
197
|
+
return (0, format_1.bytesToMB)(bytes);
|
|
287
198
|
}
|
|
288
|
-
/**
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const filePath = (0, semver_1.getVersionFilePath)(pluginName, majorVersion);
|
|
199
|
+
/** Read latest version from tag, falling back to directory scanning. */
|
|
200
|
+
async readLatestVersion(pluginName, majorVersion) {
|
|
201
|
+
// Try version file tag first
|
|
202
|
+
const fp = (0, semver_1.getVersionFilePath)(this.base, pluginName, majorVersion);
|
|
293
203
|
try {
|
|
294
|
-
const tagging = await this.client.getObjectTagging(
|
|
295
|
-
|
|
204
|
+
const tagging = await this.client.getObjectTagging(fp);
|
|
205
|
+
if (tagging?.tag?.latestversion)
|
|
206
|
+
return tagging.tag.latestversion;
|
|
296
207
|
}
|
|
297
208
|
catch (err) {
|
|
298
|
-
if (err?.code
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
throw err;
|
|
209
|
+
if (err?.code !== 'NoSuchKey' && err?.status !== 404)
|
|
210
|
+
throw err;
|
|
302
211
|
}
|
|
212
|
+
// Fallback: scan directories
|
|
213
|
+
return this.scanLatest(pluginName, majorVersion);
|
|
214
|
+
}
|
|
215
|
+
/** Scan version directories to find the latest matching major. */
|
|
216
|
+
async scanLatest(pluginName, majorVersion) {
|
|
217
|
+
const pluginPrefix = (0, semver_1.getPluginPrefix)(this.base, pluginName);
|
|
218
|
+
const result = await this.client.list({ prefix: pluginPrefix, delimiter: '/' }, {});
|
|
219
|
+
if (!result.prefixes)
|
|
220
|
+
return null;
|
|
221
|
+
const versions = result.prefixes
|
|
222
|
+
.map(p => p.slice(pluginPrefix.length).replace(/\/$/, ''))
|
|
223
|
+
.filter(v => v && (0, semver_1.extractMajorMinor)(v) === majorVersion);
|
|
224
|
+
if (!versions.length)
|
|
225
|
+
return null;
|
|
226
|
+
versions.sort(semver_2.rcompare);
|
|
227
|
+
return versions[0];
|
|
303
228
|
}
|
|
304
|
-
/**
|
|
305
|
-
* Create or update a version file with the latestversion tag.
|
|
306
|
-
*/
|
|
307
229
|
async updateLatestVersion(pluginName, majorVersion, latestVersion) {
|
|
308
|
-
const
|
|
309
|
-
// Check if the version file exists
|
|
230
|
+
const fp = (0, semver_1.getVersionFilePath)(this.base, pluginName, majorVersion);
|
|
310
231
|
let exists = false;
|
|
311
232
|
try {
|
|
312
|
-
await this.client.head(
|
|
233
|
+
await this.client.head(fp);
|
|
313
234
|
exists = true;
|
|
314
235
|
}
|
|
315
236
|
catch (err) {
|
|
316
|
-
if (err?.code !== 'NoSuchKey' && err?.status !== 404)
|
|
237
|
+
if (err?.code !== 'NoSuchKey' && err?.status !== 404)
|
|
317
238
|
throw err;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
if (!exists) {
|
|
321
|
-
// Create the version file with version as content
|
|
322
|
-
await this.client.put(filePath, Buffer.from(latestVersion));
|
|
323
239
|
}
|
|
324
|
-
|
|
325
|
-
|
|
240
|
+
if (!exists)
|
|
241
|
+
await this.client.put(fp, Buffer.from(latestVersion));
|
|
242
|
+
await this.client.putObjectTagging(fp, { latestversion: latestVersion });
|
|
326
243
|
}
|
|
327
|
-
/**
|
|
328
|
-
* Compare two major version strings.
|
|
329
|
-
*/
|
|
330
244
|
compareMajorVersions(a, b) {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const numB = partsB[i] ?? 0;
|
|
336
|
-
if (numA !== numB)
|
|
337
|
-
return numA - numB;
|
|
245
|
+
const pa = a.split('.').map(Number), pb = b.split('.').map(Number);
|
|
246
|
+
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
|
|
247
|
+
if ((pa[i] ?? 0) !== (pb[i] ?? 0))
|
|
248
|
+
return (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
338
249
|
}
|
|
339
250
|
return 0;
|
|
340
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oss-provider.js","sourceRoot":"","sources":["../../src/providers/oss-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,2CAA6B;AAC7B,sDAA0B;AAC1B,yDAAqD;AAUrD,4CAOyB;AACzB,4CAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"oss-provider.js","sourceRoot":"","sources":["../../src/providers/oss-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,2CAA6B;AAC7B,sDAA0B;AAC1B,yDAAqD;AAUrD,4CAOyB;AACzB,mCAAkC;AAClC,4CAA4C;AAE5C,MAAa,WAAY,SAAQ,kCAAe;IACtC,MAAM,CAAM;IACZ,IAAI,CAAS;IAErB,YAAY,MAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG;YAAE,MAAM,IA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C,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACxE,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AA3MD,kCA2MC"}
|
|
@@ -46,5 +46,15 @@ export declare abstract class StorageProvider {
|
|
|
46
46
|
* The full path is constructed as plugin_artifacts/{plugin}/{version}/{fileName}.
|
|
47
47
|
*/
|
|
48
48
|
abstract downloadArtifact(pluginName: string, version: string, fileName: string, localDir: string): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Download all artifacts for a specific plugin version.
|
|
51
|
+
* Lists all artifacts under the version directory and downloads each one.
|
|
52
|
+
*
|
|
53
|
+
* @param pluginName - The plugin name.
|
|
54
|
+
* @param version - The full version (e.g., "1.0.5").
|
|
55
|
+
* @param localDir - The local directory to save files to.
|
|
56
|
+
* @returns Array of downloaded file names.
|
|
57
|
+
*/
|
|
58
|
+
abstract downloadVersion(pluginName: string, version: string, localDir: string): Promise<string[]>;
|
|
49
59
|
}
|
|
50
60
|
//# sourceMappingURL=storage-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-provider.d.ts","sourceRoot":"","sources":["../../src/providers/storage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,8BAAsB,eAAe;IACnC;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAEhF;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CACxB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CACvB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,WAAW,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,iBAAiB,CACxB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,WAAW,EAAE,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,aAAa,CACpB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAClC,OAAO,CAAC,YAAY,EAAE,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,cAAc,CACrB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAEhB;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"storage-provider.d.ts","sourceRoot":"","sources":["../../src/providers/storage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EACjB,MAAM,U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AAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAEhB;;;;;;;;OAQG;IACH,QAAQ,CAAC,eAAe,CACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,EAAE,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-provider.js","sourceRoot":"","sources":["../../src/providers/storage-provider.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,MAAsB,eAAe;
|
|
1
|
+
{"version":3,"file":"storage-provider.js","sourceRoot":"","sources":["../../src/providers/storage-provider.ts"],"names":[],"mappings":";;;AASA;;;GAGG;AACH,MAAsB,eAAe;CAyFpC;AAzFD,0CAyFC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
export type StorageType = 'az' | 'oss';
|
|
2
2
|
export interface AzureConfig {
|
|
3
3
|
sasUrl: string;
|
|
4
|
+
/** Storage prefix path. Default: '' (bucket root). Use 'plugin_artifacts/' for the Wyn convention. */
|
|
5
|
+
basePrefix?: string;
|
|
4
6
|
}
|
|
5
7
|
export interface OSSConfig {
|
|
6
8
|
keyId: string;
|
|
7
9
|
key: string;
|
|
8
10
|
bucket?: string;
|
|
9
11
|
region?: string;
|
|
12
|
+
/** Storage prefix path. Default: '' (bucket root). Use 'plugin_artifacts/' for the Wyn convention. */
|
|
13
|
+
basePrefix?: string;
|
|
10
14
|
}
|
|
11
15
|
export type StorageConfig = AzureConfig | OSSConfig;
|
|
12
16
|
export interface CLIConfig {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;AAMvC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;
|
|
1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C3B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
package/dist/utils/semver.d.ts
CHANGED
|
@@ -1,46 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compare two version strings following semver rules.
|
|
3
|
-
* Returns negative if a < b, zero if a == b, positive if a > b.
|
|
4
|
-
* Supports pre-release tags (e.g., 1.0.5-beta < 1.0.5).
|
|
5
3
|
*/
|
|
6
4
|
export declare function compareVersions(a: string, b: string): number;
|
|
7
5
|
/**
|
|
8
|
-
* Sort an array of version strings by semver rules.
|
|
9
|
-
* Default order is descending (newest first).
|
|
6
|
+
* Sort an array of version strings by semver rules. Default: descending.
|
|
10
7
|
*/
|
|
11
8
|
export declare function sortVersions(versions: string[], order?: 'asc' | 'desc'): string[];
|
|
12
9
|
/**
|
|
13
10
|
* Extract the major.minor portion from a full semver string.
|
|
14
|
-
* e.g. "1.0.5" → "1.0", "
|
|
11
|
+
* e.g. "1.0.5" → "1.0", "0.0.3" → "dev"
|
|
15
12
|
*/
|
|
16
13
|
export declare function extractMajorMinor(version: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Check if a version is a dev version (major === 0 and minor === 0).
|
|
19
|
-
*/
|
|
20
14
|
export declare function isDevVersion(version: string): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Get the version file name for a given major version string.
|
|
23
|
-
* "1.0" → "version1.0.txt", "dev" → "versiondev.txt"
|
|
24
|
-
*/
|
|
25
15
|
export declare function getVersionFileName(majorVersion: string): string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export declare function getVersionFilePath(pluginName: string, majorVersion: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Build the directory prefix for a plugin.
|
|
33
|
-
* e.g. "plugin_artifacts/myPlugin/"
|
|
34
|
-
*/
|
|
35
|
-
export declare function getPluginPrefix(pluginName: string): string;
|
|
36
|
-
/**
|
|
37
|
-
* Build the directory prefix for a specific version of a plugin.
|
|
38
|
-
* e.g. "plugin_artifacts/myPlugin/1.0.5/"
|
|
39
|
-
*/
|
|
40
|
-
export declare function getVersionPrefix(pluginName: string, version: string): string;
|
|
41
|
-
/**
|
|
42
|
-
* Build the full path for a specific artifact.
|
|
43
|
-
* e.g. "plugin_artifacts/myPlugin/1.0.5/foo.zip"
|
|
44
|
-
*/
|
|
45
|
-
export declare function getArtifactPath(pluginName: string, version: string, fileName: string): string;
|
|
16
|
+
export declare function getVersionFilePath(base: string, pluginName: string, majorVersion: string): string;
|
|
17
|
+
export declare function getPluginPrefix(base: string, pluginName: string): string;
|
|
18
|
+
export declare function getVersionPrefix(base: string, pluginName: string, version: string): string;
|
|
19
|
+
export declare function getArtifactPath(base: string, pluginName: string, version: string, fileName: string): string;
|
|
46
20
|
//# sourceMappingURL=semver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../src/utils/semver.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../src/utils/semver.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,GAAE,KAAK,GAAG,MAAe,GAC7B,MAAM,EAAE,CAEV;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAczD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAIrD;AAMD,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE/D;AAUD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEjG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1F;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3G"}
|