@goast/typescript 0.4.3 → 0.4.4
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 +21 -21
- package/README.md +52 -52
- package/assets/client/angular/angular-service.utils.ts +82 -82
- package/assets/client/angular/request-builder.ts +377 -377
- package/assets/client/fetch/fetch-client.utils.ts +52 -52
- package/assets/client/k6/request-builder.js +418 -418
- package/assets/stubs/easy-network-stub/easy-network-stub.utils.ts +259 -259
- package/esm/_dnt.test_polyfills.d.ts +29 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/_dnt.test_polyfills.js +31 -0
- package/esm/_dnt.test_shims.d.ts +6 -0
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/_dnt.test_shims.js +61 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.d.ts +17 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.js +183 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.d.ts +35 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.js +22 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +25 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +32 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +42 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +24 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +57 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +20 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +29 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +14 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +43 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +17 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +26 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.js +13 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +46 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +161 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +6 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.js +29 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +9 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.js +191 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.js +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +3 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +12 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +34 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.js +714 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +11 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +10 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.js +10 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +843 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.js +3 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +9 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.js +218 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +60 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.js +523 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +29 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.js +85 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +86 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.js +88 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +199 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +37 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +207 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +2 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts +15 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.js +35 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +79 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +380 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +738 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.js +654 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.d.ts +674 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.js +1083 -0
- package/esm/src/assets.js +1 -1
- package/esm/src/ast/nodes/argument.test.d.ts +2 -0
- package/esm/src/ast/nodes/argument.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/argument.test.js +34 -0
- package/esm/src/ast/nodes/array-type.test.d.ts +2 -0
- package/esm/src/ast/nodes/array-type.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/array-type.test.js +26 -0
- package/esm/src/ast/nodes/arrow-function.test.d.ts +2 -0
- package/esm/src/ast/nodes/arrow-function.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/arrow-function.test.js +62 -0
- package/esm/src/ast/nodes/class.test.d.ts +2 -0
- package/esm/src/ast/nodes/class.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/class.test.js +150 -0
- package/esm/src/ast/nodes/constructor-parameter.test.d.ts +2 -0
- package/esm/src/ast/nodes/constructor-parameter.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/constructor-parameter.test.js +99 -0
- package/esm/src/ast/nodes/constructor.test.d.ts +2 -0
- package/esm/src/ast/nodes/constructor.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/constructor.test.js +102 -0
- package/esm/src/ast/nodes/decorator.test.d.ts +2 -0
- package/esm/src/ast/nodes/decorator.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/decorator.test.js +47 -0
- package/esm/src/ast/nodes/doc-tag.test.d.ts +2 -0
- package/esm/src/ast/nodes/doc-tag.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/doc-tag.test.js +30 -0
- package/esm/src/ast/nodes/doc.test.d.ts +2 -0
- package/esm/src/ast/nodes/doc.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/doc.test.js +31 -0
- package/esm/src/ast/nodes/enum-value.test.d.ts +2 -0
- package/esm/src/ast/nodes/enum-value.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/enum-value.test.js +52 -0
- package/esm/src/ast/nodes/enum.test.d.ts +2 -0
- package/esm/src/ast/nodes/enum.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/enum.test.js +66 -0
- package/esm/src/ast/nodes/export.test.d.ts +2 -0
- package/esm/src/ast/nodes/export.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/export.test.js +22 -0
- package/esm/src/ast/nodes/function-type.test.d.ts +2 -0
- package/esm/src/ast/nodes/function-type.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/function-type.test.js +48 -0
- package/esm/src/ast/nodes/function.test.d.ts +2 -0
- package/esm/src/ast/nodes/function.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/function.test.js +108 -0
- package/esm/src/ast/nodes/generic-parameter.test.d.ts +2 -0
- package/esm/src/ast/nodes/generic-parameter.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/generic-parameter.test.js +70 -0
- package/esm/src/ast/nodes/indexer.test.d.ts +2 -0
- package/esm/src/ast/nodes/indexer.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/indexer.test.js +32 -0
- package/esm/src/ast/nodes/interface.test.d.ts +2 -0
- package/esm/src/ast/nodes/interface.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/interface.test.js +115 -0
- package/esm/src/ast/nodes/intersection-type.test.d.ts +2 -0
- package/esm/src/ast/nodes/intersection-type.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/intersection-type.test.js +38 -0
- package/esm/src/ast/nodes/method.test.d.ts +2 -0
- package/esm/src/ast/nodes/method.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/method.test.js +148 -0
- package/esm/src/ast/nodes/object-type.test.d.ts +2 -0
- package/esm/src/ast/nodes/object-type.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/object-type.test.js +30 -0
- package/esm/src/ast/nodes/object.test.d.ts +2 -0
- package/esm/src/ast/nodes/object.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/object.test.js +30 -0
- package/esm/src/ast/nodes/parameter.test.d.ts +2 -0
- package/esm/src/ast/nodes/parameter.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/parameter.test.js +71 -0
- package/esm/src/ast/nodes/property-accessor.test.d.ts +2 -0
- package/esm/src/ast/nodes/property-accessor.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/property-accessor.test.js +102 -0
- package/esm/src/ast/nodes/property.test.d.ts +2 -0
- package/esm/src/ast/nodes/property.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/property.test.js +89 -0
- package/esm/src/ast/nodes/reference.test.d.ts +2 -0
- package/esm/src/ast/nodes/reference.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/reference.test.js +31 -0
- package/esm/src/ast/nodes/string.test.d.ts +2 -0
- package/esm/src/ast/nodes/string.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/string.test.js +28 -0
- package/esm/src/ast/nodes/tuple.test.d.ts +2 -0
- package/esm/src/ast/nodes/tuple.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/tuple.test.js +33 -0
- package/esm/src/ast/nodes/type-alias.test.d.ts +2 -0
- package/esm/src/ast/nodes/type-alias.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/type-alias.test.js +27 -0
- package/esm/src/ast/nodes/union-type.test.d.ts +2 -0
- package/esm/src/ast/nodes/union-type.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/union-type.test.js +38 -0
- package/esm/src/ast/nodes/variable.test.d.ts +2 -0
- package/esm/src/ast/nodes/variable.test.d.ts.map +1 -0
- package/esm/src/ast/nodes/variable.test.js +38 -0
- package/esm/src/generators/services/angular-services/angular-service-generator.js +9 -9
- package/esm/src/generators/services/easy-network-stub/easy-network-stub-generator.js +9 -9
- package/esm/src/generators/services/fetch-clients/fetch-client-generator.js +2 -2
- package/esm/src/generators/services/k6-clients/k6-client-generator.js +6 -6
- package/esm/src/import-collection.test.d.ts +2 -0
- package/esm/src/import-collection.test.d.ts.map +1 -0
- package/esm/src/import-collection.test.js +64 -0
- package/esm/tests/openapi-models.test.d.ts +2 -0
- package/esm/tests/openapi-models.test.d.ts.map +1 -0
- package/esm/tests/openapi-models.test.js +45 -0
- package/package.json +2 -2
- package/script/_dnt.test_polyfills.d.ts +29 -0
- package/script/_dnt.test_polyfills.d.ts.map +1 -0
- package/script/_dnt.test_polyfills.js +32 -0
- package/script/_dnt.test_shims.d.ts +6 -0
- package/script/_dnt.test_shims.d.ts.map +1 -0
- package/script/_dnt.test_shims.js +65 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.d.ts +17 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.js +187 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.d.ts +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.js +61 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/false.js +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.js +57 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +42 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +24 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +60 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +20 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +32 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +14 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +46 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +17 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +29 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.js +18 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +46 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +183 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +6 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.js +33 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +15 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +9 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.js +194 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.js +15 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +3 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +17 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +34 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.js +748 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +11 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +14 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.js +14 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +843 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.js +4 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +9 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.js +226 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +60 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.js +527 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +29 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.js +88 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +86 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.js +91 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +160 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +204 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +116 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +284 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +186 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.js +41 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +220 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts +15 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.js +41 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +79 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +385 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +738 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.js +665 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.d.ts +674 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.js +1102 -0
- package/script/src/assets.js +1 -1
- package/script/src/ast/nodes/argument.test.d.ts +2 -0
- package/script/src/ast/nodes/argument.test.d.ts.map +1 -0
- package/script/src/ast/nodes/argument.test.js +36 -0
- package/script/src/ast/nodes/array-type.test.d.ts +2 -0
- package/script/src/ast/nodes/array-type.test.d.ts.map +1 -0
- package/script/src/ast/nodes/array-type.test.js +28 -0
- package/script/src/ast/nodes/arrow-function.test.d.ts +2 -0
- package/script/src/ast/nodes/arrow-function.test.d.ts.map +1 -0
- package/script/src/ast/nodes/arrow-function.test.js +64 -0
- package/script/src/ast/nodes/class.test.d.ts +2 -0
- package/script/src/ast/nodes/class.test.d.ts.map +1 -0
- package/script/src/ast/nodes/class.test.js +152 -0
- package/script/src/ast/nodes/constructor-parameter.test.d.ts +2 -0
- package/script/src/ast/nodes/constructor-parameter.test.d.ts.map +1 -0
- package/script/src/ast/nodes/constructor-parameter.test.js +101 -0
- package/script/src/ast/nodes/constructor.test.d.ts +2 -0
- package/script/src/ast/nodes/constructor.test.d.ts.map +1 -0
- package/script/src/ast/nodes/constructor.test.js +104 -0
- package/script/src/ast/nodes/decorator.test.d.ts +2 -0
- package/script/src/ast/nodes/decorator.test.d.ts.map +1 -0
- package/script/src/ast/nodes/decorator.test.js +49 -0
- package/script/src/ast/nodes/doc-tag.test.d.ts +2 -0
- package/script/src/ast/nodes/doc-tag.test.d.ts.map +1 -0
- package/script/src/ast/nodes/doc-tag.test.js +32 -0
- package/script/src/ast/nodes/doc.test.d.ts +2 -0
- package/script/src/ast/nodes/doc.test.d.ts.map +1 -0
- package/script/src/ast/nodes/doc.test.js +33 -0
- package/script/src/ast/nodes/enum-value.test.d.ts +2 -0
- package/script/src/ast/nodes/enum-value.test.d.ts.map +1 -0
- package/script/src/ast/nodes/enum-value.test.js +54 -0
- package/script/src/ast/nodes/enum.test.d.ts +2 -0
- package/script/src/ast/nodes/enum.test.d.ts.map +1 -0
- package/script/src/ast/nodes/enum.test.js +68 -0
- package/script/src/ast/nodes/export.test.d.ts +2 -0
- package/script/src/ast/nodes/export.test.d.ts.map +1 -0
- package/script/src/ast/nodes/export.test.js +24 -0
- package/script/src/ast/nodes/function-type.test.d.ts +2 -0
- package/script/src/ast/nodes/function-type.test.d.ts.map +1 -0
- package/script/src/ast/nodes/function-type.test.js +50 -0
- package/script/src/ast/nodes/function.test.d.ts +2 -0
- package/script/src/ast/nodes/function.test.d.ts.map +1 -0
- package/script/src/ast/nodes/function.test.js +110 -0
- package/script/src/ast/nodes/generic-parameter.test.d.ts +2 -0
- package/script/src/ast/nodes/generic-parameter.test.d.ts.map +1 -0
- package/script/src/ast/nodes/generic-parameter.test.js +72 -0
- package/script/src/ast/nodes/indexer.test.d.ts +2 -0
- package/script/src/ast/nodes/indexer.test.d.ts.map +1 -0
- package/script/src/ast/nodes/indexer.test.js +34 -0
- package/script/src/ast/nodes/interface.test.d.ts +2 -0
- package/script/src/ast/nodes/interface.test.d.ts.map +1 -0
- package/script/src/ast/nodes/interface.test.js +117 -0
- package/script/src/ast/nodes/intersection-type.test.d.ts +2 -0
- package/script/src/ast/nodes/intersection-type.test.d.ts.map +1 -0
- package/script/src/ast/nodes/intersection-type.test.js +40 -0
- package/script/src/ast/nodes/method.test.d.ts +2 -0
- package/script/src/ast/nodes/method.test.d.ts.map +1 -0
- package/script/src/ast/nodes/method.test.js +150 -0
- package/script/src/ast/nodes/object-type.test.d.ts +2 -0
- package/script/src/ast/nodes/object-type.test.d.ts.map +1 -0
- package/script/src/ast/nodes/object-type.test.js +32 -0
- package/script/src/ast/nodes/object.test.d.ts +2 -0
- package/script/src/ast/nodes/object.test.d.ts.map +1 -0
- package/script/src/ast/nodes/object.test.js +32 -0
- package/script/src/ast/nodes/parameter.test.d.ts +2 -0
- package/script/src/ast/nodes/parameter.test.d.ts.map +1 -0
- package/script/src/ast/nodes/parameter.test.js +73 -0
- package/script/src/ast/nodes/property-accessor.test.d.ts +2 -0
- package/script/src/ast/nodes/property-accessor.test.d.ts.map +1 -0
- package/script/src/ast/nodes/property-accessor.test.js +104 -0
- package/script/src/ast/nodes/property.test.d.ts +2 -0
- package/script/src/ast/nodes/property.test.d.ts.map +1 -0
- package/script/src/ast/nodes/property.test.js +91 -0
- package/script/src/ast/nodes/reference.test.d.ts +2 -0
- package/script/src/ast/nodes/reference.test.d.ts.map +1 -0
- package/script/src/ast/nodes/reference.test.js +33 -0
- package/script/src/ast/nodes/string.test.d.ts +2 -0
- package/script/src/ast/nodes/string.test.d.ts.map +1 -0
- package/script/src/ast/nodes/string.test.js +30 -0
- package/script/src/ast/nodes/tuple.test.d.ts +2 -0
- package/script/src/ast/nodes/tuple.test.d.ts.map +1 -0
- package/script/src/ast/nodes/tuple.test.js +35 -0
- package/script/src/ast/nodes/type-alias.test.d.ts +2 -0
- package/script/src/ast/nodes/type-alias.test.d.ts.map +1 -0
- package/script/src/ast/nodes/type-alias.test.js +29 -0
- package/script/src/ast/nodes/union-type.test.d.ts +2 -0
- package/script/src/ast/nodes/union-type.test.d.ts.map +1 -0
- package/script/src/ast/nodes/union-type.test.js +40 -0
- package/script/src/ast/nodes/variable.test.d.ts +2 -0
- package/script/src/ast/nodes/variable.test.d.ts.map +1 -0
- package/script/src/ast/nodes/variable.test.js +40 -0
- package/script/src/generators/services/angular-services/angular-service-generator.js +9 -9
- package/script/src/generators/services/easy-network-stub/easy-network-stub-generator.js +9 -9
- package/script/src/generators/services/fetch-clients/fetch-client-generator.js +2 -2
- package/script/src/generators/services/k6-clients/k6-client-generator.js +6 -6
- package/script/src/import-collection.test.d.ts +2 -0
- package/script/src/import-collection.test.d.ts.map +1 -0
- package/script/src/import-collection.test.js +66 -0
- package/script/tests/openapi-models.test.d.ts +2 -0
- package/script/tests/openapi-models.test.d.ts.map +1 -0
- package/script/tests/openapi-models.test.js +48 -0
- package/src/_dnt.test_polyfills.ts +70 -0
- package/src/_dnt.test_shims.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/assertion_error.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/equal.ts +210 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/equals.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/false.ts +26 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/instance_of.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/is_error.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/not_instance_of.ts +33 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/not_match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.ts +42 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/rejects.ts +123 -0
- package/src/deps/jsr.io/@std/assert/1.0.11/strict_equals.ts +67 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_equals.ts +38 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.ts +54 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.ts +35 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_assertions.ts +18 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.ts +198 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_build_message.ts +51 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.ts +19 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_equal.ts +230 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_extend.ts +16 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_inspect_args.ts +15 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_matchers.ts +1028 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_mock_util.ts +22 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_serializer.ts +15 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_types.ts +923 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/_utils.ts +283 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/expect.ts +620 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/fn.ts +91 -0
- package/src/deps/jsr.io/@std/expect/1.0.12/mod.ts +89 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +214 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
- package/src/deps/jsr.io/@std/testing/1.0.9/_mock_utils.ts +43 -0
- package/src/deps/jsr.io/@std/testing/1.0.9/_test_suite.ts +448 -0
- package/src/deps/jsr.io/@std/testing/1.0.9/bdd.ts +1288 -0
- package/src/deps/jsr.io/@std/testing/1.0.9/mock.ts +1807 -0
- package/src/mod.ts +7 -0
- package/src/src/assets.ts +9 -0
- package/src/src/ast/_index.ts +54 -0
- package/src/src/ast/common.ts +1 -0
- package/src/src/ast/index.ts +1 -0
- package/src/src/ast/node.ts +10 -0
- package/src/src/ast/nodes/argument.test.ts +43 -0
- package/src/src/ast/nodes/argument.ts +40 -0
- package/src/src/ast/nodes/array-type.test.ts +34 -0
- package/src/src/ast/nodes/array-type.ts +49 -0
- package/src/src/ast/nodes/arrow-function.test.ts +79 -0
- package/src/src/ast/nodes/arrow-function.ts +91 -0
- package/src/src/ast/nodes/call.ts +55 -0
- package/src/src/ast/nodes/class.test.ts +185 -0
- package/src/src/ast/nodes/class.ts +133 -0
- package/src/src/ast/nodes/constructor-parameter.test.ts +122 -0
- package/src/src/ast/nodes/constructor-parameter.ts +70 -0
- package/src/src/ast/nodes/constructor.test.ts +131 -0
- package/src/src/ast/nodes/constructor.ts +77 -0
- package/src/src/ast/nodes/decorator.test.ts +59 -0
- package/src/src/ast/nodes/decorator.ts +76 -0
- package/src/src/ast/nodes/doc-tag.test.ts +40 -0
- package/src/src/ast/nodes/doc-tag.ts +291 -0
- package/src/src/ast/nodes/doc.test.ts +40 -0
- package/src/src/ast/nodes/doc.ts +102 -0
- package/src/src/ast/nodes/enum-value.test.ts +66 -0
- package/src/src/ast/nodes/enum-value.ts +72 -0
- package/src/src/ast/nodes/enum.test.ts +85 -0
- package/src/src/ast/nodes/enum.ts +77 -0
- package/src/src/ast/nodes/export.test.ts +29 -0
- package/src/src/ast/nodes/export.ts +54 -0
- package/src/src/ast/nodes/function-type.test.ts +61 -0
- package/src/src/ast/nodes/function-type.ts +60 -0
- package/src/src/ast/nodes/function.test.ts +135 -0
- package/src/src/ast/nodes/function.ts +107 -0
- package/src/src/ast/nodes/generic-parameter.test.ts +86 -0
- package/src/src/ast/nodes/generic-parameter.ts +71 -0
- package/src/src/ast/nodes/indexer.test.ts +42 -0
- package/src/src/ast/nodes/indexer.ts +60 -0
- package/src/src/ast/nodes/interface.test.ts +142 -0
- package/src/src/ast/nodes/interface.ts +117 -0
- package/src/src/ast/nodes/intersection-type.test.ts +52 -0
- package/src/src/ast/nodes/intersection-type.ts +67 -0
- package/src/src/ast/nodes/lookup-type.ts +53 -0
- package/src/src/ast/nodes/method.test.ts +185 -0
- package/src/src/ast/nodes/method.ts +138 -0
- package/src/src/ast/nodes/object-type.test.ts +40 -0
- package/src/src/ast/nodes/object-type.ts +52 -0
- package/src/src/ast/nodes/object.test.ts +40 -0
- package/src/src/ast/nodes/object.ts +48 -0
- package/src/src/ast/nodes/parameter.test.ts +88 -0
- package/src/src/ast/nodes/parameter.ts +85 -0
- package/src/src/ast/nodes/property-accessor.test.ts +132 -0
- package/src/src/ast/nodes/property-accessor.ts +173 -0
- package/src/src/ast/nodes/property.test.ts +113 -0
- package/src/src/ast/nodes/property.ts +192 -0
- package/src/src/ast/nodes/reference.test.ts +42 -0
- package/src/src/ast/nodes/reference.ts +194 -0
- package/src/src/ast/nodes/string.test.ts +35 -0
- package/src/src/ast/nodes/string.ts +49 -0
- package/src/src/ast/nodes/tuple.test.ts +45 -0
- package/src/src/ast/nodes/tuple.ts +53 -0
- package/src/src/ast/nodes/type-alias.test.ts +35 -0
- package/src/src/ast/nodes/type-alias.ts +75 -0
- package/src/src/ast/nodes/typeof.ts +42 -0
- package/src/src/ast/nodes/types.ts +40 -0
- package/src/src/ast/nodes/union-type.test.ts +50 -0
- package/src/src/ast/nodes/union-type.ts +62 -0
- package/src/src/ast/nodes/variable.test.ts +49 -0
- package/src/src/ast/nodes/variable.ts +73 -0
- package/src/src/ast/references/angular.ts +24 -0
- package/src/src/ast/references/easy-network-stub.ts +21 -0
- package/src/src/ast/references/index.ts +5 -0
- package/src/src/ast/references/k6.ts +8 -0
- package/src/src/ast/references/rxjs.ts +7 -0
- package/src/src/ast/references/typescript.ts +35 -0
- package/src/src/ast/utils/get-type-script-builder-options.ts +19 -0
- package/src/src/ast/utils/to-ts-node.ts +27 -0
- package/src/src/ast/utils/write-ts-generic-parameters.ts +25 -0
- package/src/src/ast/utils/write-ts-members.ts +28 -0
- package/src/src/ast/utils/write-ts-nodes.ts +35 -0
- package/src/src/ast/utils/write-ts-parameters.ts +25 -0
- package/src/src/common-results.ts +26 -0
- package/src/src/config.ts +89 -0
- package/src/src/file-builder.ts +136 -0
- package/src/src/generators/file-generator.ts +15 -0
- package/src/src/generators/index.ts +6 -0
- package/src/src/generators/models/index.ts +3 -0
- package/src/src/generators/models/model-generator.ts +469 -0
- package/src/src/generators/models/models-generator.ts +108 -0
- package/src/src/generators/models/models.ts +112 -0
- package/src/src/generators/services/angular-services/angular-service-generator.ts +404 -0
- package/src/src/generators/services/angular-services/angular-services-generator.ts +295 -0
- package/src/src/generators/services/angular-services/index.ts +3 -0
- package/src/src/generators/services/angular-services/models.ts +270 -0
- package/src/src/generators/services/angular-services/refs.ts +54 -0
- package/src/src/generators/services/easy-network-stub/easy-network-stub-generator.ts +242 -0
- package/src/src/generators/services/easy-network-stub/easy-network-stubs-generator.ts +211 -0
- package/src/src/generators/services/easy-network-stub/index.ts +3 -0
- package/src/src/generators/services/easy-network-stub/models.ts +124 -0
- package/src/src/generators/services/easy-network-stub/refs.ts +45 -0
- package/src/src/generators/services/fetch-clients/fetch-client-generator.ts +267 -0
- package/src/src/generators/services/fetch-clients/fetch-clients-generator.ts +163 -0
- package/src/src/generators/services/fetch-clients/index.ts +3 -0
- package/src/src/generators/services/fetch-clients/models.ts +130 -0
- package/src/src/generators/services/fetch-clients/refs.ts +21 -0
- package/src/src/generators/services/k6-clients/index.ts +3 -0
- package/src/src/generators/services/k6-clients/k6-client-generator.ts +409 -0
- package/src/src/generators/services/k6-clients/k6-clients-generator.ts +165 -0
- package/src/src/generators/services/k6-clients/models.ts +241 -0
- package/src/src/generators/services/k6-clients/refs.ts +15 -0
- package/src/src/import-collection.test.ts +78 -0
- package/src/src/import-collection.ts +236 -0
- package/src/src/utils.ts +72 -0
- package/src/tests/openapi-models.test.ts +64 -0
- package/test_runner.js +239 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
import { bgGreen, bgRed, bold, gray, green, red, white } from "./styles.js";
|
|
4
|
+
/**
|
|
5
|
+
* Colors the output of assertion diffs.
|
|
6
|
+
*
|
|
7
|
+
* @param diffType Difference type, either added or removed.
|
|
8
|
+
* @param background If true, colors the background instead of the text.
|
|
9
|
+
*
|
|
10
|
+
* @returns A function that colors the input string.
|
|
11
|
+
*
|
|
12
|
+
* @example Usage
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { createColor } from "@std/internal";
|
|
15
|
+
* import { assertEquals } from "@std/assert";
|
|
16
|
+
* import { bold, green, red, white } from "@std/fmt/colors";
|
|
17
|
+
*
|
|
18
|
+
* assertEquals(createColor("added")("foo"), green(bold("foo")));
|
|
19
|
+
* assertEquals(createColor("removed")("foo"), red(bold("foo")));
|
|
20
|
+
* assertEquals(createColor("common")("foo"), white("foo"));
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export function createColor(diffType,
|
|
24
|
+
/**
|
|
25
|
+
* TODO(@littledivy): Remove this when we can detect true color terminals. See
|
|
26
|
+
* https://github.com/denoland/deno_std/issues/2575.
|
|
27
|
+
*/
|
|
28
|
+
background = false) {
|
|
29
|
+
switch (diffType) {
|
|
30
|
+
case "added":
|
|
31
|
+
return (s) => background ? bgGreen(white(s)) : green(bold(s));
|
|
32
|
+
case "removed":
|
|
33
|
+
return (s) => background ? bgRed(white(s)) : red(bold(s));
|
|
34
|
+
default:
|
|
35
|
+
return white;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Prefixes `+` or `-` in diff output.
|
|
40
|
+
*
|
|
41
|
+
* @param diffType Difference type, either added or removed
|
|
42
|
+
*
|
|
43
|
+
* @returns A string representing the sign.
|
|
44
|
+
*
|
|
45
|
+
* @example Usage
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { createSign } from "@std/internal";
|
|
48
|
+
* import { assertEquals } from "@std/assert";
|
|
49
|
+
*
|
|
50
|
+
* assertEquals(createSign("added"), "+ ");
|
|
51
|
+
* assertEquals(createSign("removed"), "- ");
|
|
52
|
+
* assertEquals(createSign("common"), " ");
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export function createSign(diffType) {
|
|
56
|
+
switch (diffType) {
|
|
57
|
+
case "added":
|
|
58
|
+
return "+ ";
|
|
59
|
+
case "removed":
|
|
60
|
+
return "- ";
|
|
61
|
+
default:
|
|
62
|
+
return " ";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Builds a message based on the provided diff result.
|
|
67
|
+
*
|
|
68
|
+
* @param diffResult The diff result array.
|
|
69
|
+
* @param options Optional parameters for customizing the message.
|
|
70
|
+
*
|
|
71
|
+
* @returns An array of strings representing the built message.
|
|
72
|
+
*
|
|
73
|
+
* @example Usage
|
|
74
|
+
* ```ts no-assert
|
|
75
|
+
* import { diffStr, buildMessage } from "@std/internal";
|
|
76
|
+
*
|
|
77
|
+
* const diffResult = diffStr("Hello, world!", "Hello, world");
|
|
78
|
+
*
|
|
79
|
+
* console.log(buildMessage(diffResult));
|
|
80
|
+
* // [
|
|
81
|
+
* // "",
|
|
82
|
+
* // "",
|
|
83
|
+
* // " [Diff] Actual / Expected",
|
|
84
|
+
* // "",
|
|
85
|
+
* // "",
|
|
86
|
+
* // "- Hello, world!",
|
|
87
|
+
* // "+ Hello, world",
|
|
88
|
+
* // "",
|
|
89
|
+
* // ]
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export function buildMessage(diffResult, options = {}) {
|
|
93
|
+
const { stringDiff = false } = options;
|
|
94
|
+
const messages = [
|
|
95
|
+
"",
|
|
96
|
+
"",
|
|
97
|
+
` ${gray(bold("[Diff]"))} ${red(bold("Actual"))} / ${green(bold("Expected"))}`,
|
|
98
|
+
"",
|
|
99
|
+
"",
|
|
100
|
+
];
|
|
101
|
+
const diffMessages = diffResult.map((result) => {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
const color = createColor(result.type);
|
|
104
|
+
const line = (_b = (_a = result.details) === null || _a === void 0 ? void 0 : _a.map((detail) => detail.type !== "common"
|
|
105
|
+
? createColor(detail.type, true)(detail.value)
|
|
106
|
+
: detail.value).join("")) !== null && _b !== void 0 ? _b : result.value;
|
|
107
|
+
return color(`${createSign(result.type)}${line}`);
|
|
108
|
+
});
|
|
109
|
+
messages.push(...(stringDiff ? [diffMessages.join("")] : diffMessages), "");
|
|
110
|
+
return messages;
|
|
111
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { DiffResult, DiffType } from "./types.js";
|
|
2
|
+
/** Represents the farthest point in the diff algorithm. */
|
|
3
|
+
export interface FarthestPoint {
|
|
4
|
+
/** The y-coordinate of the point. */
|
|
5
|
+
y: number;
|
|
6
|
+
/** The id of the point. */
|
|
7
|
+
id: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates an array of common elements between two arrays.
|
|
11
|
+
*
|
|
12
|
+
* @typeParam T The type of elements in the arrays.
|
|
13
|
+
*
|
|
14
|
+
* @param A The first array.
|
|
15
|
+
* @param B The second array.
|
|
16
|
+
*
|
|
17
|
+
* @returns An array containing the common elements between the two arrays.
|
|
18
|
+
*
|
|
19
|
+
* @example Usage
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { createCommon } from "@std/internal/diff";
|
|
22
|
+
* import { assertEquals } from "@std/assert";
|
|
23
|
+
*
|
|
24
|
+
* const a = [1, 2, 3];
|
|
25
|
+
* const b = [1, 2, 4];
|
|
26
|
+
*
|
|
27
|
+
* assertEquals(createCommon(a, b), [1, 2]);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function createCommon<T>(A: T[], B: T[]): T[];
|
|
31
|
+
/**
|
|
32
|
+
* Asserts that the value is a {@linkcode FarthestPoint}.
|
|
33
|
+
* If not, an error is thrown.
|
|
34
|
+
*
|
|
35
|
+
* @param value The value to check.
|
|
36
|
+
*
|
|
37
|
+
* @returns A void value that returns once the assertion completes.
|
|
38
|
+
*
|
|
39
|
+
* @example Usage
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { assertFp } from "@std/internal/diff";
|
|
42
|
+
* import { assertThrows } from "@std/assert";
|
|
43
|
+
*
|
|
44
|
+
* assertFp({ y: 0, id: 0 });
|
|
45
|
+
* assertThrows(() => assertFp({ id: 0 }));
|
|
46
|
+
* assertThrows(() => assertFp({ y: 0 }));
|
|
47
|
+
* assertThrows(() => assertFp(undefined));
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function assertFp(value: unknown): asserts value is FarthestPoint;
|
|
51
|
+
/**
|
|
52
|
+
* Creates an array of backtraced differences.
|
|
53
|
+
*
|
|
54
|
+
* @typeParam T The type of elements in the arrays.
|
|
55
|
+
*
|
|
56
|
+
* @param A The first array.
|
|
57
|
+
* @param B The second array.
|
|
58
|
+
* @param current The current {@linkcode FarthestPoint}.
|
|
59
|
+
* @param swapped Boolean indicating if the arrays are swapped.
|
|
60
|
+
* @param routes The routes array.
|
|
61
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
|
62
|
+
*
|
|
63
|
+
* @returns An array of backtraced differences.
|
|
64
|
+
*
|
|
65
|
+
* @example Usage
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { backTrace } from "@std/internal/diff";
|
|
68
|
+
* import { assertEquals } from "@std/assert";
|
|
69
|
+
*
|
|
70
|
+
* assertEquals(
|
|
71
|
+
* backTrace([], [], { y: 0, id: 0 }, false, new Uint32Array(0), 0),
|
|
72
|
+
* [],
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare function backTrace<T>(A: T[], B: T[], current: FarthestPoint, swapped: boolean, routes: Uint32Array, diffTypesPtrOffset: number): Array<{
|
|
77
|
+
type: DiffType;
|
|
78
|
+
value: T;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a {@linkcode FarthestPoint}.
|
|
82
|
+
*
|
|
83
|
+
* @param k The current index.
|
|
84
|
+
* @param M The length of the first array.
|
|
85
|
+
* @param routes The routes array.
|
|
86
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
|
87
|
+
* @param ptr The current pointer.
|
|
88
|
+
* @param slide The slide {@linkcode FarthestPoint}.
|
|
89
|
+
* @param down The down {@linkcode FarthestPoint}.
|
|
90
|
+
*
|
|
91
|
+
* @returns A {@linkcode FarthestPoint}.
|
|
92
|
+
*
|
|
93
|
+
* @example Usage
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { createFp } from "@std/internal/diff";
|
|
96
|
+
* import { assertEquals } from "@std/assert";
|
|
97
|
+
*
|
|
98
|
+
* assertEquals(
|
|
99
|
+
* createFp(
|
|
100
|
+
* 0,
|
|
101
|
+
* 0,
|
|
102
|
+
* new Uint32Array(0),
|
|
103
|
+
* 0,
|
|
104
|
+
* 0,
|
|
105
|
+
* { y: -1, id: 0 },
|
|
106
|
+
* { y: 0, id: 0 },
|
|
107
|
+
* ),
|
|
108
|
+
* { y: -1, id: 1 },
|
|
109
|
+
* );
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare function createFp(k: number, M: number, routes: Uint32Array, diffTypesPtrOffset: number, ptr: number, slide?: FarthestPoint, down?: FarthestPoint): FarthestPoint;
|
|
113
|
+
/**
|
|
114
|
+
* Renders the differences between the actual and expected values.
|
|
115
|
+
*
|
|
116
|
+
* @typeParam T The type of elements in the arrays.
|
|
117
|
+
*
|
|
118
|
+
* @param A Actual value
|
|
119
|
+
* @param B Expected value
|
|
120
|
+
*
|
|
121
|
+
* @returns An array of differences between the actual and expected values.
|
|
122
|
+
*
|
|
123
|
+
* @example Usage
|
|
124
|
+
* ```ts
|
|
125
|
+
* import { diff } from "@std/internal/diff";
|
|
126
|
+
* import { assertEquals } from "@std/assert";
|
|
127
|
+
*
|
|
128
|
+
* const a = [1, 2, 3];
|
|
129
|
+
* const b = [1, 2, 4];
|
|
130
|
+
*
|
|
131
|
+
* assertEquals(diff(a, b), [
|
|
132
|
+
* { type: "common", value: 1 },
|
|
133
|
+
* { type: "common", value: 2 },
|
|
134
|
+
* { type: "removed", value: 3 },
|
|
135
|
+
* { type: "added", value: 4 },
|
|
136
|
+
* ]);
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
export declare function diff<T>(A: T[], B: T[]): DiffResult<T>[];
|
|
140
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAanD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAWvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAgCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
+
// This module is browser compatible.
|
|
3
|
+
const REMOVED = 1;
|
|
4
|
+
const COMMON = 2;
|
|
5
|
+
const ADDED = 3;
|
|
6
|
+
/**
|
|
7
|
+
* Creates an array of common elements between two arrays.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam T The type of elements in the arrays.
|
|
10
|
+
*
|
|
11
|
+
* @param A The first array.
|
|
12
|
+
* @param B The second array.
|
|
13
|
+
*
|
|
14
|
+
* @returns An array containing the common elements between the two arrays.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { createCommon } from "@std/internal/diff";
|
|
19
|
+
* import { assertEquals } from "@std/assert";
|
|
20
|
+
*
|
|
21
|
+
* const a = [1, 2, 3];
|
|
22
|
+
* const b = [1, 2, 4];
|
|
23
|
+
*
|
|
24
|
+
* assertEquals(createCommon(a, b), [1, 2]);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function createCommon(A, B) {
|
|
28
|
+
const common = [];
|
|
29
|
+
if (A.length === 0 || B.length === 0)
|
|
30
|
+
return [];
|
|
31
|
+
for (let i = 0; i < Math.min(A.length, B.length); i += 1) {
|
|
32
|
+
const a = A[i];
|
|
33
|
+
const b = B[i];
|
|
34
|
+
if (a !== undefined && a === b) {
|
|
35
|
+
common.push(a);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return common;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return common;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Asserts that the value is a {@linkcode FarthestPoint}.
|
|
45
|
+
* If not, an error is thrown.
|
|
46
|
+
*
|
|
47
|
+
* @param value The value to check.
|
|
48
|
+
*
|
|
49
|
+
* @returns A void value that returns once the assertion completes.
|
|
50
|
+
*
|
|
51
|
+
* @example Usage
|
|
52
|
+
* ```ts
|
|
53
|
+
* import { assertFp } from "@std/internal/diff";
|
|
54
|
+
* import { assertThrows } from "@std/assert";
|
|
55
|
+
*
|
|
56
|
+
* assertFp({ y: 0, id: 0 });
|
|
57
|
+
* assertThrows(() => assertFp({ id: 0 }));
|
|
58
|
+
* assertThrows(() => assertFp({ y: 0 }));
|
|
59
|
+
* assertThrows(() => assertFp(undefined));
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export function assertFp(value) {
|
|
63
|
+
if (value == null ||
|
|
64
|
+
typeof value !== "object" ||
|
|
65
|
+
typeof (value === null || value === void 0 ? void 0 : value.y) !== "number" ||
|
|
66
|
+
typeof (value === null || value === void 0 ? void 0 : value.id) !== "number") {
|
|
67
|
+
throw new Error(`Unexpected value, expected 'FarthestPoint': received ${typeof value}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates an array of backtraced differences.
|
|
72
|
+
*
|
|
73
|
+
* @typeParam T The type of elements in the arrays.
|
|
74
|
+
*
|
|
75
|
+
* @param A The first array.
|
|
76
|
+
* @param B The second array.
|
|
77
|
+
* @param current The current {@linkcode FarthestPoint}.
|
|
78
|
+
* @param swapped Boolean indicating if the arrays are swapped.
|
|
79
|
+
* @param routes The routes array.
|
|
80
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
|
81
|
+
*
|
|
82
|
+
* @returns An array of backtraced differences.
|
|
83
|
+
*
|
|
84
|
+
* @example Usage
|
|
85
|
+
* ```ts
|
|
86
|
+
* import { backTrace } from "@std/internal/diff";
|
|
87
|
+
* import { assertEquals } from "@std/assert";
|
|
88
|
+
*
|
|
89
|
+
* assertEquals(
|
|
90
|
+
* backTrace([], [], { y: 0, id: 0 }, false, new Uint32Array(0), 0),
|
|
91
|
+
* [],
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export function backTrace(A, B, current, swapped, routes, diffTypesPtrOffset) {
|
|
96
|
+
const M = A.length;
|
|
97
|
+
const N = B.length;
|
|
98
|
+
const result = [];
|
|
99
|
+
let a = M - 1;
|
|
100
|
+
let b = N - 1;
|
|
101
|
+
let j = routes[current.id];
|
|
102
|
+
let type = routes[current.id + diffTypesPtrOffset];
|
|
103
|
+
while (true) {
|
|
104
|
+
if (!j && !type)
|
|
105
|
+
break;
|
|
106
|
+
const prev = j;
|
|
107
|
+
if (type === REMOVED) {
|
|
108
|
+
result.unshift({
|
|
109
|
+
type: swapped ? "removed" : "added",
|
|
110
|
+
value: B[b],
|
|
111
|
+
});
|
|
112
|
+
b -= 1;
|
|
113
|
+
}
|
|
114
|
+
else if (type === ADDED) {
|
|
115
|
+
result.unshift({
|
|
116
|
+
type: swapped ? "added" : "removed",
|
|
117
|
+
value: A[a],
|
|
118
|
+
});
|
|
119
|
+
a -= 1;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
result.unshift({ type: "common", value: A[a] });
|
|
123
|
+
a -= 1;
|
|
124
|
+
b -= 1;
|
|
125
|
+
}
|
|
126
|
+
j = routes[prev];
|
|
127
|
+
type = routes[prev + diffTypesPtrOffset];
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Creates a {@linkcode FarthestPoint}.
|
|
133
|
+
*
|
|
134
|
+
* @param k The current index.
|
|
135
|
+
* @param M The length of the first array.
|
|
136
|
+
* @param routes The routes array.
|
|
137
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
|
138
|
+
* @param ptr The current pointer.
|
|
139
|
+
* @param slide The slide {@linkcode FarthestPoint}.
|
|
140
|
+
* @param down The down {@linkcode FarthestPoint}.
|
|
141
|
+
*
|
|
142
|
+
* @returns A {@linkcode FarthestPoint}.
|
|
143
|
+
*
|
|
144
|
+
* @example Usage
|
|
145
|
+
* ```ts
|
|
146
|
+
* import { createFp } from "@std/internal/diff";
|
|
147
|
+
* import { assertEquals } from "@std/assert";
|
|
148
|
+
*
|
|
149
|
+
* assertEquals(
|
|
150
|
+
* createFp(
|
|
151
|
+
* 0,
|
|
152
|
+
* 0,
|
|
153
|
+
* new Uint32Array(0),
|
|
154
|
+
* 0,
|
|
155
|
+
* 0,
|
|
156
|
+
* { y: -1, id: 0 },
|
|
157
|
+
* { y: 0, id: 0 },
|
|
158
|
+
* ),
|
|
159
|
+
* { y: -1, id: 1 },
|
|
160
|
+
* );
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export function createFp(k, M, routes, diffTypesPtrOffset, ptr, slide, down) {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
if (slide && slide.y === -1 && down && down.y === -1) {
|
|
166
|
+
return { y: 0, id: 0 };
|
|
167
|
+
}
|
|
168
|
+
const isAdding = ((down === null || down === void 0 ? void 0 : down.y) === -1) ||
|
|
169
|
+
k === M ||
|
|
170
|
+
((_a = slide === null || slide === void 0 ? void 0 : slide.y) !== null && _a !== void 0 ? _a : 0) > ((_b = down === null || down === void 0 ? void 0 : down.y) !== null && _b !== void 0 ? _b : 0) + 1;
|
|
171
|
+
if (slide && isAdding) {
|
|
172
|
+
const prev = slide.id;
|
|
173
|
+
ptr++;
|
|
174
|
+
routes[ptr] = prev;
|
|
175
|
+
routes[ptr + diffTypesPtrOffset] = ADDED;
|
|
176
|
+
return { y: slide.y, id: ptr };
|
|
177
|
+
}
|
|
178
|
+
if (down && !isAdding) {
|
|
179
|
+
const prev = down.id;
|
|
180
|
+
ptr++;
|
|
181
|
+
routes[ptr] = prev;
|
|
182
|
+
routes[ptr + diffTypesPtrOffset] = REMOVED;
|
|
183
|
+
return { y: down.y + 1, id: ptr };
|
|
184
|
+
}
|
|
185
|
+
throw new Error("Unexpected missing FarthestPoint");
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Renders the differences between the actual and expected values.
|
|
189
|
+
*
|
|
190
|
+
* @typeParam T The type of elements in the arrays.
|
|
191
|
+
*
|
|
192
|
+
* @param A Actual value
|
|
193
|
+
* @param B Expected value
|
|
194
|
+
*
|
|
195
|
+
* @returns An array of differences between the actual and expected values.
|
|
196
|
+
*
|
|
197
|
+
* @example Usage
|
|
198
|
+
* ```ts
|
|
199
|
+
* import { diff } from "@std/internal/diff";
|
|
200
|
+
* import { assertEquals } from "@std/assert";
|
|
201
|
+
*
|
|
202
|
+
* const a = [1, 2, 3];
|
|
203
|
+
* const b = [1, 2, 4];
|
|
204
|
+
*
|
|
205
|
+
* assertEquals(diff(a, b), [
|
|
206
|
+
* { type: "common", value: 1 },
|
|
207
|
+
* { type: "common", value: 2 },
|
|
208
|
+
* { type: "removed", value: 3 },
|
|
209
|
+
* { type: "added", value: 4 },
|
|
210
|
+
* ]);
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
export function diff(A, B) {
|
|
214
|
+
const prefixCommon = createCommon(A, B);
|
|
215
|
+
A = A.slice(prefixCommon.length);
|
|
216
|
+
B = B.slice(prefixCommon.length);
|
|
217
|
+
const swapped = B.length > A.length;
|
|
218
|
+
[A, B] = swapped ? [B, A] : [A, B];
|
|
219
|
+
const M = A.length;
|
|
220
|
+
const N = B.length;
|
|
221
|
+
if (!M && !N && !prefixCommon.length)
|
|
222
|
+
return [];
|
|
223
|
+
if (!N) {
|
|
224
|
+
return [
|
|
225
|
+
...prefixCommon.map((value) => ({ type: "common", value })),
|
|
226
|
+
...A.map((value) => ({ type: swapped ? "added" : "removed", value })),
|
|
227
|
+
];
|
|
228
|
+
}
|
|
229
|
+
const offset = N;
|
|
230
|
+
const delta = M - N;
|
|
231
|
+
const length = M + N + 1;
|
|
232
|
+
const fp = Array.from({ length }, () => ({ y: -1, id: -1 }));
|
|
233
|
+
/**
|
|
234
|
+
* Note: this buffer is used to save memory and improve performance. The first
|
|
235
|
+
* half is used to save route and the last half is used to save diff type.
|
|
236
|
+
*/
|
|
237
|
+
const routes = new Uint32Array((M * N + length + 1) * 2);
|
|
238
|
+
const diffTypesPtrOffset = routes.length / 2;
|
|
239
|
+
let ptr = 0;
|
|
240
|
+
function snake(k, A, B, slide, down) {
|
|
241
|
+
const M = A.length;
|
|
242
|
+
const N = B.length;
|
|
243
|
+
const fp = createFp(k, M, routes, diffTypesPtrOffset, ptr, slide, down);
|
|
244
|
+
ptr = fp.id;
|
|
245
|
+
while (fp.y + k < M && fp.y < N && A[fp.y + k] === B[fp.y]) {
|
|
246
|
+
const prev = fp.id;
|
|
247
|
+
ptr++;
|
|
248
|
+
fp.id = ptr;
|
|
249
|
+
fp.y += 1;
|
|
250
|
+
routes[ptr] = prev;
|
|
251
|
+
routes[ptr + diffTypesPtrOffset] = COMMON;
|
|
252
|
+
}
|
|
253
|
+
return fp;
|
|
254
|
+
}
|
|
255
|
+
let currentFp = fp[delta + offset];
|
|
256
|
+
assertFp(currentFp);
|
|
257
|
+
let p = -1;
|
|
258
|
+
while (currentFp.y < N) {
|
|
259
|
+
p = p + 1;
|
|
260
|
+
for (let k = -p; k < delta; ++k) {
|
|
261
|
+
const index = k + offset;
|
|
262
|
+
fp[index] = snake(k, A, B, fp[index - 1], fp[index + 1]);
|
|
263
|
+
}
|
|
264
|
+
for (let k = delta + p; k > delta; --k) {
|
|
265
|
+
const index = k + offset;
|
|
266
|
+
fp[index] = snake(k, A, B, fp[index - 1], fp[index + 1]);
|
|
267
|
+
}
|
|
268
|
+
const index = delta + offset;
|
|
269
|
+
fp[delta + offset] = snake(delta, A, B, fp[index - 1], fp[index + 1]);
|
|
270
|
+
currentFp = fp[delta + offset];
|
|
271
|
+
assertFp(currentFp);
|
|
272
|
+
}
|
|
273
|
+
return [
|
|
274
|
+
...prefixCommon.map((value) => ({ type: "common", value })),
|
|
275
|
+
...backTrace(A, B, currentFp, swapped, routes, diffTypesPtrOffset),
|
|
276
|
+
];
|
|
277
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { DiffResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Unescape invisible characters.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences}
|
|
6
|
+
*
|
|
7
|
+
* @param string String to unescape.
|
|
8
|
+
*
|
|
9
|
+
* @returns Unescaped string.
|
|
10
|
+
*
|
|
11
|
+
* @example Usage
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { unescape } from "@std/internal/diff-str";
|
|
14
|
+
* import { assertEquals } from "@std/assert";
|
|
15
|
+
*
|
|
16
|
+
* assertEquals(unescape("Hello\nWorld"), "Hello\\n\nWorld");
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function unescape(string: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Tokenizes a string into an array of tokens.
|
|
22
|
+
*
|
|
23
|
+
* @param string The string to tokenize.
|
|
24
|
+
* @param wordDiff If true, performs word-based tokenization. Default is false.
|
|
25
|
+
*
|
|
26
|
+
* @returns An array of tokens.
|
|
27
|
+
*
|
|
28
|
+
* @example Usage
|
|
29
|
+
* ```ts
|
|
30
|
+
* import { tokenize } from "@std/internal/diff-str";
|
|
31
|
+
* import { assertEquals } from "@std/assert";
|
|
32
|
+
*
|
|
33
|
+
* assertEquals(tokenize("Hello\nWorld"), ["Hello\n", "World"]);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function tokenize(string: string, wordDiff?: boolean): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Create details by filtering relevant word-diff for current line and merge
|
|
39
|
+
* "space-diff" if surrounded by word-diff for cleaner displays.
|
|
40
|
+
*
|
|
41
|
+
* @param line Current line
|
|
42
|
+
* @param tokens Word-diff tokens
|
|
43
|
+
*
|
|
44
|
+
* @returns Array of diff results.
|
|
45
|
+
*
|
|
46
|
+
* @example Usage
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { createDetails } from "@std/internal/diff-str";
|
|
49
|
+
* import { assertEquals } from "@std/assert";
|
|
50
|
+
*
|
|
51
|
+
* const tokens = [
|
|
52
|
+
* { type: "added", value: "a" },
|
|
53
|
+
* { type: "removed", value: "b" },
|
|
54
|
+
* { type: "common", value: "c" },
|
|
55
|
+
* ] as const;
|
|
56
|
+
* assertEquals(
|
|
57
|
+
* createDetails({ type: "added", value: "a" }, [...tokens]),
|
|
58
|
+
* [{ type: "added", value: "a" }, { type: "common", value: "c" }]
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare function createDetails(line: DiffResult<string>, tokens: DiffResult<string>[]): DiffResult<string>[];
|
|
63
|
+
/**
|
|
64
|
+
* Renders the differences between the actual and expected strings. Partially
|
|
65
|
+
* inspired from {@link https://github.com/kpdecker/jsdiff}.
|
|
66
|
+
*
|
|
67
|
+
* @param A Actual string
|
|
68
|
+
* @param B Expected string
|
|
69
|
+
*
|
|
70
|
+
* @returns Array of diff results.
|
|
71
|
+
*
|
|
72
|
+
* @example Usage
|
|
73
|
+
* ```ts
|
|
74
|
+
* import { diffStr } from "@std/internal/diff-str";
|
|
75
|
+
* import { assertEquals } from "@std/assert";
|
|
76
|
+
*
|
|
77
|
+
* assertEquals(diffStr("Hello!", "Hello"), [
|
|
78
|
+
* {
|
|
79
|
+
* type: "removed",
|
|
80
|
+
* value: "Hello!\n",
|
|
81
|
+
* details: [
|
|
82
|
+
* { type: "common", value: "Hello" },
|
|
83
|
+
* { type: "removed", value: "!" },
|
|
84
|
+
* { type: "common", value: "\n" }
|
|
85
|
+
* ]
|
|
86
|
+
* },
|
|
87
|
+
* {
|
|
88
|
+
* type: "added",
|
|
89
|
+
* value: "Hello\n",
|
|
90
|
+
* details: [
|
|
91
|
+
* { type: "common", value: "Hello" },
|
|
92
|
+
* { type: "common", value: "\n" }
|
|
93
|
+
* ]
|
|
94
|
+
* }
|
|
95
|
+
* ]);
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function diffStr(A: string, B: string): DiffResult<string>[];
|
|
99
|
+
//# sourceMappingURL=diff_str.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAW/C;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
|