@sjcrh/proteinpaint-front 2.80.0 → 2.81.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 +9 -2
- package/package.json +2 -2
package/bundles.tgz
CHANGED
|
Binary file
|
package/init.js
CHANGED
|
@@ -22,12 +22,11 @@ try {
|
|
|
22
22
|
}
|
|
23
23
|
if (fs.existsSync(`${CWD}/public/bin`)) {
|
|
24
24
|
console.log(`removing the old public/bin at ${CWD}`)
|
|
25
|
-
// TODO: node 12 in pp-prt does not support rmSync,
|
|
26
25
|
// should update as part of v16 upgrade
|
|
27
26
|
fs.rmdirSync(`${CWD}/public/bin`, { recursive: true, force: true }, () => {})
|
|
28
27
|
}
|
|
29
28
|
if (!fs.existsSync(`${CWD}/public/cards`)) {
|
|
30
|
-
console.log(`
|
|
29
|
+
console.log(`Copying cards into public/cards folder`)
|
|
31
30
|
execSync(`cp -r ${CWD}/node_modules/@sjcrh/proteinpaint-front/public/cards ${CWD}/public/cards`, {
|
|
32
31
|
stdio: 'inherit'
|
|
33
32
|
})
|
|
@@ -36,9 +35,17 @@ try {
|
|
|
36
35
|
if (tar.stderr) throw tar.stderr
|
|
37
36
|
console.log(`Setting the dynamic bundle path to ${URLPATH}`)
|
|
38
37
|
const codeFile = `${CWD}/public/bin/proteinpaint.js`
|
|
38
|
+
// remember the modified time before setting the bundle public path
|
|
39
|
+
const mtime = fs.statSync(codeFile).mtime
|
|
39
40
|
const code = fs.readFileSync(codeFile, { encoding: 'utf8' })
|
|
40
41
|
const newcode = code.replace(`__PP_URL__`, `${URLPATH}/bin/`)
|
|
41
42
|
fs.writeFileSync(codeFile, newcode, { encoding: 'utf8' }, () => {})
|
|
43
|
+
try {
|
|
44
|
+
// reset the atime and mtime to the original mtime before setting the bundle publit path
|
|
45
|
+
fs.utimesSync(codepath, mtime, mtime)
|
|
46
|
+
} catch (e) {
|
|
47
|
+
console.log('--- !!! unable to reset the mtime for the extracted proteinpaint bundle: ', e)
|
|
48
|
+
}
|
|
42
49
|
} catch (e) {
|
|
43
50
|
console.error(e)
|
|
44
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjcrh/proteinpaint-front",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0",
|
|
4
4
|
"browser": "src/app.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": "init.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test:integration": "echo 'TODO: front integration tests'"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@sjcrh/proteinpaint-client": "2.
|
|
15
|
+
"@sjcrh/proteinpaint-client": "2.81.0",
|
|
16
16
|
"webpack": "^5.76.0",
|
|
17
17
|
"webpack-cli": "^4.9.2",
|
|
18
18
|
"webpack-node-externals": "^3.0.0",
|