breeze-bindgen 1.1.16 → 1.1.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/dist/cli.mjs CHANGED
@@ -323,7 +323,8 @@ declare module '${tsModuleName}' {
323
323
  }
324
324
  }
325
325
  const methodName = node.name;
326
- if (methodName.startsWith("get_") && parsed.args.length === 0) {
326
+ const isStatic = node.storageClass === "static";
327
+ if (methodName.startsWith("get_") && parsed.args.length === 0 && !isStatic) {
327
328
  const propName = methodName.substring(4);
328
329
  methods.push({
329
330
  name: methodName,
@@ -335,7 +336,7 @@ declare module '${tsModuleName}' {
335
336
  isGetter: true,
336
337
  propertyName: propName
337
338
  });
338
- } else if (methodName.startsWith("set_") && parsed.args.length === 1) {
339
+ } else if (methodName.startsWith("set_") && parsed.args.length === 1 && !isStatic) {
339
340
  const propName = methodName.substring(4);
340
341
  methods.push({
341
342
  name: methodName,
@@ -426,10 +427,8 @@ template<> struct js_bind<${fullName}> {
426
427
  }
427
428
  }
428
429
  for (const method of methods) {
429
- if (!method.isGetter && !method.isSetter) {
430
- binding += `
430
+ binding += `
431
431
  .${method.static ? "static_" : ""}fun<&${fullName}::${method.name}>("${method.name}")`;
432
- }
433
432
  }
434
433
  for (const field of fields) {
435
434
  binding += `
package/dist/core.cjs CHANGED
@@ -533,7 +533,8 @@ declare module '${tsModuleName}' {
533
533
  }
534
534
  }
535
535
  const methodName = node.name;
536
- if (methodName.startsWith("get_") && parsed.args.length === 0) {
536
+ const isStatic = node.storageClass === "static";
537
+ if (methodName.startsWith("get_") && parsed.args.length === 0 && !isStatic) {
537
538
  const propName = methodName.substring(4);
538
539
  methods.push({
539
540
  name: methodName,
@@ -545,7 +546,7 @@ declare module '${tsModuleName}' {
545
546
  isGetter: true,
546
547
  propertyName: propName
547
548
  });
548
- } else if (methodName.startsWith("set_") && parsed.args.length === 1) {
549
+ } else if (methodName.startsWith("set_") && parsed.args.length === 1 && !isStatic) {
549
550
  const propName = methodName.substring(4);
550
551
  methods.push({
551
552
  name: methodName,
@@ -636,10 +637,8 @@ template<> struct js_bind<${fullName}> {
636
637
  }
637
638
  }
638
639
  for (const method of methods) {
639
- if (!method.isGetter && !method.isSetter) {
640
- binding += `
640
+ binding += `
641
641
  .${method.static ? "static_" : ""}fun<&${fullName}::${method.name}>("${method.name}")`;
642
- }
643
642
  }
644
643
  for (const field of fields) {
645
644
  binding += `
package/dist/core.mjs CHANGED
@@ -529,7 +529,8 @@ declare module '${tsModuleName}' {
529
529
  }
530
530
  }
531
531
  const methodName = node.name;
532
- if (methodName.startsWith("get_") && parsed.args.length === 0) {
532
+ const isStatic = node.storageClass === "static";
533
+ if (methodName.startsWith("get_") && parsed.args.length === 0 && !isStatic) {
533
534
  const propName = methodName.substring(4);
534
535
  methods.push({
535
536
  name: methodName,
@@ -541,7 +542,7 @@ declare module '${tsModuleName}' {
541
542
  isGetter: true,
542
543
  propertyName: propName
543
544
  });
544
- } else if (methodName.startsWith("set_") && parsed.args.length === 1) {
545
+ } else if (methodName.startsWith("set_") && parsed.args.length === 1 && !isStatic) {
545
546
  const propName = methodName.substring(4);
546
547
  methods.push({
547
548
  name: methodName,
@@ -632,10 +633,8 @@ template<> struct js_bind<${fullName}> {
632
633
  }
633
634
  }
634
635
  for (const method of methods) {
635
- if (!method.isGetter && !method.isSetter) {
636
- binding += `
636
+ binding += `
637
637
  .${method.static ? "static_" : ""}fun<&${fullName}::${method.name}>("${method.name}")`;
638
- }
639
638
  }
640
639
  for (const field of fields) {
641
640
  binding += `
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
3
3
  "name": "breeze-bindgen",
4
- "version": "1.1.16",
4
+ "version": "1.1.18",
5
5
  "main": "dist/core.cjs",
6
6
  "module": "dist/core.mjs",
7
7
  "types": "dist/core.d.ts",