@theholocron/holocron-plugin-sentry 5.0.0-alpha.560 → 5.0.0-alpha.562
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 +1 -0
- package/dist/index.mjs +18 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -104,6 +104,7 @@ export declare function createPlugin(options: SentryPluginOptions): {
|
|
|
104
104
|
token: import("@theholocron/cli").Probe;
|
|
105
105
|
connection: import("@theholocron/cli").Probe;
|
|
106
106
|
};
|
|
107
|
+
whoami: import("@theholocron/cli").ProviderAction;
|
|
107
108
|
capabilities: {
|
|
108
109
|
errors: () => Errors;
|
|
109
110
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthError, ProviderApiError, connectionProbe, createFeatureResolver, createResolveToken, tokenExpectations } from "@theholocron/cli";
|
|
1
|
+
import { AuthError, ProviderApiError, connectionProbe, createFeatureResolver, createResolveToken, tokenExpectations, whoamiAction } from "@theholocron/cli";
|
|
2
2
|
import { createEnvLookup, holocronEnv } from "@theholocron/env-utils/lookup";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { errorMessage } from "@theholocron/misc-utils";
|
|
@@ -917,6 +917,8 @@ function errors(ctx) {
|
|
|
917
917
|
team: ctx.options.team
|
|
918
918
|
}, ctx.relayClient);
|
|
919
919
|
}
|
|
920
|
+
/** The environment variable of the token `whoami` reports on. */
|
|
921
|
+
const GENERAL_TOKEN = "HOLOCRON_SENTRY_TOKEN";
|
|
920
922
|
/** Creates the Sentry plugin: its probes, a `connection` probe and the `errors` capability. */
|
|
921
923
|
function createPlugin(options) {
|
|
922
924
|
const ctx = createContext(options);
|
|
@@ -944,6 +946,21 @@ function createPlugin(options) {
|
|
|
944
946
|
})
|
|
945
947
|
})
|
|
946
948
|
},
|
|
949
|
+
whoami: whoamiAction({
|
|
950
|
+
provider: "sentry",
|
|
951
|
+
token: () => resolveToken(options),
|
|
952
|
+
verify: async (token) => {
|
|
953
|
+
const result = await verifyToken(token, {
|
|
954
|
+
baseUrl: options.baseUrl,
|
|
955
|
+
fetch: options.fetch
|
|
956
|
+
});
|
|
957
|
+
return result.ok ? {
|
|
958
|
+
...result,
|
|
959
|
+
subject: `${result.subject} (the general token, ${GENERAL_TOKEN})`
|
|
960
|
+
} : result;
|
|
961
|
+
},
|
|
962
|
+
tokens
|
|
963
|
+
}),
|
|
947
964
|
capabilities: { errors: () => errors(ctx) }
|
|
948
965
|
};
|
|
949
966
|
}
|
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.562",
|
|
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",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"tsx": "4.23.15",
|
|
45
45
|
"typescript": "^6.0.3",
|
|
46
46
|
"vitest": "^5.1.1",
|
|
47
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
47
|
+
"@theholocron/cli": "5.0.0-alpha.562",
|
|
48
48
|
"@theholocron/eslint-config": "^8.9.0-alpha.24",
|
|
49
|
-
"@theholocron/http-client": "^1.58.0-alpha.
|
|
49
|
+
"@theholocron/http-client": "^1.58.0-alpha.62",
|
|
50
50
|
"@theholocron/misc-utils": "^1.17.0-alpha.8",
|
|
51
|
-
"@theholocron/sentry-client": "^1.58.0-alpha.
|
|
51
|
+
"@theholocron/sentry-client": "^1.58.0-alpha.62",
|
|
52
52
|
"@theholocron/tsconfig": "^8.9.0-alpha.24",
|
|
53
53
|
"@theholocron/tsdown-config": "^8.9.0-alpha.24",
|
|
54
54
|
"@theholocron/vitest-config": "^8.9.0-alpha.24"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@theholocron/misc-utils": "^1.16.0",
|
|
58
58
|
"@theholocron/sentry-client": "^1.56.0",
|
|
59
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
59
|
+
"@theholocron/cli": "5.0.0-alpha.562"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"@theholocron/sentry-client": {}
|