@webex/jsdoctrinetest 3.0.0-beta.8 → 3.0.0-bnr.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 +2 -2
- package/dist/assertions/literal.js +6 -26
- package/dist/assertions/literal.js.map +1 -1
- package/dist/extract.js +8 -24
- package/dist/extract.js.map +1 -1
- package/dist/index.js +7 -21
- package/dist/index.js.map +1 -1
- package/dist/mocha-template.js +2 -9
- package/dist/mocha-template.js.map +1 -1
- package/dist/parse.js +0 -6
- package/dist/parse.js.map +1 -1
- package/dist/transform.js +6 -18
- package/dist/transform.js.map +1 -1
- package/dist/types/@webex/common/src/base64.d.ts +38 -0
- package/dist/types/@webex/common/src/browser-detection.d.ts +8 -0
- package/dist/types/@webex/common/src/capped-debounce.d.ts +12 -0
- package/dist/types/@webex/common/src/check-required.d.ts +11 -0
- package/dist/types/@webex/common/src/constants.d.ts +76 -0
- package/dist/types/@webex/common/src/defer.d.ts +23 -0
- package/dist/types/@webex/common/src/deprecated.d.ts +7 -0
- package/dist/types/@webex/common/src/event-envelope.d.ts +13 -0
- package/dist/types/@webex/common/src/events.d.ts +15 -0
- package/dist/types/@webex/common/src/exception.d.ts +23 -0
- package/dist/types/@webex/common/src/in-browser/browser.d.ts +2 -0
- package/dist/types/@webex/common/src/in-browser/index.d.ts +1 -0
- package/dist/types/@webex/common/src/in-browser/node.d.ts +2 -0
- package/dist/types/@webex/common/src/index.d.ts +21 -0
- package/dist/types/@webex/common/src/isBuffer.d.ts +2 -0
- package/dist/types/@webex/common/src/make-state-datatype.d.ts +11 -0
- package/dist/types/@webex/common/src/one-flight.d.ts +9 -0
- package/dist/types/@webex/common/src/patterns.d.ts +8 -0
- package/dist/types/@webex/common/src/resolve-with.d.ts +22 -0
- package/dist/types/@webex/common/src/retry.d.ts +13 -0
- package/dist/types/@webex/common/src/tap.d.ts +17 -0
- package/dist/types/@webex/common/src/template-container.d.ts +59 -0
- package/dist/types/@webex/common/src/uuid-utils.d.ts +112 -0
- package/dist/types/@webex/common/src/while-in-flight.d.ts +7 -0
- package/dist/types/@webex/common/test/unit/spec/capped-debounce.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/common.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/exception.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/one-flight.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/template-container.d.ts +1 -0
- package/dist/types/@webex/common/test/unit/spec/while-in-flight.d.ts +1 -0
- package/dist/types/@webex/common-evented/src/index.d.ts +9 -0
- package/dist/types/@webex/common-evented/test/unit/spec/evented.d.ts +1 -0
- package/dist/types/@webex/common-timers/src/index.d.ts +19 -0
- package/dist/types/@webex/helper-html/browsers.d.ts +2 -0
- package/dist/types/@webex/helper-html/src/html-base.d.ts +12 -0
- package/dist/types/@webex/helper-html/src/html.d.ts +5 -0
- package/dist/types/@webex/helper-html/src/html.shim.d.ts +33 -0
- package/dist/types/@webex/helper-html/src/index.d.ts +1 -0
- package/dist/types/@webex/helper-html/test/unit/spec/html.d.ts +1 -0
- package/dist/types/@webex/helper-image/src/detect-filetype.d.ts +7 -0
- package/dist/types/@webex/helper-image/src/index.d.ts +26 -0
- package/dist/types/@webex/helper-image/src/process-image.browser.d.ts +19 -0
- package/dist/types/@webex/helper-image/src/process-image.d.ts +17 -0
- package/dist/types/@webex/helper-image/test/unit/spec/index.d.ts +1 -0
- package/dist/types/@webex/http-core/src/http-error-subtypes.d.ts +8 -0
- package/dist/types/@webex/http-core/src/http-error.d.ts +41 -0
- package/dist/types/@webex/http-core/src/index.d.ts +7 -0
- package/dist/types/@webex/http-core/src/interceptors/http-status.d.ts +17 -0
- package/dist/types/@webex/http-core/src/lib/detect.d.ts +6 -0
- package/dist/types/@webex/http-core/src/lib/interceptor.d.ts +51 -0
- package/dist/types/@webex/http-core/src/lib/xhr.d.ts +6 -0
- package/dist/types/@webex/http-core/src/progress-event.d.ts +18 -0
- package/dist/types/@webex/http-core/src/request/index.d.ts +5 -0
- package/dist/types/@webex/http-core/src/request/request.d.ts +6 -0
- package/dist/types/@webex/http-core/src/request/request.shim.d.ts +6 -0
- package/dist/types/@webex/http-core/test/integration/spec/http-error.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/interceptor.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/progress-event.d.ts +1 -0
- package/dist/types/@webex/http-core/test/integration/spec/request.d.ts +1 -0
- package/dist/types/@webex/http-core/test/unit/spec/interceptors/http-status.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar-url-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar-url-store.d.ts +50 -0
- package/dist/types/@webex/internal-plugin-avatar/src/avatar.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-avatar/src/config.d.ts +13 -0
- package/dist/types/@webex/internal-plugin-avatar/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/integration/spec/avatar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar-url-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar-url-store.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-avatar/test/unit/spec/avatar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/src/board.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/config.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-board/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime-channel-collection.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime-channel.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-board/src/realtime.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/board.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/realtime.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/integration/spec/sharing-mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/board.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-board/test/unit/spec/realtime.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/src/calendar.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-calendar/src/collection.d.ts +58 -0
- package/dist/types/@webex/internal-plugin-calendar/src/config.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-calendar/src/constants.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-calendar/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/src/util.d.ts +15 -0
- package/dist/types/@webex/internal-plugin-calendar/test/integration/spec/calendar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/test/unit/spec/calendar.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-calendar/test/unit/spec/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/activities.d.ts +32 -0
- package/dist/types/@webex/internal-plugin-conversation/src/activity-thread-ordering.d.ts +18 -0
- package/dist/types/@webex/internal-plugin-conversation/src/config.d.ts +19 -0
- package/dist/types/@webex/internal-plugin-conversation/src/constants.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-conversation/src/conversation.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-conversation/src/convo-error.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-conversation/src/decryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/encryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-conversation/src/share-activity.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-conversation/src/to-array.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/create.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/get.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/share.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/integration/spec/verbs.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/conversation.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/decrypt-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/encryption-transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-conversation/test/unit/spec/share-activity.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/src/config.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-device/src/constants.d.ts +12 -0
- package/dist/types/@webex/internal-plugin-device/src/device.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-device/src/features/feature-collection.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-device/src/features/feature-model.d.ts +29 -0
- package/dist/types/@webex/internal-plugin-device/src/features/features-model.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-device/src/features/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-device/src/index.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-device/src/interceptors/device-url.d.ts +15 -0
- package/dist/types/@webex/internal-plugin-device/src/metrics.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-device/test/integration/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/feature-collection.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/feature-model.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/features/features-model.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-dss/src/constants.d.ts +14 -0
- package/dist/types/@webex/internal-plugin-dss/src/dss.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-dss/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-dss/src/types.d.ts +28 -0
- package/dist/types/@webex/internal-plugin-dss/test/unit/spec/dss.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/config.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/ediscovery-error.d.ts +11 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/ediscovery.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/report-request.d.ts +29 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/retry.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-ediscovery/src/transforms.d.ts +35 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/integration/spec/ediscovery.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/content.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/report.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-ediscovery/test/unit/spec/transforms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/src/config.d.ts +16 -0
- package/dist/types/@webex/internal-plugin-encryption/src/encryption.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-encryption/src/ensure-buffer.browser.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-encryption/src/ensure-buffer.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-encryption/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-batcher.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-certificate-validation.d.ts +24 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-dry-error-interceptor.d.ts +25 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms-errors.d.ts +33 -0
- package/dist/types/@webex/internal-plugin-encryption/src/kms.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/kms.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/integration/spec/payload-transfom.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/unit/spec/encryption.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-encryption/test/unit/spec/kms-certificate-validation.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-feature/src/feature.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-feature/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/test/integration/spec/feature.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-feature/test/unit/spec/feature.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-flag/src/flag.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-flag/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/test/integration/spec/flag.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-flag/test/unit/spec/flag.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/constants.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-llm/src/llm.d.ts +88 -0
- package/dist/types/@webex/internal-plugin-llm/src/llm.types.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-llm/test/unit/spec/llm.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-locus/src/event-keys.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-locus/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-locus/src/locus.d.ts +12 -0
- package/dist/types/@webex/internal-plugin-locus/test/unit/spec/locus.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-lyra/src/device.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-lyra/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-lyra/src/lyra.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-lyra/src/space.d.ts +7 -0
- package/dist/types/@webex/internal-plugin-lyra/test/integration/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/integration/spec/space.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/lyra.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-lyra/test/unit/spec/space.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/src/config.d.ts +10 -0
- package/dist/types/@webex/internal-plugin-mercury/src/errors.d.ts +31 -0
- package/dist/types/@webex/internal-plugin-mercury/src/index.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-mercury/src/mercury.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket-base.d.ts +120 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/src/socket/socket.shim.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/sharable-mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/lib/promise-tick.d.ts +9 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/_setup.d.ts +0 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/mercury-events.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-mercury/test/unit/spec/socket.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/src/batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/call-diagnostic-events-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/client-metrics-batcher.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/src/config.d.ts +18 -0
- package/dist/types/@webex/internal-plugin-metrics/src/index.d.ts +3 -0
- package/dist/types/@webex/internal-plugin-metrics/src/metrics.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/call-diagnostic-events-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/client-metrics-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-metrics/test/unit/spec/metrics.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/src/config.d.ts +8 -0
- package/dist/types/@webex/internal-plugin-presence/src/constants.d.ts +14 -0
- package/dist/types/@webex/internal-plugin-presence/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence-batcher.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence-worker.d.ts +68 -0
- package/dist/types/@webex/internal-plugin-presence/src/presence.d.ts +6 -0
- package/dist/types/@webex/internal-plugin-presence/test/integration/spec/presence.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/test/unit/spec/presence-worker.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-presence/test/unit/spec/presence.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-search/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-search/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-search/src/search.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-search/test/integration/spec/search.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/src/config.d.ts +16 -0
- package/dist/types/@webex/internal-plugin-support/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/src/support.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-support/test/integration/spec/support.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-support/test/unit/spec/support.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/src/config.d.ts +4 -0
- package/dist/types/@webex/internal-plugin-team/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/src/team.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/actions.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/create.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/get.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/integration/spec/mercury.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-team/test/unit/spec/team.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/src/config.d.ts +17 -0
- package/dist/types/@webex/internal-plugin-user/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/src/user-uuid-batcher.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-user/src/user-uuid-store.d.ts +34 -0
- package/dist/types/@webex/internal-plugin-user/src/user.d.ts +5 -0
- package/dist/types/@webex/internal-plugin-user/test/integration/spec/user.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/test/unit/spec/user-uuid-batcher.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-user/test/unit/spec/user.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/constants.d.ts +28 -0
- package/dist/types/@webex/internal-plugin-voicea/src/index.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/src/voicea.d.ts +78 -0
- package/dist/types/@webex/internal-plugin-voicea/src/voicea.types.d.ts +72 -0
- package/dist/types/@webex/internal-plugin-voicea/test/unit/spec/utils.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-voicea/test/unit/spec/voicea.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-wdm/src/index.d.ts +2 -0
- package/dist/types/@webex/internal-plugin-wdm/test/integration/spec/webex.d.ts +1 -0
- package/dist/types/@webex/internal-plugin-wdm/test/unit/spec/device.d.ts +1 -0
- package/dist/types/@webex/jsdoctrinetest/src/assertions/literal.d.ts +12 -0
- package/dist/types/@webex/jsdoctrinetest/src/extract.d.ts +20 -0
- package/dist/types/@webex/jsdoctrinetest/src/index.d.ts +1 -0
- package/dist/types/@webex/jsdoctrinetest/src/mocha-template.d.ts +11 -0
- package/dist/types/@webex/jsdoctrinetest/src/parse.d.ts +7 -0
- package/dist/types/@webex/jsdoctrinetest/src/transform.d.ts +14 -0
- package/dist/types/@webex/jsdoctrinetest/test/unit/spec/default.d.ts +1 -0
- package/dist/types/@webex/plugin-attachment-actions/src/attachmentActions.d.ts +51 -0
- package/dist/types/@webex/plugin-attachment-actions/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-attachment-actions/test/integration/spec/attachmentActions.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization/src/index.browser.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/src/authorization.d.ts +8 -0
- package/dist/types/@webex/plugin-authorization-browser/src/config.d.ts +6 -0
- package/dist/types/@webex/plugin-authorization-browser/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/fixtures/app.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/spec/authorization-code-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/automation/spec/implicit-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/integration/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/authorization.d.ts +12 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/config.d.ts +7 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/automation/fixtures/app.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/automation/spec/authorization-code-grant.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-browser-first-party/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-node/src/authorization.d.ts +7 -0
- package/dist/types/@webex/plugin-authorization-node/src/config.d.ts +4 -0
- package/dist/types/@webex/plugin-authorization-node/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-authorization-node/test/integration/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-authorization-node/test/unit/spec/authorization.d.ts +1 -0
- package/dist/types/@webex/plugin-device-manager/sample/app.d.ts +15 -0
- package/dist/types/@webex/plugin-device-manager/src/collection.d.ts +8 -0
- package/dist/types/@webex/plugin-device-manager/src/config.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/src/constants.d.ts +3 -0
- package/dist/types/@webex/plugin-device-manager/src/device-manager.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-device-manager/test/unit/spec/index.d.ts +1 -0
- package/dist/types/@webex/plugin-device-manager/webex.d.ts +1 -0
- package/dist/types/@webex/plugin-logger/src/config.d.ts +19 -0
- package/dist/types/@webex/plugin-logger/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-logger/src/logger.d.ts +7 -0
- package/dist/types/@webex/plugin-logger/test/unit/spec/logger.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/browsers.d.ts +75 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/breakout.d.ts +8 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/collection.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/index.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/request.d.ts +22 -0
- package/dist/types/@webex/plugin-meetings/src/breakouts/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/src/common/browser-detection.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/common/collection.d.ts +48 -0
- package/dist/types/@webex/plugin-meetings/src/common/config.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/media.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/parameter.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/password-error.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/permission.d.ts +14 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/reconnection.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/stats.d.ts +15 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/webex-errors.d.ts +69 -0
- package/dist/types/@webex/plugin-meetings/src/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/events-scope.d.ts +17 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/events.d.ts +12 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/events/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/logger-config.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/common/logs/request.d.ts +34 -0
- package/dist/types/@webex/plugin-meetings/src/common/queue.d.ts +32 -0
- package/dist/types/@webex/plugin-meetings/src/config.d.ts +77 -0
- package/dist/types/@webex/plugin-meetings/src/constants.d.ts +899 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/enums.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/index.d.ts +120 -0
- package/dist/types/@webex/plugin-meetings/src/controls-options-manager/util.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/index.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/fullState.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/index.d.ts +269 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/parser.d.ts +212 -0
- package/dist/types/@webex/plugin-meetings/src/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/media/index.d.ts +32 -0
- package/dist/types/@webex/plugin-meetings/src/media/properties.d.ts +107 -0
- package/dist/types/@webex/plugin-meetings/src/media/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/mediaQualityMetrics/config.d.ts +365 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/effectsState.d.ts +42 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/in-meeting-actions.d.ts +83 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/index.d.ts +1724 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/muteState.d.ts +108 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/request.d.ts +261 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/request.type.d.ts +11 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/state.d.ts +9 -0
- package/dist/types/@webex/plugin-meetings/src/meeting/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/collection.d.ts +20 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/index.d.ts +57 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/meeting-info-v2.d.ts +93 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/request.d.ts +22 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/collection.d.ts +23 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/index.d.ts +297 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/request.d.ts +27 -0
- package/dist/types/@webex/plugin-meetings/src/meetings/util.d.ts +18 -0
- package/dist/types/@webex/plugin-meetings/src/member/index.d.ts +146 -0
- package/dist/types/@webex/plugin-meetings/src/member/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/members/collection.d.ts +24 -0
- package/dist/types/@webex/plugin-meetings/src/members/index.d.ts +320 -0
- package/dist/types/@webex/plugin-meetings/src/members/request.d.ts +50 -0
- package/dist/types/@webex/plugin-meetings/src/members/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/config.d.ts +178 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/constants.d.ts +57 -0
- package/dist/types/@webex/plugin-meetings/src/metrics/index.d.ts +160 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/mediaRequestManager.d.ts +51 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/receiveSlot.d.ts +66 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/receiveSlotManager.d.ts +46 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMedia.d.ts +93 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMediaGroup.d.ts +56 -0
- package/dist/types/@webex/plugin-meetings/src/multistream/remoteMediaManager.d.ts +241 -0
- package/dist/types/@webex/plugin-meetings/src/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/@webex/plugin-meetings/src/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/@webex/plugin-meetings/src/reachability/index.d.ts +140 -0
- package/dist/types/@webex/plugin-meetings/src/reachability/request.d.ts +35 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/constants.d.ts +3 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/reactions.d.ts +4 -0
- package/dist/types/@webex/plugin-meetings/src/reactions/reactions.type.d.ts +52 -0
- package/dist/types/@webex/plugin-meetings/src/reconnection-manager/index.d.ts +117 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/enums.d.ts +7 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/index.d.ts +193 -0
- package/dist/types/@webex/plugin-meetings/src/recording-controller/util.d.ts +13 -0
- package/dist/types/@webex/plugin-meetings/src/roap/index.d.ts +77 -0
- package/dist/types/@webex/plugin-meetings/src/roap/request.d.ts +35 -0
- package/dist/types/@webex/plugin-meetings/src/roap/turnDiscovery.d.ts +74 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/index.d.ts +195 -0
- package/dist/types/@webex/plugin-meetings/src/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/types/@webex/plugin-meetings/src/transcription/index.d.ts +64 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/converged-space-meetings.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/journey.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/space-meeting.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/integration/spec/transcription.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/breakout.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/collection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/breakouts/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/common/browser-detection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/common/queue.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/controls-options-manager/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/fixture/locus.d.ts +332 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/controlsUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/embeddedAppsUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/infoUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/parser.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/selfConstant.d.ts +274 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/locus-info/selfUtils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/media/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/media/properties.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/effectsState.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/in-meeting-actions.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/muteState.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/meetinginfov2.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meeting-info/utilv2.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/collection.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/meetings/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/member/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/member/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/members/utils.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/metrics/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/mediaRequestManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlot.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMedia.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaGroup.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/networkQualityMonitor/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/personal-meeting-room/personal-meeting-room.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/reachability/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/recording-controller/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/recording-controller/util.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/request.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/roap/turnDiscovery.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/unit/spec/stats-analyzer/index.d.ts +1 -0
- package/dist/types/@webex/plugin-meetings/test/utils/cmr.d.ts +6 -0
- package/dist/types/@webex/plugin-meetings/test/utils/constants.d.ts +5 -0
- package/dist/types/@webex/plugin-meetings/test/utils/testUtils.d.ts +27 -0
- package/dist/types/@webex/plugin-meetings/test/utils/webex-config.d.ts +63 -0
- package/dist/types/@webex/plugin-meetings/test/utils/webex-test-users.d.ts +2 -0
- package/dist/types/@webex/plugin-memberships/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-memberships/src/memberships.d.ts +50 -0
- package/dist/types/@webex/plugin-memberships/test/integration/spec/memberships.d.ts +1 -0
- package/dist/types/@webex/plugin-messages/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-messages/src/messages.d.ts +58 -0
- package/dist/types/@webex/plugin-messages/test/integration/spec/messages.d.ts +1 -0
- package/dist/types/@webex/plugin-people/src/config.d.ts +9 -0
- package/dist/types/@webex/plugin-people/src/index.d.ts +1 -0
- package/dist/types/@webex/plugin-people/src/people-batcher.d.ts +6 -0
- package/dist/types/@webex/plugin-people/src/people.d.ts +30 -0
- package/dist/types/@webex/plugin-people/test/integration/spec/people.d.ts +1 -0
- package/dist/types/@webex/plugin-people/test/unit/spec/people-batcher.d.ts +1 -0
- package/dist/types/@webex/plugin-people/test/unit/spec/people.d.ts +1 -0
- package/dist/types/@webex/plugin-rooms/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-rooms/src/rooms.d.ts +41 -0
- package/dist/types/@webex/plugin-rooms/test/integration/spec/rooms.d.ts +1 -0
- package/dist/types/@webex/plugin-team-memberships/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-team-memberships/src/team-memberships.d.ts +49 -0
- package/dist/types/@webex/plugin-team-memberships/test/integration/spec/team-memberships.d.ts +1 -0
- package/dist/types/@webex/plugin-teams/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-teams/src/teams.d.ts +27 -0
- package/dist/types/@webex/plugin-teams/test/integration/spec/teams.d.ts +1 -0
- package/dist/types/@webex/plugin-webhooks/src/index.d.ts +2 -0
- package/dist/types/@webex/plugin-webhooks/src/webhooks.d.ts +48 -0
- package/dist/types/@webex/plugin-webhooks/test/integration/spec/webhooks.d.ts +1 -0
- package/dist/types/@webex/recipe-private-web-client/src/config.d.ts +10 -0
- package/dist/types/@webex/recipe-private-web-client/src/index.d.ts +8 -0
- package/dist/types/@webex/storage-adapter-local-forage/src/index.d.ts +35 -0
- package/dist/types/@webex/storage-adapter-local-forage/test/unit/spec/storage-adapter-local-forage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-local-storage/src/index.d.ts +66 -0
- package/dist/types/@webex/storage-adapter-local-storage/test/unit/spec/storage-adapter-local-storage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-session-storage/src/index.d.ts +66 -0
- package/dist/types/@webex/storage-adapter-session-storage/test/unit/spec/storage-adapter-session-storage.d.ts +1 -0
- package/dist/types/@webex/storage-adapter-spec/src/index.d.ts +1 -0
- package/dist/types/@webex/test-helper-appid/src/create-user.browser.d.ts +2 -0
- package/dist/types/@webex/test-helper-appid/src/create-user.d.ts +7 -0
- package/dist/types/@webex/test-helper-appid/src/index.d.ts +7 -0
- package/dist/types/@webex/test-helper-appid/src/router.d.ts +2 -0
- package/dist/types/@webex/test-helper-automation/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-automation/src/wd/accept-grant.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/login.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/print-logs.d.ts +1 -0
- package/dist/types/@webex/test-helper-automation/src/wd/submit-password.d.ts +1 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/primitives.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/schemas.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/assertions/should-to-assert.d.ts +2 -0
- package/dist/types/@webex/test-helper-chai/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-file/src/file.d.ts +5 -0
- package/dist/types/@webex/test-helper-file/src/file.shim.d.ts +18 -0
- package/dist/types/@webex/test-helper-file/src/index.d.ts +2 -0
- package/dist/types/@webex/test-helper-make-local-url/src/index.d.ts +4 -0
- package/dist/types/@webex/test-helper-mocha/src/index.d.ts +29 -0
- package/dist/types/@webex/test-helper-mock-web-socket/src/index.d.ts +26 -0
- package/dist/types/@webex/test-helper-mock-webex/src/index.d.ts +7 -0
- package/dist/types/@webex/test-helper-refresh-callback/src/index.d.ts +10 -0
- package/dist/types/@webex/test-helper-retry/src/index.d.ts +15 -0
- package/dist/types/@webex/test-helper-server/src/cookies.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/files.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/form.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/index.d.ts +1 -0
- package/dist/types/@webex/test-helper-server/src/json.d.ts +2 -0
- package/dist/types/@webex/test-helper-server/src/reflect.d.ts +10 -0
- package/dist/types/@webex/test-helper-test-users/src/index.d.ts +8 -0
- package/dist/types/@webex/test-users/src/index.d.ts +115 -0
- package/dist/types/@webex/test-users/src/whistler.d.ts +44 -0
- package/dist/types/@webex/test-users/test/integration/spec/index.d.ts +1 -0
- package/dist/types/@webex/test-users/test/integration/spec/whistler.d.ts +1 -0
- package/dist/types/@webex/webex-core/src/config.d.ts +39 -0
- package/dist/types/@webex/webex-core/src/credentials-config.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/index.d.ts +24 -0
- package/dist/types/@webex/webex-core/src/interceptors/auth.d.ts +43 -0
- package/dist/types/@webex/webex-core/src/interceptors/default-options.d.ts +31 -0
- package/dist/types/@webex/webex-core/src/interceptors/embargo.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/interceptors/network-timing.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/payload-transformer.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/rate-limit.d.ts +61 -0
- package/dist/types/@webex/webex-core/src/interceptors/redirect.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-event.d.ts +36 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-logger.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/interceptors/request-timing.d.ts +36 -0
- package/dist/types/@webex/webex-core/src/interceptors/response-logger.d.ts +30 -0
- package/dist/types/@webex/webex-core/src/interceptors/user-agent.d.ts +38 -0
- package/dist/types/@webex/webex-core/src/interceptors/webex-tracking-id.d.ts +26 -0
- package/dist/types/@webex/webex-core/src/interceptors/webex-user-agent.d.ts +22 -0
- package/dist/types/@webex/webex-core/src/lib/batcher.d.ts +6 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/credentials.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/grant-errors.d.ts +57 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/index.d.ts +4 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/scope.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/token-collection.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/lib/credentials/token.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/page.d.ts +76 -0
- package/dist/types/@webex/webex-core/src/lib/services/constants.d.ts +6 -0
- package/dist/types/@webex/webex-core/src/lib/services/index.d.ts +10 -0
- package/dist/types/@webex/webex-core/src/lib/services/interceptors/server-error.d.ts +16 -0
- package/dist/types/@webex/webex-core/src/lib/services/interceptors/service.d.ts +37 -0
- package/dist/types/@webex/webex-core/src/lib/services/metrics.d.ts +4 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-catalog.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-fed-ramp.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-host.d.ts +217 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-registry.d.ts +271 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-state.d.ts +46 -0
- package/dist/types/@webex/webex-core/src/lib/services/service-url.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/services/services.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/stateless-webex-plugin.d.ts +48 -0
- package/dist/types/@webex/webex-core/src/lib/storage/decorators.d.ts +15 -0
- package/dist/types/@webex/webex-core/src/lib/storage/errors.d.ts +10 -0
- package/dist/types/@webex/webex-core/src/lib/storage/index.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/lib/storage/make-webex-plugin-store.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/storage/make-webex-store.d.ts +48 -0
- package/dist/types/@webex/webex-core/src/lib/storage/memory-store-adapter.d.ts +18 -0
- package/dist/types/@webex/webex-core/src/lib/webex-core-plugin-mixin.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/webex-http-error.d.ts +12 -0
- package/dist/types/@webex/webex-core/src/lib/webex-internal-core-plugin-mixin.d.ts +8 -0
- package/dist/types/@webex/webex-core/src/lib/webex-plugin.d.ts +5 -0
- package/dist/types/@webex/webex-core/src/plugins/logger.d.ts +2 -0
- package/dist/types/@webex/webex-core/src/webex-core.d.ts +31 -0
- package/dist/types/@webex/webex-core/src/webex-internal-core.d.ts +7 -0
- package/dist/types/@webex/webex-core/test/integration/spec/credentials/credentials.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/credentials/token.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/services/service-catalog.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/services/services.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/integration/spec/webex-core.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/_setup.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/credentials/credentials.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/credentials/token.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/auth.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/default-options.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/embargo.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/network-timing.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/payload-transformer.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/rate-limit.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/redirect.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/request-timing.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/user-agent.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/webex-tracking-id.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/interceptors/webex-user-agent.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/batcher.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/page.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/lib/webex-plugin.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/interceptors/server-error.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/interceptors/service.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-catalog.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-host.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-registry.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-state.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/service-url.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/services/services.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/persist.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/storage-adapter.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/storage/wait-for-value.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/webex-core.d.ts +1 -0
- package/dist/types/@webex/webex-core/test/unit/spec/webex-internal-core.d.ts +1 -0
- package/dist/types/@webex/webrtc/src/analyzer.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/constants.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/extractor.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/generator.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/history.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/ice.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/index.d.ts +31 -0
- package/dist/types/@webex/webrtc/src/logger.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/parser.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/stats.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/transformer.d.ts +0 -0
- package/dist/types/@webex/webrtc/src/validator.d.ts +0 -0
- package/dist/types/@webex/xunit-with-logs/src/index.d.ts +43 -0
- package/dist/types/webex/browser.d.ts +5 -0
- package/dist/types/webex/env.d.ts +2 -0
- package/dist/types/webex/src/_setup.d.ts +1 -0
- package/dist/types/webex/src/config-storage.d.ts +5 -0
- package/dist/types/webex/src/config-storage.shim.d.ts +5 -0
- package/dist/types/webex/src/config.d.ts +17 -0
- package/dist/types/webex/src/index.d.ts +11 -0
- package/dist/types/webex/src/webex.d.ts +9 -0
- package/dist/types/webex/test/integration/spec/commonjs.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/env.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/init.d.ts +1 -0
- package/dist/types/webex/test/integration/spec/request.d.ts +1 -0
- package/dist/types/webex/test/unit/spec/webex.d.ts +1 -0
- package/dist/types/webex/umd/webex.min.d.ts +2 -0
- package/package.json +2 -2
- package/src/assertions/literal.js +4 -7
- package/src/extract.js +28 -26
- package/src/index.js +1 -1
- package/src/mocha-template.js +2 -2
- package/src/parse.js +23 -20
- package/src/transform.js +10 -14
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ Assuming your source code is in `./src` and you've got code like
|
|
|
28
28
|
* @returns {boolean}
|
|
29
29
|
*/
|
|
30
30
|
exports.fn = function fn() {
|
|
31
|
-
return true
|
|
32
|
-
}
|
|
31
|
+
return true;
|
|
32
|
+
};
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
The following command will create a run a mocha spec asserting the result of `fn()` is `true`.
|
|
@@ -1,96 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.build = build;
|
|
12
9
|
exports.test = test;
|
|
13
|
-
|
|
14
10
|
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/parse-int"));
|
|
15
|
-
|
|
16
11
|
var _isNan = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/number/is-nan"));
|
|
17
|
-
|
|
18
12
|
var _parseFloat2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/parse-float"));
|
|
19
|
-
|
|
20
13
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
|
|
21
|
-
|
|
22
14
|
var _template = _interopRequireDefault(require("@babel/template"));
|
|
23
|
-
|
|
24
15
|
var _types = require("@babel/types");
|
|
25
|
-
|
|
26
16
|
/*!
|
|
27
17
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
28
18
|
*/
|
|
19
|
+
|
|
29
20
|
var pattern = /^\s*?=>( async)?\s*/;
|
|
30
21
|
var tpl = (0, _template.default)("\n (function() {\n var assert = require('assert');\n assert.equal(result, ASSERTION);\n })();\n");
|
|
22
|
+
|
|
31
23
|
/**
|
|
32
24
|
* Indicates whether the specified value defines a literal assertion
|
|
33
25
|
* @param {string} value
|
|
34
26
|
* @returns {Boolean}
|
|
35
27
|
*/
|
|
36
|
-
|
|
37
28
|
function test(value) {
|
|
38
29
|
return pattern.test(value);
|
|
39
30
|
}
|
|
31
|
+
|
|
40
32
|
/**
|
|
41
33
|
* Builds a literal assertion
|
|
42
34
|
* @param {string} value
|
|
43
35
|
* @returns {ast}
|
|
44
36
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
37
|
function build(value) {
|
|
48
38
|
return tpl({
|
|
49
39
|
ASSERTION: literal(value.replace(pattern, ''))
|
|
50
40
|
});
|
|
51
41
|
}
|
|
42
|
+
|
|
52
43
|
/**
|
|
53
44
|
* Coerces a string into a type
|
|
54
45
|
* @param {string} l
|
|
55
46
|
* @returns {Literal}
|
|
56
47
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
48
|
function literal(l) {
|
|
60
49
|
/* eslint complexity: [0] */
|
|
61
50
|
// eslint-disable-next-line prefer-const
|
|
62
|
-
var f
|
|
63
|
-
|
|
51
|
+
var f;
|
|
52
|
+
var i;
|
|
64
53
|
switch ((0, _typeof2.default)(l)) {
|
|
65
54
|
case 'boolean':
|
|
66
55
|
return (0, _types.booleanLiteral)(l);
|
|
67
|
-
|
|
68
56
|
case 'number':
|
|
69
57
|
return (0, _types.numericLiteral)(l);
|
|
70
|
-
|
|
71
58
|
case 'string':
|
|
72
59
|
if (l === 'true') {
|
|
73
60
|
return (0, _types.booleanLiteral)(true);
|
|
74
61
|
}
|
|
75
|
-
|
|
76
62
|
if (l === 'false') {
|
|
77
63
|
return (0, _types.booleanLiteral)(false);
|
|
78
64
|
}
|
|
79
|
-
|
|
80
65
|
i = (0, _parseInt2.default)(l, 10);
|
|
81
|
-
|
|
82
66
|
if (!(0, _isNan.default)(i)) {
|
|
83
67
|
return (0, _types.numericLiteral)(i);
|
|
84
68
|
}
|
|
85
|
-
|
|
86
69
|
f = (0, _parseFloat2.default)(l);
|
|
87
|
-
|
|
88
70
|
if (!(0, _isNan.default)(f)) {
|
|
89
71
|
return (0, _types.numericLiteral)(f);
|
|
90
72
|
}
|
|
91
|
-
|
|
92
73
|
return (0, _types.stringLiteral)(l);
|
|
93
|
-
|
|
94
74
|
default:
|
|
95
75
|
throw new Error('Unsupported literal type');
|
|
96
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pattern","tpl","template","test","value","build","ASSERTION","literal","replace","l","f","i","booleanLiteral","numericLiteral","stringLiteral","Error"],"sources":["literal.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport template from '@babel/template';\nimport {
|
|
1
|
+
{"version":3,"names":["pattern","tpl","template","test","value","build","ASSERTION","literal","replace","l","f","i","booleanLiteral","numericLiteral","stringLiteral","Error"],"sources":["literal.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport template from '@babel/template';\nimport {booleanLiteral, numericLiteral, stringLiteral} from '@babel/types';\n\nconst pattern = /^\\s*?=>( async)?\\s*/;\n\nconst tpl = template(`\n (function() {\n var assert = require('assert');\n assert.equal(result, ASSERTION);\n })();\n`);\n\n/**\n * Indicates whether the specified value defines a literal assertion\n * @param {string} value\n * @returns {Boolean}\n */\nexport function test(value) {\n return pattern.test(value);\n}\n\n/**\n * Builds a literal assertion\n * @param {string} value\n * @returns {ast}\n */\nexport function build(value) {\n return tpl({\n ASSERTION: literal(value.replace(pattern, '')),\n });\n}\n\n/**\n * Coerces a string into a type\n * @param {string} l\n * @returns {Literal}\n */\nfunction literal(l) {\n /* eslint complexity: [0] */\n // eslint-disable-next-line prefer-const\n let f;\n let i;\n\n switch (typeof l) {\n case 'boolean':\n return booleanLiteral(l);\n case 'number':\n return numericLiteral(l);\n case 'string':\n if (l === 'true') {\n return booleanLiteral(true);\n }\n if (l === 'false') {\n return booleanLiteral(false);\n }\n i = parseInt(l, 10);\n if (!Number.isNaN(i)) {\n return numericLiteral(i);\n }\n f = parseFloat(l);\n if (!Number.isNaN(f)) {\n return numericLiteral(f);\n }\n\n return stringLiteral(l);\n default:\n throw new Error('Unsupported literal type');\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAIA;AACA;AALA;AACA;AACA;;AAKA,IAAMA,OAAO,GAAG,qBAAqB;AAErC,IAAMC,GAAG,GAAG,IAAAC,iBAAQ,4GAKlB;;AAEF;AACA;AACA;AACA;AACA;AACO,SAASC,IAAI,CAACC,KAAK,EAAE;EAC1B,OAAOJ,OAAO,CAACG,IAAI,CAACC,KAAK,CAAC;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,KAAK,CAACD,KAAK,EAAE;EAC3B,OAAOH,GAAG,CAAC;IACTK,SAAS,EAAEC,OAAO,CAACH,KAAK,CAACI,OAAO,CAACR,OAAO,EAAE,EAAE,CAAC;EAC/C,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASO,OAAO,CAACE,CAAC,EAAE;EAClB;EACA;EACA,IAAIC,CAAC;EACL,IAAIC,CAAC;EAEL,8BAAeF,CAAC;IACd,KAAK,SAAS;MACZ,OAAO,IAAAG,qBAAc,EAACH,CAAC,CAAC;IAC1B,KAAK,QAAQ;MACX,OAAO,IAAAI,qBAAc,EAACJ,CAAC,CAAC;IAC1B,KAAK,QAAQ;MACX,IAAIA,CAAC,KAAK,MAAM,EAAE;QAChB,OAAO,IAAAG,qBAAc,EAAC,IAAI,CAAC;MAC7B;MACA,IAAIH,CAAC,KAAK,OAAO,EAAE;QACjB,OAAO,IAAAG,qBAAc,EAAC,KAAK,CAAC;MAC9B;MACAD,CAAC,GAAG,wBAASF,CAAC,EAAE,EAAE,CAAC;MACnB,IAAI,CAAC,oBAAaE,CAAC,CAAC,EAAE;QACpB,OAAO,IAAAE,qBAAc,EAACF,CAAC,CAAC;MAC1B;MACAD,CAAC,GAAG,0BAAWD,CAAC,CAAC;MACjB,IAAI,CAAC,oBAAaC,CAAC,CAAC,EAAE;QACpB,OAAO,IAAAG,qBAAc,EAACH,CAAC,CAAC;MAC1B;MAEA,OAAO,IAAAI,oBAAa,EAACL,CAAC,CAAC;IACzB;MACE,MAAM,IAAIM,KAAK,CAAC,0BAA0B,CAAC;EAAC;AAElD"}
|
package/dist/extract.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = extract;
|
|
12
|
-
|
|
13
9
|
var _fs = _interopRequireDefault(require("fs"));
|
|
14
|
-
|
|
15
10
|
var _traverse = _interopRequireDefault(require("@babel/traverse"));
|
|
16
|
-
|
|
17
11
|
var _doctrine = _interopRequireDefault(require("doctrine"));
|
|
18
|
-
|
|
19
12
|
var _types = require("@babel/types");
|
|
20
|
-
|
|
21
13
|
var _parse = _interopRequireDefault(require("./parse"));
|
|
22
|
-
|
|
23
14
|
/*!
|
|
24
15
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
25
16
|
*/
|
|
@@ -45,7 +36,6 @@ function extract(transform, filename) {
|
|
|
45
36
|
var code = _fs.default.readFileSync(filename, {
|
|
46
37
|
encoding: 'utf8'
|
|
47
38
|
});
|
|
48
|
-
|
|
49
39
|
var ast = (0, _parse.default)(code, {
|
|
50
40
|
sourceFilename: filename
|
|
51
41
|
});
|
|
@@ -61,7 +51,6 @@ function extract(transform, filename) {
|
|
|
61
51
|
recoverable: true,
|
|
62
52
|
lineNumbers: true
|
|
63
53
|
});
|
|
64
|
-
|
|
65
54
|
if (result.tags) {
|
|
66
55
|
result.tags.forEach(function (tag) {
|
|
67
56
|
if (tag.title === 'example') {
|
|
@@ -83,7 +72,6 @@ function extract(transform, filename) {
|
|
|
83
72
|
if (done) {
|
|
84
73
|
return;
|
|
85
74
|
}
|
|
86
|
-
|
|
87
75
|
path.pushContainer('body', results);
|
|
88
76
|
done = true;
|
|
89
77
|
}
|
|
@@ -92,22 +80,19 @@ function extract(transform, filename) {
|
|
|
92
80
|
});
|
|
93
81
|
return ast;
|
|
94
82
|
}
|
|
83
|
+
|
|
95
84
|
/**
|
|
96
85
|
* Extracts the name from the specified node
|
|
97
86
|
* @param {Node} node
|
|
98
87
|
* @returns {string}
|
|
99
88
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
89
|
function getNodeName(node) {
|
|
103
90
|
if (node.id) {
|
|
104
91
|
return node.id.name;
|
|
105
92
|
}
|
|
106
|
-
|
|
107
93
|
if (node.key) {
|
|
108
94
|
return node.key.name;
|
|
109
95
|
}
|
|
110
|
-
|
|
111
96
|
throw new Error('Could not find name for node');
|
|
112
97
|
}
|
|
113
98
|
/**
|
|
@@ -115,20 +100,19 @@ function getNodeName(node) {
|
|
|
115
100
|
* @param {CommentBlock} comment
|
|
116
101
|
* @returns {Boolean}
|
|
117
102
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
103
|
function isJSDocComment(comment) {
|
|
121
104
|
var asterisks = comment.value.match(/^(\*+)/);
|
|
122
|
-
|
|
123
105
|
if (comment.value.startsWith('/*') && comment.value.endsWith('*/')) {
|
|
124
106
|
return false;
|
|
125
|
-
}
|
|
126
|
-
|
|
107
|
+
}
|
|
127
108
|
|
|
128
|
-
return (comment.type === "CommentBlock" || // estree
|
|
129
109
|
// eslint-disable-next-line
|
|
130
|
-
comment.type ===
|
|
110
|
+
return (comment.type === 'CommentBlock' ||
|
|
111
|
+
// estree
|
|
112
|
+
// eslint-disable-next-line
|
|
113
|
+
comment.type === "Block") &&
|
|
114
|
+
// get-comments / traditional
|
|
131
115
|
// eslint-disable-next-line
|
|
132
|
-
|
|
116
|
+
asterisks && asterisks[1].length === 1;
|
|
133
117
|
}
|
|
134
118
|
//# sourceMappingURL=extract.js.map
|
package/dist/extract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["extract","transform","filename","code","fs","readFileSync","encoding","ast","parse","sourceFilename","results","done","traverse","enter","path","node","leadingComments","filter","isJSDocComment","forEach","comment","result","doctrine","value","unwrap","sloppy","recoverable","lineNumbers","tags","tag","title","push","description","name","getNodeName","loc","type","Program","exit","isProgram","pushContainer","id","key","Error","asterisks","match","startsWith","endsWith","length"],"sources":["extract.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\
|
|
1
|
+
{"version":3,"names":["extract","transform","filename","code","fs","readFileSync","encoding","ast","parse","sourceFilename","results","done","traverse","enter","path","node","leadingComments","filter","isJSDocComment","forEach","comment","result","doctrine","value","unwrap","sloppy","recoverable","lineNumbers","tags","tag","title","push","description","name","getNodeName","loc","type","Program","exit","isProgram","pushContainer","id","key","Error","asterisks","match","startsWith","endsWith","length"],"sources":["extract.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport fs from 'fs';\n\nimport traverse from '@babel/traverse';\nimport doctrine from 'doctrine';\nimport {isProgram} from '@babel/types';\n\nimport parse from './parse';\n/**\n * transform function which operates on each discovered example block\n * @callback transformCallback\n * @param {Object} options\n * @param {ast} options.comment\n * @param {string} options.name\n * @param {string} options.filename\n * @param {string} options.type\n */\n\n/**\n * Extracts comment blocks from the source code in the specified file\n * @param {transformCallback} transform\n * @param {string} filename\n * @returns {Array<ast>}\n */\nexport default function extract(transform, filename) {\n // eslint-disable-next-line no-sync\n const code = fs.readFileSync(filename, {encoding: 'utf8'});\n\n const ast = parse(code, {sourceFilename: filename});\n\n const results = [];\n\n let done = false;\n\n traverse(ast, {\n enter(path) {\n if (path.node.leadingComments) {\n path.node.leadingComments.filter(isJSDocComment).forEach((comment) => {\n const result = doctrine.parse(comment.value, {\n unwrap: true,\n sloppy: true,\n recoverable: true,\n lineNumbers: true,\n });\n\n if (result.tags) {\n result.tags.forEach((tag) => {\n if (tag.title === 'example') {\n results.push(\n transform({\n comment: tag.description,\n name: getNodeName(path.node),\n filename: path.node.loc.filename,\n type: path.node.type,\n })\n );\n }\n });\n }\n });\n }\n },\n Program: {\n exit(path) {\n if (isProgram(path)) {\n if (done) {\n return;\n }\n path.pushContainer('body', results);\n done = true;\n }\n },\n },\n });\n\n return ast;\n}\n\n/**\n * Extracts the name from the specified node\n * @param {Node} node\n * @returns {string}\n */\nfunction getNodeName(node) {\n if (node.id) {\n return node.id.name;\n }\n\n if (node.key) {\n return node.key.name;\n }\n\n throw new Error('Could not find name for node');\n}\n/**\n * Indicates if the specified comment block is a doc block\n * @param {CommentBlock} comment\n * @returns {Boolean}\n */\nfunction isJSDocComment(comment) {\n const asterisks = comment.value.match(/^(\\*+)/);\n\n if (comment.value.startsWith('/*') && comment.value.endsWith('*/')) {\n return false;\n }\n\n // eslint-disable-next-line\n return (\n (comment.type === 'CommentBlock' || // estree\n // eslint-disable-next-line\n comment.type === `Block`) && // get-comments / traditional\n // eslint-disable-next-line\n asterisks &&\n asterisks[1].length === 1\n );\n}\n"],"mappings":";;;;;;;;AAIA;AAEA;AACA;AACA;AAEA;AAVA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,OAAO,CAACC,SAAS,EAAEC,QAAQ,EAAE;EACnD;EACA,IAAMC,IAAI,GAAGC,WAAE,CAACC,YAAY,CAACH,QAAQ,EAAE;IAACI,QAAQ,EAAE;EAAM,CAAC,CAAC;EAE1D,IAAMC,GAAG,GAAG,IAAAC,cAAK,EAACL,IAAI,EAAE;IAACM,cAAc,EAAEP;EAAQ,CAAC,CAAC;EAEnD,IAAMQ,OAAO,GAAG,EAAE;EAElB,IAAIC,IAAI,GAAG,KAAK;EAEhB,IAAAC,iBAAQ,EAACL,GAAG,EAAE;IACZM,KAAK,iBAACC,IAAI,EAAE;MACV,IAAIA,IAAI,CAACC,IAAI,CAACC,eAAe,EAAE;QAC7BF,IAAI,CAACC,IAAI,CAACC,eAAe,CAACC,MAAM,CAACC,cAAc,CAAC,CAACC,OAAO,CAAC,UAACC,OAAO,EAAK;UACpE,IAAMC,MAAM,GAAGC,iBAAQ,CAACd,KAAK,CAACY,OAAO,CAACG,KAAK,EAAE;YAC3CC,MAAM,EAAE,IAAI;YACZC,MAAM,EAAE,IAAI;YACZC,WAAW,EAAE,IAAI;YACjBC,WAAW,EAAE;UACf,CAAC,CAAC;UAEF,IAAIN,MAAM,CAACO,IAAI,EAAE;YACfP,MAAM,CAACO,IAAI,CAACT,OAAO,CAAC,UAACU,GAAG,EAAK;cAC3B,IAAIA,GAAG,CAACC,KAAK,KAAK,SAAS,EAAE;gBAC3BpB,OAAO,CAACqB,IAAI,CACV9B,SAAS,CAAC;kBACRmB,OAAO,EAAES,GAAG,CAACG,WAAW;kBACxBC,IAAI,EAAEC,WAAW,CAACpB,IAAI,CAACC,IAAI,CAAC;kBAC5Bb,QAAQ,EAAEY,IAAI,CAACC,IAAI,CAACoB,GAAG,CAACjC,QAAQ;kBAChCkC,IAAI,EAAEtB,IAAI,CAACC,IAAI,CAACqB;gBAClB,CAAC,CAAC,CACH;cACH;YACF,CAAC,CAAC;UACJ;QACF,CAAC,CAAC;MACJ;IACF,CAAC;IACDC,OAAO,EAAE;MACPC,IAAI,gBAACxB,IAAI,EAAE;QACT,IAAI,IAAAyB,gBAAS,EAACzB,IAAI,CAAC,EAAE;UACnB,IAAIH,IAAI,EAAE;YACR;UACF;UACAG,IAAI,CAAC0B,aAAa,CAAC,MAAM,EAAE9B,OAAO,CAAC;UACnCC,IAAI,GAAG,IAAI;QACb;MACF;IACF;EACF,CAAC,CAAC;EAEF,OAAOJ,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS2B,WAAW,CAACnB,IAAI,EAAE;EACzB,IAAIA,IAAI,CAAC0B,EAAE,EAAE;IACX,OAAO1B,IAAI,CAAC0B,EAAE,CAACR,IAAI;EACrB;EAEA,IAAIlB,IAAI,CAAC2B,GAAG,EAAE;IACZ,OAAO3B,IAAI,CAAC2B,GAAG,CAACT,IAAI;EACtB;EAEA,MAAM,IAAIU,KAAK,CAAC,8BAA8B,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,SAASzB,cAAc,CAACE,OAAO,EAAE;EAC/B,IAAMwB,SAAS,GAAGxB,OAAO,CAACG,KAAK,CAACsB,KAAK,CAAC,QAAQ,CAAC;EAE/C,IAAIzB,OAAO,CAACG,KAAK,CAACuB,UAAU,CAAC,IAAI,CAAC,IAAI1B,OAAO,CAACG,KAAK,CAACwB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAClE,OAAO,KAAK;EACd;;EAEA;EACA,OACE,CAAC3B,OAAO,CAACgB,IAAI,KAAK,cAAc;EAAI;EAClC;EACAhB,OAAO,CAACgB,IAAI,YAAY;EAAK;EAC/B;EACAQ,SAAS,IACTA,SAAS,CAAC,CAAC,CAAC,CAACI,MAAM,KAAK,CAAC;AAE7B"}
|
package/dist/index.js
CHANGED
|
@@ -1,64 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _path = _interopRequireDefault(require("path"));
|
|
6
|
-
|
|
7
5
|
var _generator = _interopRequireDefault(require("@babel/generator"));
|
|
8
|
-
|
|
9
6
|
var _extract = _interopRequireDefault(require("./extract"));
|
|
10
|
-
|
|
11
7
|
var _transform = _interopRequireDefault(require("./transform"));
|
|
12
|
-
|
|
13
8
|
/*!
|
|
14
9
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
15
10
|
*/
|
|
16
11
|
|
|
17
12
|
/* eslint require-jsdoc: [0] */
|
|
18
|
-
|
|
19
13
|
/* eslint no-console: [0] */
|
|
14
|
+
|
|
20
15
|
function isNodeModule(filename) {
|
|
21
16
|
return filename.includes('node_modules') && !filename.includes('packages/node_modules');
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
function inject(module, filename) {
|
|
25
19
|
var _generate = (0, _generator.default)((0, _extract.default)(_transform.default, filename), {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
compact: false,
|
|
21
|
+
quotes: 'single'
|
|
22
|
+
}),
|
|
23
|
+
code = _generate.code;
|
|
31
24
|
if (process.env.JSDOCTRINETEST_VERBOSE) {
|
|
32
25
|
console.log(filename);
|
|
33
26
|
console.log(code);
|
|
34
27
|
console.log();
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
module._compile(code, filename);
|
|
38
30
|
}
|
|
39
|
-
|
|
40
31
|
function enableSpecInjection() {
|
|
41
32
|
var dir;
|
|
42
33
|
var load = require.extensions['.js'];
|
|
43
|
-
|
|
44
34
|
require.extensions['.js'] = function loadWithSpecs(m, filename) {
|
|
45
35
|
if (isNodeModule(filename)) {
|
|
46
36
|
return load(m, filename);
|
|
47
|
-
}
|
|
37
|
+
}
|
|
38
|
+
// this is really janky, but so far seems to properly ensure we only load
|
|
48
39
|
// files in the directories specified to mocha
|
|
49
|
-
|
|
50
|
-
|
|
51
40
|
if (!dir) {
|
|
52
41
|
dir = _path.default.dirname(filename);
|
|
53
42
|
}
|
|
54
|
-
|
|
55
43
|
if (!filename.includes(dir)) {
|
|
56
44
|
return load(m, filename);
|
|
57
45
|
}
|
|
58
|
-
|
|
59
46
|
return inject(m, filename);
|
|
60
47
|
};
|
|
61
48
|
}
|
|
62
|
-
|
|
63
49
|
enableSpecInjection();
|
|
64
50
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNodeModule","filename","includes","inject","module","generate","extract","transform","compact","quotes","code","process","env","JSDOCTRINETEST_VERBOSE","console","log","_compile","enableSpecInjection","dir","load","require","extensions","loadWithSpecs","m","path","dirname"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint require-jsdoc: [0] */\n/* eslint no-console: [0] */\n\nimport path from 'path';\n\nimport generate from '@babel/generator';\n\nimport extract from './extract';\nimport transform from './transform';\n\nfunction isNodeModule(filename) {\n return filename.includes('node_modules') && !filename.includes('packages/node_modules');\n}\n\nfunction inject(module, filename) {\n const {code} = generate(extract(transform, filename), {\n compact: false,\n quotes: 'single'
|
|
1
|
+
{"version":3,"names":["isNodeModule","filename","includes","inject","module","generate","extract","transform","compact","quotes","code","process","env","JSDOCTRINETEST_VERBOSE","console","log","_compile","enableSpecInjection","dir","load","require","extensions","loadWithSpecs","m","path","dirname"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint require-jsdoc: [0] */\n/* eslint no-console: [0] */\n\nimport path from 'path';\n\nimport generate from '@babel/generator';\n\nimport extract from './extract';\nimport transform from './transform';\n\nfunction isNodeModule(filename) {\n return filename.includes('node_modules') && !filename.includes('packages/node_modules');\n}\n\nfunction inject(module, filename) {\n const {code} = generate(extract(transform, filename), {\n compact: false,\n quotes: 'single',\n });\n\n if (process.env.JSDOCTRINETEST_VERBOSE) {\n console.log(filename);\n console.log(code);\n console.log();\n }\n module._compile(code, filename);\n}\n\nfunction enableSpecInjection() {\n let dir;\n const load = require.extensions['.js'];\n\n require.extensions['.js'] = function loadWithSpecs(m, filename) {\n if (isNodeModule(filename)) {\n return load(m, filename);\n }\n // this is really janky, but so far seems to properly ensure we only load\n // files in the directories specified to mocha\n if (!dir) {\n dir = path.dirname(filename);\n }\n\n if (!filename.includes(dir)) {\n return load(m, filename);\n }\n\n return inject(m, filename);\n };\n}\n\nenableSpecInjection();\n"],"mappings":";;;AAOA;AAEA;AAEA;AACA;AAZA;AACA;AACA;;AAEA;AACA;;AASA,SAASA,YAAY,CAACC,QAAQ,EAAE;EAC9B,OAAOA,QAAQ,CAACC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAACD,QAAQ,CAACC,QAAQ,CAAC,uBAAuB,CAAC;AACzF;AAEA,SAASC,MAAM,CAACC,MAAM,EAAEH,QAAQ,EAAE;EAChC,gBAAe,IAAAI,kBAAQ,EAAC,IAAAC,gBAAO,EAACC,kBAAS,EAAEN,QAAQ,CAAC,EAAE;MACpDO,OAAO,EAAE,KAAK;MACdC,MAAM,EAAE;IACV,CAAC,CAAC;IAHKC,IAAI,aAAJA,IAAI;EAKX,IAAIC,OAAO,CAACC,GAAG,CAACC,sBAAsB,EAAE;IACtCC,OAAO,CAACC,GAAG,CAACd,QAAQ,CAAC;IACrBa,OAAO,CAACC,GAAG,CAACL,IAAI,CAAC;IACjBI,OAAO,CAACC,GAAG,EAAE;EACf;EACAX,MAAM,CAACY,QAAQ,CAACN,IAAI,EAAET,QAAQ,CAAC;AACjC;AAEA,SAASgB,mBAAmB,GAAG;EAC7B,IAAIC,GAAG;EACP,IAAMC,IAAI,GAAGC,OAAO,CAACC,UAAU,CAAC,KAAK,CAAC;EAEtCD,OAAO,CAACC,UAAU,CAAC,KAAK,CAAC,GAAG,SAASC,aAAa,CAACC,CAAC,EAAEtB,QAAQ,EAAE;IAC9D,IAAID,YAAY,CAACC,QAAQ,CAAC,EAAE;MAC1B,OAAOkB,IAAI,CAACI,CAAC,EAAEtB,QAAQ,CAAC;IAC1B;IACA;IACA;IACA,IAAI,CAACiB,GAAG,EAAE;MACRA,GAAG,GAAGM,aAAI,CAACC,OAAO,CAACxB,QAAQ,CAAC;IAC9B;IAEA,IAAI,CAACA,QAAQ,CAACC,QAAQ,CAACgB,GAAG,CAAC,EAAE;MAC3B,OAAOC,IAAI,CAACI,CAAC,EAAEtB,QAAQ,CAAC;IAC1B;IAEA,OAAOE,MAAM,CAACoB,CAAC,EAAEtB,QAAQ,CAAC;EAC5B,CAAC;AACH;AAEAgB,mBAAmB,EAAE"}
|
package/dist/mocha-template.js
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = generateSpec;
|
|
12
|
-
|
|
13
9
|
var _types = require("@babel/types");
|
|
14
|
-
|
|
15
10
|
var _template = _interopRequireDefault(require("@babel/template"));
|
|
16
|
-
|
|
17
11
|
/*!
|
|
18
12
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
19
13
|
*/
|
|
14
|
+
|
|
20
15
|
var makeDescribeBlock = (0, _template.default)("\n describe(DESCRIBED_THING, function() {\n IT_BLOCK\n });\n");
|
|
21
16
|
var makeItBlock = (0, _template.default)("\n it(DOES_A_THING, function() {\n STATEMENTS\n });\n");
|
|
17
|
+
|
|
22
18
|
/**
|
|
23
19
|
* Wraps a test case in a Mocha it-block
|
|
24
20
|
* @param {Object} a
|
|
@@ -26,14 +22,11 @@ var makeItBlock = (0, _template.default)("\n it(DOES_A_THING, function() {\n
|
|
|
26
22
|
* @param {Object} a.testCase
|
|
27
23
|
* @returns {[type]}
|
|
28
24
|
*/
|
|
29
|
-
|
|
30
25
|
function generateSpec(a) {
|
|
31
26
|
var itLine = a.name;
|
|
32
|
-
|
|
33
27
|
if (a.type.toLowerCase().includes('function')) {
|
|
34
28
|
itLine += '()';
|
|
35
29
|
}
|
|
36
|
-
|
|
37
30
|
var d = makeDescribeBlock({
|
|
38
31
|
DESCRIBED_THING: (0, _types.stringLiteral)(a.filename),
|
|
39
32
|
IT_BLOCK: makeItBlock({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["makeDescribeBlock","template","makeItBlock","generateSpec","a","itLine","name","type","toLowerCase","includes","d","DESCRIBED_THING","stringLiteral","filename","IT_BLOCK","DOES_A_THING","STATEMENTS","testCase"],"sources":["mocha-template.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {stringLiteral} from '@babel/types';\nimport template from '@babel/template';\n\nconst makeDescribeBlock = template(`\n describe(DESCRIBED_THING, function() {\n IT_BLOCK\n });\n`);\n\nconst makeItBlock = template(`\n it(DOES_A_THING, function() {\n STATEMENTS\n });\n`);\n\n/**\n * Wraps a test case in a Mocha it-block\n * @param {Object} a\n * @param {string} a.name\n * @param {Object} a.testCase\n * @returns {[type]}\n */\nexport default function generateSpec(a) {\n let itLine = a.name;\n\n if (a.type.toLowerCase().includes('function')) {\n itLine += '()';\n }\n\n const d = makeDescribeBlock({\n DESCRIBED_THING: stringLiteral(a.filename),\n IT_BLOCK: makeItBlock({\n DOES_A_THING: stringLiteral(itLine),\n STATEMENTS: a.testCase
|
|
1
|
+
{"version":3,"names":["makeDescribeBlock","template","makeItBlock","generateSpec","a","itLine","name","type","toLowerCase","includes","d","DESCRIBED_THING","stringLiteral","filename","IT_BLOCK","DOES_A_THING","STATEMENTS","testCase"],"sources":["mocha-template.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {stringLiteral} from '@babel/types';\nimport template from '@babel/template';\n\nconst makeDescribeBlock = template(`\n describe(DESCRIBED_THING, function() {\n IT_BLOCK\n });\n`);\n\nconst makeItBlock = template(`\n it(DOES_A_THING, function() {\n STATEMENTS\n });\n`);\n\n/**\n * Wraps a test case in a Mocha it-block\n * @param {Object} a\n * @param {string} a.name\n * @param {Object} a.testCase\n * @returns {[type]}\n */\nexport default function generateSpec(a) {\n let itLine = a.name;\n\n if (a.type.toLowerCase().includes('function')) {\n itLine += '()';\n }\n\n const d = makeDescribeBlock({\n DESCRIBED_THING: stringLiteral(a.filename),\n IT_BLOCK: makeItBlock({\n DOES_A_THING: stringLiteral(itLine),\n STATEMENTS: a.testCase,\n }),\n });\n\n return d;\n}\n"],"mappings":";;;;;;;;AAIA;AACA;AALA;AACA;AACA;;AAKA,IAAMA,iBAAiB,GAAG,IAAAC,iBAAQ,sEAIhC;AAEF,IAAMC,WAAW,GAAG,IAAAD,iBAAQ,+DAI1B;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASE,YAAY,CAACC,CAAC,EAAE;EACtC,IAAIC,MAAM,GAAGD,CAAC,CAACE,IAAI;EAEnB,IAAIF,CAAC,CAACG,IAAI,CAACC,WAAW,EAAE,CAACC,QAAQ,CAAC,UAAU,CAAC,EAAE;IAC7CJ,MAAM,IAAI,IAAI;EAChB;EAEA,IAAMK,CAAC,GAAGV,iBAAiB,CAAC;IAC1BW,eAAe,EAAE,IAAAC,oBAAa,EAACR,CAAC,CAACS,QAAQ,CAAC;IAC1CC,QAAQ,EAAEZ,WAAW,CAAC;MACpBa,YAAY,EAAE,IAAAH,oBAAa,EAACP,MAAM,CAAC;MACnCW,UAAU,EAAEZ,CAAC,CAACa;IAChB,CAAC;EACH,CAAC,CAAC;EAEF,OAAOP,CAAC;AACV"}
|
package/dist/parse.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = parse;
|
|
12
|
-
|
|
13
9
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
14
|
-
|
|
15
10
|
var _babylon = require("babylon");
|
|
16
|
-
|
|
17
11
|
/*!
|
|
18
12
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
19
13
|
*/
|
package/dist/parse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parse","code","options","babelParse","allowImportExportEverywhere","sourceType","plugins"],"sources":["parse.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {parse as babelParse} from 'babylon';\nimport {defaults} from 'lodash';\n\n/**\n * Wrapper around babylon's parse with defaults set\n * @param {string} code\n * @param {object} options\n * @returns {ast}\n */\nexport default function parse(code, options) {\n return babelParse(code
|
|
1
|
+
{"version":3,"names":["parse","code","options","babelParse","allowImportExportEverywhere","sourceType","plugins"],"sources":["parse.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {parse as babelParse} from 'babylon';\nimport {defaults} from 'lodash';\n\n/**\n * Wrapper around babylon's parse with defaults set\n * @param {string} code\n * @param {object} options\n * @returns {ast}\n */\nexport default function parse(code, options) {\n return babelParse(\n code,\n defaults(options, {\n allowImportExportEverywhere: true,\n sourceType: 'module',\n plugins: [\n 'jsx',\n 'flow',\n 'asyncFunctions',\n 'classConstructorCall',\n 'doExpressions',\n 'trailingFunctionCommas',\n 'objectRestSpread',\n 'decorators',\n 'classProperties',\n 'exportExtensions',\n 'exponentiationOperator',\n 'asyncGenerators',\n 'functionBind',\n 'functionSent',\n ],\n })\n );\n}\n"],"mappings":";;;;;;;;;AAIA;AAJA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,KAAK,CAACC,IAAI,EAAEC,OAAO,EAAE;EAC3C,OAAO,IAAAC,cAAU,EACfF,IAAI,EACJ,wBAASC,OAAO,EAAE;IAChBE,2BAA2B,EAAE,IAAI;IACjCC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,CACP,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,cAAc;EAElB,CAAC,CAAC,CACH;AACH"}
|
package/dist/transform.js
CHANGED
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = transform;
|
|
12
|
-
|
|
13
9
|
var _deleteProperty = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/reflect/delete-property"));
|
|
14
|
-
|
|
15
10
|
var _template = _interopRequireDefault(require("@babel/template"));
|
|
16
|
-
|
|
17
11
|
var _traverse = _interopRequireDefault(require("@babel/traverse"));
|
|
18
|
-
|
|
19
12
|
var _parse = _interopRequireDefault(require("./parse"));
|
|
20
|
-
|
|
21
13
|
var _mochaTemplate = _interopRequireDefault(require("./mocha-template"));
|
|
22
|
-
|
|
23
14
|
var _literal = require("./assertions/literal");
|
|
24
|
-
|
|
25
15
|
/*!
|
|
26
16
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
27
17
|
*/
|
|
18
|
+
|
|
28
19
|
var assertionStatementTemplate = (0, _template.default)("\n return Promise.resolve(ORIGINAL)\n .then(function(result) {\n ASSERTIONS\n })\n");
|
|
20
|
+
|
|
29
21
|
/**
|
|
30
22
|
* @param {Object} options
|
|
31
23
|
* @param {ast} options.comment
|
|
@@ -34,18 +26,16 @@ var assertionStatementTemplate = (0, _template.default)("\n return Promise.reso
|
|
|
34
26
|
* @param {string} options.type
|
|
35
27
|
* @returns {ast}
|
|
36
28
|
*/
|
|
37
|
-
|
|
38
29
|
function transform(_ref) {
|
|
39
30
|
var comment = _ref.comment,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
name = _ref.name,
|
|
32
|
+
filename = _ref.filename,
|
|
33
|
+
type = _ref.type;
|
|
43
34
|
var ast = (0, _parse.default)(comment);
|
|
44
35
|
(0, _traverse.default)(ast, {
|
|
45
36
|
enter: function enter(path) {
|
|
46
37
|
if (path.node.trailingComments) {
|
|
47
38
|
var assertions = path.node.trailingComments.map(makeAsserter);
|
|
48
|
-
|
|
49
39
|
if (assertions.length) {
|
|
50
40
|
(0, _deleteProperty.default)(path.node, 'trailingComments');
|
|
51
41
|
path.replaceWith(assertionStatementTemplate({
|
|
@@ -63,18 +53,16 @@ function transform(_ref) {
|
|
|
63
53
|
type: type
|
|
64
54
|
});
|
|
65
55
|
}
|
|
56
|
+
|
|
66
57
|
/**
|
|
67
58
|
* Takes a trailing comment from an example block and changes it to an assertion
|
|
68
59
|
* @param {CommentBlock} comment
|
|
69
60
|
* @returns {ast}
|
|
70
61
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
62
|
function makeAsserter(comment) {
|
|
74
63
|
if ((0, _literal.test)(comment.value)) {
|
|
75
64
|
return (0, _literal.build)(comment.value);
|
|
76
65
|
}
|
|
77
|
-
|
|
78
66
|
return null;
|
|
79
67
|
}
|
|
80
68
|
//# sourceMappingURL=transform.js.map
|
package/dist/transform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assertionStatementTemplate","template","transform","comment","name","filename","type","ast","parse","traverse","enter","path","node","trailingComments","assertions","map","makeAsserter","length","replaceWith","ORIGINAL","ASSERTIONS","generateSpec","testCase","literalAssertionTest","value","buildLiteralAssertion"],"sources":["transform.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\
|
|
1
|
+
{"version":3,"names":["assertionStatementTemplate","template","transform","comment","name","filename","type","ast","parse","traverse","enter","path","node","trailingComments","assertions","map","makeAsserter","length","replaceWith","ORIGINAL","ASSERTIONS","generateSpec","testCase","literalAssertionTest","value","buildLiteralAssertion"],"sources":["transform.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport template from '@babel/template';\nimport traverse from '@babel/traverse';\n\nimport parse from './parse';\nimport generateSpec from './mocha-template';\nimport {build as buildLiteralAssertion, test as literalAssertionTest} from './assertions/literal';\n\nconst assertionStatementTemplate = template(`\n return Promise.resolve(ORIGINAL)\n .then(function(result) {\n ASSERTIONS\n })\n`);\n\n/**\n * @param {Object} options\n * @param {ast} options.comment\n * @param {string} options.name\n * @param {string} options.filename\n * @param {string} options.type\n * @returns {ast}\n */\nexport default function transform({comment, name, filename, type}) {\n const ast = parse(comment);\n\n traverse(ast, {\n enter(path) {\n if (path.node.trailingComments) {\n const assertions = path.node.trailingComments.map(makeAsserter);\n\n if (assertions.length) {\n Reflect.deleteProperty(path.node, 'trailingComments');\n\n path.replaceWith(\n assertionStatementTemplate({\n ORIGINAL: path.node,\n ASSERTIONS: assertions,\n })\n );\n }\n }\n },\n });\n\n return generateSpec({\n testCase: ast,\n name,\n filename,\n type,\n });\n}\n\n/**\n * Takes a trailing comment from an example block and changes it to an assertion\n * @param {CommentBlock} comment\n * @returns {ast}\n */\nfunction makeAsserter(comment) {\n if (literalAssertionTest(comment.value)) {\n return buildLiteralAssertion(comment.value);\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;AAIA;AACA;AAEA;AACA;AACA;AATA;AACA;AACA;;AASA,IAAMA,0BAA0B,GAAG,IAAAC,iBAAQ,mGAKzC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,SAAS,OAAkC;EAAA,IAAhCC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAEC,QAAQ,QAARA,QAAQ;IAAEC,IAAI,QAAJA,IAAI;EAC9D,IAAMC,GAAG,GAAG,IAAAC,cAAK,EAACL,OAAO,CAAC;EAE1B,IAAAM,iBAAQ,EAACF,GAAG,EAAE;IACZG,KAAK,iBAACC,IAAI,EAAE;MACV,IAAIA,IAAI,CAACC,IAAI,CAACC,gBAAgB,EAAE;QAC9B,IAAMC,UAAU,GAAGH,IAAI,CAACC,IAAI,CAACC,gBAAgB,CAACE,GAAG,CAACC,YAAY,CAAC;QAE/D,IAAIF,UAAU,CAACG,MAAM,EAAE;UACrB,6BAAuBN,IAAI,CAACC,IAAI,EAAE,kBAAkB,CAAC;UAErDD,IAAI,CAACO,WAAW,CACdlB,0BAA0B,CAAC;YACzBmB,QAAQ,EAAER,IAAI,CAACC,IAAI;YACnBQ,UAAU,EAAEN;UACd,CAAC,CAAC,CACH;QACH;MACF;IACF;EACF,CAAC,CAAC;EAEF,OAAO,IAAAO,sBAAY,EAAC;IAClBC,QAAQ,EAAEf,GAAG;IACbH,IAAI,EAAJA,IAAI;IACJC,QAAQ,EAARA,QAAQ;IACRC,IAAI,EAAJA;EACF,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASU,YAAY,CAACb,OAAO,EAAE;EAC7B,IAAI,IAAAoB,aAAoB,EAACpB,OAAO,CAACqB,KAAK,CAAC,EAAE;IACvC,OAAO,IAAAC,cAAqB,EAACtB,OAAO,CAACqB,KAAK,CAAC;EAC7C;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a string from a base64url-encoded string
|
|
3
|
+
* @param {string} str
|
|
4
|
+
* @returns {string}
|
|
5
|
+
*/
|
|
6
|
+
export function fromBase64url(str: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a string to a base64url-encoded string. It also accepts a buffer
|
|
9
|
+
* @param {string|buffer} str
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
export function toBase64Url(str: any): string;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a string to a base64url-encoded string. It also accepts a buffer
|
|
15
|
+
* @param {string|buffer} str
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export function encode(str: string | buffer): string;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a string from a base64url-encoded string
|
|
21
|
+
* @param {string} str
|
|
22
|
+
* @returns {string}
|
|
23
|
+
*/
|
|
24
|
+
export function decode(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if the provided string is, in fact, a base64 string
|
|
27
|
+
* @param {String} str
|
|
28
|
+
* @returns {Boolean}
|
|
29
|
+
*/
|
|
30
|
+
export function validate(str: string): boolean;
|
|
31
|
+
declare namespace _default {
|
|
32
|
+
export { fromBase64url };
|
|
33
|
+
export { toBase64Url };
|
|
34
|
+
export { encode };
|
|
35
|
+
export { decode };
|
|
36
|
+
export { validate };
|
|
37
|
+
}
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Behaves like debounce, but additionally executes after a number of calls are
|
|
6
|
+
* attempted, rather than just time
|
|
7
|
+
* @param {Function} fn
|
|
8
|
+
* @param {Number} wait
|
|
9
|
+
* @param {Object} options
|
|
10
|
+
* @returns {Function}
|
|
11
|
+
*/
|
|
12
|
+
export default function debounce(fn: Function, wait: number, options: any): Function;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Check object for the specified keys
|
|
6
|
+
* @param {Array<string>} keys
|
|
7
|
+
* @param {Object} object
|
|
8
|
+
* @returns {undefined}
|
|
9
|
+
* @throws Error
|
|
10
|
+
*/
|
|
11
|
+
export default function checkRequired(keys: Array<string>, object: any): undefined;
|