myoperator-ui 0.0.78 → 0.0.80

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/dist/index.js +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3247,7 +3247,7 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
3247
3247
  ref={ref}
3248
3248
  className={cn(
3249
3249
  pageHeaderVariants(),
3250
- "h-[76px] px-4",
3250
+ "h-[76px] px-4 pt-4",
3251
3251
  className
3252
3252
  )}
3253
3253
  {...props}
@@ -4975,10 +4975,16 @@ import fs4 from "fs-extra";
4975
4975
  import path4 from "path";
4976
4976
  import prompts3 from "prompts";
4977
4977
  import ora3 from "ora";
4978
+ function normalizeContent(content) {
4979
+ return content.split("\n").map((line) => line.trimEnd()).join("\n").replace(/\r\n/g, "\n").trimEnd();
4980
+ }
4981
+ function hasRealChanges(oldContent, newContent) {
4982
+ return normalizeContent(oldContent) !== normalizeContent(newContent);
4983
+ }
4978
4984
  function generateDiff(oldContent, newContent, filename) {
4979
4985
  const oldLines = oldContent.split("\n");
4980
4986
  const newLines = newContent.split("\n");
4981
- if (oldContent === newContent) {
4987
+ if (!hasRealChanges(oldContent, newContent)) {
4982
4988
  return chalk3.gray(` ${filename}: No changes`);
4983
4989
  }
4984
4990
  const changes = [];
@@ -5123,7 +5129,7 @@ async function update(components, options) {
5123
5129
  const filePath = path4.join(componentsDir, file.name);
5124
5130
  const oldContent = await fs4.readFile(filePath, "utf-8");
5125
5131
  const newContent = file.content;
5126
- const hasChanges = oldContent !== newContent;
5132
+ const hasChanges = hasRealChanges(oldContent, newContent);
5127
5133
  changesInfo.push({ name: componentName, file: file.name, oldContent, newContent, hasChanges });
5128
5134
  const diff = generateDiff(oldContent, newContent, file.name);
5129
5135
  console.log(diff);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",