@ama-sdk/core 10.0.0-next.8 → 11.0.0-next.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 +51 -31
- package/cjs/clients/api-angular-client.js +6 -2
- package/cjs/clients/api-beacon-client.js +3 -2
- package/cjs/clients/api-fetch-client.js +9 -4
- package/cjs/fwk/Reviver.js +3 -3
- package/cjs/fwk/api.helpers.js +9 -10
- package/cjs/fwk/api.js +2 -2
- package/cjs/fwk/date.js +4 -39
- package/cjs/fwk/errors.js +10 -11
- package/cjs/fwk/index.js +1 -0
- package/cjs/fwk/logger.js +9 -0
- package/cjs/fwk/mocks/alf-mock-adapter.js +1 -8
- package/cjs/fwk/mocks/base-mock-adapter.js +0 -12
- package/cjs/plugins/additional-params/additional-params.request.js +5 -5
- package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +2 -2
- package/cjs/plugins/api-key/api-key.request.js +2 -2
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +77 -105
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +9 -98
- package/cjs/plugins/client-facts/client-facts.request.js +5 -7
- package/cjs/plugins/concurrent/concurrent.fetch.js +2 -2
- package/cjs/plugins/core/plugin.js +1 -3
- package/cjs/plugins/custom-info/custom-info.reply.js +0 -1
- package/cjs/plugins/index.js +0 -21
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +7 -9
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -0
- package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +5 -4
- package/cjs/plugins/mock-intercept/mock-intercept.request.js +3 -3
- package/cjs/plugins/mock-intercept/mock-intercept.spec.js +1 -3
- package/cjs/plugins/perf-metric/perf-metric.fetch.js +2 -5
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +12 -14
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +3 -1
- package/cjs/plugins/retry/retry.fetch.js +2 -3
- package/cjs/plugins/session-id/session-id.request.js +10 -11
- package/cjs/plugins/session-id/session-id.spec.js +12 -8
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +2 -4
- package/cjs/plugins/timeout/timeout.fetch.js +75 -15
- package/cjs/plugins/timeout/timeout.spec.js +102 -3
- package/cjs/plugins/url-rewrite/url-rewrite.request.js +2 -2
- package/cjs/plugins/wait-for/wait-for.fetch.js +2 -2
- package/cjs/public_api.js +1 -0
- package/cjs/utils/crypto.js +5 -5
- package/cjs/utils/encoder.js +0 -5
- package/cjs/{plugins/gateway-token → utils}/index.js +5 -2
- package/cjs/utils/json-token.js +11 -13
- package/cjs/utils/json-token.spec.js +4 -2
- package/cjs/utils/mime-types.js +22 -0
- package/cli/clear-index.cjs +25 -0
- package/cli/clear-index.cjs.map +1 -0
- package/cli/clear-index.d.cts +3 -0
- package/cli/clear-index.d.cts.map +1 -0
- package/cli/files-pack.cjs +84 -0
- package/cli/files-pack.cjs.map +1 -0
- package/cli/files-pack.d.cts +3 -0
- package/cli/files-pack.d.cts.map +1 -0
- package/cli/package.json +3 -0
- package/esm2015/clients/api-angular-client.js +6 -2
- package/esm2015/clients/api-beacon-client.js +3 -2
- package/esm2015/clients/api-fetch-client.js +9 -4
- package/esm2015/fwk/Reviver.js +0 -3
- package/esm2015/fwk/api.helpers.js +3 -3
- package/esm2015/fwk/api.interface.js +1 -1
- package/esm2015/fwk/api.js +2 -2
- package/esm2015/fwk/core/api-client.js +0 -1
- package/esm2015/fwk/core/base-api-constructor.js +0 -1
- package/esm2015/fwk/date.js +1 -38
- package/esm2015/fwk/errors.js +2 -3
- package/esm2015/fwk/index.js +1 -0
- package/esm2015/fwk/logger.js +6 -0
- package/esm2015/fwk/mocks/alf-mock-adapter.js +1 -9
- package/esm2015/fwk/mocks/base-mock-adapter.js +0 -12
- package/esm2015/fwk/mocks/encoded-api-request.js +3 -1
- package/esm2015/fwk/mocks/helpers.js +0 -2
- package/esm2015/fwk/mocks/mock-adapter.js +1 -1
- package/esm2015/fwk/mocks/path-object.js +1 -1
- package/esm2015/plugins/additional-params/additional-params.request.js +2 -3
- package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +2 -3
- package/esm2015/plugins/api-key/api-key.request.js +2 -2
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +84 -118
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +10 -99
- package/esm2015/plugins/client-facts/client-facts.request.js +14 -7
- package/esm2015/plugins/concurrent/concurrent.fetch.js +2 -2
- package/esm2015/plugins/core/fetch-plugin.js +4 -1
- package/esm2015/plugins/core/plugin.js +1 -1
- package/esm2015/plugins/core/reply-plugin.js +4 -1
- package/esm2015/plugins/core/request-plugin.js +4 -1
- package/esm2015/plugins/custom-info/custom-info.reply.js +0 -1
- package/esm2015/plugins/index.js +0 -4
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +3 -7
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +1 -0
- package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +5 -4
- package/esm2015/plugins/mock-intercept/mock-intercept.request.js +3 -3
- package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +1 -3
- package/esm2015/plugins/perf-metric/perf-metric.fetch.js +2 -5
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +19 -21
- package/esm2015/plugins/retry/retry.fetch.js +2 -3
- package/esm2015/plugins/session-id/session-id.request.js +10 -11
- package/esm2015/plugins/session-id/session-id.spec.js +12 -8
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +10 -10
- package/esm2015/plugins/timeout/timeout.fetch.js +70 -12
- package/esm2015/plugins/timeout/timeout.spec.js +102 -3
- package/esm2015/plugins/url-rewrite/url-rewrite.request.js +2 -2
- package/esm2015/plugins/wait-for/wait-for.fetch.js +4 -3
- package/esm2015/public_api.js +1 -0
- package/esm2015/utils/crypto.js +0 -4
- package/esm2015/utils/encoder.js +0 -5
- package/esm2015/utils/ie11.js +0 -1
- package/esm2015/utils/index.js +5 -0
- package/esm2015/utils/json-token.js +2 -7
- package/esm2015/utils/json-token.spec.js +4 -2
- package/esm2015/utils/mime-types.js +7 -0
- package/package.json +51 -36
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +38 -20
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +2 -2
- package/src/clients/api-angular-client.d.ts.map +1 -1
- package/src/clients/api-angular-client.js +3 -2
- package/src/clients/api-angular-client.js.map +1 -1
- package/src/clients/api-beacon-client.d.ts +0 -1
- package/src/clients/api-beacon-client.d.ts.map +1 -1
- package/src/clients/api-beacon-client.js +1 -3
- package/src/clients/api-beacon-client.js.map +1 -1
- package/src/clients/api-fetch-client.d.ts +0 -1
- package/src/clients/api-fetch-client.d.ts.map +1 -1
- package/src/clients/api-fetch-client.js +5 -5
- package/src/clients/api-fetch-client.js.map +1 -1
- package/src/fwk/Reviver.d.ts +0 -3
- package/src/fwk/Reviver.d.ts.map +1 -1
- package/src/fwk/Reviver.js +0 -3
- package/src/fwk/Reviver.js.map +1 -1
- package/src/fwk/api.helpers.d.ts +2 -1
- package/src/fwk/api.helpers.d.ts.map +1 -1
- package/src/fwk/api.helpers.js +2 -1
- package/src/fwk/api.helpers.js.map +1 -1
- package/src/fwk/core/api-client.d.ts +0 -4
- package/src/fwk/core/api-client.d.ts.map +1 -1
- package/src/fwk/core/api-client.js +0 -1
- package/src/fwk/core/api-client.js.map +1 -1
- package/src/fwk/core/base-api-constructor.d.ts +3 -2
- package/src/fwk/core/base-api-constructor.d.ts.map +1 -1
- package/src/fwk/core/base-api-constructor.js +0 -1
- package/src/fwk/core/base-api-constructor.js.map +1 -1
- package/src/fwk/date.d.ts +0 -15
- package/src/fwk/date.d.ts.map +1 -1
- package/src/fwk/date.js +0 -36
- package/src/fwk/date.js.map +1 -1
- package/src/fwk/index.d.ts +1 -0
- package/src/fwk/index.d.ts.map +1 -1
- package/src/fwk/index.js +1 -0
- package/src/fwk/index.js.map +1 -1
- package/src/fwk/logger.d.ts +39 -0
- package/src/fwk/logger.d.ts.map +1 -0
- package/src/fwk/logger.js +2 -0
- package/src/fwk/logger.js.map +1 -0
- package/src/fwk/mocks/alf-mock-adapter.d.ts +0 -1
- package/src/fwk/mocks/alf-mock-adapter.d.ts.map +1 -1
- package/src/fwk/mocks/alf-mock-adapter.js +0 -7
- package/src/fwk/mocks/alf-mock-adapter.js.map +1 -1
- package/src/fwk/mocks/base-mock-adapter.d.ts +0 -4
- package/src/fwk/mocks/base-mock-adapter.d.ts.map +1 -1
- package/src/fwk/mocks/base-mock-adapter.js +0 -10
- package/src/fwk/mocks/base-mock-adapter.js.map +1 -1
- package/src/fwk/mocks/helpers.d.ts +0 -2
- package/src/fwk/mocks/helpers.d.ts.map +1 -1
- package/src/fwk/mocks/helpers.js +0 -2
- package/src/fwk/mocks/helpers.js.map +1 -1
- package/src/fwk/mocks/mock-adapter.d.ts +0 -10
- package/src/fwk/mocks/mock-adapter.d.ts.map +1 -1
- package/src/fwk/mocks/random-mock-adapter.d.ts +1 -1
- package/src/fwk/mocks/random-mock-adapter.d.ts.map +1 -1
- package/src/fwk/mocks/random-mock-adapter.js.map +1 -1
- package/src/plugins/additional-params/additional-params-sync.request.d.ts +1 -2
- package/src/plugins/additional-params/additional-params-sync.request.d.ts.map +1 -1
- package/src/plugins/additional-params/additional-params-sync.request.js +0 -1
- package/src/plugins/additional-params/additional-params-sync.request.js.map +1 -1
- package/src/plugins/additional-params/additional-params.request.d.ts +1 -3
- package/src/plugins/additional-params/additional-params.request.d.ts.map +1 -1
- package/src/plugins/additional-params/additional-params.request.js +0 -2
- package/src/plugins/additional-params/additional-params.request.js.map +1 -1
- package/src/plugins/api-configuration-override/api-configuration-override.request.d.ts +2 -4
- package/src/plugins/api-configuration-override/api-configuration-override.request.d.ts.map +1 -1
- package/src/plugins/api-configuration-override/api-configuration-override.request.js +0 -2
- package/src/plugins/api-configuration-override/api-configuration-override.request.js.map +1 -1
- package/src/plugins/api-key/api-key.request.d.ts +2 -3
- package/src/plugins/api-key/api-key.request.d.ts.map +1 -1
- package/src/plugins/api-key/api-key.request.js +0 -1
- package/src/plugins/api-key/api-key.request.js.map +1 -1
- package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts +16 -31
- package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts.map +1 -1
- package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +20 -61
- package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js.map +1 -1
- package/src/plugins/client-facts/client-facts.request.d.ts +15 -8
- package/src/plugins/client-facts/client-facts.request.d.ts.map +1 -1
- package/src/plugins/client-facts/client-facts.request.js +12 -5
- package/src/plugins/client-facts/client-facts.request.js.map +1 -1
- package/src/plugins/concurrent/concurrent.fetch.d.ts +1 -2
- package/src/plugins/concurrent/concurrent.fetch.d.ts.map +1 -1
- package/src/plugins/concurrent/concurrent.fetch.js +0 -1
- package/src/plugins/concurrent/concurrent.fetch.js.map +1 -1
- package/src/plugins/core/fetch-plugin.d.ts +7 -4
- package/src/plugins/core/fetch-plugin.d.ts.map +1 -1
- package/src/plugins/core/plugin.d.ts +15 -2
- package/src/plugins/core/plugin.d.ts.map +1 -1
- package/src/plugins/core/reply-plugin.d.ts +8 -5
- package/src/plugins/core/reply-plugin.d.ts.map +1 -1
- package/src/plugins/core/request-plugin.d.ts +11 -3
- package/src/plugins/core/request-plugin.d.ts.map +1 -1
- package/src/plugins/custom-info/custom-info.reply.d.ts +1 -3
- package/src/plugins/custom-info/custom-info.reply.d.ts.map +1 -1
- package/src/plugins/custom-info/custom-info.reply.js +0 -2
- package/src/plugins/custom-info/custom-info.reply.js.map +1 -1
- package/src/plugins/exception/exception.reply.d.ts +1 -1
- package/src/plugins/exception/exception.reply.d.ts.map +1 -1
- package/src/plugins/exception/exception.reply.js.map +1 -1
- package/src/plugins/fetch-cache/fetch-cache.request.d.ts +3 -3
- package/src/plugins/fetch-cache/fetch-cache.request.d.ts.map +1 -1
- package/src/plugins/fetch-credentials/fetch-credentials.request.d.ts +1 -1
- package/src/plugins/fetch-credentials/fetch-credentials.request.d.ts.map +1 -1
- package/src/plugins/index.d.ts +0 -4
- package/src/plugins/index.d.ts.map +1 -1
- package/src/plugins/index.js +0 -4
- package/src/plugins/index.js.map +1 -1
- package/src/plugins/json-token/json-token.reply.d.ts +0 -1
- package/src/plugins/json-token/json-token.reply.d.ts.map +1 -1
- package/src/plugins/json-token/json-token.reply.js +0 -1
- package/src/plugins/json-token/json-token.reply.js.map +1 -1
- package/src/plugins/json-token/json-token.request.d.ts +2 -3
- package/src/plugins/json-token/json-token.request.d.ts.map +1 -1
- package/src/plugins/json-token/json-token.request.js +0 -1
- package/src/plugins/json-token/json-token.request.js.map +1 -1
- package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.d.ts +2 -8
- package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.d.ts.map +1 -1
- package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +0 -6
- package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js.map +1 -1
- package/src/plugins/mock-intercept/mock-intercept.fetch.d.ts.map +1 -1
- package/src/plugins/mock-intercept/mock-intercept.fetch.js +3 -2
- package/src/plugins/mock-intercept/mock-intercept.fetch.js.map +1 -1
- package/src/plugins/mock-intercept/mock-intercept.request.d.ts +1 -1
- package/src/plugins/mock-intercept/mock-intercept.request.d.ts.map +1 -1
- package/src/plugins/mock-intercept/mock-intercept.request.js +1 -1
- package/src/plugins/mock-intercept/mock-intercept.request.js.map +1 -1
- package/src/plugins/perf-metric/perf-metric.fetch.d.ts +0 -3
- package/src/plugins/perf-metric/perf-metric.fetch.d.ts.map +1 -1
- package/src/plugins/perf-metric/perf-metric.fetch.js +0 -3
- package/src/plugins/perf-metric/perf-metric.fetch.js.map +1 -1
- package/src/plugins/pii-tokenizer/pii-tokenizer.request.d.ts +19 -21
- package/src/plugins/pii-tokenizer/pii-tokenizer.request.d.ts.map +1 -1
- package/src/plugins/pii-tokenizer/pii-tokenizer.request.js +18 -20
- package/src/plugins/pii-tokenizer/pii-tokenizer.request.js.map +1 -1
- package/src/plugins/retry/retry.fetch.d.ts +8 -7
- package/src/plugins/retry/retry.fetch.d.ts.map +1 -1
- package/src/plugins/retry/retry.fetch.js +0 -2
- package/src/plugins/retry/retry.fetch.js.map +1 -1
- package/src/plugins/session-id/session-id.request.d.ts +7 -6
- package/src/plugins/session-id/session-id.request.d.ts.map +1 -1
- package/src/plugins/session-id/session-id.request.js +11 -12
- package/src/plugins/session-id/session-id.request.js.map +1 -1
- package/src/plugins/si-token/si-token.request.d.ts +0 -1
- package/src/plugins/si-token/si-token.request.d.ts.map +1 -1
- package/src/plugins/si-token/si-token.request.js +0 -1
- package/src/plugins/si-token/si-token.request.js.map +1 -1
- package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.d.ts +10 -11
- package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.d.ts.map +1 -1
- package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +8 -9
- package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js.map +1 -1
- package/src/plugins/timeout/timeout.fetch.d.ts +31 -2
- package/src/plugins/timeout/timeout.fetch.d.ts.map +1 -1
- package/src/plugins/timeout/timeout.fetch.js +62 -10
- package/src/plugins/timeout/timeout.fetch.js.map +1 -1
- package/src/plugins/url-rewrite/url-rewrite.request.d.ts +1 -2
- package/src/plugins/url-rewrite/url-rewrite.request.d.ts.map +1 -1
- package/src/plugins/url-rewrite/url-rewrite.request.js +0 -1
- package/src/plugins/url-rewrite/url-rewrite.request.js.map +1 -1
- package/src/plugins/wait-for/wait-for.fetch.d.ts +2 -3
- package/src/plugins/wait-for/wait-for.fetch.d.ts.map +1 -1
- package/src/plugins/wait-for/wait-for.fetch.js +2 -2
- package/src/plugins/wait-for/wait-for.fetch.js.map +1 -1
- package/src/public_api.d.ts +1 -0
- package/src/public_api.d.ts.map +1 -1
- package/src/public_api.js +1 -0
- package/src/public_api.js.map +1 -1
- package/src/utils/crypto.d.ts +0 -4
- package/src/utils/crypto.d.ts.map +1 -1
- package/src/utils/crypto.js +0 -4
- package/src/utils/crypto.js.map +1 -1
- package/src/utils/encoder.d.ts +0 -1
- package/src/utils/encoder.d.ts.map +1 -1
- package/src/utils/encoder.js +0 -5
- package/src/utils/encoder.js.map +1 -1
- package/src/utils/ie11.d.ts +0 -1
- package/src/utils/ie11.d.ts.map +1 -1
- package/src/utils/ie11.js +0 -1
- package/src/utils/ie11.js.map +1 -1
- package/src/utils/index.d.ts +6 -0
- package/src/utils/index.d.ts.map +1 -0
- package/src/utils/index.js +6 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/json-token.d.ts +0 -3
- package/src/utils/json-token.d.ts.map +1 -1
- package/src/utils/json-token.js +0 -5
- package/src/utils/json-token.js.map +1 -1
- package/src/utils/mime-types.d.ts +7 -0
- package/src/utils/mime-types.d.ts.map +1 -0
- package/src/utils/mime-types.js +9 -0
- package/src/utils/mime-types.js.map +1 -0
- package/cjs/plugins/fetch-options/fetch-options.request.js +0 -87
- package/cjs/plugins/fetch-options/fetch-options.spec.js +0 -280
- package/cjs/plugins/fetch-options/index.js +0 -18
- package/cjs/plugins/gateway-token/gateway-authentication.js +0 -275
- package/cjs/plugins/gateway-token/gateway-token.request.js +0 -388
- package/cjs/plugins/gateway-token/gateway-token.spec.js +0 -360
- package/cjs/plugins/imperva/imperva.fetch.js +0 -307
- package/cjs/plugins/imperva/imperva.spec.js +0 -347
- package/cjs/plugins/imperva/index.js +0 -18
- package/cjs/plugins/public-facts/index.js +0 -18
- package/cjs/plugins/public-facts/public-facts.request.js +0 -101
- package/cjs/plugins/public-facts/public-facts.spec.js +0 -367
- package/esm2015/plugins/fetch-options/fetch-options.request.js +0 -81
- package/esm2015/plugins/fetch-options/fetch-options.spec.js +0 -276
- package/esm2015/plugins/fetch-options/index.js +0 -1
- package/esm2015/plugins/gateway-token/gateway-authentication.js +0 -262
- package/esm2015/plugins/gateway-token/gateway-token.request.js +0 -406
- package/esm2015/plugins/gateway-token/gateway-token.spec.js +0 -356
- package/esm2015/plugins/gateway-token/index.js +0 -2
- package/esm2015/plugins/imperva/imperva.fetch.js +0 -303
- package/esm2015/plugins/imperva/imperva.spec.js +0 -343
- package/esm2015/plugins/imperva/index.js +0 -1
- package/esm2015/plugins/public-facts/index.js +0 -1
- package/esm2015/plugins/public-facts/public-facts.request.js +0 -138
- package/esm2015/plugins/public-facts/public-facts.spec.js +0 -363
- package/src/plugins/fetch-options/fetch-options.request.d.ts +0 -26
- package/src/plugins/fetch-options/fetch-options.request.d.ts.map +0 -1
- package/src/plugins/fetch-options/fetch-options.request.js +0 -22
- package/src/plugins/fetch-options/fetch-options.request.js.map +0 -1
- package/src/plugins/fetch-options/index.d.ts +0 -2
- package/src/plugins/fetch-options/index.d.ts.map +0 -1
- package/src/plugins/fetch-options/index.js +0 -2
- package/src/plugins/fetch-options/index.js.map +0 -1
- package/src/plugins/gateway-token/gateway-authentication.d.ts +0 -105
- package/src/plugins/gateway-token/gateway-authentication.d.ts.map +0 -1
- package/src/plugins/gateway-token/gateway-authentication.js +0 -74
- package/src/plugins/gateway-token/gateway-authentication.js.map +0 -1
- package/src/plugins/gateway-token/gateway-token.request.d.ts +0 -97
- package/src/plugins/gateway-token/gateway-token.request.d.ts.map +0 -1
- package/src/plugins/gateway-token/gateway-token.request.js +0 -127
- package/src/plugins/gateway-token/gateway-token.request.js.map +0 -1
- package/src/plugins/gateway-token/index.d.ts +0 -3
- package/src/plugins/gateway-token/index.d.ts.map +0 -1
- package/src/plugins/gateway-token/index.js +0 -3
- package/src/plugins/gateway-token/index.js.map +0 -1
- package/src/plugins/imperva/imperva.fetch.d.ts +0 -33
- package/src/plugins/imperva/imperva.fetch.d.ts.map +0 -1
- package/src/plugins/imperva/imperva.fetch.js +0 -41
- package/src/plugins/imperva/imperva.fetch.js.map +0 -1
- package/src/plugins/imperva/index.d.ts +0 -2
- package/src/plugins/imperva/index.d.ts.map +0 -1
- package/src/plugins/imperva/index.js +0 -2
- package/src/plugins/imperva/index.js.map +0 -1
- package/src/plugins/public-facts/index.d.ts +0 -2
- package/src/plugins/public-facts/index.d.ts.map +0 -1
- package/src/plugins/public-facts/index.js +0 -2
- package/src/plugins/public-facts/index.js.map +0 -1
- package/src/plugins/public-facts/public-facts.request.d.ts +0 -89
- package/src/plugins/public-facts/public-facts.request.d.ts.map +0 -1
- package/src/plugins/public-facts/public-facts.request.js +0 -62
- package/src/plugins/public-facts/public-facts.request.js.map +0 -1
package/esm2015/fwk/errors.js
CHANGED
|
@@ -138,10 +138,9 @@ function _create_super(Derived) {
|
|
|
138
138
|
var _super = _create_super(GenericError);
|
|
139
139
|
function GenericError(message, context) {
|
|
140
140
|
_class_call_check(this, GenericError);
|
|
141
|
-
var _context, _context1;
|
|
142
141
|
var httpRegexp = /^https?:\/\//;
|
|
143
|
-
var baseUrl = (
|
|
144
|
-
var origin = (
|
|
142
|
+
var baseUrl = (context === null || context === void 0 ? void 0 : context.url) ? context.url.replace(httpRegexp, "") : "unknown";
|
|
143
|
+
var origin = (context === null || context === void 0 ? void 0 : context.origin) ? context.origin.replace(httpRegexp, "") : "unknown";
|
|
145
144
|
return _super.call(this, context ? "[SDK] [apiName: ".concat(context.apiName || "unknown", "] [operationId: ").concat(context.operationId || "unknown", "] [baseUrl: ").concat(baseUrl, "] [origin: ").concat(origin, "] [errorType: SDK] ").concat(message) : "[SDK] ".concat(message));
|
|
146
145
|
}
|
|
147
146
|
return GenericError;
|
package/esm2015/fwk/index.js
CHANGED
|
@@ -193,7 +193,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
193
193
|
*/ var requestResponseJsonRegexp = RegExp(/(^{.*}$)/m);
|
|
194
194
|
/**
|
|
195
195
|
* Split the logs
|
|
196
|
-
*
|
|
197
196
|
* @param log alf log
|
|
198
197
|
* @returns an array containing one message each
|
|
199
198
|
*/ function splitCalls(log) {
|
|
@@ -201,7 +200,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
201
200
|
}
|
|
202
201
|
/**
|
|
203
202
|
* Get AlfCall corresponding to this log if it is a request received by the SI
|
|
204
|
-
*
|
|
205
203
|
* @param log alf log
|
|
206
204
|
* @param corrId correlationId
|
|
207
205
|
* @param operationAdapter operation adapter to bind each request with its operationId
|
|
@@ -227,7 +225,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
227
225
|
}
|
|
228
226
|
/**
|
|
229
227
|
* Returns true if log is detected as a HTTP response
|
|
230
|
-
*
|
|
231
228
|
* @param log alf log
|
|
232
229
|
* @returns true if found
|
|
233
230
|
*/ function isResponse(log) {
|
|
@@ -236,7 +233,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
236
233
|
}
|
|
237
234
|
/**
|
|
238
235
|
* Return JSON data found
|
|
239
|
-
*
|
|
240
236
|
* @param log alf log
|
|
241
237
|
* @returns JSON data that can be either the request or the response
|
|
242
238
|
*/ function getData(log) {
|
|
@@ -247,7 +243,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
247
243
|
* Retrieve path from logPath and parse it to find all the calls.
|
|
248
244
|
* If the logs file contains more than one entry point this methods will separate them in Steps.
|
|
249
245
|
* First call will represent the request and last call the response.
|
|
250
|
-
*
|
|
251
246
|
* @param log Content of the alf logs
|
|
252
247
|
* @param operationAdapter operation adapter to bind each request/response with its operationId
|
|
253
248
|
* @returns an array of AlfCall found in the logs
|
|
@@ -260,10 +255,9 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
260
255
|
try {
|
|
261
256
|
var _loop = function() {
|
|
262
257
|
var callMatch = _step.value;
|
|
263
|
-
var _match;
|
|
264
258
|
// we look for corrID to be able to match request and response
|
|
265
259
|
var match = callMatch.match(correlationIdRegex);
|
|
266
|
-
var corrId =
|
|
260
|
+
var corrId = match === null || match === void 0 ? void 0 : match[1];
|
|
267
261
|
if (!corrId) {
|
|
268
262
|
// without correlationId it will be impossible to match the response with the request
|
|
269
263
|
return "continue";
|
|
@@ -309,7 +303,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
309
303
|
}
|
|
310
304
|
/**
|
|
311
305
|
* Build the actual mock map corresponding to these alfCalls
|
|
312
|
-
*
|
|
313
306
|
* @param log Content of the alf logs
|
|
314
307
|
* @param operationAdapter operation adapter to bind each request/response with its operationId
|
|
315
308
|
* @returns mock map, key is the operation id, value is an array of the API replies
|
|
@@ -332,7 +325,6 @@ import { SequentialMockAdapter } from "./sequential-mock-adapter";
|
|
|
332
325
|
}
|
|
333
326
|
/**
|
|
334
327
|
* Get the mock adapter corresponding to the logs retrieved from ALF
|
|
335
|
-
*
|
|
336
328
|
* @param binFilePath the path to the file containing the logs downloaded from Alf in .bin format
|
|
337
329
|
* @param operationAdapter an array of PathObject or a function that returns an array of PathObject or a Promise that resolves to an array of PathObject, to map request with their operationId
|
|
338
330
|
* @returns a sequential mock adapter containing each response found in Alf
|
|
@@ -186,18 +186,6 @@ import { getOperationId, getPath } from "./helpers";
|
|
|
186
186
|
return id;
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
|
-
{
|
|
190
|
-
key: "getOperationId",
|
|
191
|
-
value: /**
|
|
192
|
-
* @inheritDoc
|
|
193
|
-
*/ function getOperationId(request) {
|
|
194
|
-
if (typeof this.pathObjects === "function") {
|
|
195
|
-
throw new Error("The pathObjects argument must be of type PathObject[]");
|
|
196
|
-
}
|
|
197
|
-
var object = getPath(request.basePath, this.pathObjects, request.method);
|
|
198
|
-
return this.extractOperationIdFromPath(request, object);
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
189
|
{
|
|
202
190
|
key: "retrieveOperationId",
|
|
203
191
|
value: /**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gets an operation ID from a path object and HTTP method
|
|
3
|
-
*
|
|
4
3
|
* @param pathObject the path object to check on
|
|
5
4
|
* @param method the HTTP method
|
|
6
5
|
*/ export function getOperationId(pathObject, method) {
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
16
|
* Gets a PathObject from a requested URL
|
|
18
|
-
*
|
|
19
17
|
* @param requestUrl the URL string
|
|
20
18
|
* @param pathObjects the list of available path objects
|
|
21
19
|
* @param method the optional HTTP method used in case of several matches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { };
|
|
1
|
+
/** Describes an adapter for mocking */ export { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { };
|
|
1
|
+
/** Describes a path on the swagger specification */ export { };
|
|
@@ -88,13 +88,13 @@ function _ts_generator(thisArg, body) {
|
|
|
88
88
|
trys: [],
|
|
89
89
|
ops: []
|
|
90
90
|
};
|
|
91
|
-
return
|
|
91
|
+
return g = {
|
|
92
92
|
next: verb(0),
|
|
93
93
|
"throw": verb(1),
|
|
94
94
|
"return": verb(2)
|
|
95
95
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
96
96
|
return this;
|
|
97
|
-
}), g
|
|
97
|
+
}), g;
|
|
98
98
|
function verb(n) {
|
|
99
99
|
return function(v) {
|
|
100
100
|
return step([
|
|
@@ -176,7 +176,6 @@ function _ts_generator(thisArg, body) {
|
|
|
176
176
|
/**
|
|
177
177
|
* Check if the value is a string or undefined.
|
|
178
178
|
* Used to determine the request body type at runtime.
|
|
179
|
-
*
|
|
180
179
|
* @param value
|
|
181
180
|
*/ export function isStringOrUndefined(value) {
|
|
182
181
|
var type = typeof value === "undefined" ? "undefined" : _type_of(value);
|
|
@@ -69,13 +69,13 @@ function _ts_generator(thisArg, body) {
|
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return g = {
|
|
73
73
|
next: verb(0),
|
|
74
74
|
"throw": verb(1),
|
|
75
75
|
"return": verb(2)
|
|
76
76
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
77
77
|
return this;
|
|
78
|
-
}), g
|
|
78
|
+
}), g;
|
|
79
79
|
function verb(n) {
|
|
80
80
|
return function(v) {
|
|
81
81
|
return step([
|
|
@@ -157,7 +157,6 @@ function _ts_generator(thisArg, body) {
|
|
|
157
157
|
/**
|
|
158
158
|
* The purpose of this plugin is to allow to send an encrypted JWT which overrides the configuration used by Digital Commerce.
|
|
159
159
|
* The plugin takes an already encoded JWT (JWS) and add it in an instance of `ama-client-facts` header.
|
|
160
|
-
*
|
|
161
160
|
* @note this is the default value for the header name. It can be customized at plugin initialization time.
|
|
162
161
|
*/ export var ApiConfigurationOverride = /*#__PURE__*/ function() {
|
|
163
162
|
"use strict";
|
|
@@ -69,13 +69,13 @@ function _ts_generator(thisArg, body) {
|
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return g = {
|
|
73
73
|
next: verb(0),
|
|
74
74
|
"throw": verb(1),
|
|
75
75
|
"return": verb(2)
|
|
76
76
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
77
77
|
return this;
|
|
78
|
-
}), g
|
|
78
|
+
}), g;
|
|
79
79
|
function verb(n) {
|
|
80
80
|
return function(v) {
|
|
81
81
|
return step([
|
|
@@ -69,13 +69,13 @@ function _ts_generator(thisArg, body) {
|
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return g = {
|
|
73
73
|
next: verb(0),
|
|
74
74
|
"throw": verb(1),
|
|
75
75
|
"return": verb(2)
|
|
76
76
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
77
77
|
return this;
|
|
78
|
-
}), g
|
|
78
|
+
}), g;
|
|
79
79
|
function verb(n) {
|
|
80
80
|
return function(v) {
|
|
81
81
|
return step([
|
|
@@ -154,29 +154,10 @@ function _ts_generator(thisArg, body) {
|
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
/**
|
|
158
|
-
* Implementation of a retriever based on a cookie.
|
|
159
|
-
* Creates a reused RegExp based on the cookieName and tries to extract its value from document.cookie.
|
|
160
|
-
*
|
|
161
|
-
* @param cookieName Name of the cookie to search for
|
|
162
|
-
* @deprecated Imperva integration should rely on the latest impervaProtectionRetrieverFactory
|
|
163
|
-
*/ export function cookieRetrieverFactory(cookieName) {
|
|
164
|
-
var cookieRegExp = new RegExp("(?:^|;)\\s*".concat(cookieName, "\\s*=\\s*([^;]+)"));
|
|
165
|
-
return function() {
|
|
166
|
-
if (typeof document === "undefined") {
|
|
167
|
-
throw new Error('[SDK][Plug-in][BotProtectionFingerprintRequest] Trying to use cookieRetrieverFactory but "document" is not defined.');
|
|
168
|
-
}
|
|
169
|
-
var cookieMatcher = document.cookie && document.cookie.match(cookieRegExp);
|
|
170
|
-
if (cookieMatcher) {
|
|
171
|
-
return cookieMatcher[cookieMatcher.length - 1];
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
157
|
/**
|
|
176
158
|
* Implementation based on Imperva's SPA integration feature developed for Amadeus.
|
|
177
159
|
* This relies on a custom window property protectionLoaded that we feed with a callback that Imperva calls when the ABP script is loaded or when the callback is attached.
|
|
178
160
|
* This callback is called with the Protection object used internally by the ABP that exposes a __token()__ function that returns a Promise of the most up-to-date token.
|
|
179
|
-
*
|
|
180
161
|
* @param protectionTimeout How long the retrieve will wait for the onProtectionLoaded event to be fired
|
|
181
162
|
* @param tokenTimeout How long the ABP script will wait for a new token before rejecting the promise
|
|
182
163
|
*/ export function impervaProtectionRetrieverFactory(protectionTimeout, tokenTimeout) {
|
|
@@ -196,73 +177,77 @@ function _ts_generator(thisArg, body) {
|
|
|
196
177
|
};
|
|
197
178
|
});
|
|
198
179
|
};
|
|
199
|
-
return
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
180
|
+
return function() {
|
|
181
|
+
var _ref = _async_to_generator(function(logger) {
|
|
182
|
+
var e, e1;
|
|
183
|
+
return _ts_generator(this, function(_state) {
|
|
184
|
+
switch(_state.label){
|
|
185
|
+
case 0:
|
|
186
|
+
if (!!protection) return [
|
|
187
|
+
3,
|
|
188
|
+
4
|
|
189
|
+
];
|
|
190
|
+
_state.label = 1;
|
|
191
|
+
case 1:
|
|
192
|
+
_state.trys.push([
|
|
193
|
+
1,
|
|
194
|
+
3,
|
|
195
|
+
,
|
|
196
|
+
4
|
|
197
|
+
]);
|
|
198
|
+
return [
|
|
199
|
+
4,
|
|
200
|
+
getProtection()
|
|
201
|
+
];
|
|
202
|
+
case 2:
|
|
203
|
+
protection = _state.sent();
|
|
204
|
+
return [
|
|
205
|
+
3,
|
|
206
|
+
4
|
|
207
|
+
];
|
|
208
|
+
case 3:
|
|
209
|
+
e = _state.sent();
|
|
210
|
+
(logger || console).error(e);
|
|
211
|
+
return [
|
|
212
|
+
2
|
|
213
|
+
];
|
|
214
|
+
case 4:
|
|
215
|
+
_state.trys.push([
|
|
216
|
+
4,
|
|
217
|
+
6,
|
|
218
|
+
,
|
|
219
|
+
7
|
|
220
|
+
]);
|
|
221
|
+
return [
|
|
222
|
+
4,
|
|
223
|
+
protection.token(tokenTimeout)
|
|
224
|
+
];
|
|
225
|
+
case 5:
|
|
226
|
+
return [
|
|
227
|
+
2,
|
|
228
|
+
_state.sent()
|
|
229
|
+
];
|
|
230
|
+
case 6:
|
|
231
|
+
e1 = _state.sent();
|
|
232
|
+
(logger || console).error("[SDK][Plug-in][BotProtectionFingerprintRequest] Timeout: no Token was received in time.");
|
|
233
|
+
return [
|
|
234
|
+
2
|
|
235
|
+
];
|
|
236
|
+
case 7:
|
|
237
|
+
return [
|
|
238
|
+
2
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
});
|
|
259
242
|
});
|
|
260
|
-
|
|
243
|
+
return function(logger) {
|
|
244
|
+
return _ref.apply(this, arguments);
|
|
245
|
+
};
|
|
246
|
+
}();
|
|
261
247
|
}
|
|
262
248
|
/**
|
|
263
249
|
* Implementation of a retriever for Akamai based on bmak object from window or as parameter.
|
|
264
250
|
* Will return the telemetry, or undefined if bmak object is not found
|
|
265
|
-
*
|
|
266
251
|
* @param bmakOpt BMak object from Akamai. Default to `window.bmak` on browser if not provided.
|
|
267
252
|
*/ export function akamaiTelemetryRetrieverFactory(bmakOpt) {
|
|
268
253
|
var bmak = bmakOpt || (typeof window !== "undefined" ? window.bmak : undefined);
|
|
@@ -273,37 +258,15 @@ function _ts_generator(thisArg, body) {
|
|
|
273
258
|
return bmak.get_telemetry();
|
|
274
259
|
};
|
|
275
260
|
}
|
|
276
|
-
/**
|
|
277
|
-
* Implementation of a retriever based on the way Imperva stores the fingerprint information in localStorage.
|
|
278
|
-
* Since it contains the expiry time of the fingerprint we are able to ignore it if it has to be recomputed.
|
|
279
|
-
*
|
|
280
|
-
* @param storageKey The name of the property in local storage where the fingerprint is saved
|
|
281
|
-
* @param ignoreExpired Return the fingerprint even if it is expired. Default: false
|
|
282
|
-
* @deprecated Imperva integration should rely on the latest impervaProtectionRetrieverFactory
|
|
283
|
-
*/ export function impervaLocalStorageRetrieverFactory(storageKey) {
|
|
284
|
-
var ignoreExpired = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
285
|
-
return function() {
|
|
286
|
-
if (typeof localStorage === "undefined") {
|
|
287
|
-
throw new Error("[SDK][Plug-in][BotProtectionFingerprintRequest] Trying to use localStorageRetrieverFactory but localStorage is not defined.");
|
|
288
|
-
}
|
|
289
|
-
var storedFingerprint = localStorage.getItem(storageKey);
|
|
290
|
-
try {
|
|
291
|
-
var parsedFingerprint = storedFingerprint && JSON.parse(storedFingerprint);
|
|
292
|
-
if (parsedFingerprint && (ignoreExpired || parsedFingerprint.renewTime && parsedFingerprint.renewTime >= Date.now())) {
|
|
293
|
-
return parsedFingerprint.token;
|
|
294
|
-
}
|
|
295
|
-
} catch (e) {}
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
261
|
/**
|
|
299
262
|
* Plug-in that allows to interact with Anti-Bot protection tools fingerprint like following:
|
|
300
|
-
*
|
|
301
|
-
*
|
|
263
|
+
* - Wait for the fingerprint to be present in the document before sending any call
|
|
264
|
+
* - Forward the fingerprint in a chosen request header with all the calls
|
|
302
265
|
*
|
|
303
266
|
* This plugin is modular and must be instantiated with the logic that retrieves the fingerprint value, also called {@link BotProtectionFingerprintRetriever}.
|
|
304
267
|
* This file exports two factories of {@link BotProtectionFingerprintRetriever} to cover our two most common usecases:
|
|
305
|
-
*
|
|
306
|
-
*
|
|
268
|
+
* - Imperva ABP
|
|
269
|
+
* - Akamai telemetry
|
|
307
270
|
* But you can also provide your own logic.
|
|
308
271
|
*
|
|
309
272
|
* In case this logic is unpredictable or subject to race conditions, you can configure a poller that will retry a maximum of N times every X milliseconds.
|
|
@@ -315,9 +278,8 @@ function _ts_generator(thisArg, body) {
|
|
|
315
278
|
* authentication calls also contain the fingerprint.
|
|
316
279
|
* You can reuse the same instance that you give to the SDK, or create a simpler instance without a poller in case you
|
|
317
280
|
* make sure to load this plug-in before the AmadeusGatewayTokenRequestPlugin.
|
|
318
|
-
*
|
|
319
281
|
* @example Reusing the same instance
|
|
320
|
-
*
|
|
282
|
+
* ```typescript
|
|
321
283
|
* export function apiFactory(eventTrackService: EventTrackService): ApiManager {
|
|
322
284
|
* const botProtection = new BotProtectionFingerprintRequest({
|
|
323
285
|
* destinationHeaderName: 'X-D-Token',
|
|
@@ -343,18 +305,22 @@ function _ts_generator(thisArg, body) {
|
|
|
343
305
|
* LoggingApi: {basePath: '/api'}
|
|
344
306
|
* });
|
|
345
307
|
* }
|
|
308
|
+
* ```
|
|
346
309
|
* @example Using a custom FingerprintRetriever
|
|
347
|
-
*
|
|
310
|
+
* ```typescript
|
|
348
311
|
* const botProtection = new BotProtectionFingerprintRequest({
|
|
349
312
|
* destinationHeaderName: 'X-D-Token',
|
|
350
313
|
* fingerprintRetriever: () => 'test'
|
|
351
314
|
* });
|
|
352
|
-
*
|
|
315
|
+
* ```
|
|
353
316
|
*
|
|
317
|
+
* @example For akamai
|
|
318
|
+
* ```typescript
|
|
354
319
|
* const botProtection = new BotProtectionFingerprintRequest({
|
|
355
320
|
* destinationHeaderName: 'Akamai-BM-Telemetry',
|
|
356
321
|
* fingerprintRetriever: akamaiTelemetryRetrieverFactory()
|
|
357
322
|
* });
|
|
323
|
+
* ```
|
|
358
324
|
*/ export var BotProtectionFingerprintRequest = /*#__PURE__*/ function() {
|
|
359
325
|
"use strict";
|
|
360
326
|
function BotProtectionFingerprintRequest(options) {
|
|
@@ -375,7 +341,7 @@ function _ts_generator(thisArg, body) {
|
|
|
375
341
|
* configured in the BotProtectionFingerprintPollerOptions.
|
|
376
342
|
*
|
|
377
343
|
* If pollOnlyOnce is set to true, the poller won't be executed again after it has been fully executed once.
|
|
378
|
-
*/ function waitForFingerprint() {
|
|
344
|
+
*/ function waitForFingerprint(logger) {
|
|
379
345
|
var _this = this;
|
|
380
346
|
return _async_to_generator(function() {
|
|
381
347
|
var pollerOptions, i, fingerprint;
|
|
@@ -386,7 +352,7 @@ function _ts_generator(thisArg, body) {
|
|
|
386
352
|
if (pollerOptions === undefined || _this.options.pollOnlyOnce !== false && _this.hasPolled) {
|
|
387
353
|
return [
|
|
388
354
|
2,
|
|
389
|
-
_this.options.fingerprintRetriever()
|
|
355
|
+
_this.options.fingerprintRetriever(logger)
|
|
390
356
|
];
|
|
391
357
|
}
|
|
392
358
|
i = pollerOptions.maximumTries - 1;
|
|
@@ -398,7 +364,7 @@ function _ts_generator(thisArg, body) {
|
|
|
398
364
|
];
|
|
399
365
|
return [
|
|
400
366
|
4,
|
|
401
|
-
_this.options.fingerprintRetriever()
|
|
367
|
+
_this.options.fingerprintRetriever(logger)
|
|
402
368
|
];
|
|
403
369
|
case 2:
|
|
404
370
|
fingerprint = _state.sent();
|
|
@@ -440,7 +406,7 @@ function _ts_generator(thisArg, body) {
|
|
|
440
406
|
},
|
|
441
407
|
{
|
|
442
408
|
key: "load",
|
|
443
|
-
value: function load() {
|
|
409
|
+
value: /** @inheritdoc */ function load(context) {
|
|
444
410
|
var _this = this;
|
|
445
411
|
return {
|
|
446
412
|
transform: function() {
|
|
@@ -451,7 +417,7 @@ function _ts_generator(thisArg, body) {
|
|
|
451
417
|
case 0:
|
|
452
418
|
return [
|
|
453
419
|
4,
|
|
454
|
-
_this.waitForFingerprint()
|
|
420
|
+
_this.waitForFingerprint(context === null || context === void 0 ? void 0 : context.logger)
|
|
455
421
|
];
|
|
456
422
|
case 1:
|
|
457
423
|
fingerprint = _state.sent();
|