@theholocron/holocron-plugin-sentry 5.0.0-alpha.18 → 5.0.0-alpha.181
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.d.mts +3 -12
- package/dist/index.mjs +4 -2
- package/package.json +15 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthError, Errors, ResolveTokenInput } from "@theholocron/cli";
|
|
1
|
+
import { AuthError, Errors, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
|
|
2
2
|
import { SentryClient, SentryClientOptions, createSentryClient } from "@theholocron/sentry-client";
|
|
3
3
|
//#region src/auth.d.ts
|
|
4
4
|
declare const resolveToken: (input?: ResolveTokenInput) => string;
|
|
@@ -22,7 +22,7 @@ declare class SentryErrors implements Errors {
|
|
|
22
22
|
}>;
|
|
23
23
|
whoami(): Promise<{
|
|
24
24
|
org: string;
|
|
25
|
-
}>;
|
|
25
|
+
} | null>;
|
|
26
26
|
ensureProject(input: {
|
|
27
27
|
name: string;
|
|
28
28
|
platform?: string;
|
|
@@ -39,20 +39,11 @@ declare class SentryErrors implements Errors {
|
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/verify-token.d.ts
|
|
42
|
-
interface VerifyTokenSuccess {
|
|
43
|
-
ok: true;
|
|
44
|
-
subject: string;
|
|
45
|
-
}
|
|
46
|
-
interface VerifyTokenFailure {
|
|
47
|
-
ok: false;
|
|
48
|
-
message: string;
|
|
49
|
-
}
|
|
50
|
-
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
51
42
|
interface VerifyTokenOptions {
|
|
52
43
|
baseUrl?: string;
|
|
53
44
|
fetch?: typeof fetch;
|
|
54
45
|
}
|
|
55
|
-
declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
|
|
46
|
+
declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
|
|
56
47
|
//#endregion
|
|
57
48
|
//#region src/index.d.ts
|
|
58
49
|
interface SentryPluginOptions extends ResolveTokenInput, SentryErrorsOptions {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
|
|
2
2
|
import { createSentryClient } from "@theholocron/sentry-client";
|
|
3
|
+
import { errorMessage } from "@theholocron/misc-utils";
|
|
3
4
|
//#region src/auth.ts
|
|
4
5
|
const resolveToken = createResolveToken({
|
|
5
6
|
envName: "HOLOCRON_SENTRY_TOKEN",
|
|
@@ -25,7 +26,8 @@ var SentryErrors = class {
|
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
async whoami() {
|
|
28
|
-
|
|
29
|
+
if (!this.opts.org) return null;
|
|
30
|
+
return { org: (await this.client().auth.getOrg(this.opts.org)).slug };
|
|
29
31
|
}
|
|
30
32
|
async ensureProject(input) {
|
|
31
33
|
const org = this.requireOrg();
|
|
@@ -84,7 +86,7 @@ async function verifyToken(token, opts = {}) {
|
|
|
84
86
|
} catch (err) {
|
|
85
87
|
return {
|
|
86
88
|
ok: false,
|
|
87
|
-
message:
|
|
89
|
+
message: errorMessage(err)
|
|
88
90
|
};
|
|
89
91
|
}
|
|
90
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-sentry",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.181",
|
|
4
4
|
"description": "Holocron plugin for Sentry. Implements the errors capability against Sentry's management API — project provisioning and DSN retrieval.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"errors",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"plugin",
|
|
9
9
|
"sentry"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://github.com/theholocron/holocron/tree/main/
|
|
11
|
+
"homepage": "https://github.com/theholocron/holocron/tree/main/plugins/holocron-plugin-sentry#readme",
|
|
12
12
|
"bugs": "https://github.com/theholocron/holocron/issues",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git+https://github.com/theholocron/holocron.git",
|
|
16
|
-
"directory": "
|
|
16
|
+
"directory": "plugins/holocron-plugin-sentry"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Newton Koumantzelis",
|
|
@@ -30,12 +30,13 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@theholocron/eslint-config": "^8.
|
|
34
|
-
"@theholocron/http-client": "^1.
|
|
35
|
-
"@theholocron/
|
|
36
|
-
"@theholocron/
|
|
37
|
-
"@theholocron/
|
|
38
|
-
"@theholocron/
|
|
33
|
+
"@theholocron/eslint-config": "^8.8.2",
|
|
34
|
+
"@theholocron/http-client": "^1.43.1",
|
|
35
|
+
"@theholocron/misc-utils": "^1.16.0",
|
|
36
|
+
"@theholocron/sentry-client": "^1.43.1",
|
|
37
|
+
"@theholocron/tsconfig": "^8.8.2",
|
|
38
|
+
"@theholocron/tsdown-config": "^8.8.2",
|
|
39
|
+
"@theholocron/vitest-config": "^8.8.2",
|
|
39
40
|
"@types/node": "^26",
|
|
40
41
|
"@vitest/coverage-v8": "^4.1.11",
|
|
41
42
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
@@ -44,14 +45,15 @@
|
|
|
44
45
|
"eslint-plugin-n": "^18.3.0",
|
|
45
46
|
"globals": "^17.11.0",
|
|
46
47
|
"tsdown": "^0.22.14",
|
|
47
|
-
"tsx": "4.23.
|
|
48
|
+
"tsx": "4.23.15",
|
|
48
49
|
"typescript": "^5.9.3",
|
|
49
50
|
"vitest": "^4.1.11",
|
|
50
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
51
|
+
"@theholocron/cli": "5.0.0-alpha.181"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"@theholocron/
|
|
54
|
-
"@theholocron/
|
|
54
|
+
"@theholocron/misc-utils": "^1.16.0",
|
|
55
|
+
"@theholocron/sentry-client": "^1.43.1",
|
|
56
|
+
"@theholocron/cli": "5.0.0-alpha.181"
|
|
55
57
|
},
|
|
56
58
|
"peerDependenciesMeta": {
|
|
57
59
|
"@theholocron/sentry-client": {}
|