@sjcrh/proteinpaint-front 2.87.1 → 2.88.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.
Files changed (3) hide show
  1. package/bundles.tgz +0 -0
  2. package/init.js +9 -3
  3. package/package.json +2 -2
package/bundles.tgz CHANGED
Binary file
package/init.js CHANGED
@@ -36,20 +36,26 @@ try {
36
36
  }
37
37
  }
38
38
  const tar = ps.spawnSync('tar', [`-xzf`, `${__dirname}/bundles.tgz`, `-C`, `${CWD}`], { encoding: 'utf8' })
39
- if (tar.stderr) throw tar.stderr
39
+ if (tar.status !== 0) {
40
+ throw new Error(`Tar command failed with exit code ${tar.status}: ${tar.stderr}`)
41
+ }
42
+ if (tar.stderr) {
43
+ console.warn('Tar command warnings:', tar.stderr)
44
+ }
40
45
  console.log(`Setting the dynamic bundle path to ${URLPATH}`)
41
46
  const codeFile = `${CWD}/public/bin/proteinpaint.js`
42
47
  // remember the modified time before setting the bundle public path
43
48
  const mtime = fs.statSync(codeFile).mtime
44
49
  const code = fs.readFileSync(codeFile, { encoding: 'utf8' })
45
50
  const newcode = code.replace(`__PP_URL__`, `${URLPATH}/bin/`)
46
- fs.writeFileSync(codeFile, newcode, { encoding: 'utf8' }, () => {})
51
+ fs.writeFileSync(codeFile, newcode, { encoding: 'utf8' })
47
52
  try {
48
53
  // reset the atime and mtime to the original mtime before setting the bundle publit path
49
- fs.utimesSync(codepath, mtime, mtime)
54
+ fs.utimesSync(codeFile, mtime, mtime)
50
55
  } catch (e) {
51
56
  console.log('--- !!! unable to reset the mtime for the extracted proteinpaint bundle: ', e)
52
57
  }
53
58
  } catch (e) {
54
59
  console.error(e)
60
+ throw e
55
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-front",
3
- "version": "2.87.1",
3
+ "version": "2.88.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.87.1",
15
+ "@sjcrh/proteinpaint-client": "2.88.0",
16
16
  "webpack": "^5.76.0",
17
17
  "webpack-cli": "^4.9.2",
18
18
  "webpack-node-externals": "^3.0.0",