Comparing version 16.3.1 to 16.3.2
@@ -560,2 +560,3 @@ import { createRequire as createRequireBecauseEsbuild } from 'module'; | ||
// src/electron-host/electron-entry.js | ||
import path from "node:path"; | ||
import { syncBuiltinESMExports } from "node:module"; | ||
@@ -582,5 +583,10 @@ | ||
const electronWorkerData = getElectronWorkerData(); | ||
const { BrowserWindow } = await import("electron"); | ||
const { app, BrowserWindow } = await import("electron"); | ||
interceptInProcess(electronWorkerData); | ||
try { | ||
app.getAppPath = new Proxy(app.getAppPath, { | ||
apply(target, ctx, args) { | ||
return path.dirname(electronWorkerData.main); | ||
} | ||
}); | ||
const WebContents = process._linkedBinding( | ||
@@ -740,18 +746,18 @@ "electron_browser_web_contents" | ||
// src/config.js | ||
import path from "node:path"; | ||
import path2 from "node:path"; | ||
import { pathToFileURL as pathToFileURL2 } from "node:url"; | ||
var DIR_NAME = ".dvlp"; | ||
var TESTING = process.env.NODE_ENV === "dvlptest" || process.env.CI != void 0; | ||
var VERSION = "16.3.1"; | ||
var dirPath = path.resolve(DIR_NAME); | ||
var versionDirPath = path.join(dirPath, VERSION); | ||
var VERSION = "16.3.2"; | ||
var dirPath = path2.resolve(DIR_NAME); | ||
var versionDirPath = path2.join(dirPath, VERSION); | ||
var applicationLoaderURL = pathToFileURL2( | ||
path.join(versionDirPath, "app-loader.mjs") | ||
path2.join(versionDirPath, "app-loader.mjs") | ||
); | ||
var bundleDirName = path.join(DIR_NAME, VERSION, "bundled"); | ||
var bundleDirPath = path.resolve(bundleDirName); | ||
var bundleDirMetaPath = path.join(bundleDirPath, "__meta__.json"); | ||
var bundleDirName = path2.join(DIR_NAME, VERSION, "bundled"); | ||
var bundleDirPath = path2.resolve(bundleDirName); | ||
var bundleDirMetaPath = path2.join(bundleDirPath, "__meta__.json"); | ||
var defaultPort = process.env.PORT ? Number(process.env.PORT) : 8080; | ||
var electronEntryURL = pathToFileURL2( | ||
path.join(versionDirPath, "electron-entry.mjs") | ||
path2.join(versionDirPath, "electron-entry.mjs") | ||
); | ||
@@ -768,3 +774,3 @@ var config = { | ||
dirPath, | ||
dvlpDirPath: path.resolve(DIR_NAME), | ||
dvlpDirPath: path2.resolve(DIR_NAME), | ||
electronEntryURL, | ||
@@ -861,3 +867,3 @@ esbuildTargetByExtension: { | ||
import fs from "node:fs"; | ||
import path2 from "node:path"; | ||
import path3 from "node:path"; | ||
var RE_LOCALHOST = /localhost|127\.0\.0\.1/; | ||
@@ -867,3 +873,3 @@ var RE_NODE_MODULES = /node_modules/; | ||
function isJsFilePath(filePath) { | ||
return config_default.extensionsByType.js.includes(path2.extname(filePath)); | ||
return config_default.extensionsByType.js.includes(path3.extname(filePath)); | ||
} | ||
@@ -962,3 +968,3 @@ function isLocalhost(url) { | ||
// src/utils/file.js | ||
import path3 from "node:path"; | ||
import path4 from "node:path"; | ||
var MAX_FILE_SYSTEM_DEPTH = 10; | ||
@@ -968,11 +974,11 @@ var realPath2 = "native" in fs2.realpathSync && typeof fs2.realpathSync.native === "function" ? fs2.realpathSync.native : fs2.realpathSync; | ||
function findClosest(fileName) { | ||
let dir = path3.resolve(fileName); | ||
let dir = path4.resolve(fileName); | ||
let depth = MAX_FILE_SYSTEM_DEPTH; | ||
let parent; | ||
while (true) { | ||
parent = path3.dirname(dir); | ||
parent = path4.dirname(dir); | ||
if (!--depth || parent.toLowerCase() === dir.toLowerCase()) { | ||
break; | ||
} | ||
const filePath = path3.resolve(dir, fileName); | ||
const filePath = path4.resolve(dir, fileName); | ||
if (fs2.existsSync(filePath)) { | ||
@@ -987,3 +993,3 @@ return filePath; | ||
const gitDir = findClosest(".git"); | ||
repoPath = gitDir !== void 0 ? path3.dirname(gitDir) : process.cwd(); | ||
repoPath = gitDir !== void 0 ? path4.dirname(gitDir) : process.cwd(); | ||
} | ||
@@ -1104,7 +1110,7 @@ return repoPath; | ||
} | ||
let { host, path: path4, port } = options; | ||
let { host, path: path5, port } = options; | ||
if (!host.includes(":") && port != null) { | ||
host += `:${port}`; | ||
} | ||
return `${protocol}://${host}${path4}`; | ||
return `${protocol}://${host}${path5}`; | ||
} | ||
@@ -1111,0 +1117,0 @@ function notifyListeners(listeners, url) { |
@@ -17,2 +17,3 @@ // src/electron-host/electron-entry.js | ||
// src/electron-host/electron-entry.js | ||
import path from "node:path"; | ||
import { syncBuiltinESMExports } from "node:module"; | ||
@@ -39,5 +40,10 @@ | ||
const electronWorkerData = getElectronWorkerData(); | ||
const { BrowserWindow } = await import("electron"); | ||
const { app, BrowserWindow } = await import("electron"); | ||
interceptInProcess(electronWorkerData); | ||
try { | ||
app.getAppPath = new Proxy(app.getAppPath, { | ||
apply(target, ctx, args) { | ||
return path.dirname(electronWorkerData.main); | ||
} | ||
}); | ||
const WebContents = process._linkedBinding( | ||
@@ -44,0 +50,0 @@ "electron_browser_web_contents" |
{ | ||
"name": "dvlp", | ||
"version": "16.3.1", | ||
"version": "16.3.2", | ||
"description": "A no-nonsense dev server toolkit to help you develop quickly and easily for the web", | ||
@@ -94,3 +94,3 @@ "type": "module", | ||
"lint:types": "tsc --noEmit --skipLibCheck ", | ||
"test": "cross-env NODE_ENV=dvlptest NODE_OPTIONS=\"--enable-source-maps --no-warnings\" NODE_TLS_REJECT_UNAUTHORIZED=\"0\" mocha --reporter spec --bail --exit --timeout 10000 --require ./test/unit/init.js test/unit/index.js", | ||
"test": "cross-env NODE_ENV=dvlptest NODE_TLS_REJECT_UNAUTHORIZED=\"0\" mocha --reporter spec --bail --exit --timeout 10000 --require ./test/unit/init.js test/unit/index.js", | ||
"test:browser": "pnpm run build && ./bin/dvlp.js --mock test/browser/fixtures/mock test/browser", | ||
@@ -97,0 +97,0 @@ "test:integration": "pnpm run build && cross-env NODE_ENV=dvlptest mocha test/integration/*-test.js --reporter spec --exit --timeout 10000" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1313180
35316