@xuda.io/notification_module 1.1.93 → 1.1.95

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.
Files changed (2) hide show
  1. package/index.mjs +37 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -9,7 +9,9 @@ console.log('Notifications Module loaded...');
9
9
  const require = createRequire(import.meta.url);
10
10
 
11
11
  // Load Globals
12
- global._conf = require(path.join(process.env.XUDA_HOME, process.env.XUDA_CONFIG));
12
+ global._conf = await import(path.join(process.env.XUDA_HOME, process.env.XUDA_CONFIG), {
13
+ with: { type: 'json' },
14
+ });
13
15
 
14
16
  const _common = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda_node_common.mjs'));
15
17
  const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
@@ -616,3 +618,37 @@ export const notifications_validation_fx = async (notification_id) => {
616
618
 
617
619
  return await fx[doc.topic]();
618
620
  };
621
+
622
+ // setTimeout(async () => {
623
+ // // const app_id = "vps4d6ec68e01d97ef65a8bd86088b26ca2",
624
+ // // uid = "341cf2d32991a68e4d8aaba6c16e15cc",
625
+ // // ip = "192.11.22.333",
626
+ // // name = "Boaz Avrahami";
627
+ // // const aa = await module.exports.submit_notification({
628
+ // // type: "deploy",
629
+ // // app_id: app_id,
630
+ // // uid_arr: [uid],
631
+ // // topic: "welcome_aboard_vps",
632
+ // // params: {
633
+ // // name: name,
634
+ // // ip: ip,
635
+ // // dashboard_url: `https://xuda.io/dashboard/project/${app_id}/admin/overview`,
636
+ // // dashboard_ssh_url: `https://xuda.io/dashboard/project/${app_id}/admin/overview`,
637
+ // // dashboard_ssh_assign_url: `https://xuda.io/dashboard/settings/ssh_keys`,
638
+ // // support_url: `https://xuda.io/schedule/sales?topic=Sales&subtopic=General+Inquiries`,
639
+ // // },
640
+ // // ref: null,
641
+ // // email: null,
642
+ // // });
643
+ // // console.log(aa);
644
+ // }, 2000);
645
+
646
+ // class notifications_validation_class {
647
+ // constructor(name) {
648
+ // this.name = name;
649
+ // }
650
+
651
+ // new_version_available(params) {
652
+ // console.log(`Hello, my name is ${this.name}`);
653
+ // }
654
+ // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/notification_module",
3
- "version": "1.1.93",
3
+ "version": "1.1.95",
4
4
  "description": "Xuda Notification Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {