@pensar/apex 2.3.0 → 2.4.0-canary.2d23c2f0

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.
Files changed (70) hide show
  1. package/build/agent-4wd7a02r.js +29 -0
  2. package/build/agent-cgmq23jr.js +19 -0
  3. package/build/{agent-9xna7jhw.js → agent-gtmbvqh2.js} +11 -11
  4. package/build/{apps-43pqbz7r.js → apps-j2pxtjaq.js} +20 -20
  5. package/build/{auth-c1z670rx.js → auth-7afqr3wp.js} +38 -20
  6. package/build/authentication-hvsegb1p.js +19 -0
  7. package/build/blackboxAgent-47wf7hkx.js +19 -0
  8. package/build/{blackboxPentest-tgc2t3y6.js → blackboxPentest-t2sc2mcg.js} +17 -17
  9. package/build/{cli-eveg9djy.js → cli-21kv9cmn.js} +3 -2
  10. package/build/{cli-vckbhnyk.js → cli-2vmbzyqh.js} +2 -2
  11. package/build/{cli-8rxa073f.js → cli-bc05qbss.js} +8 -6
  12. package/build/{cli-zx8gk8xv.js → cli-bpycpvf6.js} +296 -54
  13. package/build/{cli-f7hanqbw.js → cli-bv9bjvpt.js} +2 -2
  14. package/build/{cli-zk1ch6qf.js → cli-d5n76mez.js} +34 -9
  15. package/build/{cli-q24twygk.js → cli-dm0fc0bm.js} +1 -1
  16. package/build/{cli-yz80qkzn.js → cli-ee3axgts.js} +7 -1
  17. package/build/{cli-baqhqbe5.js → cli-gvwg1z9q.js} +3 -3
  18. package/build/{cli-gpnb45ck.js → cli-j54qa6tm.js} +7 -7
  19. package/build/{cli-50906d27.js → cli-jgy1gn5z.js} +91 -29
  20. package/build/{cli-wszshs5e.js → cli-k71t434r.js} +4 -4
  21. package/build/{cli-72b18z0n.js → cli-kppxpy1r.js} +3 -3
  22. package/build/{cli-zm8tfpv7.js → cli-nrtyzpy4.js} +25 -9
  23. package/build/{cli-n2m2yy5b.js → cli-qdz55t3y.js} +1250 -614
  24. package/build/{cli-barsn8br.js → cli-s0ay7r6x.js} +2 -2
  25. package/build/{cli-3k1x5rn3.js → cli-swpbx60z.js} +1045 -1045
  26. package/build/{cli-j0n189ee.js → cli-tczmn0bc.js} +2 -2
  27. package/build/{cli-jyp2c6th.js → cli-vpxp10qe.js} +2 -2
  28. package/build/{cli-7tw4xfnw.js → cli-vz1abzfe.js} +1 -1
  29. package/build/{cli-f71s6kcw.js → cli-xnmdwvse.js} +81 -215
  30. package/build/{cli-bnkgdywr.js → cli-yrw6ck02.js} +1 -1
  31. package/build/{cli-bv2807tj.js → cli-zhtfn5gp.js} +3 -3
  32. package/build/cli.js +52 -46
  33. package/build/{config-jzqjz606.js → config-5v7ddr7b.js} +5 -5
  34. package/build/{doctor-q3qws68e.js → doctor-jvwt8yq5.js} +10 -9
  35. package/build/{fastStrike-ebz1ph9a.js → fastStrike-k28f6nf3.js} +36 -16
  36. package/build/{fixes-86yebsj0.js → fixes-mpm6r7cp.js} +19 -19
  37. package/build/{index-8db1d2q3.js → index-5phv2wfj.js} +18 -18
  38. package/build/{index-h2hj2hj9.js → index-cbwn03kz.js} +16 -16
  39. package/build/{index-e8c8zcrf.js → index-dq0hvce1.js} +31 -26
  40. package/build/{index-97vx1a24.js → index-gfw12srr.js} +1148 -1086
  41. package/build/{index-gq9h8j5j.js → index-mtq7kmxz.js} +132 -132
  42. package/build/{index-tke6896d.js → index-psqjpw5m.js} +10 -10
  43. package/build/{index-mr2cseg4.js → index-r7hpv8v8.js} +19 -19
  44. package/build/index-s2xwp702.js +12 -0
  45. package/build/{index-32hn8rrw.js → index-twcv8135.js} +3 -3
  46. package/build/{index-468j74f3.js → index-xk4ht3gn.js} +113 -97
  47. package/build/{issues-kh4wg8c5.js → issues-ce9j1an1.js} +19 -19
  48. package/build/{logs-bj28xmbf.js → logs-xv0vs83s.js} +19 -19
  49. package/build/{main-3d7dfdvs.js → main-mmjp338j.js} +9 -9
  50. package/build/{multipart-parser-6zd16497.js → multipart-parser-g2xxkezz.js} +2 -2
  51. package/build/{offesecAgent-8ky7gccp.js → offesecAgent-4bm0eavz.js} +11 -11
  52. package/build/{parse-7djk9jyf.js → parse-rtccymzn.js} +3 -3
  53. package/build/pentest-pgkg5bfc.js +29 -0
  54. package/build/{pentests-62d6zw6p.js → pentests-gtxzs2fz.js} +19 -19
  55. package/build/{targetedPentest-me4jnr3z.js → targetedPentest-vz0ecgm9.js} +14 -14
  56. package/build/{targets-e5k1mrky.js → targets-me1ajgee.js} +19 -19
  57. package/build/threatModel-d4afwhnh.js +27 -0
  58. package/build/{token-rdcbn380.js → token-3bbp59y6.js} +3 -3
  59. package/build/{token-util-sxb85ahn.js → token-util-6xjme11b.js} +2 -2
  60. package/build/{uninstall-jt1bca2p.js → uninstall-1gqdgxg3.js} +2 -2
  61. package/build/{upload-krd8bnex.js → upload-9qp56ncf.js} +11 -11
  62. package/build/{utils-skmqhyfg.js → utils-rf818gpr.js} +17 -13
  63. package/package.json +1 -1
  64. package/build/agent-71z4e7jg.js +0 -19
  65. package/build/agent-ga5fecfs.js +0 -27
  66. package/build/authentication-hgs7ym0m.js +0 -19
  67. package/build/blackboxAgent-gem3mxa9.js +0 -19
  68. package/build/index-ag14v3sg.js +0 -12
  69. package/build/pentest-rs0181nf.js +0 -29
  70. package/build/threatModel-k4f3zgqd.js +0 -27
@@ -0,0 +1,29 @@
1
+ import {
2
+ PentestResponseSchema,
3
+ TargetedPentestAgent,
4
+ buildPentestActiveTools,
5
+ buildPentestPrompt,
6
+ buildPentestSystemPrompt,
7
+ resolvePentestAgentRole
8
+ } from "./cli-jgy1gn5z.js";
9
+ import"./cli-9fsre5pt.js";
10
+ import"./cli-vpxp10qe.js";
11
+ import"./cli-qdz55t3y.js";
12
+ import"./cli-vz1abzfe.js";
13
+ import"./cli-c8131c4q.js";
14
+ import"./cli-bpycpvf6.js";
15
+ import"./cli-2vmbzyqh.js";
16
+ import"./cli-swpbx60z.js";
17
+ import"./cli-j54qa6tm.js";
18
+ import"./cli-bv9bjvpt.js";
19
+ import"./cli-21kv9cmn.js";
20
+ import"./cli-s0ay7r6x.js";
21
+ import"./cli-bc05qbss.js";
22
+ export {
23
+ PentestResponseSchema,
24
+ TargetedPentestAgent,
25
+ buildPentestActiveTools,
26
+ buildPentestPrompt,
27
+ buildPentestSystemPrompt,
28
+ resolvePentestAgentRole
29
+ };
@@ -0,0 +1,19 @@
1
+ import {
2
+ CodeAgent
3
+ } from "./cli-tczmn0bc.js";
4
+ import"./cli-9fsre5pt.js";
5
+ import"./cli-vpxp10qe.js";
6
+ import"./cli-qdz55t3y.js";
7
+ import"./cli-vz1abzfe.js";
8
+ import"./cli-c8131c4q.js";
9
+ import"./cli-bpycpvf6.js";
10
+ import"./cli-2vmbzyqh.js";
11
+ import"./cli-swpbx60z.js";
12
+ import"./cli-j54qa6tm.js";
13
+ import"./cli-bv9bjvpt.js";
14
+ import"./cli-21kv9cmn.js";
15
+ import"./cli-s0ay7r6x.js";
16
+ import"./cli-bc05qbss.js";
17
+ export {
18
+ CodeAgent
19
+ };
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  OffensiveSecurityAgent
3
- } from "./cli-n2m2yy5b.js";
3
+ } from "./cli-qdz55t3y.js";
4
4
  import {
5
5
  detectOSAndEnhancePrompt
6
- } from "./cli-7tw4xfnw.js";
6
+ } from "./cli-vz1abzfe.js";
7
7
  import"./cli-c8131c4q.js";
8
8
  import {
9
9
  init_dist,
10
10
  stepCountIs
11
- } from "./cli-zx8gk8xv.js";
12
- import"./cli-vckbhnyk.js";
11
+ } from "./cli-bpycpvf6.js";
12
+ import"./cli-2vmbzyqh.js";
13
13
  import {
14
14
  exports_external,
15
15
  init_zod
16
- } from "./cli-3k1x5rn3.js";
17
- import"./cli-gpnb45ck.js";
18
- import"./cli-f7hanqbw.js";
19
- import"./cli-eveg9djy.js";
20
- import"./cli-barsn8br.js";
21
- import"./cli-8rxa073f.js";
16
+ } from "./cli-swpbx60z.js";
17
+ import"./cli-j54qa6tm.js";
18
+ import"./cli-bv9bjvpt.js";
19
+ import"./cli-21kv9cmn.js";
20
+ import"./cli-s0ay7r6x.js";
21
+ import"./cli-bc05qbss.js";
22
22
 
23
23
  // src/core/agents/specialized/findingJudge/agent.ts
24
24
  init_dist();
@@ -68,7 +68,7 @@ You are the last line of defense against false positives, hallucinated findings,
68
68
  - Authorization / access-control boundary bypass (RSC/prefetch/redirect-body leaks, missing per-route checks): the evidence must establish the access-model delta — which identity/role was used, and proof that the returned data is genuinely out of scope for that identity (cross-tenant, another user's, or admin-only data a member should not see). A 200 response, a leaked RSC payload, or a skipped redirect alone does NOT prove sensitive exposure. If the bypass is real but the returned data is non-sensitive or plausibly same-tenant/expected-visible, classify as a valid lower-impact finding and require the claim's impact/severity to match — do NOT accept it as high-confidence sensitive/cross-tenant exposure.
69
69
  - Authentication bypass: output should show protected access without valid credentials.
70
70
  - Email/HTML injection: ideally verify delivery and rendering. If only server acceptance is shown, confidence must stay below 0.7 and limitations must state rendering was not independently verified.
71
- - Missing rate limiting / anti-automation: fewer than 50 requests is insufficient. Evidence must state exact request count, timing/distribution, and observed statuses.
71
+ - Missing rate limiting / anti-automation: a modest burst (~20 requests) with no observed throttling, delays, or 429s is sufficient to demonstrate the gap. For endpoints with real-world side effects (sending email/SMS/push, creating tickets/notifications, contact/support/feedback forms, payments), as few as 2–3 attempts plus the observed response is sufficient — do NOT require volume-testing that would spam real recipients. Evidence must state exact request count, timing/distribution, and observed statuses.
72
72
 
73
73
  ### Common Low-Signal Patterns
74
74
  Reject these unless the submitted evidence demonstrates concrete harm:
@@ -1,4 +1,14 @@
1
1
  #!/usr/bin/env bun
2
+ import"./cli-xnmdwvse.js";
3
+ import"./cli-nrtyzpy4.js";
4
+ import"./cli-zhtfn5gp.js";
5
+ import"./cli-kppxpy1r.js";
6
+ import"./cli-jgy1gn5z.js";
7
+ import"./cli-d5n76mez.js";
8
+ import"./cli-tczmn0bc.js";
9
+ import"./cli-gvwg1z9q.js";
10
+ import"./cli-9fsre5pt.js";
11
+ import"./cli-vpxp10qe.js";
2
12
  import {
3
13
  createApp,
4
14
  createEndpoint,
@@ -12,28 +22,18 @@ import {
12
22
  searchEndpoints,
13
23
  updateApp,
14
24
  updateEndpoint
15
- } from "./cli-f71s6kcw.js";
16
- import"./cli-zm8tfpv7.js";
17
- import"./cli-bv2807tj.js";
18
- import"./cli-72b18z0n.js";
19
- import"./cli-50906d27.js";
20
- import"./cli-zk1ch6qf.js";
21
- import"./cli-j0n189ee.js";
22
- import"./cli-baqhqbe5.js";
23
- import"./cli-9fsre5pt.js";
24
- import"./cli-jyp2c6th.js";
25
- import"./cli-n2m2yy5b.js";
26
- import"./cli-7tw4xfnw.js";
25
+ } from "./cli-qdz55t3y.js";
26
+ import"./cli-vz1abzfe.js";
27
27
  import"./cli-fw5r7pfj.js";
28
28
  import"./cli-c8131c4q.js";
29
- import"./cli-zx8gk8xv.js";
30
- import"./cli-vckbhnyk.js";
31
- import"./cli-3k1x5rn3.js";
32
- import"./cli-gpnb45ck.js";
33
- import"./cli-f7hanqbw.js";
34
- import"./cli-eveg9djy.js";
35
- import"./cli-barsn8br.js";
36
- import"./cli-8rxa073f.js";
29
+ import"./cli-bpycpvf6.js";
30
+ import"./cli-2vmbzyqh.js";
31
+ import"./cli-swpbx60z.js";
32
+ import"./cli-j54qa6tm.js";
33
+ import"./cli-bv9bjvpt.js";
34
+ import"./cli-21kv9cmn.js";
35
+ import"./cli-s0ay7r6x.js";
36
+ import"./cli-bc05qbss.js";
37
37
 
38
38
  // src/cli/apps.ts
39
39
  var APPLICATION_TYPES = [
@@ -1,22 +1,23 @@
1
1
  #!/usr/bin/env bun
2
- import"./cli-f71s6kcw.js";
3
- import"./cli-zm8tfpv7.js";
4
- import"./cli-bv2807tj.js";
5
- import"./cli-72b18z0n.js";
6
- import"./cli-50906d27.js";
7
- import"./cli-zk1ch6qf.js";
8
- import"./cli-j0n189ee.js";
9
- import"./cli-baqhqbe5.js";
2
+ import"./cli-xnmdwvse.js";
3
+ import"./cli-nrtyzpy4.js";
4
+ import"./cli-zhtfn5gp.js";
5
+ import"./cli-kppxpy1r.js";
6
+ import"./cli-jgy1gn5z.js";
7
+ import"./cli-d5n76mez.js";
8
+ import"./cli-tczmn0bc.js";
9
+ import"./cli-gvwg1z9q.js";
10
10
  import"./cli-9fsre5pt.js";
11
- import"./cli-jyp2c6th.js";
12
- import"./cli-n2m2yy5b.js";
13
- import"./cli-7tw4xfnw.js";
11
+ import"./cli-vpxp10qe.js";
12
+ import"./cli-qdz55t3y.js";
13
+ import"./cli-vz1abzfe.js";
14
14
  import"./cli-fw5r7pfj.js";
15
15
  import"./cli-c8131c4q.js";
16
- import"./cli-zx8gk8xv.js";
16
+ import"./cli-bpycpvf6.js";
17
17
  import {
18
18
  createWorkspaceSelection,
19
19
  disconnect,
20
+ ensureValidToken,
20
21
  fetchWorkspaces,
21
22
  getPensarApiUrl,
22
23
  getPensarConsoleUrl,
@@ -28,18 +29,18 @@ import {
28
29
  pollWorkspaceSelection,
29
30
  selectWorkspace,
30
31
  startDeviceFlow
31
- } from "./cli-vckbhnyk.js";
32
- import"./cli-3k1x5rn3.js";
33
- import"./cli-gpnb45ck.js";
32
+ } from "./cli-2vmbzyqh.js";
33
+ import"./cli-swpbx60z.js";
34
+ import"./cli-j54qa6tm.js";
34
35
  import {
35
36
  config,
36
37
  init_config
37
- } from "./cli-f7hanqbw.js";
38
- import"./cli-eveg9djy.js";
39
- import"./cli-barsn8br.js";
38
+ } from "./cli-bv9bjvpt.js";
39
+ import"./cli-21kv9cmn.js";
40
+ import"./cli-s0ay7r6x.js";
40
41
  import {
41
42
  __require
42
- } from "./cli-8rxa073f.js";
43
+ } from "./cli-bc05qbss.js";
43
44
 
44
45
  // src/cli/auth.ts
45
46
  import * as readline from "node:readline";
@@ -85,7 +86,13 @@ Waiting for workspace selection...`);
85
86
  }
86
87
  async function login() {
87
88
  const appConfig = await config.get();
88
- if (isConnected(appConfig)) {
89
+ const hasStoredCredentials = isConnected(appConfig);
90
+ const validToken = hasStoredCredentials ? await ensureValidToken({
91
+ accessToken: appConfig.accessToken,
92
+ refreshToken: appConfig.refreshToken,
93
+ pensarAPIKey: appConfig.pensarAPIKey
94
+ }) : null;
95
+ if (validToken) {
89
96
  console.log("Already connected to Pensar Console.");
90
97
  if (appConfig.workspaceSlug) {
91
98
  console.log(` Workspace: ${appConfig.workspaceSlug}`);
@@ -95,6 +102,8 @@ Reconnect? (y/N): `);
95
102
  if (answer.toLowerCase() !== "y") {
96
103
  return;
97
104
  }
105
+ } else if (hasStoredCredentials) {
106
+ console.log("Your saved Pensar Console session has expired. Reconnecting.");
98
107
  }
99
108
  console.log(`
100
109
  Pensar Console — Managed Inference
@@ -228,6 +237,15 @@ async function status() {
228
237
  console.log("Not connected to Pensar Console.\n\nRun `pensar login` to connect.");
229
238
  return;
230
239
  }
240
+ const validToken = await ensureValidToken({
241
+ accessToken: appConfig.accessToken,
242
+ refreshToken: appConfig.refreshToken,
243
+ pensarAPIKey: appConfig.pensarAPIKey
244
+ });
245
+ if (!validToken) {
246
+ console.log("Your Pensar Console session has expired.\n\nRun `pensar login` to reconnect.");
247
+ return;
248
+ }
231
249
  if (!appConfig.accessToken && appConfig.pensarAPIKey && !appConfig.workspaceSlug) {
232
250
  try {
233
251
  const apiUrl = getPensarApiUrl();
@@ -0,0 +1,19 @@
1
+ import {
2
+ runAuthenticationAgent
3
+ } from "./cli-d5n76mez.js";
4
+ import"./cli-9fsre5pt.js";
5
+ import"./cli-vpxp10qe.js";
6
+ import"./cli-qdz55t3y.js";
7
+ import"./cli-vz1abzfe.js";
8
+ import"./cli-c8131c4q.js";
9
+ import"./cli-bpycpvf6.js";
10
+ import"./cli-2vmbzyqh.js";
11
+ import"./cli-swpbx60z.js";
12
+ import"./cli-j54qa6tm.js";
13
+ import"./cli-bv9bjvpt.js";
14
+ import"./cli-21kv9cmn.js";
15
+ import"./cli-s0ay7r6x.js";
16
+ import"./cli-bc05qbss.js";
17
+ export {
18
+ runAuthenticationAgent
19
+ };
@@ -0,0 +1,19 @@
1
+ import {
2
+ BlackboxAttackSurfaceAgent
3
+ } from "./cli-zhtfn5gp.js";
4
+ import"./cli-9fsre5pt.js";
5
+ import"./cli-vpxp10qe.js";
6
+ import"./cli-qdz55t3y.js";
7
+ import"./cli-vz1abzfe.js";
8
+ import"./cli-c8131c4q.js";
9
+ import"./cli-bpycpvf6.js";
10
+ import"./cli-2vmbzyqh.js";
11
+ import"./cli-swpbx60z.js";
12
+ import"./cli-j54qa6tm.js";
13
+ import"./cli-bv9bjvpt.js";
14
+ import"./cli-21kv9cmn.js";
15
+ import"./cli-s0ay7r6x.js";
16
+ import"./cli-bc05qbss.js";
17
+ export {
18
+ BlackboxAttackSurfaceAgent
19
+ };
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  runPentestWorkflow
3
- } from "./cli-zm8tfpv7.js";
4
- import"./cli-bv2807tj.js";
5
- import"./cli-72b18z0n.js";
6
- import"./cli-50906d27.js";
7
- import"./cli-j0n189ee.js";
8
- import"./cli-baqhqbe5.js";
3
+ } from "./cli-nrtyzpy4.js";
4
+ import"./cli-zhtfn5gp.js";
5
+ import"./cli-kppxpy1r.js";
6
+ import"./cli-jgy1gn5z.js";
7
+ import"./cli-tczmn0bc.js";
8
+ import"./cli-gvwg1z9q.js";
9
9
  import"./cli-9fsre5pt.js";
10
- import"./cli-jyp2c6th.js";
11
- import"./cli-n2m2yy5b.js";
12
- import"./cli-7tw4xfnw.js";
10
+ import"./cli-vpxp10qe.js";
11
+ import"./cli-qdz55t3y.js";
12
+ import"./cli-vz1abzfe.js";
13
13
  import"./cli-fw5r7pfj.js";
14
14
  import"./cli-c8131c4q.js";
15
- import"./cli-zx8gk8xv.js";
16
- import"./cli-vckbhnyk.js";
17
- import"./cli-3k1x5rn3.js";
18
- import"./cli-gpnb45ck.js";
19
- import"./cli-f7hanqbw.js";
20
- import"./cli-eveg9djy.js";
21
- import"./cli-barsn8br.js";
22
- import"./cli-8rxa073f.js";
15
+ import"./cli-bpycpvf6.js";
16
+ import"./cli-2vmbzyqh.js";
17
+ import"./cli-swpbx60z.js";
18
+ import"./cli-j54qa6tm.js";
19
+ import"./cli-bv9bjvpt.js";
20
+ import"./cli-21kv9cmn.js";
21
+ import"./cli-s0ay7r6x.js";
22
+ import"./cli-bc05qbss.js";
23
23
 
24
24
  // src/core/api/blackboxPentest.ts
25
25
  async function runPentestAgent(input) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getCurrentVersion,
3
3
  init_installation
4
- } from "./cli-barsn8br.js";
4
+ } from "./cli-s0ay7r6x.js";
5
5
  import {
6
6
  __esm
7
- } from "./cli-8rxa073f.js";
7
+ } from "./cli-bc05qbss.js";
8
8
 
9
9
  // src/core/config/config.ts
10
10
  import fs from "node:fs/promises";
@@ -45,6 +45,7 @@ function applyEnvFallbacks(parsedConfig) {
45
45
  anthropicAPIKey: parsedConfig.anthropicAPIKey ?? process.env.ANTHROPIC_API_KEY,
46
46
  googleAPIKey: parsedConfig.googleAPIKey ?? process.env.GOOGLE_GENERATIVE_AI_API_KEY,
47
47
  openRouterAPIKey: parsedConfig.openRouterAPIKey ?? process.env.OPENROUTER_API_KEY,
48
+ concentrateAPIKey: parsedConfig.concentrateAPIKey ?? process.env.CONCENTRATE_API_KEY,
48
49
  inceptionAPIKey: parsedConfig.inceptionAPIKey ?? process.env.INCEPTION_API_KEY,
49
50
  bedrockAPIKey: parsedConfig.bedrockAPIKey ?? process.env.BEDROCK_API_KEY,
50
51
  pensarAPIKey: parsedConfig.pensarAPIKey ?? process.env.PENSAR_API_KEY,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  config,
3
3
  init_config
4
- } from "./cli-f7hanqbw.js";
4
+ } from "./cli-bv9bjvpt.js";
5
5
  import {
6
6
  __esm
7
- } from "./cli-8rxa073f.js";
7
+ } from "./cli-bc05qbss.js";
8
8
 
9
9
  // src/core/auth/connection.ts
10
10
  function isConnected(cfg) {
@@ -20,12 +20,14 @@ var __toESM = (mod, isNodeMode, target) => {
20
20
  }
21
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
22
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
23
+ if (mod && typeof mod === "object" || typeof mod === "function") {
24
+ for (let key of __getOwnPropNames(mod))
25
+ if (!__hasOwnProp.call(to, key))
26
+ __defProp(to, key, {
27
+ get: __accessProp.bind(mod, key),
28
+ enumerable: true
29
+ });
30
+ }
29
31
  if (canCache)
30
32
  cache.set(mod, to);
31
33
  return to;