@openclaw/feishu 2026.6.11 → 2026.6.34

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 (109) hide show
  1. package/dist/api.js +1 -1
  2. package/dist/{channel-C1MthXp0.js → channel-CJZM55mB.js} +3 -3
  3. package/dist/channel-plugin-api.js +1 -1
  4. package/dist/{channel.runtime-CiQqumBC.js → channel.runtime-DC21Vx4J.js} +1 -1
  5. package/dist/{monitor-CxUQtU--.js → monitor-BZS7ekeI.js} +1 -1
  6. package/dist/{monitor.account-C3SH96dD.js → monitor.account-D5SNO1bC.js} +1 -1
  7. package/dist/{secret-contract-ChjJKAJ9.js → secret-contract-DLaBl9m4.js} +26 -8
  8. package/dist/secret-contract-api.js +1 -1
  9. package/dist/setup-api.js +1 -1
  10. package/node_modules/agent-base/README.md +145 -0
  11. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  12. package/node_modules/agent-base/dist/src/index.js +203 -0
  13. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  14. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  15. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  16. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  17. package/node_modules/agent-base/package.json +64 -0
  18. package/node_modules/agent-base/src/index.ts +345 -0
  19. package/node_modules/agent-base/src/promisify.ts +33 -0
  20. package/node_modules/axios/CHANGELOG.md +165 -1
  21. package/node_modules/axios/README.md +310 -247
  22. package/node_modules/axios/dist/axios.js +533 -197
  23. package/node_modules/axios/dist/axios.min.js +3 -3
  24. package/node_modules/axios/dist/axios.min.js.map +1 -1
  25. package/node_modules/axios/dist/browser/axios.cjs +564 -161
  26. package/node_modules/axios/dist/esm/axios.js +564 -161
  27. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  28. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  29. package/node_modules/axios/dist/node/axios.cjs +839 -281
  30. package/node_modules/axios/index.d.cts +11 -4
  31. package/node_modules/axios/index.d.ts +7 -2
  32. package/node_modules/axios/lib/adapters/fetch.js +196 -37
  33. package/node_modules/axios/lib/adapters/http.js +328 -185
  34. package/node_modules/axios/lib/adapters/xhr.js +2 -1
  35. package/node_modules/axios/lib/core/Axios.js +4 -2
  36. package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
  37. package/node_modules/axios/lib/core/buildFullPath.js +29 -1
  38. package/node_modules/axios/lib/core/mergeConfig.js +34 -0
  39. package/node_modules/axios/lib/defaults/transitional.js +2 -0
  40. package/node_modules/axios/lib/env/data.js +1 -1
  41. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  42. package/node_modules/axios/lib/helpers/buildURL.js +6 -4
  43. package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
  44. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
  45. package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
  46. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  47. package/node_modules/axios/lib/helpers/fromDataURI.js +18 -5
  48. package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
  49. package/node_modules/axios/lib/helpers/resolveConfig.js +17 -9
  50. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  51. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
  52. package/node_modules/axios/lib/helpers/toFormData.js +41 -11
  53. package/node_modules/axios/lib/utils.js +105 -19
  54. package/node_modules/axios/package.json +31 -13
  55. package/node_modules/debug/LICENSE +20 -0
  56. package/node_modules/debug/README.md +481 -0
  57. package/node_modules/debug/package.json +64 -0
  58. package/node_modules/debug/src/browser.js +272 -0
  59. package/node_modules/debug/src/common.js +292 -0
  60. package/node_modules/debug/src/index.js +10 -0
  61. package/node_modules/debug/src/node.js +263 -0
  62. package/node_modules/https-proxy-agent/README.md +137 -0
  63. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  64. package/node_modules/https-proxy-agent/dist/agent.js +177 -0
  65. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  66. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  67. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  68. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  69. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  70. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  71. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  72. package/node_modules/https-proxy-agent/package.json +56 -0
  73. package/node_modules/ms/index.js +162 -0
  74. package/node_modules/ms/license.md +21 -0
  75. package/node_modules/ms/package.json +38 -0
  76. package/node_modules/ms/readme.md +59 -0
  77. package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
  78. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  79. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  80. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  81. package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
  82. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  83. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  84. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  85. package/node_modules/protobufjs/dist/protobuf.js +168 -208
  86. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  87. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  88. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  89. package/node_modules/protobufjs/index.d.ts +0 -8
  90. package/node_modules/protobufjs/package.json +2 -3
  91. package/node_modules/protobufjs/src/parse.js +3 -0
  92. package/node_modules/protobufjs/src/util/minimal.js +0 -3
  93. package/npm-shrinkwrap.json +58 -16
  94. package/package.json +4 -4
  95. package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
  96. package/node_modules/@protobufjs/inquire/LICENSE +0 -26
  97. package/node_modules/@protobufjs/inquire/README.md +0 -13
  98. package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
  99. package/node_modules/@protobufjs/inquire/index.js +0 -38
  100. package/node_modules/@protobufjs/inquire/package.json +0 -21
  101. package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
  102. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
  103. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
  104. package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
  105. package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
  106. package/node_modules/axios/dist/axios.js.map +0 -1
  107. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  108. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  109. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
@@ -2489,14 +2489,6 @@ export namespace util {
2489
2489
  */
2490
2490
  function fetch(path: string, options?: IFetchOptions): Promise<(string|Uint8Array)>;
2491
2491
 
2492
- /**
2493
- * Requires a module only if available.
2494
- * @param moduleName Module to require
2495
- * @returns Required module if available and not empty, otherwise `null`
2496
- * @deprecated Legacy optional require helper. Will be removed in a future release.
2497
- */
2498
- function inquire(moduleName: string): object;
2499
-
2500
2492
  /** A minimal path module to resolve Unix, Windows and URL paths alike. */
2501
2493
  namespace path {
2502
2494
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobufjs",
3
- "version": "7.6.3",
3
+ "version": "7.6.5",
4
4
  "versionScheme": "~",
5
5
  "description": "Protocol Buffers for JavaScript (& TypeScript).",
6
6
  "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
@@ -37,7 +37,7 @@
37
37
  "bench": "node bench",
38
38
  "build": "npm run build:bundle && npm run build:types",
39
39
  "build:bundle": "gulp --gulpfile scripts/gulpfile.js",
40
- "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
40
+ "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
41
41
  "changelog": "node scripts/changelog -w",
42
42
  "coverage": "npm run coverage:test && npm run coverage:report",
43
43
  "coverage:test": "nyc --silent tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
@@ -63,7 +63,6 @@
63
63
  "@protobufjs/eventemitter": "^1.1.1",
64
64
  "@protobufjs/fetch": "^1.1.1",
65
65
  "@protobufjs/float": "^1.0.2",
66
- "@protobufjs/inquire": "^1.1.2",
67
66
  "@protobufjs/path": "^1.1.2",
68
67
  "@protobufjs/pool": "^1.1.0",
69
68
  "@protobufjs/utf8": "^1.1.1",
@@ -678,6 +678,9 @@ function parse(source, root, options) {
678
678
  }
679
679
 
680
680
  while (token !== "=") {
681
+ if (token === null) {
682
+ throw illegal(token, "end of input");
683
+ }
681
684
  if (token === "(") {
682
685
  var parensValue = next();
683
686
  skip(")");
@@ -13,9 +13,6 @@ util.EventEmitter = require("@protobufjs/eventemitter");
13
13
  // float handling accross browsers
14
14
  util.float = require("@protobufjs/float");
15
15
 
16
- // requires modules optionally and hides the call from bundlers
17
- util.inquire = require("@protobufjs/inquire");
18
-
19
16
  // converts to / from utf8 encoded strings
20
17
  util.utf8 = require("@protobufjs/utf8");
21
18
 
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.6.11",
3
+ "version": "2026.6.34",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/feishu",
9
- "version": "2026.6.11",
9
+ "version": "2026.6.34",
10
10
  "dependencies": {
11
11
  "@larksuiteoapi/node-sdk": "1.66.0",
12
12
  "typebox": "1.1.39",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.6.11"
16
+ "openclaw": ">=2026.6.34"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -75,12 +75,6 @@
75
75
  "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
76
76
  "license": "BSD-3-Clause"
77
77
  },
78
- "node_modules/@protobufjs/inquire": {
79
- "version": "1.1.2",
80
- "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.2.tgz",
81
- "integrity": "sha512-pa0vFRuws4wkvaXKK1uXZMAwAX4/t8ANaJo45iw/oQHNQ9q5xUzwgFmVJGXiga2BeN+zpX7Vf9vmsiIa2J+MUw==",
82
- "license": "BSD-3-Clause"
83
- },
84
78
  "node_modules/@protobufjs/path": {
85
79
  "version": "1.1.2",
86
80
  "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
@@ -108,6 +102,18 @@
108
102
  "undici-types": ">=7.24.0 <7.24.7"
109
103
  }
110
104
  },
105
+ "node_modules/agent-base": {
106
+ "version": "6.0.2",
107
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
108
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
109
+ "license": "MIT",
110
+ "dependencies": {
111
+ "debug": "4"
112
+ },
113
+ "engines": {
114
+ "node": ">= 6.0.0"
115
+ }
116
+ },
111
117
  "node_modules/asynckit": {
112
118
  "version": "0.4.0",
113
119
  "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -115,13 +121,14 @@
115
121
  "license": "MIT"
116
122
  },
117
123
  "node_modules/axios": {
118
- "version": "1.16.0",
119
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
120
- "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
124
+ "version": "1.18.0",
125
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.0.tgz",
126
+ "integrity": "sha512-E32NzpYKp++W7XRe52rHiXV2ehxmh3wbdgO7MHeFM+vqxLBYHzt0ElkiImtOBxtOmyp0yoC8C6uESVV84Y2/hw==",
121
127
  "license": "MIT",
122
128
  "dependencies": {
123
129
  "follow-redirects": "^1.16.0",
124
130
  "form-data": "^4.0.5",
131
+ "https-proxy-agent": "^5.0.1",
125
132
  "proxy-from-env": "^2.1.0"
126
133
  }
127
134
  },
@@ -166,6 +173,23 @@
166
173
  "node": ">= 0.8"
167
174
  }
168
175
  },
176
+ "node_modules/debug": {
177
+ "version": "4.4.3",
178
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
179
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
180
+ "license": "MIT",
181
+ "dependencies": {
182
+ "ms": "^2.1.3"
183
+ },
184
+ "engines": {
185
+ "node": ">=6.0"
186
+ },
187
+ "peerDependenciesMeta": {
188
+ "supports-color": {
189
+ "optional": true
190
+ }
191
+ }
192
+ },
169
193
  "node_modules/delayed-stream": {
170
194
  "version": "1.0.0",
171
195
  "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -368,6 +392,19 @@
368
392
  "node": ">= 0.4"
369
393
  }
370
394
  },
395
+ "node_modules/https-proxy-agent": {
396
+ "version": "5.0.1",
397
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
398
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
399
+ "license": "MIT",
400
+ "dependencies": {
401
+ "agent-base": "6",
402
+ "debug": "4"
403
+ },
404
+ "engines": {
405
+ "node": ">= 6"
406
+ }
407
+ },
371
408
  "node_modules/lodash.identity": {
372
409
  "version": "3.0.0",
373
410
  "resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-3.0.0.tgz",
@@ -422,6 +459,12 @@
422
459
  "node": ">= 0.6"
423
460
  }
424
461
  },
462
+ "node_modules/ms": {
463
+ "version": "2.1.3",
464
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
465
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
466
+ "license": "MIT"
467
+ },
425
468
  "node_modules/object-inspect": {
426
469
  "version": "1.13.4",
427
470
  "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
@@ -435,9 +478,9 @@
435
478
  }
436
479
  },
437
480
  "node_modules/protobufjs": {
438
- "version": "7.6.3",
439
- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.3.tgz",
440
- "integrity": "sha512-+k0vdJKNdW+Vu+dYe8tZA/VvQb6XKNWexC6URwBFXxNnjLJz9nQJCemGyNgRAWD+B7+nGNc9qMPGwcD7s4nzUw==",
481
+ "version": "7.6.5",
482
+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz",
483
+ "integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==",
441
484
  "hasInstallScript": true,
442
485
  "license": "BSD-3-Clause",
443
486
  "dependencies": {
@@ -447,7 +490,6 @@
447
490
  "@protobufjs/eventemitter": "^1.1.1",
448
491
  "@protobufjs/fetch": "^1.1.1",
449
492
  "@protobufjs/float": "^1.0.2",
450
- "@protobufjs/inquire": "^1.1.2",
451
493
  "@protobufjs/path": "^1.1.2",
452
494
  "@protobufjs/pool": "^1.1.0",
453
495
  "@protobufjs/utf8": "^1.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/feishu",
3
- "version": "2026.6.11",
3
+ "version": "2026.6.34",
4
4
  "description": "OpenClaw Feishu/Lark channel plugin for chats and workplace tools (community maintained by @m1heng).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.6.11"
16
+ "openclaw": ">=2026.6.34"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -47,10 +47,10 @@
47
47
  "minHostVersion": ">=2026.5.29"
48
48
  },
49
49
  "compat": {
50
- "pluginApi": ">=2026.6.11"
50
+ "pluginApi": ">=2026.6.34"
51
51
  },
52
52
  "build": {
53
- "openclawVersion": "2026.6.11"
53
+ "openclawVersion": "2026.6.34"
54
54
  },
55
55
  "release": {
56
56
  "publishToClawHub": true,
@@ -1,8 +0,0 @@
1
- # Changelog
2
-
3
- ## [1.1.2](https://github.com/protobufjs/protobuf.js/compare/inquire-v1.1.1...inquire-v1.1.2) (2026-05-17)
4
-
5
-
6
- ### Bug Fixes
7
-
8
- * Backport bundler-safe optional module lookups ([#2254](https://github.com/protobufjs/protobuf.js/issues/2254)) ([0853a62](https://github.com/protobufjs/protobuf.js/commit/0853a625680f9247596b84ef48082b8f4e554797))
@@ -1,26 +0,0 @@
1
- Copyright (c) 2016, Daniel Wirtz All rights reserved.
2
-
3
- Redistribution and use in source and binary forms, with or without
4
- modification, are permitted provided that the following conditions are
5
- met:
6
-
7
- * Redistributions of source code must retain the above copyright
8
- notice, this list of conditions and the following disclaimer.
9
- * Redistributions in binary form must reproduce the above copyright
10
- notice, this list of conditions and the following disclaimer in the
11
- documentation and/or other materials provided with the distribution.
12
- * Neither the name of its author, nor the names of its contributors
13
- may be used to endorse or promote products derived from this software
14
- without specific prior written permission.
15
-
16
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,13 +0,0 @@
1
- @protobufjs/inquire
2
- ===================
3
- [![npm](https://img.shields.io/npm/v/@protobufjs/inquire.svg)](https://www.npmjs.com/package/@protobufjs/inquire)
4
-
5
- Requires a module only if available and hides the require call from bundlers.
6
-
7
- API
8
- ---
9
-
10
- * **inquire(moduleName: `string`): `?Object`**<br />
11
- Requires a module only if available.
12
-
13
- **License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
@@ -1,10 +0,0 @@
1
- export = inquire;
2
-
3
- /**
4
- * Requires a module only if available.
5
- * @memberof util
6
- * @param {string} moduleName Module to require
7
- * @returns {?Object} Required module if available and not empty, otherwise `null`
8
- * @deprecated Legacy optional require helper. Will be removed in a future release.
9
- */
10
- declare function inquire(moduleName: string): object;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- module.exports = inquire;
3
-
4
- /**
5
- * Requires a module only if available.
6
- * @memberof util
7
- * @param {string} moduleName Module to require
8
- * @returns {?Object} Required module if available and not empty, otherwise `null`
9
- * @deprecated Legacy optional require helper. Will be removed in a future release.
10
- */
11
- function inquire(moduleName) {
12
- try {
13
- if (typeof require !== "function") {
14
- return null;
15
- }
16
- var mod = require(moduleName);
17
- if (mod && (mod.length || Object.keys(mod).length)) return mod;
18
- return null;
19
- } catch (err) {
20
- // ignore
21
- return null;
22
- }
23
- }
24
-
25
- /*
26
- // maybe worth a shot to prevent renaming issues:
27
- // see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js
28
- // triggers on:
29
- // - expression require.cache
30
- // - expression require (???)
31
- // - call require
32
- // - call require:commonjs:item
33
- // - call require:commonjs:context
34
-
35
- Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } });
36
- var r = require.__self;
37
- delete Function.prototype.__self;
38
- */
@@ -1,21 +0,0 @@
1
- {
2
- "name": "@protobufjs/inquire",
3
- "description": "Requires a module only if available and hides the require call from bundlers.",
4
- "version": "1.1.2",
5
- "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/dcodeIO/protobuf.js.git"
9
- },
10
- "license": "BSD-3-Clause",
11
- "main": "index.js",
12
- "types": "index.d.ts",
13
- "devDependencies": {
14
- "istanbul": "^0.4.5",
15
- "tape": "^5.0.0"
16
- },
17
- "scripts": {
18
- "test": "tape tests/*.js",
19
- "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js"
20
- }
21
- }
@@ -1 +0,0 @@
1
- module.exports = [1];
@@ -1 +0,0 @@
1
- module.exports = [];
@@ -1 +0,0 @@
1
- module.exports = {};
@@ -1 +0,0 @@
1
- module.exports = { a: 1 };
@@ -1,20 +0,0 @@
1
- var tape = require("tape");
2
-
3
- var inquire = require("..");
4
-
5
- tape.test("inquire", function(test) {
6
-
7
- test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\"");
8
-
9
- test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\"");
10
-
11
- test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object");
12
-
13
- test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array");
14
-
15
- test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object");
16
-
17
- test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array");
18
-
19
- test.end();
20
- });