felixriddle.pid-discovery
Advanced tools
Comparing version 1.0.1 to 1.0.2
/** | ||
* Update app information on the database | ||
*/ | ||
declare function updateAppInfo(): void; | ||
declare function updateAppInfo(): Promise<void>; | ||
export { updateAppInfo }; |
@@ -29,2 +29,22 @@ "use strict"; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
var __async = (__this, __arguments, generator) => { | ||
return new Promise((resolve, reject) => { | ||
var fulfilled = (value) => { | ||
try { | ||
step(generator.next(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var rejected = (value) => { | ||
try { | ||
step(generator.throw(value)); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
}; | ||
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); | ||
step((generator = generator.apply(__this, __arguments)).next()); | ||
}); | ||
}; | ||
@@ -40,18 +60,20 @@ // src/index.ts | ||
function updateAppInfo() { | ||
const raw = import_fs.default.readFileSync(import_path.default.join(__dirname, "../", "package.json")); | ||
const packageJson = JSON.parse(raw.toString()); | ||
const url = `http://localhost:24000`; | ||
const headers = { | ||
"Content-Type": "application/json" | ||
}; | ||
const data = { | ||
name: packageJson.name, | ||
pid: process.pid, | ||
appType: "application", | ||
url: `` | ||
}; | ||
fetch(`${url}/process`, { | ||
method: "POST", | ||
headers, | ||
body: JSON.stringify(data) | ||
return __async(this, null, function* () { | ||
const raw = import_fs.default.readFileSync(import_path.default.join(__dirname, "../", "package.json")); | ||
const packageJson = JSON.parse(raw.toString()); | ||
const url = `http://localhost:24000`; | ||
const headers = { | ||
"Content-Type": "application/json" | ||
}; | ||
const data = { | ||
name: packageJson.name, | ||
pid: process.pid, | ||
appType: "application", | ||
url: `` | ||
}; | ||
yield fetch(`${url}/process`, { | ||
method: "POST", | ||
headers, | ||
body: JSON.stringify(data) | ||
}); | ||
}); | ||
@@ -58,0 +80,0 @@ } |
{ | ||
"name": "felixriddle.pid-discovery", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8593
133