@sdkgen/parser 0.0.0-dev.20231002144112 → 0.0.0-dev.20231002191238

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.
Files changed (100) hide show
  1. package/dist/ast.js +298 -0
  2. package/dist/compatibility/index.js +206 -0
  3. package/dist/helpers.js +20 -0
  4. package/dist/index.js +9 -0
  5. package/dist/json.js +225 -0
  6. package/dist/lexer.js +283 -0
  7. package/dist/parser.js +419 -0
  8. package/dist/restparser.js +59 -0
  9. package/dist/semantic/01_check_multiple_declaration.js +19 -0
  10. package/dist/semantic/02_give_struct_and_enum_names.js +58 -0
  11. package/dist/semantic/03_match_type_definitions.js +15 -0
  12. package/dist/semantic/04_check_dont_return_secret.js +39 -0
  13. package/dist/semantic/05_expand_spreads.js +57 -0
  14. package/dist/semantic/06_check_empty_struct_or_enum.js +18 -0
  15. package/dist/semantic/07_validate_recursive_types.js +46 -0
  16. package/dist/semantic/08_collect_struct_and_enum_types.js +22 -0
  17. package/dist/semantic/09_validate_annotations.js +122 -0
  18. package/dist/semantic/10_check_duplicate_members_on_enum.js +13 -0
  19. package/dist/semantic/analyser.js +27 -0
  20. package/dist/semantic/transformer.js +46 -0
  21. package/dist/semantic/visitor.js +61 -0
  22. package/dist/token.js +93 -0
  23. package/dist/utils.js +25 -0
  24. package/package.json +11 -4
  25. package/.eslintrc.json +0 -3
  26. package/.prettierrc +0 -12
  27. package/dist/spec/lexer.spec.d.ts +0 -1
  28. package/dist/spec/lexer.spec.js +0 -152
  29. package/dist/spec/parser.spec.d.ts +0 -1
  30. package/dist/spec/parser.spec.js +0 -967
  31. package/dist/src/ast.js +0 -355
  32. package/dist/src/compatibility/index.js +0 -211
  33. package/dist/src/helpers.js +0 -23
  34. package/dist/src/index.js +0 -29
  35. package/dist/src/json.js +0 -234
  36. package/dist/src/lexer.js +0 -287
  37. package/dist/src/parser.js +0 -423
  38. package/dist/src/restparser.js +0 -65
  39. package/dist/src/semantic/01_check_multiple_declaration.js +0 -22
  40. package/dist/src/semantic/02_give_struct_and_enum_names.js +0 -61
  41. package/dist/src/semantic/03_match_type_definitions.js +0 -18
  42. package/dist/src/semantic/04_check_dont_return_secret.js +0 -42
  43. package/dist/src/semantic/05_expand_spreads.js +0 -60
  44. package/dist/src/semantic/06_check_empty_struct_or_enum.js +0 -21
  45. package/dist/src/semantic/07_validate_recursive_types.js +0 -49
  46. package/dist/src/semantic/08_collect_struct_and_enum_types.js +0 -25
  47. package/dist/src/semantic/09_validate_annotations.js +0 -125
  48. package/dist/src/semantic/10_check_duplicate_members_on_enum.js +0 -16
  49. package/dist/src/semantic/analyser.js +0 -30
  50. package/dist/src/semantic/transformer.js +0 -50
  51. package/dist/src/semantic/visitor.js +0 -65
  52. package/dist/src/token.js +0 -119
  53. package/dist/src/utils.js +0 -27
  54. package/dist/tsconfig.tsbuildinfo +0 -1
  55. package/src/ast.ts +0 -273
  56. package/src/compatibility/index.ts +0 -273
  57. package/src/helpers.ts +0 -28
  58. package/src/index.ts +0 -8
  59. package/src/json.ts +0 -350
  60. package/src/lexer.ts +0 -343
  61. package/src/parser.ts +0 -604
  62. package/src/restparser.ts +0 -81
  63. package/src/semantic/01_check_multiple_declaration.ts +0 -21
  64. package/src/semantic/02_give_struct_and_enum_names.ts +0 -57
  65. package/src/semantic/03_match_type_definitions.ts +0 -19
  66. package/src/semantic/04_check_dont_return_secret.ts +0 -40
  67. package/src/semantic/05_expand_spreads.ts +0 -67
  68. package/src/semantic/06_check_empty_struct_or_enum.ts +0 -21
  69. package/src/semantic/07_validate_recursive_types.ts +0 -47
  70. package/src/semantic/08_collect_struct_and_enum_types.ts +0 -23
  71. package/src/semantic/09_validate_annotations.ts +0 -158
  72. package/src/semantic/10_check_duplicate_members_on_enum.ts +0 -15
  73. package/src/semantic/analyser.ts +0 -29
  74. package/src/semantic/transformer.ts +0 -41
  75. package/src/semantic/visitor.ts +0 -60
  76. package/src/token.ts +0 -92
  77. package/src/utils.ts +0 -63
  78. /package/dist/{src/ast.d.ts → ast.d.ts} +0 -0
  79. /package/dist/{src/compatibility → compatibility}/index.d.ts +0 -0
  80. /package/dist/{src/helpers.d.ts → helpers.d.ts} +0 -0
  81. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  82. /package/dist/{src/json.d.ts → json.d.ts} +0 -0
  83. /package/dist/{src/lexer.d.ts → lexer.d.ts} +0 -0
  84. /package/dist/{src/parser.d.ts → parser.d.ts} +0 -0
  85. /package/dist/{src/restparser.d.ts → restparser.d.ts} +0 -0
  86. /package/dist/{src/semantic → semantic}/01_check_multiple_declaration.d.ts +0 -0
  87. /package/dist/{src/semantic → semantic}/02_give_struct_and_enum_names.d.ts +0 -0
  88. /package/dist/{src/semantic → semantic}/03_match_type_definitions.d.ts +0 -0
  89. /package/dist/{src/semantic → semantic}/04_check_dont_return_secret.d.ts +0 -0
  90. /package/dist/{src/semantic → semantic}/05_expand_spreads.d.ts +0 -0
  91. /package/dist/{src/semantic → semantic}/06_check_empty_struct_or_enum.d.ts +0 -0
  92. /package/dist/{src/semantic → semantic}/07_validate_recursive_types.d.ts +0 -0
  93. /package/dist/{src/semantic → semantic}/08_collect_struct_and_enum_types.d.ts +0 -0
  94. /package/dist/{src/semantic → semantic}/09_validate_annotations.d.ts +0 -0
  95. /package/dist/{src/semantic → semantic}/10_check_duplicate_members_on_enum.d.ts +0 -0
  96. /package/dist/{src/semantic → semantic}/analyser.d.ts +0 -0
  97. /package/dist/{src/semantic → semantic}/transformer.d.ts +0 -0
  98. /package/dist/{src/semantic → semantic}/visitor.d.ts +0 -0
  99. /package/dist/{src/token.d.ts → token.d.ts} +0 -0
  100. /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../src/token.ts","../src/lexer.ts","../spec/lexer.spec.ts","../src/ast.ts","../src/semantic/visitor.ts","../src/semantic/01_check_multiple_declaration.ts","../src/semantic/transformer.ts","../src/semantic/02_give_struct_and_enum_names.ts","../src/semantic/03_match_type_definitions.ts","../src/semantic/04_check_dont_return_secret.ts","../src/compatibility/index.ts","../src/restparser.ts","../src/utils.ts","../src/parser.ts","../src/helpers.ts","../src/index.ts","../src/semantic/05_expand_spreads.ts","../src/semantic/06_check_empty_struct_or_enum.ts","../src/semantic/07_validate_recursive_types.ts","../src/semantic/08_collect_struct_and_enum_types.ts","../src/semantic/09_validate_annotations.ts","../src/semantic/10_check_duplicate_members_on_enum.ts","../src/semantic/analyser.ts","../src/json.ts","../spec/parser.spec.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/bonjour/index.d.ts","../../../node_modules/@types/busboy/index.d.ts","../../../node_modules/@types/command-line-args/index.d.ts","../../../node_modules/@types/command-line-usage/index.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/send/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/connect-history-api-fallback/index.d.ts","../../../node_modules/@types/eslint/helpers.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/eslint-scope/index.d.ts","../../../node_modules/@types/http-errors/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../../node_modules/@types/file-saver/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/http-proxy/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/request-ip/index.d.ts","../../../node_modules/@types/retry/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/serve-handler/index.d.ts","../../../node_modules/@types/serve-index/index.d.ts","../../../node_modules/@types/sockjs/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/swagger-ui-dist/absolute-path.d.ts","../../../node_modules/@types/swagger-ui-dist/index.d.ts","../../../node_modules/@types/ws/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed",{"version":"0d1b618fb1d31b44a3e77e0940199cc12099b7e448ff596481039c5439160c5d","signature":"a47d0d3875c959c171c87f6886b3f4740dfdafc4a40b8faaf6a60dba379aafc0"},{"version":"f6725bcf9cc6c70f311aabd5ef3b7839535e416eea8e3c548e2dd99136f47489","signature":"e082eda43f55d5bb478ef88a90c7461d73129010244cb22d45f3dabb24aabb1b"},{"version":"6327bd2eac3fd3f5c7162a87420cffe58f8c7ba2972ad47e12cef928bd926e29","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"851153ecb19fe760635a2b8e54dad62a99c245a22abb116c781680cb3505a02e","signature":"0ed6b821f7c5471ea1b73a82589544e1dae0cf615e87227cf798a0b748d9364c"},{"version":"50ba5c02af36d9f80c7da35962cb61d1088a7af05ef5930d417981baccfbc9c3","signature":"f93144e38b7adc9eca0f5a2726893acf6df6123026e0019a74cf11987c311584"},{"version":"fb06e8dde3cf19ccc0e47762be6242ec990d659557dbbe14c63113478adc2444","signature":"353c5f1b3a18f6e6a73a1f38122343736ae420495a43578ff02e23a248940606"},{"version":"397d74c2f4c02a687edae40df94680f66d7a2ce96dce5dd15e8278006d07e946","signature":"286584c7b22c6d7d88215b562640199781ae3cb2a5baf9721454fd2840741e94"},{"version":"7fa0685b27b50b8ef1604f5d71772ad6846b1996b4d9e4c396baef7aa6539b2a","signature":"44eca8ac4f8409af943bbf7cb9c646454c2f5d0be266f84ead787d9452852887"},{"version":"df2bd579b982728787d31c4d8e40a8f442a9eb67e8973196d77e86968cf657a3","signature":"ebbe42952c1006a2e38b980eb6919e4229e1eee038205ad95600aad1ed21e850"},{"version":"fbb4995857b44355618c8a61cb5e086462821cc282fc638cc3a94a2b814bc633","signature":"62fc5bb1e7d3ec7e0624325f55e988904d4824c678d2c50b79b65a33dd84593a"},{"version":"e18aa16baef58d63b8a342de5e72edf39f2369970b42171a25d743d0ce4afc06","signature":"2f192ce80a0af4c4678d3c9407d5b8fc5f20bbaafbd2c471b10e23e0dab75341"},{"version":"31b7510503d7ed5a8a7c45c1f0e7ab1c9eedd0c674131fd797b371d4285ed518","signature":"2ea3deec6fa1ec33dc8b5e16fc0bd41d23ef12d46fcdf09ec42fd9cabc11fe0d"},{"version":"314dc2eb5d1d6e583cf6eb3759fb5329a18b2c4db94a50e00d6225968c6e9c25","signature":"8f8c11f94f4adae1b1e1a38f5d48eca7b1302c950bec2d843cbc61a0e105d55f"},{"version":"674f4367342c630e9e181902750fd7765cf714dc917ff01ecf5418cd4bfbfac7","signature":"bca6f9ba28450563a0a3f1a84c38fe6b2b4403706aafc78039435f3b8cc59299"},{"version":"7cfa60d9e9948d1d9fbc67bbe7b742f8b913cbc043581dbca1a4b97475d69f07","signature":"ea504deda25bd0cc036a2cd8237d21c38908aca45faaede6583e5237c4866c9f"},"b3fb528e7589083ed8f80ad73bd30695b9cd00d1cdce5859977b60feefabb347",{"version":"82fa765db527609317ea5ad4dc0fb366f1b57b4d7b226e18b3948e255c42274e","signature":"f43e297d7cfc2636cfbb53bda9f268c46cbd2fcbcbef69af83f20e9cf904038f"},{"version":"0f2e58dd677c3842b6ba89bbc80c30ff6ee38f49d93a12d765585963aebf3852","signature":"cb28b0fea7ee329b17f91245eb43d48e6819a6270e5e6efd1970db03ab3ae0fa"},{"version":"1e3ad408c7a5cbf4a401b53e5e0760bbb75d237a206a474e874d600345372a82","signature":"53944ccd39501725fae40cd140dc41c78adbceac9f6b0647722c5a5c7d28cbaf"},{"version":"f1ebcaadc20f1aec3895b8e4a0b88d5de640d7892d57fbd0b5c9b14c78f6192e","signature":"1433bd9c9a83f894f254d1e47900bda92df18b02bf0265350bea582bb22db99a"},{"version":"dc203171e94764adb6341cc3336073e1d447932460dfeb81214d1946f2b6d5b2","signature":"e3941b73c49d1c9a74ee5b8c8735db49c5f33a72e6daf22b9f31dc54c14dc72a"},{"version":"dbd05088d511c6ce1811b5f24dfbd13bc483a01778d8cac7592a79c0316802b9","signature":"757c79e7e925b5999a40d191ebfb10de6c889b7714ddad35fb27e866d2b12260"},{"version":"52100f9bfc215f16eb0a58af18050b27f4c2c307679f137d000882fe942a324a","signature":"a12e9dd20ab7e3c9e120a203cda4504c24f8fd5ff8d3bb958ed8d0dd52852bf5"},{"version":"96f8d22597cd9bcb11728c4ff1724c0f664cd69f883487dc28bcfa21f0f01e71","signature":"fea998997178c88266b031a7e5a4a31e989069c89790dd37a56b5a0256c32778"},{"version":"ca51d0228db29d51d672bb33cd639f1d1584736437123ab89b46b154c3383651","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},"f713064ca751dc588bc13832137c418cb70cf0446de92ade60ad631071558fca","dfefd34e8ab60f41d0c130527d5092d6ce662dc9fa85bc8c97682baf65830b51","96c23535f4f9dd15beb767e070559ea672f6a35f103152836a67100605136a96","b0f4dd1a825912da8f12fd3388d839ef4aa51165ea0e60e4869b50b7ccb4f6fc","9cb7c5f710dc84d2e9500831a3e9a27afd3c3710f5a1b8744a50473e565b41fc","cf6b2edde490f303918809bfab1da8b6d059b50c160bec72005ff4c248bdd079","34693fb4a5e771e11668219221344dd1bd7d8b77ed005a1c1d965fb559be8406","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"e44ea2d6b7b853f6c81482416db43dafc11944561b810e469ae423085511ce7e","affectsGlobalScope":true},"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"a7289d79eb84a59d2475b4d0136b4404be3cfdd17c3ea46b9194add1d645df01","affectsGlobalScope":true},"0bb26fa2a90ee890eed57ee812c71fa84d3d07850163ec4a204de86412cc57c1","132ca47da601c60141dd6f10bd08c70d0620177e5638439df2464ec3945b6d98",{"version":"55d2bbae076fed7269c3e16faeb32f988f558427b7a1c3bf04aa7551ab86ae90","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","cf83847c9264dcd592b6c89c1542925b899b277228687f3638614e3fa784cf76","3a41ebe7f089d50f447466b35b6cabb8b584c0994fc9809d0cd0a4ebc41e1239","7693b90b3075deaccafd5efb467bf9f2b747a3075be888652ef73e64396d8628","0c42d6cba77d9ad1cf45256ccb8489aa502fe2dbee1ec9048a29d49f5d532e73","2cf89c17245db65d175d4ef699cd68187516f9b3ae5c572fc0b9ad60f35dc223","5f20d20b7607174caf1a6da9141aeb9f2142159ae2410ca30c7a0fccd1d19c99",{"version":"a34d65f61ec5aac5b53502c8b0bd4e00d217bccb95bf94d449e2571baa11fb8c","affectsGlobalScope":true},"8d42e5af5fb0a96a77e135ce84cc60636c9bad39d9dba043a4efe9d1bdeb3cc3","56fcc451e9065eb121c9cc4c1b9994a816306f3b0b3b1fce7ad59f0ac97a9999","8a6f12b74d3e6c4f5e1b918cb8e64ae16bc6756cf0d48bcc28a28e1bf26ca0cd","c3759b5bc5cc40f5988d86a497741a80fa91258629ae50a2b3735e774cd377cc","bf268a0aea37ad4ae3b7a9b58559190b6fc01ea16a31e35cd05817a0a60f895a","45dd82fb5aea9b12b2a90b427b28f3a014e8b2ee9b74087a5ab882841cb5fbc5",{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true},"48b2f9302651eb31acd5be69bb4e6b35797a7fcd6b77391d10a4ccadf7dc3609","0c8c917ef15498c827bd494a0ef365e9f76deb211f8acbb86932e20489310788","dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e",{"version":"9cdc2c6144b03822c9842505d09945bcf813b86827fdb260dd7586b63abc19bf","affectsGlobalScope":true},{"version":"2923dee3c897f03e91b54a210cdbefea7290562f0ac4b948667d4c9ee844b79e","affectsGlobalScope":true},"79169698d09a2be54b14f3bcad2575b414bf3525063fde0a1e4fcd5d6efd380e","051d939bcf77caa3cef3282708ab3a6fdfb741a7366e1d74a9e7603b67417ec3","0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","1c61ffa3a71b77363b30d19832c269ef62fba787f5610cac7254728d3b69ab2e","a234d62ae81d012ebf23898a45672edf3e5c93ecf5a438a42b96c08dd68cde43","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","09ed02a725db002693236b6dfc49b2c6eb5557be1421d7fbe4f07cfe38211d92","09d801ff4a303d4976d4b9cb94af3a9097c4a70345e662d176975872d2998e51","c8558b01389b5f7610ac293aa612ccea2ae64d83af43b49f8142f190be1f414c","c40fdf7b2e18df49ce0568e37f0292c12807a0748be79e272745e7216bed2606",{"version":"b10b426c56e220b5093bf8a2446ee47af47263b7b1a03f4b18e42326b231b111","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","b4635ef36bee17e1304337d591c3b6b461ecdbc1876d0effbe6a581e62201fe5","205d50c24359ead003dc537b9b65d2a64208dfdffe368f403cf9e0357831db9e","1265fddcd0c68be9d2a3b29805d0280484c961264dd95e0b675f7bd91f777e78",{"version":"e4507242542bd499238f693d88b2d32e22177cc508854625f87bcc9bc3fa1256","affectsGlobalScope":true},{"version":"d942354e4966a98d3a92d1b1af0b4ac06f33af3f88116743e2c304c027ca26ef","affectsGlobalScope":true},"39f0808e5be3cb38674726c21fe2eb453c55e48a901679b4ce30fef85549b892","6afd66a7432ef100027ea110449e874196381e019e30eda7e7d8ca390366b7a8","befb8a9a78ac99d8fbc3ed392810489a7b90760c7a58934e8f1c8538f581cff3","e670bdf01540d35c170fae68edfd2f288eff909936780c379d6a9103b787b22c","867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"88003d9ab15507806f41b120be6d407c1afe566c2f6689ebe3a034dd5ec0c8dc","82819f9ecc249a6a3e284003540d02ea1b1f56f410c23231797b9e1e4b9622df","81a109b6bb6adf5ed70f2c7e6d907b8c3adcf7b47b5ee09701c5f97370fd29b7","492f985316614ee57642a7b019eb17154c36c988d858325c3c2ecbe8e9a4ee1c","f6abe5cbd6417d9909f86f3f5b498f05238d0d9fb5e4666e88cf2f2e5864efe4","5ae76b5a59f2f787e9eb2d4f1a066ceb4505a52bf8fe77ac321d791ef2e72000","29193c018378ca9c8033eaa974c02c1f503e8fcd8a2bf406057c53f7d3fa17a8","f6218314af6f492ce5461bdadac5b829f5b4b31a3d1da3d04e77ed0afe0829fb","7167d932a7e2e991084421bb22af20024ada5a046d948c742de0f89996de5d0b","c7da551241b7be719b7bd654ab12a5098c3206fbb189076dd2d8871011a6ab5a","e2d3bfa79f0fad3ad67dfb0685c50dbe19b364a440160a2d40d0e3f44c75938c",{"version":"1c598f8d911f0bc39f04910c8c93f2f76fbb65f892ee5ecc38a2b58bb95af752","affectsGlobalScope":true},"87e4358eddd469426393408b4976bee1970c91634faa57a71f1db2c2f8dee9ba",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"42fe73978ddb3a82329bf41a116e921deb266551e4f0ad9e9c7bdc581c24f085","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b","fdd574c45ab01286d64b1e2e78e9ea647c4527e954e27ae281d372f5fba41567","f9ae3d889d1330f015ee918b4c59f21211d90211b42efb0fe87c333d4a8d43d8","4eadf1158f1ae8f7b0deea0f96b391359042cf74d1eb3ce1dacdb69de96e590d","f0120fc76274f614e7b8f5420a74abce69eee25b81e2084479fa426f33ccd46a","003f07cf566395059625b39785398f18652c8952e19790e7d6eeb22a9cbe0440","c91397074e95b112320dded35cbfed25c5c783b05a265e4c3f7c8f5abaec1fb2","6adaa01cba6e7bae17d8291089e9e38bfc3fffcd522e2161214cbaccab4c1b2b","e0a45e86c5b8b3ecb551a13d0e6bbe98ea69f15a9cd91a8a9e7cc3458dc69bf3","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","c79bd2f3e5c05e7ad80dc82ce8d339cac23ac1f5e6cfab96c860bb70d5162873","e3328cedfe4d7fac23ba75d00bf5169269800ab949d0837cd88c4211a52c3762","cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec",{"version":"c8950367d1812758e9e354c695c60c3e6311bf2cd98b9f9eb469a19df8a9a486","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","0eacae49e20c8004e5022b3abc41cee708925a7bb0a52bafa2e416eca424d39d","58b3082802116f10782ecaa577a473499def44650204beb38a8541d4d98b757b",{"version":"29313b7a1d1342a1ee37224f895e2b77a9023d7c67241c873aaa9b51130db2e7","affectsGlobalScope":true},"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","cc0700b1b97e18a3d5d9184470502d8762ec85158819d662730c3a8c5d702584","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","f77ff4cd234d3fd18ddd5aeadb6f94374511931976d41f4b9f594cb71f7ce6f3","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","4f18b4e6081e5e980ef53ddf57b9c959d36cffe1eb153865f512a01aeffb5e1e","7f17d4846a88eca5fe71c4474ef687ee89c4acf9b5372ab9b2ee68644b7e0fe0","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","58e0cee50add50d4b6d47a935e26aeb0080d98c9cf729f8af389511cdfa10526","b23d7d2e77430ad89e76242d953259afcbed6f23a74c8fbd247abb31fd4ad1fa","13ac133423d83cd4dc7d819a425cf78fbf2f8262fa818916d264e2abfb2ced6e","72c8ac810cce2f70a9de1b4b1ba65db76e29369693da1a53c70b879d2ad513bb","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","e59c13a739b9fbb0e9200e3140bf3f40358fffe0ab7eb661e5bc48d0d0f82c9c","dbd92ef431488d837877f02a9e54b35672810806eed41047f55cb723e823e2fe","c4f439b1def30f14d145a0927619748f933adacd38390f6dae3fe5591df2f14c","75fa6a9be075402ea969c1fcec4bb1421f72efbc3e2f340032684cdd3115197c","2eae2c50864a720fad05e116a0121a6ee6b6231266763c75d1f3503ddc22714a"],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"module":1,"outDir":"./","strict":true,"target":4},"fileIdsList":[[72,122],[122],[122,158],[72,73,74,75,76,122],[72,74,122],[96,122,129,130],[88,122,129],[96,110,122,129],[121,122,129,140],[96,122,129],[122,143,145],[122,142,143,144],[93,96,122,129,137,138,139],[122,131,138,140,148],[94,122,129],[93,96,98,101,110,121,122,129],[122,153],[122,154],[122,160,163],[78,122],[81,122],[82,87,113,122],[83,93,94,101,110,121,122],[83,84,93,101,122],[85,122],[86,87,94,102,122],[87,110,118,122],[88,90,93,101,122],[89,122],[90,91,122],[92,93,122],[93,122],[93,94,95,110,121,122],[93,94,95,110,122],[93,96,101,110,121,122],[93,94,96,97,101,110,118,121,122],[96,98,110,118,121,122],[78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],[93,99,122],[100,121,122,126],[90,93,101,110,122],[102,122],[103,122],[81,104,122],[105,120,122,126],[106,122],[107,122],[93,108,122],[108,109,122,124],[82,93,110,111,112,122],[82,110,112,122],[110,111,122],[113,122],[114,122],[93,116,117,122],[116,117,122],[87,101,118,122],[119,122],[101,120,122],[82,96,107,121,122],[87,122],[110,122,123],[122,124],[122,125],[82,87,93,95,104,110,121,122,124,126],[110,122,127],[122,171,210],[122,171,195,210],[122,210],[122,171],[122,171,196,210],[122,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209],[122,196,210],[94,110,122,129,136],[94,96,122,129],[94,122,149],[96,122,129,136,147],[122,215],[93,96,98,110,118,121,122,127,129],[122,218],[122,156,162],[122,160],[122,157,161],[122,159],[47,48,122],[48,60,70,122],[47,122],[50,122],[50,51,122],[47,48,50,51,57,60,61,70,122],[50,59,69,122],[47,48,50,58,59,69,122],[50,51,53,122],[50,51,62,122],[50,52,54,55,56,63,64,65,66,67,68,122],[47],[50],[50,59],[48,50],[50,51],[50,53],[50,51,62]],"referencedMap":[[74,1],[72,2],[156,2],[159,3],[158,2],[77,4],[73,1],[75,5],[76,1],[131,6],[132,7],[133,8],[134,2],[135,2],[141,9],[130,10],[146,11],[142,2],[145,12],[143,2],[140,13],[149,14],[150,2],[151,15],[147,2],[152,16],[153,2],[154,17],[155,18],[164,19],[144,2],[165,2],[136,2],[166,2],[167,2],[78,20],[79,20],[81,21],[82,22],[83,23],[84,24],[85,25],[86,26],[87,27],[88,28],[89,29],[90,30],[91,30],[92,31],[93,32],[94,33],[95,34],[80,2],[128,2],[96,35],[97,36],[98,37],[129,38],[99,39],[100,40],[101,41],[102,42],[103,43],[104,44],[105,45],[106,46],[107,47],[108,48],[109,49],[110,50],[112,51],[111,52],[113,53],[114,54],[115,2],[116,55],[117,56],[118,57],[119,58],[120,59],[121,60],[122,61],[123,62],[124,63],[125,64],[126,65],[127,66],[168,2],[138,2],[139,2],[169,10],[170,2],[195,67],[196,68],[171,69],[174,69],[193,67],[194,67],[184,67],[183,70],[181,67],[176,67],[189,67],[187,67],[191,67],[175,67],[188,67],[192,67],[177,67],[178,67],[190,67],[172,67],[179,67],[180,67],[182,67],[186,67],[197,71],[185,67],[173,67],[210,72],[209,2],[204,71],[206,73],[205,71],[198,71],[199,71],[201,71],[203,71],[207,73],[208,73],[200,73],[202,73],[137,74],[211,75],[212,76],[148,77],[213,10],[214,2],[215,2],[216,78],[217,79],[218,2],[219,80],[157,2],[163,81],[161,82],[162,83],[160,84],[8,2],[9,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[46,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[36,2],[33,2],[34,2],[35,2],[37,2],[7,2],[38,2],[43,2],[44,2],[39,2],[40,2],[41,2],[42,2],[1,2],[45,2],[11,2],[10,2],[49,85],[71,86],[50,87],[57,88],[61,89],[62,90],[70,91],[48,87],[60,92],[58,88],[52,89],[54,93],[55,89],[56,89],[63,94],[64,89],[65,89],[66,89],[67,89],[68,89],[69,95],[53,88],[51,88],[47,2],[59,88]],"exportedModulesMap":[[74,1],[72,2],[156,2],[159,3],[158,2],[77,4],[73,1],[75,5],[76,1],[131,6],[132,7],[133,8],[134,2],[135,2],[141,9],[130,10],[146,11],[142,2],[145,12],[143,2],[140,13],[149,14],[150,2],[151,15],[147,2],[152,16],[153,2],[154,17],[155,18],[164,19],[144,2],[165,2],[136,2],[166,2],[167,2],[78,20],[79,20],[81,21],[82,22],[83,23],[84,24],[85,25],[86,26],[87,27],[88,28],[89,29],[90,30],[91,30],[92,31],[93,32],[94,33],[95,34],[80,2],[128,2],[96,35],[97,36],[98,37],[129,38],[99,39],[100,40],[101,41],[102,42],[103,43],[104,44],[105,45],[106,46],[107,47],[108,48],[109,49],[110,50],[112,51],[111,52],[113,53],[114,54],[115,2],[116,55],[117,56],[118,57],[119,58],[120,59],[121,60],[122,61],[123,62],[124,63],[125,64],[126,65],[127,66],[168,2],[138,2],[139,2],[169,10],[170,2],[195,67],[196,68],[171,69],[174,69],[193,67],[194,67],[184,67],[183,70],[181,67],[176,67],[189,67],[187,67],[191,67],[175,67],[188,67],[192,67],[177,67],[178,67],[190,67],[172,67],[179,67],[180,67],[182,67],[186,67],[197,71],[185,67],[173,67],[210,72],[209,2],[204,71],[206,73],[205,71],[198,71],[199,71],[201,71],[203,71],[207,73],[208,73],[200,73],[202,73],[137,74],[211,75],[212,76],[148,77],[213,10],[214,2],[215,2],[216,78],[217,79],[218,2],[219,80],[157,2],[163,81],[161,82],[162,83],[160,84],[8,2],[9,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[46,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[36,2],[33,2],[34,2],[35,2],[37,2],[7,2],[38,2],[43,2],[44,2],[39,2],[40,2],[41,2],[42,2],[1,2],[45,2],[11,2],[10,2],[50,96],[57,97],[61,97],[62,90],[70,98],[48,96],[60,99],[58,97],[52,100],[54,101],[55,100],[56,100],[63,102],[64,100],[65,100],[66,100],[67,100],[68,100],[69,97],[53,97],[51,97],[59,97]],"semanticDiagnosticsPerFile":[74,72,156,159,158,77,73,75,76,131,132,133,134,135,141,130,146,142,145,143,140,149,150,151,147,152,153,154,155,164,144,165,136,166,167,78,79,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,80,128,96,97,98,129,99,100,101,102,103,104,105,106,107,108,109,110,112,111,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,168,138,139,169,170,195,196,171,174,193,194,184,183,181,176,189,187,191,175,188,192,177,178,190,172,179,180,182,186,197,185,173,210,209,204,206,205,198,199,201,203,207,208,200,202,137,211,212,148,213,214,215,216,217,218,219,157,163,161,162,160,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,46,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,1,45,11,10,49,71,50,57,61,62,70,48,60,58,52,54,55,56,63,64,65,66,67,68,69,53,51,47,59],"latestChangedDtsFile":"./spec/parser.spec.d.ts"},"version":"4.9.5"}
package/src/ast.ts DELETED
@@ -1,273 +0,0 @@
1
- import type { Token } from "./token";
2
- import { TokenLocation } from "./token";
3
-
4
- export abstract class AstNode {
5
- public location = new TokenLocation();
6
-
7
- constructor() {
8
- Object.defineProperty(this, "location", { enumerable: false });
9
- }
10
-
11
- at(token: Token): this {
12
- this.location = token.location;
13
- return this;
14
- }
15
-
16
- atLocation(location: TokenLocation): this {
17
- this.location = location;
18
- return this;
19
- }
20
- }
21
-
22
- export abstract class Type extends AstNode {
23
- abstract get name(): string;
24
-
25
- toJSON(): unknown {
26
- const { name: _name, ...rest } = { ...this };
27
-
28
- return rest;
29
- }
30
- }
31
-
32
- export class ErrorNode extends AstNode {
33
- annotations: Annotation[] = [];
34
-
35
- constructor(
36
- public name: string,
37
- public dataType: Type,
38
- ) {
39
- super();
40
- }
41
- }
42
- export abstract class Annotation extends AstNode {}
43
-
44
- export class DescriptionAnnotation extends Annotation {
45
- constructor(public text: string) {
46
- super();
47
- }
48
- }
49
-
50
- export class ThrowsAnnotation extends Annotation {
51
- constructor(public error: string) {
52
- super();
53
- }
54
- }
55
-
56
- export class ArgDescriptionAnnotation extends Annotation {
57
- constructor(
58
- public argName: string,
59
- public text: string,
60
- ) {
61
- super();
62
- }
63
- }
64
-
65
- export class RestAnnotation extends Annotation {
66
- constructor(
67
- public readonly method: string,
68
- public readonly path: string,
69
- public readonly pathVariables: readonly string[],
70
- public readonly queryVariables: readonly string[],
71
- public readonly headers: ReadonlyMap<string, string>,
72
- public readonly bodyVariable: string | null,
73
- ) {
74
- super();
75
- }
76
- }
77
-
78
- export class HiddenAnnotation extends Annotation {}
79
-
80
- export class StatusCodeAnnotation extends Annotation {
81
- constructor(public statusCode: number) {
82
- super();
83
- }
84
- }
85
-
86
- export abstract class PrimitiveType extends Type {
87
- toJSON() {
88
- return this.name;
89
- }
90
- }
91
- export class StringPrimitiveType extends PrimitiveType {
92
- name = "string";
93
- }
94
- export class IntPrimitiveType extends PrimitiveType {
95
- name = "int";
96
- }
97
- export class UIntPrimitiveType extends PrimitiveType {
98
- name = "uint";
99
- }
100
- export class FloatPrimitiveType extends PrimitiveType {
101
- name = "float";
102
- }
103
- export class BigIntPrimitiveType extends PrimitiveType {
104
- name = "bigint";
105
- }
106
- export class DatePrimitiveType extends PrimitiveType {
107
- name = "date";
108
- }
109
- export class DateTimePrimitiveType extends PrimitiveType {
110
- name = "datetime";
111
- }
112
- export class BoolPrimitiveType extends PrimitiveType {
113
- name = "bool";
114
- }
115
- export class BytesPrimitiveType extends PrimitiveType {
116
- name = "bytes";
117
- }
118
- export class VoidPrimitiveType extends PrimitiveType {
119
- name = "void";
120
- }
121
- export class MoneyPrimitiveType extends PrimitiveType {
122
- name = "money";
123
- }
124
- export class DecimalPrimitiveType extends PrimitiveType {
125
- name = "decimal";
126
- }
127
- export class CpfPrimitiveType extends PrimitiveType {
128
- name = "cpf";
129
- }
130
- export class CnpjPrimitiveType extends PrimitiveType {
131
- name = "cnpj";
132
- }
133
- export class EmailPrimitiveType extends PrimitiveType {
134
- name = "email";
135
- }
136
- export class UrlPrimitiveType extends PrimitiveType {
137
- name = "url";
138
- }
139
- export class UuidPrimitiveType extends PrimitiveType {
140
- name = "uuid";
141
- }
142
- export class HexPrimitiveType extends PrimitiveType {
143
- name = "hex";
144
- }
145
- export class HtmlPrimitiveType extends PrimitiveType {
146
- name = "html";
147
- }
148
- export class Base64PrimitiveType extends PrimitiveType {
149
- name = "base64";
150
- }
151
- export class XmlPrimitiveType extends PrimitiveType {
152
- name = "xml";
153
- }
154
- export class JsonPrimitiveType extends PrimitiveType {
155
- name = "json";
156
- }
157
-
158
- export class OptionalType extends Type {
159
- constructor(public base: Type) {
160
- super();
161
- }
162
-
163
- get name(): string {
164
- return `${this.base.name}?`;
165
- }
166
- }
167
-
168
- export class ArrayType extends Type {
169
- constructor(public base: Type) {
170
- super();
171
- }
172
-
173
- get name(): string {
174
- return `${this.base.name}[]`;
175
- }
176
- }
177
-
178
- export class EnumValue extends AstNode {
179
- annotations: Annotation[] = [];
180
-
181
- struct: StructType | null = null;
182
-
183
- constructor(public value: string) {
184
- super();
185
- }
186
- }
187
-
188
- export class EnumType extends Type {
189
- name!: string;
190
-
191
- constructor(public values: EnumValue[]) {
192
- super();
193
- }
194
-
195
- get hasStructValues() {
196
- return this.values.some(v => v.struct !== null);
197
- }
198
- }
199
-
200
- export class Field extends AstNode {
201
- annotations: Annotation[] = [];
202
-
203
- constructor(
204
- public name: string,
205
- public type: Type,
206
- public secret = false,
207
- ) {
208
- super();
209
- }
210
- }
211
-
212
- export class Spread extends AstNode {
213
- constructor(public typeReference: TypeReference) {
214
- super();
215
- }
216
- }
217
-
218
- export class TypeReference extends Type {
219
- type!: Type;
220
-
221
- constructor(public name: string) {
222
- super();
223
- }
224
- }
225
-
226
- export class StructType extends Type {
227
- name!: string;
228
-
229
- fields: Field[] = [];
230
-
231
- constructor(public fieldsAndSpreads: Array<Field | Spread>) {
232
- super();
233
- }
234
- }
235
-
236
- export class TypeDefinition extends AstNode {
237
- annotations: Annotation[] = [];
238
-
239
- constructor(
240
- public name: string,
241
- public type: Type,
242
- ) {
243
- super();
244
- }
245
- }
246
-
247
- export class FunctionOperation extends AstNode {
248
- annotations: Annotation[] = [];
249
-
250
- args: Field[] = [];
251
-
252
- constructor(
253
- public name: string,
254
- public fieldsAndSpreads: Array<Field | Spread>,
255
- public returnType: Type,
256
- ) {
257
- super();
258
- }
259
- }
260
-
261
- export class AstRoot {
262
- structTypes: StructType[] = [];
263
-
264
- enumTypes: EnumType[] = [];
265
-
266
- warnings: string[] = [];
267
-
268
- constructor(
269
- public typeDefinitions: TypeDefinition[] = [],
270
- public operations: FunctionOperation[] = [],
271
- public errors: ErrorNode[] = [],
272
- ) {}
273
- }
@@ -1,273 +0,0 @@
1
- import type { AstRoot, Type } from "../ast";
2
- import {
3
- DecimalPrimitiveType,
4
- ArrayType,
5
- Base64PrimitiveType,
6
- BigIntPrimitiveType,
7
- BytesPrimitiveType,
8
- CnpjPrimitiveType,
9
- CpfPrimitiveType,
10
- DatePrimitiveType,
11
- DateTimePrimitiveType,
12
- EmailPrimitiveType,
13
- EnumType,
14
- FloatPrimitiveType,
15
- HexPrimitiveType,
16
- HtmlPrimitiveType,
17
- IntPrimitiveType,
18
- MoneyPrimitiveType,
19
- OptionalType,
20
- StringPrimitiveType,
21
- StructType,
22
- TypeReference,
23
- UIntPrimitiveType,
24
- UrlPrimitiveType,
25
- UuidPrimitiveType,
26
- XmlPrimitiveType,
27
- } from "../ast";
28
-
29
- /*
30
- * 1 -> Old version
31
- * 2 -> New version
32
- */
33
-
34
- function checkClientToServer(path: string, issues: string[], t1: Type, t2: Type) {
35
- if (t1 instanceof TypeReference) {
36
- checkClientToServer(path, issues, t1.type, t2);
37
- return;
38
- }
39
-
40
- if (t2 instanceof TypeReference) {
41
- checkClientToServer(path, issues, t1, t2.type);
42
- return;
43
- }
44
-
45
- if (!(t1 instanceof OptionalType) && t2 instanceof OptionalType) {
46
- checkClientToServer(path, issues, t1, t2.base);
47
- return;
48
- }
49
-
50
- if (t1 instanceof OptionalType && t2 instanceof OptionalType) {
51
- checkClientToServer(path, issues, t1.base, t2.base);
52
- return;
53
- }
54
-
55
- if (t1 instanceof OptionalType && !(t2 instanceof OptionalType)) {
56
- issues.push(`${path} was optional, but now it isn't. If the client sends a null, it will be invalid. Add the optional annotation back.`);
57
- checkClientToServer(path, issues, t1.base, t2);
58
- return;
59
- }
60
-
61
- if (t1 instanceof ArrayType && t2 instanceof ArrayType) {
62
- checkClientToServer(path, issues, t1.base, t2.base);
63
- return;
64
- }
65
-
66
- if (t1 instanceof StructType && t2 instanceof StructType) {
67
- for (const field2 of t2.fields) {
68
- const field1 = t1.fields.find(x => x.name === field2.name);
69
-
70
- if (!field1) {
71
- if (field2.type instanceof OptionalType) {
72
- continue;
73
- } else {
74
- issues.push(`${path}.${field2.name} didn't exist before and isn't optional. Make it optional.`);
75
- continue;
76
- }
77
- }
78
-
79
- checkClientToServer(`${path}.${field1.name}`, issues, field1.type, field2.type);
80
- }
81
-
82
- return;
83
- }
84
-
85
- if (
86
- (t1 instanceof UIntPrimitiveType && t2 instanceof IntPrimitiveType) ||
87
- (t1 instanceof IntPrimitiveType && t2 instanceof FloatPrimitiveType) ||
88
- (t1 instanceof MoneyPrimitiveType && t2 instanceof IntPrimitiveType) ||
89
- (t1 instanceof MoneyPrimitiveType && t2 instanceof UIntPrimitiveType) ||
90
- (t1 instanceof UIntPrimitiveType && t2 instanceof BigIntPrimitiveType) ||
91
- (t1 instanceof IntPrimitiveType && t2 instanceof BigIntPrimitiveType) ||
92
- (t1 instanceof MoneyPrimitiveType && t2 instanceof BigIntPrimitiveType) ||
93
- (t1 instanceof BigIntPrimitiveType && t2 instanceof StringPrimitiveType) ||
94
- (t1 instanceof UuidPrimitiveType && t2 instanceof StringPrimitiveType) ||
95
- (t1 instanceof XmlPrimitiveType && t2 instanceof StringPrimitiveType) ||
96
- (t1 instanceof DatePrimitiveType && t2 instanceof StringPrimitiveType) ||
97
- (t1 instanceof DateTimePrimitiveType && t2 instanceof StringPrimitiveType) ||
98
- (t1 instanceof CpfPrimitiveType && t2 instanceof StringPrimitiveType) ||
99
- (t1 instanceof CnpjPrimitiveType && t2 instanceof StringPrimitiveType) ||
100
- (t1 instanceof HexPrimitiveType && t2 instanceof StringPrimitiveType) ||
101
- (t1 instanceof HtmlPrimitiveType && t2 instanceof StringPrimitiveType) ||
102
- (t1 instanceof Base64PrimitiveType && t2 instanceof StringPrimitiveType) ||
103
- (t1 instanceof BytesPrimitiveType && t2 instanceof StringPrimitiveType) ||
104
- (t1 instanceof BytesPrimitiveType && t2 instanceof Base64PrimitiveType) ||
105
- (t1 instanceof UrlPrimitiveType && t2 instanceof StringPrimitiveType) ||
106
- (t1 instanceof EmailPrimitiveType && t2 instanceof StringPrimitiveType) ||
107
- (t1 instanceof DecimalPrimitiveType && t2 instanceof StringPrimitiveType) ||
108
- (t1 instanceof EnumType && t2 instanceof StringPrimitiveType)
109
- ) {
110
- return;
111
- }
112
-
113
- if (t1 instanceof EnumType && t2 instanceof EnumType) {
114
- for (const value of t1.values) {
115
- const other = t2.values.find(v => v.value === value.value);
116
-
117
- if (other) {
118
- checkClientToServer(`${path}.${value.value}`, issues, value.struct ?? new StructType([]), other.struct ?? new StructType([]));
119
- } else {
120
- issues.push(`The enum at ${path} used to accept the value "${value.value}" that doesn't exist now. Clients that send it will fail.`);
121
- }
122
- }
123
-
124
- return;
125
- }
126
-
127
- if (t1.constructor.name === t2.constructor.name) {
128
- return;
129
- }
130
-
131
- issues.push(`${path} was ${t1.name} and now it is ${t2.name}. They are not compatible.`);
132
- }
133
-
134
- function checkServerToClient(path: string, issues: string[], t1: Type, t2: Type) {
135
- if (t1 instanceof TypeReference) {
136
- checkServerToClient(path, issues, t1.type, t2);
137
- return;
138
- }
139
-
140
- if (t2 instanceof TypeReference) {
141
- checkServerToClient(path, issues, t1, t2.type);
142
- return;
143
- }
144
-
145
- if (t1 instanceof OptionalType && !(t2 instanceof OptionalType)) {
146
- checkServerToClient(path, issues, t1.base, t2);
147
- return;
148
- }
149
-
150
- if (t1 instanceof OptionalType && t2 instanceof OptionalType) {
151
- checkServerToClient(path, issues, t1.base, t2.base);
152
- return;
153
- }
154
-
155
- if (!(t1 instanceof OptionalType) && t2 instanceof OptionalType) {
156
- issues.push(`${path} wasn't optional, but now it is. If the client receives a null, it will crash. Remove the optional annotation.`);
157
- checkServerToClient(path, issues, t1, t2.base);
158
- return;
159
- }
160
-
161
- if (t1 instanceof ArrayType && t2 instanceof ArrayType) {
162
- checkServerToClient(path, issues, t1.base, t2.base);
163
- return;
164
- }
165
-
166
- if (t1 instanceof StructType && t2 instanceof StructType) {
167
- for (const field1 of t1.fields) {
168
- const field2 = t2.fields.find(x => x.name === field1.name);
169
-
170
- if (!field2) {
171
- if (field1.type instanceof OptionalType) {
172
- continue;
173
- } else {
174
- issues.push(`${path}.${field1.name} used to exist with type ${field1.type.name}, but it's now missing. Add it back.`);
175
- continue;
176
- }
177
- }
178
-
179
- checkServerToClient(`${path}.${field1.name}`, issues, field1.type, field2.type);
180
- }
181
-
182
- return;
183
- }
184
-
185
- if (
186
- (t1 instanceof IntPrimitiveType && t2 instanceof UIntPrimitiveType) ||
187
- (t1 instanceof FloatPrimitiveType && t2 instanceof IntPrimitiveType) ||
188
- (t1 instanceof IntPrimitiveType && t2 instanceof MoneyPrimitiveType) ||
189
- (t1 instanceof UIntPrimitiveType && t2 instanceof MoneyPrimitiveType) ||
190
- (t1 instanceof BigIntPrimitiveType && t2 instanceof UIntPrimitiveType) ||
191
- (t1 instanceof BigIntPrimitiveType && t2 instanceof IntPrimitiveType) ||
192
- (t1 instanceof BigIntPrimitiveType && t2 instanceof MoneyPrimitiveType) ||
193
- (t1 instanceof StringPrimitiveType && t2 instanceof BigIntPrimitiveType) ||
194
- (t1 instanceof StringPrimitiveType && t2 instanceof UuidPrimitiveType) ||
195
- (t1 instanceof StringPrimitiveType && t2 instanceof XmlPrimitiveType) ||
196
- (t1 instanceof StringPrimitiveType && t2 instanceof DatePrimitiveType) ||
197
- (t1 instanceof StringPrimitiveType && t2 instanceof DateTimePrimitiveType) ||
198
- (t1 instanceof StringPrimitiveType && t2 instanceof CpfPrimitiveType) ||
199
- (t1 instanceof StringPrimitiveType && t2 instanceof CnpjPrimitiveType) ||
200
- (t1 instanceof StringPrimitiveType && t2 instanceof HexPrimitiveType) ||
201
- (t1 instanceof StringPrimitiveType && t2 instanceof HtmlPrimitiveType) ||
202
- (t1 instanceof StringPrimitiveType && t2 instanceof Base64PrimitiveType) ||
203
- (t1 instanceof StringPrimitiveType && t2 instanceof BytesPrimitiveType) ||
204
- (t1 instanceof Base64PrimitiveType && t2 instanceof BytesPrimitiveType) ||
205
- (t1 instanceof StringPrimitiveType && t2 instanceof UrlPrimitiveType) ||
206
- (t1 instanceof StringPrimitiveType && t2 instanceof EmailPrimitiveType) ||
207
- (t1 instanceof StringPrimitiveType && t2 instanceof DecimalPrimitiveType) ||
208
- (t1 instanceof StringPrimitiveType && t2 instanceof EnumType)
209
- ) {
210
- return;
211
- }
212
-
213
- if (t1 instanceof EnumType && t2 instanceof EnumType) {
214
- for (const value of t2.values) {
215
- const other = t1.values.find(v => v.value === value.value);
216
-
217
- if (other) {
218
- checkServerToClient(`${path}.${value.value}`, issues, other.struct ?? new StructType([]), value.struct ?? new StructType([]));
219
- } else {
220
- issues.push(`The enum at ${path} now has the value "${value.value}" that didn't exist before. Client will crash if it receives it`);
221
- }
222
- }
223
-
224
- return;
225
- }
226
-
227
- if (t1.constructor.name === t2.constructor.name) {
228
- return;
229
- }
230
-
231
- issues.push(`${path} was ${t1.name} and now it is ${t2.name}. They are not compatible.`);
232
- }
233
-
234
- export function compatibilityIssues(ast1: AstRoot, ast2: AstRoot): string[] {
235
- const issues: string[] = [];
236
-
237
- for (const op1 of ast1.operations) {
238
- const op2 = ast2.operations.find(x => x.name === op1.name);
239
-
240
- if (!op2) {
241
- issues.push(`function ${op1.name} used to exist, but it's now missing. Add it back.`);
242
- continue;
243
- }
244
-
245
- checkServerToClient(`${op1.name}.ret`, issues, op1.returnType, op2.returnType);
246
- for (const arg2 of op2.args) {
247
- const arg1 = op1.args.find(x => x.name === arg2.name);
248
-
249
- if (!arg1) {
250
- if (arg2.type instanceof OptionalType) {
251
- continue;
252
- } else {
253
- issues.push(`${op1.name}.args.${arg2.name} didn't exist before and isn't optional. Make it optional.`);
254
- continue;
255
- }
256
- }
257
-
258
- checkClientToServer(`${op1.name}.args.${arg1.name}`, issues, arg1.type, arg2.type);
259
- }
260
- }
261
-
262
- for (const err1 of ast1.errors) {
263
- const err2 = ast2.errors.find(x => x.name === err1.name);
264
-
265
- if (!err2) {
266
- continue;
267
- }
268
-
269
- checkServerToClient(`${err1.name}.data`, issues, err1.dataType, err2.dataType);
270
- }
271
-
272
- return issues;
273
- }
package/src/helpers.ts DELETED
@@ -1,28 +0,0 @@
1
- import type { AstRoot, Type, AstNode } from "./ast";
2
- import { Visitor } from "./semantic/visitor";
3
-
4
- class HasTypeVisitor extends Visitor {
5
- found = false;
6
-
7
- constructor(
8
- root: AstRoot,
9
- private type: typeof Type,
10
- ) {
11
- super(root);
12
- }
13
-
14
- visit(node: AstNode): void {
15
- if (node.constructor === this.type) {
16
- this.found = true;
17
- }
18
-
19
- super.visit(node);
20
- }
21
- }
22
-
23
- export function hasType(root: AstRoot, type: typeof Type) {
24
- const visitor = new HasTypeVisitor(root, type);
25
-
26
- visitor.process();
27
- return visitor.found;
28
- }