figma-inspect-cli 0.1.0
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/README.md +156 -0
- package/dist/bin/figma-inspect.d.ts +3 -0
- package/dist/bin/figma-inspect.d.ts.map +1 -0
- package/dist/bin/figma-inspect.js +19 -0
- package/dist/bin/figma-inspect.js.map +1 -0
- package/dist/cli/errors.d.ts +3 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +3 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/export-component-set.d.ts +21 -0
- package/dist/cli/export-component-set.d.ts.map +1 -0
- package/dist/cli/export-component-set.js +173 -0
- package/dist/cli/export-component-set.js.map +1 -0
- package/dist/cli/export-contract.d.ts +20 -0
- package/dist/cli/export-contract.d.ts.map +1 -0
- package/dist/cli/export-contract.js +48 -0
- package/dist/cli/export-contract.js.map +1 -0
- package/dist/cli/export-node-contract.d.ts +17 -0
- package/dist/cli/export-node-contract.d.ts.map +1 -0
- package/dist/cli/export-node-contract.js +93 -0
- package/dist/cli/export-node-contract.js.map +1 -0
- package/dist/cli/export-result.d.ts +17 -0
- package/dist/cli/export-result.d.ts.map +1 -0
- package/dist/cli/export-result.js +22 -0
- package/dist/cli/export-result.js.map +1 -0
- package/dist/cli/export-team-index.d.ts +18 -0
- package/dist/cli/export-team-index.d.ts.map +1 -0
- package/dist/cli/export-team-index.js +121 -0
- package/dist/cli/export-team-index.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output.d.ts +13 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +26 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/parse-args.d.ts +3 -0
- package/dist/cli/parse-args.d.ts.map +1 -0
- package/dist/cli/parse-args.js +790 -0
- package/dist/cli/parse-args.js.map +1 -0
- package/dist/cli/run-cli.d.ts +3 -0
- package/dist/cli/run-cli.d.ts.map +1 -0
- package/dist/cli/run-cli.js +416 -0
- package/dist/cli/run-cli.js.map +1 -0
- package/dist/cli/types.d.ts +114 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/usage.d.ts +2 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +75 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/figma-api/cache/cached-request.d.ts +8 -0
- package/dist/figma-api/cache/cached-request.d.ts.map +1 -0
- package/dist/figma-api/cache/cached-request.js +100 -0
- package/dist/figma-api/cache/cached-request.js.map +1 -0
- package/dist/figma-api/cache/constants.d.ts +5 -0
- package/dist/figma-api/cache/constants.d.ts.map +1 -0
- package/dist/figma-api/cache/constants.js +5 -0
- package/dist/figma-api/cache/constants.js.map +1 -0
- package/dist/figma-api/cache/extract-metadata.d.ts +3 -0
- package/dist/figma-api/cache/extract-metadata.d.ts.map +1 -0
- package/dist/figma-api/cache/extract-metadata.js +13 -0
- package/dist/figma-api/cache/extract-metadata.js.map +1 -0
- package/dist/figma-api/cache/index.d.ts +3 -0
- package/dist/figma-api/cache/index.d.ts.map +1 -0
- package/dist/figma-api/cache/index.js +3 -0
- package/dist/figma-api/cache/index.js.map +1 -0
- package/dist/figma-api/cache/store.d.ts +10 -0
- package/dist/figma-api/cache/store.d.ts.map +1 -0
- package/dist/figma-api/cache/store.js +53 -0
- package/dist/figma-api/cache/store.js.map +1 -0
- package/dist/figma-api/cache/types.d.ts +20 -0
- package/dist/figma-api/cache/types.d.ts.map +1 -0
- package/dist/figma-api/cache/types.js +2 -0
- package/dist/figma-api/cache/types.js.map +1 -0
- package/dist/figma-api/cache/url.d.ts +5 -0
- package/dist/figma-api/cache/url.d.ts.map +1 -0
- package/dist/figma-api/cache/url.js +20 -0
- package/dist/figma-api/cache/url.js.map +1 -0
- package/dist/figma-api/constants.d.ts +2 -0
- package/dist/figma-api/constants.d.ts.map +1 -0
- package/dist/figma-api/constants.js +2 -0
- package/dist/figma-api/constants.js.map +1 -0
- package/dist/figma-api/fetch-with-retry.d.ts +2 -0
- package/dist/figma-api/fetch-with-retry.d.ts.map +1 -0
- package/dist/figma-api/fetch-with-retry.js +48 -0
- package/dist/figma-api/fetch-with-retry.js.map +1 -0
- package/dist/figma-api/figma-api-error.d.ts +4 -0
- package/dist/figma-api/figma-api-error.d.ts.map +1 -0
- package/dist/figma-api/figma-api-error.js +7 -0
- package/dist/figma-api/figma-api-error.js.map +1 -0
- package/dist/figma-api/figma-request.d.ts +2 -0
- package/dist/figma-api/figma-request.d.ts.map +1 -0
- package/dist/figma-api/figma-request.js +21 -0
- package/dist/figma-api/figma-request.js.map +1 -0
- package/dist/figma-api/format-figma-error.d.ts +2 -0
- package/dist/figma-api/format-figma-error.d.ts.map +1 -0
- package/dist/figma-api/format-figma-error.js +24 -0
- package/dist/figma-api/format-figma-error.js.map +1 -0
- package/dist/figma-api/get-component-set.d.ts +4 -0
- package/dist/figma-api/get-component-set.d.ts.map +1 -0
- package/dist/figma-api/get-component-set.js +8 -0
- package/dist/figma-api/get-component-set.js.map +1 -0
- package/dist/figma-api/get-file-images.d.ts +4 -0
- package/dist/figma-api/get-file-images.d.ts.map +1 -0
- package/dist/figma-api/get-file-images.js +45 -0
- package/dist/figma-api/get-file-images.js.map +1 -0
- package/dist/figma-api/get-file-node.d.ts +3 -0
- package/dist/figma-api/get-file-node.d.ts.map +1 -0
- package/dist/figma-api/get-file-node.js +8 -0
- package/dist/figma-api/get-file-node.js.map +1 -0
- package/dist/figma-api/get-file.d.ts +3 -0
- package/dist/figma-api/get-file.d.ts.map +1 -0
- package/dist/figma-api/get-file.js +6 -0
- package/dist/figma-api/get-file.js.map +1 -0
- package/dist/figma-api/index.d.ts +11 -0
- package/dist/figma-api/index.d.ts.map +1 -0
- package/dist/figma-api/index.js +11 -0
- package/dist/figma-api/index.js.map +1 -0
- package/dist/figma-api/list-file-component-sets.d.ts +4 -0
- package/dist/figma-api/list-file-component-sets.d.ts.map +1 -0
- package/dist/figma-api/list-file-component-sets.js +8 -0
- package/dist/figma-api/list-file-component-sets.js.map +1 -0
- package/dist/figma-api/list-file-components.d.ts +5 -0
- package/dist/figma-api/list-file-components.d.ts.map +1 -0
- package/dist/figma-api/list-file-components.js +13 -0
- package/dist/figma-api/list-file-components.js.map +1 -0
- package/dist/figma-api/list-file-pages.d.ts +4 -0
- package/dist/figma-api/list-file-pages.d.ts.map +1 -0
- package/dist/figma-api/list-file-pages.js +10 -0
- package/dist/figma-api/list-file-pages.js.map +1 -0
- package/dist/figma-api/list-project-files.d.ts +4 -0
- package/dist/figma-api/list-project-files.d.ts.map +1 -0
- package/dist/figma-api/list-project-files.js +8 -0
- package/dist/figma-api/list-project-files.js.map +1 -0
- package/dist/figma-api/list-team-component-sets.d.ts +4 -0
- package/dist/figma-api/list-team-component-sets.d.ts.map +1 -0
- package/dist/figma-api/list-team-component-sets.js +19 -0
- package/dist/figma-api/list-team-component-sets.js.map +1 -0
- package/dist/figma-api/list-team-project-files.d.ts +4 -0
- package/dist/figma-api/list-team-project-files.d.ts.map +1 -0
- package/dist/figma-api/list-team-project-files.js +19 -0
- package/dist/figma-api/list-team-project-files.js.map +1 -0
- package/dist/figma-api/list-team-projects.d.ts +4 -0
- package/dist/figma-api/list-team-projects.d.ts.map +1 -0
- package/dist/figma-api/list-team-projects.js +8 -0
- package/dist/figma-api/list-team-projects.js.map +1 -0
- package/dist/figma-api/schemas.d.ts +95 -0
- package/dist/figma-api/schemas.d.ts.map +1 -0
- package/dist/figma-api/schemas.js +154 -0
- package/dist/figma-api/schemas.js.map +1 -0
- package/dist/figma-api/types.d.ts +60 -0
- package/dist/figma-api/types.d.ts.map +1 -0
- package/dist/figma-api/types.js +2 -0
- package/dist/figma-api/types.js.map +1 -0
- package/dist/inspect/component-set-context.d.ts +11 -0
- package/dist/inspect/component-set-context.d.ts.map +1 -0
- package/dist/inspect/component-set-context.js +71 -0
- package/dist/inspect/component-set-context.js.map +1 -0
- package/dist/inspect/component-set-lookup.d.ts +6 -0
- package/dist/inspect/component-set-lookup.d.ts.map +1 -0
- package/dist/inspect/component-set-lookup.js +40 -0
- package/dist/inspect/component-set-lookup.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/asset-backed-contract.d.ts +3 -0
- package/dist/inspect/component-set-pseudocode/asset-backed-contract.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/asset-backed-contract.js +34 -0
- package/dist/inspect/component-set-pseudocode/asset-backed-contract.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/assets-contract.d.ts +9 -0
- package/dist/inspect/component-set-pseudocode/assets-contract.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/assets-contract.js +4 -0
- package/dist/inspect/component-set-pseudocode/assets-contract.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/baseline-contract.d.ts +17 -0
- package/dist/inspect/component-set-pseudocode/baseline-contract.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/baseline-contract.js +67 -0
- package/dist/inspect/component-set-pseudocode/baseline-contract.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/build-pseudocode.d.ts +24 -0
- package/dist/inspect/component-set-pseudocode/build-pseudocode.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/build-pseudocode.js +83 -0
- package/dist/inspect/component-set-pseudocode/build-pseudocode.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/index.d.ts +2 -0
- package/dist/inspect/component-set-pseudocode/index.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/index.js +2 -0
- package/dist/inspect/component-set-pseudocode/index.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/infer.d.ts +4 -0
- package/dist/inspect/component-set-pseudocode/infer.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/infer.js +426 -0
- package/dist/inspect/component-set-pseudocode/infer.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/meta-contract.d.ts +27 -0
- package/dist/inspect/component-set-pseudocode/meta-contract.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/meta-contract.js +136 -0
- package/dist/inspect/component-set-pseudocode/meta-contract.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/slim-node-guards.d.ts +14 -0
- package/dist/inspect/component-set-pseudocode/slim-node-guards.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/slim-node-guards.js +28 -0
- package/dist/inspect/component-set-pseudocode/slim-node-guards.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/structure-contract.d.ts +71 -0
- package/dist/inspect/component-set-pseudocode/structure-contract.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/structure-contract.js +281 -0
- package/dist/inspect/component-set-pseudocode/structure-contract.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/structure-dsl.d.ts +3 -0
- package/dist/inspect/component-set-pseudocode/structure-dsl.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/structure-dsl.js +170 -0
- package/dist/inspect/component-set-pseudocode/structure-dsl.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/types.d.ts +44 -0
- package/dist/inspect/component-set-pseudocode/types.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/types.js +2 -0
- package/dist/inspect/component-set-pseudocode/types.js.map +1 -0
- package/dist/inspect/component-set-pseudocode/universal.d.ts +14 -0
- package/dist/inspect/component-set-pseudocode/universal.d.ts.map +1 -0
- package/dist/inspect/component-set-pseudocode/universal.js +393 -0
- package/dist/inspect/component-set-pseudocode/universal.js.map +1 -0
- package/dist/inspect/component-set-spec/bound-variables.d.ts +14 -0
- package/dist/inspect/component-set-spec/bound-variables.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/bound-variables.js +53 -0
- package/dist/inspect/component-set-spec/bound-variables.js.map +1 -0
- package/dist/inspect/component-set-spec/build-spec.d.ts +9 -0
- package/dist/inspect/component-set-spec/build-spec.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/build-spec.js +102 -0
- package/dist/inspect/component-set-spec/build-spec.js.map +1 -0
- package/dist/inspect/component-set-spec/compact-spec.d.ts +3 -0
- package/dist/inspect/component-set-spec/compact-spec.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/compact-spec.js +357 -0
- package/dist/inspect/component-set-spec/compact-spec.js.map +1 -0
- package/dist/inspect/component-set-spec/extract-slots.d.ts +5 -0
- package/dist/inspect/component-set-spec/extract-slots.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/extract-slots.js +57 -0
- package/dist/inspect/component-set-spec/extract-slots.js.map +1 -0
- package/dist/inspect/component-set-spec/figma-node.d.ts +9 -0
- package/dist/inspect/component-set-spec/figma-node.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/figma-node.js +31 -0
- package/dist/inspect/component-set-spec/figma-node.js.map +1 -0
- package/dist/inspect/component-set-spec/index.d.ts +2 -0
- package/dist/inspect/component-set-spec/index.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/index.js +2 -0
- package/dist/inspect/component-set-spec/index.js.map +1 -0
- package/dist/inspect/component-set-spec/parse-props.d.ts +9 -0
- package/dist/inspect/component-set-spec/parse-props.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/parse-props.js +96 -0
- package/dist/inspect/component-set-spec/parse-props.js.map +1 -0
- package/dist/inspect/component-set-spec/prop-name.d.ts +5 -0
- package/dist/inspect/component-set-spec/prop-name.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/prop-name.js +26 -0
- package/dist/inspect/component-set-spec/prop-name.js.map +1 -0
- package/dist/inspect/component-set-spec/resolve-tokens.d.ts +4 -0
- package/dist/inspect/component-set-spec/resolve-tokens.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/resolve-tokens.js +42 -0
- package/dist/inspect/component-set-spec/resolve-tokens.js.map +1 -0
- package/dist/inspect/component-set-spec/slim-context.d.ts +6 -0
- package/dist/inspect/component-set-spec/slim-context.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/slim-context.js +2 -0
- package/dist/inspect/component-set-spec/slim-context.js.map +1 -0
- package/dist/inspect/component-set-spec/slim-node.d.ts +5 -0
- package/dist/inspect/component-set-spec/slim-node.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/slim-node.js +393 -0
- package/dist/inspect/component-set-spec/slim-node.js.map +1 -0
- package/dist/inspect/component-set-spec/slim-text-export.d.ts +8 -0
- package/dist/inspect/component-set-spec/slim-text-export.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/slim-text-export.js +74 -0
- package/dist/inspect/component-set-spec/slim-text-export.js.map +1 -0
- package/dist/inspect/component-set-spec/team-component-registry.d.ts +19 -0
- package/dist/inspect/component-set-spec/team-component-registry.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/team-component-registry.js +96 -0
- package/dist/inspect/component-set-spec/team-component-registry.js.map +1 -0
- package/dist/inspect/component-set-spec/types.d.ts +127 -0
- package/dist/inspect/component-set-spec/types.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/types.js +2 -0
- package/dist/inspect/component-set-spec/types.js.map +1 -0
- package/dist/inspect/component-set-spec/variable-registry.d.ts +8 -0
- package/dist/inspect/component-set-spec/variable-registry.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/variable-registry.js +74 -0
- package/dist/inspect/component-set-spec/variable-registry.js.map +1 -0
- package/dist/inspect/component-set-spec/variant-axes.d.ts +2 -0
- package/dist/inspect/component-set-spec/variant-axes.d.ts.map +1 -0
- package/dist/inspect/component-set-spec/variant-axes.js +14 -0
- package/dist/inspect/component-set-spec/variant-axes.js.map +1 -0
- package/dist/inspect/contract/contract-format.d.ts +5 -0
- package/dist/inspect/contract/contract-format.d.ts.map +1 -0
- package/dist/inspect/contract/contract-format.js +26 -0
- package/dist/inspect/contract/contract-format.js.map +1 -0
- package/dist/inspect/contract/contract-lock.d.ts +75 -0
- package/dist/inspect/contract/contract-lock.d.ts.map +1 -0
- package/dist/inspect/contract/contract-lock.js +326 -0
- package/dist/inspect/contract/contract-lock.js.map +1 -0
- package/dist/inspect/contract/contract-schema.d.ts +51 -0
- package/dist/inspect/contract/contract-schema.d.ts.map +1 -0
- package/dist/inspect/contract/contract-schema.js +130 -0
- package/dist/inspect/contract/contract-schema.js.map +1 -0
- package/dist/inspect/contract/fingerprint.d.ts +9 -0
- package/dist/inspect/contract/fingerprint.d.ts.map +1 -0
- package/dist/inspect/contract/fingerprint.js +301 -0
- package/dist/inspect/contract/fingerprint.js.map +1 -0
- package/dist/inspect/contract/lock-metadata.d.ts +30 -0
- package/dist/inspect/contract/lock-metadata.d.ts.map +1 -0
- package/dist/inspect/contract/lock-metadata.js +101 -0
- package/dist/inspect/contract/lock-metadata.js.map +1 -0
- package/dist/inspect/contract/stable-stringify.d.ts +2 -0
- package/dist/inspect/contract/stable-stringify.d.ts.map +1 -0
- package/dist/inspect/contract/stable-stringify.js +14 -0
- package/dist/inspect/contract/stable-stringify.js.map +1 -0
- package/dist/inspect/contract/verify-component-contract.d.ts +19 -0
- package/dist/inspect/contract/verify-component-contract.d.ts.map +1 -0
- package/dist/inspect/contract/verify-component-contract.js +126 -0
- package/dist/inspect/contract/verify-component-contract.js.map +1 -0
- package/dist/inspect/errors.d.ts +4 -0
- package/dist/inspect/errors.d.ts.map +1 -0
- package/dist/inspect/errors.js +7 -0
- package/dist/inspect/errors.js.map +1 -0
- package/dist/inspect/export/assert-asset-exportable.d.ts +3 -0
- package/dist/inspect/export/assert-asset-exportable.d.ts.map +1 -0
- package/dist/inspect/export/assert-asset-exportable.js +45 -0
- package/dist/inspect/export/assert-asset-exportable.js.map +1 -0
- package/dist/inspect/export/export-nested-assets.d.ts +94 -0
- package/dist/inspect/export/export-nested-assets.d.ts.map +1 -0
- package/dist/inspect/export/export-nested-assets.js +333 -0
- package/dist/inspect/export/export-nested-assets.js.map +1 -0
- package/dist/inspect/export/export-node-preview.d.ts +24 -0
- package/dist/inspect/export/export-node-preview.d.ts.map +1 -0
- package/dist/inspect/export/export-node-preview.js +34 -0
- package/dist/inspect/export/export-node-preview.js.map +1 -0
- package/dist/inspect/export/export-variant-assets.d.ts +18 -0
- package/dist/inspect/export/export-variant-assets.d.ts.map +1 -0
- package/dist/inspect/export/export-variant-assets.js +127 -0
- package/dist/inspect/export/export-variant-assets.js.map +1 -0
- package/dist/inspect/export/normalize-exported-svg.d.ts +2 -0
- package/dist/inspect/export/normalize-exported-svg.d.ts.map +1 -0
- package/dist/inspect/export/normalize-exported-svg.js +15 -0
- package/dist/inspect/export/normalize-exported-svg.js.map +1 -0
- package/dist/inspect/export/rendered-image-bytes.d.ts +4 -0
- package/dist/inspect/export/rendered-image-bytes.d.ts.map +1 -0
- package/dist/inspect/export/rendered-image-bytes.js +24 -0
- package/dist/inspect/export/rendered-image-bytes.js.map +1 -0
- package/dist/inspect/export-contract-target.d.ts +7 -0
- package/dist/inspect/export-contract-target.d.ts.map +1 -0
- package/dist/inspect/export-contract-target.js +33 -0
- package/dist/inspect/export-contract-target.js.map +1 -0
- package/dist/inspect/fetch-file-entry.d.ts +4 -0
- package/dist/inspect/fetch-file-entry.d.ts.map +1 -0
- package/dist/inspect/fetch-file-entry.js +7 -0
- package/dist/inspect/fetch-file-entry.js.map +1 -0
- package/dist/inspect/fetch-file-node-entry.d.ts +4 -0
- package/dist/inspect/fetch-file-node-entry.d.ts.map +1 -0
- package/dist/inspect/fetch-file-node-entry.js +7 -0
- package/dist/inspect/fetch-file-node-entry.js.map +1 -0
- package/dist/inspect/figma-node-url.d.ts +3 -0
- package/dist/inspect/figma-node-url.d.ts.map +1 -0
- package/dist/inspect/figma-node-url.js +30 -0
- package/dist/inspect/figma-node-url.js.map +1 -0
- package/dist/inspect/get-node-component-set.d.ts +5 -0
- package/dist/inspect/get-node-component-set.d.ts.map +1 -0
- package/dist/inspect/get-node-component-set.js +10 -0
- package/dist/inspect/get-node-component-set.js.map +1 -0
- package/dist/inspect/index.d.ts +17 -0
- package/dist/inspect/index.d.ts.map +1 -0
- package/dist/inspect/index.js +17 -0
- package/dist/inspect/index.js.map +1 -0
- package/dist/inspect/list-all-component-sets.d.ts +3 -0
- package/dist/inspect/list-all-component-sets.d.ts.map +1 -0
- package/dist/inspect/list-all-component-sets.js +27 -0
- package/dist/inspect/list-all-component-sets.js.map +1 -0
- package/dist/inspect/list-component-set-properties.d.ts +4 -0
- package/dist/inspect/list-component-set-properties.d.ts.map +1 -0
- package/dist/inspect/list-component-set-properties.js +73 -0
- package/dist/inspect/list-component-set-properties.js.map +1 -0
- package/dist/inspect/node-contract/build-node-contract.d.ts +12 -0
- package/dist/inspect/node-contract/build-node-contract.d.ts.map +1 -0
- package/dist/inspect/node-contract/build-node-contract.js +212 -0
- package/dist/inspect/node-contract/build-node-contract.js.map +1 -0
- package/dist/inspect/node-contract/dependencies.d.ts +5 -0
- package/dist/inspect/node-contract/dependencies.d.ts.map +1 -0
- package/dist/inspect/node-contract/dependencies.js +84 -0
- package/dist/inspect/node-contract/dependencies.js.map +1 -0
- package/dist/inspect/node-contract/index.d.ts +6 -0
- package/dist/inspect/node-contract/index.d.ts.map +1 -0
- package/dist/inspect/node-contract/index.js +6 -0
- package/dist/inspect/node-contract/index.js.map +1 -0
- package/dist/inspect/node-contract/node-kind.d.ts +9 -0
- package/dist/inspect/node-contract/node-kind.d.ts.map +1 -0
- package/dist/inspect/node-contract/node-kind.js +31 -0
- package/dist/inspect/node-contract/node-kind.js.map +1 -0
- package/dist/inspect/node-contract/node-lock.d.ts +6 -0
- package/dist/inspect/node-contract/node-lock.d.ts.map +1 -0
- package/dist/inspect/node-contract/node-lock.js +181 -0
- package/dist/inspect/node-contract/node-lock.js.map +1 -0
- package/dist/inspect/node-contract/node-schema.d.ts +14 -0
- package/dist/inspect/node-contract/node-schema.d.ts.map +1 -0
- package/dist/inspect/node-contract/node-schema.js +137 -0
- package/dist/inspect/node-contract/node-schema.js.map +1 -0
- package/dist/inspect/node-contract/paths.d.ts +10 -0
- package/dist/inspect/node-contract/paths.d.ts.map +1 -0
- package/dist/inspect/node-contract/paths.js +29 -0
- package/dist/inspect/node-contract/paths.js.map +1 -0
- package/dist/inspect/node-contract/tokens.d.ts +4 -0
- package/dist/inspect/node-contract/tokens.d.ts.map +1 -0
- package/dist/inspect/node-contract/tokens.js +30 -0
- package/dist/inspect/node-contract/tokens.js.map +1 -0
- package/dist/inspect/node-contract/types.d.ts +84 -0
- package/dist/inspect/node-contract/types.d.ts.map +1 -0
- package/dist/inspect/node-contract/types.js +2 -0
- package/dist/inspect/node-contract/types.js.map +1 -0
- package/dist/inspect/node-contract/verify-node-contract.d.ts +20 -0
- package/dist/inspect/node-contract/verify-node-contract.d.ts.map +1 -0
- package/dist/inspect/node-contract/verify-node-contract.js +131 -0
- package/dist/inspect/node-contract/verify-node-contract.js.map +1 -0
- package/dist/inspect/resolve-team-component-set.d.ts +14 -0
- package/dist/inspect/resolve-team-component-set.d.ts.map +1 -0
- package/dist/inspect/resolve-team-component-set.js +77 -0
- package/dist/inspect/resolve-team-component-set.js.map +1 -0
- package/dist/inspect/schemas.d.ts +37 -0
- package/dist/inspect/schemas.d.ts.map +1 -0
- package/dist/inspect/schemas.js +79 -0
- package/dist/inspect/schemas.js.map +1 -0
- package/dist/inspect/team-index.d.ts +76 -0
- package/dist/inspect/team-index.d.ts.map +1 -0
- package/dist/inspect/team-index.js +361 -0
- package/dist/inspect/team-index.js.map +1 -0
- package/dist/inspect/types.d.ts +46 -0
- package/dist/inspect/types.d.ts.map +1 -0
- package/dist/inspect/types.js +2 -0
- package/dist/inspect/types.js.map +1 -0
- package/dist/test/fixtures.d.ts +3 -0
- package/dist/test/fixtures.d.ts.map +1 -0
- package/dist/test/fixtures.js +6 -0
- package/dist/test/fixtures.js.map +1 -0
- package/dist/zod/parse-valid-entries.d.ts +4 -0
- package/dist/zod/parse-valid-entries.d.ts.map +1 -0
- package/dist/zod/parse-valid-entries.js +20 -0
- package/dist/zod/parse-valid-entries.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const figmaComponentSetFieldsSchema: z.ZodObject<{
|
|
3
|
+
key: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type FigmaComponentSet = z.infer<typeof figmaComponentSetFieldsSchema> & {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
declare const componentEntrySchema: z.ZodObject<{
|
|
10
|
+
key: z.ZodOptional<z.ZodString>;
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
componentSetId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ComponentEntry = z.infer<typeof componentEntrySchema>;
|
|
15
|
+
export interface DocumentNode {
|
|
16
|
+
id?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
componentId?: string;
|
|
20
|
+
isExposedInstance: boolean;
|
|
21
|
+
children?: DocumentNode[];
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
declare const fileNodeEntrySchema: z.ZodObject<{
|
|
25
|
+
document: z.ZodOptional<z.ZodType<DocumentNode, unknown, z.core.$ZodTypeInternals<DocumentNode, unknown>>>;
|
|
26
|
+
componentSets: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Record<string, FigmaComponentSet>, unknown>>;
|
|
27
|
+
components: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Record<string, {
|
|
28
|
+
key?: string | undefined;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
componentSetId?: string | undefined;
|
|
31
|
+
}>, unknown>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type FileNodeEntry = z.infer<typeof fileNodeEntrySchema>;
|
|
34
|
+
export declare function parseFileNodeEntry(payload: unknown, nodeId: string): FileNodeEntry;
|
|
35
|
+
export declare function parseFileEntry(payload: unknown): FileNodeEntry;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/inspect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,QAAA,MAAM,6BAA6B;;;iBAGjC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACrC,OAAO,6BAA6B,CACrC,GAAG;IACF,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAaF,QAAA,MAAM,oBAAoB;;;;iBAIxB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAkCD,QAAA,MAAM,mBAAmB;;;;;;;;iBAMvB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMhE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,aAAa,CAiBf;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAO9D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { parseValidRecord } from "../zod/parse-valid-entries.js";
|
|
3
|
+
import { FigmaInspectError } from "./errors.js";
|
|
4
|
+
const figmaComponentSetFieldsSchema = z.object({
|
|
5
|
+
key: z.string(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
});
|
|
8
|
+
function parseComponentSets(value) {
|
|
9
|
+
const entries = parseValidRecord(figmaComponentSetFieldsSchema, value);
|
|
10
|
+
const componentSets = {};
|
|
11
|
+
for (const [id, fields] of Object.entries(entries)) {
|
|
12
|
+
componentSets[id] = { id, ...fields };
|
|
13
|
+
}
|
|
14
|
+
return componentSets;
|
|
15
|
+
}
|
|
16
|
+
const componentEntrySchema = z.object({
|
|
17
|
+
key: z.string().optional(),
|
|
18
|
+
name: z.string().optional(),
|
|
19
|
+
componentSetId: z.string().optional(),
|
|
20
|
+
});
|
|
21
|
+
const documentNodeFieldsSchema = z
|
|
22
|
+
.object({
|
|
23
|
+
id: z.string().optional(),
|
|
24
|
+
name: z.string().optional(),
|
|
25
|
+
type: z.string().optional(),
|
|
26
|
+
componentId: z.string().optional(),
|
|
27
|
+
isExposedInstance: z
|
|
28
|
+
.unknown()
|
|
29
|
+
.optional()
|
|
30
|
+
.transform((value) => value === true),
|
|
31
|
+
children: z.array(z.unknown()).optional(),
|
|
32
|
+
})
|
|
33
|
+
.passthrough();
|
|
34
|
+
const documentNodeSchema = z.lazy(() => documentNodeFieldsSchema.transform((node) => {
|
|
35
|
+
const { children, ...rest } = node;
|
|
36
|
+
const parsed = {
|
|
37
|
+
...rest,
|
|
38
|
+
isExposedInstance: node.isExposedInstance,
|
|
39
|
+
};
|
|
40
|
+
if (children) {
|
|
41
|
+
parsed.children = children
|
|
42
|
+
.map((child) => documentNodeSchema.safeParse(child))
|
|
43
|
+
.flatMap((result) => (result.success ? [result.data] : []));
|
|
44
|
+
}
|
|
45
|
+
return parsed;
|
|
46
|
+
}));
|
|
47
|
+
const fileNodeEntrySchema = z.object({
|
|
48
|
+
document: documentNodeSchema.optional(),
|
|
49
|
+
componentSets: z.unknown().transform(parseComponentSets),
|
|
50
|
+
components: z
|
|
51
|
+
.unknown()
|
|
52
|
+
.transform((value) => parseValidRecord(componentEntrySchema, value)),
|
|
53
|
+
});
|
|
54
|
+
const fileNodesResponseSchema = z.object({
|
|
55
|
+
nodes: z.record(z.string(), z.unknown()),
|
|
56
|
+
});
|
|
57
|
+
export function parseFileNodeEntry(payload, nodeId) {
|
|
58
|
+
const response = fileNodesResponseSchema.safeParse(payload);
|
|
59
|
+
if (!response.success) {
|
|
60
|
+
throw new FigmaInspectError("Invalid Figma file nodes response.");
|
|
61
|
+
}
|
|
62
|
+
const nodeEntry = response.data.nodes[nodeId];
|
|
63
|
+
if (typeof nodeEntry !== "object" || nodeEntry === null) {
|
|
64
|
+
throw new FigmaInspectError(`Node ${nodeId} not found in Figma response.`);
|
|
65
|
+
}
|
|
66
|
+
const parsed = fileNodeEntrySchema.safeParse(nodeEntry);
|
|
67
|
+
if (!parsed.success) {
|
|
68
|
+
throw new FigmaInspectError("Invalid Figma file nodes response.");
|
|
69
|
+
}
|
|
70
|
+
return parsed.data;
|
|
71
|
+
}
|
|
72
|
+
export function parseFileEntry(payload) {
|
|
73
|
+
const parsed = fileNodeEntrySchema.safeParse(payload);
|
|
74
|
+
if (!parsed.success) {
|
|
75
|
+
throw new FigmaInspectError("Invalid Figma file response.");
|
|
76
|
+
}
|
|
77
|
+
return parsed.data;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/inspect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAQH,SAAS,kBAAkB,CA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AI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,iBAAiB,CAAC,oCAAoC,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACxD,MAAM,IAAI,iBAAiB,CAAC,QAAQ,MAAM,+BAA+B,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,iBAAiB,CAAC,oCAAoC,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,iBAAiB,CAAC,8BAA8B,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { FigmaTeamProjectFile } from "../figma-api/schemas.js";
|
|
2
|
+
import type { FileNodeEntry } from "./schemas.js";
|
|
3
|
+
export interface BuildTeamIndexFileInput {
|
|
4
|
+
metadata: FigmaTeamProjectFile;
|
|
5
|
+
entry: FileNodeEntry;
|
|
6
|
+
}
|
|
7
|
+
export interface BuildTeamIndexOptions {
|
|
8
|
+
teamId: string;
|
|
9
|
+
files: readonly BuildTeamIndexFileInput[];
|
|
10
|
+
screenSimilarityThreshold?: number;
|
|
11
|
+
screenSizeTolerance?: number;
|
|
12
|
+
}
|
|
13
|
+
interface TeamIndexFileSummary {
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
lastModified: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
projectName: string;
|
|
19
|
+
componentSets: number;
|
|
20
|
+
components: number;
|
|
21
|
+
screens: number;
|
|
22
|
+
}
|
|
23
|
+
interface TeamIndexNode {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
lastModified: string;
|
|
27
|
+
url: string;
|
|
28
|
+
}
|
|
29
|
+
interface TeamIndexScreen {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
size: string;
|
|
33
|
+
group: string | null;
|
|
34
|
+
lastModified: string;
|
|
35
|
+
url: string;
|
|
36
|
+
}
|
|
37
|
+
interface TeamIndexScreenGroup {
|
|
38
|
+
id: string;
|
|
39
|
+
screens: TeamIndexScreenGroupScreen[];
|
|
40
|
+
}
|
|
41
|
+
interface TeamIndexScreenGroupScreen {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
size: string;
|
|
45
|
+
lastModified: string;
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
interface TeamIndexFileRef {
|
|
49
|
+
key: string;
|
|
50
|
+
name: string;
|
|
51
|
+
lastModified: string;
|
|
52
|
+
projectId: string;
|
|
53
|
+
projectName: string;
|
|
54
|
+
}
|
|
55
|
+
export interface TeamIndexFile {
|
|
56
|
+
version: 1;
|
|
57
|
+
kind: "figma-file-index";
|
|
58
|
+
file: TeamIndexFileRef;
|
|
59
|
+
componentSets: TeamIndexNode[];
|
|
60
|
+
components: TeamIndexNode[];
|
|
61
|
+
screens: TeamIndexScreen[];
|
|
62
|
+
screenGroups: TeamIndexScreenGroup[];
|
|
63
|
+
}
|
|
64
|
+
export interface TeamIndex {
|
|
65
|
+
version: 1;
|
|
66
|
+
kind: "figma-team-index";
|
|
67
|
+
team: string;
|
|
68
|
+
files: TeamIndexFileSummary[];
|
|
69
|
+
}
|
|
70
|
+
export interface TeamIndexBundle {
|
|
71
|
+
team: TeamIndex;
|
|
72
|
+
files: TeamIndexFile[];
|
|
73
|
+
}
|
|
74
|
+
export declare function buildTeamIndex(options: BuildTeamIndexOptions): TeamIndexBundle;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=team-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-index.d.ts","sourceRoot":"","sources":["../../src/inspect/team-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAOpE,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,cAAc,CAAC;AAgBhE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAC1C,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,oBAAoB;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KA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import { FigmaInspectError } from "./errors.js";
|
|
3
|
+
const DEFAULT_SCREEN_SIMILARITY_THRESHOLD = 0.9;
|
|
4
|
+
const DEFAULT_SCREEN_SIZE_TOLERANCE = 2;
|
|
5
|
+
const SCREEN_SIZE_PRESETS = [
|
|
6
|
+
[375, 916],
|
|
7
|
+
[375, 854],
|
|
8
|
+
[375, 812],
|
|
9
|
+
[375, 667],
|
|
10
|
+
[390, 844],
|
|
11
|
+
[428, 926],
|
|
12
|
+
[834, 1194],
|
|
13
|
+
[1194, 834],
|
|
14
|
+
];
|
|
15
|
+
function assertTeamIndexOptions(threshold, sizeTolerance) {
|
|
16
|
+
if (!Number.isFinite(threshold) || threshold < 0 || threshold > 1) {
|
|
17
|
+
throw new FigmaInspectError("Screen similarity threshold must be a number between 0 and 1.");
|
|
18
|
+
}
|
|
19
|
+
if (!Number.isFinite(sizeTolerance) || sizeTolerance < 0) {
|
|
20
|
+
throw new FigmaInspectError("Screen size tolerance must be a non-negative number.");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function figmaNodeUrl(fileKey, fileName, nodeId) {
|
|
24
|
+
const url = new URL(`https://www.figma.com/design/${encodeURIComponent(fileKey)}/${encodeURIComponent(fileName)}`);
|
|
25
|
+
url.searchParams.set("node-id", nodeId.replace(/:/g, "-"));
|
|
26
|
+
url.searchParams.set("m", "dev");
|
|
27
|
+
return url.toString();
|
|
28
|
+
}
|
|
29
|
+
function nodeName(node) {
|
|
30
|
+
return readString(node, "name") ?? "Untitled";
|
|
31
|
+
}
|
|
32
|
+
function nodeType(node) {
|
|
33
|
+
return readString(node, "type") ?? "UNKNOWN";
|
|
34
|
+
}
|
|
35
|
+
function nodeId(node) {
|
|
36
|
+
return readString(node, "id");
|
|
37
|
+
}
|
|
38
|
+
function foundNode(file, node) {
|
|
39
|
+
const id = nodeId(node);
|
|
40
|
+
if (!id) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
fileKey: file.key,
|
|
45
|
+
fileName: file.name,
|
|
46
|
+
lastModified: file.last_modified,
|
|
47
|
+
projectId: file.project_id,
|
|
48
|
+
projectName: file.project_name,
|
|
49
|
+
nodeId: id,
|
|
50
|
+
name: nodeName(node),
|
|
51
|
+
url: figmaNodeUrl(file.key, file.name, id),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function screenSize(node) {
|
|
55
|
+
const box = readRecord(node, "absoluteBoundingBox");
|
|
56
|
+
if (!box) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
const width = readNumber(box, "width");
|
|
60
|
+
const height = readNumber(box, "height");
|
|
61
|
+
if (width === undefined || height === undefined) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return `${Math.round(width)}x${Math.round(height)}`;
|
|
65
|
+
}
|
|
66
|
+
function isScreenSize(node, tolerance) {
|
|
67
|
+
const box = readRecord(node, "absoluteBoundingBox");
|
|
68
|
+
if (!box) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
const width = readNumber(box, "width");
|
|
72
|
+
const height = readNumber(box, "height");
|
|
73
|
+
if (width === undefined || height === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
const preset = SCREEN_SIZE_PRESETS.find(([presetWidth, presetHeight]) => Math.abs(presetWidth - width) <= tolerance &&
|
|
77
|
+
Math.abs(presetHeight - height) <= tolerance);
|
|
78
|
+
return preset ? screenSize(node) : undefined;
|
|
79
|
+
}
|
|
80
|
+
function instanceIdentity(node, entry) {
|
|
81
|
+
const componentId = readString(node, "componentId");
|
|
82
|
+
if (!componentId) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
const component = entry.components[componentId];
|
|
86
|
+
const componentSet = component?.componentSetId
|
|
87
|
+
? entry.componentSets[component.componentSetId]
|
|
88
|
+
: undefined;
|
|
89
|
+
return (componentSet?.key ??
|
|
90
|
+
componentSet?.name ??
|
|
91
|
+
component?.key ??
|
|
92
|
+
component?.name ??
|
|
93
|
+
componentId);
|
|
94
|
+
}
|
|
95
|
+
function structureToken(node, entry) {
|
|
96
|
+
const type = nodeType(node);
|
|
97
|
+
if (type !== "INSTANCE") {
|
|
98
|
+
return type;
|
|
99
|
+
}
|
|
100
|
+
const identity = instanceIdentity(node, entry);
|
|
101
|
+
return identity ? `INSTANCE:${identity}` : "INSTANCE";
|
|
102
|
+
}
|
|
103
|
+
function structureTokens(node, entry) {
|
|
104
|
+
return [
|
|
105
|
+
structureToken(node, entry),
|
|
106
|
+
...(node.children ?? []).flatMap((child) => structureTokens(child, entry)),
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
function componentTokens(node, entry) {
|
|
110
|
+
const current = nodeType(node) === "INSTANCE" ? [structureToken(node, entry)] : [];
|
|
111
|
+
return [
|
|
112
|
+
...current,
|
|
113
|
+
...(node.children ?? []).flatMap((child) => componentTokens(child, entry)),
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
function buildDraftFile(input, sizeTolerance) {
|
|
117
|
+
const { metadata: file, entry } = input;
|
|
118
|
+
const root = entry.document;
|
|
119
|
+
if (!root) {
|
|
120
|
+
throw new FigmaInspectError(`Figma file ${file.key} has no document.`);
|
|
121
|
+
}
|
|
122
|
+
const componentSets = [];
|
|
123
|
+
const components = [];
|
|
124
|
+
const screens = [];
|
|
125
|
+
function visit(node, context) {
|
|
126
|
+
const type = nodeType(node);
|
|
127
|
+
const base = foundNode(file, node);
|
|
128
|
+
if (base && type === "COMPONENT_SET") {
|
|
129
|
+
componentSets.push(base);
|
|
130
|
+
}
|
|
131
|
+
if (base &&
|
|
132
|
+
type === "COMPONENT" &&
|
|
133
|
+
context.parentComponentSetId === undefined) {
|
|
134
|
+
components.push(base);
|
|
135
|
+
}
|
|
136
|
+
const size = base && type === "FRAME" && !context.insideScreen
|
|
137
|
+
? isScreenSize(node, sizeTolerance)
|
|
138
|
+
: undefined;
|
|
139
|
+
if (base && size) {
|
|
140
|
+
screens.push({
|
|
141
|
+
...base,
|
|
142
|
+
size,
|
|
143
|
+
structureTokens: structureTokens(node, entry),
|
|
144
|
+
componentTokens: componentTokens(node, entry),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const childContext = {
|
|
148
|
+
parentComponentSetId: type === "COMPONENT_SET" && base
|
|
149
|
+
? base.nodeId
|
|
150
|
+
: context.parentComponentSetId,
|
|
151
|
+
insideScreen: context.insideScreen || size !== undefined,
|
|
152
|
+
};
|
|
153
|
+
for (const child of node.children ?? []) {
|
|
154
|
+
visit(child, childContext);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
for (const page of root.children ?? []) {
|
|
158
|
+
for (const child of page.children ?? []) {
|
|
159
|
+
visit(child, { insideScreen: false });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
metadata: file,
|
|
164
|
+
componentSets: sortNodesById(componentSets),
|
|
165
|
+
components: sortNodesById(components),
|
|
166
|
+
screens: sortNodesById(screens),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function sortNodesById(records) {
|
|
170
|
+
return [...records].sort((left, right) => left.nodeId.localeCompare(right.nodeId));
|
|
171
|
+
}
|
|
172
|
+
function multisetSimilarity(left, right) {
|
|
173
|
+
if (left.length === 0 && right.length === 0) {
|
|
174
|
+
return 1;
|
|
175
|
+
}
|
|
176
|
+
const leftCounts = new Map();
|
|
177
|
+
const rightCounts = new Map();
|
|
178
|
+
for (const token of left) {
|
|
179
|
+
leftCounts.set(token, (leftCounts.get(token) ?? 0) + 1);
|
|
180
|
+
}
|
|
181
|
+
for (const token of right) {
|
|
182
|
+
rightCounts.set(token, (rightCounts.get(token) ?? 0) + 1);
|
|
183
|
+
}
|
|
184
|
+
const tokens = new Set([...leftCounts.keys(), ...rightCounts.keys()]);
|
|
185
|
+
let intersection = 0;
|
|
186
|
+
let union = 0;
|
|
187
|
+
for (const token of tokens) {
|
|
188
|
+
const leftCount = leftCounts.get(token) ?? 0;
|
|
189
|
+
const rightCount = rightCounts.get(token) ?? 0;
|
|
190
|
+
intersection += Math.min(leftCount, rightCount);
|
|
191
|
+
union += Math.max(leftCount, rightCount);
|
|
192
|
+
}
|
|
193
|
+
return union === 0 ? 1 : intersection / union;
|
|
194
|
+
}
|
|
195
|
+
function sequenceSimilarity(left, right) {
|
|
196
|
+
if (left.length === 0 && right.length === 0) {
|
|
197
|
+
return 1;
|
|
198
|
+
}
|
|
199
|
+
const maxLength = Math.max(left.length, right.length);
|
|
200
|
+
let matches = 0;
|
|
201
|
+
for (let index = 0; index < Math.min(left.length, right.length); index += 1) {
|
|
202
|
+
if (left[index] === right[index]) {
|
|
203
|
+
matches += 1;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return matches / maxLength;
|
|
207
|
+
}
|
|
208
|
+
function countSimilarity(left, right) {
|
|
209
|
+
if (left === 0 && right === 0) {
|
|
210
|
+
return 1;
|
|
211
|
+
}
|
|
212
|
+
return Math.min(left, right) / Math.max(left, right);
|
|
213
|
+
}
|
|
214
|
+
function screenSimilarity(left, right) {
|
|
215
|
+
return (multisetSimilarity(left.structureTokens, right.structureTokens) * 0.45 +
|
|
216
|
+
sequenceSimilarity(left.structureTokens, right.structureTokens) * 0.25 +
|
|
217
|
+
multisetSimilarity(left.componentTokens, right.componentTokens) * 0.2 +
|
|
218
|
+
countSimilarity(left.structureTokens.length, right.structureTokens.length) *
|
|
219
|
+
0.1);
|
|
220
|
+
}
|
|
221
|
+
function screenRef(screen) {
|
|
222
|
+
return `${screen.fileKey}#${screen.nodeId}`;
|
|
223
|
+
}
|
|
224
|
+
function screenGroupId(screens) {
|
|
225
|
+
const first = screens[0];
|
|
226
|
+
if (!first) {
|
|
227
|
+
throw new FigmaInspectError("Cannot build an empty screen group id.");
|
|
228
|
+
}
|
|
229
|
+
const nodeIds = screens.map((screen) => screen.nodeId).sort();
|
|
230
|
+
return `${first.fileKey}#${nodeIds.join(",")}`;
|
|
231
|
+
}
|
|
232
|
+
function assignFileScreenGroups(file, threshold) {
|
|
233
|
+
const screens = file.screens;
|
|
234
|
+
const parent = new Map(screens.map((screen) => [screenRef(screen), screenRef(screen)]));
|
|
235
|
+
function find(key) {
|
|
236
|
+
const current = parent.get(key);
|
|
237
|
+
if (!current || current === key) {
|
|
238
|
+
return key;
|
|
239
|
+
}
|
|
240
|
+
const root = find(current);
|
|
241
|
+
parent.set(key, root);
|
|
242
|
+
return root;
|
|
243
|
+
}
|
|
244
|
+
function union(left, right) {
|
|
245
|
+
const leftRoot = find(screenRef(left));
|
|
246
|
+
const rightRoot = find(screenRef(right));
|
|
247
|
+
if (leftRoot !== rightRoot) {
|
|
248
|
+
parent.set(rightRoot, leftRoot);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
for (let leftIndex = 0; leftIndex < screens.length; leftIndex += 1) {
|
|
252
|
+
for (let rightIndex = leftIndex + 1; rightIndex < screens.length; rightIndex += 1) {
|
|
253
|
+
const left = screens[leftIndex];
|
|
254
|
+
const right = screens[rightIndex];
|
|
255
|
+
if (screenSimilarity(left, right) >= threshold) {
|
|
256
|
+
union(left, right);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
const groupsByRoot = new Map();
|
|
261
|
+
for (const screen of screens) {
|
|
262
|
+
const root = find(screenRef(screen));
|
|
263
|
+
const members = groupsByRoot.get(root) ?? [];
|
|
264
|
+
members.push(screen);
|
|
265
|
+
groupsByRoot.set(root, members);
|
|
266
|
+
}
|
|
267
|
+
const groups = [...groupsByRoot.values()]
|
|
268
|
+
.filter((members) => members.length > 1)
|
|
269
|
+
.map((members) => sortNodesById(members))
|
|
270
|
+
.sort((left, right) => screenGroupId(left).localeCompare(screenGroupId(right)));
|
|
271
|
+
return groups.map((members) => {
|
|
272
|
+
const id = screenGroupId(members);
|
|
273
|
+
for (const member of members) {
|
|
274
|
+
member.groupId = id;
|
|
275
|
+
}
|
|
276
|
+
return {
|
|
277
|
+
id,
|
|
278
|
+
screens: members.map(screenGroupScreen),
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
function indexNode(node) {
|
|
283
|
+
return {
|
|
284
|
+
id: node.nodeId,
|
|
285
|
+
name: node.name,
|
|
286
|
+
lastModified: node.lastModified,
|
|
287
|
+
url: node.url,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function indexScreen(screen) {
|
|
291
|
+
return {
|
|
292
|
+
id: screen.nodeId,
|
|
293
|
+
name: screen.name,
|
|
294
|
+
size: screen.size,
|
|
295
|
+
group: screen.groupId ?? null,
|
|
296
|
+
lastModified: screen.lastModified,
|
|
297
|
+
url: screen.url,
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function screenGroupScreen(screen) {
|
|
301
|
+
return {
|
|
302
|
+
id: screen.nodeId,
|
|
303
|
+
name: screen.name,
|
|
304
|
+
size: screen.size,
|
|
305
|
+
lastModified: screen.lastModified,
|
|
306
|
+
url: screen.url,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function teamFileSummary(file) {
|
|
310
|
+
return {
|
|
311
|
+
key: file.metadata.key,
|
|
312
|
+
name: file.metadata.name,
|
|
313
|
+
lastModified: file.metadata.last_modified,
|
|
314
|
+
projectId: file.metadata.project_id,
|
|
315
|
+
projectName: file.metadata.project_name,
|
|
316
|
+
componentSets: file.componentSets.length,
|
|
317
|
+
components: file.components.length,
|
|
318
|
+
screens: file.screens.length,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function fileRef(file) {
|
|
322
|
+
return {
|
|
323
|
+
key: file.metadata.key,
|
|
324
|
+
name: file.metadata.name,
|
|
325
|
+
lastModified: file.metadata.last_modified,
|
|
326
|
+
projectId: file.metadata.project_id,
|
|
327
|
+
projectName: file.metadata.project_name,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function fileIndex(file, threshold) {
|
|
331
|
+
const groups = assignFileScreenGroups(file, threshold);
|
|
332
|
+
return {
|
|
333
|
+
version: 1,
|
|
334
|
+
kind: "figma-file-index",
|
|
335
|
+
file: fileRef(file),
|
|
336
|
+
componentSets: file.componentSets.map(indexNode),
|
|
337
|
+
components: file.components.map(indexNode),
|
|
338
|
+
screens: file.screens.map(indexScreen),
|
|
339
|
+
screenGroups: groups,
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
export function buildTeamIndex(options) {
|
|
343
|
+
const threshold = options.screenSimilarityThreshold ?? DEFAULT_SCREEN_SIMILARITY_THRESHOLD;
|
|
344
|
+
const sizeTolerance = options.screenSizeTolerance ?? DEFAULT_SCREEN_SIZE_TOLERANCE;
|
|
345
|
+
assertTeamIndexOptions(threshold, sizeTolerance);
|
|
346
|
+
const draftFiles = [...options.files]
|
|
347
|
+
.sort((left, right) => {
|
|
348
|
+
return left.metadata.key.localeCompare(right.metadata.key);
|
|
349
|
+
})
|
|
350
|
+
.map((file) => buildDraftFile(file, sizeTolerance));
|
|
351
|
+
return {
|
|
352
|
+
team: {
|
|
353
|
+
version: 1,
|
|
354
|
+
kind: "figma-team-index",
|
|
355
|
+
team: options.teamId,
|
|
356
|
+
files: draftFiles.map(teamFileSummary),
|
|
357
|
+
},
|
|
358
|
+
files: draftFiles.map((file) => fileIndex(file, threshold)),
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
//# sourceMappingURL=team-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-index.js","sourceRoot":"","sources":["../../src/inspect/team-index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,mCAAmC,GAAG,GAAG,CAAC;AAChD,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAExC,MAAM,mBAAmB,GAAG;IAC1B,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,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C,yBAAyB,IAAI,mCAAmC,CAAC;IAC3E,MAAM,aAAa,GACjB,OAAO,CAAC,mBAAmB,IAAI,6BAA6B,CAAC;IAC/D,sBAAsB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAEjD,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;SAClC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IAEtD,OAAO;QACL,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,OAAO,CAAC,MAAM;YACpB,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC;SACvC;QACD,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { FigmaComponentSet } from "./schemas.js";
|
|
2
|
+
export interface FigmaNodeRef {
|
|
3
|
+
fileKey: string;
|
|
4
|
+
nodeId: string;
|
|
5
|
+
}
|
|
6
|
+
export type FigmaTeamComponentSet = FigmaComponentSet & {
|
|
7
|
+
fileKey: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
projectName: string;
|
|
11
|
+
};
|
|
12
|
+
export interface ListAllComponentSetsOptions {
|
|
13
|
+
token: string;
|
|
14
|
+
teamId: string;
|
|
15
|
+
fetchImpl?: typeof fetch;
|
|
16
|
+
}
|
|
17
|
+
export interface FigmaComponentSetProperty {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
isExposedInstance: boolean;
|
|
21
|
+
}
|
|
22
|
+
export type ComponentSetLookup = {
|
|
23
|
+
kind: "key";
|
|
24
|
+
value: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: "name";
|
|
27
|
+
value: string;
|
|
28
|
+
};
|
|
29
|
+
export type ComponentSetTarget = ComponentSetLookup | ({
|
|
30
|
+
kind: "node";
|
|
31
|
+
} & FigmaNodeRef);
|
|
32
|
+
export type ExportContractTarget = ({
|
|
33
|
+
kind: "component-set";
|
|
34
|
+
} & FigmaNodeRef) | ({
|
|
35
|
+
kind: "node";
|
|
36
|
+
} & FigmaNodeRef);
|
|
37
|
+
export interface ComponentSetScopeOptions extends FigmaNodeRef {
|
|
38
|
+
token: string;
|
|
39
|
+
componentSet: ComponentSetLookup;
|
|
40
|
+
fetchImpl?: typeof fetch;
|
|
41
|
+
}
|
|
42
|
+
export interface ComponentSetNodeRefOptions extends FigmaNodeRef {
|
|
43
|
+
token: string;
|
|
44
|
+
fetchImpl?: typeof fetch;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inspect/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,CAAC;AAEtC,MAAM,MAAM,oBAAoB,GAC5B,CAAC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GAAG,YAAY,CAAC,GAC1C,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,CAAC;AAEtC,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,kBAAkB,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inspect/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/test/fixtures.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB,QAG/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAGhC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
const repoRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
4
|
+
export const contractFixturesDir = path.join(repoRoot, "test/fixtures/contracts");
|
|
5
|
+
export const variablesFixturePath = path.join(repoRoot, "test/fixtures/variables-minimal.json");
|
|
6
|
+
//# sourceMappingURL=fixtures.js.map
|