@archkit/parser-ts 0.1.0
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 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/models/parser-constants.d.ts +4 -0
- package/dist/models/parser-constants.d.ts.map +1 -0
- package/dist/models/parser-constants.js +33 -0
- package/dist/models/parser-constants.js.map +1 -0
- package/dist/models/parser-types.d.ts +14 -0
- package/dist/models/parser-types.d.ts.map +1 -0
- package/dist/models/parser-types.js +3 -0
- package/dist/models/parser-types.js.map +1 -0
- package/dist/services/call-extractor.d.ts +4 -0
- package/dist/services/call-extractor.d.ts.map +1 -0
- package/dist/services/call-extractor.js +206 -0
- package/dist/services/call-extractor.js.map +1 -0
- package/dist/services/import-extractor.d.ts +4 -0
- package/dist/services/import-extractor.d.ts.map +1 -0
- package/dist/services/import-extractor.js +54 -0
- package/dist/services/import-extractor.js.map +1 -0
- package/dist/services/parse-state.d.ts +6 -0
- package/dist/services/parse-state.d.ts.map +1 -0
- package/dist/services/parse-state.js +31 -0
- package/dist/services/parse-state.js.map +1 -0
- package/dist/services/symbol-extractor.d.ts +4 -0
- package/dist/services/symbol-extractor.d.ts.map +1 -0
- package/dist/services/symbol-extractor.js +117 -0
- package/dist/services/symbol-extractor.js.map +1 -0
- package/dist/services/type-script-parser.d.ts +11 -0
- package/dist/services/type-script-parser.d.ts.map +1 -0
- package/dist/services/type-script-parser.js +54 -0
- package/dist/services/type-script-parser.js.map +1 -0
- package/dist/utils/file-discovery.d.ts +2 -0
- package/dist/utils/file-discovery.d.ts.map +1 -0
- package/dist/utils/file-discovery.js +40 -0
- package/dist/utils/file-discovery.js.map +1 -0
- package/dist/utils/loc-utils.d.ts +7 -0
- package/dist/utils/loc-utils.d.ts.map +1 -0
- package/dist/utils/loc-utils.js +21 -0
- package/dist/utils/loc-utils.js.map +1 -0
- package/dist/utils/path-utils.d.ts +4 -0
- package/dist/utils/path-utils.d.ts.map +1 -0
- package/dist/utils/path-utils.js +19 -0
- package/dist/utils/path-utils.js.map +1 -0
- package/dist/utils/sort-utils.d.ts +4 -0
- package/dist/utils/sort-utils.d.ts.map +1 -0
- package/dist/utils/sort-utils.js +15 -0
- package/dist/utils/sort-utils.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brent Broeckx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@ts-morph+common@0.25.0/node_modules/@ts-morph/common/lib/typescript.d.ts","../../../node_modules/.pnpm/@ts-morph+common@0.25.0/node_modules/@ts-morph/common/lib/ts-morph-common.d.ts","../../../node_modules/.pnpm/ts-morph@24.0.0/node_modules/ts-morph/lib/ts-morph.d.ts","../../arch-core/dist/index.d.ts","../src/models/parser-types.ts","../src/models/parser-constants.ts","../src/utils/path-utils.ts","../src/utils/file-discovery.ts","../src/utils/sort-utils.ts","../src/utils/loc-utils.ts","../src/services/parse-state.ts","../src/services/call-extractor.ts","../src/services/import-extractor.ts","../src/services/symbol-extractor.ts","../src/services/type-script-parser.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.19.15/node_modules/@types/node/index.d.ts"],"fileIdsList":[[58,79,127,144,145],[79,127,144,145],[79,124,125,127,144,145],[79,126,127,144,145],[127,144,145],[79,127,132,144,145,162],[79,127,128,133,138,144,145,147,159,170],[79,127,128,129,138,144,145,147],[74,75,76,79,127,144,145],[79,127,130,144,145,171],[79,127,131,132,139,144,145,148],[79,127,132,144,145,159,167],[79,127,133,135,138,144,145,147],[79,126,127,134,144,145],[79,127,135,136,144,145],[79,127,137,138,144,145],[79,126,127,138,144,145],[79,127,138,139,140,144,145,159,170],[79,127,138,139,140,144,145,154,159,162],[79,120,127,135,138,141,144,145,147,159,170],[79,127,138,139,141,142,144,145,147,159,167,170],[79,127,141,143,144,145,159,167,170],[77,78,79,80,81,82,83,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176],[79,127,138,144,145],[79,127,144,145,146,170],[79,127,135,138,144,145,147,159],[79,127,144,145,148],[79,127,144,145,149],[79,126,127,144,145,150],[79,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176],[79,127,144,145,152],[79,127,144,145,153],[79,127,138,144,145,154,155],[79,127,144,145,154,156,171,173],[79,127,139,144,145],[79,127,138,144,145,159,160,162],[79,127,144,145,161,162],[79,127,144,145,159,160],[79,127,144,145,162],[79,127,144,145,163],[79,124,127,144,145,159,164,170],[79,127,138,144,145,165,166],[79,127,144,145,165,166],[79,127,132,144,145,147,159,167],[79,127,144,145,168],[79,127,144,145,147,169],[79,127,141,144,145,153,170],[79,127,132,144,145,171],[79,127,144,145,159,172],[79,127,144,145,146,173],[79,127,144,145,174],[79,120,127,144,145],[79,120,127,138,140,144,145,150,159,162,170,172,173,175],[79,127,144,145,159,176],[59,79,127,144,145],[79,92,96,127,144,145,170],[79,92,127,144,145,159,170],[79,87,127,144,145],[79,89,92,127,144,145,167,170],[79,127,144,145,147,167],[79,127,144,145,177],[79,87,127,144,145,177],[79,89,92,127,144,145,147,170],[79,84,85,88,91,127,138,144,145,159,170],[79,92,99,127,144,145],[79,84,90,127,144,145],[79,92,113,114,127,144,145],[79,88,92,127,144,145,162,170,177],[79,113,127,144,145,177],[79,86,87,127,144,145,177],[79,92,127,144,145],[79,86,87,88,89,90,91,92,93,94,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,114,115,116,117,118,119,127,144,145],[79,92,107,127,144,145],[79,92,99,100,127,144,145],[79,90,92,100,101,127,144,145],[79,91,127,144,145],[79,84,87,92,127,144,145],[79,92,96,100,101,127,144,145],[79,96,127,144,145],[79,90,92,95,127,144,145,170],[79,84,89,92,99,127,144,145],[79,127,144,145,159],[79,87,92,113,127,144,145,175,177],[62,72,79,127,144,145],[61,79,127,144,145],[60,62,64,67,68,79,127,144,145],[60,62,63,64,67,68,79,127,144,145,149],[61,62,79,127,144,145],[60,61,62,65,66,68,69,70,71,79,127,144,145,149],[63,64,79,127,139,144,145,149],[60,61,79,127,144,145]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"07189c6298f1b1a9f590baa5cf542937e44abc98ef7111a719262893ade1510f","impliedFormat":1},{"version":"e1a3930856d8f6a01240c81768c0219e4b1021f92e505f67b95c45fd7f11795c","impliedFormat":1},{"version":"5f019a25680faf51002b5ccf104dd61a93f95cc6821ed45fe905f7ffd6d44335","impliedFormat":1},"144a499d21023354b10cbd973431ebc2fa572a09d5c0fb61602f17a8fd01255c",{"version":"3be9b75fb24de973b30f049053ca32fdc24e7defed7c1ced0bbf7918080a9897","signature":"300a891e9525c0a333d9687ee874f048a6c3a8c992e10c7395d1b8b873d7e468"},{"version":"10e149e24fa2ebe7fae6bc19ee6798d2a9bc0750b4e779a42291f3fc64d981e3","signature":"ba19e3e8908c0174b18b0403ca3b9420edc962c8387d3a50abadceb8a0b4127d"},{"version":"27df45c32dad2272e515e0a9acb4d2e448b226a7788f7a30efa811e57abaa06b","signature":"1a268cd7bbcab7989ab5ef9b1e156acb909eeb66b82b3d0aedd733016997576c"},{"version":"532135be963441d9387cc1fbbad4cd38a8d6d1c7cede3f3ad2ba096a6e43fa42","signature":"39373bbe74a72b7b0df34a6c1032af187712f0c3918d653ef0fbccc777c53c32"},{"version":"0fd5e97ba0f323a919851bf2baf5725e726270eea34683b4bde6c1b25a062a77","signature":"f14f65d35a0e1defd38fb7190268d191fd084d2c893dbb18c9f2f3414f0548b8"},{"version":"b7ca4329f398956b12736c0d15a097d61c81bc36c0436dce5e8cc5826e3f9c43","signature":"47da848be1fa20841fd80d3a0e0bce079e0d505005c508da3949aeaf215b78ea"},{"version":"adcfa2e9e2308c06900e25a15e4a5cac002b471b7dbaadea199d22353b7ae809","signature":"5a08085a11ef7af5f664c2e6f413721c0bf82a6b57a22d0f22ffcea5ddc93b97"},{"version":"12c2a65ff537f8ef0528afef021b25daf9ff78d41be06dfbb7e663630f9bb49b","signature":"3d6ddf3bf3bf0be10f4261e329b118e1c98c32c13e75f5b5ec85063b4ba445aa"},{"version":"d7c469c30e87394ca08b5c31d0d1f32e7e2e44f3ace549d2d4e9cba66dc683be","signature":"93ae9ab1b98b64b9491e11bd65298a72c60445af7ed7624a40afecb841f8f0f2"},{"version":"2913ab27e270409ae1a9836d1ebc56f90569c0ab149b82099f01b0a72abf8455","signature":"f3ec81fe4d324a99e7cca720055ad4353eef5cf09733b08128325cd215c06abc"},{"version":"6a38f4ef63e7a8fb8047f4d659555cf42678556f9f4c545a7a21f89b0368d08c","signature":"e1131036edab8b893d1f6bc60b6bd91946ada31456bb6f0c8c252f3c42019c41"},{"version":"72a4467135e4d2de703bfba46eddb53b101de3b4dccd8ced8ae0b4cc0a615279","signature":"6d6ad79e639e2fda8cd6d421bbd1122aa48e4033b50971e318e7a47ee09e586a"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[62,73]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"noImplicitAny":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[59,1],[58,2],[124,3],[125,3],[126,4],[79,5],[127,6],[128,7],[129,8],[74,2],[77,9],[75,2],[76,2],[130,10],[131,11],[132,12],[133,13],[134,14],[135,15],[136,15],[137,16],[138,17],[139,18],[140,19],[80,2],[78,2],[141,20],[142,21],[143,22],[177,23],[144,24],[145,2],[146,25],[147,26],[148,27],[149,28],[150,29],[151,30],[152,31],[153,32],[154,33],[155,33],[156,34],[157,2],[158,35],[159,36],[161,37],[160,38],[162,39],[163,40],[164,41],[165,42],[166,43],[167,44],[168,45],[169,46],[170,47],[171,48],[172,49],[173,50],[174,51],[81,2],[82,2],[83,2],[121,52],[122,2],[123,2],[175,53],[176,54],[60,55],[56,2],[57,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[20,2],[21,2],[4,2],[22,2],[26,2],[23,2],[24,2],[25,2],[27,2],[28,2],[29,2],[5,2],[30,2],[31,2],[32,2],[33,2],[6,2],[37,2],[34,2],[35,2],[36,2],[38,2],[7,2],[39,2],[44,2],[45,2],[40,2],[41,2],[42,2],[43,2],[8,2],[49,2],[46,2],[47,2],[48,2],[50,2],[9,2],[51,2],[52,2],[53,2],[55,2],[54,2],[1,2],[99,56],[109,57],[98,56],[119,58],[90,59],[89,60],[118,61],[112,62],[117,63],[92,64],[106,65],[91,66],[115,67],[87,68],[86,61],[116,69],[88,70],[93,71],[94,2],[97,71],[84,2],[120,72],[110,73],[101,74],[102,75],[104,76],[100,77],[103,78],[113,61],[95,79],[96,80],[105,81],[85,82],[108,73],[107,71],[111,2],[114,83],[61,2],[73,84],[63,2],[62,85],[69,86],[70,87],[68,88],[71,86],[72,89],[65,90],[67,91],[64,28],[66,85]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeScriptParser = void 0;
|
|
4
|
+
var type_script_parser_1 = require("./services/type-script-parser");
|
|
5
|
+
Object.defineProperty(exports, "TypeScriptParser", { enumerable: true, get: function () { return type_script_parser_1.TypeScriptParser; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oEAAgE;AAAvD,sHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser-constants.d.ts","sourceRoot":"","sources":["../../src/models/parser-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,aAS/B,CAAA;AAEF,eAAO,MAAM,mBAAmB,aAQ9B,CAAA;AAEF,eAAO,MAAM,iBAAiB,UAS7B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODULE_EXTENSIONS = exports.IGNORED_DIRECTORIES = exports.SUPPORTED_EXTENSIONS = void 0;
|
|
4
|
+
exports.SUPPORTED_EXTENSIONS = new Set([
|
|
5
|
+
'.ts',
|
|
6
|
+
'.tsx',
|
|
7
|
+
'.js',
|
|
8
|
+
'.jsx',
|
|
9
|
+
'.mts',
|
|
10
|
+
'.cts',
|
|
11
|
+
'.mjs',
|
|
12
|
+
'.cjs',
|
|
13
|
+
]);
|
|
14
|
+
exports.IGNORED_DIRECTORIES = new Set([
|
|
15
|
+
'.git',
|
|
16
|
+
'.arch',
|
|
17
|
+
'node_modules',
|
|
18
|
+
'dist',
|
|
19
|
+
'build',
|
|
20
|
+
'.next',
|
|
21
|
+
'.turbo',
|
|
22
|
+
]);
|
|
23
|
+
exports.MODULE_EXTENSIONS = [
|
|
24
|
+
'.ts',
|
|
25
|
+
'.tsx',
|
|
26
|
+
'.js',
|
|
27
|
+
'.jsx',
|
|
28
|
+
'.mts',
|
|
29
|
+
'.cts',
|
|
30
|
+
'.mjs',
|
|
31
|
+
'.cjs',
|
|
32
|
+
];
|
|
33
|
+
//# sourceMappingURL=parser-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser-constants.js","sourceRoot":"","sources":["../../src/models/parser-constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAAC;IAC1C,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC,CAAA;AAEW,QAAA,mBAAmB,GAAG,IAAI,GAAG,CAAC;IACzC,MAAM;IACN,OAAO;IACP,cAAc;IACd,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;CACT,CAAC,CAAA;AAEW,QAAA,iBAAiB,GAAG;IAC/B,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ArchEdge, ArchNode } from '@archkit/core';
|
|
2
|
+
export interface ParseRepositoryOptions {
|
|
3
|
+
rootDir: string;
|
|
4
|
+
tsConfigFilePath?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ParseState {
|
|
7
|
+
rootDir: string;
|
|
8
|
+
nodes: ArchNode[];
|
|
9
|
+
edges: ArchEdge[];
|
|
10
|
+
nodeIds: Set<string>;
|
|
11
|
+
edgeIds: Set<string>;
|
|
12
|
+
discoveredFilesSet: Set<string>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=parser-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser-types.d.ts","sourceRoot":"","sources":["../../src/models/parser-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEvD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACpB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACpB,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser-types.js","sourceRoot":"","sources":["../../src/models/parser-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-extractor.d.ts","sourceRoot":"","sources":["../../src/services/call-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAyBhF"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractCallEdges = extractCallEdges;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const loc_utils_1 = require("../utils/loc-utils");
|
|
6
|
+
const path_utils_1 = require("../utils/path-utils");
|
|
7
|
+
const parse_state_1 = require("./parse-state");
|
|
8
|
+
function extractCallEdges(sourceFile, state) {
|
|
9
|
+
const filePath = (0, path_utils_1.toRelativePath)(sourceFile.getFilePath(), state.rootDir);
|
|
10
|
+
const callableNameToNodeIds = createCallableNameIndex(state);
|
|
11
|
+
sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression).forEach((callExpression) => {
|
|
12
|
+
const callerNodeId = resolveCallerNodeId(callExpression, filePath);
|
|
13
|
+
if (!callerNodeId) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const targetNodeIds = resolveTargetNodeIds(callExpression, state, callableNameToNodeIds);
|
|
17
|
+
if (targetNodeIds.length === 0) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
targetNodeIds.forEach((targetNodeId) => {
|
|
21
|
+
(0, parse_state_1.addEdge)(state, {
|
|
22
|
+
from: callerNodeId,
|
|
23
|
+
to: targetNodeId,
|
|
24
|
+
type: 'calls',
|
|
25
|
+
filePath,
|
|
26
|
+
loc: (0, loc_utils_1.getLoc)(callExpression),
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function resolveTargetNodeIds(callExpression, state, callableNameToNodeIds) {
|
|
32
|
+
const resolvedBySymbol = resolveTargetNodeIdsFromSymbol(callExpression, state);
|
|
33
|
+
if (resolvedBySymbol.length > 0) {
|
|
34
|
+
return resolvedBySymbol;
|
|
35
|
+
}
|
|
36
|
+
const calleeName = resolveCalleeName(callExpression);
|
|
37
|
+
if (!calleeName) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
return callableNameToNodeIds.get(calleeName) ?? [];
|
|
41
|
+
}
|
|
42
|
+
function createCallableNameIndex(state) {
|
|
43
|
+
const nameToIds = new Map();
|
|
44
|
+
state.nodes
|
|
45
|
+
.filter((node) => node.type === 'function' || node.type === 'method')
|
|
46
|
+
.forEach((node) => {
|
|
47
|
+
const existing = nameToIds.get(node.name);
|
|
48
|
+
if (existing) {
|
|
49
|
+
existing.push(node.id);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
nameToIds.set(node.name, [node.id]);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return new Map([...nameToIds.entries()].map(([name, ids]) => [
|
|
56
|
+
name,
|
|
57
|
+
[...ids].sort((left, right) => left.localeCompare(right)),
|
|
58
|
+
]));
|
|
59
|
+
}
|
|
60
|
+
function resolveCallerNodeId(callExpression, filePath) {
|
|
61
|
+
const ancestors = callExpression.getAncestors();
|
|
62
|
+
for (let index = ancestors.length - 1; index >= 0; index -= 1) {
|
|
63
|
+
const ancestor = ancestors[index];
|
|
64
|
+
if (ancestor.getKind() === ts_morph_1.SyntaxKind.MethodDeclaration) {
|
|
65
|
+
const methodDeclaration = ancestor.asKind(ts_morph_1.SyntaxKind.MethodDeclaration);
|
|
66
|
+
const methodName = methodDeclaration?.getName();
|
|
67
|
+
const classDeclaration = methodDeclaration?.getFirstAncestorByKind(ts_morph_1.SyntaxKind.ClassDeclaration);
|
|
68
|
+
const className = classDeclaration?.getName();
|
|
69
|
+
if (methodName && className) {
|
|
70
|
+
return `method:${filePath}#${className}.${methodName}`;
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
if (ancestor.getKind() === ts_morph_1.SyntaxKind.FunctionDeclaration) {
|
|
75
|
+
const functionDeclaration = ancestor.asKind(ts_morph_1.SyntaxKind.FunctionDeclaration);
|
|
76
|
+
const functionName = functionDeclaration?.getName();
|
|
77
|
+
if (functionName) {
|
|
78
|
+
return `function:${filePath}#${functionName}`;
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
function resolveTargetNodeIdsFromSymbol(callExpression, state) {
|
|
86
|
+
const expression = callExpression.getExpression();
|
|
87
|
+
const candidateSymbols = [expression.getSymbol()];
|
|
88
|
+
if (ts_morph_1.Node.isPropertyAccessExpression(expression)) {
|
|
89
|
+
candidateSymbols.push(expression.getNameNode().getSymbol());
|
|
90
|
+
}
|
|
91
|
+
const resolvedNodeIds = new Set();
|
|
92
|
+
candidateSymbols
|
|
93
|
+
.filter((symbol) => symbol !== undefined)
|
|
94
|
+
.forEach((symbol) => {
|
|
95
|
+
const directDeclarations = symbol.getDeclarations();
|
|
96
|
+
directDeclarations.forEach((declaration) => {
|
|
97
|
+
const nodeId = toNodeIdFromDeclaration(declaration, state.rootDir);
|
|
98
|
+
if (nodeId && state.nodeIds.has(nodeId)) {
|
|
99
|
+
resolvedNodeIds.add(nodeId);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const aliasedSymbol = symbol.getAliasedSymbol();
|
|
103
|
+
aliasedSymbol
|
|
104
|
+
?.getDeclarations()
|
|
105
|
+
.forEach((declaration) => {
|
|
106
|
+
const nodeId = toNodeIdFromDeclaration(declaration, state.rootDir);
|
|
107
|
+
if (nodeId && state.nodeIds.has(nodeId)) {
|
|
108
|
+
resolvedNodeIds.add(nodeId);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
return [...resolvedNodeIds].sort((left, right) => left.localeCompare(right));
|
|
113
|
+
}
|
|
114
|
+
function toNodeIdFromDeclaration(declaration, rootDir) {
|
|
115
|
+
const filePath = (0, path_utils_1.toRelativePath)(declaration.getSourceFile().getFilePath(), rootDir);
|
|
116
|
+
if (ts_morph_1.Node.isFunctionDeclaration(declaration)) {
|
|
117
|
+
const functionName = declaration.getName();
|
|
118
|
+
if (!functionName) {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
return `function:${filePath}#${functionName}`;
|
|
122
|
+
}
|
|
123
|
+
if (ts_morph_1.Node.isMethodDeclaration(declaration)) {
|
|
124
|
+
const methodName = declaration.getName();
|
|
125
|
+
const classDeclaration = declaration.getFirstAncestorByKind(ts_morph_1.SyntaxKind.ClassDeclaration);
|
|
126
|
+
const className = classDeclaration?.getName();
|
|
127
|
+
if (!methodName || !className) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
return `method:${filePath}#${className}.${methodName}`;
|
|
131
|
+
}
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
function resolveCalleeName(callExpression) {
|
|
135
|
+
const expression = callExpression.getExpression();
|
|
136
|
+
if (ts_morph_1.Node.isIdentifier(expression)) {
|
|
137
|
+
return expression.getText();
|
|
138
|
+
}
|
|
139
|
+
if (ts_morph_1.Node.isPropertyAccessExpression(expression)) {
|
|
140
|
+
const methodName = expression.getName();
|
|
141
|
+
const receiver = expression.getExpression();
|
|
142
|
+
if (receiver.getKind() === ts_morph_1.SyntaxKind.ThisKeyword) {
|
|
143
|
+
const classDeclaration = callExpression.getFirstAncestorByKind(ts_morph_1.SyntaxKind.ClassDeclaration);
|
|
144
|
+
const className = classDeclaration?.getName();
|
|
145
|
+
if (className) {
|
|
146
|
+
return `${className}.${methodName}`;
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
if (ts_morph_1.Node.isIdentifier(receiver)) {
|
|
151
|
+
const inferredClassName = inferClassNameFromIdentifier(receiver);
|
|
152
|
+
if (inferredClassName) {
|
|
153
|
+
return `${inferredClassName}.${methodName}`;
|
|
154
|
+
}
|
|
155
|
+
return `${receiver.getText()}.${methodName}`;
|
|
156
|
+
}
|
|
157
|
+
const inferredReceiverClassName = inferClassNameFromExpression(receiver);
|
|
158
|
+
if (inferredReceiverClassName) {
|
|
159
|
+
return `${inferredReceiverClassName}.${methodName}`;
|
|
160
|
+
}
|
|
161
|
+
return expression.getText();
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
function inferClassNameFromIdentifier(identifier) {
|
|
166
|
+
if (!ts_morph_1.Node.isIdentifier(identifier)) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
const symbol = identifier.getSymbol();
|
|
170
|
+
if (!symbol) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
for (const declaration of symbol.getDeclarations()) {
|
|
174
|
+
if (!ts_morph_1.Node.isVariableDeclaration(declaration)) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const initializer = declaration.getInitializer();
|
|
178
|
+
if (!initializer || !ts_morph_1.Node.isNewExpression(initializer)) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
const classExpression = initializer.getExpression();
|
|
182
|
+
if (!ts_morph_1.Node.isIdentifier(classExpression)) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
return classExpression.getText();
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
function inferClassNameFromExpression(expression) {
|
|
190
|
+
if (ts_morph_1.Node.isPropertyAccessExpression(expression)) {
|
|
191
|
+
const nestedInferredClassName = inferClassNameFromExpression(expression.getExpression());
|
|
192
|
+
if (nestedInferredClassName) {
|
|
193
|
+
return nestedInferredClassName;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const typeSymbol = expression.getType().getSymbol() ?? expression.getType().getAliasSymbol();
|
|
197
|
+
if (!typeSymbol) {
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
const symbolName = typeSymbol.getName();
|
|
201
|
+
if (!symbolName || symbolName === '__type') {
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
return symbolName;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=call-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-extractor.js","sourceRoot":"","sources":["../../src/services/call-extractor.ts"],"names":[],"mappings":";;AAYA,4CAyBC;AArCD,uCAMiB;AAEjB,kDAA2C;AAC3C,oDAAoD;AACpD,+CAAuC;AAEvC,SAAgB,gBAAgB,CAAC,UAAsB,EAAE,KAAiB;IACxE,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC,UAAU,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxE,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAA;IAE5D,UAAU,CAAC,oBAAoB,CAAC,qBAAU,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;QACpF,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAA;QAClE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAM;QACR,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AAA;AAClB,CAAC;AAED,SAAS,4BAA4B,CAAC,UAAsB;IAC1D,IAAI,eAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,CAAC;QAChD,MAAM,uBAAuB,GAAG,4BAA4B,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAA;QACxF,IAAI,uBAAuB,EAAE,CAAC;YAC5B,OAAO,uBAAuB,CAAA;QAChC,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC,cAAc,EAAE,CAAA;IAC5F,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,CAAA;IACvC,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC3C,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-extractor.d.ts","sourceRoot":"","sources":["../../src/services/import-extractor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,UAAU,CAAA;AAM7D,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAkBlF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.extractImportEdges = extractImportEdges;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const parser_constants_1 = require("../models/parser-constants");
|
|
9
|
+
const loc_utils_1 = require("../utils/loc-utils");
|
|
10
|
+
const path_utils_1 = require("../utils/path-utils");
|
|
11
|
+
const parse_state_1 = require("./parse-state");
|
|
12
|
+
function extractImportEdges(sourceFile, state) {
|
|
13
|
+
const filePath = (0, path_utils_1.toRelativePath)(sourceFile.getFilePath(), state.rootDir);
|
|
14
|
+
const sourceFileId = (0, path_utils_1.createFileNodeId)(filePath);
|
|
15
|
+
sourceFile.getImportDeclarations().forEach((importDeclaration) => {
|
|
16
|
+
const targetPath = resolveImportTarget(filePath, importDeclaration, state);
|
|
17
|
+
if (!targetPath) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
(0, parse_state_1.addEdge)(state, {
|
|
21
|
+
from: sourceFileId,
|
|
22
|
+
to: (0, path_utils_1.createFileNodeId)(targetPath),
|
|
23
|
+
type: 'imports',
|
|
24
|
+
filePath,
|
|
25
|
+
loc: (0, loc_utils_1.getLoc)(importDeclaration),
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function resolveImportTarget(sourceRelativePath, importDeclaration, state) {
|
|
30
|
+
const moduleSpecifier = importDeclaration.getModuleSpecifierValue();
|
|
31
|
+
if (!moduleSpecifier.startsWith('./') && !moduleSpecifier.startsWith('../')) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const sourceDirectory = node_path_1.default.dirname(node_path_1.default.join(state.rootDir, sourceRelativePath));
|
|
35
|
+
const candidateBasePath = node_path_1.default.resolve(sourceDirectory, moduleSpecifier);
|
|
36
|
+
const directRelative = (0, path_utils_1.normalizeToPosixPath)(node_path_1.default.relative(state.rootDir, candidateBasePath));
|
|
37
|
+
if (state.discoveredFilesSet.has(directRelative)) {
|
|
38
|
+
return directRelative;
|
|
39
|
+
}
|
|
40
|
+
for (const extension of parser_constants_1.MODULE_EXTENSIONS) {
|
|
41
|
+
const extensionRelative = (0, path_utils_1.normalizeToPosixPath)(node_path_1.default.relative(state.rootDir, `${candidateBasePath}${extension}`));
|
|
42
|
+
if (state.discoveredFilesSet.has(extensionRelative)) {
|
|
43
|
+
return extensionRelative;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const extension of parser_constants_1.MODULE_EXTENSIONS) {
|
|
47
|
+
const indexRelative = (0, path_utils_1.normalizeToPosixPath)(node_path_1.default.relative(state.rootDir, node_path_1.default.join(candidateBasePath, `index${extension}`)));
|
|
48
|
+
if (state.discoveredFilesSet.has(indexRelative)) {
|
|
49
|
+
return indexRelative;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=import-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-extractor.js","sourceRoot":"","sources":["../../src/services/import-extractor.ts"],"names":[],"mappings":";;;;;AAQA,gDAkBC;AA1BD,0DAA4B;AAG5B,iEAA8D;AAC9D,kDAA2C;AAC3C,oDAA4F;AAC5F,+CAAuC;AAEvC,SAAgB,kBAAkB,CAAC,UAAsB,EAAE,KAAiB;IAC1E,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC,UAAU,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxE,MAAM,YAAY,GAAG,IAAA,6BAAgB,EAAC,QAAQ,CAAC,CAAA;IAE/C,UAAU,CAAC,qBAAqB,EAAE,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;QAC/D,MAAM,UAAU,GAAG,mBAAmB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAA;QAC1E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAM;QACR,CAAC;QAED,IAAA,qBAAO,EAAC,KAAK,EAAE;YACb,IAAI,EAAE,YAAY;YAClB,EAAE,EAAE,IAAA,6BAAgB,EAAC,UAAU,CAAC;YAChC,I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MAAM,aAAa,GAAG,IAAA,iCAAoB,EACxC,mBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,SAAS,EAAE,CAAC,CAAC,CAChF,CAAA;QACD,IAAI,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;YAChD,OAAO,aAAa,CAAA;QACtB,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ArchEdge, ArchNode } from '@archkit/core';
|
|
2
|
+
import type { ParseState } from '../models/parser-types';
|
|
3
|
+
export declare function createParseState(rootDir: string, discoveredFiles: string[]): ParseState;
|
|
4
|
+
export declare function addNode(state: ParseState, node: ArchNode): void;
|
|
5
|
+
export declare function addEdge(state: ParseState, edge: ArchEdge): void;
|
|
6
|
+
//# sourceMappingURL=parse-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-state.d.ts","sourceRoot":"","sources":["../../src/services/parse-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,UAAU,CASvF;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAO/D;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAQ/D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createParseState = createParseState;
|
|
4
|
+
exports.addNode = addNode;
|
|
5
|
+
exports.addEdge = addEdge;
|
|
6
|
+
function createParseState(rootDir, discoveredFiles) {
|
|
7
|
+
return {
|
|
8
|
+
rootDir,
|
|
9
|
+
nodes: [],
|
|
10
|
+
edges: [],
|
|
11
|
+
nodeIds: new Set(),
|
|
12
|
+
edgeIds: new Set(),
|
|
13
|
+
discoveredFilesSet: new Set(discoveredFiles),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function addNode(state, node) {
|
|
17
|
+
if (state.nodeIds.has(node.id)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
state.nodeIds.add(node.id);
|
|
21
|
+
state.nodes.push(node);
|
|
22
|
+
}
|
|
23
|
+
function addEdge(state, edge) {
|
|
24
|
+
const edgeId = `${edge.type}:${edge.from}:${edge.to}:${edge.filePath ?? ''}:${edge.loc?.startLine ?? 0}`;
|
|
25
|
+
if (state.edgeIds.has(edgeId)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
state.edgeIds.add(edgeId);
|
|
29
|
+
state.edges.push(edge);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=parse-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-state.js","sourceRoot":"","sources":["../../src/services/parse-state.ts"],"names":[],"mappings":";;AAGA,4CASC;AAED,0BAOC;AAED,0BAQC;AA5BD,SAAgB,gBAAgB,CAAC,OAAe,EAAE,eAAyB;IACzE,OAAO;QACL,OAAO;QACP,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI,GAAG,EAAU;QAC1B,OAAO,EAAE,IAAI,GAAG,EAAU;QAC1B,kBAAkB,EAAE,IAAI,GAAG,CAAC,eAAe,CAAC;KAC7C,CAAA;AACH,CAAC;AAED,SAAgB,OAAO,CAAC,KAAiB,EAAE,IAAc;IACvD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC/B,OAAM;IACR,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC1B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC;AAED,SAAgB,OAAO,CAAC,KAAiB,EAAE,IAAc;IACvD,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,EAAE,CAAA;IACxG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,OAAM;IACR,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACzB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-extractor.d.ts","sourceRoot":"","sources":["../../src/services/symbol-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAK1C,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CA8HzF"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractFileAndSymbolNodes = extractFileAndSymbolNodes;
|
|
4
|
+
const path_utils_1 = require("../utils/path-utils");
|
|
5
|
+
const loc_utils_1 = require("../utils/loc-utils");
|
|
6
|
+
const parse_state_1 = require("./parse-state");
|
|
7
|
+
function extractFileAndSymbolNodes(sourceFile, state) {
|
|
8
|
+
const filePath = (0, path_utils_1.toRelativePath)(sourceFile.getFilePath(), state.rootDir);
|
|
9
|
+
const fileId = (0, path_utils_1.createFileNodeId)(filePath);
|
|
10
|
+
(0, parse_state_1.addNode)(state, {
|
|
11
|
+
id: fileId,
|
|
12
|
+
type: 'file',
|
|
13
|
+
name: filePath,
|
|
14
|
+
filePath,
|
|
15
|
+
loc: (0, loc_utils_1.getLocFromSourceFile)(sourceFile),
|
|
16
|
+
});
|
|
17
|
+
sourceFile.getClasses().forEach((classDeclaration, classIndex) => {
|
|
18
|
+
const className = classDeclaration.getName() ?? `AnonymousClass${classIndex + 1}`;
|
|
19
|
+
const classNodeId = `class:${filePath}#${className}`;
|
|
20
|
+
const classLoc = (0, loc_utils_1.getLoc)(classDeclaration);
|
|
21
|
+
(0, parse_state_1.addNode)(state, {
|
|
22
|
+
id: classNodeId,
|
|
23
|
+
type: 'class',
|
|
24
|
+
name: className,
|
|
25
|
+
filePath,
|
|
26
|
+
loc: classLoc,
|
|
27
|
+
exported: classDeclaration.isExported() || classDeclaration.isDefaultExport(),
|
|
28
|
+
});
|
|
29
|
+
(0, parse_state_1.addEdge)(state, {
|
|
30
|
+
from: fileId,
|
|
31
|
+
to: classNodeId,
|
|
32
|
+
type: 'contains',
|
|
33
|
+
filePath,
|
|
34
|
+
loc: classLoc,
|
|
35
|
+
});
|
|
36
|
+
classDeclaration.getMethods().forEach((methodDeclaration, methodIndex) => {
|
|
37
|
+
const methodName = methodDeclaration.getName() ?? `anonymousMethod${methodIndex + 1}`;
|
|
38
|
+
const methodNodeId = `method:${filePath}#${className}.${methodName}`;
|
|
39
|
+
const methodLoc = (0, loc_utils_1.getLoc)(methodDeclaration);
|
|
40
|
+
(0, parse_state_1.addNode)(state, {
|
|
41
|
+
id: methodNodeId,
|
|
42
|
+
type: 'method',
|
|
43
|
+
name: `${className}.${methodName}`,
|
|
44
|
+
filePath,
|
|
45
|
+
loc: methodLoc,
|
|
46
|
+
});
|
|
47
|
+
(0, parse_state_1.addEdge)(state, {
|
|
48
|
+
from: fileId,
|
|
49
|
+
to: methodNodeId,
|
|
50
|
+
type: 'contains',
|
|
51
|
+
filePath,
|
|
52
|
+
loc: methodLoc,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
sourceFile.getFunctions().forEach((functionDeclaration, functionIndex) => {
|
|
57
|
+
const functionName = functionDeclaration.getName() ?? `anonymousFunction${functionIndex + 1}`;
|
|
58
|
+
const functionNodeId = `function:${filePath}#${functionName}`;
|
|
59
|
+
const functionLoc = (0, loc_utils_1.getLoc)(functionDeclaration);
|
|
60
|
+
(0, parse_state_1.addNode)(state, {
|
|
61
|
+
id: functionNodeId,
|
|
62
|
+
type: 'function',
|
|
63
|
+
name: functionName,
|
|
64
|
+
filePath,
|
|
65
|
+
loc: functionLoc,
|
|
66
|
+
exported: functionDeclaration.isExported(),
|
|
67
|
+
});
|
|
68
|
+
(0, parse_state_1.addEdge)(state, {
|
|
69
|
+
from: fileId,
|
|
70
|
+
to: functionNodeId,
|
|
71
|
+
type: 'contains',
|
|
72
|
+
filePath,
|
|
73
|
+
loc: functionLoc,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
sourceFile.getInterfaces().forEach((interfaceDeclaration, interfaceIndex) => {
|
|
77
|
+
const interfaceName = interfaceDeclaration.getName() ?? `AnonymousInterface${interfaceIndex + 1}`;
|
|
78
|
+
const interfaceNodeId = `interface:${filePath}#${interfaceName}`;
|
|
79
|
+
const interfaceLoc = (0, loc_utils_1.getLoc)(interfaceDeclaration);
|
|
80
|
+
(0, parse_state_1.addNode)(state, {
|
|
81
|
+
id: interfaceNodeId,
|
|
82
|
+
type: 'interface',
|
|
83
|
+
name: interfaceName,
|
|
84
|
+
filePath,
|
|
85
|
+
loc: interfaceLoc,
|
|
86
|
+
exported: interfaceDeclaration.isExported(),
|
|
87
|
+
});
|
|
88
|
+
(0, parse_state_1.addEdge)(state, {
|
|
89
|
+
from: fileId,
|
|
90
|
+
to: interfaceNodeId,
|
|
91
|
+
type: 'contains',
|
|
92
|
+
filePath,
|
|
93
|
+
loc: interfaceLoc,
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
sourceFile.getTypeAliases().forEach((typeAliasDeclaration, typeIndex) => {
|
|
97
|
+
const typeName = typeAliasDeclaration.getName() ?? `AnonymousType${typeIndex + 1}`;
|
|
98
|
+
const typeNodeId = `type:${filePath}#${typeName}`;
|
|
99
|
+
const typeLoc = (0, loc_utils_1.getLoc)(typeAliasDeclaration);
|
|
100
|
+
(0, parse_state_1.addNode)(state, {
|
|
101
|
+
id: typeNodeId,
|
|
102
|
+
type: 'type',
|
|
103
|
+
name: typeName,
|
|
104
|
+
filePath,
|
|
105
|
+
loc: typeLoc,
|
|
106
|
+
exported: typeAliasDeclaration.isExported(),
|
|
107
|
+
});
|
|
108
|
+
(0, parse_state_1.addEdge)(state, {
|
|
109
|
+
from: fileId,
|
|
110
|
+
to: typeNodeId,
|
|
111
|
+
type: 'contains',
|
|
112
|
+
filePath,
|
|
113
|
+
loc: typeLoc,
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=symbol-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol-extractor.js","sourceRoot":"","sources":["../../src/services/symbol-extractor.ts"],"names":[],"mappings":";;AAMA,8DA8HC;AAlID,oDAAsE;AACtE,kDAAiE;AACjE,+CAAgD;AAEhD,SAAgB,yBAAyB,CAAC,UAAsB,EAAE,KAAiB;IACjF,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC,UAAU,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACxE,MAAM,MAAM,GAAG,IAAA,6BAAgB,EAAC,QAAQ,CAAC,CAAA;IAEzC,IAAA,qBAAO,EAAC,KAA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CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Project } from 'ts-morph';
|
|
2
|
+
import type { GraphData } from '@archkit/core';
|
|
3
|
+
import type { ParseRepositoryOptions } from '../models/parser-types';
|
|
4
|
+
export declare class TypeScriptParser {
|
|
5
|
+
private readonly project;
|
|
6
|
+
constructor(tsConfigFilePath?: string);
|
|
7
|
+
parseRepository(options: ParseRepositoryOptions): GraphData;
|
|
8
|
+
getProject(): Project;
|
|
9
|
+
private loadSourceFiles;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=type-script-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-script-parser.d.ts","sourceRoot":"","sources":["../../src/services/type-script-parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAmB,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAQpE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAEd,gBAAgB,CAAC,EAAE,MAAM;IASrC,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS;IAuB3D,UAAU,IAAI,OAAO;IAI5B,OAAO,CAAC,eAAe;CAMxB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TypeScriptParser = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const ts_morph_1 = require("ts-morph");
|
|
9
|
+
const file_discovery_1 = require("../utils/file-discovery");
|
|
10
|
+
const sort_utils_1 = require("../utils/sort-utils");
|
|
11
|
+
const call_extractor_1 = require("./call-extractor");
|
|
12
|
+
const parse_state_1 = require("./parse-state");
|
|
13
|
+
const import_extractor_1 = require("./import-extractor");
|
|
14
|
+
const symbol_extractor_1 = require("./symbol-extractor");
|
|
15
|
+
class TypeScriptParser {
|
|
16
|
+
project;
|
|
17
|
+
constructor(tsConfigFilePath) {
|
|
18
|
+
this.project = tsConfigFilePath
|
|
19
|
+
? new ts_morph_1.Project({ tsConfigFilePath })
|
|
20
|
+
: new ts_morph_1.Project({
|
|
21
|
+
skipAddingFilesFromTsConfig: true,
|
|
22
|
+
skipFileDependencyResolution: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
parseRepository(options) {
|
|
26
|
+
const rootDir = node_path_1.default.resolve(options.rootDir);
|
|
27
|
+
const discoveredFiles = (0, file_discovery_1.discoverSourceFiles)(rootDir);
|
|
28
|
+
const state = (0, parse_state_1.createParseState)(rootDir, discoveredFiles);
|
|
29
|
+
this.project.getSourceFiles().forEach((sourceFile) => sourceFile.forget());
|
|
30
|
+
const sourceFiles = this.loadSourceFiles(rootDir, discoveredFiles);
|
|
31
|
+
sourceFiles.forEach((sourceFile) => {
|
|
32
|
+
(0, symbol_extractor_1.extractFileAndSymbolNodes)(sourceFile, state);
|
|
33
|
+
});
|
|
34
|
+
sourceFiles.forEach((sourceFile) => {
|
|
35
|
+
(0, import_extractor_1.extractImportEdges)(sourceFile, state);
|
|
36
|
+
(0, call_extractor_1.extractCallEdges)(sourceFile, state);
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
nodes: (0, sort_utils_1.sortNodes)(state.nodes),
|
|
40
|
+
edges: (0, sort_utils_1.sortEdges)(state.edges),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
getProject() {
|
|
44
|
+
return this.project;
|
|
45
|
+
}
|
|
46
|
+
loadSourceFiles(rootDir, discoveredFiles) {
|
|
47
|
+
return discoveredFiles.map((relativeFilePath) => {
|
|
48
|
+
const absoluteFilePath = node_path_1.default.join(rootDir, relativeFilePath);
|
|
49
|
+
return this.project.addSourceFileAtPath(absoluteFilePath);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.TypeScriptParser = TypeScriptParser;
|
|
54
|
+
//# sourceMappingURL=type-script-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-script-parser.js","sourceRoot":"","sources":["../../src/services/type-script-parser.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAC5B,uCAAmD;AAGnD,4DAA6D;AAC7D,oDAA0D;AAC1D,qDAAmD;AACnD,+CAAgD;AAChD,yDAAuD;AACvD,yDAA8D;AAE9D,MAAa,gBAAgB;IACV,OAAO,CAAS;IAEjC,YAAmB,gBAAyB;QAC1C,IAAI,CAAC,OAAO,GAAG,gBAAgB;YAC7B,CAAC,CAAC,IAAI,kBAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;YACnC,CAAC,CAAC,IAAI,kBAAO,CAAC;gBACV,2BAA2B,EAAE,IAAI;gBACjC,4BAA4B,EAAE,IAAI;aACnC,CAAC,CAAA;IACR,CAAC;IAEM,eAAe,CAAC,OAA+B;QACpD,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC7C,MAAM,eAAe,GAAG,IAAA,oCAAmB,EAAC,OAAO,CAAC,CAAA;QACpD,MAAM,KAAK,GAAG,IAAA,8BAAgB,EAAC,OAAO,EAAE,eAAe,CAAC,CAAA;QAExD,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;QAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;QAElE,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACjC,IAAA,4CAAyB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QAEF,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACjC,IAAA,qCAAkB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAA;YACrC,IAAA,iCAAgB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACrC,CAAC,CAAC,CAAA;QAEF,OAAO;YACL,KAAK,EAAE,IAAA,sBAAS,EAAC,KAAK,CAAC,KAAK,CAAC;YAC7B,KAAK,EAAE,IAAA,sBAAS,EAAC,KAAK,CAAC,KAAK,CAAC;SAC9B,CAAA;IACH,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAEO,eAAe,CAAC,OAAe,EAAE,eAAyB;QAChE,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAC9C,MAAM,gBAAgB,GAAG,mBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;YAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;QAC3D,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA7CD,4CA6CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-discovery.d.ts","sourceRoot":"","sources":["../../src/utils/file-discovery.ts"],"names":[],"mappings":"AAKA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAsC7D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.discoverSourceFiles = discoverSourceFiles;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const parser_constants_1 = require("../models/parser-constants");
|
|
10
|
+
const path_utils_1 = require("./path-utils");
|
|
11
|
+
function discoverSourceFiles(rootDir) {
|
|
12
|
+
const discovered = [];
|
|
13
|
+
const stack = [rootDir];
|
|
14
|
+
while (stack.length > 0) {
|
|
15
|
+
const currentDir = stack.pop();
|
|
16
|
+
if (!currentDir) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const entries = (0, node_fs_1.readdirSync)(currentDir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name));
|
|
20
|
+
for (const entry of entries) {
|
|
21
|
+
const absolutePath = node_path_1.default.join(currentDir, entry.name);
|
|
22
|
+
if (entry.isDirectory()) {
|
|
23
|
+
if (!parser_constants_1.IGNORED_DIRECTORIES.has(entry.name)) {
|
|
24
|
+
stack.push(absolutePath);
|
|
25
|
+
}
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (!entry.isFile()) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const extension = node_path_1.default.extname(entry.name).toLowerCase();
|
|
32
|
+
if (!parser_constants_1.SUPPORTED_EXTENSIONS.has(extension)) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
discovered.push((0, path_utils_1.normalizeToPosixPath)(node_path_1.default.relative(rootDir, absolutePath)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return discovered.sort((left, right) => left.localeCompare(right));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=file-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-discovery.js","sourceRoot":"","sources":["../../src/utils/file-discovery.ts"],"names":[],"mappings":";;;;;AAKA,kDAsCC;AA3CD,qCAAqC;AACrC,0DAA4B;AAC5B,iEAAsF;AACtF,6CAAmD;AAEnD,SA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AAC,CAAC,CAAA;QAC7E,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SourceLoc } from '@archkit/core';
|
|
2
|
+
import type { CallExpression, ClassDeclaration, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, MethodDeclaration, SourceFile, TypeAliasDeclaration } from 'ts-morph';
|
|
3
|
+
type LocDeclaration = CallExpression | ClassDeclaration | MethodDeclaration | FunctionDeclaration | InterfaceDeclaration | TypeAliasDeclaration | ImportDeclaration;
|
|
4
|
+
export declare function getLoc(declaration: LocDeclaration): SourceLoc;
|
|
5
|
+
export declare function getLocFromSourceFile(sourceFile: SourceFile): SourceLoc;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=loc-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc-utils.d.ts","sourceRoot":"","sources":["../../src/utils/loc-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACrB,MAAM,UAAU,CAAA;AAEjB,KAAK,cAAc,GACf,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,iBAAiB,CAAA;AAErB,wBAAgB,MAAM,CAAC,WAAW,EAAE,cAAc,GAAG,SAAS,CAO7D;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAOtE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLoc = getLoc;
|
|
4
|
+
exports.getLocFromSourceFile = getLocFromSourceFile;
|
|
5
|
+
function getLoc(declaration) {
|
|
6
|
+
return {
|
|
7
|
+
startLine: declaration.getStartLineNumber(),
|
|
8
|
+
endLine: declaration.getEndLineNumber(),
|
|
9
|
+
startOffset: declaration.getStart(),
|
|
10
|
+
endOffset: declaration.getEnd(),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function getLocFromSourceFile(sourceFile) {
|
|
14
|
+
return {
|
|
15
|
+
startLine: 1,
|
|
16
|
+
endLine: sourceFile.getEndLineNumber(),
|
|
17
|
+
startOffset: 0,
|
|
18
|
+
endOffset: sourceFile.getFullText().length,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=loc-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc-utils.js","sourceRoot":"","sources":["../../src/utils/loc-utils.ts"],"names":[],"mappings":";;AAqBA,wBAOC;AAED,oDAOC;AAhBD,SAAgB,MAAM,CAAC,WAA2B;IAChD,OAAO;QACL,SAAS,EAAE,WAAW,CAAC,kBAAkB,EAAE;QAC3C,OAAO,EAAE,WAAW,CAAC,gBAAgB,EAAE;QACvC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE;QACnC,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE;KAChC,CAAA;AACH,CAAC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAO;QACL,SAAS,EAAE,CAAC;QACZ,OAAO,EAAE,UAAU,CAAC,gBAAgB,EAAE;QACtC,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,MAAM;KAC3C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function normalizeToPosixPath(inputPath: string): string;
|
|
2
|
+
export declare function toRelativePath(absolutePath: string, rootDir: string): string;
|
|
3
|
+
export declare function createFileNodeId(filePath: string): string;
|
|
4
|
+
//# sourceMappingURL=path-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../src/utils/path-utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.normalizeToPosixPath = normalizeToPosixPath;
|
|
7
|
+
exports.toRelativePath = toRelativePath;
|
|
8
|
+
exports.createFileNodeId = createFileNodeId;
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
function normalizeToPosixPath(inputPath) {
|
|
11
|
+
return inputPath.replace(/\\/g, '/');
|
|
12
|
+
}
|
|
13
|
+
function toRelativePath(absolutePath, rootDir) {
|
|
14
|
+
return normalizeToPosixPath(node_path_1.default.relative(rootDir, absolutePath));
|
|
15
|
+
}
|
|
16
|
+
function createFileNodeId(filePath) {
|
|
17
|
+
return `file:${filePath}`;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=path-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../src/utils/path-utils.ts"],"names":[],"mappings":";;;;;AAEA,oDAEC;AAED,wCAEC;AAED,4CAEC;AAZD,0DAA4B;AAE5B,SAAgB,oBAAoB,CAAC,SAAiB;IACpD,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAED,SAAgB,cAAc,CAAC,YAAoB,EAAE,OAAe;IAClE,OAAO,oBAAoB,CAAC,mBAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;AACnE,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAAgB;IAC/C,OAAO,QAAQ,QAAQ,EAAE,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-utils.d.ts","sourceRoot":"","sources":["../../src/utils/sort-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEvD,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAEvD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAMvD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortNodes = sortNodes;
|
|
4
|
+
exports.sortEdges = sortEdges;
|
|
5
|
+
function sortNodes(nodes) {
|
|
6
|
+
return [...nodes].sort((left, right) => left.id.localeCompare(right.id));
|
|
7
|
+
}
|
|
8
|
+
function sortEdges(edges) {
|
|
9
|
+
return [...edges].sort((left, right) => {
|
|
10
|
+
const leftKey = `${left.type}:${left.from}:${left.to}:${left.filePath ?? ''}:${left.loc?.startLine ?? 0}`;
|
|
11
|
+
const rightKey = `${right.type}:${right.from}:${right.to}:${right.filePath ?? ''}:${right.loc?.startLine ?? 0}`;
|
|
12
|
+
return leftKey.localeCompare(rightKey);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=sort-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-utils.js","sourceRoot":"","sources":["../../src/utils/sort-utils.ts"],"names":[],"mappings":";;AAEA,8BAEC;AAED,8BAMC;AAVD,SAAgB,SAAS,CAAC,KAAiB;IACzC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED,SAAgB,SAAS,CAAC,KAAiB;IACzC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,EAAE,CAAA;QACzG,MAAM,QAAQ,GAAG,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,QAAQ,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,EAAE,CAAA;QAC/G,OAAO,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@archkit/parser-ts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/brent-broeckx/arch.git",
|
|
8
|
+
"directory": "packages/arch-parser-ts"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/brent-broeckx/arch#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/brent-broeckx/arch/issues"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"ts-morph": "^24.0.0",
|
|
31
|
+
"@archkit/core": "0.1.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"dev": "tsc -w -p tsconfig.json",
|
|
36
|
+
"lint": "echo \"No lint configured yet\"",
|
|
37
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
38
|
+
}
|
|
39
|
+
}
|