@theholocron/holocron-plugin-axiom 5.0.0-alpha.477 → 5.0.0-alpha.479

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 CHANGED
@@ -42,7 +42,7 @@ export declare class AxiomLogs implements Logs {
42
42
  dataset: string;
43
43
  }>;
44
44
  readDataset(name: string): Promise<LogsDataset>;
45
- checkToken(): Promise<{
45
+ checkToken(dataset?: string): Promise<{
46
46
  ok: boolean;
47
47
  reason?: string;
48
48
  }>;
package/dist/index.mjs CHANGED
@@ -101,7 +101,7 @@ const tokens = [{
101
101
  expect: EXPECTED
102
102
  }];
103
103
  // src/capabilities/logs.ts
104
- /** A dataset that does not exist: asking for it tells a token Axiom accepts (404) from one it refuses (401). */
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 && err.status === 404) return { exists: false };
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.477",
3
+ "version": "5.0.0-alpha.479",
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",
@@ -44,18 +44,18 @@
44
44
  "typescript": "^5.9.3",
45
45
  "vitest": "^5.1.0",
46
46
  "@theholocron/eslint-config": "^8.9.0-alpha.20",
47
- "@theholocron/cli": "5.0.0-alpha.477",
48
- "@theholocron/axiom-client": "^1.58.0-alpha.40",
49
- "@theholocron/misc-utils": "^1.17.0-alpha.5",
47
+ "@theholocron/cli": "5.0.0-alpha.479",
50
48
  "@theholocron/http-client": "^1.58.0-alpha.40",
51
49
  "@theholocron/tsconfig": "^8.9.0-alpha.20",
50
+ "@theholocron/tsdown-config": "^8.9.0-alpha.20",
51
+ "@theholocron/misc-utils": "^1.17.0-alpha.5",
52
52
  "@theholocron/vitest-config": "^8.9.0-alpha.20",
53
- "@theholocron/tsdown-config": "^8.9.0-alpha.20"
53
+ "@theholocron/axiom-client": "^1.58.0-alpha.40"
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.477"
58
+ "@theholocron/cli": "5.0.0-alpha.479"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=22"