alado 1.7.3 → 1.7.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alado",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "Extremely fast, lightweight, robust framework for HTTP applications written in Node.js",
5
5
  "keywords": [
6
6
  "HTTP",
@@ -16,7 +16,7 @@
16
16
  "license": "MIT",
17
17
  "scripts": {
18
18
  "build": "rm -rf dist && tsc && tsc-alias && eslint src/**/*.ts{,x}",
19
- "postinstall": "sh postinstall.sh",
19
+ "postinstall": "node postinstall.js",
20
20
  "eslint": "eslint src --ext .ts",
21
21
  "test": "echo \"Error: no test specified\" && exit 0",
22
22
  "prettier-check": "prettier . --check",
@@ -0,0 +1,9 @@
1
+ @echo off
2
+
3
+ :: Copy the file to the destination
4
+ copy /Y "accets\swagger-initializer.js" "..\swagger-ui-dist\swagger-initializer.js"
5
+
6
+ :: Set full permissions on the file (equivalent to chmod -R 777)
7
+ icacls "..\swagger-ui-dist\swagger-initializer.js" /grant Everyone:F
8
+
9
+ echo Post-installation script completed.
package/postinstall.js ADDED
@@ -0,0 +1,12 @@
1
+ const { exec } = require("child_process");
2
+
3
+ const script = process.platform === "win32" ? "postinstall.bat" : "sh postinstall.sh";
4
+
5
+ exec(script, (err, stdout, stderr) => {
6
+ if (err) {
7
+ console.error(`Error: ${stderr}`);
8
+ process.exit(1);
9
+ } else {
10
+ console.log(stdout);
11
+ }
12
+ });
package/postinstall.sh CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/bin/bash
2
2
  cp accets/swagger-initializer.js ../swagger-ui-dist/swagger-initializer.js;
3
3
  chmod -R 777 ../swagger-ui-dist/swagger-initializer.js;
4
+ echo Post-installation script completed.