Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 48d74d1

Browse files
🏗️ Add entry point for cloud and server (#10)
* 🏗️ Add entry point for cloud and server * 📝 Add entrypoint in README.md
1 parent 9341c21 commit 48d74d1

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ pnpm i @coderabbitai/bitbucket
1818
### Cloud
1919

2020
```ts
21-
import { createBitbucketCloudClient, toBase64 } from "@coderabbitai/bitbucket"
21+
import { createBitbucketCloudClient } from "@coderabbitai/bitbucket/cloud"
22+
import { toBase64 } from "@coderabbitai/bitbucket"
2223
import {
2324
BITBUCKET_CLOUD_APP_PASSWORD,
2425
BITBUCKET_CLOUD_URL,
@@ -38,7 +39,7 @@ const client = createBitbucketCloudClient({
3839
### Server
3940

4041
```ts
41-
import { createBitbucketServerClient } from "@coderabbitai/bitbucket"
42+
import { createBitbucketServerClient } from "@coderabbitai/bitbucket/server"
4243
import { BITBUCKET_SERVER_TOKEN, BITBUCKET_SERVER_URL } from "./env.js"
4344

4445
const server = createBitbucketServerClient({

‎package.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@
7373
".": {
7474
"types": "./dist/index.d.ts",
7575
"default": "./dist/index.js"
76+
},
77+
"./cloud": {
78+
"types": "./dist/cloud/index.d.ts",
79+
"default": "./dist/cloud/index.js"
80+
},
81+
"./server": {
82+
"types": "./dist/server/index.d.ts",
83+
"default": "./dist/server/index.js"
7684
}
7785
},
7886
"types": "dist/index.d.ts",

‎src/cloud/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from "./client.js"
2-
export type * ascloudfrom "./openapi/index.js"
2+
export type * from "./openapi/index.js"

‎src/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from "./base64.js"
2-
export * from "./cloud/index.js"
3-
export * from "./server/index.js"
2+
export * ascloudfrom "./cloud/index.js"
3+
export * asserverfrom "./server/index.js"

‎tests/cloud/client.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { createBitbucketCloudClient, toBase64 } from "../../src/index.js"
1+
import { createBitbucketCloudClient } from "../../src/cloud/index.js"
2+
import { toBase64 } from "../../src/index.js"
23
import {
34
BITBUCKET_CLOUD_APP_PASSWORD,
45
BITBUCKET_CLOUD_URL,
56
BITBUCKET_CLOUD_USERNAME,
67
} from "../env.js"
78

89
const basic = toBase64(
9-
BITBUCKET_CLOUD_USERNAME+":"+BITBUCKET_CLOUD_APP_PASSWORD,
10+
`${BITBUCKET_CLOUD_USERNAME}:${BITBUCKET_CLOUD_APP_PASSWORD}`,
1011
)
1112

1213
export const client = createBitbucketCloudClient({

‎tests/server/client.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createBitbucketServerClient } from "../../src/index.js"
1+
import { createBitbucketServerClient } from "../../src/server/index.js"
22
import { BITBUCKET_SERVER_TOKEN, BITBUCKET_SERVER_URL } from "../env.js"
33

44
export const client = createBitbucketServerClient({

‎typedoc.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"$schema": "https://typedoc.org/schema.json",
3-
"entryPoints": ["./src/index.ts"],
3+
"entryPoints": [
4+
"./src/index.ts",
5+
"./src/cloud/index.ts",
6+
"./src/server/index.ts"
7+
],
48
"highlightLanguages": ["ini", "sh", "ts"]
59
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /