multicloud_rule_manager 1.1.57 → 1.1.59

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/commands/deploy.js +11 -0
  2. package/package.json +1 -1
@@ -66,7 +66,9 @@ export default {
66
66
  },
67
67
  body: JSON.stringify({
68
68
 
69
+
69
70
  dsl_internal: content
71
+
70
72
  })
71
73
  });
72
74
 
@@ -81,6 +83,8 @@ export default {
81
83
  ) {
82
84
  console.warn(`⚠️ Rule ${guid} non trovata, provo creazione...`);
83
85
 
86
+ const filename = file.substring(0, file.lastIndexOf("_"));
87
+ const startDate = new Date().toISOString().replace("Z", "000");
84
88
  const resp = await fetch(`https://${cred.realm}.bit2win.cloud/api/data/v1/rules`, {
85
89
  method: "POST",
86
90
  headers: {
@@ -89,6 +93,13 @@ export default {
89
93
  },
90
94
  body: JSON.stringify({
91
95
 
96
+
97
+ context: "catalog",
98
+ name: filename,
99
+ end_date: null,
100
+ agenda_group: "always",
101
+ status: "draft",
102
+ start_date: startDate,
92
103
  dsl_internal: content
93
104
  })
94
105
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multicloud_rule_manager",
3
- "version": "1.1.57",
3
+ "version": "1.1.59",
4
4
  "description": "CLI interna per retrieve/upload con token",
5
5
  "main": "index.js",
6
6
  "type": "module",