mushroom-cli 1.1.0-alpha.17 → 1.1.0-alpha.18

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/docs/docs.html CHANGED
@@ -5037,6 +5037,10 @@ creatorId: IdRef - optional, mã người tạo
5037
5037
  holder.appendChild(copyButton);
5038
5038
  $(this).prepend(holder);
5039
5039
  copyButton.onclick = function() {
5040
+ if (location.protocol !== 'https:' && location.protocol !== 'file:') {
5041
+ alert("Can not copy, please use https protocol!");
5042
+ return;
5043
+ }
5040
5044
  const pre = $(this).parent().parent();
5041
5045
  const commandBar = $(this).parent().detach();
5042
5046
  const content = pre.text();
@@ -5052,6 +5056,10 @@ creatorId: IdRef - optional, mã người tạo
5052
5056
  copyButton.innerHTML = "Copy (without comment)";
5053
5057
  $(this).prepend(copyButton);
5054
5058
  copyButton.onclick = function() {
5059
+ if (location.protocol !== 'https:' && location.protocol !== 'file:') {
5060
+ alert("Can not copy, please use https protocol!");
5061
+ return;
5062
+ }
5055
5063
  const pre = $(this).parent().parent();
5056
5064
  const commandBar = $(this).parent().detach();
5057
5065
  pre.find(".code-comment").each(function() {
package/gen/gen-csharp.js CHANGED
@@ -645,7 +645,20 @@ ${content}
645
645
  }
646
646
  `;
647
647
 
648
- fs.writeFileSync(aliasProject.output + "/Resources/" + className + ".cs", content);
648
+ out.allClasses = out.allClasses || [];
649
+
650
+ const normalizedName = className.toLowerCase();
651
+ const duplicate = out.allClasses.find(c => c.normalizedName == normalizedName);
652
+ if (duplicate) {
653
+ fs.appendFileSync(aliasProject.output + "/Resources/" + duplicate.className + ".cs", content);
654
+ }
655
+ else {
656
+ out.allClasses.push({
657
+ className,
658
+ normalizedName
659
+ });
660
+ fs.writeFileSync(aliasProject.output + "/Resources/" + className + ".cs", content);
661
+ }
649
662
  }
650
663
 
651
664
  function genCSharpMongoDbClassesToFolder(projectName, alias, source, aliasProject) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mushroom-cli",
3
- "version": "1.1.0-alpha.17",
3
+ "version": "1.1.0-alpha.18",
4
4
  "description": "Mushroom CLI",
5
5
  "main": "mr.js",
6
6
  "scripts": {