@theholocron/holocron-plugin-axiom 5.0.0-alpha.476 → 5.0.0-alpha.478
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 -1
- package/dist/index.mjs +10 -4
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -101,7 +101,7 @@ const tokens = [{
|
|
|
101
101
|
expect: EXPECTED
|
|
102
102
|
}];
|
|
103
103
|
// src/capabilities/logs.ts
|
|
104
|
-
/**
|
|
104
|
+
/** The dataset asked for when the caller names none. It does not exist: asking for it tells a token Axiom accepts (404) from one it refuses (401). */
|
|
105
105
|
const PROBE_DATASET = "holocron-token-check";
|
|
106
106
|
/** The `logs` capability for Axiom: checks a dataset is reachable and creates datasets that are missing. */
|
|
107
107
|
var AxiomLogs = class {
|
|
@@ -143,13 +143,19 @@ var AxiomLogs = class {
|
|
|
143
143
|
...days === void 0 ? {} : { retentionDays: days }
|
|
144
144
|
};
|
|
145
145
|
} catch (err) {
|
|
146
|
-
if (err instanceof ProviderApiError
|
|
146
|
+
if (err instanceof ProviderApiError) {
|
|
147
|
+
if (err.status === 404) return { exists: false };
|
|
148
|
+
if (err.status === 403) return {
|
|
149
|
+
exists: false,
|
|
150
|
+
forbidden: true
|
|
151
|
+
};
|
|
152
|
+
}
|
|
147
153
|
throw err;
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
|
-
async checkToken() {
|
|
156
|
+
async checkToken(dataset) {
|
|
151
157
|
try {
|
|
152
|
-
await this.client().datasets.get(PROBE_DATASET);
|
|
158
|
+
await this.client().datasets.get(dataset ?? PROBE_DATASET);
|
|
153
159
|
return { ok: true };
|
|
154
160
|
} catch (err) {
|
|
155
161
|
if (err instanceof ProviderApiError) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-axiom",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.478",
|
|
4
4
|
"description": "Holocron plugin for Axiom. Implements the logs capability against Axiom's REST API — dataset provisioning and connectivity checks, plus verifyToken + AUTH_HINT for `holocron auth`.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"axiom",
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"tsx": "4.23.15",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
45
|
"vitest": "^5.1.0",
|
|
46
|
-
"@theholocron/cli": "5.0.0-alpha.476",
|
|
47
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.20",
|
|
48
|
-
"@theholocron/http-client": "^1.58.0-alpha.40",
|
|
49
46
|
"@theholocron/axiom-client": "^1.58.0-alpha.40",
|
|
47
|
+
"@theholocron/cli": "5.0.0-alpha.478",
|
|
48
|
+
"@theholocron/http-client": "^1.58.0-alpha.40",
|
|
49
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.20",
|
|
50
50
|
"@theholocron/misc-utils": "^1.17.0-alpha.5",
|
|
51
51
|
"@theholocron/tsconfig": "^8.9.0-alpha.20",
|
|
52
|
-
"@theholocron/
|
|
53
|
-
"@theholocron/
|
|
52
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.20",
|
|
53
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.20"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@theholocron/axiom-client": "^1.43.1",
|
|
57
57
|
"@theholocron/misc-utils": "^1.16.0",
|
|
58
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
58
|
+
"@theholocron/cli": "5.0.0-alpha.478"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22"
|