Skip to content

Commit

Permalink
v37 Release Housekeeping (#3222)
Browse files Browse the repository at this point in the history
* Updating all-contributors-cli version and packages
* Explicitly export types and fix conflict
* Fixing position argument formatting for oddly cased resources in the cli export
  • Loading branch information
jdalrymple authored Apr 27, 2023
1 parent 823c36b commit 947867b
Show file tree
Hide file tree
Showing 16 changed files with 1,061 additions and 1,230 deletions.
516 changes: 258 additions & 258 deletions .yarn/releases/yarn-3.4.1.cjs → .yarn/releases/yarn-3.5.0.cjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
yarnPath: .yarn/releases/yarn-3.5.0.cjs
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.4.1.cjs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- [Sponsors](#sponsors)

## Features
- **Complete** - All features of Gitlab's exposed APIs are covered up to version [15.7]().
- **Complete** - All features of Gitlab's exposed APIs are covered up to version [16.0](https://docs.gitlab.com/15.11/ee/api/api_resources.html).
- **Universal** - Works in all modern browsers, [Node.js](https://nodejs.org/), and [Deno](https://deno.land/) and supports [CLI](https://www.npmjs.com/package/@gitbeaker/cli) usage.
- **Tested** - All libraries have > 80% test coverage.
- **Typed** - All libraries have extensive TypeScript declarations.
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-extended": "^3.2.4",
"jest-junit": "^15.0.0",
"jest-junit": "^16.0.0",
"lerna": "^6.6.1",
"lint-staged": "^13.2.1",
"nx": "15.8.6",
"lint-staged": "^13.2.2",
"nx": "15.9.2",
"prettier": "^2.8.8",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
},
"packageManager": "yarn@3.4.1"
"packageManager": "yarn@3.5.0"
}
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
"dependencies": {
"@gitbeaker/core": "^37.0.0",
"@gitbeaker/rest": "^37.0.0",
"chalk": "4.1.2",
"chalk": "5.2.0",
"sywac": "^1.3.0",
"xcase": "^2.0.1"
},
"devDependencies": {
"tsup": "^6.7.0",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
}
}
11 changes: 8 additions & 3 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,16 @@ function param(value: string): string {
'DORA4',
'LDAP',
'CICD',
'SAML',
'SCIM',
'PyPI',
];

const ex = exceptions.find((e) => value.includes(e));

if (ex) cleaned = cleaned.replace(ex, ex.charAt(0).toUpperCase() + ex.slice(1).toLowerCase());
exceptions
.filter((e) => value.includes(e))
.forEach((ex) => {
cleaned = cleaned.replace(ex, ex.charAt(0).toUpperCase() + ex.slice(1).toLowerCase());
});

// Decamelize
const decamelized = decamelize(cleaned, '-');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"get-param-names": "github:jdalrymple/get-param-names#1-improve-functionality",
"tsup": "^6.7.0",
"tsx": "^3.12.6",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
}
}
17 changes: 17 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
/* ---------------- Resources --------------- */
export * from './resources';
export type {
UserAgentDetailSchema,
IsForm,
Sudo,
AsStream,
ShowExpanded,
PaginationTypes,
BaseRequestOptions,
KeysetPaginationRequestOptions,
OffsetPaginationRequestOptions,
BasePaginationRequestOptions,
OffsetPagination,
KeysetPagination,
ExpandedResponse,
PaginatedResponse,
GitlabAPIResponse,
} from './infrastructure';
42 changes: 6 additions & 36 deletions packages/core/src/resources/ProjectRelationsExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,11 @@ import { BaseResource } from '@gitbeaker/requester-utils';
import { RequestHelper, endpoint } from '../infrastructure';
import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';

export interface ExportStatusSchema extends Record<string, unknown> {
id: number;
description: string;
name: string;
name_with_namespace: string;
path: string;
path_with_namespace: string;
created_at: string;
export_status: string;
_links: {
api_url: string;
web_url: string;
};
}

export interface FailedRelationSchema {
id: number;
created_at: string;
exception_class: string;
exception_message: string;
source: string;
relation_name: string;
}

export interface ImportStatusSchema extends Record<string, unknown> {
id: number;
description: string;
name: string;
name_with_namespace: string;
path: string;
path_with_namespace: string;
created_at: string;
import_status: string;
correlation_id: string;
failed_relations?: FailedRelationSchema[];
export interface RelationsExportStatusSchema extends Record<string, unknown> {
relation: string;
status: number;
error?: string;
updated_at: string;
}

export class ProjectRelationsExport<C extends boolean = false> extends BaseResource<C> {
Expand All @@ -56,7 +26,7 @@ export class ProjectRelationsExport<C extends boolean = false> extends BaseResou
}

showExportStatus(projectId: string | number, options?: Sudo) {
return RequestHelper.get<ExportStatusSchema>()(
return RequestHelper.get<RelationsExportStatusSchema>()(
this,
endpoint`projects/${projectId}/export_relations/status`,
options,
Expand Down
Loading

0 comments on commit 947867b

Please sign in to comment.