@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
|
@@ -79,13 +79,13 @@ function _ts_generator(thisArg, body) {
|
|
|
79
79
|
trys: [],
|
|
80
80
|
ops: []
|
|
81
81
|
};
|
|
82
|
-
return
|
|
82
|
+
return g = {
|
|
83
83
|
next: verb(0),
|
|
84
84
|
"throw": verb(1),
|
|
85
85
|
"return": verb(2)
|
|
86
86
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
87
87
|
return this;
|
|
88
|
-
}), g
|
|
88
|
+
}), g;
|
|
89
89
|
function verb(n) {
|
|
90
90
|
return function(v) {
|
|
91
91
|
return step([
|
|
@@ -118,13 +118,13 @@ function _ts_generator(thisArg, body) {
|
|
|
118
118
|
trys: [],
|
|
119
119
|
ops: []
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return g = {
|
|
122
122
|
next: verb(0),
|
|
123
123
|
"throw": verb(1),
|
|
124
124
|
"return": verb(2)
|
|
125
125
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
126
126
|
return this;
|
|
127
|
-
}), g
|
|
127
|
+
}), g;
|
|
128
128
|
function verb(n) {
|
|
129
129
|
return function(v) {
|
|
130
130
|
return step([
|
package/cjs/public_api.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
_export_star(require("./clients/index"), exports);
|
|
6
6
|
_export_star(require("./fwk/index"), exports);
|
|
7
7
|
_export_star(require("./plugins/index"), exports);
|
|
8
|
+
_export_star(require("./utils/index"), exports);
|
|
8
9
|
function _export_star(from, to) {
|
|
9
10
|
Object.keys(from).forEach(function(k) {
|
|
10
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
package/cjs/utils/crypto.js
CHANGED
|
@@ -12,8 +12,8 @@ _export(exports, {
|
|
|
12
12
|
ab2str: function() {
|
|
13
13
|
return ab2str;
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
encryptPayload: function() {
|
|
16
|
+
return encryptPayload;
|
|
17
17
|
},
|
|
18
18
|
generateContentEncryptionKey: function() {
|
|
19
19
|
return generateContentEncryptionKey;
|
|
@@ -21,11 +21,11 @@ _export(exports, {
|
|
|
21
21
|
generateIV: function() {
|
|
22
22
|
return generateIV;
|
|
23
23
|
},
|
|
24
|
+
str2ab: function() {
|
|
25
|
+
return str2ab;
|
|
26
|
+
},
|
|
24
27
|
wrapContentEncryptionKey: function() {
|
|
25
28
|
return wrapContentEncryptionKey;
|
|
26
|
-
},
|
|
27
|
-
encryptPayload: function() {
|
|
28
|
-
return encryptPayload;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
var _ie11 = require("./ie11");
|
package/cjs/utils/encoder.js
CHANGED
|
@@ -93,7 +93,6 @@ var Stream = /*#__PURE__*/ function() {
|
|
|
93
93
|
* When a token is read from a stream, the first token in the
|
|
94
94
|
* stream must be returned and subsequently removed, and
|
|
95
95
|
* end-of-stream must be returned otherwise.
|
|
96
|
-
*
|
|
97
96
|
* @returns Get the next token from the stream, or
|
|
98
97
|
* end_of_stream.
|
|
99
98
|
*/ function read() {
|
|
@@ -109,7 +108,6 @@ var Stream = /*#__PURE__*/ function() {
|
|
|
109
108
|
* When one or more tokens are prepended to a stream, those tokens
|
|
110
109
|
* must be inserted, in given order, before the first token in the
|
|
111
110
|
* stream.
|
|
112
|
-
*
|
|
113
111
|
* @param token The token(s) to prepend to the
|
|
114
112
|
* stream.
|
|
115
113
|
*/ function prepend(token) {
|
|
@@ -128,7 +126,6 @@ var Stream = /*#__PURE__*/ function() {
|
|
|
128
126
|
* When one or more tokens are pushed to a stream, those tokens
|
|
129
127
|
* must be inserted, in given order, after the last token in the
|
|
130
128
|
* stream.
|
|
131
|
-
*
|
|
132
129
|
* @param token The tokens(s) to push to the
|
|
133
130
|
* stream.
|
|
134
131
|
*/ function push(token) {
|
|
@@ -147,7 +144,6 @@ var Stream = /*#__PURE__*/ function() {
|
|
|
147
144
|
_define_property(Stream, "END_OF_STREAM", -1);
|
|
148
145
|
/**
|
|
149
146
|
* Returns the byte equivalent given a string
|
|
150
|
-
*
|
|
151
147
|
* @param string Input string of UTF-16 code units.
|
|
152
148
|
* @param s
|
|
153
149
|
* @returns Code points.
|
|
@@ -215,7 +211,6 @@ var Encoder = /*#__PURE__*/ function() {
|
|
|
215
211
|
key: "isASCIIByte",
|
|
216
212
|
value: /**
|
|
217
213
|
* An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
|
|
218
|
-
*
|
|
219
214
|
* @param a The number to test.
|
|
220
215
|
* @returns True if a is in the range 0x00 to 0x7F, inclusive.
|
|
221
216
|
*/ function isASCIIByte(a) {
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
_export_star(require("./
|
|
6
|
-
_export_star(require("./
|
|
5
|
+
_export_star(require("./crypto"), exports);
|
|
6
|
+
_export_star(require("./encoder"), exports);
|
|
7
|
+
_export_star(require("./ie11"), exports);
|
|
8
|
+
_export_star(require("./json-token"), exports);
|
|
9
|
+
_export_star(require("./mime-types"), exports);
|
|
7
10
|
function _export_star(from, to) {
|
|
8
11
|
Object.keys(from).forEach(function(k) {
|
|
9
12
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
package/cjs/utils/json-token.js
CHANGED
|
@@ -9,29 +9,29 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
base64EncodeUrl: function() {
|
|
13
|
-
return base64EncodeUrl;
|
|
14
|
-
},
|
|
15
12
|
base64DecodeUrl: function() {
|
|
16
13
|
return base64DecodeUrl;
|
|
17
14
|
},
|
|
18
|
-
|
|
19
|
-
return
|
|
15
|
+
base64EncodeUrl: function() {
|
|
16
|
+
return base64EncodeUrl;
|
|
20
17
|
},
|
|
21
18
|
createBase64Decoder: function() {
|
|
22
19
|
return createBase64Decoder;
|
|
23
20
|
},
|
|
24
|
-
|
|
25
|
-
return
|
|
21
|
+
createBase64Encoder: function() {
|
|
22
|
+
return createBase64Encoder;
|
|
26
23
|
},
|
|
27
24
|
createBase64UrlDecoder: function() {
|
|
28
25
|
return createBase64UrlDecoder;
|
|
29
26
|
},
|
|
30
|
-
|
|
31
|
-
return
|
|
27
|
+
createBase64UrlEncoder: function() {
|
|
28
|
+
return createBase64UrlEncoder;
|
|
32
29
|
},
|
|
33
30
|
createJweEncoder: function() {
|
|
34
31
|
return createJweEncoder;
|
|
32
|
+
},
|
|
33
|
+
createJwtEncoder: function() {
|
|
34
|
+
return createJwtEncoder;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
var _crypto = require("./crypto");
|
|
@@ -75,13 +75,13 @@ function _ts_generator(thisArg, body) {
|
|
|
75
75
|
trys: [],
|
|
76
76
|
ops: []
|
|
77
77
|
};
|
|
78
|
-
return
|
|
78
|
+
return g = {
|
|
79
79
|
next: verb(0),
|
|
80
80
|
"throw": verb(1),
|
|
81
81
|
"return": verb(2)
|
|
82
82
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
83
83
|
return this;
|
|
84
|
-
}), g
|
|
84
|
+
}), g;
|
|
85
85
|
function verb(n) {
|
|
86
86
|
return function(v) {
|
|
87
87
|
return step([
|
|
@@ -162,7 +162,6 @@ function _ts_generator(thisArg, body) {
|
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
* Encode a Unicode string in base64
|
|
165
|
-
*
|
|
166
165
|
* @param str String to convert
|
|
167
166
|
*/ function base64EncodeUnicode(str) {
|
|
168
167
|
// First we escape the string using encodeURI to get the UTF-8 encoding of the characters,
|
|
@@ -179,7 +178,6 @@ function _ts_generator(thisArg, body) {
|
|
|
179
178
|
}
|
|
180
179
|
/**
|
|
181
180
|
* Decode a Unicode string from base64
|
|
182
|
-
*
|
|
183
181
|
* @param str String to convert
|
|
184
182
|
*/ function base64DecodeUnicode(str) {
|
|
185
183
|
// Once the provided string is decoded from based64, we convert each character in its hexadecimal
|
|
@@ -198,7 +198,7 @@ describe("JSON Web Encryption Token", function() {
|
|
|
198
198
|
return _ts_generator(this, function(_state) {
|
|
199
199
|
switch(_state.label){
|
|
200
200
|
case 0:
|
|
201
|
-
expectedJwePayload = {
|
|
201
|
+
/* eslint-disable @typescript-eslint/naming-convention */ expectedJwePayload = {
|
|
202
202
|
iat: 0,
|
|
203
203
|
exp: 3600,
|
|
204
204
|
iss: "DEMO_JWE",
|
|
@@ -208,7 +208,7 @@ describe("JSON Web Encryption Token", function() {
|
|
|
208
208
|
"{lastName}": "Doe"
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
expectedJweHeader = {
|
|
211
|
+
/* eslint-enable @typescript-eslint/naming-convention */ expectedJweHeader = {
|
|
212
212
|
alg: "RSA-OAEP-256",
|
|
213
213
|
enc: "A256GCM",
|
|
214
214
|
typ: "JWE",
|
|
@@ -264,6 +264,7 @@ describe("JSON Web Encryption Token", function() {
|
|
|
264
264
|
167,
|
|
265
265
|
206
|
|
266
266
|
]);
|
|
267
|
+
// eslint-disable-next-line max-len
|
|
267
268
|
expectedJweEncryptedKey = new Uint8Array([
|
|
268
269
|
37,
|
|
269
270
|
70,
|
|
@@ -522,6 +523,7 @@ describe("JSON Web Encryption Token", function() {
|
|
|
522
523
|
239,
|
|
523
524
|
108
|
|
524
525
|
]);
|
|
526
|
+
// eslint-disable-next-line max-len
|
|
525
527
|
outputAesGcm = new Uint8Array([
|
|
526
528
|
179,
|
|
527
529
|
46,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
isJsonMimeType: function() {
|
|
13
|
+
return isJsonMimeType;
|
|
14
|
+
},
|
|
15
|
+
jsonRegex: function() {
|
|
16
|
+
return jsonRegex;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
|
|
20
|
+
function isJsonMimeType(mime) {
|
|
21
|
+
return jsonRegex.test(mime);
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/*
|
|
4
|
+
* Remove deleted models' exports
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const baseDir = (0, node_path_1.resolve)(process.cwd(), 'src', 'models', 'base');
|
|
10
|
+
void (async () => {
|
|
11
|
+
const models = await node_fs_1.promises.readdir(baseDir);
|
|
12
|
+
const shouldRemoveModels = (await Promise.all(models
|
|
13
|
+
.filter((file) => (0, node_fs_1.statSync)((0, node_path_1.resolve)(baseDir, file)).isDirectory())
|
|
14
|
+
.map(async (model) => {
|
|
15
|
+
const files = await node_fs_1.promises.readdir((0, node_path_1.resolve)(baseDir, model));
|
|
16
|
+
return { model, removeIndex: files.length === 1 };
|
|
17
|
+
}))).filter(({ removeIndex }) => removeIndex)
|
|
18
|
+
.map(({ model }) => model);
|
|
19
|
+
await Promise.all(shouldRemoveModels
|
|
20
|
+
.map((model) => {
|
|
21
|
+
console.warn(`Removing ${model} model`);
|
|
22
|
+
return node_fs_1.promises.unlink((0, node_path_1.resolve)(baseDir, model, 'index.ts'));
|
|
23
|
+
}));
|
|
24
|
+
})();
|
|
25
|
+
//# sourceMappingURL=clear-index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-index.cjs","sourceRoot":"","sources":["../../cli/clear-index.cts"],"names":[],"mappings":";;AAEA;;GAEG;;AAEH,qCAAmD;AACnD,yCAAoC;AAEpC,MAAM,OAAO,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEhE,KAAK,CAAC,KAAK,IAAI,EAAE;IACf,MAAM,MAAM,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,kBAAkB,GAAG,CACzB,MAAM,OAAO,CAAC,GAAG,CACf,MAAM;SACH,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,kBAAQ,EAAC,IAAA,mBAAO,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAChE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACnB,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,IAAA,mBAAO,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QACxD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACpD,CAAC,CAAC,CACL,CACF,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC;SACvC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IAE7B,MAAM,OAAO,CAAC,GAAG,CACf,kBAAkB;SACf,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC;QACxC,OAAO,kBAAE,CAAC,MAAM,CAAC,IAAA,mBAAO,EAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-index.d.cts","sourceRoot":"","sources":["../../cli/clear-index.cts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/*
|
|
4
|
+
* Update the Typescript SDK Package to expose the sub modules
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const minimist = require("minimist");
|
|
9
|
+
const path = require("node:path");
|
|
10
|
+
const node_fs_2 = require("node:fs");
|
|
11
|
+
const globby = require("globby");
|
|
12
|
+
const argv = minimist(process.argv.slice(2));
|
|
13
|
+
const distFolder = argv.dist || 'dist';
|
|
14
|
+
const baseDir = argv.cwd && path.resolve(process.cwd(), argv.cwd) || process.cwd();
|
|
15
|
+
const { watch, noExports } = argv;
|
|
16
|
+
const files = [
|
|
17
|
+
'README.md',
|
|
18
|
+
'LICENSE',
|
|
19
|
+
'package.json',
|
|
20
|
+
'src/**/package.json'
|
|
21
|
+
];
|
|
22
|
+
/** Update package.json exports */
|
|
23
|
+
const updateExports = async () => {
|
|
24
|
+
const packageJson = JSON.parse(await node_fs_2.promises.readFile(path.join(baseDir, 'package.json'), { encoding: 'utf8' }));
|
|
25
|
+
const packageJsonFiles = globby.sync(path.join(baseDir, distFolder, '*', '**', 'package.json'), { absolute: true });
|
|
26
|
+
packageJson.exports = packageJson.exports || {};
|
|
27
|
+
for (const packageJsonFile of packageJsonFiles) {
|
|
28
|
+
try {
|
|
29
|
+
const subPackageJson = JSON.parse(await node_fs_2.promises.readFile(packageJsonFile, { encoding: 'utf8' }));
|
|
30
|
+
const folder = './' + path.relative(path.join(baseDir, distFolder), path.dirname(packageJsonFile)).replace(/[/\\]+/g, '/');
|
|
31
|
+
packageJson.exports[folder] = packageJson.exports[folder] || {};
|
|
32
|
+
Object.entries(subPackageJson).forEach(([key, value]) => {
|
|
33
|
+
if (['name', 'sideEffects'].includes(key)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
packageJson.exports[folder][key] = './' + path.relative(path.join(baseDir, distFolder), path.resolve(path.dirname(packageJsonFile), value)).replace(/[/\\]+/g, '/');
|
|
37
|
+
});
|
|
38
|
+
packageJson.exports[folder].import = packageJson.exports[folder].module || packageJson.exports[folder].esm2020 || packageJson.exports[folder].esm2015 || packageJson.exports[folder].node;
|
|
39
|
+
packageJson.exports[folder].require = packageJson.exports[folder].node;
|
|
40
|
+
packageJson.exports[folder].main = packageJson.exports[folder].import || packageJson.exports[folder].require;
|
|
41
|
+
}
|
|
42
|
+
catch (e) {
|
|
43
|
+
if (watch) {
|
|
44
|
+
console.warn(`Exception in ${packageJsonFile}`, e);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw e;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
delete packageJson.scripts;
|
|
52
|
+
await node_fs_2.promises.writeFile(path.join(baseDir, distFolder, 'package.json'), JSON.stringify(packageJson, null, 2));
|
|
53
|
+
};
|
|
54
|
+
void (async () => {
|
|
55
|
+
const copyToDist = (file) => {
|
|
56
|
+
const distFile = path.resolve(baseDir, distFolder, path.relative(baseDir, file));
|
|
57
|
+
// eslint-disable-next-line no-console
|
|
58
|
+
console.log(`${file} copied to ${distFile}`);
|
|
59
|
+
try {
|
|
60
|
+
(0, node_fs_1.mkdirSync)(path.dirname(distFile), { recursive: true });
|
|
61
|
+
}
|
|
62
|
+
catch { /* ignore error */ }
|
|
63
|
+
return (0, node_fs_1.copyFileSync)(file, distFile);
|
|
64
|
+
};
|
|
65
|
+
// Move files into the dist folder
|
|
66
|
+
const copies = files.map(async (glob) => {
|
|
67
|
+
return watch ?
|
|
68
|
+
Promise.resolve().then(() => require('chokidar')).then((chokidar) => chokidar.watch(path.join(baseDir, glob)))
|
|
69
|
+
.then((watcher) => watcher.on('all', (event, file) => {
|
|
70
|
+
if (event !== 'unlink' && event !== 'unlinkDir') {
|
|
71
|
+
copyToDist(file);
|
|
72
|
+
return updateExports();
|
|
73
|
+
}
|
|
74
|
+
})) :
|
|
75
|
+
globby.sync(path.join(baseDir, glob))
|
|
76
|
+
.forEach((file) => copyToDist(file));
|
|
77
|
+
});
|
|
78
|
+
await Promise.all(copies);
|
|
79
|
+
// Edit package.json exports
|
|
80
|
+
if (!noExports && !watch) {
|
|
81
|
+
await updateExports();
|
|
82
|
+
}
|
|
83
|
+
})();
|
|
84
|
+
//# sourceMappingURL=files-pack.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files-pack.cjs","sourceRoot":"","sources":["../../cli/files-pack.cts"],"names":[],"mappings":";;AAEA;;GAEG;;AAEH,qCAAkD;AAClD,qCAAqC;AACrC,kCAAkC;AAClC,qCAAyC;AACzC,iCAAiC;AAGjC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC;AACvC,MAAM,OAAO,GAAG,IAAI,CAAC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E,IAAI,EAAE,EAAE;gBACnD,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,WAAW,EAAE;oBAC/C,UAAU,CAAC,IAAI,CAAC,CAAC;oBACjB,OAAO,aAAa,EAAE,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC,CAAC,CAAC;YACP,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;iBAClC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE1B,4BAA4B;IAC5B,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE;QACxB,MAAM,aAAa,EAAE,CAAC;KACvB;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files-pack.d.cts","sourceRoot":"","sources":["../../cli/files-pack.cts"],"names":[],"mappings":""}
|
package/cli/package.json
ADDED
|
@@ -263,7 +263,9 @@ var DEFAULT_OPTIONS = {
|
|
|
263
263
|
plugin = _step.value;
|
|
264
264
|
return [
|
|
265
265
|
4,
|
|
266
|
-
plugin.load(
|
|
266
|
+
plugin.load({
|
|
267
|
+
logger: _this.options.logger
|
|
268
|
+
}).transform(opts)
|
|
267
269
|
];
|
|
268
270
|
case 3:
|
|
269
271
|
opts = _state.sent();
|
|
@@ -393,6 +395,7 @@ var DEFAULT_OPTIONS = {
|
|
|
393
395
|
4
|
|
394
396
|
];
|
|
395
397
|
case 4:
|
|
398
|
+
// eslint-disable-next-line no-console
|
|
396
399
|
reviver = getResponseReviver(revivers, response, operationId, {
|
|
397
400
|
disableFallback: _this.options.disableFallback,
|
|
398
401
|
log: console.error
|
|
@@ -414,7 +417,8 @@ var DEFAULT_OPTIONS = {
|
|
|
414
417
|
exception: exception,
|
|
415
418
|
operationId: operationId,
|
|
416
419
|
url: url,
|
|
417
|
-
origin: origin
|
|
420
|
+
origin: origin,
|
|
421
|
+
logger: _this.options.logger
|
|
418
422
|
});
|
|
419
423
|
}) : [];
|
|
420
424
|
parsedData = root;
|
|
@@ -53,7 +53,6 @@ var DEFAULT_OPTIONS = {
|
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* Determine if the given value is a promise
|
|
56
|
-
*
|
|
57
56
|
* @param value The value to test
|
|
58
57
|
*/ var isPromise = function(value) {
|
|
59
58
|
return value && typeof value.then === "function";
|
|
@@ -99,7 +98,9 @@ var DEFAULT_OPTIONS = {
|
|
|
99
98
|
try {
|
|
100
99
|
for(var _iterator = this.options.requestPlugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
101
100
|
var plugin = _step.value;
|
|
102
|
-
var changedOpt = plugin.load(
|
|
101
|
+
var changedOpt = plugin.load({
|
|
102
|
+
logger: this.options.logger
|
|
103
|
+
}).transform(opts);
|
|
103
104
|
if (isPromise(changedOpt)) {
|
|
104
105
|
throw new Error("Request plugin ".concat(plugin.constructor.name, " has async transform method. Only sync methods are supported with the Beacon client."));
|
|
105
106
|
} else {
|
|
@@ -277,7 +277,9 @@ var DEFAULT_OPTIONS = {
|
|
|
277
277
|
plugin = _step.value;
|
|
278
278
|
return [
|
|
279
279
|
4,
|
|
280
|
-
plugin.load(
|
|
280
|
+
plugin.load({
|
|
281
|
+
logger: _this.options.logger
|
|
282
|
+
}).transform(opts)
|
|
281
283
|
];
|
|
282
284
|
case 3:
|
|
283
285
|
opts = _state.sent();
|
|
@@ -355,7 +357,7 @@ var DEFAULT_OPTIONS = {
|
|
|
355
357
|
,
|
|
356
358
|
6
|
|
357
359
|
]);
|
|
358
|
-
controller =
|
|
360
|
+
controller = new AbortController();
|
|
359
361
|
if (controller) {
|
|
360
362
|
options.signal = controller.signal;
|
|
361
363
|
}
|
|
@@ -368,7 +370,8 @@ var DEFAULT_OPTIONS = {
|
|
|
368
370
|
options: options,
|
|
369
371
|
fetchPlugins: loadedPlugins,
|
|
370
372
|
controller: controller,
|
|
371
|
-
apiClient: _this
|
|
373
|
+
apiClient: _this,
|
|
374
|
+
logger: _this.options.logger
|
|
372
375
|
});
|
|
373
376
|
})));
|
|
374
377
|
}
|
|
@@ -455,6 +458,7 @@ var DEFAULT_OPTIONS = {
|
|
|
455
458
|
origin: origin
|
|
456
459
|
});
|
|
457
460
|
}
|
|
461
|
+
// eslint-disable-next-line no-console
|
|
458
462
|
reviver = getResponseReviver(revivers, response, operationId, {
|
|
459
463
|
disableFallback: _this.options.disableFallback,
|
|
460
464
|
log: console.error
|
|
@@ -469,7 +473,8 @@ var DEFAULT_OPTIONS = {
|
|
|
469
473
|
exception: exception,
|
|
470
474
|
operationId: operationId,
|
|
471
475
|
url: url,
|
|
472
|
-
origin: origin
|
|
476
|
+
origin: origin,
|
|
477
|
+
logger: _this.options.logger
|
|
473
478
|
});
|
|
474
479
|
}) : [];
|
|
475
480
|
parsedData = root;
|
package/esm2015/fwk/Reviver.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** Reviver type */ /**
|
|
2
2
|
* Used in case of maps (dictionaries): All values of the map must be of the same type. reviveWithType will be called
|
|
3
3
|
* for each of these elements.
|
|
4
|
-
*
|
|
5
4
|
* @param dictionaries
|
|
6
5
|
* @param reviver
|
|
7
6
|
*/ export function reviveMap(data) {
|
|
@@ -20,7 +19,6 @@
|
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Used in case of arrays: It will call the reviveWithType for each element of the array.
|
|
23
|
-
*
|
|
24
22
|
* @param data
|
|
25
23
|
* @param dictionaries
|
|
26
24
|
* @param reviver
|
|
@@ -36,7 +34,6 @@
|
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
38
36
|
* Used in case of arrays dictionarized Array
|
|
39
|
-
*
|
|
40
37
|
* @param ids : list of the ids to be able to get the associated values from the dictionary
|
|
41
38
|
* @param dictionary : Specific dictionary associated to T
|
|
42
39
|
* @param reviver : Function to revive the Data object, once retrieved from the dictionary.
|
|
@@ -176,18 +176,18 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
176
176
|
* Compute the reviver to use in case the success response code returned by the API does not match the API
|
|
177
177
|
* Fallback to the lowest status code's reviver.
|
|
178
178
|
* Does not try to match non-successful responses as error are handled separately
|
|
179
|
-
*
|
|
180
179
|
* @param revivers
|
|
181
180
|
* @param endpoint
|
|
182
181
|
* @param response
|
|
183
182
|
* @param options
|
|
183
|
+
* @param options.disableFallback
|
|
184
|
+
* @param options.log
|
|
184
185
|
*/ export function getResponseReviver(revivers, response, // eslint-disable-next-line no-console
|
|
185
186
|
endpoint) {
|
|
186
187
|
var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
|
|
187
188
|
disableFallback: false,
|
|
188
189
|
log: console.error
|
|
189
190
|
};
|
|
190
|
-
var _options;
|
|
191
191
|
var logPrefix = "API status code error for ".concat(endpoint || "unknown", " endpoint");
|
|
192
192
|
var logMsg = options.log || function() {};
|
|
193
193
|
if (!response || !response.ok) {
|
|
@@ -199,7 +199,7 @@ endpoint) {
|
|
|
199
199
|
if (response.status && revivers[response.status]) {
|
|
200
200
|
return revivers[response.status];
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
202
|
+
if (options === null || options === void 0 ? void 0 : options.disableFallback) {
|
|
203
203
|
logMsg("".concat(logPrefix, " - Missing ").concat(response.status, " from API specification - fallback is deactivated, no revive will run on this response"));
|
|
204
204
|
return undefined;
|
|
205
205
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { };
|
|
1
|
+
/** Type that is the same as the `Partial<T>` type, but with a certain property mandatory. */ export { };
|
package/esm2015/fwk/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Type of API to manage */ export var ApiTypes;
|
|
2
2
|
(function(ApiTypes) {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** Digital API */ ApiTypes[ApiTypes["DAPI"] = 0] = "DAPI";
|
|
4
|
+
/** External API */ ApiTypes[ApiTypes["DEFAULT"] = 1] = "DEFAULT";
|
|
5
5
|
})(ApiTypes || (ApiTypes = {}));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if the object is an Api Client object
|
|
3
|
-
*
|
|
4
3
|
* @param client object to check
|
|
5
4
|
*/ export function isApiClient(client) {
|
|
6
5
|
return client && !!client.options && typeof client.extractQueryParams === "function" && typeof client.prepareOptions === "function" && typeof client.prepareUrl === "function" && typeof client.processFormData === "function" && typeof client.processCall === "function";
|
package/esm2015/fwk/date.js
CHANGED
|
@@ -209,12 +209,6 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
|
|
|
209
209
|
].concat(_to_consumable_array(args)));
|
|
210
210
|
}
|
|
211
211
|
_create_class(CommonDate, [
|
|
212
|
-
{
|
|
213
|
-
key: "dateInstance",
|
|
214
|
-
get: /** @deprecated will be removed in v10 */ function get() {
|
|
215
|
-
return this;
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
212
|
{
|
|
219
213
|
key: "toJSON",
|
|
220
214
|
value: /**
|
|
@@ -226,29 +220,9 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
|
|
|
226
220
|
]);
|
|
227
221
|
return CommonDate;
|
|
228
222
|
}(_wrap_native_super(Date));
|
|
229
|
-
|
|
230
|
-
* A collection of utilities required by the auto-generated code.
|
|
231
|
-
*/ export var utils;
|
|
223
|
+
export var utils;
|
|
232
224
|
(function(utils) {
|
|
233
225
|
"use strict";
|
|
234
|
-
var processFormData = function processFormData(headers, data, type) {
|
|
235
|
-
var encodedData;
|
|
236
|
-
if (type === "multipart/form-data") {
|
|
237
|
-
var formData = new FormData();
|
|
238
|
-
for(var i in data){
|
|
239
|
-
formData.append(i, data[i]);
|
|
240
|
-
}
|
|
241
|
-
encodedData = formData;
|
|
242
|
-
} else {
|
|
243
|
-
headers.set("Content-Type", "application/x-www-form-urlencoded");
|
|
244
|
-
var formData1 = [];
|
|
245
|
-
for(var i1 in data){
|
|
246
|
-
formData1.push("".concat(i1, "=").concat(encodeURIComponent(data[i1])));
|
|
247
|
-
}
|
|
248
|
-
encodedData = formData1.join("&");
|
|
249
|
-
}
|
|
250
|
-
return encodedData;
|
|
251
|
-
};
|
|
252
226
|
var _$Date = /*#__PURE__*/ function(CommonDate) {
|
|
253
227
|
_inherits(Date1, CommonDate);
|
|
254
228
|
var _super = _create_super(Date1);
|
|
@@ -317,20 +291,9 @@ export var CommonDate = /*#__PURE__*/ function(Date1) {
|
|
|
317
291
|
value: /**
|
|
318
292
|
* To ensure that users cannot use a standard Date instead of utils.DateTime
|
|
319
293
|
*/ function _DateTime() {}
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
key: "getUtilsDate",
|
|
323
|
-
value: /**
|
|
324
|
-
* Get an instance of utils.Date base on the current date
|
|
325
|
-
*
|
|
326
|
-
* @deprecated will be removed in v10
|
|
327
|
-
*/ function getUtilsDate() {
|
|
328
|
-
return new _$Date(this);
|
|
329
|
-
}
|
|
330
294
|
}
|
|
331
295
|
]);
|
|
332
296
|
return DateTime;
|
|
333
297
|
}(CommonDate);
|
|
334
298
|
utils.DateTime = DateTime;
|
|
335
|
-
utils.processFormData = processFormData;
|
|
336
299
|
})(utils || (utils = {}));
|