@theholocron/holocron-plugin-neon 5.0.0-alpha.12 → 5.0.0-alpha.120

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,4 +1,4 @@
1
- import { AuthError, ConnectionStringOptions, ResolveTokenInput, Storage, StorageBranch } from "@theholocron/cli";
1
+ import { AuthError, ConnectionStringOptions, ResolveTokenInput, Storage, StorageBranch, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { NeonClient, NeonClient as NeonClient$1, NeonClientOptions, createNeonClient } from "@theholocron/neon-client";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
@@ -37,26 +37,11 @@ declare class NeonStorage implements Storage {
37
37
  }
38
38
  //#endregion
39
39
  //#region src/verify-token.d.ts
40
- /**
41
- * `verifyToken` — plugin-level export used by `holocron auth set` +
42
- * `holocron auth check`. Hits Neon's `/users/me` endpoint and
43
- * translates the response into the normalized `VerifyTokenResult`
44
- * shape.
45
- */
46
- interface VerifyTokenSuccess {
47
- ok: true;
48
- subject: string;
49
- }
50
- interface VerifyTokenFailure {
51
- ok: false;
52
- message: string;
53
- }
54
- type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
55
40
  interface VerifyTokenOptions {
56
41
  baseUrl?: string;
57
42
  fetch?: typeof fetch;
58
43
  }
59
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
44
+ declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
60
45
  //#endregion
61
46
  //#region src/index.d.ts
62
47
  interface NeonPluginOptions extends ResolveTokenInput {
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
2
2
  import { createNeonClient } from "@theholocron/neon-client";
3
+ import { errorMessage } from "@theholocron/misc-utils";
3
4
  //#region src/auth.ts
4
5
  const resolveToken = createResolveToken({
5
6
  envName: "HOLOCRON_NEON_API_KEY",
@@ -73,12 +74,6 @@ function mapBranch(raw) {
73
74
  }
74
75
  //#endregion
75
76
  //#region src/verify-token.ts
76
- /**
77
- * `verifyToken` — plugin-level export used by `holocron auth set` +
78
- * `holocron auth check`. Hits Neon's `/users/me` endpoint and
79
- * translates the response into the normalized `VerifyTokenResult`
80
- * shape.
81
- */
82
77
  async function verifyToken(token, opts = {}) {
83
78
  const client = createNeonClient({
84
79
  token,
@@ -94,7 +89,7 @@ async function verifyToken(token, opts = {}) {
94
89
  } catch (err) {
95
90
  return {
96
91
  ok: false,
97
- message: err instanceof Error ? err.message : String(err)
92
+ message: errorMessage(err)
98
93
  };
99
94
  }
100
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-neon",
3
- "version": "5.0.0-alpha.12",
3
+ "version": "5.0.0-alpha.120",
4
4
  "description": "Holocron plugin for Neon. Implements the storage capability against Neon's REST API — branch ops, connection strings, extensions.",
5
5
  "keywords": [
6
6
  "holocron",
@@ -30,11 +30,13 @@
30
30
  "dist"
31
31
  ],
32
32
  "devDependencies": {
33
- "@theholocron/eslint-config": "^8.0.0",
34
- "@theholocron/neon-client": "^1.14.2",
35
- "@theholocron/tsconfig": "^8.0.0",
36
- "@theholocron/tsdown-config": "^8.0.0",
37
- "@theholocron/vitest-config": "^8.0.0",
33
+ "@theholocron/eslint-config": "^8.7.0",
34
+ "@theholocron/http-client": "^1.38.0",
35
+ "@theholocron/misc-utils": "^1.9.2",
36
+ "@theholocron/neon-client": "^1.38.0",
37
+ "@theholocron/tsconfig": "^8.7.0",
38
+ "@theholocron/tsdown-config": "^8.7.0",
39
+ "@theholocron/vitest-config": "^8.7.0",
38
40
  "@types/node": "^26",
39
41
  "@vitest/coverage-v8": "^4.1.11",
40
42
  "@vitest/eslint-plugin": "^1.6.27",
@@ -45,11 +47,12 @@
45
47
  "tsx": "4.23.12",
46
48
  "typescript": "^5.9.3",
47
49
  "vitest": "^4.1.11",
48
- "@theholocron/cli": "5.0.0-alpha.12"
50
+ "@theholocron/cli": "5.0.0-alpha.120"
49
51
  },
50
52
  "peerDependencies": {
51
- "@theholocron/neon-client": "^1.14.2",
52
- "@theholocron/cli": "5.0.0-alpha.12"
53
+ "@theholocron/misc-utils": "^1.9.2",
54
+ "@theholocron/neon-client": "^1.38.0",
55
+ "@theholocron/cli": "5.0.0-alpha.120"
53
56
  },
54
57
  "peerDependenciesMeta": {
55
58
  "@theholocron/neon-client": {}