@theholocron/holocron-plugin-postman 5.0.0-alpha.246 → 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, ResolveTokenInput, Tooling, ToolingDoctorReport, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { PostmanClient, PostmanClient as PostmanClient$1, PostmanClientOptions, PostmanCollection, PostmanEnvironment, PostmanPlanLimitError, PostmanSpec, PostmanUser, PostmanWorkspace, createPostmanClient, detectPlanLimit } from "@theholocron/postman-client";
3
- //#region src/auth.d.ts
4
- declare const resolveToken: (input?: ResolveTokenInput) => string;
5
- //#endregion
6
- //#region src/capabilities/tooling.d.ts
3
+ export declare const resolveToken: (input?: ResolveTokenInput) => string;
7
4
  interface PostmanToolingOptions {
8
5
  workspaceId: string;
9
6
  /** Local OpenAPI JSON path (relative to repoRoot). */
@@ -17,7 +14,7 @@ interface PostmanToolingOptions {
17
14
  /** Working repo root. Defaults to process.cwd(). */
18
15
  repoRoot?: string;
19
16
  }
20
- declare class PostmanTooling implements Tooling {
17
+ export declare class PostmanTooling implements Tooling {
21
18
  private readonly client;
22
19
  readonly key: "tooling";
23
20
  readonly providerName = "postman";
@@ -69,16 +66,12 @@ declare class PostmanTooling implements Tooling {
69
66
  content: string;
70
67
  }): Promise<void>;
71
68
  }
72
- //#endregion
73
- //#region src/verify-token.d.ts
74
69
  interface VerifyTokenOptions {
75
70
  baseUrl?: string;
76
71
  fetch?: typeof fetch;
77
72
  }
78
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
79
- //#endregion
80
- //#region src/index.d.ts
81
- interface PostmanPluginOptions extends ResolveTokenInput, PostmanToolingOptions {
73
+ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
74
+ export interface PostmanPluginOptions extends ResolveTokenInput, PostmanToolingOptions {
82
75
  /** Working repo root. Used to resolve relative paths in specFile/envFiles. Defaults to process.cwd(). */
83
76
  repoRoot?: string;
84
77
  /** Override base URL for tests. */
@@ -86,13 +79,13 @@ interface PostmanPluginOptions extends ResolveTokenInput, PostmanToolingOptions
86
79
  /** Override `fetch` for tests. */
87
80
  fetch?: typeof fetch;
88
81
  }
89
- interface PluginContext {
82
+ export interface PluginContext {
90
83
  options: PostmanPluginOptions;
91
84
  client: () => PostmanClient;
92
85
  }
93
- declare function createContext(options: PostmanPluginOptions): PluginContext;
94
- declare function tooling(ctx: PluginContext): Tooling;
95
- declare function createPlugin(options: PostmanPluginOptions): {
86
+ export declare function createContext(options: PostmanPluginOptions): PluginContext;
87
+ export declare function tooling(ctx: PluginContext): Tooling;
88
+ export declare function createPlugin(options: PostmanPluginOptions): {
96
89
  name: string;
97
90
  probes: {
98
91
  connection: import("@theholocron/cli").Probe;
@@ -105,6 +98,5 @@ declare function createPlugin(options: PostmanPluginOptions): {
105
98
  * One-line hint printed by `holocron auth set postman` when no
106
99
  * token is supplied or the supplied token is rejected.
107
100
  */
108
- declare const AUTH_HINT: string;
109
- //#endregion
110
- export { AUTH_HINT, AuthError, PluginContext, type PostmanClient, type PostmanClientOptions, PostmanPlanLimitError, PostmanPluginOptions, PostmanTooling, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createPlugin, createPostmanClient, detectPlanLimit, resolveToken, tooling, verifyToken };
101
+ export declare const AUTH_HINT: string;
102
+ export { AuthError, type PostmanClient, type PostmanClientOptions, PostmanPlanLimitError, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createPostmanClient, detectPlanLimit };
package/dist/index.mjs CHANGED
@@ -3,15 +3,14 @@ import { readFile } from "node:fs/promises";
3
3
  import { basename, resolve } from "node:path";
4
4
  import { errorMessage } from "@theholocron/misc-utils";
5
5
  import { PostmanPlanLimitError, createPostmanClient, detectPlanLimit } from "@theholocron/postman-client";
6
- //#region src/auth.ts
6
+ // src/auth.ts
7
7
  const resolveToken = createResolveToken({
8
8
  envName: "HOLOCRON_POSTMAN_API_KEY",
9
9
  vendorEnvName: "POSTMAN_API_KEY",
10
10
  keyringService: "postman",
11
11
  errorMessage: "no Postman API key found. Pass --token <KEY>, set HOLOCRON_POSTMAN_API_KEY / POSTMAN_API_KEY, or run: holocron auth set postman <KEY>"
12
12
  });
13
- //#endregion
14
- //#region src/capabilities/tooling.ts
13
+ // src/capabilities/tooling.ts
15
14
  /**
16
15
  * `tooling` capability for Postman.
17
16
  *
@@ -166,8 +165,7 @@ var PostmanTooling = class {
166
165
  await this.client().specs.updateFile(input.specId, input.filePath, input.content);
167
166
  }
168
167
  };
169
- //#endregion
170
- //#region src/verify-token.ts
168
+ // src/verify-token.ts
171
169
  async function verifyToken(token, opts = {}) {
172
170
  const client = createPostmanClient({
173
171
  token,
@@ -187,8 +185,7 @@ async function verifyToken(token, opts = {}) {
187
185
  };
188
186
  }
189
187
  }
190
- //#endregion
191
- //#region src/index.ts
188
+ // src/index.ts
192
189
  function createContext(options) {
193
190
  if (!options.workspaceId) throw new Error("@theholocron/holocron-plugin-postman requires `workspaceId` in options");
194
191
  let client;
@@ -232,5 +229,4 @@ function createPlugin(options) {
232
229
  * token is supplied or the supplied token is rejected.
233
230
  */
234
231
  const AUTH_HINT = "generate a Postman API key at https://postman.co/settings/me/api-keys, then run: holocron auth set postman <KEY>";
235
- //#endregion
236
232
  export { AUTH_HINT, AuthError, PostmanPlanLimitError, PostmanTooling, createContext, createPlugin, createPostmanClient, detectPlanLimit, resolveToken, tooling, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-postman",
3
- "version": "5.0.0-alpha.246",
3
+ "version": "5.0.0-alpha.247",
4
4
  "description": "Holocron plugin for Postman. Implements the tooling capability against Postman's REST API — workspace + collection + spec + environment sync.",
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.247"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@theholocron/misc-utils": "^1.16.0",
54
54
  "@theholocron/postman-client": "^1.43.1",
55
- "@theholocron/cli": "5.0.0-alpha.246"
55
+ "@theholocron/cli": "5.0.0-alpha.247"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@theholocron/postman-client": {}