@jonathanleelx/meddle 0.4.0-beta.1 → 0.4.0-beta.2

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.
@@ -100,7 +100,7 @@ function compareVersions(a, b) {
100
100
  */
101
101
  async function getLatestVersionNpm({ fetchImpl, registryUrl, timeoutMs } = {}) {
102
102
  const doFetch = fetchImpl || fetch
103
- const url = registryUrl || DEFAULT_NPM_REGISTRY_URL
103
+ const url = registryUrl || process.env.MEDDLE_NPM_REGISTRY_URL || DEFAULT_NPM_REGISTRY_URL
104
104
  const response = await doFetch(url, { signal: AbortSignal.timeout(timeoutMs || DEFAULT_TIMEOUT_MS) })
105
105
  if (!response.ok) throw new Error(`npm registry responded ${response.status}`)
106
106
  const data = await response.json()
@@ -116,7 +116,7 @@ async function getLatestVersionNpm({ fetchImpl, registryUrl, timeoutMs } = {}) {
116
116
  */
117
117
  async function getLatestVersionGithub({ fetchImpl, latestUrl, timeoutMs } = {}) {
118
118
  const doFetch = fetchImpl || fetch
119
- const url = latestUrl || DEFAULT_GITHUB_LATEST_URL
119
+ const url = latestUrl || process.env.MEDDLE_GITHUB_LATEST_URL || DEFAULT_GITHUB_LATEST_URL
120
120
  const response = await doFetch(url, {
121
121
  redirect: 'manual',
122
122
  signal: AbortSignal.timeout(timeoutMs || DEFAULT_TIMEOUT_MS),
@@ -245,7 +245,7 @@ function sha256Hex(buffer) {
245
245
  */
246
246
  async function downloadBinaryAsset(opts) {
247
247
  const { version, destFile, platform, arch } = opts
248
- const baseUrl = opts.baseUrl || DEFAULT_DOWNLOAD_BASE_URL
248
+ const baseUrl = opts.baseUrl || process.env.MEDDLE_UPDATE_BASE_URL || DEFAULT_DOWNLOAD_BASE_URL
249
249
  const doFetch = opts.fetchImpl || fetch
250
250
  const fsImpl = opts.fsImpl || fs
251
251
  const payloadTimeout = opts.timeoutMs || DEFAULT_DOWNLOAD_TIMEOUT_MS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonathanleelx/meddle",
3
- "version": "0.4.0-beta.1",
3
+ "version": "0.4.0-beta.2",
4
4
  "description": "A simple development proxy server with custom routing rules, mock responses, HTTPS interception, and a plugin system",
5
5
  "type": "commonjs",
6
6
  "main": "index.js",
@@ -20,6 +20,7 @@
20
20
  "test:identity": "pnpm run build && node scripts/application-identity-smoke.js",
21
21
  "test:e2e": "npm run build:web && npm run build && node tests/e2e/interactions.e2e.cjs",
22
22
  "test:e2e:rule-drag": "npm run build:web && npm run build && node tests/e2e/rule-drag.e2e.cjs",
23
+ "test:e2e:update": "node tests/e2e/update.e2e.cjs",
23
24
  "test:watch": "vitest",
24
25
  "test:refactor": "npm run build && node -c index.js && npm test",
25
26
  "bench:logs": "node scripts/log-performance-benchmark.js",