@theholocron/holocron-plugin-neon 5.0.0-alpha.246 → 5.0.0-alpha.248

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,13 +1,10 @@
1
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
- //#region src/auth.d.ts
4
- declare const resolveToken: (input?: ResolveTokenInput) => string;
5
- //#endregion
6
- //#region src/capabilities/storage.d.ts
3
+ export declare const resolveToken: (input?: ResolveTokenInput) => string;
7
4
  interface StorageOptions {
8
5
  projectId: string;
9
6
  }
10
- declare class NeonStorage implements Storage {
7
+ export declare class NeonStorage implements Storage {
11
8
  private readonly client;
12
9
  private readonly opts;
13
10
  readonly key: "storage";
@@ -35,16 +32,12 @@ declare class NeonStorage implements Storage {
35
32
  */
36
33
  private firstDatabase;
37
34
  }
38
- //#endregion
39
- //#region src/verify-token.d.ts
40
35
  interface VerifyTokenOptions {
41
36
  baseUrl?: string;
42
37
  fetch?: typeof fetch;
43
38
  }
44
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
45
- //#endregion
46
- //#region src/index.d.ts
47
- interface NeonPluginOptions extends ResolveTokenInput {
39
+ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
40
+ export interface NeonPluginOptions extends ResolveTokenInput {
48
41
  /** Neon project id this plugin is bound to. Required. */
49
42
  projectId: string;
50
43
  /** Override base URL for tests. */
@@ -52,13 +45,13 @@ interface NeonPluginOptions extends ResolveTokenInput {
52
45
  /** Override `fetch` for tests. */
53
46
  fetch?: typeof fetch;
54
47
  }
55
- interface PluginContext {
48
+ export interface PluginContext {
56
49
  options: NeonPluginOptions;
57
50
  client: () => NeonClient;
58
51
  }
59
- declare function createContext(options: NeonPluginOptions): PluginContext;
60
- declare function storage(ctx: PluginContext): Storage;
61
- declare function createPlugin(options: NeonPluginOptions): {
52
+ export declare function createContext(options: NeonPluginOptions): PluginContext;
53
+ export declare function storage(ctx: PluginContext): Storage;
54
+ export declare function createPlugin(options: NeonPluginOptions): {
62
55
  name: string;
63
56
  probes: {
64
57
  connection: import("@theholocron/cli").Probe;
@@ -73,6 +66,5 @@ declare function createPlugin(options: NeonPluginOptions): {
73
66
  * at https://console.neon.tech/app/settings/api-keys where API keys
74
67
  * are minted.
75
68
  */
76
- declare const AUTH_HINT: string;
77
- //#endregion
78
- export { AUTH_HINT, AuthError, type NeonClient, type NeonClientOptions, NeonPluginOptions, NeonStorage, PluginContext, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createNeonClient, createPlugin, resolveToken, storage, verifyToken };
69
+ export declare const AUTH_HINT: string;
70
+ export { AuthError, type NeonClient, type NeonClientOptions, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createNeonClient };
package/dist/index.mjs CHANGED
@@ -1,15 +1,14 @@
1
1
  import { AuthError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
2
2
  import { createNeonClient } from "@theholocron/neon-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_NEON_API_KEY",
7
7
  vendorEnvName: "NEON_API_KEY",
8
8
  keyringService: "neon",
9
9
  errorMessage: "no Neon API key found. Pass --token <KEY>, set HOLOCRON_NEON_API_KEY / NEON_API_KEY, or run: holocron auth set neon <KEY>"
10
10
  });
11
- //#endregion
12
- //#region src/capabilities/storage.ts
11
+ // src/capabilities/storage.ts
13
12
  var NeonStorage = class {
14
13
  client;
15
14
  opts;
@@ -72,8 +71,7 @@ function mapBranch(raw) {
72
71
  createdAt: raw.created_at
73
72
  };
74
73
  }
75
- //#endregion
76
- //#region src/verify-token.ts
74
+ // src/verify-token.ts
77
75
  async function verifyToken(token, opts = {}) {
78
76
  const client = createNeonClient({
79
77
  token,
@@ -93,8 +91,7 @@ async function verifyToken(token, opts = {}) {
93
91
  };
94
92
  }
95
93
  }
96
- //#endregion
97
- //#region src/index.ts
94
+ // src/index.ts
98
95
  function createContext(options) {
99
96
  if (!options.projectId) throw new Error("@theholocron/holocron-plugin-neon requires `projectId` in options");
100
97
  let client;
@@ -134,5 +131,4 @@ function createPlugin(options) {
134
131
  * are minted.
135
132
  */
136
133
  const AUTH_HINT = "generate a Neon API key at https://console.neon.tech/app/settings/api-keys, then run: holocron auth set neon <KEY>";
137
- //#endregion
138
134
  export { AUTH_HINT, AuthError, NeonStorage, createContext, createNeonClient, createPlugin, resolveToken, storage, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-neon",
3
- "version": "5.0.0-alpha.246",
3
+ "version": "5.0.0-alpha.248",
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",
@@ -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.246"
49
+ "vitest": "^5.0.5",
50
+ "@theholocron/cli": "5.0.0-alpha.248"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@theholocron/misc-utils": "^1.16.0",
54
54
  "@theholocron/neon-client": "^1.43.1",
55
- "@theholocron/cli": "5.0.0-alpha.246"
55
+ "@theholocron/cli": "5.0.0-alpha.248"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@theholocron/neon-client": {}