@sjcrh/proteinpaint-front 2.216.0 → 2.217.0
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/bundles.tgz +0 -0
- package/init.js +22 -8
- package/package.json +3 -3
package/bundles.tgz
CHANGED
|
Binary file
|
package/init.js
CHANGED
|
@@ -36,23 +36,27 @@ const BIN_READY = `${BIN_DIR}/.pp-bundle-ready`
|
|
|
36
36
|
|
|
37
37
|
console.log('CWD', CWD)
|
|
38
38
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
39
|
+
// The public dir and its index.html and cards are optional: when they cannot be added, such as to a public/ mount
|
|
40
|
+
// that this process cannot write to, the server serves the copies in this package instead (see the server's
|
|
41
|
+
// serverconfig frontPublicDir and app.middlewares.js), so a failure is a warning, not an error.
|
|
42
|
+
mayAddToPublic(`make a public directory at ${CWD}`, () => {
|
|
43
|
+
if (!fs.existsSync(PUBLIC_DIR)) fs.mkdirSync(PUBLIC_DIR)
|
|
44
|
+
})
|
|
43
45
|
// index.html / cards are ensured independently of the bundle below (idempotent, and needed even when
|
|
44
46
|
// the bundle is reused), so a skipped regeneration still leaves the public scaffolding in place.
|
|
45
47
|
if (!publicBinOnly) {
|
|
46
|
-
|
|
48
|
+
mayAddToPublic('create a public/index.html file', () => {
|
|
49
|
+
if (fs.existsSync(`${PUBLIC_DIR}/index.html`)) return
|
|
47
50
|
console.log(`creating a public/index.html file`)
|
|
48
51
|
fs.copyFileSync(path.join(__dirname, './public/index.html'), `${PUBLIC_DIR}/index.html`)
|
|
49
|
-
}
|
|
50
|
-
|
|
52
|
+
})
|
|
53
|
+
mayAddToPublic('copy cards into the public/cards folder', () => {
|
|
54
|
+
if (fs.existsSync(`${PUBLIC_DIR}/cards`)) return
|
|
51
55
|
console.log(`Copying cards into public/cards folder`)
|
|
52
56
|
execSync(`cp -r ${CWD}/node_modules/@sjcrh/proteinpaint-front/public/cards ${PUBLIC_DIR}/cards`, {
|
|
53
57
|
stdio: 'inherit'
|
|
54
58
|
})
|
|
55
|
-
}
|
|
59
|
+
})
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
// Generate the bundle into CWD/bin only if it isn't already there. CWD/bin is in the container's
|
|
@@ -92,3 +96,13 @@ try {
|
|
|
92
96
|
console.error(e)
|
|
93
97
|
throw e
|
|
94
98
|
}
|
|
99
|
+
|
|
100
|
+
function mayAddToPublic(action, fn) {
|
|
101
|
+
try {
|
|
102
|
+
fn()
|
|
103
|
+
} catch (e) {
|
|
104
|
+
console.warn(
|
|
105
|
+
`unable to ${action}, the server serves the proteinpaint-front package copy: ${e.code || e.message || e}`
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-front",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.217.0",
|
|
4
4
|
"browser": "src/app.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": "init.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test:integration": "echo 'TODO: front integration tests'"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@sjcrh/proteinpaint-client": "2.
|
|
17
|
+
"@sjcrh/proteinpaint-client": "2.217.0",
|
|
18
18
|
"webpack": "^5.76.0",
|
|
19
19
|
"webpack-cli": "^4.9.2",
|
|
20
20
|
"webpack-node-externals": "^3.0.0"
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"url": "https://github.com/stjude/proteinpaint",
|
|
33
33
|
"directory": "front"
|
|
34
34
|
},
|
|
35
|
-
"_buildTime": "2026-10-
|
|
35
|
+
"_buildTime": "2026-10-05T18:42:06Z"
|
|
36
36
|
}
|