@gitbeaker/core 34.7.0 → 35.0.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 +11 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/map.json +1 -1
- package/dist/types/resources/Lint.d.ts +4 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2676,8 +2676,19 @@ var Lint = /** @class */ (function (_super) {
|
|
|
2676
2676
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
2677
2677
|
}
|
|
2678
2678
|
Lint.prototype.lint = function (content, options) {
|
|
2679
|
+
// Perform CI file linting without context.
|
|
2680
|
+
// See https://docs.gitlab.com/ee/api/lint.html#validate-the-ci-yaml-configuration
|
|
2681
|
+
// This API doesn't work for CI files that contain `local` includes. Use `lintWithNamespace` instead.
|
|
2679
2682
|
return RequestHelper.post()(this, 'ci/lint', __assign({ content: content }, options));
|
|
2680
2683
|
};
|
|
2684
|
+
// TODO: Figure out a better way of writing this to not be limited by the typing.
|
|
2685
|
+
Lint.prototype.lintWithNamespace = function (projectId, content, options) {
|
|
2686
|
+
// Perform CI file linting in the context of a specific project namespace.
|
|
2687
|
+
// See https://docs.gitlab.com/ee/api/lint.html#validate-a-ci-yaml-configuration-with-a-namespace
|
|
2688
|
+
// This API is useful when the CI file being linted has `local` includes, which requires project
|
|
2689
|
+
// context to be understood.
|
|
2690
|
+
return RequestHelper.post()(this, "projects/".concat(projectId, "/ci/lint"), __assign({ content: content }, options));
|
|
2691
|
+
};
|
|
2681
2692
|
return Lint;
|
|
2682
2693
|
}(requesterUtils.BaseResource));
|
|
2683
2694
|
|