@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,33 @@
|
|
|
1
|
+
import "../../../_dnt.test_polyfills.js";
|
|
2
|
+
import { normalizeEOL } from '@goast/test-utils';
|
|
3
|
+
import { expect } from '../../../deps/jsr.io/@std/expect/1.0.12/expect.js';
|
|
4
|
+
import { beforeEach, describe, it } from '../../../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
5
|
+
import { TypeScriptFileBuilder } from '../../file-builder.js';
|
|
6
|
+
import { tsTuple } from './tuple.js';
|
|
7
|
+
let builder;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
builder = new TypeScriptFileBuilder();
|
|
10
|
+
});
|
|
11
|
+
describe('tsTuple', () => {
|
|
12
|
+
it('should write empty tuple if no elements are provided', () => {
|
|
13
|
+
builder.append(tsTuple([]));
|
|
14
|
+
expect(builder.toString(false)).toBe('[]');
|
|
15
|
+
});
|
|
16
|
+
it('should write the elements', () => {
|
|
17
|
+
builder.append(tsTuple(['string', 'number']));
|
|
18
|
+
expect(builder.toString(false)).toBe('[string, number]');
|
|
19
|
+
});
|
|
20
|
+
it('should write multiline if there are more than 3 elements', () => {
|
|
21
|
+
builder.append(tsTuple(['string', 'number', 'boolean', 'unknown']));
|
|
22
|
+
expect(builder.toString(false)).toBe(normalizeEOL(8)(`[
|
|
23
|
+
string,
|
|
24
|
+
number,
|
|
25
|
+
boolean,
|
|
26
|
+
unknown
|
|
27
|
+
]`));
|
|
28
|
+
});
|
|
29
|
+
it('should write as const', () => {
|
|
30
|
+
builder.append(tsTuple(['string', 'number'], { asConst: true }));
|
|
31
|
+
expect(builder.toString(false)).toBe('[string, number] as const');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-alias.test.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/nodes/type-alias.test.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "../../../_dnt.test_polyfills.js";
|
|
2
|
+
import { EOL } from 'node:os';
|
|
3
|
+
import { expect } from '../../../deps/jsr.io/@std/expect/1.0.12/expect.js';
|
|
4
|
+
import { beforeEach, it } from '../../../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
5
|
+
import { TypeScriptFileBuilder } from '../../file-builder.js';
|
|
6
|
+
import { tsGenericParameter } from './generic-parameter.js';
|
|
7
|
+
import { tsTypeAlias } from './type-alias.js';
|
|
8
|
+
let builder;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
builder = new TypeScriptFileBuilder();
|
|
11
|
+
});
|
|
12
|
+
it('should write the name of the type alias', () => {
|
|
13
|
+
builder.append(tsTypeAlias('X', 'number'));
|
|
14
|
+
expect(builder.toString(false)).toBe('type X = number;' + EOL);
|
|
15
|
+
});
|
|
16
|
+
it('should write the generics if they exist', () => {
|
|
17
|
+
builder.append(tsTypeAlias('X', 'number', { generics: [tsGenericParameter('T'), tsGenericParameter('U')] }));
|
|
18
|
+
expect(builder.toString(false)).toBe('type X<T, U> = number;' + EOL);
|
|
19
|
+
});
|
|
20
|
+
it('should write export keyword if configured', () => {
|
|
21
|
+
builder.append(tsTypeAlias('X', 'number', { export: true }));
|
|
22
|
+
expect(builder.toString(false)).toBe('export type X = number;' + EOL);
|
|
23
|
+
});
|
|
24
|
+
it('should render injections', () => {
|
|
25
|
+
builder.append(tsTypeAlias('X', 'number', { inject: { before: ['before'], after: ['after'] } }));
|
|
26
|
+
expect(builder.toString(false)).toBe(`beforetype X = number;${EOL}after`);
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union-type.test.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/nodes/union-type.test.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "../../../_dnt.test_polyfills.js";
|
|
2
|
+
import { EOL } from 'node:os';
|
|
3
|
+
import { expect } from '../../../deps/jsr.io/@std/expect/1.0.12/expect.js';
|
|
4
|
+
import { beforeEach, describe, it } from '../../../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
5
|
+
import { TypeScriptFileBuilder } from '../../file-builder.js';
|
|
6
|
+
import { tsUnionType } from './union-type.js';
|
|
7
|
+
let builder;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
builder = new TypeScriptFileBuilder();
|
|
10
|
+
});
|
|
11
|
+
describe('tsUnionType', () => {
|
|
12
|
+
it('should write type "never" if no types are provided', () => {
|
|
13
|
+
builder.append(tsUnionType([]));
|
|
14
|
+
expect(builder.toString(false)).toBe('never');
|
|
15
|
+
});
|
|
16
|
+
it('should write the type if only one type is provided', () => {
|
|
17
|
+
builder.append(tsUnionType(['string']));
|
|
18
|
+
expect(builder.toString(false)).toBe('string');
|
|
19
|
+
});
|
|
20
|
+
it('should write the types', () => {
|
|
21
|
+
builder.append(tsUnionType(['string', 'number']));
|
|
22
|
+
expect(builder.toString(false)).toBe('(string) | (number)');
|
|
23
|
+
});
|
|
24
|
+
it('should write the types on separate lines if there are more than 3', () => {
|
|
25
|
+
builder.append(tsUnionType(['string', 'number', 'boolean', 'unknown']));
|
|
26
|
+
expect(builder.toString(false)).toBe(`${EOL}| (string)${EOL}| (number)${EOL}| (boolean)${EOL}| (unknown)`);
|
|
27
|
+
});
|
|
28
|
+
it('should collapse nested union types', () => {
|
|
29
|
+
builder.append(tsUnionType([tsUnionType(['string', 'number']), tsUnionType(['boolean', 'unknown'])]));
|
|
30
|
+
expect(builder.toString(false)).toBe(`${EOL}| (string)${EOL}| (number)${EOL}| (boolean)${EOL}| (unknown)`);
|
|
31
|
+
});
|
|
32
|
+
it('should render injections', () => {
|
|
33
|
+
builder.append(tsUnionType(['string', 'number'], {
|
|
34
|
+
inject: { before: '║b║', after: '║a║' },
|
|
35
|
+
}));
|
|
36
|
+
expect(builder.toString(false)).toBe('║b║(string) | (number)║a║');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable.test.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/nodes/variable.test.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "../../../_dnt.test_polyfills.js";
|
|
2
|
+
import { EOL } from 'node:os';
|
|
3
|
+
import { expect } from '../../../deps/jsr.io/@std/expect/1.0.12/expect.js';
|
|
4
|
+
import { beforeEach, it } from '../../../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
5
|
+
import { TypeScriptFileBuilder } from '../../file-builder.js';
|
|
6
|
+
import { tsVariable } from './variable.js';
|
|
7
|
+
let builder;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
builder = new TypeScriptFileBuilder();
|
|
10
|
+
});
|
|
11
|
+
it('should write the name of the variable', () => {
|
|
12
|
+
builder.append(tsVariable('x'));
|
|
13
|
+
expect(builder.toString(false)).toBe('let x;' + EOL);
|
|
14
|
+
});
|
|
15
|
+
it('should write the type if it exists', () => {
|
|
16
|
+
builder.append(tsVariable('x', { type: 'number' }));
|
|
17
|
+
expect(builder.toString(false)).toBe('let x: number;' + EOL);
|
|
18
|
+
});
|
|
19
|
+
it('should write the value if it exists', () => {
|
|
20
|
+
builder.append(tsVariable('x', { value: 42 }));
|
|
21
|
+
expect(builder.toString(false)).toBe('let x = 42;' + EOL);
|
|
22
|
+
});
|
|
23
|
+
it('should write the const keyword if configured', () => {
|
|
24
|
+
builder.append(tsVariable('x', { readonly: true }));
|
|
25
|
+
expect(builder.toString(false)).toBe('const x;' + EOL);
|
|
26
|
+
});
|
|
27
|
+
it('should write the export keyword if configured', () => {
|
|
28
|
+
builder.append(tsVariable('x', { export: true }));
|
|
29
|
+
expect(builder.toString(false)).toBe('export let x;' + EOL);
|
|
30
|
+
});
|
|
31
|
+
it('should write all the parts of the variable', () => {
|
|
32
|
+
builder.append(tsVariable('x', { type: 'number', value: 42, readonly: true, export: true }));
|
|
33
|
+
expect(builder.toString(false)).toBe('export const x: number = 42;' + EOL);
|
|
34
|
+
});
|
|
35
|
+
it('should render injections', () => {
|
|
36
|
+
builder.append(tsVariable('x', { inject: { before: ['before'], after: ['after'] } }));
|
|
37
|
+
expect(builder.toString(false)).toBe(`beforelet x;${EOL}after`);
|
|
38
|
+
});
|
|
@@ -232,13 +232,13 @@ export class DefaultTypeScriptAngularServiceGenerator extends TypeScriptFileGene
|
|
|
232
232
|
}
|
|
233
233
|
: null,
|
|
234
234
|
'',
|
|
235
|
-
s `return ${ctx.refs.waitForResponse([responseModelType])}(${s.indent `
|
|
236
|
-
this.http.request(rb.build({${s.indent `
|
|
237
|
-
responseType: ${ts.string(responseType)},
|
|
238
|
-
accept: ${ts.string(accept)},
|
|
239
|
-
context,`}
|
|
240
|
-
})),
|
|
241
|
-
{${s.indent `
|
|
235
|
+
s `return ${ctx.refs.waitForResponse([responseModelType])}(${s.indent `
|
|
236
|
+
this.http.request(rb.build({${s.indent `
|
|
237
|
+
responseType: ${ts.string(responseType)},
|
|
238
|
+
accept: ${ts.string(accept)},
|
|
239
|
+
context,`}
|
|
240
|
+
})),
|
|
241
|
+
{${s.indent `
|
|
242
242
|
errorResponseTypes: ${ts.object({
|
|
243
243
|
members: [
|
|
244
244
|
...Object.entries(this.getEndpointStatusCodes(ctx, endpoint))
|
|
@@ -247,8 +247,8 @@ export class DefaultTypeScriptAngularServiceGenerator extends TypeScriptFileGene
|
|
|
247
247
|
return ts.property(key, { value: ts.string(value.parser) });
|
|
248
248
|
}),
|
|
249
249
|
],
|
|
250
|
-
})}`}
|
|
251
|
-
}`}
|
|
250
|
+
})}`}
|
|
251
|
+
}`}
|
|
252
252
|
)`,
|
|
253
253
|
], '\n'),
|
|
254
254
|
});
|
|
@@ -94,15 +94,15 @@ export class DefaultTypeScriptEasyNetworkStubGenerator extends TypeScriptFileGen
|
|
|
94
94
|
],
|
|
95
95
|
returnType: 'this',
|
|
96
96
|
body: appendValueGroup([
|
|
97
|
-
s `this.stubWrapper.stub2<${requestType}>()(${s.indent `
|
|
98
|
-
${ts.string(endpoint.method.toUpperCase())},
|
|
99
|
-
${this.getStubClassName(ctx)}.${this.getEndpointPathPropertyName(ctx, endpoint)},
|
|
100
|
-
async (request) => {${s.indent `
|
|
101
|
-
if (this.stubWrapper.options.rememberRequests) {${s.indent `
|
|
102
|
-
this.${this.getEndpointRequestsFieldName(ctx, endpoint)}.push(request);`}
|
|
103
|
-
}
|
|
104
|
-
throw await response(${this.getResponderVariableName(ctx, endpoint)}, request);`}
|
|
105
|
-
}`}
|
|
97
|
+
s `this.stubWrapper.stub2<${requestType}>()(${s.indent `
|
|
98
|
+
${ts.string(endpoint.method.toUpperCase())},
|
|
99
|
+
${this.getStubClassName(ctx)}.${this.getEndpointPathPropertyName(ctx, endpoint)},
|
|
100
|
+
async (request) => {${s.indent `
|
|
101
|
+
if (this.stubWrapper.options.rememberRequests) {${s.indent `
|
|
102
|
+
this.${this.getEndpointRequestsFieldName(ctx, endpoint)}.push(request);`}
|
|
103
|
+
}
|
|
104
|
+
throw await response(${this.getResponderVariableName(ctx, endpoint)}, request);`}
|
|
105
|
+
}`}
|
|
106
106
|
);`,
|
|
107
107
|
'return this;',
|
|
108
108
|
], '\n'),
|
|
@@ -131,7 +131,7 @@ export class DefaultTypeScriptFetchClientGenerator extends TypeScriptFileGenerat
|
|
|
131
131
|
const method = this.getInterfaceEndpointMethod(ctx, endpoint);
|
|
132
132
|
method.accessModifier = 'public';
|
|
133
133
|
method.body = appendValueGroup([
|
|
134
|
-
s `const url = new ${ctx.refs.urlBuilder()}(this.options.baseUrl)${s.indent `
|
|
134
|
+
s `const url = new ${ctx.refs.urlBuilder()}(this.options.baseUrl)${s.indent `
|
|
135
135
|
.withPath(${ts.string(endpoint.path)})${(b) => b.forEach(endpoint.parameters, (b, p) => {
|
|
136
136
|
switch (p.target) {
|
|
137
137
|
case 'path':
|
|
@@ -141,7 +141,7 @@ export class DefaultTypeScriptFetchClientGenerator extends TypeScriptFileGenerat
|
|
|
141
141
|
b.append(s `\n.withQueryParam(${ts.string(p.name)}, params.${toCasing(p.name, ctx.config.paramNameCasing)})`);
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
|
-
})}
|
|
144
|
+
})}
|
|
145
145
|
.build();`}`,
|
|
146
146
|
s `const response = (this.options.fetch ?? fetch)(url, ${ts.object({
|
|
147
147
|
members: [
|
|
@@ -188,7 +188,7 @@ export class DefaultTypeScriptK6ClientGenerator extends TypeScriptFileGenerator
|
|
|
188
188
|
],
|
|
189
189
|
}),
|
|
190
190
|
parameters: [ts.constructorParameter('rootUrl'), ts.constructorParameter('defaultK6ParamsFactory')],
|
|
191
|
-
body: s `this.rootUrl = rootUrl;
|
|
191
|
+
body: s `this.rootUrl = rootUrl;
|
|
192
192
|
this._defaultK6ParamsFactory = defaultK6ParamsFactory;`,
|
|
193
193
|
}),
|
|
194
194
|
...ctx.service.endpoints.map((e) => this.getEndpointMethod(ctx, e)),
|
|
@@ -249,11 +249,11 @@ export class DefaultTypeScriptK6ClientGenerator extends TypeScriptFileGenerator
|
|
|
249
249
|
}
|
|
250
250
|
: null,
|
|
251
251
|
'',
|
|
252
|
-
s `return /** @type {${returnType}} */ (${s.indent `
|
|
253
|
-
${ctx.config.async ? 'await rb.buildAsync' : 'rb.build'}({${s.indent `
|
|
254
|
-
accept: ${ts.string(accept)},
|
|
255
|
-
params: this.getK6Params(k6Params),`}
|
|
256
|
-
})`}
|
|
252
|
+
s `return /** @type {${returnType}} */ (${s.indent `
|
|
253
|
+
${ctx.config.async ? 'await rb.buildAsync' : 'rb.build'}({${s.indent `
|
|
254
|
+
accept: ${ts.string(accept)},
|
|
255
|
+
params: this.getK6Params(k6Params),`}
|
|
256
|
+
})`}
|
|
257
257
|
);`,
|
|
258
258
|
], '\n'),
|
|
259
259
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-collection.test.d.ts","sourceRoot":"","sources":["../../src/src/import-collection.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "../_dnt.test_polyfills.js";
|
|
2
|
+
import { expect } from '../deps/jsr.io/@std/expect/1.0.12/mod.js';
|
|
3
|
+
import { beforeEach, describe, it } from '../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
4
|
+
import { ImportExportCollection } from './import-collection.js';
|
|
5
|
+
describe('ImportExportCollection', () => {
|
|
6
|
+
let collection;
|
|
7
|
+
let sourceBuilderOptions;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
collection = new ImportExportCollection({ importModuleTransformer: 'omit-extension' });
|
|
10
|
+
sourceBuilderOptions = { newLine: '\n' };
|
|
11
|
+
});
|
|
12
|
+
describe('addImport', () => {
|
|
13
|
+
it('should add a new import to the collection', () => {
|
|
14
|
+
collection.addImport('myImport', 'myModule');
|
|
15
|
+
expect(collection.hasImports).toBe(true);
|
|
16
|
+
expect(collection.hasExports).toBe(false);
|
|
17
|
+
expect(collection.toString(sourceBuilderOptions)).toBe("import { myImport } from 'myModule';\n");
|
|
18
|
+
});
|
|
19
|
+
it('should add a new import to an existing module', () => {
|
|
20
|
+
collection.addImport('myImport1', 'myModule');
|
|
21
|
+
collection.addImport('myImport2', 'myModule');
|
|
22
|
+
expect(collection.hasImports).toBe(true);
|
|
23
|
+
expect(collection.hasExports).toBe(false);
|
|
24
|
+
expect(collection.toString(sourceBuilderOptions)).toBe("import { myImport1, myImport2 } from 'myModule';\n");
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
describe('addExport', () => {
|
|
28
|
+
it('should add a new export to the collection', () => {
|
|
29
|
+
collection.addExport('myExport', 'myModule');
|
|
30
|
+
expect(collection.hasImports).toBe(false);
|
|
31
|
+
expect(collection.hasExports).toBe(true);
|
|
32
|
+
expect(collection.toString(sourceBuilderOptions)).toBe("export { myExport } from 'myModule';\n");
|
|
33
|
+
});
|
|
34
|
+
it('should add a new export to an existing module', () => {
|
|
35
|
+
collection.addExport('myExport1', 'myModule');
|
|
36
|
+
collection.addExport('myExport2', 'myModule');
|
|
37
|
+
expect(collection.hasImports).toBe(false);
|
|
38
|
+
expect(collection.hasExports).toBe(true);
|
|
39
|
+
expect(collection.toString(sourceBuilderOptions)).toBe("export { myExport1, myExport2 } from 'myModule';\n");
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
describe('clear', () => {
|
|
43
|
+
it('should clear the collection', () => {
|
|
44
|
+
collection.addImport('myImport', 'myModule');
|
|
45
|
+
collection.addExport('myExport', 'myModule');
|
|
46
|
+
expect(collection.hasImports).toBe(true);
|
|
47
|
+
expect(collection.hasExports).toBe(true);
|
|
48
|
+
collection.clear();
|
|
49
|
+
expect(collection.hasImports).toBe(false);
|
|
50
|
+
expect(collection.hasExports).toBe(false);
|
|
51
|
+
expect(collection.toString(sourceBuilderOptions)).toBe('');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
describe('toString', () => {
|
|
55
|
+
it('should return an empty string if the collection is empty', () => {
|
|
56
|
+
expect(collection.toString(sourceBuilderOptions)).toBe('');
|
|
57
|
+
});
|
|
58
|
+
it('should return a string representation of the collection', () => {
|
|
59
|
+
collection.addImport('myImport', 'myModule');
|
|
60
|
+
collection.addExport('myExport', 'myModule');
|
|
61
|
+
expect(collection.toString(sourceBuilderOptions)).toBe("import { myImport } from 'myModule';\n\nexport { myExport } from 'myModule';\n");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-models.test.d.ts","sourceRoot":"","sources":["../../src/tests/openapi-models.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "../_dnt.test_polyfills.js";
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { OpenApiGenerator, toCustomCase } from '@goast/core';
|
|
5
|
+
import { MultipartData, openApiV2FilesDir, openApiV3_1FilesDir, openApiV3FilesDir, verify, } from '@goast/test-utils';
|
|
6
|
+
import { afterEach, describe, test } from '../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
7
|
+
import { restore, stub } from '../deps/jsr.io/@std/testing/1.0.9/mock.js';
|
|
8
|
+
import { TypeScriptModelsGenerator } from '../src/generators/models/models-generator.js';
|
|
9
|
+
const filePaths = {
|
|
10
|
+
'2.0': openApiV2FilesDir,
|
|
11
|
+
'3.0': openApiV3FilesDir,
|
|
12
|
+
'3.1': openApiV3_1FilesDir,
|
|
13
|
+
};
|
|
14
|
+
const testFilesAllVersions = ['simple-schemas.yml', 'detailed-schemas.yml', 'object-schemas.yml'];
|
|
15
|
+
const testFilesV3x = ['oneof-schemas.yml', 'discriminated-schemas.yml'];
|
|
16
|
+
for (const [version, path] of Object.entries(filePaths)) {
|
|
17
|
+
describe(`OpenAPI V${version}`, () => {
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
restore();
|
|
20
|
+
});
|
|
21
|
+
const testFiles = version.startsWith('3') ? testFilesAllVersions.concat(testFilesV3x) : testFilesAllVersions;
|
|
22
|
+
for (const file of testFiles) {
|
|
23
|
+
const fileWithoutExt = file.replace(/\.[^/.]+$/, '');
|
|
24
|
+
test(toCustomCase(fileWithoutExt, { wordCasing: 'all-lower', wordSeparator: ' ' }), async (t) => {
|
|
25
|
+
const filePath = join(path, file);
|
|
26
|
+
const result = new MultipartData();
|
|
27
|
+
stub(fs, 'ensureDirSync');
|
|
28
|
+
stub(fs, 'writeFileSync', (path, data) => {
|
|
29
|
+
result.push([path.toString(), data.toString()]);
|
|
30
|
+
});
|
|
31
|
+
const generatorOptions = {
|
|
32
|
+
outputDir: 'out',
|
|
33
|
+
newLine: '\n',
|
|
34
|
+
};
|
|
35
|
+
const state = await new OpenApiGenerator(generatorOptions)
|
|
36
|
+
// deno-lint-ignore no-explicit-any
|
|
37
|
+
.useType(TypeScriptModelsGenerator, { __test__: true })
|
|
38
|
+
.parseAndGenerate(filePath);
|
|
39
|
+
result.splice(0, 0, ['state', state]);
|
|
40
|
+
restore();
|
|
41
|
+
await verify(t, result);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goast/typescript",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Provides gOAst generators for generating TypeScript code from OpenAPI specifications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Marc Schmidt (MaSch0212)",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"tslib": "^2.6.2",
|
|
30
30
|
"fs-extra": "^11.2.0",
|
|
31
|
-
"@goast/core": "0.4.
|
|
31
|
+
"@goast/core": "0.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.9.0",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Object {
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether an object has a property with the specified name.
|
|
5
|
+
* @param o An object.
|
|
6
|
+
* @param v A property name.
|
|
7
|
+
*/
|
|
8
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
declare global {
|
|
13
|
+
interface String {
|
|
14
|
+
/**
|
|
15
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
16
|
+
* @param searchValue A string to search for.
|
|
17
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
18
|
+
*/
|
|
19
|
+
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
22
|
+
* @param searchValue A string to search for.
|
|
23
|
+
* @param replacer A function that returns the replacement text.
|
|
24
|
+
*/
|
|
25
|
+
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=_dnt.test_polyfills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.test_polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.test_polyfills.ts"],"names":[],"mappings":"AAeA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO,EAAE,CAAC;AACV,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM;QACd;;;;WAIG;QACH,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;QAEvE;;;;WAIG;QACH,UAAU,CACR,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GACtD,MAAM,CAAC;KACX;CACF;AAsBD,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
4
|
+
if (!Object.hasOwn) {
|
|
5
|
+
Object.defineProperty(Object, "hasOwn", {
|
|
6
|
+
value: function (object, property) {
|
|
7
|
+
if (object == null) {
|
|
8
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
9
|
+
}
|
|
10
|
+
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
11
|
+
},
|
|
12
|
+
configurable: true,
|
|
13
|
+
enumerable: false,
|
|
14
|
+
writable: true,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* String.prototype.replaceAll() polyfill
|
|
19
|
+
* https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
|
|
20
|
+
* @author Chris Ferdinandi
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/
|
|
23
|
+
if (!String.prototype.replaceAll) {
|
|
24
|
+
String.prototype.replaceAll = function (str, newStr) {
|
|
25
|
+
// If a regex pattern
|
|
26
|
+
if (Object.prototype.toString.call(str).toLowerCase() === "[object regexp]") {
|
|
27
|
+
return this.replace(str, newStr);
|
|
28
|
+
}
|
|
29
|
+
// If a string
|
|
30
|
+
return this.replace(new RegExp(str, "g"), newStr);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.test_shims.d.ts","sourceRoot":"","sources":["../src/_dnt.test_shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAK5C,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dntGlobalThis = exports.Deno = void 0;
|
|
4
|
+
const shim_deno_test_1 = require("@deno/shim-deno-test");
|
|
5
|
+
var shim_deno_test_2 = require("@deno/shim-deno-test");
|
|
6
|
+
Object.defineProperty(exports, "Deno", { enumerable: true, get: function () { return shim_deno_test_2.Deno; } });
|
|
7
|
+
const dntGlobals = {
|
|
8
|
+
Deno: shim_deno_test_1.Deno,
|
|
9
|
+
};
|
|
10
|
+
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
11
|
+
function createMergeProxy(baseObj, extObj) {
|
|
12
|
+
return new Proxy(baseObj, {
|
|
13
|
+
get(_target, prop, _receiver) {
|
|
14
|
+
if (prop in extObj) {
|
|
15
|
+
return extObj[prop];
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return baseObj[prop];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
set(_target, prop, value) {
|
|
22
|
+
if (prop in extObj) {
|
|
23
|
+
delete extObj[prop];
|
|
24
|
+
}
|
|
25
|
+
baseObj[prop] = value;
|
|
26
|
+
return true;
|
|
27
|
+
},
|
|
28
|
+
deleteProperty(_target, prop) {
|
|
29
|
+
let success = false;
|
|
30
|
+
if (prop in extObj) {
|
|
31
|
+
delete extObj[prop];
|
|
32
|
+
success = true;
|
|
33
|
+
}
|
|
34
|
+
if (prop in baseObj) {
|
|
35
|
+
delete baseObj[prop];
|
|
36
|
+
success = true;
|
|
37
|
+
}
|
|
38
|
+
return success;
|
|
39
|
+
},
|
|
40
|
+
ownKeys(_target) {
|
|
41
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
42
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
43
|
+
const extKeysSet = new Set(extKeys);
|
|
44
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
45
|
+
},
|
|
46
|
+
defineProperty(_target, prop, desc) {
|
|
47
|
+
if (prop in extObj) {
|
|
48
|
+
delete extObj[prop];
|
|
49
|
+
}
|
|
50
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
51
|
+
return true;
|
|
52
|
+
},
|
|
53
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
54
|
+
if (prop in extObj) {
|
|
55
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
has(_target, prop) {
|
|
62
|
+
return prop in extObj || prop in baseObj;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when an assertion fails.
|
|
3
|
+
*
|
|
4
|
+
* @example Usage
|
|
5
|
+
* ```ts ignore
|
|
6
|
+
* import { AssertionError } from "@std/assert";
|
|
7
|
+
*
|
|
8
|
+
* try {
|
|
9
|
+
* throw new AssertionError("foo", { cause: "bar" });
|
|
10
|
+
* } catch (error) {
|
|
11
|
+
* if (error instanceof AssertionError) {
|
|
12
|
+
* error.message === "foo"; // true
|
|
13
|
+
* error.cause === "bar"; // true
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class AssertionError extends Error {
|
|
19
|
+
/** Constructs a new instance.
|
|
20
|
+
*
|
|
21
|
+
* @param message The error message.
|
|
22
|
+
* @param options Additional options. This argument is still unstable. It may change in the future release.
|
|
23
|
+
*/
|
|
24
|
+
constructor(message: string, options?: ErrorOptions);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=assertion_error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AssertionError = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when an assertion fails.
|
|
8
|
+
*
|
|
9
|
+
* @example Usage
|
|
10
|
+
* ```ts ignore
|
|
11
|
+
* import { AssertionError } from "@std/assert";
|
|
12
|
+
*
|
|
13
|
+
* try {
|
|
14
|
+
* throw new AssertionError("foo", { cause: "bar" });
|
|
15
|
+
* } catch (error) {
|
|
16
|
+
* if (error instanceof AssertionError) {
|
|
17
|
+
* error.message === "foo"; // true
|
|
18
|
+
* error.cause === "bar"; // true
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
class AssertionError extends Error {
|
|
24
|
+
/** Constructs a new instance.
|
|
25
|
+
*
|
|
26
|
+
* @param message The error message.
|
|
27
|
+
* @param options Additional options. This argument is still unstable. It may change in the future release.
|
|
28
|
+
*/
|
|
29
|
+
constructor(message, options) {
|
|
30
|
+
super(message, options);
|
|
31
|
+
this.name = "AssertionError";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AssertionError = AssertionError;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep equality comparison used in assertions.
|
|
3
|
+
*
|
|
4
|
+
* @param a The actual value
|
|
5
|
+
* @param b The expected value
|
|
6
|
+
* @returns `true` if the values are deeply equal, `false` otherwise
|
|
7
|
+
*
|
|
8
|
+
* @example Usage
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { equal } from "@std/assert/equal";
|
|
11
|
+
*
|
|
12
|
+
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
|
13
|
+
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function equal(a: unknown, b: unknown): boolean;
|
|
17
|
+
//# sourceMappingURL=equal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/equal.ts"],"names":[],"mappings":"AA2FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAuGrD"}
|