@wirebench/engine 2.1.1
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/LICENSE +201 -0
- package/README.md +3 -0
- package/dist/assert/contract.d.ts +3 -0
- package/dist/assert/contract.js +17 -0
- package/dist/assert/index.d.ts +4 -0
- package/dist/assert/index.js +27 -0
- package/dist/assert/match.d.ts +3 -0
- package/dist/assert/match.js +58 -0
- package/dist/assert/model.d.ts +73 -0
- package/dist/assert/model.js +8 -0
- package/dist/assert/schema.d.ts +34 -0
- package/dist/assert/schema.js +46 -0
- package/dist/assert/sla.d.ts +3 -0
- package/dist/assert/sla.js +8 -0
- package/dist/assert/soap-fault.d.ts +3 -0
- package/dist/assert/soap-fault.js +20 -0
- package/dist/assert/status.d.ts +3 -0
- package/dist/assert/status.js +14 -0
- package/dist/errors.d.ts +77 -0
- package/dist/errors.js +121 -0
- package/dist/fs.d.ts +35 -0
- package/dist/fs.js +64 -0
- package/dist/generate.d.ts +12 -0
- package/dist/generate.js +14 -0
- package/dist/grpc/browser.d.ts +11 -0
- package/dist/grpc/browser.js +9 -0
- package/dist/grpc/cache.d.ts +113 -0
- package/dist/grpc/cache.js +244 -0
- package/dist/grpc/call.d.ts +64 -0
- package/dist/grpc/call.js +72 -0
- package/dist/grpc/codec.d.ts +29 -0
- package/dist/grpc/codec.js +416 -0
- package/dist/grpc/command.d.ts +23 -0
- package/dist/grpc/command.js +91 -0
- package/dist/grpc/expand.d.ts +25 -0
- package/dist/grpc/expand.js +52 -0
- package/dist/grpc/framing.d.ts +28 -0
- package/dist/grpc/framing.js +61 -0
- package/dist/grpc/import.d.ts +47 -0
- package/dist/grpc/import.js +88 -0
- package/dist/grpc/model.d.ts +179 -0
- package/dist/grpc/model.js +91 -0
- package/dist/grpc/proto/describe.d.ts +92 -0
- package/dist/grpc/proto/describe.js +205 -0
- package/dist/grpc/proto/load.d.ts +35 -0
- package/dist/grpc/proto/load.js +112 -0
- package/dist/grpc/proto/sample.d.ts +21 -0
- package/dist/grpc/proto/sample.js +79 -0
- package/dist/grpc/proto/well-known.d.ts +42 -0
- package/dist/grpc/proto/well-known.js +143 -0
- package/dist/grpc/reconcile.d.ts +42 -0
- package/dist/grpc/reconcile.js +153 -0
- package/dist/grpc/reflection/client.d.ts +70 -0
- package/dist/grpc/reflection/client.js +197 -0
- package/dist/grpc/reflection/descriptors.d.ts +69 -0
- package/dist/grpc/reflection/descriptors.js +140 -0
- package/dist/grpc/reflection/proto.d.ts +33 -0
- package/dist/grpc/reflection/proto.js +144 -0
- package/dist/grpc/send.d.ts +132 -0
- package/dist/grpc/send.js +435 -0
- package/dist/grpc/shape.d.ts +29 -0
- package/dist/grpc/shape.js +36 -0
- package/dist/grpc/status.d.ts +21 -0
- package/dist/grpc/status.js +62 -0
- package/dist/grpc/target.d.ts +21 -0
- package/dist/grpc/target.js +66 -0
- package/dist/http/auth/apply.d.ts +37 -0
- package/dist/http/auth/apply.js +74 -0
- package/dist/http/auth/basic.d.ts +36 -0
- package/dist/http/auth/basic.js +69 -0
- package/dist/http/auth/md4.d.ts +13 -0
- package/dist/http/auth/md4.js +81 -0
- package/dist/http/auth/ntlm-transport.d.ts +61 -0
- package/dist/http/auth/ntlm-transport.js +97 -0
- package/dist/http/auth/ntlm.d.ts +190 -0
- package/dist/http/auth/ntlm.js +377 -0
- package/dist/http/client.d.ts +73 -0
- package/dist/http/client.js +403 -0
- package/dist/http/curl-flags.d.ts +15 -0
- package/dist/http/curl-flags.js +95 -0
- package/dist/http/curl.d.ts +94 -0
- package/dist/http/curl.js +245 -0
- package/dist/http/decompress.d.ts +7 -0
- package/dist/http/decompress.js +22 -0
- package/dist/http/errors.d.ts +22 -0
- package/dist/http/errors.js +144 -0
- package/dist/http/failed-request.d.ts +27 -0
- package/dist/http/failed-request.js +48 -0
- package/dist/http/headers.d.ts +15 -0
- package/dist/http/headers.js +50 -0
- package/dist/http/heredoc.d.ts +25 -0
- package/dist/http/heredoc.js +74 -0
- package/dist/http/proxy.d.ts +103 -0
- package/dist/http/proxy.js +168 -0
- package/dist/http/raw-capture.d.ts +23 -0
- package/dist/http/raw-capture.js +57 -0
- package/dist/http/timings.d.ts +79 -0
- package/dist/http/timings.js +212 -0
- package/dist/http/tls.d.ts +111 -0
- package/dist/http/tls.js +167 -0
- package/dist/http/types.d.ts +125 -0
- package/dist/http/types.js +6 -0
- package/dist/import-detect.d.ts +26 -0
- package/dist/import-detect.js +169 -0
- package/dist/import.d.ts +20 -0
- package/dist/import.js +163 -0
- package/dist/index.d.ts +272 -0
- package/dist/index.js +157 -0
- package/dist/json/cursor.d.ts +43 -0
- package/dist/json/cursor.js +168 -0
- package/dist/operations.d.ts +12 -0
- package/dist/operations.js +52 -0
- package/dist/project/attachments-cache.d.ts +80 -0
- package/dist/project/attachments-cache.js +186 -0
- package/dist/project/endpoints.d.ts +23 -0
- package/dist/project/endpoints.js +47 -0
- package/dist/project/environments.d.ts +68 -0
- package/dist/project/environments.js +124 -0
- package/dist/project/fs.d.ts +45 -0
- package/dist/project/fs.js +78 -0
- package/dist/project/history.d.ts +171 -0
- package/dist/project/history.js +179 -0
- package/dist/project/keystores.d.ts +24 -0
- package/dist/project/keystores.js +66 -0
- package/dist/project/load.d.ts +44 -0
- package/dist/project/load.js +634 -0
- package/dist/project/migrate.d.ts +27 -0
- package/dist/project/migrate.js +46 -0
- package/dist/project/model.d.ts +401 -0
- package/dist/project/model.js +126 -0
- package/dist/project/paths.d.ts +134 -0
- package/dist/project/paths.js +259 -0
- package/dist/project/preferences.d.ts +318 -0
- package/dist/project/preferences.js +239 -0
- package/dist/project/properties.d.ts +97 -0
- package/dist/project/properties.js +356 -0
- package/dist/project/save.d.ts +65 -0
- package/dist/project/save.js +295 -0
- package/dist/project/schema.d.ts +1329 -0
- package/dist/project/schema.js +737 -0
- package/dist/project/serialize.d.ts +42 -0
- package/dist/project/serialize.js +385 -0
- package/dist/project/wss-configs.d.ts +40 -0
- package/dist/project/wss-configs.js +142 -0
- package/dist/project/yaml.d.ts +17 -0
- package/dist/project/yaml.js +39 -0
- package/dist/redact/index.d.ts +77 -0
- package/dist/redact/index.js +328 -0
- package/dist/redact/literal.d.ts +12 -0
- package/dist/redact/literal.js +68 -0
- package/dist/rest/auth.d.ts +53 -0
- package/dist/rest/auth.js +80 -0
- package/dist/rest/body.d.ts +61 -0
- package/dist/rest/body.js +184 -0
- package/dist/rest/browser.d.ts +12 -0
- package/dist/rest/browser.js +11 -0
- package/dist/rest/cookies.d.ts +41 -0
- package/dist/rest/cookies.js +102 -0
- package/dist/rest/curl.d.ts +75 -0
- package/dist/rest/curl.js +417 -0
- package/dist/rest/expand.d.ts +35 -0
- package/dist/rest/expand.js +104 -0
- package/dist/rest/model.d.ts +247 -0
- package/dist/rest/model.js +118 -0
- package/dist/rest/oauth2.d.ts +118 -0
- package/dist/rest/oauth2.js +212 -0
- package/dist/rest/openapi/cache.d.ts +54 -0
- package/dist/rest/openapi/cache.js +128 -0
- package/dist/rest/openapi/import.d.ts +67 -0
- package/dist/rest/openapi/import.js +91 -0
- package/dist/rest/openapi/map.d.ts +102 -0
- package/dist/rest/openapi/map.js +477 -0
- package/dist/rest/openapi/model.d.ts +203 -0
- package/dist/rest/openapi/model.js +37 -0
- package/dist/rest/openapi/parse.d.ts +44 -0
- package/dist/rest/openapi/parse.js +1530 -0
- package/dist/rest/openapi/refs.d.ts +63 -0
- package/dist/rest/openapi/refs.js +258 -0
- package/dist/rest/openapi/sample.d.ts +68 -0
- package/dist/rest/openapi/sample.js +336 -0
- package/dist/rest/postman/import.d.ts +21 -0
- package/dist/rest/postman/import.js +47 -0
- package/dist/rest/postman/index.d.ts +7 -0
- package/dist/rest/postman/index.js +7 -0
- package/dist/rest/postman/map.d.ts +28 -0
- package/dist/rest/postman/map.js +427 -0
- package/dist/rest/postman/model.d.ts +118 -0
- package/dist/rest/postman/model.js +7 -0
- package/dist/rest/postman/parse.d.ts +29 -0
- package/dist/rest/postman/parse.js +518 -0
- package/dist/rest/response.d.ts +72 -0
- package/dist/rest/response.js +221 -0
- package/dist/rest/send.d.ts +102 -0
- package/dist/rest/send.js +148 -0
- package/dist/rest/url.d.ts +92 -0
- package/dist/rest/url.js +213 -0
- package/dist/run/effective-auth.d.ts +10 -0
- package/dist/run/effective-auth.js +19 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +4 -0
- package/dist/run/prepare.d.ts +43 -0
- package/dist/run/prepare.js +280 -0
- package/dist/run/run.d.ts +53 -0
- package/dist/run/run.js +223 -0
- package/dist/run/secret-needs.d.ts +13 -0
- package/dist/run/secret-needs.js +125 -0
- package/dist/run/select.d.ts +34 -0
- package/dist/run/select.js +76 -0
- package/dist/secrets/env-names.d.ts +27 -0
- package/dist/secrets/env-names.js +40 -0
- package/dist/secrets/resolve.d.ts +58 -0
- package/dist/secrets/resolve.js +136 -0
- package/dist/send-options.d.ts +141 -0
- package/dist/send-options.js +228 -0
- package/dist/send.d.ts +53 -0
- package/dist/send.js +210 -0
- package/dist/soap/body-builder.d.ts +38 -0
- package/dist/soap/body-builder.js +250 -0
- package/dist/soap/build-problems.d.ts +12 -0
- package/dist/soap/build-problems.js +2 -0
- package/dist/soap/charset.d.ts +23 -0
- package/dist/soap/charset.js +47 -0
- package/dist/soap/envelope.d.ts +44 -0
- package/dist/soap/envelope.js +76 -0
- package/dist/soap/fault.d.ts +46 -0
- package/dist/soap/fault.js +129 -0
- package/dist/soap/form-request.d.ts +34 -0
- package/dist/soap/form-request.js +251 -0
- package/dist/soap/legacy-project/definition-fetcher.d.ts +21 -0
- package/dist/soap/legacy-project/definition-fetcher.js +43 -0
- package/dist/soap/legacy-project/format.d.ts +18 -0
- package/dist/soap/legacy-project/format.js +24 -0
- package/dist/soap/legacy-project/import.d.ts +21 -0
- package/dist/soap/legacy-project/import.js +46 -0
- package/dist/soap/legacy-project/index.d.ts +9 -0
- package/dist/soap/legacy-project/index.js +5 -0
- package/dist/soap/legacy-project/map.d.ts +91 -0
- package/dist/soap/legacy-project/map.js +290 -0
- package/dist/soap/legacy-project/model.d.ts +98 -0
- package/dist/soap/legacy-project/model.js +5 -0
- package/dist/soap/legacy-project/parse.d.ts +16 -0
- package/dist/soap/legacy-project/parse.js +325 -0
- package/dist/soap/mime/cid-scan.d.ts +36 -0
- package/dist/soap/mime/cid-scan.js +52 -0
- package/dist/soap/mime/inline-files.d.ts +39 -0
- package/dist/soap/mime/inline-files.js +71 -0
- package/dist/soap/mime/mtom.d.ts +74 -0
- package/dist/soap/mime/mtom.js +134 -0
- package/dist/soap/mime/multipart.d.ts +66 -0
- package/dist/soap/mime/multipart.js +329 -0
- package/dist/soap/mime/send-pipeline.d.ts +61 -0
- package/dist/soap/mime/send-pipeline.js +145 -0
- package/dist/soap/mime/swa.d.ts +45 -0
- package/dist/soap/mime/swa.js +62 -0
- package/dist/soap/mime/types.d.ts +69 -0
- package/dist/soap/mime/types.js +10 -0
- package/dist/soap/namespace-scope.d.ts +32 -0
- package/dist/soap/namespace-scope.js +85 -0
- package/dist/soap/prefixes.d.ts +24 -0
- package/dist/soap/prefixes.js +70 -0
- package/dist/soap/recreate.d.ts +28 -0
- package/dist/soap/recreate.js +168 -0
- package/dist/soap/request-builder.d.ts +63 -0
- package/dist/soap/request-builder.js +161 -0
- package/dist/soap/response-parser.d.ts +29 -0
- package/dist/soap/response-parser.js +71 -0
- package/dist/soap/soap-action.d.ts +31 -0
- package/dist/soap/soap-action.js +28 -0
- package/dist/soap/transforms.d.ts +52 -0
- package/dist/soap/transforms.js +164 -0
- package/dist/types.d.ts +307 -0
- package/dist/types.js +6 -0
- package/dist/validate/index.d.ts +61 -0
- package/dist/validate/index.js +72 -0
- package/dist/validate/schema-file-set.d.ts +51 -0
- package/dist/validate/schema-file-set.js +288 -0
- package/dist/validate/schema-validator.d.ts +53 -0
- package/dist/validate/schema-validator.js +251 -0
- package/dist/validate/soap-structure.d.ts +34 -0
- package/dist/validate/soap-structure.js +255 -0
- package/dist/validate/types.d.ts +47 -0
- package/dist/validate/types.js +8 -0
- package/dist/validate/wsi/assertions/helpers.d.ts +145 -0
- package/dist/validate/wsi/assertions/helpers.js +387 -0
- package/dist/validate/wsi/assertions/index.d.ts +44 -0
- package/dist/validate/wsi/assertions/index.js +77 -0
- package/dist/validate/wsi/assertions/message/helpers.d.ts +63 -0
- package/dist/validate/wsi/assertions/message/helpers.js +168 -0
- package/dist/validate/wsi/assertions/message/index.d.ts +39 -0
- package/dist/validate/wsi/assertions/message/index.js +62 -0
- package/dist/validate/wsi/assertions/message/r1001.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1001.js +38 -0
- package/dist/validate/wsi/assertions/message/r1003.d.ts +14 -0
- package/dist/validate/wsi/assertions/message/r1003.js +45 -0
- package/dist/validate/wsi/assertions/message/r1005.d.ts +12 -0
- package/dist/validate/wsi/assertions/message/r1005.js +37 -0
- package/dist/validate/wsi/assertions/message/r1006.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1006.js +49 -0
- package/dist/validate/wsi/assertions/message/r1007.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1007.js +30 -0
- package/dist/validate/wsi/assertions/message/r1011.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1011.js +33 -0
- package/dist/validate/wsi/assertions/message/r1012.d.ts +13 -0
- package/dist/validate/wsi/assertions/message/r1012.js +37 -0
- package/dist/validate/wsi/assertions/message/r1013.d.ts +9 -0
- package/dist/validate/wsi/assertions/message/r1013.js +42 -0
- package/dist/validate/wsi/assertions/message/r1014.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1014.js +30 -0
- package/dist/validate/wsi/assertions/message/r1015.d.ts +12 -0
- package/dist/validate/wsi/assertions/message/r1015.js +36 -0
- package/dist/validate/wsi/assertions/message/r1017.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1017.js +30 -0
- package/dist/validate/wsi/assertions/message/r1100.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1100.js +39 -0
- package/dist/validate/wsi/assertions/message/r1101.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1101.js +37 -0
- package/dist/validate/wsi/assertions/message/r1102.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1102.js +41 -0
- package/dist/validate/wsi/assertions/message/r1103.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1103.js +28 -0
- package/dist/validate/wsi/assertions/message/r1107.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1107.js +38 -0
- package/dist/validate/wsi/assertions/message/r1109.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1109.js +32 -0
- package/dist/validate/wsi/assertions/message/r1124.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1124.js +31 -0
- package/dist/validate/wsi/assertions/message/r1132.d.ts +9 -0
- package/dist/validate/wsi/assertions/message/r1132.js +23 -0
- package/dist/validate/wsi/assertions/message/r1140.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1140.js +42 -0
- package/dist/validate/wsi/assertions/message/r1141.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1141.js +32 -0
- package/dist/validate/wsi/assertions/message/r2113.d.ts +11 -0
- package/dist/validate/wsi/assertions/message/r2113.js +33 -0
- package/dist/validate/wsi/assertions/message/r2211.d.ts +7 -0
- package/dist/validate/wsi/assertions/message/r2211.js +42 -0
- package/dist/validate/wsi/assertions/r2001.d.ts +15 -0
- package/dist/validate/wsi/assertions/r2001.js +47 -0
- package/dist/validate/wsi/assertions/r2002.d.ts +11 -0
- package/dist/validate/wsi/assertions/r2002.js +38 -0
- package/dist/validate/wsi/assertions/r2003.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2003.js +32 -0
- package/dist/validate/wsi/assertions/r2005.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2005.js +40 -0
- package/dist/validate/wsi/assertions/r2101.d.ts +14 -0
- package/dist/validate/wsi/assertions/r2101.js +65 -0
- package/dist/validate/wsi/assertions/r2102.d.ts +10 -0
- package/dist/validate/wsi/assertions/r2102.js +41 -0
- package/dist/validate/wsi/assertions/r2105.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2105.js +39 -0
- package/dist/validate/wsi/assertions/r2110.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2110.js +38 -0
- package/dist/validate/wsi/assertions/r2111.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2111.js +30 -0
- package/dist/validate/wsi/assertions/r2112.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2112.js +35 -0
- package/dist/validate/wsi/assertions/r2201.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2201.js +28 -0
- package/dist/validate/wsi/assertions/r2203.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2203.js +30 -0
- package/dist/validate/wsi/assertions/r2204.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2204.js +29 -0
- package/dist/validate/wsi/assertions/r2205.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2205.js +46 -0
- package/dist/validate/wsi/assertions/r2206.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2206.js +36 -0
- package/dist/validate/wsi/assertions/r2209.d.ts +12 -0
- package/dist/validate/wsi/assertions/r2209.js +37 -0
- package/dist/validate/wsi/assertions/r2210.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2210.js +30 -0
- package/dist/validate/wsi/assertions/r2303.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2303.js +44 -0
- package/dist/validate/wsi/assertions/r2304.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2304.js +32 -0
- package/dist/validate/wsi/assertions/r2401.d.ts +12 -0
- package/dist/validate/wsi/assertions/r2401.js +31 -0
- package/dist/validate/wsi/assertions/r2701.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2701.js +28 -0
- package/dist/validate/wsi/assertions/r2702.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2702.js +26 -0
- package/dist/validate/wsi/assertions/r2705.d.ts +11 -0
- package/dist/validate/wsi/assertions/r2705.js +31 -0
- package/dist/validate/wsi/assertions/r2706.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2706.js +29 -0
- package/dist/validate/wsi/assertions/r2710.d.ts +13 -0
- package/dist/validate/wsi/assertions/r2710.js +37 -0
- package/dist/validate/wsi/assertions/r2716.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2716.js +29 -0
- package/dist/validate/wsi/assertions/r2717.d.ts +9 -0
- package/dist/validate/wsi/assertions/r2717.js +31 -0
- package/dist/validate/wsi/assertions/r2718.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2718.js +41 -0
- package/dist/validate/wsi/assertions/r2720.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2720.js +29 -0
- package/dist/validate/wsi/assertions/r2721.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2721.js +27 -0
- package/dist/validate/wsi/assertions/r2722.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2722.js +29 -0
- package/dist/validate/wsi/assertions/r2801.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2801.js +39 -0
- package/dist/validate/wsi/assertions/r2803.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2803.js +29 -0
- package/dist/validate/wsi/docs.d.ts +29 -0
- package/dist/validate/wsi/docs.js +167 -0
- package/dist/validate/wsi/index.d.ts +16 -0
- package/dist/validate/wsi/index.js +11 -0
- package/dist/validate/wsi/report-html.d.ts +36 -0
- package/dist/validate/wsi/report-html.js +135 -0
- package/dist/validate/wsi/run-message.d.ts +50 -0
- package/dist/validate/wsi/run-message.js +190 -0
- package/dist/validate/wsi/run-wsdl.d.ts +48 -0
- package/dist/validate/wsi/run-wsdl.js +99 -0
- package/dist/validate/wsi/types.d.ts +173 -0
- package/dist/validate/wsi/types.js +17 -0
- package/dist/workspace/commit-message.d.ts +47 -0
- package/dist/workspace/commit-message.js +195 -0
- package/dist/workspace/environments.d.ts +79 -0
- package/dist/workspace/environments.js +115 -0
- package/dist/workspace/index.d.ts +28 -0
- package/dist/workspace/index.js +19 -0
- package/dist/workspace/load.d.ts +45 -0
- package/dist/workspace/load.js +155 -0
- package/dist/workspace/local-state.d.ts +37 -0
- package/dist/workspace/local-state.js +59 -0
- package/dist/workspace/migrate.d.ts +38 -0
- package/dist/workspace/migrate.js +50 -0
- package/dist/workspace/model.d.ts +86 -0
- package/dist/workspace/model.js +54 -0
- package/dist/workspace/paths.d.ts +64 -0
- package/dist/workspace/paths.js +97 -0
- package/dist/workspace/reidentify.d.ts +22 -0
- package/dist/workspace/reidentify.js +122 -0
- package/dist/workspace/save.d.ts +31 -0
- package/dist/workspace/save.js +84 -0
- package/dist/workspace/schema.d.ts +93 -0
- package/dist/workspace/schema.js +115 -0
- package/dist/workspace/serialize.d.ts +24 -0
- package/dist/workspace/serialize.js +60 -0
- package/dist/workspace/share.d.ts +52 -0
- package/dist/workspace/share.js +89 -0
- package/dist/ws/browser.d.ts +13 -0
- package/dist/ws/browser.js +11 -0
- package/dist/ws/call.d.ts +53 -0
- package/dist/ws/call.js +106 -0
- package/dist/ws/command.d.ts +19 -0
- package/dist/ws/command.js +28 -0
- package/dist/ws/expand.d.ts +38 -0
- package/dist/ws/expand.js +76 -0
- package/dist/ws/model.d.ts +191 -0
- package/dist/ws/model.js +83 -0
- package/dist/ws/pretty.d.ts +12 -0
- package/dist/ws/pretty.js +25 -0
- package/dist/ws/session.d.ts +50 -0
- package/dist/ws/session.js +333 -0
- package/dist/ws/shape.d.ts +18 -0
- package/dist/ws/shape.js +28 -0
- package/dist/ws/transcript.d.ts +14 -0
- package/dist/ws/transcript.js +29 -0
- package/dist/ws/url.d.ts +3 -0
- package/dist/ws/url.js +44 -0
- package/dist/wsa/headers.d.ts +78 -0
- package/dist/wsa/headers.js +244 -0
- package/dist/wsa/model.d.ts +66 -0
- package/dist/wsa/model.js +52 -0
- package/dist/wsa/policy-detect.d.ts +81 -0
- package/dist/wsa/policy-detect.js +245 -0
- package/dist/wsdl/cache-naming.d.ts +39 -0
- package/dist/wsdl/cache-naming.js +90 -0
- package/dist/wsdl/cache.d.ts +48 -0
- package/dist/wsdl/cache.js +141 -0
- package/dist/wsdl/docs-generator.d.ts +47 -0
- package/dist/wsdl/docs-generator.js +439 -0
- package/dist/wsdl/dom-utils.d.ts +15 -0
- package/dist/wsdl/dom-utils.js +50 -0
- package/dist/wsdl/export-definition.d.ts +38 -0
- package/dist/wsdl/export-definition.js +100 -0
- package/dist/wsdl/fetch.d.ts +13 -0
- package/dist/wsdl/fetch.js +60 -0
- package/dist/wsdl/merge.d.ts +17 -0
- package/dist/wsdl/merge.js +57 -0
- package/dist/wsdl/model.d.ts +176 -0
- package/dist/wsdl/model.js +17 -0
- package/dist/wsdl/parse-binding.d.ts +6 -0
- package/dist/wsdl/parse-binding.js +150 -0
- package/dist/wsdl/parse-wsdl.d.ts +47 -0
- package/dist/wsdl/parse-wsdl.js +161 -0
- package/dist/wsdl/qname.d.ts +28 -0
- package/dist/wsdl/qname.js +41 -0
- package/dist/wsdl/ref-policy.d.ts +54 -0
- package/dist/wsdl/ref-policy.js +87 -0
- package/dist/wsdl/resolver.d.ts +81 -0
- package/dist/wsdl/resolver.js +276 -0
- package/dist/wsdl/update-definition.d.ts +106 -0
- package/dist/wsdl/update-definition.js +314 -0
- package/dist/wss/apply.d.ts +40 -0
- package/dist/wss/apply.js +212 -0
- package/dist/wss/c14n-prefixes.d.ts +27 -0
- package/dist/wss/c14n-prefixes.js +95 -0
- package/dist/wss/incoming/decrypt.d.ts +35 -0
- package/dist/wss/incoming/decrypt.js +57 -0
- package/dist/wss/incoming/index.d.ts +56 -0
- package/dist/wss/incoming/index.js +189 -0
- package/dist/wss/incoming/verify.d.ts +74 -0
- package/dist/wss/incoming/verify.js +440 -0
- package/dist/wss/key-identifiers.d.ts +76 -0
- package/dist/wss/key-identifiers.js +139 -0
- package/dist/wss/keystore/certificate.d.ts +45 -0
- package/dist/wss/keystore/certificate.js +134 -0
- package/dist/wss/keystore/index.d.ts +50 -0
- package/dist/wss/keystore/index.js +80 -0
- package/dist/wss/keystore/model.d.ts +83 -0
- package/dist/wss/keystore/model.js +27 -0
- package/dist/wss/keystore/pem.d.ts +21 -0
- package/dist/wss/keystore/pem.js +140 -0
- package/dist/wss/keystore/pkcs12.d.ts +21 -0
- package/dist/wss/keystore/pkcs12.js +125 -0
- package/dist/wss/model.d.ts +160 -0
- package/dist/wss/model.js +37 -0
- package/dist/wss/outgoing/encryption.d.ts +76 -0
- package/dist/wss/outgoing/encryption.js +618 -0
- package/dist/wss/outgoing/signature.d.ts +73 -0
- package/dist/wss/outgoing/signature.js +239 -0
- package/dist/wss/outgoing/timestamp.d.ts +29 -0
- package/dist/wss/outgoing/timestamp.js +39 -0
- package/dist/wss/outgoing/username-token.d.ts +36 -0
- package/dist/wss/outgoing/username-token.js +68 -0
- package/dist/wss/security-header.d.ts +31 -0
- package/dist/wss/security-header.js +83 -0
- package/dist/xml/index.d.ts +7 -0
- package/dist/xml/index.js +7 -0
- package/dist/xml/namespaces.d.ts +36 -0
- package/dist/xml/namespaces.js +60 -0
- package/dist/xml/parse.d.ts +79 -0
- package/dist/xml/parse.js +109 -0
- package/dist/xml/positions.d.ts +26 -0
- package/dist/xml/positions.js +71 -0
- package/dist/xml/pretty.d.ts +37 -0
- package/dist/xml/pretty.js +137 -0
- package/dist/xml/serialize.d.ts +6 -0
- package/dist/xml/serialize.js +8 -0
- package/dist/xml/tolerant-tree.d.ts +56 -0
- package/dist/xml/tolerant-tree.js +134 -0
- package/dist/xpath/evaluate-async.d.ts +31 -0
- package/dist/xpath/evaluate-async.js +81 -0
- package/dist/xpath/evaluate.d.ts +98 -0
- package/dist/xpath/evaluate.js +340 -0
- package/dist/xpath/jsonpath.d.ts +40 -0
- package/dist/xpath/jsonpath.js +109 -0
- package/dist/xpath/namespaces.d.ts +29 -0
- package/dist/xpath/namespaces.js +101 -0
- package/dist/xpath/worker.d.ts +7 -0
- package/dist/xpath/worker.js +26 -0
- package/dist/xsd/builtins.d.ts +36 -0
- package/dist/xsd/builtins.js +108 -0
- package/dist/xsd/check-references.d.ts +25 -0
- package/dist/xsd/check-references.js +145 -0
- package/dist/xsd/form-edits.d.ts +57 -0
- package/dist/xsd/form-edits.js +153 -0
- package/dist/xsd/form-model.d.ts +153 -0
- package/dist/xsd/form-model.js +691 -0
- package/dist/xsd/locate.d.ts +42 -0
- package/dist/xsd/locate.js +249 -0
- package/dist/xsd/model.d.ts +249 -0
- package/dist/xsd/model.js +1 -0
- package/dist/xsd/parse-particles.d.ts +48 -0
- package/dist/xsd/parse-particles.js +320 -0
- package/dist/xsd/parse-schema.d.ts +21 -0
- package/dist/xsd/parse-schema.js +143 -0
- package/dist/xsd/resolve-content.d.ts +18 -0
- package/dist/xsd/resolve-content.js +242 -0
- package/dist/xsd/sample-generator.d.ts +51 -0
- package/dist/xsd/sample-generator.js +291 -0
- package/dist/xsd/sample-types.d.ts +21 -0
- package/dist/xsd/sample-types.js +69 -0
- package/dist/xsd/sample-values.d.ts +54 -0
- package/dist/xsd/sample-values.js +267 -0
- package/dist/xsd/schema-set.d.ts +51 -0
- package/dist/xsd/schema-set.js +203 -0
- package/dist/xsd/xml-scan.d.ts +64 -0
- package/dist/xsd/xml-scan.js +286 -0
- package/dist/xsd/xml-writer.d.ts +56 -0
- package/dist/xsd/xml-writer.js +103 -0
- package/package.json +69 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared DOM navigation for the WS-I assertions.
|
|
3
|
+
*
|
|
4
|
+
* The assertions work on the *raw* documents rather than the merged {@link WsdlDefinition}: the
|
|
5
|
+
* profile constrains constructs the model normalizes away (a missing `use` attribute, a `parts`
|
|
6
|
+
* list, the order of `wsdl:input`/`wsdl:output`), and findings need the document and position the
|
|
7
|
+
* offending element actually came from.
|
|
8
|
+
*/
|
|
9
|
+
import { NS } from '../../../xml/namespaces.js';
|
|
10
|
+
import { getPosition } from '../../../xml/parse.js';
|
|
11
|
+
import { childElements, firstChildElement, optionalAttribute } from '../../../wsdl/dom-utils.js';
|
|
12
|
+
import { parseQName, qnameToString } from '../../../wsdl/qname.js';
|
|
13
|
+
/** The two WSDL SOAP binding namespaces, in the order they are probed. */
|
|
14
|
+
export const SOAP_BINDING_NAMESPACES = [NS.WSDL_SOAP11, NS.WSDL_SOAP12];
|
|
15
|
+
/** Every `wsdl:definitions` document in the bundle, in discovery order. */
|
|
16
|
+
export function wsdlDocuments(context) {
|
|
17
|
+
const views = [];
|
|
18
|
+
for (const doc of context.bundle.documents) {
|
|
19
|
+
const root = context.documents.get(doc.location)?.documentElement ?? null;
|
|
20
|
+
if (root !== null && root.namespaceURI === NS.WSDL && root.localName === 'definitions') {
|
|
21
|
+
views.push({ location: doc.location, definitions: root });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return views;
|
|
25
|
+
}
|
|
26
|
+
/** Every `xs:schema` element in the bundle: the inline ones first, then standalone XSD roots. */
|
|
27
|
+
export function schemaElements(context) {
|
|
28
|
+
const views = [];
|
|
29
|
+
for (const doc of context.bundle.documents) {
|
|
30
|
+
const root = context.documents.get(doc.location)?.documentElement ?? null;
|
|
31
|
+
if (root === null) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (root.namespaceURI === NS.WSDL && root.localName === 'definitions') {
|
|
35
|
+
const typesEl = firstChildElement(root, NS.WSDL, 'types');
|
|
36
|
+
if (typesEl !== undefined) {
|
|
37
|
+
for (const schema of childElements(typesEl, NS.XSD, 'schema')) {
|
|
38
|
+
views.push({ location: doc.location, schema });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (root.namespaceURI === NS.XSD && root.localName === 'schema') {
|
|
43
|
+
views.push({ location: doc.location, schema: root });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return views;
|
|
47
|
+
}
|
|
48
|
+
/** Every descendant element of `root` (excluding `root` itself), depth first. */
|
|
49
|
+
export function descendants(root) {
|
|
50
|
+
const out = [];
|
|
51
|
+
const visit = (parent) => {
|
|
52
|
+
let child = parent.firstChild;
|
|
53
|
+
while (child !== null) {
|
|
54
|
+
if (child.nodeType === 1) {
|
|
55
|
+
const element = child;
|
|
56
|
+
out.push(element);
|
|
57
|
+
visit(element);
|
|
58
|
+
}
|
|
59
|
+
child = child.nextSibling;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
visit(root);
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
/** The SOAP binding namespace a `wsdl:binding` uses, or `undefined` when it is not a SOAP binding. */
|
|
66
|
+
export function soapNamespaceOf(binding) {
|
|
67
|
+
return SOAP_BINDING_NAMESPACES.find((ns) => firstChildElement(binding, ns, 'binding') !== undefined);
|
|
68
|
+
}
|
|
69
|
+
/** Every `wsdl:binding` that is a SOAP binding, across the whole bundle. */
|
|
70
|
+
export function soapBindings(context) {
|
|
71
|
+
const views = [];
|
|
72
|
+
for (const doc of wsdlDocuments(context)) {
|
|
73
|
+
for (const binding of childElements(doc.definitions, NS.WSDL, 'binding')) {
|
|
74
|
+
const soapNs = soapNamespaceOf(binding);
|
|
75
|
+
const soapBinding = soapNs === undefined ? undefined : firstChildElement(binding, soapNs, 'binding');
|
|
76
|
+
if (soapNs !== undefined && soapBinding !== undefined) {
|
|
77
|
+
views.push({ location: doc.location, binding, soapNs, soapBinding });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return views;
|
|
82
|
+
}
|
|
83
|
+
/** The effective style of one binding operation: its own `soapbind:operation/@style`, else the binding's. */
|
|
84
|
+
export function operationStyle(view, operation) {
|
|
85
|
+
const soapOperation = firstChildElement(operation, view.soapNs, 'operation');
|
|
86
|
+
const own = soapOperation === undefined ? undefined : optionalAttribute(soapOperation, 'style');
|
|
87
|
+
if (own === 'rpc' || own === 'document') {
|
|
88
|
+
return own;
|
|
89
|
+
}
|
|
90
|
+
return optionalAttribute(view.soapBinding, 'style') === 'rpc' ? 'rpc' : 'document';
|
|
91
|
+
}
|
|
92
|
+
/** The `wsdl:input`/`wsdl:output` children of a binding operation, in document order. */
|
|
93
|
+
export function bindingMessages(operation) {
|
|
94
|
+
return [...childElements(operation, NS.WSDL, 'input'), ...childElements(operation, NS.WSDL, 'output')];
|
|
95
|
+
}
|
|
96
|
+
/** The `soapbind:body` of a binding `wsdl:input`/`wsdl:output`, if it declares one. */
|
|
97
|
+
export function soapBodyOf(message, soapNs) {
|
|
98
|
+
return firstChildElement(message, soapNs, 'body');
|
|
99
|
+
}
|
|
100
|
+
/** Resolves a QName-valued attribute against the in-scope prefixes of `element`. */
|
|
101
|
+
export function attributeQName(element, attribute, defaultNamespace) {
|
|
102
|
+
const raw = optionalAttribute(element, attribute);
|
|
103
|
+
if (raw === undefined) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
return parseQName(raw, element, defaultNamespace);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
// An unbound prefix is a well-formedness problem the WSDL parser reports; for the profile
|
|
111
|
+
// assertions the reference is simply unresolvable.
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/** The `targetNamespace` of the `wsdl:definitions` an element belongs to (empty string when absent). */
|
|
116
|
+
export function targetNamespaceOf(definitions) {
|
|
117
|
+
return optionalAttribute(definitions, 'targetNamespace') ?? '';
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Every namespace the description defines or imports: the `targetNamespace` of each
|
|
121
|
+
* `wsdl:definitions` and each `xs:schema` of the bundle, the `namespace` of each
|
|
122
|
+
* `wsdl:import`/`xs:import`, and the XML Schema namespace itself (always available to a
|
|
123
|
+
* description). This is the set R2101 and R2102 measure their QName references against.
|
|
124
|
+
*/
|
|
125
|
+
export function declaredNamespaces(context) {
|
|
126
|
+
const known = new Set([NS.XSD, ...context.schemaSet.namespaces]);
|
|
127
|
+
for (const doc of wsdlDocuments(context)) {
|
|
128
|
+
known.add(targetNamespaceOf(doc.definitions));
|
|
129
|
+
for (const importEl of childElements(doc.definitions, NS.WSDL, 'import')) {
|
|
130
|
+
const namespace = optionalAttribute(importEl, 'namespace');
|
|
131
|
+
if (namespace !== undefined) {
|
|
132
|
+
known.add(namespace);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (const view of schemaElements(context)) {
|
|
137
|
+
known.add(optionalAttribute(view.schema, 'targetNamespace') ?? '');
|
|
138
|
+
for (const importEl of childElements(view.schema, NS.XSD, 'import')) {
|
|
139
|
+
const namespace = optionalAttribute(importEl, 'namespace');
|
|
140
|
+
if (namespace !== undefined) {
|
|
141
|
+
known.add(namespace);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return known;
|
|
146
|
+
}
|
|
147
|
+
const indexCache = new WeakMap();
|
|
148
|
+
/** Indexes every `wsdl:message` and `wsdl:portType` of the bundle by expanded name (cached per context). */
|
|
149
|
+
export function wsdlIndex(context) {
|
|
150
|
+
const cached = indexCache.get(context);
|
|
151
|
+
if (cached !== undefined) {
|
|
152
|
+
return cached;
|
|
153
|
+
}
|
|
154
|
+
const messages = new Map();
|
|
155
|
+
const portTypes = new Map();
|
|
156
|
+
for (const doc of wsdlDocuments(context)) {
|
|
157
|
+
const tns = targetNamespaceOf(doc.definitions);
|
|
158
|
+
for (const [localName, target] of [
|
|
159
|
+
['message', messages],
|
|
160
|
+
['portType', portTypes],
|
|
161
|
+
]) {
|
|
162
|
+
for (const element of childElements(doc.definitions, NS.WSDL, localName)) {
|
|
163
|
+
const name = optionalAttribute(element, 'name');
|
|
164
|
+
if (name !== undefined) {
|
|
165
|
+
const key = qnameToString({ namespaceUri: tns, localName: name });
|
|
166
|
+
if (!target.has(key)) {
|
|
167
|
+
target.set(key, { location: doc.location, element });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const index = { messages, portTypes };
|
|
174
|
+
indexCache.set(context, index);
|
|
175
|
+
return index;
|
|
176
|
+
}
|
|
177
|
+
/** Looks a `wsdl:message` up by the QName an attribute of `element` refers to. */
|
|
178
|
+
export function referencedMessage(context, element, attribute, defaultNamespace) {
|
|
179
|
+
const qname = attributeQName(element, attribute, defaultNamespace);
|
|
180
|
+
return qname === undefined ? undefined : wsdlIndex(context).messages.get(qnameToString(qname));
|
|
181
|
+
}
|
|
182
|
+
/** The `wsdl:part` children of a `wsdl:message`. */
|
|
183
|
+
export function messageParts(message) {
|
|
184
|
+
return childElements(message, NS.WSDL, 'part');
|
|
185
|
+
}
|
|
186
|
+
/** Finds a `wsdl:part` of `message` by name. */
|
|
187
|
+
export function findPart(message, name) {
|
|
188
|
+
return messageParts(message).find((part) => optionalAttribute(part, 'name') === name);
|
|
189
|
+
}
|
|
190
|
+
/** A readable element path, using `@name` where an element has one and a position index otherwise. */
|
|
191
|
+
export function xpathOf(element) {
|
|
192
|
+
const steps = [];
|
|
193
|
+
let current = element;
|
|
194
|
+
while (current !== null && current.nodeType === 1) {
|
|
195
|
+
const name = optionalAttribute(current, 'name');
|
|
196
|
+
steps.unshift(`${current.localName ?? current.nodeName}${name !== undefined ? `[@name='${name}']` : ''}`);
|
|
197
|
+
const parent = current.parentNode;
|
|
198
|
+
current = parent !== null && parent.nodeType === 1 ? parent : null;
|
|
199
|
+
}
|
|
200
|
+
return `/${steps.join('/')}`;
|
|
201
|
+
}
|
|
202
|
+
/** Builds a finding pointing at `element` in the document at `location`. */
|
|
203
|
+
export function findingAt(location, element, message) {
|
|
204
|
+
const position = getPosition(element);
|
|
205
|
+
return {
|
|
206
|
+
message,
|
|
207
|
+
location: { document: location, ...(position !== undefined ? position : {}), xpath: xpathOf(element) },
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/** True when `value` is an absolute URI (a scheme followed by a scheme-specific part). */
|
|
211
|
+
export function isAbsoluteUri(value) {
|
|
212
|
+
return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(value);
|
|
213
|
+
}
|
|
214
|
+
/** Resolves a relative reference against a base location, returning `undefined` when it is not resolvable. */
|
|
215
|
+
export function resolveAgainst(reference, base) {
|
|
216
|
+
try {
|
|
217
|
+
return new URL(reference, base).toString();
|
|
218
|
+
}
|
|
219
|
+
catch {
|
|
220
|
+
return undefined;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/** Looks a bundled document up by the location one of its importers referenced. */
|
|
224
|
+
export function bundledDocumentFor(context, resolvedLocation) {
|
|
225
|
+
return context.bundle.documents.find((doc) => doc.location === resolvedLocation || doc.requestedLocation === resolvedLocation);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The names of `abstractMessage`'s parts that a `soapbind:header` or `soapbind:headerfault` of
|
|
229
|
+
* `operation` binds. A header names its message explicitly, so only the headers pointing at this
|
|
230
|
+
* very message count.
|
|
231
|
+
*/
|
|
232
|
+
function headerBoundPartNames(context, operation, soapNs, tns, abstractMessage) {
|
|
233
|
+
const names = new Set();
|
|
234
|
+
if (abstractMessage === undefined) {
|
|
235
|
+
return names;
|
|
236
|
+
}
|
|
237
|
+
for (const message of bindingMessages(operation)) {
|
|
238
|
+
for (const header of childElements(message, soapNs, 'header')) {
|
|
239
|
+
for (const element of [header, ...childElements(header, soapNs, 'headerfault')]) {
|
|
240
|
+
const referenced = referencedMessage(context, element, 'message', tns);
|
|
241
|
+
if (referenced?.element !== abstractMessage.element) {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
for (const name of (optionalAttribute(element, 'part') ?? '').split(/\s+/)) {
|
|
245
|
+
if (name.length > 0) {
|
|
246
|
+
names.add(name);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return names;
|
|
253
|
+
}
|
|
254
|
+
/** The `wsdl:portType` a binding refers to, when it resolves. */
|
|
255
|
+
export function portTypeOf(context, view, definitions) {
|
|
256
|
+
const qname = attributeQName(view.binding, 'type', targetNamespaceOf(definitions));
|
|
257
|
+
return qname === undefined ? undefined : wsdlIndex(context).portTypes.get(qnameToString(qname));
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Every side of one binding `wsdl:operation` a message can be bound on: its `wsdl:input`, its
|
|
261
|
+
* `wsdl:output`, and each of its `wsdl:fault`s (a binding operation may declare several, told
|
|
262
|
+
* apart by `@name`).
|
|
263
|
+
*/
|
|
264
|
+
function bindingSides(operation) {
|
|
265
|
+
const sides = [];
|
|
266
|
+
for (const direction of ['input', 'output']) {
|
|
267
|
+
const element = firstChildElement(operation, NS.WSDL, direction);
|
|
268
|
+
if (element !== undefined) {
|
|
269
|
+
sides.push([direction, element]);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
for (const fault of childElements(operation, NS.WSDL, 'fault')) {
|
|
273
|
+
sides.push(['fault', fault]);
|
|
274
|
+
}
|
|
275
|
+
return sides;
|
|
276
|
+
}
|
|
277
|
+
/** The abstract `wsdl:input`/`output`/`fault` matching one binding side, when the port type has one. */
|
|
278
|
+
function abstractSideFor(abstractOperation, direction, messageElement) {
|
|
279
|
+
if (direction !== 'fault') {
|
|
280
|
+
return firstChildElement(abstractOperation, NS.WSDL, direction);
|
|
281
|
+
}
|
|
282
|
+
// Faults are matched by name: an operation may declare more than one, and only the abstract
|
|
283
|
+
// fault of the same name carries the wsdl:message the binding fault actually binds.
|
|
284
|
+
const name = optionalAttribute(messageElement, 'name');
|
|
285
|
+
return childElements(abstractOperation, NS.WSDL, 'fault').find((candidate) => optionalAttribute(candidate, 'name') === name);
|
|
286
|
+
}
|
|
287
|
+
/** Joins every binding operation's input/output to the abstract message it binds. */
|
|
288
|
+
export function boundMessages(context) {
|
|
289
|
+
const views = [];
|
|
290
|
+
for (const doc of wsdlDocuments(context)) {
|
|
291
|
+
const tns = targetNamespaceOf(doc.definitions);
|
|
292
|
+
for (const binding of childElements(doc.definitions, NS.WSDL, 'binding')) {
|
|
293
|
+
const soapNs = soapNamespaceOf(binding);
|
|
294
|
+
const soapBinding = soapNs === undefined ? undefined : firstChildElement(binding, soapNs, 'binding');
|
|
295
|
+
if (soapNs === undefined || soapBinding === undefined) {
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
const bindingView = { location: doc.location, binding, soapNs, soapBinding };
|
|
299
|
+
const portType = portTypeOf(context, bindingView, doc.definitions);
|
|
300
|
+
for (const operation of childElements(binding, NS.WSDL, 'operation')) {
|
|
301
|
+
const operationName = optionalAttribute(operation, 'name');
|
|
302
|
+
const abstractOperation = portType === undefined || operationName === undefined
|
|
303
|
+
? undefined
|
|
304
|
+
: childElements(portType.element, NS.WSDL, 'operation').find((candidate) => optionalAttribute(candidate, 'name') === operationName);
|
|
305
|
+
for (const [direction, messageElement] of bindingSides(operation)) {
|
|
306
|
+
const abstractSide = abstractOperation === undefined ? undefined : abstractSideFor(abstractOperation, direction, messageElement);
|
|
307
|
+
const abstractMessage = abstractSide === undefined ? undefined : referencedMessage(context, abstractSide, 'message', tns);
|
|
308
|
+
const parts = abstractMessage === undefined ? [] : messageParts(abstractMessage.element);
|
|
309
|
+
const soapBody = soapBodyOf(messageElement, soapNs);
|
|
310
|
+
const rawParts = soapBody === undefined ? undefined : optionalAttribute(soapBody, 'parts');
|
|
311
|
+
const declaredParts = rawParts?.split(/\s+/).filter((name) => name.length > 0);
|
|
312
|
+
const boundParts = direction === 'fault'
|
|
313
|
+
? []
|
|
314
|
+
: declaredParts === undefined
|
|
315
|
+
? parts
|
|
316
|
+
: parts.filter((part) => declaredParts.includes(optionalAttribute(part, 'name') ?? ''));
|
|
317
|
+
const headerNames = headerBoundPartNames(context, operation, soapNs, tns, abstractMessage);
|
|
318
|
+
const faultBound = direction === 'fault' && firstChildElement(messageElement, soapNs, 'fault') !== undefined;
|
|
319
|
+
const soapBoundParts = faultBound
|
|
320
|
+
? parts
|
|
321
|
+
: parts.filter((part) => boundParts.includes(part) || headerNames.has(optionalAttribute(part, 'name') ?? ''));
|
|
322
|
+
views.push({
|
|
323
|
+
location: doc.location,
|
|
324
|
+
bindingView,
|
|
325
|
+
operation,
|
|
326
|
+
direction,
|
|
327
|
+
messageElement,
|
|
328
|
+
...(soapBody !== undefined ? { soapBody } : {}),
|
|
329
|
+
style: operationStyle(bindingView, operation),
|
|
330
|
+
...(abstractMessage !== undefined ? { abstractMessage } : {}),
|
|
331
|
+
parts,
|
|
332
|
+
...(declaredParts !== undefined ? { declaredParts } : {}),
|
|
333
|
+
boundParts,
|
|
334
|
+
soapBoundParts,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return views;
|
|
341
|
+
}
|
|
342
|
+
/** Every `soapbind:body`/`header`/`headerfault`/`fault` element of every SOAP binding. */
|
|
343
|
+
export function soapExtensions(context) {
|
|
344
|
+
const views = [];
|
|
345
|
+
for (const bindingView of soapBindings(context)) {
|
|
346
|
+
const { location, soapNs } = bindingView;
|
|
347
|
+
for (const operation of childElements(bindingView.binding, NS.WSDL, 'operation')) {
|
|
348
|
+
const style = operationStyle(bindingView, operation);
|
|
349
|
+
const base = { location, bindingView, operation, style };
|
|
350
|
+
for (const message of bindingMessages(operation)) {
|
|
351
|
+
const body = soapBodyOf(message, soapNs);
|
|
352
|
+
if (body !== undefined) {
|
|
353
|
+
views.push({ ...base, element: body, kind: 'body' });
|
|
354
|
+
}
|
|
355
|
+
for (const header of childElements(message, soapNs, 'header')) {
|
|
356
|
+
views.push({ ...base, element: header, kind: 'header' });
|
|
357
|
+
for (const headerfault of childElements(header, soapNs, 'headerfault')) {
|
|
358
|
+
views.push({ ...base, element: headerfault, kind: 'headerfault' });
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
for (const wsdlFault of childElements(operation, NS.WSDL, 'fault')) {
|
|
363
|
+
for (const fault of childElements(wsdlFault, soapNs, 'fault')) {
|
|
364
|
+
views.push({ ...base, element: fault, kind: 'fault', wsdlFault });
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return views;
|
|
370
|
+
}
|
|
371
|
+
/** Every `soapbind:address` element in the bundle. */
|
|
372
|
+
export function soapAddresses(context) {
|
|
373
|
+
const views = [];
|
|
374
|
+
for (const doc of wsdlDocuments(context)) {
|
|
375
|
+
for (const service of childElements(doc.definitions, NS.WSDL, 'service')) {
|
|
376
|
+
for (const port of childElements(service, NS.WSDL, 'port')) {
|
|
377
|
+
for (const ns of SOAP_BINDING_NAMESPACES) {
|
|
378
|
+
const address = firstChildElement(port, ns, 'address');
|
|
379
|
+
if (address !== undefined) {
|
|
380
|
+
views.push({ location: doc.location, port, address });
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return views;
|
|
387
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The WS-I Basic Profile 1.1 WSDL assertion catalogue.
|
|
3
|
+
*
|
|
4
|
+
* This array is the single source of truth: `runWsdlAssertions` evaluates it in order, and
|
|
5
|
+
* `scripts/wsi-docs.ts` generates `docs/ws-i-assertions.md` from it. Adding an assertion means
|
|
6
|
+
* adding a module here — nothing else needs to know.
|
|
7
|
+
*/
|
|
8
|
+
import type { WsiAssertion } from '../types.js';
|
|
9
|
+
import { R2001 } from './r2001.js';
|
|
10
|
+
import { R2002 } from './r2002.js';
|
|
11
|
+
import { R2003 } from './r2003.js';
|
|
12
|
+
import { R2005 } from './r2005.js';
|
|
13
|
+
import { R2101 } from './r2101.js';
|
|
14
|
+
import { R2102 } from './r2102.js';
|
|
15
|
+
import { R2105 } from './r2105.js';
|
|
16
|
+
import { R2110 } from './r2110.js';
|
|
17
|
+
import { R2111 } from './r2111.js';
|
|
18
|
+
import { R2112 } from './r2112.js';
|
|
19
|
+
import { R2201 } from './r2201.js';
|
|
20
|
+
import { R2203 } from './r2203.js';
|
|
21
|
+
import { R2204 } from './r2204.js';
|
|
22
|
+
import { R2205 } from './r2205.js';
|
|
23
|
+
import { R2206 } from './r2206.js';
|
|
24
|
+
import { R2209 } from './r2209.js';
|
|
25
|
+
import { R2210 } from './r2210.js';
|
|
26
|
+
import { R2303 } from './r2303.js';
|
|
27
|
+
import { R2304 } from './r2304.js';
|
|
28
|
+
import { R2401 } from './r2401.js';
|
|
29
|
+
import { R2701 } from './r2701.js';
|
|
30
|
+
import { R2702 } from './r2702.js';
|
|
31
|
+
import { R2705 } from './r2705.js';
|
|
32
|
+
import { R2706 } from './r2706.js';
|
|
33
|
+
import { R2710 } from './r2710.js';
|
|
34
|
+
import { R2716 } from './r2716.js';
|
|
35
|
+
import { R2717 } from './r2717.js';
|
|
36
|
+
import { R2718 } from './r2718.js';
|
|
37
|
+
import { R2720 } from './r2720.js';
|
|
38
|
+
import { R2721 } from './r2721.js';
|
|
39
|
+
import { R2722 } from './r2722.js';
|
|
40
|
+
import { R2801 } from './r2801.js';
|
|
41
|
+
import { R2803 } from './r2803.js';
|
|
42
|
+
/** Every implemented WSDL assertion, in profile id order. */
|
|
43
|
+
export declare const WSI_WSDL_ASSERTIONS: readonly WsiAssertion[];
|
|
44
|
+
export { R2001, R2002, R2003, R2005, R2101, R2102, R2105, R2110, R2111, R2112, R2201, R2203, R2204, R2205, R2206, R2209, R2210, R2303, R2304, R2401, R2701, R2702, R2705, R2706, R2710, R2716, R2717, R2718, R2720, R2721, R2722, R2801, R2803, };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The WS-I Basic Profile 1.1 WSDL assertion catalogue.
|
|
3
|
+
*
|
|
4
|
+
* This array is the single source of truth: `runWsdlAssertions` evaluates it in order, and
|
|
5
|
+
* `scripts/wsi-docs.ts` generates `docs/ws-i-assertions.md` from it. Adding an assertion means
|
|
6
|
+
* adding a module here — nothing else needs to know.
|
|
7
|
+
*/
|
|
8
|
+
import { R2001 } from './r2001.js';
|
|
9
|
+
import { R2002 } from './r2002.js';
|
|
10
|
+
import { R2003 } from './r2003.js';
|
|
11
|
+
import { R2005 } from './r2005.js';
|
|
12
|
+
import { R2101 } from './r2101.js';
|
|
13
|
+
import { R2102 } from './r2102.js';
|
|
14
|
+
import { R2105 } from './r2105.js';
|
|
15
|
+
import { R2110 } from './r2110.js';
|
|
16
|
+
import { R2111 } from './r2111.js';
|
|
17
|
+
import { R2112 } from './r2112.js';
|
|
18
|
+
import { R2201 } from './r2201.js';
|
|
19
|
+
import { R2203 } from './r2203.js';
|
|
20
|
+
import { R2204 } from './r2204.js';
|
|
21
|
+
import { R2205 } from './r2205.js';
|
|
22
|
+
import { R2206 } from './r2206.js';
|
|
23
|
+
import { R2209 } from './r2209.js';
|
|
24
|
+
import { R2210 } from './r2210.js';
|
|
25
|
+
import { R2303 } from './r2303.js';
|
|
26
|
+
import { R2304 } from './r2304.js';
|
|
27
|
+
import { R2401 } from './r2401.js';
|
|
28
|
+
import { R2701 } from './r2701.js';
|
|
29
|
+
import { R2702 } from './r2702.js';
|
|
30
|
+
import { R2705 } from './r2705.js';
|
|
31
|
+
import { R2706 } from './r2706.js';
|
|
32
|
+
import { R2710 } from './r2710.js';
|
|
33
|
+
import { R2716 } from './r2716.js';
|
|
34
|
+
import { R2717 } from './r2717.js';
|
|
35
|
+
import { R2718 } from './r2718.js';
|
|
36
|
+
import { R2720 } from './r2720.js';
|
|
37
|
+
import { R2721 } from './r2721.js';
|
|
38
|
+
import { R2722 } from './r2722.js';
|
|
39
|
+
import { R2801 } from './r2801.js';
|
|
40
|
+
import { R2803 } from './r2803.js';
|
|
41
|
+
/** Every implemented WSDL assertion, in profile id order. */
|
|
42
|
+
export const WSI_WSDL_ASSERTIONS = Object.freeze([
|
|
43
|
+
R2001,
|
|
44
|
+
R2002,
|
|
45
|
+
R2003,
|
|
46
|
+
R2005,
|
|
47
|
+
R2101,
|
|
48
|
+
R2102,
|
|
49
|
+
R2105,
|
|
50
|
+
R2110,
|
|
51
|
+
R2111,
|
|
52
|
+
R2112,
|
|
53
|
+
R2201,
|
|
54
|
+
R2203,
|
|
55
|
+
R2204,
|
|
56
|
+
R2205,
|
|
57
|
+
R2206,
|
|
58
|
+
R2209,
|
|
59
|
+
R2210,
|
|
60
|
+
R2303,
|
|
61
|
+
R2304,
|
|
62
|
+
R2401,
|
|
63
|
+
R2701,
|
|
64
|
+
R2702,
|
|
65
|
+
R2705,
|
|
66
|
+
R2706,
|
|
67
|
+
R2710,
|
|
68
|
+
R2716,
|
|
69
|
+
R2717,
|
|
70
|
+
R2718,
|
|
71
|
+
R2720,
|
|
72
|
+
R2721,
|
|
73
|
+
R2722,
|
|
74
|
+
R2801,
|
|
75
|
+
R2803,
|
|
76
|
+
]);
|
|
77
|
+
export { R2001, R2002, R2003, R2005, R2101, R2102, R2105, R2110, R2111, R2112, R2201, R2203, R2204, R2205, R2206, R2209, R2210, R2303, R2304, R2401, R2701, R2702, R2705, R2706, R2710, R2716, R2717, R2718, R2720, R2721, R2722, R2801, R2803, };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared DOM and HTTP navigation for the message-level WS-I assertions.
|
|
3
|
+
*
|
|
4
|
+
* The message assertions look at the bytes that actually went on the wire, so they work on the
|
|
5
|
+
* parsed envelope plus the HTTP metadata rather than on any model: the profile constrains
|
|
6
|
+
* constructs (a `DOCTYPE`, a processing instruction, an attribute nobody models) that a parsed
|
|
7
|
+
* SOAP message would otherwise normalise away.
|
|
8
|
+
*/
|
|
9
|
+
import type { Element } from '@xmldom/xmldom';
|
|
10
|
+
import type { WsiFinding, WsiMessageContext, WsiMessageView } from '../../types.js';
|
|
11
|
+
/** The envelope namespace a SOAP version uses. */
|
|
12
|
+
export declare const SOAP_ENVELOPE_NS: Readonly<Record<'1.1' | '1.2', string>>;
|
|
13
|
+
/** The encoding namespace a SOAP version uses. */
|
|
14
|
+
export declare const SOAP_ENCODING_NS: Readonly<Record<'1.1' | '1.2', string>>;
|
|
15
|
+
/** Every message half that actually parsed into a `soap:Envelope`. */
|
|
16
|
+
export declare function envelopes(context: WsiMessageContext): readonly WsiMessageView[];
|
|
17
|
+
/** Builds a finding pointing at `element`, attributed to the half it was found in. */
|
|
18
|
+
export declare function messageFinding(view: WsiMessageView, element: Element, message: string): WsiFinding;
|
|
19
|
+
/** Builds a finding about a half as a whole (an HTTP header, a missing envelope). */
|
|
20
|
+
export declare function viewFinding(view: WsiMessageView, message: string): WsiFinding;
|
|
21
|
+
/** The envelope element and every element beneath it, in document order. */
|
|
22
|
+
export declare function envelopeElements(view: WsiMessageView): readonly Element[];
|
|
23
|
+
/** The element children of `parent`, in document order (whatever their namespace). */
|
|
24
|
+
export declare function elementChildren(parent: Element): readonly Element[];
|
|
25
|
+
/** The element children of `soap:Envelope`, in document order (whatever their namespace). */
|
|
26
|
+
export declare function envelopeChildren(view: WsiMessageView): readonly Element[];
|
|
27
|
+
/** The `soap:Body` of a half, when it has exactly the one the profile requires. */
|
|
28
|
+
export declare function bodyOf(view: WsiMessageView): Element | undefined;
|
|
29
|
+
/** The `soap:Header` of a half, when it declares one. */
|
|
30
|
+
export declare function headerOf(view: WsiMessageView): Element | undefined;
|
|
31
|
+
/** The `soap:Fault` carried directly by `soap:Body`, when the half is a fault. */
|
|
32
|
+
export declare function faultOf(view: WsiMessageView): Element | undefined;
|
|
33
|
+
/** The element children of `soap:Body`, in document order. */
|
|
34
|
+
export declare function bodyChildren(view: WsiMessageView): readonly Element[];
|
|
35
|
+
/** Every attribute of `element`, as a plain list (xmldom's `attributes` is a live NamedNodeMap). */
|
|
36
|
+
export declare function attributesOf(element: Element): readonly {
|
|
37
|
+
name: string;
|
|
38
|
+
localName: string;
|
|
39
|
+
namespaceUri: string | null;
|
|
40
|
+
value: string;
|
|
41
|
+
}[];
|
|
42
|
+
/** The media type of a `Content-Type` value, lower-cased and stripped of its parameters. */
|
|
43
|
+
export declare function mediaTypeOf(contentType: string): string;
|
|
44
|
+
/** The `charset` parameter of a `Content-Type` value, when it states one. */
|
|
45
|
+
export declare function charsetOf(contentType: string): string | undefined;
|
|
46
|
+
/** One header of a half, by its (already lower-cased) name. */
|
|
47
|
+
export declare function headerValue(view: WsiMessageView, name: string): string | undefined;
|
|
48
|
+
/** The prefixes in scope on `element`, mapped to the namespace they are bound to. */
|
|
49
|
+
export declare function inScopePrefixes(element: Element): ReadonlyMap<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* The first unqualified child element of `parent` with this local name. SOAP 1.1 declares the
|
|
52
|
+
* fault's children in no namespace, and xmldom reports that as a `null` `namespaceURI`, which
|
|
53
|
+
* `childElements(parent, '', name)` does not match.
|
|
54
|
+
*/
|
|
55
|
+
export declare function unqualifiedChild(parent: Element, localName: string): Element | undefined;
|
|
56
|
+
/** Every `soap:Header` block (its element children), in document order. */
|
|
57
|
+
export declare function headerBlocks(view: WsiMessageView): readonly Element[];
|
|
58
|
+
/** The `soap:Body` children of a half, skipping the `soap:Fault` (which has its own rules). */
|
|
59
|
+
export declare function partAccessors(view: WsiMessageView): readonly Element[];
|
|
60
|
+
/** The number of `soap:Body` elements directly under `soap:Envelope`. */
|
|
61
|
+
export declare function bodyCount(view: WsiMessageView): number;
|
|
62
|
+
/** The number of `soap:Header` elements directly under `soap:Envelope`. */
|
|
63
|
+
export declare function headerCount(view: WsiMessageView): number;
|