@goast/typescript 0.4.4 → 0.5.1-k6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +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 +419 -418
- package/assets/client/k6/request-builder.ts +341 -0
- package/assets/stubs/easy-network-stub/easy-network-stub.utils.ts +259 -259
- package/esm/src/file-builder.js +1 -1
- package/esm/src/generators/services/angular-services/angular-service-generator.d.ts +1 -0
- package/esm/src/generators/services/angular-services/angular-service-generator.d.ts.map +1 -1
- package/esm/src/generators/services/angular-services/angular-service-generator.js +31 -30
- package/esm/src/generators/services/angular-services/models.d.ts +6 -1
- package/esm/src/generators/services/angular-services/models.d.ts.map +1 -1
- package/esm/src/generators/services/angular-services/models.js +2 -1
- 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.d.ts +2 -2
- package/esm/src/generators/services/k6-clients/k6-client-generator.d.ts.map +1 -1
- package/esm/src/generators/services/k6-clients/k6-client-generator.js +109 -57
- package/esm/src/generators/services/k6-clients/k6-clients-generator.d.ts.map +1 -1
- package/esm/src/generators/services/k6-clients/k6-clients-generator.js +5 -2
- package/esm/src/generators/services/k6-clients/models.d.ts +5 -0
- package/esm/src/generators/services/k6-clients/models.d.ts.map +1 -1
- package/esm/src/generators/services/k6-clients/models.js +1 -1
- package/esm/src/generators/services/k6-clients/refs.d.ts.map +1 -1
- package/esm/src/generators/services/k6-clients/refs.js +2 -1
- package/package.json +2 -5
- package/script/src/file-builder.js +1 -1
- package/script/src/generators/services/angular-services/angular-service-generator.d.ts +1 -0
- package/script/src/generators/services/angular-services/angular-service-generator.d.ts.map +1 -1
- package/script/src/generators/services/angular-services/angular-service-generator.js +31 -30
- package/script/src/generators/services/angular-services/models.d.ts +6 -1
- package/script/src/generators/services/angular-services/models.d.ts.map +1 -1
- package/script/src/generators/services/angular-services/models.js +2 -1
- 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.d.ts +2 -2
- package/script/src/generators/services/k6-clients/k6-client-generator.d.ts.map +1 -1
- package/script/src/generators/services/k6-clients/k6-client-generator.js +109 -57
- package/script/src/generators/services/k6-clients/k6-clients-generator.d.ts.map +1 -1
- package/script/src/generators/services/k6-clients/k6-clients-generator.js +5 -2
- package/script/src/generators/services/k6-clients/models.d.ts +5 -0
- package/script/src/generators/services/k6-clients/models.d.ts.map +1 -1
- package/script/src/generators/services/k6-clients/models.js +1 -1
- package/script/src/generators/services/k6-clients/refs.d.ts.map +1 -1
- package/script/src/generators/services/k6-clients/refs.js +2 -1
- package/esm/_dnt.test_polyfills.d.ts +0 -29
- package/esm/_dnt.test_polyfills.d.ts.map +0 -1
- package/esm/_dnt.test_polyfills.js +0 -31
- package/esm/_dnt.test_shims.d.ts +0 -6
- package/esm/_dnt.test_shims.d.ts.map +0 -1
- package/esm/_dnt.test_shims.js +0 -61
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/equal.js +0 -183
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.d.ts +0 -35
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/equals.js +0 -58
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/false.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -54
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -57
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +0 -20
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +0 -29
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +0 -14
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +0 -43
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +0 -17
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +0 -26
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +0 -4
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_assertions.js +0 -13
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +0 -46
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +0 -161
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +0 -6
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_build_message.js +0 -29
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +0 -4
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +0 -11
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +0 -9
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_equal.js +0 -191
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +0 -4
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_extend.js +0 -11
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +0 -3
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +0 -12
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +0 -34
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_matchers.js +0 -714
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +0 -11
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +0 -10
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +0 -4
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_serializer.js +0 -10
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +0 -843
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_types.js +0 -3
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +0 -9
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/_utils.js +0 -218
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +0 -60
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/expect.js +0 -523
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +0 -29
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/fn.js +0 -85
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +0 -86
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/expect/1.0.12/mod.js +0 -88
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +0 -160
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +0 -199
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -111
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -277
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -180
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +0 -37
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -207
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts +0 -15
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/testing/1.0.9/_mock_utils.js +0 -35
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +0 -79
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +0 -380
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +0 -738
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.js +0 -654
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.d.ts +0 -674
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/testing/1.0.9/mock.js +0 -1083
- package/esm/src/ast/nodes/argument.test.d.ts +0 -2
- package/esm/src/ast/nodes/argument.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/argument.test.js +0 -34
- package/esm/src/ast/nodes/array-type.test.d.ts +0 -2
- package/esm/src/ast/nodes/array-type.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/array-type.test.js +0 -26
- package/esm/src/ast/nodes/arrow-function.test.d.ts +0 -2
- package/esm/src/ast/nodes/arrow-function.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/arrow-function.test.js +0 -62
- package/esm/src/ast/nodes/class.test.d.ts +0 -2
- package/esm/src/ast/nodes/class.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/class.test.js +0 -150
- package/esm/src/ast/nodes/constructor-parameter.test.d.ts +0 -2
- package/esm/src/ast/nodes/constructor-parameter.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/constructor-parameter.test.js +0 -99
- package/esm/src/ast/nodes/constructor.test.d.ts +0 -2
- package/esm/src/ast/nodes/constructor.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/constructor.test.js +0 -102
- package/esm/src/ast/nodes/decorator.test.d.ts +0 -2
- package/esm/src/ast/nodes/decorator.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/decorator.test.js +0 -47
- package/esm/src/ast/nodes/doc-tag.test.d.ts +0 -2
- package/esm/src/ast/nodes/doc-tag.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/doc-tag.test.js +0 -30
- package/esm/src/ast/nodes/doc.test.d.ts +0 -2
- package/esm/src/ast/nodes/doc.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/doc.test.js +0 -31
- package/esm/src/ast/nodes/enum-value.test.d.ts +0 -2
- package/esm/src/ast/nodes/enum-value.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/enum-value.test.js +0 -52
- package/esm/src/ast/nodes/enum.test.d.ts +0 -2
- package/esm/src/ast/nodes/enum.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/enum.test.js +0 -66
- package/esm/src/ast/nodes/export.test.d.ts +0 -2
- package/esm/src/ast/nodes/export.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/export.test.js +0 -22
- package/esm/src/ast/nodes/function-type.test.d.ts +0 -2
- package/esm/src/ast/nodes/function-type.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/function-type.test.js +0 -48
- package/esm/src/ast/nodes/function.test.d.ts +0 -2
- package/esm/src/ast/nodes/function.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/function.test.js +0 -108
- package/esm/src/ast/nodes/generic-parameter.test.d.ts +0 -2
- package/esm/src/ast/nodes/generic-parameter.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/generic-parameter.test.js +0 -70
- package/esm/src/ast/nodes/indexer.test.d.ts +0 -2
- package/esm/src/ast/nodes/indexer.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/indexer.test.js +0 -32
- package/esm/src/ast/nodes/interface.test.d.ts +0 -2
- package/esm/src/ast/nodes/interface.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/interface.test.js +0 -115
- package/esm/src/ast/nodes/intersection-type.test.d.ts +0 -2
- package/esm/src/ast/nodes/intersection-type.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/intersection-type.test.js +0 -38
- package/esm/src/ast/nodes/method.test.d.ts +0 -2
- package/esm/src/ast/nodes/method.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/method.test.js +0 -148
- package/esm/src/ast/nodes/object-type.test.d.ts +0 -2
- package/esm/src/ast/nodes/object-type.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/object-type.test.js +0 -30
- package/esm/src/ast/nodes/object.test.d.ts +0 -2
- package/esm/src/ast/nodes/object.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/object.test.js +0 -30
- package/esm/src/ast/nodes/parameter.test.d.ts +0 -2
- package/esm/src/ast/nodes/parameter.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/parameter.test.js +0 -71
- package/esm/src/ast/nodes/property-accessor.test.d.ts +0 -2
- package/esm/src/ast/nodes/property-accessor.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/property-accessor.test.js +0 -102
- package/esm/src/ast/nodes/property.test.d.ts +0 -2
- package/esm/src/ast/nodes/property.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/property.test.js +0 -89
- package/esm/src/ast/nodes/reference.test.d.ts +0 -2
- package/esm/src/ast/nodes/reference.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/reference.test.js +0 -31
- package/esm/src/ast/nodes/string.test.d.ts +0 -2
- package/esm/src/ast/nodes/string.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/string.test.js +0 -28
- package/esm/src/ast/nodes/tuple.test.d.ts +0 -2
- package/esm/src/ast/nodes/tuple.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/tuple.test.js +0 -33
- package/esm/src/ast/nodes/type-alias.test.d.ts +0 -2
- package/esm/src/ast/nodes/type-alias.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/type-alias.test.js +0 -27
- package/esm/src/ast/nodes/union-type.test.d.ts +0 -2
- package/esm/src/ast/nodes/union-type.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/union-type.test.js +0 -38
- package/esm/src/ast/nodes/variable.test.d.ts +0 -2
- package/esm/src/ast/nodes/variable.test.d.ts.map +0 -1
- package/esm/src/ast/nodes/variable.test.js +0 -38
- package/esm/src/import-collection.test.d.ts +0 -2
- package/esm/src/import-collection.test.d.ts.map +0 -1
- package/esm/src/import-collection.test.js +0 -64
- package/esm/tests/openapi-models.test.d.ts +0 -2
- package/esm/tests/openapi-models.test.d.ts.map +0 -1
- package/esm/tests/openapi-models.test.js +0 -45
- package/script/_dnt.test_polyfills.d.ts +0 -29
- package/script/_dnt.test_polyfills.d.ts.map +0 -1
- package/script/_dnt.test_polyfills.js +0 -32
- package/script/_dnt.test_shims.d.ts +0 -6
- package/script/_dnt.test_shims.d.ts.map +0 -1
- package/script/_dnt.test_shims.js +0 -65
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts +0 -26
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/assertion_error.js +0 -34
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.d.ts +0 -17
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/equal.js +0 -187
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.d.ts +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/equals.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/false.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -57
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -60
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts +0 -20
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_equals.js +0 -32
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts +0 -14
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.js +0 -46
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts +0 -17
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.js +0 -29
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts +0 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_assertions.js +0 -18
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts +0 -46
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.js +0 -183
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts +0 -6
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_build_message.js +0 -33
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts +0 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.js +0 -15
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts +0 -9
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_equal.js +0 -194
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts +0 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_extend.js +0 -15
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts +0 -3
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_inspect_args.js +0 -17
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts +0 -34
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_matchers.js +0 -748
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts +0 -11
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_mock_util.js +0 -14
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts +0 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_serializer.js +0 -14
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts +0 -843
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_types.js +0 -4
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts +0 -9
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/_utils.js +0 -226
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts +0 -60
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/expect.js +0 -527
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts +0 -29
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/fn.js +0 -88
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts +0 -86
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/expect/1.0.12/mod.js +0 -91
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts +0 -160
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.js +0 -204
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -116
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -284
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -186
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/format.js +0 -41
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -220
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts +0 -15
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/testing/1.0.9/_mock_utils.js +0 -41
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts +0 -79
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.js +0 -385
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts +0 -738
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.js +0 -665
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.d.ts +0 -674
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/testing/1.0.9/mock.js +0 -1102
- package/script/src/ast/nodes/argument.test.d.ts +0 -2
- package/script/src/ast/nodes/argument.test.d.ts.map +0 -1
- package/script/src/ast/nodes/argument.test.js +0 -36
- package/script/src/ast/nodes/array-type.test.d.ts +0 -2
- package/script/src/ast/nodes/array-type.test.d.ts.map +0 -1
- package/script/src/ast/nodes/array-type.test.js +0 -28
- package/script/src/ast/nodes/arrow-function.test.d.ts +0 -2
- package/script/src/ast/nodes/arrow-function.test.d.ts.map +0 -1
- package/script/src/ast/nodes/arrow-function.test.js +0 -64
- package/script/src/ast/nodes/class.test.d.ts +0 -2
- package/script/src/ast/nodes/class.test.d.ts.map +0 -1
- package/script/src/ast/nodes/class.test.js +0 -152
- package/script/src/ast/nodes/constructor-parameter.test.d.ts +0 -2
- package/script/src/ast/nodes/constructor-parameter.test.d.ts.map +0 -1
- package/script/src/ast/nodes/constructor-parameter.test.js +0 -101
- package/script/src/ast/nodes/constructor.test.d.ts +0 -2
- package/script/src/ast/nodes/constructor.test.d.ts.map +0 -1
- package/script/src/ast/nodes/constructor.test.js +0 -104
- package/script/src/ast/nodes/decorator.test.d.ts +0 -2
- package/script/src/ast/nodes/decorator.test.d.ts.map +0 -1
- package/script/src/ast/nodes/decorator.test.js +0 -49
- package/script/src/ast/nodes/doc-tag.test.d.ts +0 -2
- package/script/src/ast/nodes/doc-tag.test.d.ts.map +0 -1
- package/script/src/ast/nodes/doc-tag.test.js +0 -32
- package/script/src/ast/nodes/doc.test.d.ts +0 -2
- package/script/src/ast/nodes/doc.test.d.ts.map +0 -1
- package/script/src/ast/nodes/doc.test.js +0 -33
- package/script/src/ast/nodes/enum-value.test.d.ts +0 -2
- package/script/src/ast/nodes/enum-value.test.d.ts.map +0 -1
- package/script/src/ast/nodes/enum-value.test.js +0 -54
- package/script/src/ast/nodes/enum.test.d.ts +0 -2
- package/script/src/ast/nodes/enum.test.d.ts.map +0 -1
- package/script/src/ast/nodes/enum.test.js +0 -68
- package/script/src/ast/nodes/export.test.d.ts +0 -2
- package/script/src/ast/nodes/export.test.d.ts.map +0 -1
- package/script/src/ast/nodes/export.test.js +0 -24
- package/script/src/ast/nodes/function-type.test.d.ts +0 -2
- package/script/src/ast/nodes/function-type.test.d.ts.map +0 -1
- package/script/src/ast/nodes/function-type.test.js +0 -50
- package/script/src/ast/nodes/function.test.d.ts +0 -2
- package/script/src/ast/nodes/function.test.d.ts.map +0 -1
- package/script/src/ast/nodes/function.test.js +0 -110
- package/script/src/ast/nodes/generic-parameter.test.d.ts +0 -2
- package/script/src/ast/nodes/generic-parameter.test.d.ts.map +0 -1
- package/script/src/ast/nodes/generic-parameter.test.js +0 -72
- package/script/src/ast/nodes/indexer.test.d.ts +0 -2
- package/script/src/ast/nodes/indexer.test.d.ts.map +0 -1
- package/script/src/ast/nodes/indexer.test.js +0 -34
- package/script/src/ast/nodes/interface.test.d.ts +0 -2
- package/script/src/ast/nodes/interface.test.d.ts.map +0 -1
- package/script/src/ast/nodes/interface.test.js +0 -117
- package/script/src/ast/nodes/intersection-type.test.d.ts +0 -2
- package/script/src/ast/nodes/intersection-type.test.d.ts.map +0 -1
- package/script/src/ast/nodes/intersection-type.test.js +0 -40
- package/script/src/ast/nodes/method.test.d.ts +0 -2
- package/script/src/ast/nodes/method.test.d.ts.map +0 -1
- package/script/src/ast/nodes/method.test.js +0 -150
- package/script/src/ast/nodes/object-type.test.d.ts +0 -2
- package/script/src/ast/nodes/object-type.test.d.ts.map +0 -1
- package/script/src/ast/nodes/object-type.test.js +0 -32
- package/script/src/ast/nodes/object.test.d.ts +0 -2
- package/script/src/ast/nodes/object.test.d.ts.map +0 -1
- package/script/src/ast/nodes/object.test.js +0 -32
- package/script/src/ast/nodes/parameter.test.d.ts +0 -2
- package/script/src/ast/nodes/parameter.test.d.ts.map +0 -1
- package/script/src/ast/nodes/parameter.test.js +0 -73
- package/script/src/ast/nodes/property-accessor.test.d.ts +0 -2
- package/script/src/ast/nodes/property-accessor.test.d.ts.map +0 -1
- package/script/src/ast/nodes/property-accessor.test.js +0 -104
- package/script/src/ast/nodes/property.test.d.ts +0 -2
- package/script/src/ast/nodes/property.test.d.ts.map +0 -1
- package/script/src/ast/nodes/property.test.js +0 -91
- package/script/src/ast/nodes/reference.test.d.ts +0 -2
- package/script/src/ast/nodes/reference.test.d.ts.map +0 -1
- package/script/src/ast/nodes/reference.test.js +0 -33
- package/script/src/ast/nodes/string.test.d.ts +0 -2
- package/script/src/ast/nodes/string.test.d.ts.map +0 -1
- package/script/src/ast/nodes/string.test.js +0 -30
- package/script/src/ast/nodes/tuple.test.d.ts +0 -2
- package/script/src/ast/nodes/tuple.test.d.ts.map +0 -1
- package/script/src/ast/nodes/tuple.test.js +0 -35
- package/script/src/ast/nodes/type-alias.test.d.ts +0 -2
- package/script/src/ast/nodes/type-alias.test.d.ts.map +0 -1
- package/script/src/ast/nodes/type-alias.test.js +0 -29
- package/script/src/ast/nodes/union-type.test.d.ts +0 -2
- package/script/src/ast/nodes/union-type.test.d.ts.map +0 -1
- package/script/src/ast/nodes/union-type.test.js +0 -40
- package/script/src/ast/nodes/variable.test.d.ts +0 -2
- package/script/src/ast/nodes/variable.test.d.ts.map +0 -1
- package/script/src/ast/nodes/variable.test.js +0 -40
- package/script/src/import-collection.test.d.ts +0 -2
- package/script/src/import-collection.test.d.ts.map +0 -1
- package/script/src/import-collection.test.js +0 -66
- package/script/tests/openapi-models.test.d.ts +0 -2
- package/script/tests/openapi-models.test.d.ts.map +0 -1
- package/script/tests/openapi-models.test.js +0 -48
- package/src/_dnt.test_polyfills.ts +0 -70
- package/src/_dnt.test_shims.ts +0 -64
- package/src/deps/jsr.io/@std/assert/1.0.11/assertion_error.ts +0 -31
- package/src/deps/jsr.io/@std/assert/1.0.11/equal.ts +0 -210
- package/src/deps/jsr.io/@std/assert/1.0.11/equals.ts +0 -65
- package/src/deps/jsr.io/@std/assert/1.0.11/false.ts +0 -26
- package/src/deps/jsr.io/@std/assert/1.0.11/instance_of.ts +0 -64
- package/src/deps/jsr.io/@std/assert/1.0.11/is_error.ts +0 -65
- package/src/deps/jsr.io/@std/assert/1.0.11/match.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.11/not_instance_of.ts +0 -33
- package/src/deps/jsr.io/@std/assert/1.0.11/not_match.ts +0 -30
- package/src/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.ts +0 -42
- package/src/deps/jsr.io/@std/assert/1.0.11/rejects.ts +0 -123
- package/src/deps/jsr.io/@std/assert/1.0.11/strict_equals.ts +0 -67
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_equals.ts +0 -38
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_is_error.ts +0 -54
- package/src/deps/jsr.io/@std/expect/1.0.12/_assert_not_equals.ts +0 -35
- package/src/deps/jsr.io/@std/expect/1.0.12/_assertions.ts +0 -18
- package/src/deps/jsr.io/@std/expect/1.0.12/_asymmetric_matchers.ts +0 -198
- package/src/deps/jsr.io/@std/expect/1.0.12/_build_message.ts +0 -51
- package/src/deps/jsr.io/@std/expect/1.0.12/_custom_equality_tester.ts +0 -19
- package/src/deps/jsr.io/@std/expect/1.0.12/_equal.ts +0 -230
- package/src/deps/jsr.io/@std/expect/1.0.12/_extend.ts +0 -16
- package/src/deps/jsr.io/@std/expect/1.0.12/_inspect_args.ts +0 -15
- package/src/deps/jsr.io/@std/expect/1.0.12/_matchers.ts +0 -1028
- package/src/deps/jsr.io/@std/expect/1.0.12/_mock_util.ts +0 -22
- package/src/deps/jsr.io/@std/expect/1.0.12/_serializer.ts +0 -15
- package/src/deps/jsr.io/@std/expect/1.0.12/_types.ts +0 -923
- package/src/deps/jsr.io/@std/expect/1.0.12/_utils.ts +0 -283
- package/src/deps/jsr.io/@std/expect/1.0.12/expect.ts +0 -620
- package/src/deps/jsr.io/@std/expect/1.0.12/fn.ts +0 -91
- package/src/deps/jsr.io/@std/expect/1.0.12/mod.ts +0 -89
- package/src/deps/jsr.io/@std/internal/1.0.5/assertion_state.ts +0 -214
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +0 -134
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +0 -317
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +0 -204
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +0 -39
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +0 -233
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +0 -18
- package/src/deps/jsr.io/@std/testing/1.0.9/_mock_utils.ts +0 -43
- package/src/deps/jsr.io/@std/testing/1.0.9/_test_suite.ts +0 -448
- package/src/deps/jsr.io/@std/testing/1.0.9/bdd.ts +0 -1288
- package/src/deps/jsr.io/@std/testing/1.0.9/mock.ts +0 -1807
- package/src/mod.ts +0 -7
- package/src/src/assets.ts +0 -9
- package/src/src/ast/_index.ts +0 -54
- package/src/src/ast/common.ts +0 -1
- package/src/src/ast/index.ts +0 -1
- package/src/src/ast/node.ts +0 -10
- package/src/src/ast/nodes/argument.test.ts +0 -43
- package/src/src/ast/nodes/argument.ts +0 -40
- package/src/src/ast/nodes/array-type.test.ts +0 -34
- package/src/src/ast/nodes/array-type.ts +0 -49
- package/src/src/ast/nodes/arrow-function.test.ts +0 -79
- package/src/src/ast/nodes/arrow-function.ts +0 -91
- package/src/src/ast/nodes/call.ts +0 -55
- package/src/src/ast/nodes/class.test.ts +0 -185
- package/src/src/ast/nodes/class.ts +0 -133
- package/src/src/ast/nodes/constructor-parameter.test.ts +0 -122
- package/src/src/ast/nodes/constructor-parameter.ts +0 -70
- package/src/src/ast/nodes/constructor.test.ts +0 -131
- package/src/src/ast/nodes/constructor.ts +0 -77
- package/src/src/ast/nodes/decorator.test.ts +0 -59
- package/src/src/ast/nodes/decorator.ts +0 -76
- package/src/src/ast/nodes/doc-tag.test.ts +0 -40
- package/src/src/ast/nodes/doc-tag.ts +0 -291
- package/src/src/ast/nodes/doc.test.ts +0 -40
- package/src/src/ast/nodes/doc.ts +0 -102
- package/src/src/ast/nodes/enum-value.test.ts +0 -66
- package/src/src/ast/nodes/enum-value.ts +0 -72
- package/src/src/ast/nodes/enum.test.ts +0 -85
- package/src/src/ast/nodes/enum.ts +0 -77
- package/src/src/ast/nodes/export.test.ts +0 -29
- package/src/src/ast/nodes/export.ts +0 -54
- package/src/src/ast/nodes/function-type.test.ts +0 -61
- package/src/src/ast/nodes/function-type.ts +0 -60
- package/src/src/ast/nodes/function.test.ts +0 -135
- package/src/src/ast/nodes/function.ts +0 -107
- package/src/src/ast/nodes/generic-parameter.test.ts +0 -86
- package/src/src/ast/nodes/generic-parameter.ts +0 -71
- package/src/src/ast/nodes/indexer.test.ts +0 -42
- package/src/src/ast/nodes/indexer.ts +0 -60
- package/src/src/ast/nodes/interface.test.ts +0 -142
- package/src/src/ast/nodes/interface.ts +0 -117
- package/src/src/ast/nodes/intersection-type.test.ts +0 -52
- package/src/src/ast/nodes/intersection-type.ts +0 -67
- package/src/src/ast/nodes/lookup-type.ts +0 -53
- package/src/src/ast/nodes/method.test.ts +0 -185
- package/src/src/ast/nodes/method.ts +0 -138
- package/src/src/ast/nodes/object-type.test.ts +0 -40
- package/src/src/ast/nodes/object-type.ts +0 -52
- package/src/src/ast/nodes/object.test.ts +0 -40
- package/src/src/ast/nodes/object.ts +0 -48
- package/src/src/ast/nodes/parameter.test.ts +0 -88
- package/src/src/ast/nodes/parameter.ts +0 -85
- package/src/src/ast/nodes/property-accessor.test.ts +0 -132
- package/src/src/ast/nodes/property-accessor.ts +0 -173
- package/src/src/ast/nodes/property.test.ts +0 -113
- package/src/src/ast/nodes/property.ts +0 -192
- package/src/src/ast/nodes/reference.test.ts +0 -42
- package/src/src/ast/nodes/reference.ts +0 -194
- package/src/src/ast/nodes/string.test.ts +0 -35
- package/src/src/ast/nodes/string.ts +0 -49
- package/src/src/ast/nodes/tuple.test.ts +0 -45
- package/src/src/ast/nodes/tuple.ts +0 -53
- package/src/src/ast/nodes/type-alias.test.ts +0 -35
- package/src/src/ast/nodes/type-alias.ts +0 -75
- package/src/src/ast/nodes/typeof.ts +0 -42
- package/src/src/ast/nodes/types.ts +0 -40
- package/src/src/ast/nodes/union-type.test.ts +0 -50
- package/src/src/ast/nodes/union-type.ts +0 -62
- package/src/src/ast/nodes/variable.test.ts +0 -49
- package/src/src/ast/nodes/variable.ts +0 -73
- package/src/src/ast/references/angular.ts +0 -24
- package/src/src/ast/references/easy-network-stub.ts +0 -21
- package/src/src/ast/references/index.ts +0 -5
- package/src/src/ast/references/k6.ts +0 -8
- package/src/src/ast/references/rxjs.ts +0 -7
- package/src/src/ast/references/typescript.ts +0 -35
- package/src/src/ast/utils/get-type-script-builder-options.ts +0 -19
- package/src/src/ast/utils/to-ts-node.ts +0 -27
- package/src/src/ast/utils/write-ts-generic-parameters.ts +0 -25
- package/src/src/ast/utils/write-ts-members.ts +0 -28
- package/src/src/ast/utils/write-ts-nodes.ts +0 -35
- package/src/src/ast/utils/write-ts-parameters.ts +0 -25
- package/src/src/common-results.ts +0 -26
- package/src/src/config.ts +0 -89
- package/src/src/file-builder.ts +0 -136
- package/src/src/generators/file-generator.ts +0 -15
- package/src/src/generators/index.ts +0 -6
- package/src/src/generators/models/index.ts +0 -3
- package/src/src/generators/models/model-generator.ts +0 -469
- package/src/src/generators/models/models-generator.ts +0 -108
- package/src/src/generators/models/models.ts +0 -112
- package/src/src/generators/services/angular-services/angular-service-generator.ts +0 -404
- package/src/src/generators/services/angular-services/angular-services-generator.ts +0 -295
- package/src/src/generators/services/angular-services/index.ts +0 -3
- package/src/src/generators/services/angular-services/models.ts +0 -270
- package/src/src/generators/services/angular-services/refs.ts +0 -54
- package/src/src/generators/services/easy-network-stub/easy-network-stub-generator.ts +0 -242
- package/src/src/generators/services/easy-network-stub/easy-network-stubs-generator.ts +0 -211
- package/src/src/generators/services/easy-network-stub/index.ts +0 -3
- package/src/src/generators/services/easy-network-stub/models.ts +0 -124
- package/src/src/generators/services/easy-network-stub/refs.ts +0 -45
- package/src/src/generators/services/fetch-clients/fetch-client-generator.ts +0 -267
- package/src/src/generators/services/fetch-clients/fetch-clients-generator.ts +0 -163
- package/src/src/generators/services/fetch-clients/index.ts +0 -3
- package/src/src/generators/services/fetch-clients/models.ts +0 -130
- package/src/src/generators/services/fetch-clients/refs.ts +0 -21
- package/src/src/generators/services/k6-clients/index.ts +0 -3
- package/src/src/generators/services/k6-clients/k6-client-generator.ts +0 -409
- package/src/src/generators/services/k6-clients/k6-clients-generator.ts +0 -165
- package/src/src/generators/services/k6-clients/models.ts +0 -241
- package/src/src/generators/services/k6-clients/refs.ts +0 -15
- package/src/src/import-collection.test.ts +0 -78
- package/src/src/import-collection.ts +0 -236
- package/src/src/utils.ts +0 -72
- package/src/tests/openapi-models.test.ts +0 -64
- package/test_runner.js +0 -239
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ApiSchema,
|
|
3
|
-
ApiService,
|
|
4
|
-
DefaultGenerationProviderConfig,
|
|
5
|
-
ExtendedStringCasing,
|
|
6
|
-
Nullable,
|
|
7
|
-
OpenApiServicesGenerationProviderContext,
|
|
8
|
-
} from '@goast/core';
|
|
9
|
-
|
|
10
|
-
import type { ts } from '../../../ast/index.js';
|
|
11
|
-
import type { TypeScriptExportOutput } from '../../../common-results.js';
|
|
12
|
-
import { defaultTypeScriptGeneratorConfig, type TypeScriptGeneratorConfig } from '../../../config.js';
|
|
13
|
-
import type { TypeScriptFileBuilder } from '../../../file-builder.js';
|
|
14
|
-
import type { TypeScriptModelsGeneratorOutput } from '../../models/index.js';
|
|
15
|
-
import type { getReferenceFactories } from './refs.js';
|
|
16
|
-
|
|
17
|
-
export type TypeScriptK6ClientsGeneratorConfig = TypeScriptGeneratorConfig & {
|
|
18
|
-
/**
|
|
19
|
-
* Whether to use strict response types for the services.
|
|
20
|
-
* If enabled only the status codes are included that are defined in the OpenAPI specification or the `defaultStatusCodeResponseTypes` option.
|
|
21
|
-
* @default true
|
|
22
|
-
*/
|
|
23
|
-
strictResponseTypes: boolean;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The default response types for status codes that are not defined in the OpenAPI specification.
|
|
27
|
-
* @example
|
|
28
|
-
* {
|
|
29
|
-
* 400: {
|
|
30
|
-
* parser: 'json',
|
|
31
|
-
* type: schemas =>
|
|
32
|
-
* schemas.find(s => s.name === 'BadRequestResponse')
|
|
33
|
-
* ?? throwExp('BadRequestResponse not found'),
|
|
34
|
-
* },
|
|
35
|
-
* 404: null,
|
|
36
|
-
* 500: {
|
|
37
|
-
* parser: 'json',
|
|
38
|
-
* type: ts.refs.any(),
|
|
39
|
-
* },
|
|
40
|
-
* }
|
|
41
|
-
* @default
|
|
42
|
-
* {
|
|
43
|
-
* 401: null,
|
|
44
|
-
* 403: null,
|
|
45
|
-
* 500: null,
|
|
46
|
-
* }
|
|
47
|
-
*/
|
|
48
|
-
defaultStatusCodeResponseTypes: Record<
|
|
49
|
-
number,
|
|
50
|
-
{
|
|
51
|
-
parser: 'text' | 'json';
|
|
52
|
-
// deno-lint-ignore ban-types
|
|
53
|
-
type: Exclude<ts.Type<TypeScriptFileBuilder>, Function> | ((schemas: readonly ApiSchema[]) => ApiSchema);
|
|
54
|
-
} | null
|
|
55
|
-
>;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* The possible status codes that any API endpoint can return.
|
|
59
|
-
* This is only used when `strictResponseTypes` is set to `false`.
|
|
60
|
-
* @default
|
|
61
|
-
* [100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511]
|
|
62
|
-
*/
|
|
63
|
-
possibleStatusCodes: number[];
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* The casing of the client file names. If nullish, the `fileNameCasing` is used.
|
|
67
|
-
* @default { casing: 'kebab', suffix: '-client' }
|
|
68
|
-
*/
|
|
69
|
-
clientFileNameCasing: Nullable<ExtendedStringCasing>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* The casing of the file names for the response models. If nullish, the `fileNameCasing` is used.
|
|
73
|
-
* @default { casing: 'kebab', suffix: '-responses' }
|
|
74
|
-
*/
|
|
75
|
-
responseModelFileNameCasing: Nullable<ExtendedStringCasing>;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The casing of the client names. If nullish, the `typeNameCasing` is used.
|
|
79
|
-
* @default { casing: 'pascal', suffix: 'Client' }
|
|
80
|
-
*/
|
|
81
|
-
clientNameCasing: Nullable<ExtendedStringCasing>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The directory where the client files should be saved. The path is relative to the output directory.
|
|
85
|
-
* @default 'clients'
|
|
86
|
-
*/
|
|
87
|
-
clientDir: string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The directory where the response models should be saved. The path is relative to the output directory.
|
|
91
|
-
* @default 'models/responses'
|
|
92
|
-
*/
|
|
93
|
-
responseModelsDir: string;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The index file where all clients should be exported. The path is relative to the output directory. If nullish, no index file will be generated.
|
|
97
|
-
* @default 'clients.ts'
|
|
98
|
-
*/
|
|
99
|
-
clientsIndexFile: Nullable<string>;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* The path to the index file where all response models should be exported. The path is relative to the output directory. If nullish, no index file will be generated.
|
|
103
|
-
* @default 'responses.ts'
|
|
104
|
-
*/
|
|
105
|
-
responseModelsIndexFile: Nullable<string>;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* The directory where the utilies should be saved. The path is relative to the output directory.
|
|
109
|
-
* @default 'utils'
|
|
110
|
-
*/
|
|
111
|
-
utilsDir: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Whether to generate clients calling the async API of k6.
|
|
115
|
-
* @default true
|
|
116
|
-
*/
|
|
117
|
-
async: boolean;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const defaultTypeScriptK6ClientsGeneratorConfig: DefaultGenerationProviderConfig<
|
|
121
|
-
TypeScriptK6ClientsGeneratorConfig
|
|
122
|
-
> = {
|
|
123
|
-
...defaultTypeScriptGeneratorConfig,
|
|
124
|
-
importModuleTransformer: 'js-extension',
|
|
125
|
-
|
|
126
|
-
strictResponseTypes: true,
|
|
127
|
-
defaultStatusCodeResponseTypes: {
|
|
128
|
-
401: null,
|
|
129
|
-
403: null,
|
|
130
|
-
500: null,
|
|
131
|
-
},
|
|
132
|
-
possibleStatusCodes: [
|
|
133
|
-
100,
|
|
134
|
-
101,
|
|
135
|
-
102,
|
|
136
|
-
103,
|
|
137
|
-
200,
|
|
138
|
-
201,
|
|
139
|
-
202,
|
|
140
|
-
203,
|
|
141
|
-
204,
|
|
142
|
-
205,
|
|
143
|
-
206,
|
|
144
|
-
207,
|
|
145
|
-
208,
|
|
146
|
-
226,
|
|
147
|
-
300,
|
|
148
|
-
301,
|
|
149
|
-
302,
|
|
150
|
-
303,
|
|
151
|
-
304,
|
|
152
|
-
305,
|
|
153
|
-
306,
|
|
154
|
-
307,
|
|
155
|
-
308,
|
|
156
|
-
400,
|
|
157
|
-
401,
|
|
158
|
-
402,
|
|
159
|
-
403,
|
|
160
|
-
404,
|
|
161
|
-
405,
|
|
162
|
-
406,
|
|
163
|
-
407,
|
|
164
|
-
408,
|
|
165
|
-
409,
|
|
166
|
-
410,
|
|
167
|
-
411,
|
|
168
|
-
412,
|
|
169
|
-
413,
|
|
170
|
-
414,
|
|
171
|
-
415,
|
|
172
|
-
416,
|
|
173
|
-
417,
|
|
174
|
-
421,
|
|
175
|
-
422,
|
|
176
|
-
423,
|
|
177
|
-
424,
|
|
178
|
-
425,
|
|
179
|
-
426,
|
|
180
|
-
428,
|
|
181
|
-
429,
|
|
182
|
-
431,
|
|
183
|
-
451,
|
|
184
|
-
500,
|
|
185
|
-
501,
|
|
186
|
-
502,
|
|
187
|
-
503,
|
|
188
|
-
504,
|
|
189
|
-
505,
|
|
190
|
-
506,
|
|
191
|
-
507,
|
|
192
|
-
508,
|
|
193
|
-
510,
|
|
194
|
-
511,
|
|
195
|
-
],
|
|
196
|
-
|
|
197
|
-
clientFileNameCasing: { casing: 'kebab', suffix: '-client' },
|
|
198
|
-
responseModelFileNameCasing: { casing: 'kebab', suffix: '-responses' },
|
|
199
|
-
clientNameCasing: { casing: 'pascal', suffix: 'Client' },
|
|
200
|
-
clientDir: 'clients',
|
|
201
|
-
responseModelsDir: 'models/responses',
|
|
202
|
-
clientsIndexFile: 'clients.js',
|
|
203
|
-
responseModelsIndexFile: 'responses.ts',
|
|
204
|
-
utilsDir: 'utils',
|
|
205
|
-
async: true,
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export type TypeScriptK6ClientsGeneratorInput = TypeScriptModelsGeneratorOutput;
|
|
209
|
-
|
|
210
|
-
export type TypeScriptK6ClientsGeneratorOutput = {
|
|
211
|
-
typescript: {
|
|
212
|
-
k6Clients: {
|
|
213
|
-
[serviceId: string]: TypeScriptK6ClientGeneratorOutput;
|
|
214
|
-
};
|
|
215
|
-
indexFiles: {
|
|
216
|
-
k6Clients: Nullable<string>;
|
|
217
|
-
k6ResponseModels: Nullable<string>;
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export type TypeScriptK6ClientGeneratorOutput = TypeScriptExportOutput & {
|
|
223
|
-
responseModels: {
|
|
224
|
-
[operationId: string]: TypeScriptExportOutput;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
export type TypeScriptK6ClientsGeneratorContext =
|
|
229
|
-
& OpenApiServicesGenerationProviderContext<
|
|
230
|
-
TypeScriptK6ClientsGeneratorInput,
|
|
231
|
-
TypeScriptK6ClientsGeneratorOutput,
|
|
232
|
-
TypeScriptK6ClientsGeneratorConfig,
|
|
233
|
-
TypeScriptK6ClientGeneratorOutput
|
|
234
|
-
>
|
|
235
|
-
& {
|
|
236
|
-
refs: ReturnType<typeof getReferenceFactories>;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export type TypeScriptK6ClientGeneratorContext = TypeScriptK6ClientsGeneratorContext & {
|
|
240
|
-
readonly service: ApiService;
|
|
241
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { join, resolve } from 'node:path';
|
|
2
|
-
|
|
3
|
-
import { ts } from '../../../ast/index.js';
|
|
4
|
-
import type { TypeScriptK6ClientsGeneratorConfig } from './models.js';
|
|
5
|
-
|
|
6
|
-
export function getReferenceFactories(options: TypeScriptK6ClientsGeneratorConfig): {
|
|
7
|
-
requestBuilder: ts.ModuleReferenceFactory;
|
|
8
|
-
httpStatusCode: ts.ModuleReferenceFactory;
|
|
9
|
-
} {
|
|
10
|
-
const utilsDirPath = resolve(options.outputDir, options.utilsDir);
|
|
11
|
-
return {
|
|
12
|
-
requestBuilder: ts.reference.factory('RequestBuilder', join(utilsDirPath, 'request-builder.js')),
|
|
13
|
-
httpStatusCode: ts.reference.factory('HttpStatusCode', join(utilsDirPath, 'http-status-code.ts')),
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import "../_dnt.test_polyfills.js";
|
|
2
|
-
import type { SourceBuilderOptions } from '@goast/core';
|
|
3
|
-
|
|
4
|
-
import { expect } from '../deps/jsr.io/@std/expect/1.0.12/mod.js';
|
|
5
|
-
import { beforeEach, describe, it } from '../deps/jsr.io/@std/testing/1.0.9/bdd.js';
|
|
6
|
-
|
|
7
|
-
import { ImportExportCollection } from './import-collection.js';
|
|
8
|
-
|
|
9
|
-
describe('ImportExportCollection', () => {
|
|
10
|
-
let collection: ImportExportCollection;
|
|
11
|
-
let sourceBuilderOptions: Partial<SourceBuilderOptions>;
|
|
12
|
-
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
collection = new ImportExportCollection({ importModuleTransformer: 'omit-extension' });
|
|
15
|
-
sourceBuilderOptions = { newLine: '\n' };
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
describe('addImport', () => {
|
|
19
|
-
it('should add a new import to the collection', () => {
|
|
20
|
-
collection.addImport('myImport', 'myModule');
|
|
21
|
-
expect(collection.hasImports).toBe(true);
|
|
22
|
-
expect(collection.hasExports).toBe(false);
|
|
23
|
-
expect(collection.toString(sourceBuilderOptions)).toBe("import { myImport } from 'myModule';\n");
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('should add a new import to an existing module', () => {
|
|
27
|
-
collection.addImport('myImport1', 'myModule');
|
|
28
|
-
collection.addImport('myImport2', 'myModule');
|
|
29
|
-
expect(collection.hasImports).toBe(true);
|
|
30
|
-
expect(collection.hasExports).toBe(false);
|
|
31
|
-
expect(collection.toString(sourceBuilderOptions)).toBe("import { myImport1, myImport2 } from 'myModule';\n");
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
describe('addExport', () => {
|
|
36
|
-
it('should add a new export to the collection', () => {
|
|
37
|
-
collection.addExport('myExport', 'myModule');
|
|
38
|
-
expect(collection.hasImports).toBe(false);
|
|
39
|
-
expect(collection.hasExports).toBe(true);
|
|
40
|
-
expect(collection.toString(sourceBuilderOptions)).toBe("export { myExport } from 'myModule';\n");
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should add a new export to an existing module', () => {
|
|
44
|
-
collection.addExport('myExport1', 'myModule');
|
|
45
|
-
collection.addExport('myExport2', 'myModule');
|
|
46
|
-
expect(collection.hasImports).toBe(false);
|
|
47
|
-
expect(collection.hasExports).toBe(true);
|
|
48
|
-
expect(collection.toString(sourceBuilderOptions)).toBe("export { myExport1, myExport2 } from 'myModule';\n");
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
describe('clear', () => {
|
|
53
|
-
it('should clear the collection', () => {
|
|
54
|
-
collection.addImport('myImport', 'myModule');
|
|
55
|
-
collection.addExport('myExport', 'myModule');
|
|
56
|
-
expect(collection.hasImports).toBe(true);
|
|
57
|
-
expect(collection.hasExports).toBe(true);
|
|
58
|
-
collection.clear();
|
|
59
|
-
expect(collection.hasImports).toBe(false);
|
|
60
|
-
expect(collection.hasExports).toBe(false);
|
|
61
|
-
expect(collection.toString(sourceBuilderOptions)).toBe('');
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
describe('toString', () => {
|
|
66
|
-
it('should return an empty string if the collection is empty', () => {
|
|
67
|
-
expect(collection.toString(sourceBuilderOptions)).toBe('');
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('should return a string representation of the collection', () => {
|
|
71
|
-
collection.addImport('myImport', 'myModule');
|
|
72
|
-
collection.addExport('myExport', 'myModule');
|
|
73
|
-
expect(collection.toString(sourceBuilderOptions)).toBe(
|
|
74
|
-
"import { myImport } from 'myModule';\n\nexport { myExport } from 'myModule';\n",
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { extname } from 'node:path';
|
|
2
|
-
|
|
3
|
-
import { type SourceBuilderOptions, StringBuilder } from '@goast/core';
|
|
4
|
-
|
|
5
|
-
import type {
|
|
6
|
-
TypeScriptExportType,
|
|
7
|
-
TypeScriptImport,
|
|
8
|
-
TypeScriptImportKind,
|
|
9
|
-
TypeScriptImportType,
|
|
10
|
-
} from './common-results.js';
|
|
11
|
-
import { defaultTypeScriptGeneratorConfig } from './config.js';
|
|
12
|
-
import { getModulePathRelativeToFile, type ImportModuleTransformer } from './utils.js';
|
|
13
|
-
|
|
14
|
-
export type ImportExportCollectionOptions = {
|
|
15
|
-
filePath?: string;
|
|
16
|
-
importModuleTransformer: ImportModuleTransformer;
|
|
17
|
-
useSingleQuotes: boolean;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const defaultImportExportCollectionOptions: ImportExportCollectionOptions = {
|
|
21
|
-
importModuleTransformer: defaultTypeScriptGeneratorConfig.importModuleTransformer,
|
|
22
|
-
useSingleQuotes: defaultTypeScriptGeneratorConfig.useSingleQuotes,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type TypeScriptImportOptions = { type?: TypeScriptImportType };
|
|
26
|
-
export type TypeScriptExportOptions = { type?: TypeScriptExportType };
|
|
27
|
-
|
|
28
|
-
export class ImportExportCollection {
|
|
29
|
-
private readonly _imports: Map<string, Set<string>> = new Map();
|
|
30
|
-
private readonly _typeImports: Map<string, Set<string>> = new Map();
|
|
31
|
-
private readonly _jsDocImports: Map<string, Set<string>> = new Map();
|
|
32
|
-
private readonly _exports: Map<string, Set<string>> = new Map();
|
|
33
|
-
private readonly _typeExports: Map<string, Set<string>> = new Map();
|
|
34
|
-
private readonly _options: ImportExportCollectionOptions;
|
|
35
|
-
|
|
36
|
-
constructor(options?: Partial<ImportExportCollectionOptions>) {
|
|
37
|
-
this._options = { ...defaultImportExportCollectionOptions, ...options };
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
public get hasImports(): boolean {
|
|
41
|
-
return this._imports.size > 0 || this._typeImports.size > 0 || this._jsDocImports.size > 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public get hasExports(): boolean {
|
|
45
|
-
return this._exports.size > 0 || this._typeExports.size > 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public get imports(): TypeScriptImport[] {
|
|
49
|
-
return [
|
|
50
|
-
...this.toImport('import', this._imports),
|
|
51
|
-
...this.toImport('type-import', this._typeImports),
|
|
52
|
-
...this.toImport('js-doc', this._jsDocImports),
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private toImport(type: TypeScriptImportType, map: Map<string, Set<string>>): TypeScriptImport[] {
|
|
57
|
-
return Array.from(map.entries())
|
|
58
|
-
.map(([fromModule, importNames]) =>
|
|
59
|
-
Array.from(importNames).map(
|
|
60
|
-
(importName) => ({
|
|
61
|
-
kind: this.getImportKind(fromModule),
|
|
62
|
-
type,
|
|
63
|
-
modulePath: fromModule,
|
|
64
|
-
name: importName,
|
|
65
|
-
} satisfies TypeScriptImport),
|
|
66
|
-
)
|
|
67
|
-
)
|
|
68
|
-
.flat();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
public addImport(importName: string, fromModule: string, options?: TypeScriptImportOptions): void {
|
|
72
|
-
const map = this.getImportMap(options?.type ?? 'import');
|
|
73
|
-
const existingImport = map.get(fromModule);
|
|
74
|
-
if (existingImport) {
|
|
75
|
-
existingImport.add(importName);
|
|
76
|
-
} else {
|
|
77
|
-
map.set(fromModule, new Set([importName]));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
public addExport(exportName: string, fromModule: string, options?: TypeScriptExportOptions): void {
|
|
82
|
-
const map = this.getExportMap(options?.type ?? 'export');
|
|
83
|
-
const existingExport = map.get(fromModule);
|
|
84
|
-
if (existingExport) {
|
|
85
|
-
existingExport.add(exportName);
|
|
86
|
-
} else {
|
|
87
|
-
map.set(fromModule, new Set([exportName]));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
public clear(): void {
|
|
92
|
-
this._imports.clear();
|
|
93
|
-
this._typeImports.clear();
|
|
94
|
-
this._jsDocImports.clear();
|
|
95
|
-
this._exports.clear();
|
|
96
|
-
this._typeExports.clear();
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public toString(options: Partial<SourceBuilderOptions>): string {
|
|
100
|
-
const builder = new StringBuilder(options);
|
|
101
|
-
this.writeTo(builder);
|
|
102
|
-
return builder.toString();
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
public writeTo(builder: StringBuilder) {
|
|
106
|
-
const { filePath, importModuleTransformer, useSingleQuotes } = this._options;
|
|
107
|
-
let hasPrevious = false;
|
|
108
|
-
|
|
109
|
-
if (this._imports.size > 0) {
|
|
110
|
-
const sortedImports = this.sortAndResolve(this._imports, filePath, importModuleTransformer);
|
|
111
|
-
this.writeImportsExports(builder, 'import', sortedImports, { useSingleQuotes });
|
|
112
|
-
hasPrevious = true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (this._typeImports.size > 0) {
|
|
116
|
-
if (hasPrevious) {
|
|
117
|
-
builder.appendLine();
|
|
118
|
-
}
|
|
119
|
-
const sortedImports = this.sortAndResolve(this._typeImports, filePath, importModuleTransformer);
|
|
120
|
-
this.writeImportsExports(builder, 'import type', sortedImports, { useSingleQuotes });
|
|
121
|
-
hasPrevious = true;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (this._jsDocImports.size > 0) {
|
|
125
|
-
if (hasPrevious) {
|
|
126
|
-
builder.appendLine();
|
|
127
|
-
}
|
|
128
|
-
const sortedImports = this.sortAndResolve(this._jsDocImports, filePath, importModuleTransformer);
|
|
129
|
-
builder.appendLine('/**');
|
|
130
|
-
this.writeImportsExports(builder, ' * @import', sortedImports, { useSingleQuotes });
|
|
131
|
-
builder.appendLine(' */');
|
|
132
|
-
hasPrevious = true;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (this._exports.size > 0) {
|
|
136
|
-
if (hasPrevious) {
|
|
137
|
-
builder.appendLine();
|
|
138
|
-
}
|
|
139
|
-
const sortedExports = this.sortAndResolve(this._exports, filePath, importModuleTransformer);
|
|
140
|
-
this.writeImportsExports(builder, 'export', sortedExports, { useSingleQuotes });
|
|
141
|
-
hasPrevious = true;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (this._typeExports.size > 0) {
|
|
145
|
-
if (hasPrevious) {
|
|
146
|
-
builder.appendLine();
|
|
147
|
-
}
|
|
148
|
-
const sortedExports = this.sortAndResolve(this._typeExports, filePath, importModuleTransformer);
|
|
149
|
-
this.writeImportsExports(builder, 'export type', sortedExports, { useSingleQuotes });
|
|
150
|
-
hasPrevious = true;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
protected writeImportsExports(
|
|
155
|
-
builder: StringBuilder,
|
|
156
|
-
keyword: 'import' | 'export' | 'import type' | 'export type' | ' * @import',
|
|
157
|
-
data: (readonly [string, TypeScriptImportKind, string[]])[],
|
|
158
|
-
options: { useSingleQuotes: boolean },
|
|
159
|
-
) {
|
|
160
|
-
const moduleData: (readonly [string, TypeScriptImportKind, string[]])[] = [];
|
|
161
|
-
const fileData: (readonly [string, TypeScriptImportKind, string[]])[] = [];
|
|
162
|
-
for (const x of data) {
|
|
163
|
-
if (x[1] === 'module') {
|
|
164
|
-
moduleData.push(x);
|
|
165
|
-
} else {
|
|
166
|
-
fileData.push(x);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const quote = options.useSingleQuotes ? "'" : '"';
|
|
171
|
-
|
|
172
|
-
for (const [fromModule, _, names] of moduleData) {
|
|
173
|
-
builder.appendLine(`${keyword} { ${names.join(', ')} } from ${quote}${fromModule}${quote};`);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (moduleData.length > 0 && fileData.length > 0) {
|
|
177
|
-
builder.appendLine();
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
for (const [fromModule, _, names] of fileData) {
|
|
181
|
-
builder.appendLine(`${keyword} { ${names.join(', ')} } from ${quote}${fromModule}${quote};`);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
protected sortAndResolve(
|
|
186
|
-
data: Map<string, Set<string>>,
|
|
187
|
-
filePath: string | undefined,
|
|
188
|
-
importModuleTransformer: ImportModuleTransformer,
|
|
189
|
-
): (readonly [string, TypeScriptImportKind, string[]])[] {
|
|
190
|
-
return Array.from(data.entries())
|
|
191
|
-
.sort(([fromModuleA], [fromModuleB]) => fromModuleA.localeCompare(fromModuleB))
|
|
192
|
-
.map(
|
|
193
|
-
([fromModule, names]) =>
|
|
194
|
-
[...this.resolveModulePath(fromModule, filePath, importModuleTransformer), Array.from(names).sort()] as const,
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
protected getImportKind(fromModule: string): TypeScriptImportKind {
|
|
199
|
-
const extName = extname(fromModule).toUpperCase();
|
|
200
|
-
return extName === '.TS' || extName === '.JS' || extName === '.JSON' ? 'file' : 'module';
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
protected resolveModulePath(
|
|
204
|
-
fromModule: string,
|
|
205
|
-
filePath: string | undefined,
|
|
206
|
-
importModuleTransformer: ImportModuleTransformer,
|
|
207
|
-
): [string, TypeScriptImportKind] {
|
|
208
|
-
const kind = this.getImportKind(fromModule);
|
|
209
|
-
return [
|
|
210
|
-
filePath && kind === 'file'
|
|
211
|
-
? getModulePathRelativeToFile(filePath, fromModule, importModuleTransformer)
|
|
212
|
-
: fromModule,
|
|
213
|
-
kind,
|
|
214
|
-
];
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
protected getImportMap(type: TypeScriptImportType): Map<string, Set<string>> {
|
|
218
|
-
switch (type) {
|
|
219
|
-
case 'import':
|
|
220
|
-
return this._imports;
|
|
221
|
-
case 'type-import':
|
|
222
|
-
return this._typeImports;
|
|
223
|
-
case 'js-doc':
|
|
224
|
-
return this._jsDocImports;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
protected getExportMap(type: TypeScriptExportType): Map<string, Set<string>> {
|
|
229
|
-
switch (type) {
|
|
230
|
-
case 'export':
|
|
231
|
-
return this._exports;
|
|
232
|
-
case 'type-export':
|
|
233
|
-
return this._typeExports;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
package/src/src/utils.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { dirname, relative } from 'node:path';
|
|
2
|
-
|
|
3
|
-
import type { Nullable } from '@goast/core';
|
|
4
|
-
|
|
5
|
-
export type ImportModuleTransformer =
|
|
6
|
-
| 'omit-extension'
|
|
7
|
-
| 'with-extension'
|
|
8
|
-
| 'js-extension'
|
|
9
|
-
| ((module: string) => string);
|
|
10
|
-
|
|
11
|
-
function doubleQuotedToSingleQuoted(value: string): string {
|
|
12
|
-
return `'${value.slice(1, -1).replace(/'/g, "\\'")}'`;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function toTypeScriptStringLiteral(value: string, useSingleQuotes: boolean): string {
|
|
16
|
-
return useSingleQuotes ? doubleQuotedToSingleQuoted(JSON.stringify(value)) : JSON.stringify(value);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function toTypeScriptPropertyName(value: string, useSingleQuotes: boolean): string {
|
|
20
|
-
if (value.match(/^[a-zA-Z_$][a-zA-Z_$0-9]*$/)) {
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
23
|
-
return useSingleQuotes ? doubleQuotedToSingleQuoted(JSON.stringify(value)) : JSON.stringify(value);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function getModulePathRelativeToFile(from: string, to: string, transformer: ImportModuleTransformer): string {
|
|
27
|
-
return transformModulePath(relative(dirname(from), to).replace(/\\/g, '/'), transformer);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function getModulePathRelativeToDirectory(
|
|
31
|
-
from: string,
|
|
32
|
-
to: string,
|
|
33
|
-
transformer: ImportModuleTransformer,
|
|
34
|
-
): string {
|
|
35
|
-
return transformModulePath(relative(from, to).replace(/\\/g, '/'), transformer);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function transformModulePath(modulePath: string, transformer: ImportModuleTransformer) {
|
|
39
|
-
if (!modulePath.startsWith('.')) {
|
|
40
|
-
modulePath = `./${modulePath}`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (transformer === 'omit-extension') {
|
|
44
|
-
return modulePath.replace(/\.[^/.]+$/, '');
|
|
45
|
-
} else if (transformer === 'with-extension') {
|
|
46
|
-
return modulePath;
|
|
47
|
-
} else if (transformer === 'js-extension') {
|
|
48
|
-
return modulePath.replace(/\.[^/.]+$/, '.js');
|
|
49
|
-
} else if (typeof transformer === 'function') {
|
|
50
|
-
return transformer(modulePath);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return modulePath;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function modifyString<TArgs extends unknown[]>(
|
|
57
|
-
value: string,
|
|
58
|
-
modifier: Nullable<string | RegExp | ((value: string, ...args: TArgs) => string)>,
|
|
59
|
-
...args: TArgs
|
|
60
|
-
): string {
|
|
61
|
-
if (typeof modifier === 'string') {
|
|
62
|
-
return modifier;
|
|
63
|
-
}
|
|
64
|
-
if (modifier instanceof RegExp) {
|
|
65
|
-
const match = value.match(modifier);
|
|
66
|
-
return match?.[0] ?? value;
|
|
67
|
-
}
|
|
68
|
-
if (typeof modifier === 'function') {
|
|
69
|
-
return modifier(value, ...args);
|
|
70
|
-
}
|
|
71
|
-
return value;
|
|
72
|
-
}
|