Website: Update how scripts and mdm commands are stored in the website's configuration. (#39997)

Changes:
- Updated the version of Sails.js used by the website
- Changed how scripts and MDM commands are stored in the website's JSON
configuration.
This commit is contained in:
Eric
2026-02-19 11:26:29 -06:00
committed by GitHub
parent 39b0d5b507
commit ea5260e6e3
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
"jsonwebtoken": "9.0.2",
"jsrsasign": "11.1.0",
"moment": "2.29.4",
"sails": "^1.5.14",
"sails": "^1.5.17",
"sails-hook-apianalytics": "^2.0.6",
"sails-hook-organics": "^3.0.0",
"sails-hook-orm": "^4.0.3",
+4 -3
View File
@@ -1482,7 +1482,7 @@ module.exports = {
// Add the uninstall script and the latest version to this app's configuration.
// Note: we esacape the uninstall script to prevent issues when storing these values in the website's JSON configuration.
appInformation.uninstallScript = _.escape(scriptToUninstallThisApp);
appInformation.uninstallScript = scriptToUninstallThisApp;
appInformation.version = latestVersionOfThisApp.version.split(',')[0];
appLibrary.push(appInformation);
});
@@ -1523,7 +1523,7 @@ module.exports = {
}
// Format the script so it be safely stored as a string in the website's JSON configuration.
script.script = _.escape(script.script);
script.script = script.script;
// Create a url slug for this script
script.slug = _.kebabCase(script.platform+' '+script.name);// ex: macos-collect-fleetd-logs
@@ -1584,8 +1584,9 @@ module.exports = {
command.lineNumberInYaml = lineNumberForEdittingThisCommand; // Set the line number for edits.
command.command = _.escape(command.command);
// Note: The command descriptions are escaped because they include references to XML tags (e.g., <Data>) that can cause issues with Vue.
command.description = _.escape(command.description);
command.command = command.command;
// Create a url slug for this script
command.slug = _.kebabCase(command.platform+' '+command.name);
+1 -1
View File
@@ -40,7 +40,7 @@
<% }%>
<div purpose="codeblock">
<div purpose="copy-button"></div>
<pre><code class="hljs bash"><%= _.unescape(thisApp.uninstallScript) %></code></pre>
<pre><code class="hljs bash"><%= thisApp.uninstallScript %></code></pre>
</div>
</div>
<div purpose="app-check">
+1 -1
View File
@@ -28,7 +28,7 @@
<div purpose="copy-button"></div>
</div>
</div>
<pre><code class="hljs xml"><%= _.unescape(thisCommand.command) %></code></pre>
<pre><code class="hljs xml"><%= thisCommand.command %></code></pre>
</div>
</div>
</div>
+2 -2
View File
@@ -23,9 +23,9 @@
</div>
</div>
<%if(thisScript.platform === 'windows'){%>
<pre><code class="hljs ps has-linebreaks"><%= _.unescape(thisScript.script) %></code></pre>
<pre><code class="hljs ps has-linebreaks"><%= thisScript.script %></code></pre>
<%} else {%>
<pre><code class="hljs sh has-linebreaks"><%= _.unescape(thisScript.script) %></code></pre>
<pre><code class="hljs sh has-linebreaks"><%= thisScript.script %></code></pre>
<%}%>
</div>
</div>