@gitbeaker/core 34.5.0 → 34.6.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/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { parse } from 'li';
|
|
|
3
3
|
import { parseUrl } from 'query-string';
|
|
4
4
|
import { camelizeKeys } from 'xcase';
|
|
5
5
|
import { BaseResource } from '@gitbeaker/requester-utils';
|
|
6
|
-
import
|
|
6
|
+
import * as Mime from 'mime/lite';
|
|
7
7
|
|
|
8
8
|
/*! *****************************************************************************
|
|
9
9
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1762,7 +1762,7 @@ var PackageRegistry = /** @class */ (function (_super) {
|
|
|
1762
1762
|
var pId = encodeURIComponent(projectId);
|
|
1763
1763
|
var meta = { filename: filename, contentType: contentType };
|
|
1764
1764
|
if (!meta.contentType)
|
|
1765
|
-
meta.contentType =
|
|
1765
|
+
meta.contentType = Mime.getType(meta.filename) || undefined;
|
|
1766
1766
|
return RequestHelper.put()(this, "projects/" + pId + "/packages/generic/" + packageName + "/" + packageVersion + "/" + filename, __assign({ isForm: true, file: [content, meta] }, options));
|
|
1767
1767
|
};
|
|
1768
1768
|
PackageRegistry.prototype.download = function (projectId, packageName, packageVersion, filename, options) {
|
|
@@ -1873,7 +1873,7 @@ var ProjectImportExport = /** @class */ (function (_super) {
|
|
|
1873
1873
|
var metadata = _a.metadata, options = __rest(_a, ["metadata"]);
|
|
1874
1874
|
var meta = __assign(__assign({}, defaultMetadata), metadata);
|
|
1875
1875
|
if (!meta.contentType)
|
|
1876
|
-
meta.contentType =
|
|
1876
|
+
meta.contentType = Mime.getType(meta.filename) || undefined;
|
|
1877
1877
|
return RequestHelper.post()(this, 'projects/import', __assign(__assign({ isForm: true }, options), { file: [content, meta], path: path }));
|
|
1878
1878
|
};
|
|
1879
1879
|
ProjectImportExport.prototype.importStatus = function (projectId, options) {
|
|
@@ -1959,7 +1959,7 @@ var Projects = /** @class */ (function (_super) {
|
|
|
1959
1959
|
var metadata = _a.metadata, options = __rest(_a, ["metadata"]);
|
|
1960
1960
|
var meta = __assign(__assign({}, defaultMetadata), metadata);
|
|
1961
1961
|
if (!meta.contentType)
|
|
1962
|
-
meta.contentType =
|
|
1962
|
+
meta.contentType = Mime.getType(meta.filename) || undefined;
|
|
1963
1963
|
return RequestHelper.post()(this, endpoint(templateObject_16 || (templateObject_16 = __makeTemplateObject(["projects/", "/uploads"], ["projects/", "/uploads"])), projectId), __assign({ isForm: true, file: [content, meta] }, options));
|
|
1964
1964
|
};
|
|
1965
1965
|
return Projects;
|