@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.
- package/dist/migration/index.d.ts +1 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +4 -1
- package/dist/migration/to/v3.18.1.d.ts +5 -0
- package/dist/migration/to/v3.18.1.d.ts.map +1 -0
- package/dist/migration/to/v3.18.1.js +28 -0
- package/dist/project-schema/index.d.ts +4 -1
- package/dist/project-schema/index.d.ts.map +1 -1
- package/dist/project-schema/index.js +20 -3
- package/dist/project-schema/latest.d.ts +1 -2
- package/dist/project-schema/latest.d.ts.map +1 -1
- package/dist/project-schema/migrate.d.ts.map +1 -1
- package/dist/project-schema/migrate.js +4 -0
- package/dist/project-schema/v3.18.1.d.ts +1333 -0
- package/dist/project-schema/v3.18.1.d.ts.map +1 -0
- package/dist/project-schema/v3.18.1.js +5 -0
- package/dist/schema-util.d.ts.map +1 -1
- package/dist/schema-util.js +13 -11
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +6 -4
- package/dist/schemas/index.ts +4 -2
- package/dist/schemas/project-schema/latest.json +4 -3
- package/dist/schemas/project-schema/v3.18.1.json +2351 -0
- package/dist/schemas/project-schema.json +3 -0
- package/dist/types/types.d.ts +2 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/util/has-arg.d.ts +4 -2
- package/dist/util/has-arg.d.ts.map +1 -1
- package/dist/util/has-arg.js +6 -1
- package/es/migration/index.js +3 -1
- package/es/migration/to/v3.18.1.js +16 -0
- package/es/project-schema/index.js +3 -1
- package/es/project-schema/migrate.js +5 -1
- package/es/project-schema/v3.18.1.js +1 -0
- package/es/schema-util.js +11 -9
- package/es/schemas/index.js +4 -3
- package/es/schemas/index.ts +4 -2
- package/es/schemas/project-schema/latest.json +4 -3
- package/es/schemas/project-schema/v3.18.1.json +2351 -0
- package/es/schemas/project-schema.json +3 -0
- package/es/util/has-arg.js +4 -1
- package/examples/latest/betzino.json +2276 -2276
- package/examples/latest/blog-schema.json +44 -44
- package/examples/latest/brewery-schema.json +38 -38
- package/examples/latest/complex-project-schema.json +272 -272
- package/examples/latest/complex-schema.json +1 -1
- package/examples/latest/fabric-ecommerce.json +23 -23
- package/examples/latest/frank-and-fred-schema.json +1616 -1616
- package/examples/latest/klirr-schema.json +1951 -1951
- package/examples/latest/massive-schema.json +428 -428
- package/examples/latest/mill-components-schema.json +200 -200
- package/examples/latest/one-earth.json +613 -613
- package/examples/latest/pet-oneof-array.json +38 -38
- package/examples/latest/post-schema.json +38 -38
- package/examples/latest/pruned-shopify-product-schema.json +8 -8
- package/examples/latest/real-world-schema.json +80 -80
- package/examples/latest/recursive-repeater-schema.json +20 -20
- package/examples/latest/recursive-schema.json +20 -20
- package/examples/latest/rick-and-morty-ast.json +150 -150
- package/examples/latest/rick-and-morty-graphql.json +114 -114
- package/examples/latest/rick-and-morty-rest.json +5 -5
- package/examples/latest/schema-with-repeater-draftjs.json +20 -20
- package/examples/latest/shape-books-v3_2_0.json +122 -122
- package/examples/latest/shape-books.json +122 -122
- package/examples/latest/shopify-lookbook.json +44 -44
- package/examples/latest/shopify-store-with-widget.json +80 -80
- package/examples/latest/stripe-starter-resolved.json +83 -83
- package/examples/latest/user-schema-no-required.json +20 -20
- package/examples/latest/user-schema-with-defaults.json +20 -20
- package/package.json +4 -4
package/es/util/has-arg.js
CHANGED
|
@@ -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 =
|
|
8
|
+
const args = getArgs(prop);
|
|
6
9
|
|
|
7
10
|
if (!args) {
|
|
8
11
|
return false;
|