hdoc-tools 0.55.1 → 0.55.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.
package/.puppeteerrc.cjs
CHANGED
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
// Discovered by Puppeteer (cosmiconfig) walking up from node_modules/.../puppeteer
|
|
8
8
|
// to this package root during install. skipDownload only affects provisioning,
|
|
9
9
|
// not where the browser is launched from at runtime.
|
|
10
|
+
const path = require("node:path");
|
|
11
|
+
|
|
10
12
|
module.exports = {
|
|
11
13
|
skipDownload: true,
|
|
14
|
+
// Pin a fixed, user-independent cache dir inside the package root. Under a
|
|
15
|
+
// global install, postinstall runs as root (sudo) while `hdoc` later runs as
|
|
16
|
+
// a normal user; os.homedir() resolves to different homes for each, so the
|
|
17
|
+
// old ~/.cache/puppeteer default left the browser in root's home and the
|
|
18
|
+
// runtime launch (a normal user) never found it. Anchoring to __dirname makes
|
|
19
|
+
// install-time provisioning and runtime launch agree on one absolute path.
|
|
20
|
+
cacheDir: path.join(__dirname, ".cache", "puppeteer"),
|
|
12
21
|
};
|
package/hdoc-install-browser.js
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
(async () => {
|
|
22
22
|
const fs = require("node:fs");
|
|
23
23
|
const path = require("node:path");
|
|
24
|
-
const os = require("node:os");
|
|
25
24
|
const {
|
|
26
25
|
install,
|
|
27
26
|
computeExecutablePath,
|
|
@@ -42,12 +41,14 @@
|
|
|
42
41
|
const log = (msg) => console.log(`[hdoc-tools] ${msg}`);
|
|
43
42
|
|
|
44
43
|
// Resolve the cache directory the same way Puppeteer does at runtime:
|
|
45
|
-
// PUPPETEER_CACHE_DIR wins, otherwise the
|
|
46
|
-
//
|
|
47
|
-
//
|
|
44
|
+
// PUPPETEER_CACHE_DIR wins, otherwise the fixed cacheDir declared in
|
|
45
|
+
// .puppeteerrc.cjs. Reading the shared config (rather than recomputing from
|
|
46
|
+
// os.homedir()) guarantees we install to exactly the path the browser is
|
|
47
|
+
// later launched from — critical for `sudo npm i -g`, where postinstall runs
|
|
48
|
+
// as root but `hdoc` runs as a normal user with a different home directory.
|
|
48
49
|
const cacheDir =
|
|
49
50
|
process.env.PUPPETEER_CACHE_DIR ||
|
|
50
|
-
path.join(
|
|
51
|
+
require(path.join(__dirname, ".puppeteerrc.cjs")).cacheDir;
|
|
51
52
|
|
|
52
53
|
let platform;
|
|
53
54
|
try {
|
package/package.json
CHANGED
|
@@ -35,18 +35,17 @@
|
|
|
35
35
|
"description": "The ID of the product family this book belongs to.",
|
|
36
36
|
"enum": [
|
|
37
37
|
"esp",
|
|
38
|
+
"com.hornbill.docmanager",
|
|
38
39
|
"com.hornbill.boardmanager",
|
|
39
40
|
"com.hornbill.customermanager",
|
|
40
|
-
"com.hornbill.collaboration",
|
|
41
|
-
"com.hornbill.docmanager",
|
|
42
41
|
"com.hornbill.grc",
|
|
43
42
|
"com.hornbill.itom",
|
|
44
43
|
"com.hornbill.livechat",
|
|
45
|
-
"com.hornbill.pricingcalculator",
|
|
46
44
|
"com.hornbill.projectmanager",
|
|
47
45
|
"com.hornbill.servicemanager",
|
|
48
46
|
"com.hornbill.suppliermanager",
|
|
49
47
|
"com.hornbill.timesheetmanager",
|
|
48
|
+
"com.hornbill.collaboration",
|
|
50
49
|
"appdev",
|
|
51
50
|
"hdocs"
|
|
52
51
|
]
|