@theholocron/holocron-plugin-axiom 5.0.0-alpha.245 → 5.0.0-alpha.247

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
@@ -1,9 +1,6 @@
1
1
  import { AuthError, Logs, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { AxiomClient, AxiomClientOptions, AxiomDataset, AxiomUser, CreateAxiomDatasetInput, createAxiomClient } from "@theholocron/axiom-client";
3
- //#region src/auth.d.ts
4
- declare const resolveToken: (input?: ResolveTokenInput) => string;
5
- //#endregion
6
- //#region src/capabilities/logs.d.ts
3
+ export declare const resolveToken: (input?: ResolveTokenInput) => string;
7
4
  interface AxiomLogsOptions {
8
5
  /**
9
6
  * Target dataset, resolved from `HOLOCRON_AXIOM_DATASET` /
@@ -12,7 +9,7 @@ interface AxiomLogsOptions {
12
9
  */
13
10
  dataset?: string;
14
11
  }
15
- declare class AxiomLogs implements Logs {
12
+ export declare class AxiomLogs implements Logs {
16
13
  private readonly client;
17
14
  private readonly opts;
18
15
  readonly key: "logs";
@@ -34,22 +31,18 @@ declare class AxiomLogs implements Logs {
34
31
  alreadyExists: boolean;
35
32
  }>;
36
33
  }
37
- //#endregion
38
- //#region src/verify-token.d.ts
39
34
  interface VerifyTokenOptions {
40
35
  baseUrl?: string;
41
36
  fetch?: typeof fetch;
42
37
  }
43
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
44
- //#endregion
45
- //#region src/index.d.ts
46
- interface AxiomPluginOptions extends ResolveTokenInput, AxiomLogsOptions {
38
+ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
39
+ export interface AxiomPluginOptions extends ResolveTokenInput, AxiomLogsOptions {
47
40
  /** Override base URL for tests. */
48
41
  baseUrl?: string;
49
42
  /** Override `fetch` for tests. */
50
43
  fetch?: typeof fetch;
51
44
  }
52
- interface PluginContext {
45
+ export interface PluginContext {
53
46
  options: AxiomPluginOptions & {
54
47
  dataset?: string;
55
48
  };
@@ -61,9 +54,9 @@ interface PluginContext {
61
54
  */
62
55
  client: () => AxiomClient;
63
56
  }
64
- declare function createContext(options: AxiomPluginOptions): PluginContext;
65
- declare function logs(ctx: PluginContext): Logs;
66
- declare function createPlugin(options: AxiomPluginOptions): {
57
+ export declare function createContext(options: AxiomPluginOptions): PluginContext;
58
+ export declare function logs(ctx: PluginContext): Logs;
59
+ export declare function createPlugin(options: AxiomPluginOptions): {
67
60
  name: string;
68
61
  probes: {
69
62
  connection: import("@theholocron/cli").Probe;
@@ -76,6 +69,5 @@ declare function createPlugin(options: AxiomPluginOptions): {
76
69
  * One-line hint shown by `holocron auth set axiom` when no token is
77
70
  * supplied or when the supplied token is rejected.
78
71
  */
79
- declare const AUTH_HINT: string;
80
- //#endregion
81
- export { AUTH_HINT, AuthError, type AxiomClient, type AxiomClientOptions, type AxiomDataset, AxiomLogs, type AxiomLogsOptions, AxiomPluginOptions, type AxiomUser, type CreateAxiomDatasetInput, PluginContext, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createAxiomClient, createContext, createPlugin, logs, resolveToken, verifyToken };
72
+ export declare const AUTH_HINT: string;
73
+ export { AuthError, type AxiomClient, type AxiomClientOptions, type AxiomDataset, type AxiomLogsOptions, type AxiomUser, type CreateAxiomDatasetInput, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createAxiomClient };
package/dist/index.mjs CHANGED
@@ -1,15 +1,14 @@
1
1
  import { AuthError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
2
2
  import { createAxiomClient } from "@theholocron/axiom-client";
3
3
  import { errorMessage } from "@theholocron/misc-utils";
4
- //#region src/auth.ts
4
+ // src/auth.ts
5
5
  const resolveToken = createResolveToken({
6
6
  envName: "HOLOCRON_AXIOM_TOKEN",
7
7
  vendorEnvName: "AXIOM_TOKEN",
8
8
  keyringService: "axiom",
9
9
  errorMessage: "no Axiom token found. Pass --token <TOKEN>, set HOLOCRON_AXIOM_TOKEN / AXIOM_TOKEN, or run: holocron auth set axiom <TOKEN>"
10
10
  });
11
- //#endregion
12
- //#region src/capabilities/logs.ts
11
+ // src/capabilities/logs.ts
13
12
  var AxiomLogs = class {
14
13
  client;
15
14
  opts;
@@ -52,8 +51,7 @@ var AxiomLogs = class {
52
51
  return { alreadyExists: false };
53
52
  }
54
53
  };
55
- //#endregion
56
- //#region src/verify-token.ts
54
+ // src/verify-token.ts
57
55
  async function verifyToken(token, opts = {}) {
58
56
  const client = createAxiomClient({
59
57
  token,
@@ -73,8 +71,7 @@ async function verifyToken(token, opts = {}) {
73
71
  };
74
72
  }
75
73
  }
76
- //#endregion
77
- //#region src/index.ts
74
+ // src/index.ts
78
75
  function createContext(options) {
79
76
  const env = options.env ?? process.env;
80
77
  const dataset = options.dataset ?? env.HOLOCRON_AXIOM_DATASET ?? env.AXIOM_DATASET;
@@ -116,5 +113,4 @@ function createPlugin(options) {
116
113
  * supplied or when the supplied token is rejected.
117
114
  */
118
115
  const AUTH_HINT = "generate an Axiom API token at https://app.axiom.co/settings/api-tokens with dataset read + create permissions, then run: holocron auth set axiom <TOKEN>";
119
- //#endregion
120
116
  export { AUTH_HINT, AuthError, AxiomLogs, createAxiomClient, createContext, createPlugin, logs, resolveToken, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-axiom",
3
- "version": "5.0.0-alpha.245",
3
+ "version": "5.0.0-alpha.247",
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",
@@ -38,21 +38,21 @@
38
38
  "@theholocron/tsdown-config": "^8.8.2",
39
39
  "@theholocron/vitest-config": "^8.8.2",
40
40
  "@types/node": "^26",
41
- "@vitest/coverage-v8": "^4.1.11",
41
+ "@vitest/coverage-v8": "^5.0.5",
42
42
  "@vitest/eslint-plugin": "^1.6.27",
43
43
  "eslint": "^10.8.1",
44
44
  "eslint-plugin-n": "^18.3.0",
45
45
  "globals": "^17.11.0",
46
- "tsdown": "^0.22.14",
46
+ "tsdown": "^0.23.3",
47
47
  "tsx": "4.23.15",
48
48
  "typescript": "^5.9.3",
49
- "vitest": "^4.1.11",
50
- "@theholocron/cli": "5.0.0-alpha.245"
49
+ "vitest": "^5.0.5",
50
+ "@theholocron/cli": "5.0.0-alpha.247"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@theholocron/axiom-client": "^1.43.1",
54
54
  "@theholocron/misc-utils": "^1.16.0",
55
- "@theholocron/cli": "5.0.0-alpha.245"
55
+ "@theholocron/cli": "5.0.0-alpha.247"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=22"