@takeshape/schema 8.189.2 → 8.189.4

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 (71) hide show
  1. package/dist/migration/index.d.ts +1 -0
  2. package/dist/migration/index.d.ts.map +1 -1
  3. package/dist/migration/index.js +4 -1
  4. package/dist/migration/to/v3.18.1.d.ts +5 -0
  5. package/dist/migration/to/v3.18.1.d.ts.map +1 -0
  6. package/dist/migration/to/v3.18.1.js +28 -0
  7. package/dist/project-schema/index.d.ts +4 -1
  8. package/dist/project-schema/index.d.ts.map +1 -1
  9. package/dist/project-schema/index.js +20 -3
  10. package/dist/project-schema/latest.d.ts +1 -2
  11. package/dist/project-schema/latest.d.ts.map +1 -1
  12. package/dist/project-schema/migrate.d.ts.map +1 -1
  13. package/dist/project-schema/migrate.js +4 -0
  14. package/dist/project-schema/v3.18.1.d.ts +1333 -0
  15. package/dist/project-schema/v3.18.1.d.ts.map +1 -0
  16. package/dist/project-schema/v3.18.1.js +5 -0
  17. package/dist/schema-util.d.ts.map +1 -1
  18. package/dist/schema-util.js +13 -11
  19. package/dist/schemas/index.d.ts +2 -2
  20. package/dist/schemas/index.d.ts.map +1 -1
  21. package/dist/schemas/index.js +6 -4
  22. package/dist/schemas/index.ts +4 -2
  23. package/dist/schemas/project-schema/latest.json +4 -3
  24. package/dist/schemas/project-schema/v3.18.1.json +2351 -0
  25. package/dist/schemas/project-schema.json +3 -0
  26. package/dist/types/types.d.ts +2 -2
  27. package/dist/types/types.d.ts.map +1 -1
  28. package/dist/util/has-arg.d.ts +4 -2
  29. package/dist/util/has-arg.d.ts.map +1 -1
  30. package/dist/util/has-arg.js +6 -1
  31. package/es/migration/index.js +3 -1
  32. package/es/migration/to/v3.18.1.js +16 -0
  33. package/es/project-schema/index.js +3 -1
  34. package/es/project-schema/migrate.js +5 -1
  35. package/es/project-schema/v3.18.1.js +1 -0
  36. package/es/schema-util.js +11 -9
  37. package/es/schemas/index.js +4 -3
  38. package/es/schemas/index.ts +4 -2
  39. package/es/schemas/project-schema/latest.json +4 -3
  40. package/es/schemas/project-schema/v3.18.1.json +2351 -0
  41. package/es/schemas/project-schema.json +3 -0
  42. package/es/util/has-arg.js +4 -1
  43. package/examples/latest/betzino.json +2276 -2276
  44. package/examples/latest/blog-schema.json +44 -44
  45. package/examples/latest/brewery-schema.json +38 -38
  46. package/examples/latest/complex-project-schema.json +272 -272
  47. package/examples/latest/complex-schema.json +1 -1
  48. package/examples/latest/fabric-ecommerce.json +23 -23
  49. package/examples/latest/frank-and-fred-schema.json +1616 -1616
  50. package/examples/latest/klirr-schema.json +1951 -1951
  51. package/examples/latest/massive-schema.json +428 -428
  52. package/examples/latest/mill-components-schema.json +200 -200
  53. package/examples/latest/one-earth.json +613 -613
  54. package/examples/latest/pet-oneof-array.json +38 -38
  55. package/examples/latest/post-schema.json +38 -38
  56. package/examples/latest/pruned-shopify-product-schema.json +8 -8
  57. package/examples/latest/real-world-schema.json +80 -80
  58. package/examples/latest/recursive-repeater-schema.json +20 -20
  59. package/examples/latest/recursive-schema.json +20 -20
  60. package/examples/latest/rick-and-morty-ast.json +150 -150
  61. package/examples/latest/rick-and-morty-graphql.json +114 -114
  62. package/examples/latest/rick-and-morty-rest.json +5 -5
  63. package/examples/latest/schema-with-repeater-draftjs.json +20 -20
  64. package/examples/latest/shape-books-v3_2_0.json +122 -122
  65. package/examples/latest/shape-books.json +122 -122
  66. package/examples/latest/shopify-lookbook.json +44 -44
  67. package/examples/latest/shopify-store-with-widget.json +80 -80
  68. package/examples/latest/stripe-starter-resolved.json +83 -83
  69. package/examples/latest/user-schema-no-required.json +20 -20
  70. package/examples/latest/user-schema-with-defaults.json +20 -20
  71. package/package.json +4 -4
@@ -78,6 +78,9 @@
78
78
  {
79
79
  "$ref": "https://schema.takeshape.io/project-schema/v3.18.0#"
80
80
  },
81
+ {
82
+ "$ref": "https://schema.takeshape.io/project-schema/v3.18.1#"
83
+ },
81
84
  {
82
85
  "$ref": "https://schema.takeshape.io/project-schema/v4.0.0#"
83
86
  }
@@ -1,8 +1,11 @@
1
1
  import { findSchemaAtPath } from './find-shape-at-path';
2
+ export function getArgs(prop) {
3
+ return '@args' in prop ? prop['@args'] : 'args' in prop ? prop.args : undefined;
4
+ }
2
5
  export function hasArg(projectSchema, prop, argPath) {
3
6
  var _projectSchema$shapes;
4
7
 
5
- const args = 'args' in prop ? prop.args : prop['@args'];
8
+ const args = getArgs(prop);
6
9
 
7
10
  if (!args) {
8
11
  return false;